linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thorsten Leemhuis <regressions@leemhuis.info>
To: Codyyao-oc <Codyyao-oc@zhaoxin.com>,
	peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	mark.rutland@arm.com, alexander.shishkin@linux.intel.com,
	jolsa@redhat.com, namhyung@kernel.org, tglx@linutronix.de,
	bp@alien8.de, hpa@zytor.com, x86@kernel.org
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	shyaololo@163.com, 8vvbbqzo567a@nospam.xutrox.com,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>
Subject: Re: [PATCH] x86/perf: Fixed kernel panic during boot on Nano processor.
Date: Thu, 13 Oct 2022 15:49:07 +0200	[thread overview]
Message-ID: <dcadef9a-0bb7-345f-7ab0-dace5cc4ca50@leemhuis.info> (raw)
In-Reply-To: <174219f5-c8ab-0ee4-8055-5cfa60c6a0fc@zhaoxin.com>

Hi perf maintainers and Codyyao-oc! What happened to below patch, which
was posted many moons ago? It wasn't merged afaics. Did it fall through
the cracks or is there something wrong with it?

I'm asking because a user who reported this regression asked what's up:
https://bugzilla.kernel.org/show_bug.cgi?id=212389

On 30.06.21 06:38, Codyyao-oc wrote:
> 
> Thank you for taking your precious time to read this letter, I am very
> graterful.
> 
> Last month, I fixed the bug that boot failed on Nano processor which
> introduced by
> 
> "Fixes: 3a4ac121c2ca ("x86/perf: Add hardware performance events support
> for Zhaoxin CPU.")"

Just BTW: You want to add that tag to your patch description.

> with Arjan's help and submitted this patch.  But I haven't got back.
> Greatly appreciate if you could kindly
> 
> check it and reply at your convenience.
> 
> Many Thanks!
> 
> Cody
> 
> On 2021/6/7 上午9:31, Cody Yao-oc wrote:
>> From: CodyYao-oc <CodyYao-oc@zhaoxin.com>
>>
>> Nano processor may not fully support rdpmc instruction, it works well
>> for reading general pmc counter, but will lead to GP(general protection)
>> when accessing fixed pmc counter. Futhermore, family/model information
>> is same between Nano processor and ZX-C processor, it leads to zhaoxin
>> pmu driver is wrongly loaded for Nano processor, which resulting boot
>> kernal fail.
>>
>> To solve this problem, stepping information will be checked to
>> distinguish
>> between Nano processor and ZX-C processor.

And this...

>> [https://bugzilla.kernel.org/show_bug.cgi?id=212389]

...should look like this:

Link: https://bugzilla.kernel.org/show_bug.cgi?id=212389

Ohh, and you might want to add this to ensure backporting:

Cc: <stable@vger.kernel.org> # 5.10.x

Guess adding those and submitting it again might be wise and help to
finally get this regression resolved.

Ciao, Thorsten

>> Reported-by: Arjan <8vvbbqzo567a@nospam.xutrox.com>
>> Signed-off-by: CodyYao-oc <CodyYao-oc@zhaoxin.com>
>> ---
>>   arch/x86/events/zhaoxin/core.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/x86/events/zhaoxin/core.c
>> b/arch/x86/events/zhaoxin/core.c
>> index 949d845c922b..cef1de251613 100644
>> --- a/arch/x86/events/zhaoxin/core.c
>> +++ b/arch/x86/events/zhaoxin/core.c
>> @@ -541,7 +541,8 @@ __init int zhaoxin_pmu_init(void)
>>         switch (boot_cpu_data.x86) {
>>       case 0x06:
>> -        if (boot_cpu_data.x86_model == 0x0f ||
>> boot_cpu_data.x86_model == 0x19) {
>> +        if ((boot_cpu_data.x86_model == 0x0f &&
>> boot_cpu_data.x86_stepping >= 0x0e) ||
>> +            boot_cpu_data.x86_model == 0x19) {
>>                 x86_pmu.max_period = x86_pmu.cntval_mask >> 1;
>>   

  reply	other threads:[~2022-10-13 13:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07  1:31 [PATCH] x86/perf: Fixed kernel panic during boot on Nano processor Cody Yao-oc
2021-06-30  4:38 ` Codyyao-oc
2022-10-13 13:49   ` Thorsten Leemhuis [this message]
2022-10-13 13:59 ` Peter Zijlstra
2022-10-13 15:07 ` Peter Zijlstra
2022-10-16  9:53   ` Arjan
2022-10-16  9:59     ` Peter Zijlstra
2022-10-16 10:56       ` 8vvbbqzo567a
2022-11-03  3:23 silviazhao-oc
2022-11-03 10:07 ` Borislav Petkov

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=dcadef9a-0bb7-345f-7ab0-dace5cc4ca50@leemhuis.info \
    --to=regressions@leemhuis.info \
    --cc=8vvbbqzo567a@nospam.xutrox.com \
    --cc=Codyyao-oc@zhaoxin.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=regressions@lists.linux.dev \
    --cc=shyaololo@163.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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).