diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2005-08-03 00:40:16 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-08-28 20:53:35 -0400 |
commit | 8d15a3e55f49678b0900dcf5c1cddb322a129325 (patch) | |
tree | c86205bde42833c25bf2f3b51f8b67f9d4e52a22 /arch/ppc64/kernel/process.c | |
parent | 1ababe11480d59d75be806804c71fa55d203a5a6 (diff) |
[PATCH] ppc64: make firmware_has_feature() stronger
Make firmware_has_feature() evaluate at compile time for the non pSeries
case and tidy up code where possible.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/process.c')
-rw-r--r-- | arch/ppc64/kernel/process.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c index 9bad983333b1..7a7e027653ad 100644 --- a/arch/ppc64/kernel/process.c +++ b/arch/ppc64/kernel/process.c | |||
@@ -203,10 +203,9 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
203 | new_thread = &new->thread; | 203 | new_thread = &new->thread; |
204 | old_thread = ¤t->thread; | 204 | old_thread = ¤t->thread; |
205 | 205 | ||
206 | /* Collect purr utilization data per process and per processor wise */ | 206 | /* Collect purr utilization data per process and per processor |
207 | /* purr is nothing but processor time base */ | 207 | * wise purr is nothing but processor time base |
208 | 208 | */ | |
209 | #if defined(CONFIG_PPC_PSERIES) | ||
210 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 209 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
211 | struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); | 210 | struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array); |
212 | long unsigned start_tb, current_tb; | 211 | long unsigned start_tb, current_tb; |
@@ -215,8 +214,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
215 | old_thread->accum_tb += (current_tb - start_tb); | 214 | old_thread->accum_tb += (current_tb - start_tb); |
216 | new_thread->start_tb = current_tb; | 215 | new_thread->start_tb = current_tb; |
217 | } | 216 | } |
218 | #endif | ||
219 | |||
220 | 217 | ||
221 | local_irq_save(flags); | 218 | local_irq_save(flags); |
222 | last = _switch(old_thread, new_thread); | 219 | last = _switch(old_thread, new_thread); |