From nobody Thu May 09 23:20:43 2024 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 4Vb7Km3Nm0z5KGVw; Thu, 09 May 2024 23:20:44 +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 4Vb7Km05z0z44Dk; Thu, 9 May 2024 23:20:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715296844; 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=w86smXO9dhq8f25gZaagbvhYDLvw3yGijmJYZtP5u6w=; b=x4pWHd21xo7YfsXVpwbPfVEcj3zzCHFNubq0UezP5cWn/B6vP9zarFEM5jdWj9WyF4IXW1 9klAWsJZUQuyPVhR6XsNSmobSaB+75uVRvIP//1Ue9Hmd5rZZmubyzqLdPXLTL2DLd/poL B6wWTjo40JK1MEH6c2NgPeFno4Um4Gv2AtiAD5DvTu1qBnkM759hrqW2iIbhKcGMH16Q3p bCpaLEup9CLUPJsS8URWGJtsOsjWwdM4l9jIjYkKcluV3CrbDAWVmvNHCPEyCTrVB+HyCC XAeudwJbLHhBHoOZCUF//RsgtV4QewgbqyRCc87KdOJiscnVAtHG3m6sK7dAdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715296844; a=rsa-sha256; cv=none; b=xwbCXcaJrItWfFvZ9bbPNovIKX0GlNi9hJsWZ8SPhxsRyx3aIxv20o92/9H8l3eJFSOJ+3 wvsMwAdyf1EEq7DBiCKpVuEFBVnXJyJ6JXxrx+m8a+ihPXMeEzEpGo9OLAh0d3yyAGfiPR grbzP1UMtJRTHDowEtRCYD/D/GP1YYZ4+wgfnVS/L1vIkEXgq9pqleQnQ/bcpY2A7xkg2d ojzFlov35Ni1VcSqjRGtm07zGZMSl37TA2FCm0n70LEj7N4FcsKdM6+ImZ4PEJFD8CiICK dSpEzdbe4g3R5fd8G4dWgJXnepYqbMlG91DEJIia4SA84gFvs4Fzi3o4fMy2zQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715296844; 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=w86smXO9dhq8f25gZaagbvhYDLvw3yGijmJYZtP5u6w=; b=wlTBSMcaByeO6yn98DOxVuhXQXTe4lnZJhDEtAgObS6c3tEiWKhoQNtsYHlQxrns2RLP05 UzRHdERoPNnHUQdHu2MAH+UiwW6zK0P98HJSSgjQrm/H1YVfvNXOuWfu8KGiKUFFWeEILd 3fzH2Y6lQYJDiKMH+5JNeheN46J7oVH3TYwG+15yp6iHgL/Mr0Ee8JlRU0Ev2waPzMG82o NQO7EUkyN8S8J6Dv3xMt/8TeYgZ3aIDy8ZzyWMyv4ju/RVB2oAdNa78RpNOb913ub0Vx1t W4qydN9oREZhYGn48GNfV/leYF2L33kr1KORKgX2v757mhsZDzy+pCTYkeuWtA== 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 4Vb7Kl6nZkz1SDh; Thu, 9 May 2024 23:20:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 449NKhU2056601; Thu, 9 May 2024 23:20:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 449NKhkx056598; Thu, 9 May 2024 23:20:43 GMT (envelope-from git) Date: Thu, 9 May 2024 23:20:43 GMT Message-Id: <202405092320.449NKhkx056598@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: e64318e76ed9 - main - arm/pmu: remove passing trap frame as argument 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: e64318e76ed90e8ef2666a9c5628e036d2cc8817 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e64318e76ed90e8ef2666a9c5628e036d2cc8817 commit e64318e76ed90e8ef2666a9c5628e036d2cc8817 Author: Elliott Mitchell AuthorDate: 2024-05-09 23:04:34 +0000 Commit: Warner Losh CommitDate: 2024-05-09 23:14:29 +0000 arm/pmu: remove passing trap frame as argument While otherwise a handy potential approach, getting the trap frame via the argument isn't documented and isn't supposed to be used. Adjust pmu_intr() to instead use curthread->td_intr_frame, which is the proper way. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1126 --- sys/arm/arm/pmu.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sys/arm/arm/pmu.c b/sys/arm/arm/pmu.c index 98d8cdcf2df8..050121934447 100644 --- a/sys/arm/arm/pmu.c +++ b/sys/arm/arm/pmu.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include @@ -65,9 +66,6 @@ uint32_t ccnt_hi[MAXCPU]; static int pmu_intr(void *arg) { -#ifdef HWPMC_HOOKS - struct trapframe *tf; -#endif uint32_t r; #if defined(__arm__) && (__ARM_ARCH > 6) u_int cpu; @@ -87,10 +85,8 @@ pmu_intr(void *arg) #ifdef HWPMC_HOOKS /* Only call into the HWPMC framework if we know there is work. */ - if (r != 0 && pmc_intr) { - tf = arg; - (*pmc_intr)(tf); - } + if (r != 0 && pmc_intr) + (*pmc_intr)(curthread->td_intr_frame); #endif return (FILTER_HANDLED);