Message ID | 1460975767.5963.1.camel@ellerman.id.au (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 2016-18-04 at 10:36:07 UTC, Michael Ellerman wrote: > From: Anton Blanchard <anton@samba.org> > > The REAL_LE feature entry in the ibm_pa_feature struct is missing an MMU > feature value, meaning all the remaining elements initialise the wrong > values. ... > > Fix the code by adding the missing initialisation of the MMU feature. > > Also add a comment marking CPU user feature bit 2 (0x4) as reserved. It > would be unsafe to start using it as old kernels incorrectly set it. > > Fixes: 44ae3ab3358e ("powerpc: Free up some CPU feature bits by moving out MMU-related features") > Signed-off-by: Anton Blanchard <anton@samba.org> > Cc: stable@vger.kernel.org > [mpe: Flesh out changelog, add comment reserving 0x4] > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Applied to powerpc fixes. https://git.kernel.org/powerpc/c/6997e57d693b07289694239e52 cheers
diff --git a/arch/powerpc/include/uapi/asm/cputable.h b/arch/powerpc/include/uapi/asm/cputable.h index 8dde19962a5b..f63c96cd3608 100644 --- a/arch/powerpc/include/uapi/asm/cputable.h +++ b/arch/powerpc/include/uapi/asm/cputable.h @@ -31,6 +31,7 @@ #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ 0x00000040 +/* Reserved - do not use 0x00000004 */ #define PPC_FEATURE_TRUE_LE 0x00000002 #define PPC_FEATURE_PPC_LE 0x00000001 diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 7030b035905d..080c96b44a7f 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -158,7 +158,7 @@ static struct ibm_pa_feature { {CPU_FTR_NOEXECUTE, 0, 0, 0, 6, 0}, {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, {0, MMU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, - {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, + {CPU_FTR_REAL_LE, 0, PPC_FEATURE_TRUE_LE, 5, 0, 0}, /* * If the kernel doesn't support TM (ie. CONFIG_PPC_TRANSACTIONAL_MEM=n), * we don't want to turn on CPU_FTR_TM here, so we use CPU_FTR_TM_COMP