Re: [PATCH 3/3] powernv:idle: Set LPCR_UPRT on wakeup from deep-stop
From: Michael Neuling
Date: Thu Apr 13 2017 - 02:27:46 EST
On Thu, 2017-04-13 at 14:12 +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2017-04-13 at 09:28 +0530, Aneesh Kumar K.V wrote:
> > > Â #endif
> > > ÂÂÂÂÂÂÂmtctrÂÂÂr12
> > > ÂÂÂÂÂÂÂbctrl
> > > +/*
> > > + * cur_cpu_spec->cpu_restore would restore LPCR to a
> > > + * sane value that is set at early boot time,
> > > + * thereby clearing LPCR_UPRT.
> > > + * LPCR_UPRT is required if we are running in Radix mode.
> > > + * Set it here if that be the case.
> > > + */
> > > +BEGIN_MMU_FTR_SECTION
> > > +ÂÂÂÂÂmfsprÂÂÂr3, SPRN_LPCR
> > > +ÂÂÂÂÂLOAD_REG_IMMEDIATE(r4, LPCR_UPRT)
> > > +ÂÂÂÂÂorÂÂÂÂÂÂr3, r3, r4
> > > +ÂÂÂÂÂmtsprÂÂÂSPRN_LPCR, r3
> > > +END_MMU_FTR_SECTION_IFSET(MMU_FTR_TYPE_RADIX)
>
> We are probably better off saving the value somewhere during boot
> and just "blasting" it whole back.
We seem to touch LPCR in a bunch of places these days. Not sure when "sometimes
during boot" should actually be.
Mikey