git: 466b286ba22d - stable/15 - libpmc: fix the family check for the AMD DF event encoding
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Oct 2026 14:05:47 UTC
The branch stable/15 has been updated by mhorne:
URL: https://cgit.FreeBSD.org/src/commit/?id=466b286ba22d582fec2f48cf3a585fdf70445a61
commit 466b286ba22d582fec2f48cf3a585fdf70445a61
Author: Osvaldo Janeri Filho <ojanerif@amd.com>
AuthorDate: 2026-10-08 09:43:59 +0000
Commit: Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2026-10-30 14:04:47 +0000
libpmc: fix the family check for the AMD DF event encoding
The check compares cpu_family with decimal 19 instead of 0x19, so
Families 17h and 19h get the Family 1Ah DF encoding.
Signed-off-by: Osvaldo Janeri Filho <ojanerif@amd.com>
Reviewed by: mhorne
Fixes: 00c0a1f0bf6c ("hwpmc: Fix PMC flags for AMD Zen cores")
MFC after: 3 days
Sponsored by: AMD
Pull Request: https://github.com/freebsd/freebsd-src/pull/2461
(cherry picked from commit ca9c5718017fc34d34f2dfe90020644aad3588d3)
---
lib/libpmc/libpmc_pmu_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c
index 0832ab32e2f1..46c028e8cd8d 100644
--- a/lib/libpmc/libpmc_pmu_util.c
+++ b/lib/libpmc/libpmc_pmu_util.c
@@ -573,7 +573,7 @@ pmc_pmu_amd_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm,
}
} else if (strcmp("amd_df", pe->pmu) == 0) {
amd->pm_amd_sub_class = PMC_AMD_SUB_CLASS_DATA_FABRIC;
- if (cpu_family <= 19) {
+ if (cpu_family <= 0x19) {
amd->pm_amd_config |=
AMD_PMC_DF1_TO_EVENTMASK(ped->ped_event);
amd->pm_amd_config |=