Linux Perf Users
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] perf/x86/amd/uncore: Add common helpers and Hygon support
@ 2026-05-19  3:32 Qi Liu
  2026-05-19  3:32 ` [RFC PATCH 1/3] perf/x86/amd/uncore: Add common PMU helper functions Qi Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Qi Liu @ 2026-05-19  3:32 UTC (permalink / raw)
  To: peterz, mingo, namhyung, alexander.shishkin, jolsa, x86
  Cc: linux-perf-users, linux-kernel, lijing, liuqi

This series adds initial Hygon uncore PMU support.

Hygon uncore PMUs use a programming model close to the AMD uncore PMU,
so this series factors out a small set of common helpers for perf event
handling, counter assignment and per-CPU context management.

The Hygon-specific support is kept in the Hygon driver. This RFC
currently includes support for the Hygon DF and DF IOD PMUs. No
Hygon-specific logic is added to the AMD driver.

There is also an Hygon L3 PMU patch currently under review:
https://lore.kernel.org/lkml/9a4731a46cc0a7645838bd848a40a6574a97bad6.1775548724.git.fuhao@open-hieco.net/
If the overall approach in this RFC looks acceptable, that support can
be rebased onto this common helper structure in follow-up patches.

This is an RFC. Comments on the helper boundaries and file placement
are welcome.

Qi Liu (3):
  perf/x86/amd/uncore: Add common PMU helper functions
  perf/x86/amd/uncore: Convert AMD driver to common PMU helpers
  perf/x86/amd/uncore: Add Hygon uncore PMU support

 arch/x86/events/Kconfig             |  11 +
 arch/x86/events/amd/Makefile        |   4 +-
 arch/x86/events/amd/hygon_uncore.c  | 567 +++++++++++++++++++++++++++
 arch/x86/events/amd/uncore.c        | 585 ++++------------------------
 arch/x86/events/amd/uncore_common.c | 390 +++++++++++++++++++
 arch/x86/events/amd/uncore_common.h | 113 ++++++
 arch/x86/include/asm/msr-index.h    |   2 +
 arch/x86/include/asm/perf_event.h   |  20 +
 include/linux/cpuhotplug.h          |   3 +
 9 files changed, 1184 insertions(+), 511 deletions(-)
 create mode 100644 arch/x86/events/amd/hygon_uncore.c
 create mode 100644 arch/x86/events/amd/uncore_common.c
 create mode 100644 arch/x86/events/amd/uncore_common.h

-- 
2.34.1



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

end of thread, other threads:[~2026-05-19  5:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-19  3:32 [RFC PATCH 0/3] perf/x86/amd/uncore: Add common helpers and Hygon support Qi Liu
2026-05-19  3:32 ` [RFC PATCH 1/3] perf/x86/amd/uncore: Add common PMU helper functions Qi Liu
2026-05-19  4:07   ` sashiko-bot
2026-05-19  3:32 ` [RFC PATCH 2/3] perf/x86/amd/uncore: Convert AMD driver to common PMU helpers Qi Liu
2026-05-19  4:37   ` sashiko-bot
2026-05-19  3:32 ` [RFC PATCH 3/3] perf/x86/amd/uncore: Add Hygon uncore PMU support Qi Liu
2026-05-19  5:11   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox