Re: [PATCH] x86/perf/zhaoxin: Add stepping check for ZX-C

From: Borislav Petkov
Date: Tue Feb 07 2023 - 13:30:42 EST


On Tue, Feb 07, 2023 at 04:42:26PM +0800, silviazhaooc wrote:
> Sorry, I'm a newbie in Linux. Thanks for your reminding.

No worries. :)

> I have carefully checked our product manual for Nano and ZXC FMS.
>
> For ZXC, there are 2 kinds of FMS:
>
> 1. Family=6, Model=0x19, Stepping=0-3
>
> 2. Family=6, Model=F, Stepping=E-F
>
> For Nano, there is only one kind of FMS:
>
> Family=6, Model=F, Stepping=[0-A]/[C-D]
>
> So model = 0xf, steppings >= 0xe or model = 0x19 belong solely to ZXC.
> Nano is an old CPU series which has been stopped production several years
> ago.

Good, which sounds like there won't be any more Nano steppings.

> It will not use the steppings which belong to ZXC.This is an
> unambiguous way to differentiate between ZXC and Nano CPUs.
>
> Do I need to add the statements in the source code and re-commit the patch?

Yes please. That would explain in a clear way why it is ok to test those
models/steppings. If it turns out that we need this Nano - ZXC
distinction more often, we can do something more involved later.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette