diff options
Diffstat (limited to 'arch/powerpc/platforms/pseries/setup.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/setup.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index 68b7f086d63..da6cebaf72c 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -190,7 +190,7 @@ static void pseries_lpar_enable_pmcs(void) | |||
190 | 190 | ||
191 | /* instruct hypervisor to maintain PMCs */ | 191 | /* instruct hypervisor to maintain PMCs */ |
192 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) | 192 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) |
193 | get_paca()->lppaca.pmcregs_in_use = 1; | 193 | get_lppaca()->pmcregs_in_use = 1; |
194 | } | 194 | } |
195 | 195 | ||
196 | static void __init pSeries_setup_arch(void) | 196 | static void __init pSeries_setup_arch(void) |
@@ -234,7 +234,7 @@ static void __init pSeries_setup_arch(void) | |||
234 | /* Choose an idle loop */ | 234 | /* Choose an idle loop */ |
235 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { | 235 | if (firmware_has_feature(FW_FEATURE_SPLPAR)) { |
236 | vpa_init(boot_cpuid); | 236 | vpa_init(boot_cpuid); |
237 | if (get_paca()->lppaca.shared_proc) { | 237 | if (get_lppaca()->shared_proc) { |
238 | printk(KERN_INFO "Using shared processor idle loop\n"); | 238 | printk(KERN_INFO "Using shared processor idle loop\n"); |
239 | ppc_md.idle_loop = pseries_shared_idle; | 239 | ppc_md.idle_loop = pseries_shared_idle; |
240 | } else { | 240 | } else { |
@@ -444,10 +444,10 @@ DECLARE_PER_CPU(unsigned long, smt_snooze_delay); | |||
444 | 444 | ||
445 | static inline void dedicated_idle_sleep(unsigned int cpu) | 445 | static inline void dedicated_idle_sleep(unsigned int cpu) |
446 | { | 446 | { |
447 | struct paca_struct *ppaca = &paca[cpu ^ 1]; | 447 | struct lppaca *plppaca = &lppaca[cpu ^ 1]; |
448 | 448 | ||
449 | /* Only sleep if the other thread is not idle */ | 449 | /* Only sleep if the other thread is not idle */ |
450 | if (!(ppaca->lppaca.idle)) { | 450 | if (!(plppaca->idle)) { |
451 | local_irq_disable(); | 451 | local_irq_disable(); |
452 | 452 | ||
453 | /* | 453 | /* |
@@ -480,7 +480,6 @@ static inline void dedicated_idle_sleep(unsigned int cpu) | |||
480 | 480 | ||
481 | static void pseries_dedicated_idle(void) | 481 | static void pseries_dedicated_idle(void) |
482 | { | 482 | { |
483 | struct paca_struct *lpaca = get_paca(); | ||
484 | unsigned int cpu = smp_processor_id(); | 483 | unsigned int cpu = smp_processor_id(); |
485 | unsigned long start_snooze; | 484 | unsigned long start_snooze; |
486 | unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay); | 485 | unsigned long *smt_snooze_delay = &__get_cpu_var(smt_snooze_delay); |
@@ -491,7 +490,7 @@ static void pseries_dedicated_idle(void) | |||
491 | * Indicate to the HV that we are idle. Now would be | 490 | * Indicate to the HV that we are idle. Now would be |
492 | * a good time to find other work to dispatch. | 491 | * a good time to find other work to dispatch. |
493 | */ | 492 | */ |
494 | lpaca->lppaca.idle = 1; | 493 | get_lppaca()->idle = 1; |
495 | 494 | ||
496 | if (!need_resched()) { | 495 | if (!need_resched()) { |
497 | start_snooze = get_tb() + | 496 | start_snooze = get_tb() + |
@@ -518,7 +517,7 @@ static void pseries_dedicated_idle(void) | |||
518 | HMT_medium(); | 517 | HMT_medium(); |
519 | } | 518 | } |
520 | 519 | ||
521 | lpaca->lppaca.idle = 0; | 520 | get_lppaca()->idle = 0; |
522 | ppc64_runlatch_on(); | 521 | ppc64_runlatch_on(); |
523 | 522 | ||
524 | preempt_enable_no_resched(); | 523 | preempt_enable_no_resched(); |
@@ -532,7 +531,6 @@ static void pseries_dedicated_idle(void) | |||
532 | 531 | ||
533 | static void pseries_shared_idle(void) | 532 | static void pseries_shared_idle(void) |
534 | { | 533 | { |
535 | struct paca_struct *lpaca = get_paca(); | ||
536 | unsigned int cpu = smp_processor_id(); | 534 | unsigned int cpu = smp_processor_id(); |
537 | 535 | ||
538 | while (1) { | 536 | while (1) { |
@@ -540,7 +538,7 @@ static void pseries_shared_idle(void) | |||
540 | * Indicate to the HV that we are idle. Now would be | 538 | * Indicate to the HV that we are idle. Now would be |
541 | * a good time to find other work to dispatch. | 539 | * a good time to find other work to dispatch. |
542 | */ | 540 | */ |
543 | lpaca->lppaca.idle = 1; | 541 | get_lppaca()->idle = 1; |
544 | 542 | ||
545 | while (!need_resched() && !cpu_is_offline(cpu)) { | 543 | while (!need_resched() && !cpu_is_offline(cpu)) { |
546 | local_irq_disable(); | 544 | local_irq_disable(); |
@@ -564,7 +562,7 @@ static void pseries_shared_idle(void) | |||
564 | HMT_medium(); | 562 | HMT_medium(); |
565 | } | 563 | } |
566 | 564 | ||
567 | lpaca->lppaca.idle = 0; | 565 | get_lppaca()->idle = 0; |
568 | ppc64_runlatch_on(); | 566 | ppc64_runlatch_on(); |
569 | 567 | ||
570 | preempt_enable_no_resched(); | 568 | preempt_enable_no_resched(); |
@@ -588,7 +586,7 @@ static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | |||
588 | { | 586 | { |
589 | /* Don't risk a hypervisor call if we're crashing */ | 587 | /* Don't risk a hypervisor call if we're crashing */ |
590 | if (!crash_shutdown) { | 588 | if (!crash_shutdown) { |
591 | unsigned long vpa = __pa(&get_paca()->lppaca); | 589 | unsigned long vpa = __pa(get_lppaca()); |
592 | 590 | ||
593 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { | 591 | if (unregister_vpa(hard_smp_processor_id(), vpa)) { |
594 | printk("VPA deregistration of cpu %u (hw_cpu_id %d) " | 592 | printk("VPA deregistration of cpu %u (hw_cpu_id %d) " |