All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] perf/x86/amd/uncore: Add Hygon uncore PMU and JSON events
@ 2026-07-08 13:13 Qi Liu
  2026-07-08 13:13 ` [PATCH v3 1/2] perf/x86/amd/uncore: Add Hygon uncore PMU support Qi Liu
  2026-07-08 13:13 ` [PATCH v3 2/2] perf vendor events hygon: Add Hygon Data Fabric PMU events and metrics Qi Liu
  0 siblings, 2 replies; 5+ messages in thread
From: Qi Liu @ 2026-07-08 13:13 UTC (permalink / raw)
  To: peterz, mingo, namhyung, alexander.shishkin, jolsa, sandipan.das,
	ravi.bangoria, x86
  Cc: linux-perf-users, linux-kernel, lijing, liuqi

This series adds initial uncore PMU support for Hygon Family 18h
processors.

Hygon uncore PMUs use a programming model similar to AMD's, but
differ in MSR base addresses, event encodings, and counter allocation
semantics. Rather than embedding Hygon support in the AMD uncore
driver with vendor checks, a dedicated driver is introduced to keep
both drivers clean and independently maintainable.

The new driver provides hygon_df and hygon_df_iod PMUs covering the
Data Fabric on both the CPU die and the IO Die, together with perf
JSON events and metrics for three processor models. A per-context
hrtimer handles counter reads, and CPU hotplug callbacks manage
context lifecycle.

Changes since RFC:
  - Address sashiko bot review.
Changes since v1:
  - Rename the helper namespace to amd_uncore_common_* to avoid
    an generic uncore_common_* prefix, and to keep it distinct
    from the existing amd_uncore_* names.
Changes since v2:
  - Drop the common helpers refactoring. Keep the Hygon driver
    self-contained instead, avoiding unnecessary changes in the AMD
    uncore driver.

Qi Liu (2):
  perf/x86/amd/uncore: Add Hygon uncore PMU support
  perf vendor events hygon: Add Hygon Data Fabric PMU events and metrics

 arch/x86/events/Kconfig                       |  11 +
 arch/x86/events/amd/Makefile                  |   2 +
 arch/x86/events/amd/hygon_uncore.c            | 863 ++++++++++++++++++
 arch/x86/events/amd/uncore.c                  |  13 +-
 arch/x86/include/asm/msr-index.h              |   2 +
 arch/x86/include/asm/perf_event.h             |  20 +
 include/linux/cpuhotplug.h                    |   3 +
 tools/perf/pmu-events/Build                   |   2 +-
 .../arch/x86/hygonm1/data-fabric.json         |  87 ++
 .../arch/x86/hygonm4/data-fabric.json         | 122 +++
 .../arch/x86/hygonm6/data-fabric.json         | 154 ++++
 tools/perf/pmu-events/arch/x86/mapfile.csv    |   3 +
 tools/perf/pmu-events/jevents.py              |   2 +
 13 files changed, 1274 insertions(+), 10 deletions(-)
 create mode 100644 arch/x86/events/amd/hygon_uncore.c
 create mode 100644 tools/perf/pmu-events/arch/x86/hygonm1/data-fabric.json
 create mode 100644 tools/perf/pmu-events/arch/x86/hygonm4/data-fabric.json
 create mode 100644 tools/perf/pmu-events/arch/x86/hygonm6/data-fabric.json

-- 
2.34.1



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

end of thread, other threads:[~2026-07-09  2:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 13:13 [PATCH v3 0/2] perf/x86/amd/uncore: Add Hygon uncore PMU and JSON events Qi Liu
2026-07-08 13:13 ` [PATCH v3 1/2] perf/x86/amd/uncore: Add Hygon uncore PMU support Qi Liu
2026-07-08 13:27   ` sashiko-bot
2026-07-09  2:09     ` Qi Liu
2026-07-08 13:13 ` [PATCH v3 2/2] perf vendor events hygon: Add Hygon Data Fabric PMU events and metrics Qi Liu

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.