[RFC PATCH 1/2]powerpc: foundation code to handle CR5 for local_t

David Laight David.Laight at ACULAB.COM
Fri Nov 28 21:53:12 AEDT 2014


From: Benjamin Herrenschmidt
> On Fri, 2014-11-28 at 08:45 +0530, Madhavan Srinivasan wrote:
> > > Can't we just unconditionally clear at as long as we do that after we've
> > > saved it ? In that case, it's just a matter for the fixup code to check
> > > the saved version rather than the actual CR..
> > >
> > I use CR bit setting in the interrupt return path to enter the fixup
> > section search. If we unconditionally clear it, we will have to enter
> > the fixup section for every kernel return nip right?
> 
> As I said above. Can't we look at the saved version ?
> 
> IE.
> 
>  - On interrupt entry:
> 
> 	* Save CR to CCR(r1)
> 	* clear CR5
> 
>  - On exit
> 
> 	* Check CCR(r1)'s CR5 field
> 	* restore CR

Actually there is no real reason why the 'fixup' can't be done
during interrupt entry.

	David



More information about the Linuxppc-dev mailing list