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

 memhotplug1-dave/arch/ppc64/kernel/pSeries_smp.c |    5 +++--
 memhotplug1-dave/arch/ppc64/kernel/vio.c         |    2 +-
 memhotplug1-dave/arch/ppc64/mm/hash_utils.c      |    2 +-
 memhotplug1-dave/arch/ppc64/mm/init.c            |   11 ++++++++---
 memhotplug1-dave/arch/ppc64/xmon/xmon.c          |    2 +-
 5 files changed, 14 insertions(+), 8 deletions(-)

diff -puN arch/ppc64/mm/init.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/mm/init.c
--- memhotplug1/arch/ppc64/mm/init.c~G2-nonlinear-ppc64-dave-hmore	2004-11-04 16:45:43.000000000 -0800
+++ memhotplug1-dave/arch/ppc64/mm/init.c	2004-11-04 16:45:43.000000000 -0800
@@ -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>
@@ -619,6 +622,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.
@@ -661,9 +669,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
diff -puN arch/ppc64/kernel/prom.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/prom.c
diff -puN arch/ppc64/kernel/vio.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/vio.c
--- memhotplug1/arch/ppc64/kernel/vio.c~G2-nonlinear-ppc64-dave-hmore	2004-11-04 16:45:43.000000000 -0800
+++ memhotplug1-dave/arch/ppc64/kernel/vio.c	2004-11-04 16:45:43.000000000 -0800
@@ -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
--- memhotplug1/arch/ppc64/mm/hash_utils.c~G2-nonlinear-ppc64-dave-hmore	2004-11-04 16:45:43.000000000 -0800
+++ memhotplug1-dave/arch/ppc64/mm/hash_utils.c	2004-11-04 16:45:43.000000000 -0800
@@ -90,7 +90,7 @@ static inline void loop_forever(void)
 }
 
 #ifdef CONFIG_PPC_MULTIPLATFORM
-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
--- memhotplug1/arch/ppc64/xmon/xmon.c~G2-nonlinear-ppc64-dave-hmore	2004-11-04 16:45:43.000000000 -0800
+++ memhotplug1-dave/arch/ppc64/xmon/xmon.c	2004-11-04 16:45:43.000000000 -0800
@@ -272,7 +272,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 /* CONFIG_PPC_PSERIES */
 }
 
diff -puN arch/ppc64/kernel/pSeries_smp.c~G2-nonlinear-ppc64-dave-hmore arch/ppc64/kernel/pSeries_smp.c
--- memhotplug1/arch/ppc64/kernel/pSeries_smp.c~G2-nonlinear-ppc64-dave-hmore	2004-11-04 16:45:43.000000000 -0800
+++ memhotplug1-dave/arch/ppc64/kernel/pSeries_smp.c	2004-11-04 16:45:43.000000000 -0800
@@ -202,8 +202,7 @@ out:
 static inline int __devinit smp_startup_cpu(unsigned int lcpu)
 {
 	int status;
-	unsigned long start_here = __pa((u32)*((unsigned long *)
-					       pseries_secondary_smp_init));
+	unsigned long start_here;
 	unsigned int pcpu;
 
 	/* At boot time the cpus are already spinning in hold
@@ -223,6 +222,8 @@ static inline int __devinit smp_startup_
 	/* At boot this is done in prom.c. */
 	paca[lcpu].hw_cpu_id = pcpu;
 
+	start_here =  __pa((u32)*((unsigned long *)
+			       pseries_secondary_smp_init));
 	status = rtas_call(rtas_token("start-cpu"), 3, 1, NULL,
 			   pcpu, start_here, lcpu);
 	if (status != 0) {
_
