* [PATCH] clean up contig/discontig/virt_mem_map macros
@ 2004-09-27 22:33 Tony Luck
2004-09-27 23:17 ` Jesse Barnes
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Tony Luck @ 2004-09-27 22:33 UTC (permalink / raw)
To: linux-ia64
I got this patch from Zou Nan hai to resolve the problem that
Andrew Morton has been having booting his ia64 system. The code
is quite a bit cleaner as he has reduced the number of different
definitions of pfn_valid/page_to_pfn/pfn_to_page, and left the
only remaining ones next to each other in page.h ... so this
should be easier to maintain going forward.
It has been tested on a variety of systems:
1G Tiger \ Tested by Zou Nan hai, I assume DIG=y, NUMA=n
8G Tiger / but I don't know for sure.
4G Tiger with generic_defconfig
4G Tiger with DIG kernel, NUMA, DISCONTIG and VIRTUAL_MEM_MAP on
4G Tiger with DIG kernel, NUMA/DISCONTIG off; VIRTUAL_MEM_MAP on
HP zx2000 with zx1_defconfig
Can someone please check it on sn2 (sn2_defconfig compiles, but I haven't
booted it) ... and any other systems or configurations that don't match
any of the above. I'd like to stop carrying the BPB that Andrew gave
me.
-Tony
diff -Nraup a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
--- a/arch/ia64/mm/contig.c 2004-09-12 22:32:00.000000000 -0700
+++ b/arch/ia64/mm/contig.c 2004-09-26 04:36:46.944608285 -0700
@@ -269,7 +269,6 @@ paging_init (void)
vmem_map = (struct page *) 0;
free_area_init_node(0, &contig_page_data, zones_size, 0,
zholes_size);
- mem_map = contig_page_data.node_mem_map;
} else {
unsigned long map_size;
@@ -280,11 +279,10 @@ paging_init (void)
vmem_map = (struct page *) vmalloc_end;
efi_memmap_walk(create_mem_map_page_table, 0);
- contig_page_data.node_mem_map = vmem_map;
+ mem_map = contig_page_data.node_mem_map = vmem_map;
free_area_init_node(0, &contig_page_data, zones_size,
0, zholes_size);
- mem_map = contig_page_data.node_mem_map;
printk("Virtual mem_map starts at 0x%p\n", mem_map);
}
#else /* !CONFIG_VIRTUAL_MEM_MAP */
diff -Nraup a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
--- a/include/asm-ia64/mmzone.h 2004-09-12 22:33:39.000000000 -0700
+++ b/include/asm-ia64/mmzone.h 2004-09-26 04:37:13.863553267 -0700
@@ -27,12 +27,6 @@
# define NR_NODE_MEMBLKS (NR_NODES * 4)
#endif
-extern unsigned long max_low_pfn;
-
-#define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
-#define page_to_pfn(page) ((unsigned long) (page - vmem_map))
-#define pfn_to_page(pfn) (vmem_map + (pfn))
-
#else /* CONFIG_DISCONTIGMEM */
# define NR_NODE_MEMBLKS 4
#endif /* CONFIG_DISCONTIGMEM */
diff -Nraup a/include/asm-ia64/page.h b/include/asm-ia64/page.h
--- a/include/asm-ia64/page.h 2004-09-12 22:31:43.000000000 -0700
+++ b/include/asm-ia64/page.h 2004-09-26 04:36:59.530545630 -0700
@@ -84,17 +84,16 @@ extern int ia64_pfn_valid (unsigned long
#endif
#ifndef CONFIG_DISCONTIGMEM
-# ifdef CONFIG_VIRTUAL_MEM_MAP
+# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
+# define page_to_pfn(page) ((unsigned long) (page - mem_map))
+# define pfn_to_page(pfn) (mem_map + (pfn))
+#else
extern struct page *vmem_map;
-# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
-# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
-# define pfn_to_page(pfn) (vmem_map + (pfn))
-# else
-# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
-# define page_to_pfn(page) ((unsigned long) (page - mem_map))
-# define pfn_to_page(pfn) (mem_map + (pfn))
-# endif
-#endif /* CONFIG_DISCONTIGMEM */
+extern unsigned long max_low_pfn;
+# define pfn_valid(pfn) (((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
+# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
+# define pfn_to_page(pfn) (vmem_map + (pfn))
+#endif
#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clean up contig/discontig/virt_mem_map macros
2004-09-27 22:33 [PATCH] clean up contig/discontig/virt_mem_map macros Tony Luck
@ 2004-09-27 23:17 ` Jesse Barnes
2004-09-27 23:18 ` Keshavamurthy Anil S
2004-09-28 3:24 ` Darren Williams
2 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2004-09-27 23:17 UTC (permalink / raw)
To: linux-ia64
On Monday, September 27, 2004 3:33 pm, Tony Luck wrote:
> I got this patch from Zou Nan hai to resolve the problem that
> Andrew Morton has been having booting his ia64 system. The code
> is quite a bit cleaner as he has reduced the number of different
> definitions of pfn_valid/page_to_pfn/pfn_to_page, and left the
> only remaining ones next to each other in page.h ... so this
> should be easier to maintain going forward.
>
> It has been tested on a variety of systems:
>
> 1G Tiger \ Tested by Zou Nan hai, I assume DIG=y, NUMA=n
> 8G Tiger / but I don't know for sure.
> 4G Tiger with generic_defconfig
> 4G Tiger with DIG kernel, NUMA, DISCONTIG and VIRTUAL_MEM_MAP on
> 4G Tiger with DIG kernel, NUMA/DISCONTIG off; VIRTUAL_MEM_MAP on
> HP zx2000 with zx1_defconfig
>
> Can someone please check it on sn2 (sn2_defconfig compiles, but I haven't
> booted it) ... and any other systems or configurations that don't match
> any of the above. I'd like to stop carrying the BPB that Andrew gave
> me.
Boots on a small machine and the code looks identical, so I'm pretty sure it's
fine.
Thanks,
Jesse
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clean up contig/discontig/virt_mem_map macros
2004-09-27 22:33 [PATCH] clean up contig/discontig/virt_mem_map macros Tony Luck
2004-09-27 23:17 ` Jesse Barnes
@ 2004-09-27 23:18 ` Keshavamurthy Anil S
2004-09-28 3:24 ` Darren Williams
2 siblings, 0 replies; 4+ messages in thread
From: Keshavamurthy Anil S @ 2004-09-27 23:18 UTC (permalink / raw)
To: linux-ia64
On Mon, Sep 27, 2004 at 03:33:10PM -0700, Tony Luck wrote:
Hi Tony,
I tried booting tiger with DIG kernel and virtual_mem_map turned on and kernel
which used to reset earlier now boots fine after applying your patch.
thanks,
Anil
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] clean up contig/discontig/virt_mem_map macros
2004-09-27 22:33 [PATCH] clean up contig/discontig/virt_mem_map macros Tony Luck
2004-09-27 23:17 ` Jesse Barnes
2004-09-27 23:18 ` Keshavamurthy Anil S
@ 2004-09-28 3:24 ` Darren Williams
2 siblings, 0 replies; 4+ messages in thread
From: Darren Williams @ 2004-09-28 3:24 UTC (permalink / raw)
To: linux-ia64
On Mon, 27 Sep 2004, Tony Luck wrote:
> I got this patch from Zou Nan hai to resolve the problem that
> Andrew Morton has been having booting his ia64 system. The code
> is quite a bit cleaner as he has reduced the number of different
> definitions of pfn_valid/page_to_pfn/pfn_to_page, and left the
> only remaining ones next to each other in page.h ... so this
> should be easier to maintain going forward.
>
> It has been tested on a variety of systems:
>
> 1G Tiger \ Tested by Zou Nan hai, I assume DIG=y, NUMA=n
> 8G Tiger / but I don't know for sure.
> 4G Tiger with generic_defconfig
> 4G Tiger with DIG kernel, NUMA, DISCONTIG and VIRTUAL_MEM_MAP on
> 4G Tiger with DIG kernel, NUMA/DISCONTIG off; VIRTUAL_MEM_MAP on
> HP zx2000 with zx1_defconfig
HP rx2600 with zx1_defconfig with/without VIRTUAL_MEM_MAP
compile and boot OK.
Darren
--------------------------------------------------
Darren Williams <dsw AT gelato.unsw.edu.au>
Gelato@UNSW <www.gelato.unsw.edu.au>
--------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-09-28 3:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-27 22:33 [PATCH] clean up contig/discontig/virt_mem_map macros Tony Luck
2004-09-27 23:17 ` Jesse Barnes
2004-09-27 23:18 ` Keshavamurthy Anil S
2004-09-28 3:24 ` Darren Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox