]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/rapl: Use CPUID bit on AMD and Hygon parts
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 May 2021 13:59:20 +0000 (14:59 +0100)
committerBorislav Petkov <bp@suse.de>
Tue, 1 Jun 2021 19:10:33 +0000 (21:10 +0200)
commitcf2677e5cb3c22be1c3fa08b2b799eb2c5248cfc
tree9bd52ba379d2970f2d3045cf9c3bf0e82226f57f
parent06fa657107762aa6182e2f6fe64a6a696edd30d3
perf/x86/rapl: Use CPUID bit on AMD and Hygon parts

AMD and Hygon CPUs have a CPUID bit for RAPL.  Drop the fam17h suffix as
it is stale already.

Make use of this instead of a model check to work more nicely in virtual
environments where RAPL typically isn't available.

 [ bp: drop the ../cpu/powerflags.c hunk which is superfluous as the
   "rapl" bit name appears already in flags. ]

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210514135920.16093-1-andrew.cooper3@citrix.com
arch/x86/events/rapl.c
arch/x86/include/asm/cpufeatures.h
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/hygon.c