Skip to contentSkip to conversation

no buddy bitmap patch : for ia64 [2/2]

PATCH In review Hiroyuki KAMEZAWA 2 participants 3 messages Oct 7, 2004 – Oct 8, 2004 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 no buddy bitmap patch : for ia64 [2/2]

This patch is for ia64.
Add HOLES_IN_ZONE macro definition and align vmemmap with ia64's granule size.

Kame <[email protected]>

=== for arch/ia64 ===============
This patch is for ia64 kernel.
This defines HOLES_IN_ZONE in asm-ia64/page.h
And makes vmemmap aligned with IA64_GRANULE_SIZE in arch/ia64/mm/init.c.

---

 test-kernel-kamezawa/arch/ia64/mm/init.c     |    3 ++-
 test-kernel-kamezawa/include/asm-ia64/page.h |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
include/asm-ia64/page.h renamed from include/asm-ia64/page.h~ia64_fix +1 -0
diff -puN include/asm-ia64/page.h~ia64_fix include/asm-ia64/page.h
@@ -79,6 +79,7 @@ do {						\
 
 #ifdef CONFIG_VIRTUAL_MEM_MAP
 extern int ia64_pfn_valid (unsigned long pfn);
+#define HOLES_IN_ZONE 1
 #else
 # define ia64_pfn_valid(pfn) 1
 #endif
arch/ia64/mm/init.c renamed from arch/ia64/mm/init.c~ia64_fix +2 -1
diff -puN arch/ia64/mm/init.c~ia64_fix arch/ia64/mm/init.c
@@ -410,7 +410,8 @@ virtual_memmap_init (u64 start, u64 end,
 	struct page *map_start, *map_end;
 
 	args = (struct memmap_init_callback_data *) arg;
-
+	start = GRANULEROUNDDOWN(start);
+	end = GRANULEROUNDUP(end);
 	map_start = vmem_map + (__pa(start) >> PAGE_SHIFT);
 	map_end   = vmem_map + (__pa(end) >> PAGE_SHIFT);
 

_

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#1 lore raw
Quoted 6 lines · Hiroyuki KAMEZAWA

#ifdef CONFIG_VIRTUAL_MEM_MAP
extern int ia64_pfn_valid (unsigned long pfn);
+#define HOLES_IN_ZONE 1
#else

 # define ia64_pfn_valid(pfn) 1
 #endif

The real way to do this is to put it in a Kconfig file.

something like:

config HOLES_IN_ZONE
bool
depends on VIRTUAL_MEM_MAP

right below where 'config VIRTUAL_MEM_MAP' is defined. That way, if any other architectures need it, they alter their Kconfig files instead of headers. Also, it leaves the possibility of having an arch-independent Kconfig file for memory-related options which I'd like to do in the future.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
Quoted 8 lines · Dave Hansen

The real way to do this is to put it in a Kconfig file.

something like:

config HOLES_IN_ZONE
bool
depends on VIRTUAL_MEM_MAP

Quoted 6 lines

right below where 'config VIRTUAL_MEM_MAP' is defined. That way, if any other architectures need it, they alter their Kconfig files instead of headers. Also, it leaves the possibility of having an arch-independent Kconfig file for memory-related options which I'd like to do in the future.

Ok, it looks better. I'll move it.
Updated version will be posted in a day.

Kame <[email protected]>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>