Commit 40d24343 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/64s/idle: Run latch switch is done with MSR[EE]=0

In the idle sleep/wake code we know that MSR[EE] is clear, so we can
avoid 2 x mfmsr and 2 x mtmsr by calling the double-underscore
versions of the run latch routines which assume interrupts are already
disabled.
Acked-by: default avatarVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 95acdc07
...@@ -291,9 +291,9 @@ static unsigned long __power7_idle_type(unsigned long type) ...@@ -291,9 +291,9 @@ static unsigned long __power7_idle_type(unsigned long type)
if (!prep_irq_for_idle_irqsoff()) if (!prep_irq_for_idle_irqsoff())
return 0; return 0;
ppc64_runlatch_off(); __ppc64_runlatch_off();
srr1 = power7_idle_insn(type); srr1 = power7_idle_insn(type);
ppc64_runlatch_on(); __ppc64_runlatch_on();
fini_irq_for_idle_irqsoff(); fini_irq_for_idle_irqsoff();
...@@ -328,9 +328,9 @@ static unsigned long __power9_idle_type(unsigned long stop_psscr_val, ...@@ -328,9 +328,9 @@ static unsigned long __power9_idle_type(unsigned long stop_psscr_val,
psscr = mfspr(SPRN_PSSCR); psscr = mfspr(SPRN_PSSCR);
psscr = (psscr & ~stop_psscr_mask) | stop_psscr_val; psscr = (psscr & ~stop_psscr_mask) | stop_psscr_val;
ppc64_runlatch_off(); __ppc64_runlatch_off();
srr1 = power9_idle_stop(psscr); srr1 = power9_idle_stop(psscr);
ppc64_runlatch_on(); __ppc64_runlatch_on();
fini_irq_for_idle_irqsoff(); fini_irq_for_idle_irqsoff();
...@@ -365,7 +365,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) ...@@ -365,7 +365,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu)
unsigned long srr1; unsigned long srr1;
u32 idle_states = pnv_get_supported_cpuidle_states(); u32 idle_states = pnv_get_supported_cpuidle_states();
ppc64_runlatch_off(); __ppc64_runlatch_off();
if (cpu_has_feature(CPU_FTR_ARCH_300) && deepest_stop_found) { if (cpu_has_feature(CPU_FTR_ARCH_300) && deepest_stop_found) {
unsigned long psscr; unsigned long psscr;
...@@ -392,7 +392,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) ...@@ -392,7 +392,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu)
HMT_medium(); HMT_medium();
} }
ppc64_runlatch_on(); __ppc64_runlatch_on();
return srr1; return srr1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment