From nobody Mon Sep 28 16:22:44 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 CB0CD401492; Thu, 20 Aug 2026 09:48:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787219330; cv=none; b=SfAYIvCePspbajZb0fIRfDeATE95z3/7UR9FuaC4DVpc+L0VhPKSq4a8ZqiW32z865iqaVhzR+8rByPflOChmza61GxDUEGaLVrVK5tZ9QMXU/R29VeloAJQKTHtHCvMZpL3M56qTaNi8nGZ1+4751M7PNRQkZFzUTz2RwHf+p4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787219330; c=relaxed/simple; bh=MlnTR+iEN7mckKXXjvjKWc0MqWVXNUG0vVBfiuoqpVs=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ZWPRHfC1RWx2q77R6M6cjbs5idR7bXwmkXt36tTFdgnpgI2FXz/qbHEBQtiw9x+GVbMIC7QrXcsWvr6GhHfQ6R3fooK37qFK9G52wL2YDedLkNqKcAjFUN6309Gj+YdiY1FkuX6XcmhmU5rnN/OSKYbscb8IcprF6DTPaIkx8kw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bcTUgJvE; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=enTNr7J5; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bcTUgJvE"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="enTNr7J5" Date: Thu, 20 Aug 2026 09:48:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1787219316; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+kEXMtcA27t7zGt0+jNVvLHTxqHATomorw2IWxAnsck=; b=bcTUgJvEDEcl1HfqZbfAMuK2ZbuZxPEeKcJl8B1J6a8/tUpid7fF4H+QinNDI4BRWIflYF riReV/5rC9/C/+9uxReCUqNaQZF/T/F31l9ASanlviak8/g9buGoiNzv8RQPdWPDCWI0DY V4VsNsJ0vVK3pUYqTLU52j6zq4SVJbdWuVhsKhqXTJa2qCRtFvQJhpSKF/Wa/fDFiKZrnU szVCivpW6qi/oxfvCISM6wE6Vejwip82lgifCc1usWH65jIXFvF3oHGKJ0oooNZecqJodS DP2uj6DgHMIIQKc6aa1awNtoWtFmaQAd98to3onbr2jQelRJ+RVCuyxgoysOCA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1787219316; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+kEXMtcA27t7zGt0+jNVvLHTxqHATomorw2IWxAnsck=; b=enTNr7J5MB9hmEUrOKPMFyy7eeMqxLZIr7agHCsv4HTko7kkwJ54lea4BhX0dkdL9I5nZV TnTEbvqUFZ8F2IBQ== From: "tip-bot2 for Nathan Chancellor" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/urgent] ARM: Fix get_cycles() after delay_read_timer() conversion Cc: Nathan Chancellor , Thomas Gleixner , Jinjie Ruan , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260819-fix-arm-get_cycles-v1-1-208bf07ac540@kernel.org> References: <20260819-fix-arm-get_cycles-v1-1-208bf07ac540@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178721931468.1542179.2927835878492849983.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/urgent branch of tip: Commit-ID: e1e3a0ab69c64eedaf53dce9306f8a090bf038f0 Gitweb: https://git.kernel.org/tip/e1e3a0ab69c64eedaf53dce9306f8a090= bf038f0 Author: Nathan Chancellor AuthorDate: Wed, 19 Aug 2026 14:43:21 -07:00 Committer: Thomas Gleixner CommitterDate: Thu, 20 Aug 2026 11:44:08 +02:00 ARM: Fix get_cycles() after delay_read_timer() conversion After commit dfc256dac54c ("calibrate: Rework delay timer calibration"), certain ARM configurations (such as multi_v5_defconfig) hang during boot. The use of read_current_timer() in arch/arm's get_cycles() was improperly converted to delay_read_timer(), resulting in get_cycles() returning 0 even when the timer has been read or an uninitialized stack value when delay_read_timer() returns false. Flip the branches of the ternary condition to fix get_cycles(). Fixes: dfc256dac54c ("calibrate: Rework delay timer calibration") Signed-off-by: Nathan Chancellor Signed-off-by: Thomas Gleixner Reviewed-by: Jinjie Ruan Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: https://patch.msgid.link/20260819-fix-arm-get_cycles-v1-1-208bf07ac54= 0@kernel.org --- arch/arm/include/asm/timex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/include/asm/timex.h b/arch/arm/include/asm/timex.h index 94e40c1..4d31eab 100644 --- a/arch/arm/include/asm/timex.h +++ b/arch/arm/include/asm/timex.h @@ -13,7 +13,7 @@ typedef unsigned long cycles_t; // Temporary workaround until timex.h is cleaned up bool delay_read_timer(unsigned long *t); =20 -#define get_cycles() ({ cycles_t c; delay_read_timer(&c) ? 0 : c; }) +#define get_cycles() ({ cycles_t c; delay_read_timer(&c) ? c : 0; }) #define random_get_entropy() (((unsigned long)get_cycles()) ?: random_get_= entropy_fallback()) =20 #endif