diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/hotplug-cpu.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index d1b124e44d77..a8e1d5d17a28 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -122,44 +122,32 @@ static void pseries_mach_cpu_die(void) | |||
122 | if (!get_lppaca()->shared_proc) | 122 | if (!get_lppaca()->shared_proc) |
123 | get_lppaca()->donate_dedicated_cpu = 1; | 123 | get_lppaca()->donate_dedicated_cpu = 1; |
124 | 124 | ||
125 | printk(KERN_INFO | ||
126 | "cpu %u (hwid %u) ceding for offline with hint %d\n", | ||
127 | cpu, hwcpu, cede_latency_hint); | ||
128 | while (get_preferred_offline_state(cpu) == CPU_STATE_INACTIVE) { | 125 | while (get_preferred_offline_state(cpu) == CPU_STATE_INACTIVE) { |
129 | extended_cede_processor(cede_latency_hint); | 126 | extended_cede_processor(cede_latency_hint); |
130 | printk(KERN_INFO "cpu %u (hwid %u) returned from cede.\n", | ||
131 | cpu, hwcpu); | ||
132 | printk(KERN_INFO | ||
133 | "Decrementer value = %x Timebase value = %llx\n", | ||
134 | get_dec(), get_tb()); | ||
135 | } | 127 | } |
136 | 128 | ||
137 | printk(KERN_INFO "cpu %u (hwid %u) got prodded to go online\n", | ||
138 | cpu, hwcpu); | ||
139 | |||
140 | if (!get_lppaca()->shared_proc) | 129 | if (!get_lppaca()->shared_proc) |
141 | get_lppaca()->donate_dedicated_cpu = 0; | 130 | get_lppaca()->donate_dedicated_cpu = 0; |
142 | get_lppaca()->idle = 0; | 131 | get_lppaca()->idle = 0; |
143 | } | ||
144 | 132 | ||
145 | if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { | 133 | if (get_preferred_offline_state(cpu) == CPU_STATE_ONLINE) { |
146 | unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); | 134 | unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); |
147 | 135 | ||
148 | /* | 136 | /* |
149 | * NOTE: Calling start_secondary() here for now to | 137 | * Call to start_secondary_resume() will not return. |
150 | * start new context. | 138 | * Kernel stack will be reset and start_secondary() |
151 | * However, need to do it cleanly by resetting the | 139 | * will be called to continue the online operation. |
152 | * stack pointer. | 140 | */ |
153 | */ | 141 | start_secondary_resume(); |
154 | start_secondary(); | 142 | } |
143 | } | ||
155 | 144 | ||
156 | } else if (get_preferred_offline_state(cpu) == CPU_STATE_OFFLINE) { | 145 | /* Requested state is CPU_STATE_OFFLINE at this point */ |
146 | WARN_ON(get_preferred_offline_state(cpu) != CPU_STATE_OFFLINE); | ||
157 | 147 | ||
158 | set_cpu_current_state(cpu, CPU_STATE_OFFLINE); | 148 | set_cpu_current_state(cpu, CPU_STATE_OFFLINE); |
159 | unregister_slb_shadow(hard_smp_processor_id(), | 149 | unregister_slb_shadow(hwcpu, __pa(get_slb_shadow())); |
160 | __pa(get_slb_shadow())); | 150 | rtas_stop_self(); |
161 | rtas_stop_self(); | ||
162 | } | ||
163 | 151 | ||
164 | /* Should never get here... */ | 152 | /* Should never get here... */ |
165 | BUG(); | 153 | BUG(); |