[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230215231540.vmskpw33l2ctyp4c@pali>
Date: Thu, 16 Feb 2023 00:15:40 +0100
From: Pali Rohár <pali@...nel.org>
To: Scott Wood <oss@...error.net>,
Christophe Leroy <christophe.leroy@...roup.eu>
Cc: Michael Ellerman <mpe@...erman.id.au>,
Nicholas Piggin <npiggin@...il.com>, jbglaw@...-owl.de,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 5/5] powerpc/epapr: Don't use wrteei on non booke
On Tuesday 20 December 2022 21:21:11 Pali Rohár wrote:
> On Monday 19 December 2022 19:46:00 Christophe Leroy wrote:
> > wrteei is only for booke. Use the standard mfmsr/ori/mtmsr
> > when non booke.
> >
> > Reported-by: Jan-Benedict Glaw <jbglaw@...-owl.de>
> > Signed-off-by: Christophe Leroy <christophe.leroy@...roup.eu>
> > ---
> > Not sure this is needed at all, the commit that introduced the code says it is for e500, but there's no such limitation in Kconfig. Maybe we should limit all the file to CONFIG_PPC_E500
>
> This ePAPR code is according to ePAPR v1.1. So it does not have to be
> e500 specific. But is there anything else in this category?
Scott Wood: Do you know any details about it?
> > ---
> > arch/powerpc/kernel/epapr_hcalls.S | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/arch/powerpc/kernel/epapr_hcalls.S b/arch/powerpc/kernel/epapr_hcalls.S
> > index 69a912550577..033116e465d0 100644
> > --- a/arch/powerpc/kernel/epapr_hcalls.S
> > +++ b/arch/powerpc/kernel/epapr_hcalls.S
> > @@ -21,7 +21,13 @@ _GLOBAL(epapr_ev_idle)
> > ori r4, r4,_TLF_NAPPING /* so when we take an exception */
> > PPC_STL r4, TI_LOCAL_FLAGS(r2) /* it will return to our caller */
> >
> > +#ifdef CONFIG_BOOKE_OR_40x
> > wrteei 1
> > +#else
> > + mfmsr r4
> > + ori r4, r4, MSR_EE
> > + mtmsr r4
> > +#endif
> >
> > idle_loop:
> > LOAD_REG_IMMEDIATE(r11, EV_HCALL_TOKEN(EV_IDLE))
> > --
> > 2.38.1
> >
Powered by blists - more mailing lists