From nobody Wed Apr 6 03:42:56 2022 X-Original-To: dev-commits-src-main@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 124821A91623; Wed, 6 Apr 2022 03:42:58 +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 4KY9MP1yCGz4s5X; Wed, 6 Apr 2022 03:42:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649216577; 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=6/T5PJkA95mOQy15dzEdcHOqhRKUMI+I3CpGraPjuKk=; b=XUVzBPArNpQbQEijww+93gCP7big8ec1if/Eb42OnT+jH6npWxugsIeGwqOxJC6TZIah7n GcUnXy7celSul2LsfWM74wcQX58VQsSw7HKLHvCeg4MhVYRH6MgMVsSMJUcgcQUvMSKD1/ v9st/HqpJkpr+UD0NcPbzfmFj7e2pCOhe1pNZDaTS22WZI4rEu8iEd4HyGVKtDcZb5QiV8 CS/s08eHfQlZoikJbtu7u9ZzYItd+i0ZQeIv8pu7W62dkuwDyanrhPfEchpM5nrRuSvb1y vbisRZ6T8rMD0idQpaRyMKf2f4RSOZNHVCJxridIKOCnay53NSRAAzJdGHsO/Q== 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 A9EEE13E12; Wed, 6 Apr 2022 03:42:56 +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 2363guPM089161; Wed, 6 Apr 2022 03:42:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2363guAe089160; Wed, 6 Apr 2022 03:42:56 GMT (envelope-from git) Date: Wed, 6 Apr 2022 03:42:56 GMT Message-Id: <202204060342.2363guAe089160@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1545c66789d3 - main - hwpmc_arm64: remove write only variables and the computations they do List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1545c66789d3d235dedfb85694cd9b6d0650833d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649216577; 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=6/T5PJkA95mOQy15dzEdcHOqhRKUMI+I3CpGraPjuKk=; b=FoMfomGoG1+CQXRiZ/kDakbm3xDX09zxQNlM/J1PGNpnF17XO/7cbKzAqjR4j9FhhugkLI 5T8nfxbBIGcG8TXiB80POwNfcj01GbhFfRcEDG1ny6MeIYwM2KYWliSIfmqRpqJ/OA58uV JzYDSTEQ2e3JJPRNMqtkqiy8HeQ7P6fH73+6jtgK/LnYXbSX8me0Q8fSli0Uic3q5/cKQo M7KnO5Dzck9PTxNwQH9CXBQ3Xt1Nd8i5wFDGx+7vB+y32c3G7pEvPcZU21zoQwTkqlgxDS 2edJ6sLgRIjHQBKQpf6ufaTR8SZMwgP27McF4SOWKV4i66UpNGLjbjOIzSWrow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649216577; a=rsa-sha256; cv=none; b=BEt6L864sL8heVX3rfdOBsTC+gQ1xh5PEsgHY8kwdOPoycZMp5J0lc8PoYadgUn8YcTire UDf3WieGNEdbSzPTaVHD1tjmXfmwx6kPID3RJWE/ynHUWlVRfnSXGKSX1pQNQT2ngqcenc b+zRNsbiLN5Gk8d6yOqfE2rNN+Hu9+bL021AFA7LxD7Tiae46EGY5GV9+I+2+JCiT4FOSk WUqUlAeJbpHhvDpb5KTZ08V4mOXfHS0+EbvnpWONsAs5TvSodraQp9MPUvGbc9hp5TAR/8 7mXRP+ktECZKytLXDT+VzrwGF8WKGa3ulJo8C7g7hPYsK70wqFqqJR1oO8+SnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1545c66789d3d235dedfb85694cd9b6d0650833d commit 1545c66789d3d235dedfb85694cd9b6d0650833d Author: Warner Losh AuthorDate: 2022-04-06 01:59:18 +0000 Commit: Warner Losh CommitDate: 2022-04-06 03:42:05 +0000 hwpmc_arm64: remove write only variables and the computations they do Sponsored by: Netflix --- sys/dev/hwpmc/hwpmc_arm64.c | 11 ----------- sys/dev/hwpmc/hwpmc_arm64_md.c | 2 -- 2 files changed, 13 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 9cdb2bfc06cb..e2609dfcb474 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -165,7 +165,6 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, const struct pmc_op_pmcallocate *a) { uint32_t config; - struct arm64_cpu *pac; enum pmc_event pe; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), @@ -173,8 +172,6 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, KASSERT(ri >= 0 && ri < arm64_npmcs, ("[arm64,%d] illegal row index %d", __LINE__, ri)); - pac = arm64_pcpu[cpu]; - if (a->pm_class != PMC_CLASS_ARMV8) { return (EINVAL); } @@ -337,12 +334,6 @@ arm64_start_pmc(int cpu, int ri) static int arm64_stop_pmc(int cpu, int ri) { - struct pmc_hw *phw; - struct pmc *pm; - - phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri]; - pm = phw->phw_pmc; - /* * Disable the PMCs. */ @@ -372,7 +363,6 @@ arm64_release_pmc(int cpu, int ri, struct pmc *pmc) static int arm64_intr(struct trapframe *tf) { - struct arm64_cpu *pc; int retval, ri; struct pmc *pm; int error; @@ -386,7 +376,6 @@ arm64_intr(struct trapframe *tf) TRAPF_USERMODE(tf)); retval = 0; - pc = arm64_pcpu[cpu]; for (ri = 0; ri < arm64_npmcs; ri++) { pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc; diff --git a/sys/dev/hwpmc/hwpmc_arm64_md.c b/sys/dev/hwpmc/hwpmc_arm64_md.c index e343d81d5172..4007b5840843 100644 --- a/sys/dev/hwpmc/hwpmc_arm64_md.c +++ b/sys/dev/hwpmc/hwpmc_arm64_md.c @@ -112,13 +112,11 @@ pmc_save_user_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { uintptr_t pc, r, oldfp, fp; - struct thread *td; int count; KASSERT(TRAPF_USERMODE(tf), ("[arm64,%d] Not a user trap frame tf=%p", __LINE__, (void *) tf)); - td = curthread; pc = PMC_TRAPFRAME_TO_PC(tf); *cc++ = pc;