From nobody Wed Jun 01 15:08:00 2022 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 95A6D1B5B828; Wed, 1 Jun 2022 15:08:00 +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 4LCsw03kgKz3H46; Wed, 1 Jun 2022 15:08:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654096080; 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=UFT0BLYlggzFgLoCQXpILgG/hmr+uYt27cl0CmBrFhc=; b=f7VHoW+KXitM/3jQZb9TTmVqNgYsjIlueBCNAHRHzJxRKW3AKB4EnKnSQA1lbsIjrOyXCX QLm8NGzPCGqglN4SRejUZCwcbKSYQxaWvR1RmhcGDzEUxpAgY6WFEs8o87zVjXhiRBlDVP CBJ5Y5ZAXTZh7TVoffPRiFzop/dYDLdtrprYASlKl6nqeKFo7l/LTrIHHmD45u0HUD7cwR 2J6DIRDjPkW3sQlhXUk+ZlrKbUtLmeUApBWf+FO9w/kqSLctM5bV9YK4wTlZXoxDHqtpdH gD9YBqLxhs4+1pDDxAKDRHMoTNtbzpnh6w1F+EAsLgtSvKkpQmzi6KvKaCwqDg== 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 5BC8E225B6; Wed, 1 Jun 2022 15:08:00 +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 251F80ML090566; Wed, 1 Jun 2022 15:08:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 251F80SE090565; Wed, 1 Jun 2022 15:08:00 GMT (envelope-from git) Date: Wed, 1 Jun 2022 15:08:00 GMT Message-Id: <202206011508.251F80SE090565@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 5acb4c862b5b - main - hwpmc: Remove always zero pc_resync field. 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5acb4c862b5b22c0556545a0e3a8dc2300238aca Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654096080; 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=UFT0BLYlggzFgLoCQXpILgG/hmr+uYt27cl0CmBrFhc=; b=fnOuT8oEZTCYAX1Ach3sVn9rFWQfKsVmNPOQ4AN5EPZEHYZE88U+ZwTPuGHyINXzaEP32G EIw/7+wj5IFVuHT2g+4hxI3B6QS6IZ13NMj2z2IxSH78p41Nal2Nr+LU5iRRKDDiQh5hxv Zhr66aprbo4RYP6YdRdDnRtDDLO0bf7OJ5QNmPS5VP/yhS/aaJrpdPAqHS6KSOWVsDqKLS VNvBISrUAMQhHbXVo6+L8VuYv91/WF5W54jgZzdHmGokcAsn42xRqRKytbgsIdhYSJexYl F598AEsfpnGHb4JDdnv3Oq7FV/1IG4W9mx1kajOSwpiO7KESxnctEnNAAj91hQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654096080; a=rsa-sha256; cv=none; b=p3Wc2ORz4NIa/mhW8+V0JC6WQ0SGUi3SLKHs0mcs6ypP6UEgOxHAxC2IiBexqNVBi0jM+K ac6JZOq3YBrCacP3X9OYbo/cEg0s+bbmQHkyCIYtxoV/VfMoueY45gN1tHHEoCQb8G8wnU bG9YYn1/Uu5LoxTmxnyLG1iRq533blTURONkd5fc2Mc4JQOZDC0Ale1IgJRnee926sGaky CEj4JOb3uwJFWWoZ3bSNhV/qcI+t5lvp+xgZsSF0Ih7cwyZSvrHkofqoV3Wga4ghEHpfil 1blixC3O+xEUfTVtX1KPZJGs1IgpeU/3klvZ3GRqkB9G6uQSQtSxECDWc2L7bw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=5acb4c862b5b22c0556545a0e3a8dc2300238aca commit 5acb4c862b5b22c0556545a0e3a8dc2300238aca Author: Alexander Motin AuthorDate: 2022-06-01 15:05:50 +0000 Commit: Alexander Motin CommitDate: 2022-06-01 15:07:39 +0000 hwpmc: Remove always zero pc_resync field. MFC after: 1 month --- sys/dev/hwpmc/hwpmc_uncore.c | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_uncore.c b/sys/dev/hwpmc/hwpmc_uncore.c index 7ccb93cb8a58..93e41e8d91f1 100644 --- a/sys/dev/hwpmc/hwpmc_uncore.c +++ b/sys/dev/hwpmc/hwpmc_uncore.c @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); static enum pmc_cputype uncore_cputype; struct uncore_cpu { - volatile uint32_t pc_resync; volatile uint32_t pc_ucfctrl; /* Fixed function control. */ volatile uint64_t pc_globalctrl; /* Global control register. */ struct pmc_hw pc_uncorepmcs[]; @@ -335,11 +334,8 @@ ucf_start_pmc(int cpu, int ri) wrmsr(UCF_CTRL, ucfc->pc_ucfctrl); - do { - ucfc->pc_resync = 0; - ucfc->pc_globalctrl |= (1ULL << (ri + SELECTOFF(uncore_cputype))); - wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); - } while (ucfc->pc_resync != 0); + ucfc->pc_globalctrl |= (1ULL << (ri + SELECTOFF(uncore_cputype))); + wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); PMCDBG4(MDP,STA,1,"ucfctrl=%x(%x) globalctrl=%jx(%jx)", ucfc->pc_ucfctrl, (uint32_t) rdmsr(UCF_CTRL), @@ -370,11 +366,8 @@ ucf_stop_pmc(int cpu, int ri) PMCDBG1(MDP,STO,1,"ucf-stop ucfctrl=%x", ucfc->pc_ucfctrl); wrmsr(UCF_CTRL, ucfc->pc_ucfctrl); - do { - ucfc->pc_resync = 0; - ucfc->pc_globalctrl &= ~(1ULL << (ri + SELECTOFF(uncore_cputype))); - wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); - } while (ucfc->pc_resync != 0); + ucfc->pc_globalctrl &= ~(1ULL << (ri + SELECTOFF(uncore_cputype))); + wrmsr(UC_GLOBAL_CTRL, ucfc->pc_globalctrl); PMCDBG4(MDP,STO,1,"ucfctrl=%x(%x) globalctrl=%jx(%jx)", ucfc->pc_ucfctrl, (uint32_t) rdmsr(UCF_CTRL), @@ -702,11 +695,8 @@ ucp_start_pmc(int cpu, int ri) } wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); - do { - cc->pc_resync = 0; - cc->pc_globalctrl |= (1ULL << ri); - wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); - } while (cc->pc_resync != 0); + cc->pc_globalctrl |= (1ULL << ri); + wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); return (0); } @@ -734,11 +724,8 @@ ucp_stop_pmc(int cpu, int ri) /* stop hw. */ wrmsr(SELECTSEL(uncore_cputype) + ri, 0); - do { - cc->pc_resync = 0; - cc->pc_globalctrl &= ~(1ULL << ri); - wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); - } while (cc->pc_resync != 0); + cc->pc_globalctrl &= ~(1ULL << ri); + wrmsr(UC_GLOBAL_CTRL, cc->pc_globalctrl); return (0); }