[PATCH 15/19] cxl: Configure PSL for kernel contexts

Michael Neuling mikey at neuling.org
Fri May 22 15:28:12 AEST 2015


On Thu, 2015-05-21 at 19:32 +1000, Ian Munsie wrote:
> Excerpts from Michael Neuling's message of 2015-05-19 21:22:32 +1000:
> > +    if (ctx->kernel) {
> > +        sr |= CXL_PSL_SR_An_R | (mfmsr() & MSR_SF) | CXL_PSL_SR_An_HV;
> > +        pid = 0;
> > +    } else {
> > +        sr |= CXL_PSL_SR_An_PR | CXL_PSL_SR_An_R;
> 
> CXL_PSL_SR_An_R is common between these two cases - you could probably
> move it to the initial sr = ... line instead of here.
> 
> > +        set_endian(sr);
> 
> We should call set_endian(sr) for kernel contexts as well.
> 
> > +    if (ctx->kernel) {
> > +        sr |= CXL_PSL_SR_An_R | (mfmsr() & MSR_SF) | CXL_PSL_SR_An_HV;
> > +        pid = 0;
> > +    } else { /* User space */
> > +        sr |= CXL_PSL_SR_An_PR | CXL_PSL_SR_An_R;
> 
> CXL_PSL_SR_An_R is common here as well.

Yeah, I meant to merge these.  Will do.

Mikey



More information about the Linuxppc-dev mailing list