X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Frtas.c;h=603c9db193e401cd658c595316c98d8aed918843;hb=da7238bfbc1c5267bb3c9a79e03b6c296839a07e;hp=4a26e1cff6ce2f459a57c4411b39dfd0e8e1efec;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c index 4a26e1cff..603c9db19 100644 --- a/arch/ppc64/kernel/rtas.c +++ b/arch/ppc64/kernel/rtas.c @@ -58,6 +58,8 @@ struct rtas_t rtas = { .lock = SPIN_LOCK_UNLOCKED }; +EXPORT_SYMBOL_GPL(rtas); + char rtas_err_buf[RTAS_ERROR_LOG_MAX]; extern unsigned long reloc_offset(void); @@ -79,7 +81,7 @@ call_rtas_display_status(char c) args->rets = (rtas_arg_t *)&(args->args[1]); args->args[0] = (int)c; - enter_rtas((void *)__pa((unsigned long)args)); + enter_rtas(__pa(args)); spin_unlock_irqrestore(&rtas.lock, s); } @@ -115,9 +117,9 @@ __log_rtas_error(struct rtas_args *rtas_args) get_paca()->xRtas = err_args; PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n", - (void *)__pa((unsigned long)&err_args)); - enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas)); - PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); + __pa(&err_args)); + enter_rtas(__pa(&get_paca()->xRtas)); + PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); err_args = get_paca()->xRtas; get_paca()->xRtas = temp_args; @@ -174,8 +176,8 @@ rtas_call(int token, int nargs, int nret, rtas_args->rets[i] = 0; PPCDBG(PPCDBG_RTAS, "\tentering rtas with 0x%lx\n", - (void *)__pa((unsigned long)rtas_args)); - enter_rtas((void *)__pa((unsigned long)rtas_args)); + __pa(rtas_args)); + enter_rtas(__pa(rtas_args)); PPCDBG(PPCDBG_RTAS, "\treturned from rtas ...\n"); if (rtas_args->rets[0] == -1) @@ -345,7 +347,7 @@ rtas_flash_firmware(void) rtas_firmware_flash_list.num_blocks = 0; flist = (struct flash_block_list *)&rtas_firmware_flash_list; rtas_block_list = virt_to_abs(flist); - if (rtas_block_list >= (4UL << 20)) { + if (rtas_block_list >= 4UL*1024*1024*1024) { printk(KERN_ALERT "FLASH: kernel bug...flash list header addr above 4GB\n"); return; } @@ -480,7 +482,7 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) spin_lock_irqsave(&rtas.lock, flags); get_paca()->xRtas = args; - enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas)); + enter_rtas(__pa(&get_paca()->xRtas)); args = get_paca()->xRtas; spin_unlock_irqrestore(&rtas.lock, flags); @@ -515,7 +517,7 @@ void rtas_stop_self(void) printk("%u %u Ready to die...\n", smp_processor_id(), hard_smp_processor_id()); - enter_rtas((void *)__pa(rtas_args)); + enter_rtas(__pa(rtas_args)); panic("Alas, I survived.\n"); }