diff options
author | Anton Blanchard <anton@samba.org> | 2013-08-06 12:01:26 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-13 21:50:26 -0400 |
commit | f13c13a005127b5dc5daaca190277a062d946e63 (patch) | |
tree | 0e1085a2eb655f8992590cbce39de0c0f87a5a64 /arch/powerpc/platforms | |
parent | 0c69f9c52c474ccd1cade27c7be5f8ab830cdc3a (diff) |
powerpc: Stop using non-architected shared_proc field in lppaca
Although the shared_proc field in the lppaca works today, it is
not architected. A shared processor partition will always have a non
zero yield_count so use that instead. Create a wrapper so users
don't have to know about the details.
In order for older kernels to continue to work on KVM we need
to set the shared_proc bit. While here, remove the ugly bitfield.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/processor_idle.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 217ca5c75b20..1e490cf63a0d 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -123,7 +123,7 @@ static void pseries_mach_cpu_die(void) | |||
123 | cede_latency_hint = 2; | 123 | cede_latency_hint = 2; |
124 | 124 | ||
125 | get_lppaca()->idle = 1; | 125 | get_lppaca()->idle = 1; |
126 | if (!get_lppaca()->shared_proc) | 126 | if (!lppaca_shared_proc(get_lppaca())) |
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) { |
@@ -137,7 +137,7 @@ static void pseries_mach_cpu_die(void) | |||
137 | 137 | ||
138 | local_irq_disable(); | 138 | local_irq_disable(); |
139 | 139 | ||
140 | if (!get_lppaca()->shared_proc) | 140 | if (!lppaca_shared_proc(get_lppaca())) |
141 | get_lppaca()->donate_dedicated_cpu = 0; | 141 | get_lppaca()->donate_dedicated_cpu = 0; |
142 | get_lppaca()->idle = 0; | 142 | get_lppaca()->idle = 0; |
143 | 143 | ||
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 4644efa06941..92db881be27e 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c | |||
@@ -308,7 +308,7 @@ static int pseries_idle_probe(void) | |||
308 | return -EPERM; | 308 | return -EPERM; |
309 | } | 309 | } |
310 | 310 | ||
311 | if (get_lppaca()->shared_proc) | 311 | if (lppaca_shared_proc(get_lppaca())) |
312 | cpuidle_state_table = shared_states; | 312 | cpuidle_state_table = shared_states; |
313 | else | 313 | else |
314 | cpuidle_state_table = dedicated_states; | 314 | cpuidle_state_table = dedicated_states; |