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 Index: linux-2.6.13/arch/ppc64/kernel/prom_init.c =================================================================== --- linux-2.6.13.orig/arch/ppc64/kernel/prom_init.c 2005-08-28 16:41:01.000000000 -0700 +++ linux-2.6.13/arch/ppc64/kernel/prom_init.c 2005-08-30 12:18:07.000000000 -0700 @@ -1139,11 +1139,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"); @@ -1846,7 +1846,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); Index: linux-2.6.13/arch/ppc64/kernel/rtas.c =================================================================== --- linux-2.6.13.orig/arch/ppc64/kernel/rtas.c 2005-08-28 16:41:01.000000000 -0700 +++ linux-2.6.13/arch/ppc64/kernel/rtas.c 2005-08-30 12:18:07.000000000 -0700 @@ -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); @@ -309,8 +310,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"); @@ -758,6 +758,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); } Index: linux-2.6.13/arch/ppc64/kernel/setup.c =================================================================== --- linux-2.6.13.orig/arch/ppc64/kernel/setup.c 2005-08-28 16:41:01.000000000 -0700 +++ linux-2.6.13/arch/ppc64/kernel/setup.c 2005-08-30 12:18:07.000000000 -0700 @@ -405,7 +405,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 @@ -538,10 +538,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; @@ -972,9 +972,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)); } } @@ -1003,7 +1003,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; } Index: linux-2.6.13/arch/ppc64/mm/hash_utils.c =================================================================== --- linux-2.6.13.orig/arch/ppc64/mm/hash_utils.c 2005-08-28 16:41:01.000000000 -0700 +++ linux-2.6.13/arch/ppc64/mm/hash_utils.c 2005-08-30 12:18:07.000000000 -0700 @@ -132,12 +132,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, vflags, tmp_mode); else #endif /* CONFIG_PPC_PSERIES */ ret = native_hpte_insert(hpteg, va, - virt_to_abs(addr) >> PAGE_SHIFT, + boot_virt_to_abs(addr) >> PAGE_SHIFT, vflags, tmp_mode); if (ret == -1) { Index: linux-2.6.13/include/asm-ppc64/dma.h =================================================================== --- linux-2.6.13.orig/include/asm-ppc64/dma.h 2005-08-28 16:41:01.000000000 -0700 +++ linux-2.6.13/include/asm-ppc64/dma.h 2005-08-30 12:18:07.000000000 -0700 @@ -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 #if !defined(CONFIG_PPC_ISERIES) || defined(CONFIG_PCI)