diff options
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/plpar_wrappers.h | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index a38956269fbf..217ca5c75b20 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -127,9 +127,16 @@ static void pseries_mach_cpu_die(void) | |||
127 | get_lppaca()->donate_dedicated_cpu = 1; | 127 | get_lppaca()->donate_dedicated_cpu = 1; |
128 | 128 | ||
129 | while (get_preferred_offline_state(cpu) == CPU_STATE_INACTIVE) { | 129 | while (get_preferred_offline_state(cpu) == CPU_STATE_INACTIVE) { |
130 | while (!prep_irq_for_idle()) { | ||
131 | local_irq_enable(); | ||
132 | local_irq_disable(); | ||
133 | } | ||
134 | |||
130 | extended_cede_processor(cede_latency_hint); | 135 | extended_cede_processor(cede_latency_hint); |
131 | } | 136 | } |
132 | 137 | ||
138 | local_irq_disable(); | ||
139 | |||
133 | if (!get_lppaca()->shared_proc) | 140 | if (!get_lppaca()->shared_proc) |
134 | get_lppaca()->donate_dedicated_cpu = 0; | 141 | get_lppaca()->donate_dedicated_cpu = 0; |
135 | get_lppaca()->idle = 0; | 142 | get_lppaca()->idle = 0; |
@@ -137,6 +144,7 @@ static void pseries_mach_cpu_die(void) | |||
137 | if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { | 144 | if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { |
138 | unregister_slb_shadow(hwcpu); | 145 | unregister_slb_shadow(hwcpu); |
139 | 146 | ||
147 | hard_irq_disable(); | ||
140 | /* | 148 | /* |
141 | * Call to start_secondary_resume() will not return. | 149 | * Call to start_secondary_resume() will not return. |
142 | * Kernel stack will be reset and start_secondary() | 150 | * Kernel stack will be reset and start_secondary() |
diff --git a/arch/powerpc/platforms/pseries/plpar_wrappers.h b/arch/powerpc/platforms/pseries/plpar_wrappers.h index e6cc34a67053..b93384929c4c 100644 --- a/arch/powerpc/platforms/pseries/plpar_wrappers.h +++ b/arch/powerpc/platforms/pseries/plpar_wrappers.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _PSERIES_PLPAR_WRAPPERS_H | 2 | #define _PSERIES_PLPAR_WRAPPERS_H |
3 | 3 | ||
4 | #include <linux/string.h> | 4 | #include <linux/string.h> |
5 | #include <linux/irqflags.h> | ||
5 | 6 | ||
6 | #include <asm/hvcall.h> | 7 | #include <asm/hvcall.h> |
7 | #include <asm/paca.h> | 8 | #include <asm/paca.h> |
@@ -41,7 +42,14 @@ static inline long extended_cede_processor(unsigned long latency_hint) | |||
41 | u8 old_latency_hint = get_cede_latency_hint(); | 42 | u8 old_latency_hint = get_cede_latency_hint(); |
42 | 43 | ||
43 | set_cede_latency_hint(latency_hint); | 44 | set_cede_latency_hint(latency_hint); |
45 | |||
44 | rc = cede_processor(); | 46 | rc = cede_processor(); |
47 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
48 | /* Ensure that H_CEDE returns with IRQs on */ | ||
49 | if (WARN_ON(!(mfmsr() & MSR_EE))) | ||
50 | __hard_irq_enable(); | ||
51 | #endif | ||
52 | |||
45 | set_cede_latency_hint(old_latency_hint); | 53 | set_cede_latency_hint(old_latency_hint); |
46 | 54 | ||
47 | return rc; | 55 | return rc; |