diff options
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 387ed0d9ad61..76b5d7ebdcc6 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -303,6 +303,12 @@ int rtas_token(const char *service) | |||
303 | } | 303 | } |
304 | EXPORT_SYMBOL(rtas_token); | 304 | EXPORT_SYMBOL(rtas_token); |
305 | 305 | ||
306 | int rtas_service_present(const char *service) | ||
307 | { | ||
308 | return rtas_token(service) != RTAS_UNKNOWN_SERVICE; | ||
309 | } | ||
310 | EXPORT_SYMBOL(rtas_service_present); | ||
311 | |||
306 | #ifdef CONFIG_RTAS_ERROR_LOGGING | 312 | #ifdef CONFIG_RTAS_ERROR_LOGGING |
307 | /* | 313 | /* |
308 | * Return the firmware-specified size of the error log buffer | 314 | * Return the firmware-specified size of the error log buffer |
@@ -810,32 +816,6 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs) | |||
810 | return 0; | 816 | return 0; |
811 | } | 817 | } |
812 | 818 | ||
813 | #ifdef CONFIG_HOTPLUG_CPU | ||
814 | /* This version can't take the spinlock, because it never returns */ | ||
815 | static struct rtas_args rtas_stop_self_args = { | ||
816 | /* The token is initialized for real in setup_system() */ | ||
817 | .token = RTAS_UNKNOWN_SERVICE, | ||
818 | .nargs = 0, | ||
819 | .nret = 1, | ||
820 | .rets = &rtas_stop_self_args.args[0], | ||
821 | }; | ||
822 | |||
823 | void rtas_stop_self(void) | ||
824 | { | ||
825 | struct rtas_args *rtas_args = &rtas_stop_self_args; | ||
826 | |||
827 | local_irq_disable(); | ||
828 | |||
829 | BUG_ON(rtas_args->token == RTAS_UNKNOWN_SERVICE); | ||
830 | |||
831 | printk("cpu %u (hwid %u) Ready to die...\n", | ||
832 | smp_processor_id(), hard_smp_processor_id()); | ||
833 | enter_rtas(__pa(rtas_args)); | ||
834 | |||
835 | panic("Alas, I survived.\n"); | ||
836 | } | ||
837 | #endif | ||
838 | |||
839 | /* | 819 | /* |
840 | * Call early during boot, before mem init or bootmem, to retrieve the RTAS | 820 | * Call early during boot, before mem init or bootmem, to retrieve the RTAS |
841 | * informations from the device-tree and allocate the RMO buffer for userland | 821 | * informations from the device-tree and allocate the RMO buffer for userland |
@@ -880,9 +860,6 @@ void __init rtas_initialize(void) | |||
880 | #endif | 860 | #endif |
881 | rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region); | 861 | rtas_rmo_buf = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE, rtas_region); |
882 | 862 | ||
883 | #ifdef CONFIG_HOTPLUG_CPU | ||
884 | rtas_stop_self_args.token = rtas_token("stop-self"); | ||
885 | #endif /* CONFIG_HOTPLUG_CPU */ | ||
886 | #ifdef CONFIG_RTAS_ERROR_LOGGING | 863 | #ifdef CONFIG_RTAS_ERROR_LOGGING |
887 | rtas_last_error_token = rtas_token("rtas-last-error"); | 864 | rtas_last_error_token = rtas_token("rtas-last-error"); |
888 | #endif | 865 | #endif |