
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
DESC
more ppc64 stuff
EDESC
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/arch/ppc64/kernel/prom.c   |    2 +-
 memhotplug-dave/arch/ppc64/kernel/smp.c    |    3 ++-
 memhotplug-dave/arch/ppc64/kernel/vio.c    |    2 +-
 memhotplug-dave/arch/ppc64/mm/hash_utils.c |    2 +-
 memhotplug-dave/arch/ppc64/mm/init.c       |   11 ++++++++---
 memhotplug-dave/arch/ppc64/xmon/xmon.c     |    2 +-
 6 files changed, 14 insertions(+), 8 deletions(-)

diff -puN arch/ppc64/mm/init.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/mm/init.c
--- memhotplug/arch/ppc64/mm/init.c~G2-nonlinear-ppc64-dave-hmore	2004-09-22 14:55:08.000000000 -0700
+++ memhotplug-dave/arch/ppc64/mm/init.c	2004-09-22 14:55:08.000000000 -0700
@@ -37,6 +37,9 @@
 #include <linux/bootmem.h>
 #include <linux/highmem.h>
 #include <linux/idr.h>
+#include <linux/nonlinear.h>
+#include <linux/memory_hotplug.h>
+
 
 #include <asm/pgalloc.h>
 #include <asm/page.h>
@@ -617,6 +620,11 @@ void __init do_init_bootmem(void)
 	alloc_memsections(0, 0, total_pages);
 #endif
 
+#ifdef CONFIG_NONLINEAR
+	setup_memsections();
+	alloc_memsections(0, 0, total_pages);
+#endif
+
 	/*
 	 * Find an area to use for the bootmem bitmap.  Calculate the size of
 	 * bitmap required as (Total Memory) / PAGE_SIZE / BITS_PER_BYTE.
@@ -659,9 +667,6 @@ void __init paging_init(void)
 	unsigned long total_ram = lmb_phys_mem_size();
 	unsigned long top_of_ram = lmb_end_of_DRAM();
 	unsigned long top_pfn = top_of_ram >> PAGE_SHIFT;
-#ifdef CONFIG_NONLINEAR
-	struct page *lmem_map;
-#endif
 
 
 	printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
diff -puN fs/binfmt_elf.c~G2-nonlinear-ppc64-dave-hmore fs/binfmt_elf.c
diff -puN arch/ppc64/kernel/pSeries_nvram.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/pSeries_nvram.c
diff -puN arch/ppc64/kernel/smp.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/smp.c
--- memhotplug/arch/ppc64/kernel/smp.c~G2-nonlinear-ppc64-dave-hmore	2004-09-22 14:55:08.000000000 -0700
+++ memhotplug-dave/arch/ppc64/kernel/smp.c	2004-09-22 14:55:08.000000000 -0700
@@ -376,7 +376,7 @@ static inline int __devinit smp_startup_
 {
 	int status;
 	extern void (*pseries_secondary_smp_init)(unsigned int cpu);
-	unsigned long start_here = __pa(pseries_secondary_smp_init);
+	unsigned long start_here;
 	unsigned int pcpu;
 
 	/* At boot time the cpus are already spinning in hold
@@ -396,6 +396,7 @@ static inline int __devinit smp_startup_
 	/* At boot this is done in prom.c. */
 	paca[lcpu].hw_cpu_id = pcpu;
 
+	start_here = __pa(pseries_secondary_smp_init);
 	status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL,
 			   pcpu, start_here, lcpu);
 	if (status != 0) {
diff -puN arch/ppc64/kernel/prom.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/prom.c
--- memhotplug/arch/ppc64/kernel/prom.c~G2-nonlinear-ppc64-dave-hmore	2004-09-22 14:55:08.000000000 -0700
+++ memhotplug-dave/arch/ppc64/kernel/prom.c	2004-09-22 14:55:08.000000000 -0700
@@ -734,7 +734,7 @@ static void __init prom_initialize_dart_
 	 * will blow up an entire large page anyway in the kernel mapping
 	 */
 	RELOC(dart_tablebase) = (unsigned long)
-		abs_to_virt(lmb_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
+		boot_abs_virt(lmb_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
 
 	prom_printf("Dart at: %x\n", RELOC(dart_tablebase));
 }
diff -puN arch/ppc64/kernel/vio.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/vio.c
--- memhotplug/arch/ppc64/kernel/vio.c~G2-nonlinear-ppc64-dave-hmore	2004-09-22 14:55:08.000000000 -0700
+++ memhotplug-dave/arch/ppc64/kernel/vio.c	2004-09-22 14:55:08.000000000 -0700
@@ -162,7 +162,7 @@ void __init iommu_vio_init(void)
 	cb.itc_busno = 255;    /* Bus 255 is the virtual bus */
 	cb.itc_virtbus = 0xff; /* Ask for virtual bus */
 
-	cbp = virt_to_abs(&cb);
+	cbp = boot_virt_to_abs(&cb);
 	HvCallXm_getTceTableParms(cbp);
 
 	veth_iommu_table.it_size        = cb.itc_size / 2;
diff -puN arch/ppc64/mm/hash_utils.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/mm/hash_utils.c
--- memhotplug/arch/ppc64/mm/hash_utils.c~G2-nonlinear-ppc64-dave-hmore	2004-09-22 14:55:08.000000000 -0700
+++ memhotplug-dave/arch/ppc64/mm/hash_utils.c	2004-09-22 14:55:08.000000000 -0700
@@ -82,7 +82,7 @@ static inline void loop_forever(void)
 }
 
 #ifdef CONFIG_PPC_PSERIES
-static inline void create_pte_mapping(unsigned long start, unsigned long end,
+inline void create_pte_mapping(unsigned long start, unsigned long end,
 				      unsigned long mode, int large)
 {
 	unsigned long addr;
diff -puN arch/ppc64/xmon/xmon.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/xmon/xmon.c
--- memhotplug/arch/ppc64/xmon/xmon.c~G2-nonlinear-ppc64-dave-hmore	2004-09-22 14:55:08.000000000 -0700
+++ memhotplug-dave/arch/ppc64/xmon/xmon.c	2004-09-22 14:55:08.000000000 -0700
@@ -273,7 +273,7 @@ static inline void disable_surveillance(
 		args.args[0] = SURVEILLANCE_TOKEN;
 		args.args[1] = 0;
 		args.args[2] = 0;
-		enter_rtas(__pa(&args));
+		enter_rtas(__boot_pa(&args));
 	}
 #endif
 }
_
