From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Michael Ellerman <mpe@ellerman•id.au>, linuxppc-dev@ozlabs•org
Cc: abdhalee@linux•vnet.ibm.com
Subject: Re: powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores()
Date: Tue, 18 Jul 2017 20:26:12 +1000 (AEST) [thread overview]
Message-ID: <3xBbsw2373z9t2J@ozlabs.org> (raw)
In-Reply-To: <1500291060-8133-1-git-send-email-mpe@ellerman.id.au>
On Mon, 2017-07-17 at 11:31:00 UTC, Michael Ellerman wrote:
> In commit 1c0eaf0f56d6 ("powerpc/powernv: Tell OPAL about our MMU mode
> on POWER9"), we added additional flags to the OPAL call to configure
> CPUs at boot.
>
> These flags only work on Power9 firmwares, and worse can cause boot
> failures on Power8 machines, so we check for CPU_FTR_ARCH_300 (aka POWER9)
> before adding the extra flags.
>
> Unfortunately we forgot that opal_configure_cores() is called before
> the CPU feature checks are dynamically patched, meaning the check
> always returns true.
>
> We definitely need to do something to make the CPU feature checks less
> prone to bugs like this, but for now the minimal fix is to use
> early_cpu_has_feature().
>
> Reported-and-tested-by: Abdul Haleem <abdhalee@linux•vnet.ibm.com>
> Fixes: 1c0eaf0f56d6 ("powerpc/powernv: Tell OPAL about our MMU mode on POWER9")
> Signed-off-by: Michael Ellerman <mpe@ellerman•id.au>
> Acked-by: Balbir Singh <bsingharora@gmail•com>
Applied to powerpc fixes.
https://git.kernel.org/powerpc/c/a70b487b07cf4201bc6702e7f646fa
cheers
prev parent reply other threads:[~2017-07-18 10:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 11:31 [PATCH] powerpc/powernv: Fix boot on Power8 bare metal due to opal_configure_cores() Michael Ellerman
2017-07-17 11:52 ` Balbir Singh
2017-07-18 10:44 ` Michael Ellerman
2017-07-18 10:26 ` Michael Ellerman [this message]
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=3xBbsw2373z9t2J@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=abdhalee@linux$(echo .)vnet.ibm.com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=mpe@ellerman$(echo .)id.au \
/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