Re: [PATCH 14/14] powerpc/64s: idle runlatch switch is done with MSR[EE]=0
* Nicholas Piggin [2017-06-12 09:58:35]: > 2*mfmsr and 2*mtmsr can be avoided in the idle sleep/wake code > because we know the MSR[EE] is clear. Good optimization for powernv. > Signed-off-by: Nicholas Piggin Acked-by: Vaidyanathan Srinivasan > --- > arch/powerpc/platforms/powernv/idle.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/arch/powerpc/platforms/powernv/idle.c > b/arch/powerpc/platforms/powernv/idle.c > index ee416e016387..84c55a5ef7ea 100644 > --- a/arch/powerpc/platforms/powernv/idle.c > +++ b/arch/powerpc/platforms/powernv/idle.c > @@ -291,9 +291,9 @@ static unsigned long __power7_idle_type(unsigned long > type) > if (!prep_irq_for_idle_irqsoff()) > return 0; > > - ppc64_runlatch_off(); > + __ppc64_runlatch_off(); > srr1 = power7_idle_insn(type); > - ppc64_runlatch_on(); > + __ppc64_runlatch_on(); > > fini_irq_for_idle_irqsoff(); > > @@ -328,9 +328,9 @@ static unsigned long __power9_idle_type(unsigned long > stop_psscr_val, > psscr = mfspr(SPRN_PSSCR); > psscr = (psscr & ~stop_psscr_mask) | stop_psscr_val; > > - ppc64_runlatch_off(); > + __ppc64_runlatch_off(); > srr1 = power9_idle_stop(psscr); > - ppc64_runlatch_on(); > + __ppc64_runlatch_on(); > > fini_irq_for_idle_irqsoff(); > > @@ -365,7 +365,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) > unsigned long srr1; > 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) { > unsigned long psscr; > @@ -392,7 +392,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) > HMT_medium(); > } > > - ppc64_runlatch_on(); > + __ppc64_runlatch_on(); > > return srr1; > } > -- > 2.11.0 >
[PATCH 14/14] powerpc/64s: idle runlatch switch is done with MSR[EE]=0
2*mfmsr and 2*mtmsr can be avoided in the idle sleep/wake code because we know the MSR[EE] is clear. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/idle.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index ee416e016387..84c55a5ef7ea 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -291,9 +291,9 @@ static unsigned long __power7_idle_type(unsigned long type) if (!prep_irq_for_idle_irqsoff()) return 0; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power7_idle_insn(type); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); fini_irq_for_idle_irqsoff(); @@ -328,9 +328,9 @@ static unsigned long __power9_idle_type(unsigned long stop_psscr_val, psscr = mfspr(SPRN_PSSCR); psscr = (psscr & ~stop_psscr_mask) | stop_psscr_val; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power9_idle_stop(psscr); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); fini_irq_for_idle_irqsoff(); @@ -365,7 +365,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) unsigned long srr1; 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) { unsigned long psscr; @@ -392,7 +392,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) HMT_medium(); } - ppc64_runlatch_on(); + __ppc64_runlatch_on(); return srr1; } -- 2.11.0
[PATCH 14/14] powerpc/64s: idle runlatch switch is done with MSR[EE]=0
2*mfmsr and 2*mtmsr can be avoided in the idle sleep/wake code because we know the MSR[EE] is clear. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/powernv/idle.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index 7c83a95f929e..8db49f9c2bd8 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -263,9 +263,9 @@ static unsigned long __power7_idle_type(unsigned long type) if (!prep_irq_for_idle()) return 0; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power7_idle_insn(type); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); return srr1; } @@ -300,9 +300,9 @@ static unsigned long __power9_idle_type(unsigned long stop_psscr_val, psscr = mfspr(SPRN_PSSCR); psscr = (psscr & ~stop_psscr_mask) | stop_psscr_val; - ppc64_runlatch_off(); + __ppc64_runlatch_off(); srr1 = power9_idle_stop(psscr); - ppc64_runlatch_on(); + __ppc64_runlatch_on(); trace_hardirqs_off(); @@ -336,7 +336,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) unsigned long srr1; 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) { unsigned long psscr; @@ -363,7 +363,7 @@ unsigned long pnv_cpu_offline(unsigned int cpu) HMT_medium(); } - ppc64_runlatch_on(); + __ppc64_runlatch_on(); return srr1; } -- 2.11.0