From: Michael Ellerman <mpe@ellerman•id.au>
To: Michael Neuling <mikey@neuling•org>,
"Aneesh Kumar K.V" <aneesh.kumar@linux•vnet.ibm.com>,
linuxppc-dev@lists•ozlabs.org, anton@samba•org,
Greg Johnson <gwj@google•com>
Subject: Re: [PATCH] powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N
Date: Thu, 25 May 2017 16:16:01 +1000 [thread overview]
Message-ID: <87d1axa2ce.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <1495671229.18002.1.camel@neuling.org>
Michael Neuling <mikey@neuling•org> writes:
> On Wed, 2017-05-24 at 14:26 +0530, Aneesh Kumar K.V wrote:
>> Michael Neuling <mikey@neuling•org> writes:
>>=20
>> > 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 <mikey@neuling•org>
>> > ---
>> > =C2=A0arch/powerpc/kernel/prom.c | 2 ++
>> > =C2=A01 file changed, 2 insertions(+)
>> >=20
>> > diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
>> > index 40c4887c27..f830562974 100644
>> > --- a/arch/powerpc/kernel/prom.c
>> > +++ b/arch/powerpc/kernel/prom.c
>> > @@ -161,7 +161,9 @@ static struct ibm_pa_feature {
>> > =C2=A0 { .pabyte =3D 0,=C2=A0=C2=A0.pabit =3D 3, .cpu_features=C2=A0=
=C2=A0=3D CPU_FTR_CTRL },
>> > =C2=A0 { .pabyte =3D 0,=C2=A0=C2=A0.pabit =3D 6, .cpu_features=C2=A0=
=C2=A0=3D CPU_FTR_NOEXECUTE },
>> > =C2=A0 { .pabyte =3D 1,=C2=A0=C2=A0.pabit =3D 2, .mmu_features=C2=A0=
=C2=A0=3D MMU_FTR_CI_LARGE_PAGE
>> > },
>> > +#ifdef CONFIG_PPC_RADIX_MMU
>> > =C2=A0 { .pabyte =3D 40, .pabit =3D 0, .mmu_features=C2=A0=C2=A0=3D MM=
U_FTR_TYPE_RADIX },
>> > +#endif
>> > =C2=A0 { .pabyte =3D 1,=C2=A0=C2=A0.pabit =3D 1, .invert =3D 1, .cpu_f=
eatures =3D
>> > CPU_FTR_NODSISRALIGN },
>> > =C2=A0 { .pabyte =3D 5,=C2=A0=C2=A0.pabit =3D 0, .cpu_features=C2=A0=
=C2=A0=3D CPU_FTR_REAL_LE,
>> > =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0.cpu_user_ftrs =3D PPC_FEATURE_TRUE_=
LE },
>> > --=C2=A0
>> > 2.11.0
>>=20
>> 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_f=
eatures
> 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.
cheers
next prev parent reply other threads:[~2017-05-25 6:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 7:03 [PATCH] powerpc: Fix booting P9 hash with CONFIG_PPC_RADIX_MMU=N Michael Neuling
2017-05-24 8:56 ` Aneesh Kumar K.V
2017-05-25 0:13 ` Michael Neuling
2017-05-25 2:53 ` Aneesh Kumar K.V
2017-05-25 7:12 ` Michael Neuling
2017-05-25 6:16 ` Michael Ellerman [this message]
2017-05-25 6:22 ` Aneesh Kumar K.V
2017-05-25 13:22 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1axa2ce.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=anton@samba$(echo .)org \
--cc=gwj@google$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=mikey@neuling$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox