From nobody Sat May 6 17:49:36 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QDFS111DFz49skW; Sat, 6 May 2023 17:49:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QDFS06lrSz3F1s; Sat, 6 May 2023 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grPlrCt8QZcHRfz//DccM7wWt9nV0OD4GsxRPoYTns8=; b=khXyydQdz3ZInW++clzjaIUPQeoRdi3sjE7MC3vHdxINRNBcbdn3GeKO/4Z4jJzCkfZbmt v2k0jjSjyXH/6R4xOe/ZLDhD1rxuayrm2KwkOkmocudFHGxHDbYCL7Nue1kaWQzlJu8Khc 20OPLMminmR/uKn78Y00llhoo9+xTYStja6u0Ca27hw2jQScXUes4KUzWmF+zr7as/JoKf o36dts6D7hWK/I44tU8cTbzLKlMUN0OjeXczHxE0CGVYqxWZ5EMSWm2V+2LTqn4WkBaz4g XAqk2cjXm82ku+0AxzSRpcuBFC/aYsfIko1W+t1WzOzrAbuulk5YcGpan3xVGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683395377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=grPlrCt8QZcHRfz//DccM7wWt9nV0OD4GsxRPoYTns8=; b=lSULQ+X+IDFEmbMsOb4N95IgvdZLmjcgTatzupXdT+LEvm/8CqmVI/LJyuXDWSaCg/0WlT nHfUz/6D3x2pNwHIrsejv+vDM7uImYL0FijomhEPrM+kSgZENH0K0RmYwz0LGDU9I/xL4r cUS58X9zGzkqRQ7TV9Ivsq8p382U1w+drrxfkj/OzJjBuH3K7AhPEVoDfuHfuOKJ6sDW19 ZZh/zs3na8npnP8DSo2PTmcIQRdXbeJoJX97ceyRNzNatSPw7y0Ly43DZodnyUU8NDE8of S6LQJ809ZdMKOIF8TbbYvNm/Pc0JmsG6B2lxpSivzfR5TytGbenAXtps6F86Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683395377; a=rsa-sha256; cv=none; b=OEbDgTLn+R62of45rkjA5rwrUxPyODSTc1szm3PFw1BZ4INovECUK3FvL4KCK4aIR1LxHD Y05Q1Iv2tysR6Qynt448XxzoRtUfkQ+1dHbLfeckY58le1yqBuKyVCJQwx5YKfGbojF/KL 2v55affR17PpfoofYFYiaDksmdouJrU/EmF61xuQBLbV87A6effmYYP+vKwQkAmN6ncWFq fL55+LoNgi7//0GNEmyhvWtFQOVaF+v5R8TNUUDM77cXpX/t+/ghvdjXAjLZVvrFuuLlgD 5NASw8drL1mnXI71hbKxM2XH79rA0IN7IBdZO4ET7aLu2t8xv3HUQiFc4Js0ZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QDFS059S0zmHx; Sat, 6 May 2023 17:49:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 346Hnaef017772; Sat, 6 May 2023 17:49:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 346Hnahg017771; Sat, 6 May 2023 17:49:36 GMT (envelope-from git) Date: Sat, 6 May 2023 17:49:36 GMT Message-Id: <202305061749.346Hnahg017771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: d71a43902072 - main - hwpmc: remove remaining UCP event definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d71a439020721a9abea5c353b9e03b5dc29d253e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=d71a439020721a9abea5c353b9e03b5dc29d253e commit d71a439020721a9abea5c353b9e03b5dc29d253e Author: Mitchell Horne AuthorDate: 2023-05-05 21:56:34 +0000 Commit: Mitchell Horne CommitDate: 2023-05-06 17:49:18 +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 --- 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 577969b47fb7..56373f383dda 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -667,27 +667,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 dd31107de9e7..f0839aa49b5b 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 */ @@ -2477,8 +2467,6 @@ __PMC_EV_ALIAS("unhalted-reference-cycles", IAF_CPU_CLK_UNHALTED_REF) __PMC_EV_K7() \ __PMC_EV_BLOCK(K8, 0x2080) \ __PMC_EV_K8() \ - __PMC_EV_BLOCK(UCP, 0x12080) \ - __PMC_EV_UCP() \ __PMC_EV_BLOCK(PPC7450, 0x13000) \ __PMC_EV_PPC7450() \ __PMC_EV_BLOCK(PPC970, 0x13100) \