[PATCH 15/19] cxl: Configure PSL for kernel contexts
Ian Munsie
imunsie at au1.ibm.com
Thu May 21 19:32:01 AEST 2015
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.
Cheers,
-Ian
More information about the Linuxppc-dev
mailing list