From nobody Thu Apr 9 16:13:55 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F21F3A0EA6 for ; Mon, 2 Mar 2026 10:29:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772447383; cv=none; b=atVFh5K43zdS4wFege2H9XwC5Yudz2MoSdV3I1ASmmu8CsLsh01zR/QpiRVp5tKpbZg4Vdi5e3Xjl8M6xm5V5fMa7tD1hbExhALJlfHQrGGo6XNqJ9PJJJsBpZso2GlYdFnmewqXGgxcUdnvvUc3K3ZTEwrwoRUilX25a2h28ik= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772447383; c=relaxed/simple; bh=RWsHN5U+WMS2JsLtHvvjkJBwH8qQN/pVdfbYmms77H8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BHzJ1pkSglqAxB2ERC7SeKR7m3SiblZDRcnq/HEqATZMCHKvbuSOZv7hzfkbG088PAOSB92WScpyschEfqwbj+W+knXxdhe816uS9UgCFFHKQzt3PhfJZ9w6qePGsCSk6lMwdztDZ8qqauC0gSadMoXc7Skuqty/iOknrBtNvFM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nCIWpyvL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nCIWpyvL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0D7EC19425; Mon, 2 Mar 2026 10:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772447383; bh=RWsHN5U+WMS2JsLtHvvjkJBwH8qQN/pVdfbYmms77H8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nCIWpyvLbpNI41cEWQoUfqc5GRvl4MFYGtJuBYT7u2LgeY+ZpY3eYOwSCj4gs+905 dJrjImIsmx/9ymryzc3ofvHDBNZutkHeqWdnonvjDVIkpnQhXPugXLpK+wGbtZ2fWd 5ek8kmkufHutK04tVd5wv7xhku6bp5UtEkCf3jZMzmxcDGG9n8c5SbnzQwFETnjzDM pvAuQyL8oqnAKDNig+Nc0YZyehzXK2OMxdZpX1bJLKmORtO4F/sBmE6dIq/qWODfBS 7D02rRu1oMG26Aml6+YB1MrH9zauAXkYoIWJMnbcLpiTzZjdvbcwFZxXN69hoTERjJ fD222U3imkkNg== Received: from sofa.misterjones.org ([185.219.108.64] helo=valley-girl.lan) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vx0Wy-0000000FBCc-2YEB; Mon, 02 Mar 2026 10:29:40 +0000 From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Mark Rutland , Thomas Gleixner , Ben Horgan , Daniel Lezcano Subject: [PATCH 3/5] clocksource/drivers/arm_arch_timer: Drop the arch_counter_get_cnt{p,v}ct_stable() accessors Date: Mon, 2 Mar 2026 10:29:35 +0000 Message-ID: <20260302102937.1516059-4-maz@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260302102937.1516059-1-maz@kernel.org> References: <20260302102937.1516059-1-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, tglx@kernel.org, ben.horgan@arm.com, daniel.lezcano@linaro.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Content-Type: text/plain; charset="utf-8" Further simplify the counter accessors by eliminating the *_stable() ones, which serve little purpose at this stage. Signed-off-by: Marc Zyngier --- drivers/clocksource/arm_arch_timer.c | 38 +++++++++------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm= _arch_timer.c index 723ba698b8c46..ee21804d6613c 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -100,19 +100,12 @@ static noinstr u64 raw_counter_get_cntpct(void) return __arch_counter_get_cntpct(); } =20 -static notrace u64 arch_counter_get_cntpct_stable(void) +static notrace u64 arch_counter_get_cntpct(void) { - u64 val; - preempt_disable_notrace(); - val =3D __arch_counter_get_cntpct_stable(); - preempt_enable_notrace(); - return val; -} - -static noinstr u64 arch_counter_get_cntpct(void) -{ - if (arch_counter_broken_accessors()) - return arch_counter_get_cntpct_stable(); + if (arch_counter_broken_accessors()) { + guard(preempt_notrace)(); + return __arch_counter_get_cntpct_stable(); + } =20 return __arch_counter_get_cntpct(); } @@ -125,19 +118,12 @@ static noinstr u64 raw_counter_get_cntvct(void) return __arch_counter_get_cntvct(); } =20 -static notrace u64 arch_counter_get_cntvct_stable(void) +static notrace u64 arch_counter_get_cntvct(void) { - u64 val; - preempt_disable_notrace(); - val =3D __arch_counter_get_cntvct_stable(); - preempt_enable_notrace(); - return val; -} - -static noinstr u64 arch_counter_get_cntvct(void) -{ - if (arch_counter_broken_accessors()) - return arch_counter_get_cntvct_stable(); + if (arch_counter_broken_accessors()) { + guard(preempt_notrace)(); + return __arch_counter_get_cntvct_stable(); + } =20 return __arch_counter_get_cntvct(); } @@ -342,10 +328,10 @@ void erratum_set_next_event_generic(const int access,= unsigned long evt, ctrl &=3D ~ARCH_TIMER_CTRL_IT_MASK; =20 if (access =3D=3D ARCH_TIMER_PHYS_ACCESS) { - cval =3D evt + arch_counter_get_cntpct_stable(); + cval =3D evt + arch_counter_get_cntpct(); write_sysreg(cval, cntp_cval_el0); } else { - cval =3D evt + arch_counter_get_cntvct_stable(); + cval =3D evt + arch_counter_get_cntvct(); write_sysreg(cval, cntv_cval_el0); } =20 --=20 2.47.3