From: Michael Ellerman <mpe@ellerman.id.au>
To: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
Date: Sun, 01 Mar 2020 23:02:44 +1100 [thread overview]
Message-ID: <87mu901dwb.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20200301111717.22236-1-mpe@ellerman.id.au>
Michael Ellerman <mpe@ellerman.id.au> writes:
> From: "Desnes A. Nunes do Rosario" <desnesn@linux.ibm.com>
>
> PowerVM systems running compatibility mode on a few Power8 revisions are
> still vulnerable to the hardware defect that loses PMU exceptions arriving
> prior to a context switch.
>
> The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG
> cpu_feature bit, nevertheless this bit also needs to be set for PowerVM
> compatibility mode systems.
>
> Fixes: 68f2f0d431d9ea4 ("powerpc: Add a cpu feature CPU_FTR_PMAO_BUG")
> Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>
> Reviewed-by: Leonardo Bras <leonardo@linux.ibm.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> Link: https://lore.kernel.org/r/20200227134715.9715-1-desnesn@linux.ibm.com
> ---
> arch/powerpc/kernel/cputable.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
Ignore, PEBKAC.
Don't try to operate git-send-email after 10pm.
cheers
> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
> index e745abc5457a..245be4fafe13 100644
> --- a/arch/powerpc/kernel/cputable.c
> +++ b/arch/powerpc/kernel/cputable.c
> @@ -2193,11 +2193,13 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
> * oprofile_cpu_type already has a value, then we are
> * possibly overriding a real PVR with a logical one,
> * and, in that case, keep the current value for
> - * oprofile_cpu_type.
> + * oprofile_cpu_type. Futhermore, let's ensure that the
> + * fix for the PMAO bug is enabled on compatibility mode.
> */
> if (old.oprofile_cpu_type != NULL) {
> t->oprofile_cpu_type = old.oprofile_cpu_type;
> t->oprofile_type = old.oprofile_type;
> + t->cpu_features |= old.cpu_features & CPU_FTR_PMAO_BUG;
> }
> }
>
> --
> 2.21.1
prev parent reply other threads:[~2020-03-01 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-01 11:17 [PATCH 1/2] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems Michael Ellerman
2020-03-01 12:02 ` 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=87mu901dwb.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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