diff options
Diffstat (limited to 'arch/powerpc/kernel/rtas.c')
| -rw-r--r-- | arch/powerpc/kernel/rtas.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 41048de3c6c3..271ff6318eda 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
| @@ -41,6 +41,8 @@ | |||
| 41 | #include <asm/atomic.h> | 41 | #include <asm/atomic.h> |
| 42 | #include <asm/time.h> | 42 | #include <asm/time.h> |
| 43 | #include <asm/mmu.h> | 43 | #include <asm/mmu.h> |
| 44 | #include <asm/topology.h> | ||
| 45 | #include <asm/pSeries_reconfig.h> | ||
| 44 | 46 | ||
| 45 | struct rtas_t rtas = { | 47 | struct rtas_t rtas = { |
| 46 | .lock = __ARCH_SPIN_LOCK_UNLOCKED | 48 | .lock = __ARCH_SPIN_LOCK_UNLOCKED |
| @@ -493,7 +495,7 @@ unsigned int rtas_busy_delay(int status) | |||
| 493 | 495 | ||
| 494 | might_sleep(); | 496 | might_sleep(); |
| 495 | ms = rtas_busy_delay_time(status); | 497 | ms = rtas_busy_delay_time(status); |
| 496 | if (ms) | 498 | if (ms && need_resched()) |
| 497 | msleep(ms); | 499 | msleep(ms); |
| 498 | 500 | ||
| 499 | return ms; | 501 | return ms; |
| @@ -713,6 +715,7 @@ static int __rtas_suspend_last_cpu(struct rtas_suspend_me_data *data, int wake_w | |||
| 713 | int cpu; | 715 | int cpu; |
| 714 | 716 | ||
| 715 | slb_set_size(SLB_MIN_SIZE); | 717 | slb_set_size(SLB_MIN_SIZE); |
| 718 | stop_topology_update(); | ||
| 716 | printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", smp_processor_id()); | 719 | printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", smp_processor_id()); |
| 717 | 720 | ||
| 718 | while (rc == H_MULTI_THREADS_ACTIVE && !atomic_read(&data->done) && | 721 | while (rc == H_MULTI_THREADS_ACTIVE && !atomic_read(&data->done) && |
| @@ -728,6 +731,8 @@ static int __rtas_suspend_last_cpu(struct rtas_suspend_me_data *data, int wake_w | |||
| 728 | rc = atomic_read(&data->error); | 731 | rc = atomic_read(&data->error); |
| 729 | 732 | ||
| 730 | atomic_set(&data->error, rc); | 733 | atomic_set(&data->error, rc); |
| 734 | start_topology_update(); | ||
| 735 | pSeries_coalesce_init(); | ||
| 731 | 736 | ||
| 732 | if (wake_when_done) { | 737 | if (wake_when_done) { |
| 733 | atomic_set(&data->done, 1); | 738 | atomic_set(&data->done, 1); |
| @@ -805,7 +810,7 @@ static void rtas_percpu_suspend_me(void *info) | |||
| 805 | __rtas_suspend_cpu((struct rtas_suspend_me_data *)info, 1); | 810 | __rtas_suspend_cpu((struct rtas_suspend_me_data *)info, 1); |
| 806 | } | 811 | } |
| 807 | 812 | ||
| 808 | static int rtas_ibm_suspend_me(struct rtas_args *args) | 813 | int rtas_ibm_suspend_me(struct rtas_args *args) |
| 809 | { | 814 | { |
| 810 | long state; | 815 | long state; |
| 811 | long rc; | 816 | long rc; |
| @@ -855,7 +860,7 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) | |||
| 855 | return atomic_read(&data.error); | 860 | return atomic_read(&data.error); |
| 856 | } | 861 | } |
| 857 | #else /* CONFIG_PPC_PSERIES */ | 862 | #else /* CONFIG_PPC_PSERIES */ |
| 858 | static int rtas_ibm_suspend_me(struct rtas_args *args) | 863 | int rtas_ibm_suspend_me(struct rtas_args *args) |
| 859 | { | 864 | { |
| 860 | return -ENOSYS; | 865 | return -ENOSYS; |
| 861 | } | 866 | } |
| @@ -969,7 +974,7 @@ void __init rtas_initialize(void) | |||
| 969 | */ | 974 | */ |
| 970 | #ifdef CONFIG_PPC64 | 975 | #ifdef CONFIG_PPC64 |
| 971 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) { | 976 | if (machine_is(pseries) && firmware_has_feature(FW_FEATURE_LPAR)) { |
| 972 | rtas_region = min(memblock.rmo_size, RTAS_INSTANTIATE_MAX); | 977 | rtas_region = min(ppc64_rma_size, RTAS_INSTANTIATE_MAX); |
| 973 | ibm_suspend_me_token = rtas_token("ibm,suspend-me"); | 978 | ibm_suspend_me_token = rtas_token("ibm,suspend-me"); |
| 974 | } | 979 | } |
| 975 | #endif | 980 | #endif |
