This patch is a collection of changes from __pa/__va to __boot_pa/__boot_va calls in ppc64 specific code. Signed-off-by: Mike Kravetz Signed-off-by: Dave Hansen --- memhotplug-dave/arch/ppc64/kernel/prom_init.c | 8 ++++---- memhotplug-dave/arch/ppc64/kernel/rtas.c | 6 ++++-- memhotplug-dave/arch/ppc64/kernel/setup.c | 12 ++++++------ memhotplug-dave/arch/ppc64/mm/hash_utils.c | 4 ++-- memhotplug-dave/include/asm-ppc64/dma.h | 2 ++ 5 files changed, 18 insertions(+), 14 deletions(-) diff -puN arch/ppc64/kernel/prom_init.c~G0-ppc64-__boot-fixes arch/ppc64/kernel/prom_init.c --- memhotplug/arch/ppc64/kernel/prom_init.c~G0-ppc64-__boot-fixes 2005-02-17 15:25:45.000000000 -0800 +++ memhotplug-dave/arch/ppc64/kernel/prom_init.c 2005-02-17 15:25:45.000000000 -0800 @@ -913,11 +913,11 @@ static void __init prom_hold_cpus(void) extern unsigned long __secondary_hold_spinloop; extern unsigned long __secondary_hold_acknowledge; unsigned long *spinloop - = (void *)virt_to_abs(&__secondary_hold_spinloop); + = (void *)boot_virt_to_abs(&__secondary_hold_spinloop); unsigned long *acknowledge - = (void *)virt_to_abs(&__secondary_hold_acknowledge); + = (void *)boot_virt_to_abs(&__secondary_hold_acknowledge); unsigned long secondary_hold - = virt_to_abs(*PTRRELOC((unsigned long *)__secondary_hold)); + = boot_virt_to_abs(*PTRRELOC((unsigned long *)__secondary_hold)); struct prom_t *_prom = PTRRELOC(&prom); prom_debug("prom_hold_cpus: start...\n"); @@ -1563,7 +1563,7 @@ static void __init prom_check_initrd(uns if ( r3 && r4 && r4 != 0xdeadbeef) { u64 val; - RELOC(prom_initrd_start) = (r3 >= KERNELBASE) ? __pa(r3) : r3; + RELOC(prom_initrd_start) = (r3 >= KERNELBASE) ? __boot_pa(r3) : r3; RELOC(prom_initrd_end) = RELOC(prom_initrd_start) + r4; val = (u64)RELOC(prom_initrd_start); diff -puN arch/ppc64/kernel/rtas.c~G0-ppc64-__boot-fixes arch/ppc64/kernel/rtas.c --- memhotplug/arch/ppc64/kernel/rtas.c~G0-ppc64-__boot-fixes 2005-02-17 15:25:45.000000000 -0800 +++ memhotplug-dave/arch/ppc64/kernel/rtas.c 2005-02-17 15:25:45.000000000 -0800 @@ -36,6 +36,7 @@ struct flash_block_list_header rtas_firm struct rtas_t rtas = { .lock = SPIN_LOCK_UNLOCKED }; +static unsigned long rtas_args_paddr; EXPORT_SYMBOL(rtas); @@ -192,8 +193,7 @@ int rtas_call(int token, int nargs, int for (i = 0; i < nret; ++i) rtas_args->rets[i] = 0; - PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n", - __pa(rtas_args)); + PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n", rtas_args_paddr); enter_rtas(__pa(rtas_args)); PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); @@ -605,6 +605,8 @@ void __init rtas_initialize(void) #endif /* CONFIG_HOTPLUG_CPU */ } + /* Get and save off phys address of rtas structure argunemt field */ + rtas_args_paddr = __boot_pa(&rtas.args); } diff -puN arch/ppc64/kernel/setup.c~G0-ppc64-__boot-fixes arch/ppc64/kernel/setup.c --- memhotplug/arch/ppc64/kernel/setup.c~G0-ppc64-__boot-fixes 2005-02-17 15:25:45.000000000 -0800 +++ memhotplug-dave/arch/ppc64/kernel/setup.c 2005-02-17 15:25:45.000000000 -0800 @@ -411,7 +411,7 @@ void __init early_setup(unsigned long dt * tree, like retreiving the physical memory map or * calculating/retreiving the hash table size */ - early_init_devtree(__va(dt_ptr)); + early_init_devtree(__boot_va(dt_ptr)); /* * Iterate all ppc_md structures until we find the proper @@ -544,10 +544,10 @@ static void __init check_for_initrd(void prop = (u64 *)get_property(of_chosen, "linux,initrd-start", NULL); if (prop != NULL) { - initrd_start = (unsigned long)__va(*prop); + initrd_start = (unsigned long)__boot_va(*prop); prop = (u64 *)get_property(of_chosen, "linux,initrd-end", NULL); if (prop != NULL) { - initrd_end = (unsigned long)__va(*prop); + initrd_end = (unsigned long)__boot_va(*prop); initrd_below_start_ok = 1; } else initrd_start = 0; @@ -954,9 +954,9 @@ static void __init irqstack_early_init(v * SLB misses on them. */ for_each_cpu(i) { - softirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE, + softirq_ctx[i] = (struct thread_info *)__boot_va(lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, 0x10000000)); - hardirq_ctx[i] = (struct thread_info *)__va(lmb_alloc_base(THREAD_SIZE, + hardirq_ctx[i] = (struct thread_info *)__boot_va(lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, 0x10000000)); } } @@ -985,7 +985,7 @@ static void __init emergency_stack_init( limit = min(0x10000000UL, lmb.rmo_size); for_each_cpu(i) - paca[i].emergency_sp = __va(lmb_alloc_base(PAGE_SIZE, 128, + paca[i].emergency_sp = __boot_va(lmb_alloc_base(PAGE_SIZE, 128, limit)) + PAGE_SIZE; } diff -puN arch/ppc64/mm/hash_utils.c~G0-ppc64-__boot-fixes arch/ppc64/mm/hash_utils.c --- memhotplug/arch/ppc64/mm/hash_utils.c~G0-ppc64-__boot-fixes 2005-02-17 15:25:45.000000000 -0800 +++ memhotplug-dave/arch/ppc64/mm/hash_utils.c 2005-02-17 15:25:45.000000000 -0800 @@ -119,12 +119,12 @@ static inline void create_pte_mapping(un #ifdef CONFIG_PPC_PSERIES if (systemcfg->platform & PLATFORM_LPAR) ret = pSeries_lpar_hpte_insert(hpteg, va, - virt_to_abs(addr) >> PAGE_SHIFT, + boot_virt_to_abs(addr) >> PAGE_SHIFT, 0, mode, 1, large); else #endif /* CONFIG_PPC_PSERIES */ ret = native_hpte_insert(hpteg, va, - virt_to_abs(addr) >> PAGE_SHIFT, + boot_virt_to_abs(addr) >> PAGE_SHIFT, 0, mode, 1, large); if (ret == -1) { diff -puN include/asm-ppc64/dma.h~G0-ppc64-__boot-fixes include/asm-ppc64/dma.h --- memhotplug/include/asm-ppc64/dma.h~G0-ppc64-__boot-fixes 2005-02-17 15:25:45.000000000 -0800 +++ memhotplug-dave/include/asm-ppc64/dma.h 2005-02-17 15:25:45.000000000 -0800 @@ -26,6 +26,8 @@ /* The maximum address that we can perform a DMA transfer to on this platform */ /* Doesn't really apply... */ #define MAX_DMA_ADDRESS (~0UL) +#define MAX_DMA_PHYSADDR MAX_DMA_ADDRESS +#define MAX_DMA_PHYSADDR MAX_DMA_ADDRESS #define dma_outb outb #define dma_inb inb _