Dear Jörg, dear Suravee,
Am 03.03.21 um 15:10 schrieb Alexander Monakov:
On Wed, 3 Mar 2021, Suravee Suthikulpanit wrote:
Additionally, alternative proposed solutions [1] were not considered or discussed.
This check has been introduced early on to detect a HW issue for certain platforms in the past, where the performance counters are not accessible and would result in silent failure when try to use the counters. This is considered legacy code, and can be removed if we decide to no longer provide sanity check for such case.
Which platforms? There is no such information in the code or the commit messages that introduced this.
According to AMD's documentation, presence of performance counters is indicated by "PCSup" bit in the "EFR" register. I don't think the driver should second-guess that. If there were platforms where the CPU or the firmware lied to the OS (EFR[PCSup] was 1, but counters were not present), I think that should have been handled in a more explicit manner, e.g. via matching broken CPUs by cpuid.
Suravee, could you please answer the questions?
Jörg, I know you are probably busy, but the patch was applied to the stable series (v5.11.7). There are still too many question open regarding the patch, and Suravee has not yet addressed the comments. It’d be great, if you could revert it.
Kind regards,
Paul
Could you please