From: Michael Neuling <hidden> Date: 2017-05-24 07:03:36
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
Signed-off-by: Michael Neuling <redacted>
---
arch/powerpc/kernel/prom.c | 2 ++
1 file changed, 2 insertions(+)
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
Signed-off-by: Michael Neuling <redacted>
---
arch/powerpc/kernel/prom.c | 2 ++
1 file changed, 2 insertions(+)
@@ -394,7 +394,7 @@ void __init mmu_early_init_devtree(void){/* Disable radix mode based on kernel command line. *//* We don't yet have the machinery to do radix as a guest. */-if(disable_radix||!(mfmsr()&MSR_HV))+if(!IS_ENABLED(CONFIG_PPC_RADIX_MMU)||disable_radix||!(mfmsr()&MSR_HV))cur_cpu_spec->mmu_features&=~MMU_FTR_TYPE_RADIX;/*
From: Michael Neuling <hidden> Date: 2017-05-25 00:13:50
On Wed, 2017-05-24 at 14:26 +0530, Aneesh Kumar K.V wrote:
Michael Neuling [off-list ref] writes:
=20
quoted
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
=20
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
=20
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
=20
Signed-off-by: Michael Neuling <redacted>
---
=C2=A0arch/powerpc/kernel/prom.c | 2 ++
=C2=A01 file changed, 2 insertions(+)
=20
oid)
=C2=A0{
=C2=A0 /* Disable radix mode based on kernel command line. */
=C2=A0 /* We don't yet have the machinery to do radix as a guest. */
- if (disable_radix || !(mfmsr() & MSR_HV))
quoted
+ if (!IS_ENABLED(CONFIG_PPC_RADIX_MMU) || disable_radix || !(mfmsr() &=
MSR_HV))
What tree is this patch against? Linus' tree doesn't look like that.
Mikey
On Wed, 2017-05-24 at 14:26 +0530, Aneesh Kumar K.V wrote:
quoted
Michael Neuling [off-list ref] writes:
=20
quoted
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
=20
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
=20
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
=20
Signed-off-by: Michael Neuling <redacted>
---
=C2=A0arch/powerpc/kernel/prom.c | 2 ++
=C2=A01 file changed, 2 insertions(+)
=20
oid)
=C2=A0{
=C2=A0 /* Disable radix mode based on kernel command line. */
=C2=A0 /* We don't yet have the machinery to do radix as a guest. */
- if (disable_radix || !(mfmsr() & MSR_HV))
quoted
+ if (!IS_ENABLED(CONFIG_PPC_RADIX_MMU) || disable_radix || !(mfmsr() =
& MSR_HV))
What tree is this patch against? Linus' tree doesn't look like that.
mpe/next at the time of this merge window. Do you want me to send a
complete patch against latest mpe/next ?
-aneesh
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2017-05-25 06:16:02
Michael Neuling [off-list ref] writes:
On Wed, 2017-05-24 at 14:26 +0530, Aneesh Kumar K.V wrote:
quoted
Michael Neuling [off-list ref] writes:
=20
quoted
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
=20
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
=20
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
=20
Signed-off-by: Michael Neuling <redacted>
---
=C2=A0arch/powerpc/kernel/prom.c | 2 ++
=C2=A01 file changed, 2 insertions(+)
=20
On Thursday 25 May 2017 11:46 AM, Michael Ellerman wrote:
Michael Neuling [off-list ref] writes:
quoted
On Wed, 2017-05-24 at 14:26 +0530, Aneesh Kumar K.V wrote:
quoted
Michael Neuling [off-list ref] writes:
quoted
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
Signed-off-by: Michael Neuling <redacted>
---
arch/powerpc/kernel/prom.c | 2 ++
1 file changed, 2 insertions(+)
Instead can we do that feature removal in mmu_early_init_devtree. ie,
something like
It looks like mmu_early_init_devtree() gets called after parsing ibm,pa_features
so that should work.
But why is doing it later preferable?
Mikey's patch means it will never be set at any point during boot, which
seems obviously better to me.
My suggestion was w.r.t consolidating different ways of clearing
RADIX_MMU feature flag into one place. Also I was not sure we want to
conditionally parse the pa-feature device tree. Instead we parse it
without any #ifdef in there and clear things which are not supported by
the kernel either via command line or via Kconfig.
-aneesh
From: Michael Neuling <hidden> Date: 2017-05-25 07:12:23
On Thu, 2017-05-25 at 08:23 +0530, Aneesh Kumar K.V wrote:
Michael Neuling [off-list ref] writes:
=20
quoted
On Wed, 2017-05-24 at 14:26 +0530, Aneesh Kumar K.V wrote:
quoted
Michael Neuling [off-list ref] writes:
=20
quoted
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot =
on
quoted
quoted
quoted
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patc=
hing
quoted
quoted
quoted
in much of the asm code (ie. slb_miss_realmode)
=20
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from be=
ing
quoted
quoted
quoted
set from ibm.pa-features.
=20
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
=20
Signed-off-by: Michael Neuling <redacted>
---
=C2=A0arch/powerpc/kernel/prom.c | 2 ++
=C2=A01 file changed, 2 insertions(+)
=20
oid)
=C2=A0{
=C2=A0 /* Disable radix mode based on kernel command line. */
=C2=A0 /* We don't yet have the machinery to do radix as a guest. */
- if (disable_radix || !(mfmsr() & MSR_HV))
quoted
+ if (!IS_ENABLED(CONFIG_PPC_RADIX_MMU) || disable_radix ||
!(mfmsr() & MSR_HV))
=20
What tree is this patch against?=C2=A0=C2=A0Linus' tree doesn't look li=
ke that.
quoted
=20
=20
mpe/next at the time of this merge window. Do you want me to send a
complete patch against latest mpe/next ?
If you can test the broken case to make sure it fixes it... Sure!
Thanks,
Mikey
From: Michael Ellerman <hidden> Date: 2017-05-25 13:22:32
On Wed, 2017-05-24 at 07:03:26 UTC, Michael Neuling wrote:
Currently if you disable CONFIG_PPC_RADIX_MMU you'll crash on boot on
a P9. This is because we still set MMU_FTR_TYPE_RADIX via
ibm,pa-features and MMU_FTR_TYPE_RADIX is what's used for code patching
in much of the asm code (ie. slb_miss_realmode)
This patch fixes the problem by stopping MMU_FTR_TYPE_RADIX from being
set from ibm.pa-features.
We may eventually end up removing the CONFIG_PPC_RADIX_MMU option
completely but until then this fixes the issue.
Signed-off-by: Michael Neuling <redacted>