From nobody Mon Jul 4 18:09:25 2022 X-Original-To: dev-commits-src-branches@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 5B4201C3F235; Mon, 4 Jul 2022 18:09:26 +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 4LcDN569zsz4k8Y; Mon, 4 Jul 2022 18:09:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656958165; 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=5M7ooqWSpRGuquUn1LrJtlZr+zO1nc7l5fPh5nZ7KEY=; b=kpuvLmXVm5JxLNLryipoXBrTWXGTO2ubFT8/VDFiMpY4cNOVTqls+YVUDigBCOlWxNTPB/ iDCEctlKexeYEAghyFrn5PP7thC8C5xG/3bGN/KXC4A4n5W+3EEbri9Tiwxzjp0aM/PJMj RJA3AysSy8lGfzxxFtqjFdpARrEQnaeLzKgjxhI1ShTHISgm+tWi8gv1iEFbgsW8F/pveO q3VbDX8bFYW2/NbqMs/02Xru6fxENUkV47d+t3goREWeITd1PNlPiwqvti1aJsVMwom9KZ oIMyVJTivVCp3p5hQrRIUa3ZpzCsdDe/kqP8fXi2n2dt3mqXG/BJRHH5mFy1Cg== 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 327301619F; Mon, 4 Jul 2022 18:09:25 +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 264I9PdG064457; Mon, 4 Jul 2022 18:09:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 264I9Pip064456; Mon, 4 Jul 2022 18:09:25 GMT (envelope-from git) Date: Mon, 4 Jul 2022 18:09:25 GMT Message-Id: <202207041809.264I9Pip064456@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: 633cab8aa4a2 - stable/13 - hwpmc: Remove always zero pc_resync field. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 633cab8aa4a24c4187e9996efa1bb680bf531ace Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1656958165; 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=5M7ooqWSpRGuquUn1LrJtlZr+zO1nc7l5fPh5nZ7KEY=; b=xneRAg1hIf/UE61c8AjUMJoUYFIIKw7wPDqJ2+jelj6XHEOjrLJlhAGrfegbY58EUvzmyG wmO4Or/9syfVcmzgoS28sNnoqL/Kijeex6nb+aBzHiBugSsYvTW6Q1rWBjsQ3gy62RDPQO FzptTp4b7DqeUZ2bk3swD2Nw6AI0tEem7QFzDiQw3UiOrJKdmgTD59eSAA9q95L0fnk6JL Zk0/d3//HXcuU+Init6dnjBCXjSGBgR54WHhiBlGXu8jVzlM/qs4Oeip+C5TXzt15jiIJ4 PioE7yMukRRePi+Uw/eD7CLIKGJfMpSZfOKvcnIICYsjDUTNpCcy/KJKiwWGEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1656958165; a=rsa-sha256; cv=none; b=oC8l7dUBD/ZBMVIokBLtA07IhvPpJ/03R24n2o3KS18eU21LJy+DfnCb2GMInH4KcYSR/z 5g5S128AFw6kg1yiBo1Q49CJk8poChx1WkNyODRTnx7/BERbOx5GRqQ3f+VK7Igd9a4fCR +hrleRYrlkKWApypUSxhrJSAEEZkUiMxX72+89Uwyg1UIW+CMeHbs5gP8/t/z06p/KDk4u 9807oIfe/iYAg3oDUPmZ6SGpr6kOjg/EFSeXemmxlR5FvqWK+BLTbELsJnSphHPy4OZQK5 8VzIA1jXtVUzwzjQGIcqJuZWTAaUm2j3NTplheh1THBQM3o8mBYnYWalgpEf9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=633cab8aa4a24c4187e9996efa1bb680bf531ace commit 633cab8aa4a24c4187e9996efa1bb680bf531ace Author: Alexander Motin AuthorDate: 2022-06-01 15:05:50 +0000 Commit: Alexander Motin CommitDate: 2022-07-04 17:48:09 +0000 hwpmc: Remove always zero pc_resync field. MFC after: 1 month (cherry picked from commit 5acb4c862b5b22c0556545a0e3a8dc2300238aca) --- 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 a5e3d9bb2f8a..d0b310d740bc 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[]; @@ -338,11 +337,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), @@ -373,11 +369,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), @@ -708,11 +701,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); } @@ -740,11 +730,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); }