Date: Fri, 9 Jun 2023 19:57:59 GMT From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 0ebcec2b02e6 - stable/13 - hwpmc: remove remaining UCP event definitions Message-ID: <202306091957.359Jvxf0071997@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=0ebcec2b02e649e7f5a4eaba28eba6962e902272 commit 0ebcec2b02e649e7f5a4eaba28eba6962e902272 Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2023-05-05 21:56:34 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2023-06-09 18:14:58 +0000 hwpmc: remove remaining UCP event definitions Although this block has remained in __PMC_EVENTS(), there is no handling of UCP in libpmc/libpmc.c, so it is not possible to select one of these events. It should therefore be impossible to trigger the code removed from ucp_start_pmc(). Note that the GQ_SNOOP_MSF MSR exists only for Nehalem and Westmere architectures, and the related events do not exist for later generations. The Uncore support in hwpmc has severely atrophied in general. We have uncore event definitions in pmu-events, but the kernel support was written against Intel Performance Measurement Architecture version 2, and is disabled for processor generations later than Westmere. Nehalem and Westmere lack uncore event definitions in pmu-events. I'd be surprised if Uncore support is usable on any machine in its current state. Reviewed by: jkoshy MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39901 (cherry picked from commit d71a439020721a9abea5c353b9e03b5dc29d253e) --- sys/dev/hwpmc/hwpmc_uncore.c | 21 --------------------- sys/dev/hwpmc/pmc_events.h | 12 ------------ 2 files changed, 33 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 0d9085564c2a..c9ae128b55cf 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -671,27 +671,6 @@ ucp_start_pmc(int cpu, int ri) "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", cpu, ri, SELECTSEL(uncore_cputype) + ri, evsel); - /* Event specific configuration. */ - switch (pm->pm_event) { - case PMC_EV_UCP_EVENT_0CH_04H_E: - case PMC_EV_UCP_EVENT_0CH_08H_E: - wrmsr(MSR_GQ_SNOOP_MESF,0x2); - break; - case PMC_EV_UCP_EVENT_0CH_04H_F: - case PMC_EV_UCP_EVENT_0CH_08H_F: - wrmsr(MSR_GQ_SNOOP_MESF,0x8); - break; - case PMC_EV_UCP_EVENT_0CH_04H_M: - case PMC_EV_UCP_EVENT_0CH_08H_M: - wrmsr(MSR_GQ_SNOOP_MESF,0x1); - break; - case PMC_EV_UCP_EVENT_0CH_04H_S: - case PMC_EV_UCP_EVENT_0CH_08H_S: - wrmsr(MSR_GQ_SNOOP_MESF,0x4); - break; - default: - break; - } wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); cc->pc_globalctrl |= (1ULL << ri); diff --git a/sys/dev/hwpmc/pmc_events.h b/sys/dev/hwpmc/pmc_events.h index 355c206ed610..3873ca5ac0ca 100644 --- a/sys/dev/hwpmc/pmc_events.h +++ b/sys/dev/hwpmc/pmc_events.h @@ -204,16 +204,6 @@ __PMC_EV_ALIAS("instruction-retired", IAF_INSTR_RETIRED_ANY) \ __PMC_EV_ALIAS("unhalted-core-cycles", IAF_CPU_CLK_UNHALTED_CORE) \ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) -#define __PMC_EV_UCP() \ - __PMC_EV(UCP, EVENT_0CH_04H_E) \ - __PMC_EV(UCP, EVENT_0CH_04H_F) \ - __PMC_EV(UCP, EVENT_0CH_04H_M) \ - __PMC_EV(UCP, EVENT_0CH_04H_S) \ - __PMC_EV(UCP, EVENT_0CH_08H_E) \ - __PMC_EV(UCP, EVENT_0CH_08H_F) \ - __PMC_EV(UCP, EVENT_0CH_08H_M) \ - __PMC_EV(UCP, EVENT_0CH_08H_S) \ - /* * ARMv7 Events */ @@ -1870,8 +1860,6 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) __PMC_EV_MIPS74K() \ __PMC_EV_BLOCK(BERI, 0x11600) \ __PMC_EV_BERI() \ - __PMC_EV_BLOCK(UCP, 0x12080) \ - __PMC_EV_UCP() \ __PMC_EV_BLOCK(PPC7450, 0x13000) \ __PMC_EV_PPC7450() \ __PMC_EV_BLOCK(PPC970, 0x13100) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306091957.359Jvxf0071997>