All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH RESEND] perf/x86/rapl: Add Hygon Fam18h RAPL support
@ 2020-07-20  8:22 Pu Wen
  2020-07-28 12:29 ` [tip: perf/core] " tip-bot2 for Pu Wen
  0 siblings, 1 reply; 2+ messages in thread
From: Pu Wen @ 2020-07-20  8:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, jolsa, bp, eranian, Pu Wen

Hygon Family 18h(Dhyana) support RAPL in bit 14 of CPUID 0x80000007 EDX,
and has MSRs RAPL_PWR_UNIT/CORE_ENERGY_STAT/PKG_ENERGY_STAT. So add Hygon
Dhyana Family 18h support for RAPL.

The output is available via the energy-pkg pseudo event:
  $ perf stat -a -I 1000 --per-socket -e power/energy-pkg/

Signed-off-by: Pu Wen <puwen@hygon.cn>
---
 arch/x86/events/rapl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index 0f2bf59f4354..18c69d84b031 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -788,6 +788,7 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = {
 	X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE_L,		&model_skl),
 	X86_MATCH_INTEL_FAM6_MODEL(COMETLAKE,		&model_skl),
 	X86_MATCH_VENDOR_FAM(AMD, 0x17, &model_amd_fam17h),
+	X86_MATCH_VENDOR_FAM(HYGON, 0x18, &model_amd_fam17h),
 	{},
 };
 MODULE_DEVICE_TABLE(x86cpu, rapl_model_match);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-28 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-20  8:22 [RFC PATCH RESEND] perf/x86/rapl: Add Hygon Fam18h RAPL support Pu Wen
2020-07-28 12:29 ` [tip: perf/core] " tip-bot2 for Pu Wen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.