linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Desnes Augusto Nunes do Rosario <desnesn@linux.ibm.com>
To: Leonardo Bras <leonardo@linux.ibm.com>, linuxppc-dev@lists.ozlabs.org
Cc: gromero@linux.ibm.com
Subject: Re: [PATCH] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems
Date: Thu, 27 Feb 2020 10:29:13 -0300	[thread overview]
Message-ID: <545b8f72-97f2-82e0-571f-a3248b4a9176@linux.ibm.com> (raw)
In-Reply-To: <9ba1d74b53b573d62becba084bb796d3e983f9b4.camel@linux.ibm.com>

Hello Leonardo,

On 2/15/20 2:39 AM, Leonardo Bras wrote:
> Hello Desnes, thanks for the patch.
>
> "Desnes A. Nunes do Rosario" <desnesn@linux.ibm.com> writes:
>
>> 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>
>> ---
>>   arch/powerpc/kernel/cputable.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
>> index e745abc5457a..5bfef6263dfb 100644
>> --- a/arch/powerpc/kernel/cputable.c
>> +++ b/arch/powerpc/kernel/cputable.c
>> @@ -2198,6 +2198,8 @@ static struct cpu_spec * __init setup_cpu_spec(unsigned long offset,
>>   		if (old.oprofile_cpu_type != NULL) {
>>   			t->oprofile_cpu_type = old.oprofile_cpu_type;
>>   			t->oprofile_type = old.oprofile_type;
>> +			if (old.cpu_features & CPU_FTR_PMAO_BUG)
>> +				t->cpu_features |= CPU_FTR_PMAO_BUG;
> What are your thoughts about doing:
> 	t->cpu_features |=  old.cpu_features & CPU_FTR_PMAO_BUG;
Looks good to me.
> Also, I would recommend adding a short comment on top of the added
> lines explaining why it is needed.
Sure, I'll send a second version.

Thanks for the review.
>
> Best regards,
> Leonardo Bras
>
-- 
Desnes A. Nunes do Rosario
--------------------------------
Advisory Software Engineer - IBM
Virtual Onsite Engineer - Red Hat


  reply	other threads:[~2020-02-27 13:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-15  5:39 [PATCH] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems Leonardo Bras
2020-02-27 13:29 ` Desnes Augusto Nunes do Rosario [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-14  0:19 Desnes A. Nunes do Rosario
2020-02-15  6:26 ` Leonardo Bras

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=545b8f72-97f2-82e0-571f-a3248b4a9176@linux.ibm.com \
    --to=desnesn@linux.ibm.com \
    --cc=gromero@linux.ibm.com \
    --cc=leonardo@linux.ibm.com \
    --cc=linuxppc-dev@lists.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;
as well as URLs for NNTP newsgroup(s).