diff options
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
-rw-r--r-- | arch/powerpc/kernel/rtas.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index b5b2add7ad1e..06636c927a7e 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <asm/hvcall.h> | 25 | #include <asm/hvcall.h> |
26 | #include <asm/semaphore.h> | 26 | #include <asm/semaphore.h> |
27 | #include <asm/machdep.h> | 27 | #include <asm/machdep.h> |
28 | #include <asm/firmware.h> | ||
28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
29 | #include <asm/param.h> | 30 | #include <asm/param.h> |
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
@@ -32,6 +33,7 @@ | |||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <asm/lmb.h> | 34 | #include <asm/lmb.h> |
34 | #include <asm/udbg.h> | 35 | #include <asm/udbg.h> |
36 | #include <asm/syscalls.h> | ||
35 | 37 | ||
36 | struct rtas_t rtas = { | 38 | struct rtas_t rtas = { |
37 | .lock = SPIN_LOCK_UNLOCKED | 39 | .lock = SPIN_LOCK_UNLOCKED |
@@ -591,7 +593,7 @@ static void rtas_percpu_suspend_me(void *info) | |||
591 | data->waiting = 0; | 593 | data->waiting = 0; |
592 | data->args->args[data->args->nargs] = | 594 | data->args->args[data->args->nargs] = |
593 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); | 595 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); |
594 | for_each_cpu(i) | 596 | for_each_possible_cpu(i) |
595 | plpar_hcall_norets(H_PROD,i); | 597 | plpar_hcall_norets(H_PROD,i); |
596 | } else { | 598 | } else { |
597 | data->waiting = -EBUSY; | 599 | data->waiting = -EBUSY; |
@@ -624,7 +626,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) | |||
624 | /* Prod each CPU. This won't hurt, and will wake | 626 | /* Prod each CPU. This won't hurt, and will wake |
625 | * anyone we successfully put to sleep with H_Join | 627 | * anyone we successfully put to sleep with H_Join |
626 | */ | 628 | */ |
627 | for_each_cpu(i) | 629 | for_each_possible_cpu(i) |
628 | plpar_hcall_norets(H_PROD, i); | 630 | plpar_hcall_norets(H_PROD, i); |
629 | 631 | ||
630 | return data.waiting; | 632 | return data.waiting; |
@@ -767,7 +769,7 @@ void __init rtas_initialize(void) | |||
767 | * the stop-self token if any | 769 | * the stop-self token if any |
768 | */ | 770 | */ |
769 | #ifdef CONFIG_PPC64 | 771 | #ifdef CONFIG_PPC64 |
770 | if (_machine == PLATFORM_PSERIES_LPAR) { | 772 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) { |
771 | rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX); | 773 | rtas_region = min(lmb.rmo_size, RTAS_INSTANTIATE_MAX); |
772 | ibm_suspend_me_token = rtas_token("ibm,suspend-me"); | 774 | ibm_suspend_me_token = rtas_token("ibm,suspend-me"); |
773 | } | 775 | } |