From nobody Sat Oct 4 01:39:25 2025 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 4009E3376B2; Thu, 21 Aug 2025 13:29:40 +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=1755782982; cv=none; b=XlYTq8p/PCJHHJRKXfaTzPCWIGLMitIoEFMDhcpCSy/9o71Eyv5Q/PWT+3sb2KWANf3IygRRvt8ZuS9jJjg4Ud6n71BXP3H3Oj0vwgD6aChePx2SHl0DcBGDaYzK0td9FsijZMcInhiLYwCdGgeN/lD3RyG3QOn1TCvCL1GPDCc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782982; c=relaxed/simple; bh=R99664LLCcZJl6Qz3rbhs4Lz9ZnyWhsrUx+hOEuxb9M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ayjKK9D5vfW5Eay429AGYy218cH79HkHK/ikUhibv9SvZL/wQsCvHw8Y15MsuSP8Csp0UCHeCTE6XmLRj8In8i35swm7inQxU3IwVYQPysGabLUk5ySBsC+liHKS8EN2W+GHNz8prLIGe2aB2S32IksXIhP6FjZkRfwkfE65/3g= 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=JOwT72+f; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SOT7LMa/; 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="JOwT72+f"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SOT7LMa/" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782979; h=from:from: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=d98YrRaD6ZBonCTSAveiD2NgcBz4Lno//N+VhhhS+z4=; b=JOwT72+fkJ+YSdBJAQxBPH/cT4fV0s6ukMjz4LPhtJhxStWxoHOuGiMgdKJaknDMv4leVJ Zj28wHmcXb7LFoClhu3PUOnd0pRgt/CSL4JPGbqhIDuUbZ+z2ag1mBfLlx3c/g39b4AggF F5IzufuysLy4q/q1iqLsQDXNHWZfHnQ3AAnWVxCIdVl+6qZ1KyANlDEKNtbsldZ6vN5+gU 6gML8tqZJMxkeP7xV3Cl/hsHltEJiSfQI8Gy8pdS1iiLo04WGoL7/Z94U3/7sQ1EE4m7jI IXWpNIb95zy7aPududcR9jkg3wI1qaO8YPgbNk3r5j24GYOMklvvOikGpJLS5A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782979; h=from:from: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=d98YrRaD6ZBonCTSAveiD2NgcBz4Lno//N+VhhhS+z4=; b=SOT7LMa/FysiKypRUv2iEW2gXx7CyKkMKohDWUTdmrbH1RHGLlBOUqCCGMZHdBp5K5cM2w q2lRJo6d6VpNA4AQ== Date: Thu, 21 Aug 2025 15:28:08 +0200 Subject: [PATCH v2 1/9] posix-timers: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-1-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=1359; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=R99664LLCcZJl6Qz3rbhs4Lz9ZnyWhsrUx+hOEuxb9M=; b=I7tZZwqdGqbhXx6yqnjYphyXgfeMQUUpxeo4unscIZHNMMtJEv8+N4I2MpyigoWVHLqDxKr60 C3PrK8QBhmXC+VkMpJEcv0M3CZF8zi+Hjy6zTfZIvLEeBXuskVw319T X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The field timer->base->get_time is a private implementation detail and should not be accessed outside of the hrtimer core. Switch to the equivalent helpers. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) --- kernel/time/posix-timers.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 8b582174b1f9498a548fc1c214185577f994a647..2741f3725de48ea8f73cc279287= 631f9d5a6e960 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -299,8 +299,7 @@ static void common_hrtimer_rearm(struct k_itimer *timr) { struct hrtimer *timer =3D &timr->it.real.timer; =20 - timr->it_overrun +=3D hrtimer_forward(timer, timer->base->get_time(), - timr->it_interval); + timr->it_overrun +=3D hrtimer_forward_now(timer, timr->it_interval); hrtimer_restart(timer); } =20 @@ -825,7 +824,7 @@ static void common_hrtimer_arm(struct k_itimer *timr, k= time_t expires, hrtimer_setup(&timr->it.real.timer, posix_timer_fn, timr->it_clock, mode); =20 if (!absolute) - expires =3D ktime_add_safe(expires, timer->base->get_time()); + expires =3D ktime_add_safe(expires, hrtimer_cb_get_time(timer)); hrtimer_set_expires(timer, expires); =20 if (!sigev_none) --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 D2BBD338F24; Thu, 21 Aug 2025 13:29:41 +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=1755782983; cv=none; b=dkwMBtMUkHS7cvWyCgn7MNEzaZO5RfZqEXUEymNwCVfxnkpY5ckyOMt9CxLCgMBH8DTvpT4l0QRE64+64zPZXdRoUsmTjPyPuo04rYGD5wZa/S5RcVIMc2gl0zsNPRyOTG4Ryk0aLFSKz6aaof+vFquB0fI9asP8/wDtXK6Lc9c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782983; c=relaxed/simple; bh=8TdD8g20S+E5Y37FMBzmqxDaVE1/HseBQcU5bJAZLz0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XMvmLz1i9m7k6oKwa4Iuck1t7BmMMoEVcPOE4cZkuj/5szyaStdA0KseqAehT6AQCjqCBQY0Df7f+Ekh1ANlbIsGXAXbOhz0qtNDOYcsWNN2jKyO56SM7ztxN50IGZ79yz284MPI7ThRiIL+d2fFwR9N44HHpbAWkeP8qnEPoPE= 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=3XWxarWQ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=sq0RBBHI; 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="3XWxarWQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="sq0RBBHI" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782979; h=from:from: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=9QGiYiB/8xesJY5UShVLUELwHvGdA3oC793UzeHmwuo=; b=3XWxarWQoENVP8OCLcWj0/Crei7qSWdLNYIcn0dGHmIdDUrqDB2e6U99zSAXRMDuL2BJCj /I4VM+J9fJtmF8DoIIHeYs6IG2yxeP7h6qPwwLxOcdtUdgXHc0+fy07afXGYzVy8/6slsJ wsF6+fv8K5rgE+9cTAz+xkzm0sc2NV9Nqc2jdFuQ7V7pCRk6PDMFaS4KP3MHf47LYbd1eY MLkKFtLfxgMTWM2r6vp4L9CQZEDLhU2SoKl2j4U6i9x55XEyR4UFXGHrizRJ9Ob0my0B0T dm1/DdSID1RIN6FuoIMLTeA8/F9lrUQqzEJvqTYdcr/SiuuE3YCP7muARY1bGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782979; h=from:from: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=9QGiYiB/8xesJY5UShVLUELwHvGdA3oC793UzeHmwuo=; b=sq0RBBHIkKHAeEipIsx3aAg0tzkudUpGESzK+I2SQfQSVwqkXa8GhcRcUxXshuW49wt18o Ussfi79tUmPmBxDA== Date: Thu, 21 Aug 2025 15:28:09 +0200 Subject: [PATCH v2 2/9] timers/itimer: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-2-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=972; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=8TdD8g20S+E5Y37FMBzmqxDaVE1/HseBQcU5bJAZLz0=; b=Nc166gJVmv8rJFcUpugL59JW4rwXuyTnchlIxNKaSNks3ChoED/HfbMYnqO7qXBtyalEHmKtH SmzLDJuPYxoDDBKAvzfMOOqBNp1vfz3H15WLdjrkJWSBGWykdqsu+9y X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The field timer->base->get_time is a private implementation detail and should not be accessed outside of the hrtimer core. Switch to the equivalent helper. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) --- kernel/time/itimer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c index 876d389b2e219a10c0dbddb6a06dd3252c502e99..7c6110e964e7ecd19ab8c5c9b81= f1b113c1ae7bd 100644 --- a/kernel/time/itimer.c +++ b/kernel/time/itimer.c @@ -163,8 +163,7 @@ void posixtimer_rearm_itimer(struct task_struct *tsk) struct hrtimer *tmr =3D &tsk->signal->real_timer; =20 if (!hrtimer_is_queued(tmr) && tsk->signal->it_real_incr !=3D 0) { - hrtimer_forward(tmr, tmr->base->get_time(), - tsk->signal->it_real_incr); + hrtimer_forward_now(tmr, tsk->signal->it_real_incr); hrtimer_restart(tmr); } } --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 D2C31338F26; Thu, 21 Aug 2025 13:29:41 +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=1755782983; cv=none; b=ulY9zzxgnvu7ANvcoQdbFZwvmqxIJQeSrYw3tOsMIpuHW9tzgctgfGLVwYUNKFaKLZWVwh841XHpob73Wl4eVGQV7kf5X5VD6/vtweNoqVqOPpsadzXosxbJf2cAkIa2NzoVKpk0iRJPLoaOTLNXtk2E28VT3oNKxEu6yzd2pys= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782983; c=relaxed/simple; bh=gpXy2GjW3NstgkefEL7nb0bYvGGEsP7NwP6FnKaezKA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=VDALbFDtrn0YyH5uNwsinCgEFpSzBfWA73pq+XvVz1pe2z2Y2so6+Lb9HTmYniTNfaV7G+wtliSNaR6EFPoP2HSejJ1Oxj2/eXtZPcFLoCH0VUI2Olh5E/bR4zg31cDtoBV78x+JPKaJT5FfrKckYvZQ+3v3B6SA0/toMaHYqr0= 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=tgsUFy1Y; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=eHleXzNJ; 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="tgsUFy1Y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="eHleXzNJ" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782980; h=from:from: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=LQ6UHeBc4TYS0MVyvj20OtZxtPShZrHBOAEWRaqEkWU=; b=tgsUFy1YSinjiYltQZAabBGZRv/YzxWuGd67x58NbfBmEWbsuNETCDnVsKXJEbjtSxylig l/subEZvhekAFr0lH1Ee/10Kla/rkxZvIK+CXajQIQVt5QeOFbe9xZAFeta/xLXFJaX3A7 FcLjfCy0vddFi6+HGsD0Jk1YIojDQEdc9nQnqeJ1TuEBU+QbHmBykNDIrE525PPBzt+AeS 9MBJfz3t+ILqv9qynxKgSlLl9wMtJeStQv6seXjiWD3Mv1KJD058DFs0GOjmZVbSdPp66u MpReC/2XRju4O8BDp2WAvi6vkY2D+5Z/ACCQOhL3Y4VFOEX5lr7jvBNoHlJ8YA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782980; h=from:from: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=LQ6UHeBc4TYS0MVyvj20OtZxtPShZrHBOAEWRaqEkWU=; b=eHleXzNJYKy06BSGAiV2zMojorWvaG3upzol4W3wXXjCY8WOIgfTyZTPhBPcrk7LNu92d6 KrJQ3Uy1Ndg2bzCA== Date: Thu, 21 Aug 2025 15:28:10 +0200 Subject: [PATCH v2 3/9] sched/core: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-3-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=945; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=gpXy2GjW3NstgkefEL7nb0bYvGGEsP7NwP6FnKaezKA=; b=3JuQ9pzBlUOX66p0yHXqiM2ErjzTIqpIV+LcgLLopIK+gP2xTxN8xgmU17OaAJtWbnghEqJc/ xqykf3x+QXQBk1hTF2WRPA7iHccdbeCOMjhBsWTQgh5q8cTHhnshf+Z X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The field timer->base->get_time is a private implementation detail and should not be accessed outside of the hrtimer core. Switch to the equivalent helper. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) --- kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index be00629f0ba4cc5832189c0052b0b632deb4ea2e..4dc12838ad4fdf086b3f3f11680= 72d6301f51aa3 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -917,7 +917,7 @@ void hrtick_start(struct rq *rq, u64 delay) * doesn't make sense and can cause timer DoS. */ delta =3D max_t(s64, delay, 10000LL); - rq->hrtick_time =3D ktime_add_ns(timer->base->get_time(), delta); + rq->hrtick_time =3D ktime_add_ns(hrtimer_cb_get_time(timer), delta); =20 if (rq =3D=3D this_rq()) __hrtick_restart(rq); --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 925C1338F32; Thu, 21 Aug 2025 13:29:42 +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=1755782984; cv=none; b=KFhABzgw8f+JKUUVRZwxnHg3s+2va49pSMOv9TgfcRyQ9o3y0vpJHEsxUwVL3PnsRNnvOvjsOjNWwq+wq/MsD+HLatIG1F8AbwA6xK6CtHxxq38v3OpRtciQT7LtKkd0rh0LhVbRf0mEhXEL1k94QyIOwm7HHh6mgqvaZMuIsdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782984; c=relaxed/simple; bh=WDy/YS4aTPBNNBNBVBxwStADqkF5AS/Xq3IlcmAmOUQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ALxBT6PIjKC7u7JENvU5KTIYfGgPavUvdF4eDr6E8iJKBKqdQC8QLFeDU3RAjr2RkjFzkggwV3yLYEgAXhXCikXOQO8IeT1Yaq3rsqZfq6e5iXeTr3VkLKOJoFG0MzaCY1TIDbzrDDPY43A/D8KUaBKW6kbhrWy9kMnzByaKf3c= 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=DJOsFZQH; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=bNSPFT5W; 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="DJOsFZQH"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="bNSPFT5W" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782980; h=from:from: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=H6/471kOwUnsmFC+IohXvES4JYDDxtnSEA2zaEPJpzM=; b=DJOsFZQH0sLqHBwG2NXJrHbfzgvvYjuHJTw19Tg3c1qI+Utk6oB4VKXzrs7McSXJhcI59j jIQJrcX5hlmBcSHz1WSWLS4OVv4d1UN8B+ZH1cQoW4R/h7vLbdrPuLFZcx0zIbTRrbds7E wOZ+IZLIb6RDJDHiczp4sTMC5XKOcSBksF6t0vA9BIbw0rF3CTaLoKlg5qWboG1GkLJ/tU EiGk+ogHXrk8l4ISKAj+JHlkGZA5mvpTDXnzPAgvyn4qGjWP89hP3lsUNsgIzg5US6Rji4 4TRG8t+0/5f9pCBcbJ+I1blmuVbYFXZWvxN81JFZ2f34w6stki15R06elfqWrg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782980; h=from:from: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=H6/471kOwUnsmFC+IohXvES4JYDDxtnSEA2zaEPJpzM=; b=bNSPFT5Wi8mGdfLEbSihSUF5OI9xcBSzrnFvd+kGieViywfB8qznSqgjCenwb5PKmWbjb4 mvptAdYhvIiL2SDA== Date: Thu, 21 Aug 2025 15:28:11 +0200 Subject: [PATCH v2 4/9] lib: test_objpool: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-4-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=897; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=WDy/YS4aTPBNNBNBVBxwStADqkF5AS/Xq3IlcmAmOUQ=; b=uMhd1ujE2E8eS4470OZtIe/Qe0kH48x99QuO4oCa0sf9Iq9K2hImkfPEU1Iuq1rB+OqmUtGmL F2rZi/0v7m2BdIJapy9s0J1ZCNmIege9fRH/XpLSF6OzyObb/0DAj5C X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The field timer->base->get_time is a private implementation detail and should not be accessed outside of the hrtimer core. Switch to the equivalent helper. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) --- lib/test_objpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_objpool.c b/lib/test_objpool.c index 8f688187fa8727e26d2d065c46e789ee15fd55b5..6a34a7582fdbf50b5632043ec19= e77c8fd4dad78 100644 --- a/lib/test_objpool.c +++ b/lib/test_objpool.c @@ -164,7 +164,7 @@ static enum hrtimer_restart ot_hrtimer_handler(struct h= rtimer *hrt) /* do bulk-testings for objects pop/push */ item->worker(item, 1); =20 - hrtimer_forward(hrt, hrt->base->get_time(), item->hrtcycle); + hrtimer_forward_now(hrt, item->hrtcycle); return HRTIMER_RESTART; } =20 --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 E19E233A038; Thu, 21 Aug 2025 13:29:43 +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=1755782985; cv=none; b=HTOq6p52bJJ3Bo5bUtNHHLIjkxPB8sego87Qrq+GdeupoZ/i7duMJYots20M1Agw7oPvaLkLJ7pwl5xYf3JNQ2xthDDW/0ufA+xpeF8Ysz/WGQVYOsHSsGtAzWI889Ir45ZnUAqucnspOIp575wPR2Gfcnmjpdofs0hCdFNe7SE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782985; c=relaxed/simple; bh=wLZelQ/kpyT2kok+58F/HOuQPEnU0d4A0SZIJtDzQyM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Mh0+3GCSkUBfKoEfV4jUq4mEurRZlfnhLPmgR3Ob5pvC+FLGc2a4SqsmbL7wnVvJVYuEKEyIOKWGOxll85c2o5H5vpVYmKS8RQdxwao8Lbmmd0DZnXhKF39VjMn0ZLYk72KETDv+ypthaemsN90ifaum5b8HOAX/Vz1chR/TEao= 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=Zg2u6smG; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=d/UR3WLH; 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="Zg2u6smG"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="d/UR3WLH" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782981; h=from:from: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=xy+xanDMXLAdtPF9cZBAIngYoPdj6lAtF4kFv7uRHmk=; b=Zg2u6smGPql5fu5bTOW2/tA5AH+3Wuvpb++uiBrQGXSWOCQFKEGXcZQmiCAlsfoFn2YC4s wqC0vOPuO0ce+Gk3qNBSr/N5BGmcLEh++oCKxqSiN69oE6ZUiePsxu4bDY5FGWqBtAhKWE Dfg5Y/wrp9yexai4FzsO8nyEvZKzmG+/18xfafZhwdErtEH8P3Q3zYe37tgwXqAY0Ocdw6 vKw0yl49JkMeaSJjuvbkiEPPIE+punrrgSImycMrHRoUZ64dQgGaLT4Z5tVprphhVGK42a eErfCqa0Ck4ZSZSJ2EALziBJCJ/jM2TJ9qrWI04imB08QkiKyBz35ASPnM1GxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782981; h=from:from: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=xy+xanDMXLAdtPF9cZBAIngYoPdj6lAtF4kFv7uRHmk=; b=d/UR3WLHpxPuS3am5r7/f13uqhT0P53UGvg6nlcCxgxdiqKbqFpExKYskuaEA+oXYUtF8I hYyGzok9KvW+OHBg== Date: Thu, 21 Aug 2025 15:28:12 +0200 Subject: [PATCH v2 5/9] ALSA: hrtimer: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-5-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Takashi Iwai X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=984; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=wLZelQ/kpyT2kok+58F/HOuQPEnU0d4A0SZIJtDzQyM=; b=iubOsRI+pclv7Fcvv18ANIPxP9smHk4Hx+X+rK5XGG0M6nu36EWPshrQTheZWqcVqIrv7TAH2 X/SZ6vrXNArDmqJZwVstX2CRnWQbLrwIA35vMHZkQzY/S5mOdqQRF0N X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The field timer->base->get_time is a private implementation detail and should not be accessed outside of the hrtimer core. Switch to the equivalent helper. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) Acked-by: Takashi Iwai --- sound/core/hrtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c index c364bd126ac8b311e3ce899e226ff9fd82c4485f..2d5f4d47071f79d7db24c8f004f= 0f4154808fdd8 100644 --- a/sound/core/hrtimer.c +++ b/sound/core/hrtimer.c @@ -44,7 +44,7 @@ static enum hrtimer_restart snd_hrtimer_callback(struct h= rtimer *hrt) } =20 /* calculate the drift */ - delta =3D ktime_sub(hrt->base->get_time(), hrtimer_get_expires(hrt)); + delta =3D ktime_sub(hrtimer_cb_get_time(hrt), hrtimer_get_expires(hrt)); if (delta > 0) ticks +=3D ktime_divns(delta, ticks * resolution); =20 --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 A621D33A017; Thu, 21 Aug 2025 13:29:43 +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=1755782985; cv=none; b=HoIRDLdoO2vM8rO67JjqaaEMoTAwuEH0BsgZNWvpRUelfb8TZtJzaVLNRK1OWpR7UCDtzK9FL7qRU7uHQ7I2s5XtQnvMOb+vyOaXhYYPlR7chOdBg9dFwWEEsWAIKEG+XaBTUz23LXARd4YSYvLrb9Db1ev94cuSnv4mbMWvedU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782985; c=relaxed/simple; bh=RPFsLa3yQ2QgDbviDAxjqf/hGOj6JYSwyyBya7kgUUE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uSZ7FyV72e+6pWaFsxN2Jn24yhneiQaQ0l82RvBJ7jVnH0dUEPML4XLfJnWxCjVDytph6ifgKYNHagKNQwQd6BTd8dJyDV0UrC/KUsvHjSGVwltScng20ubWgauAK8pF3X59YX+PWAQS2oqhCzcr23mHe/XoYOA7Om18oWeUiCg= 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=JIaqbQ2y; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2d1/NdDI; 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="JIaqbQ2y"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2d1/NdDI" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782981; h=from:from: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=kyHeBhASay/ARiVrkliySf60pZbwbK5kiO8ZEYitBJo=; b=JIaqbQ2yRAcj8cKQfvhnxYdm+2kjLDIiF1vj6ZYbfL1xed4nd3gXOmzrEjTAaF/RND7MoW A5m5rA/prVperuaid+9YrR/apOE7z7Z5rd58fuuhTZ+2e2zVK6gE4Ilb8i6nDDJpqMLiQP g7gj5rt6xGFHcuo2g1jI8lgCxTULHbNQr0B593Z46hdFXMAzxmY3nG8Y46viTsv/t9zNEH NSLoC6kD4JNt48VJ//k2z9WhNkKaFsAngIv7EvmnqvXPFHXJSTA76YYAVXuU7rG18r/fcX pMcvjtzcdQLhE2oEA6I8TA+VrAxYxdMFlETWyhPOdVtTgtJkar0QaY8B4ZYUkg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782981; h=from:from: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=kyHeBhASay/ARiVrkliySf60pZbwbK5kiO8ZEYitBJo=; b=2d1/NdDIxIhSkgZcdJ6ZVM/qbHtYgbmy5GQ3CWgon0UJirT1Ie9M95S1j0VhbfphB3pZdw KXGQQACNTQcpOBAw== Date: Thu, 21 Aug 2025 15:28:13 +0200 Subject: [PATCH v2 6/9] media: pwm-ir-tx: Avoid direct access to hrtimer clockbase Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-6-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=1342; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=RPFsLa3yQ2QgDbviDAxjqf/hGOj6JYSwyyBya7kgUUE=; b=M9m9J1m9cAiXYY+tJTQcRJPFbIxtKaBHotv/I2t0CESbO0pHAdKJ8HNrViemFmYmf9jdWBxVu nyQkSA+PlVMDeM0egZXEUOBH83YohlGexhFaPhPofVbT283WrCdHUyQ X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The field timer->base->get_time is a private implementation detail and should not be accessed outside of the hrtimer core. Switch to an equivalent higher-level helper. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) Acked-by: Sean Young --- drivers/media/rc/pwm-ir-tx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/rc/pwm-ir-tx.c b/drivers/media/rc/pwm-ir-tx.c index 84533fdd61aa6ce3c0f8593aaefe5919fd05c7f9..047472dc9244afe0e56e505be20= f36fd7d9c449a 100644 --- a/drivers/media/rc/pwm-ir-tx.c +++ b/drivers/media/rc/pwm-ir-tx.c @@ -117,7 +117,6 @@ static int pwm_ir_tx_atomic(struct rc_dev *dev, unsigne= d int *txbuf, static enum hrtimer_restart pwm_ir_timer(struct hrtimer *timer) { struct pwm_ir *pwm_ir =3D container_of(timer, struct pwm_ir, timer); - ktime_t now; =20 /* * If we happen to hit an odd latency spike, loop through the @@ -139,9 +138,7 @@ static enum hrtimer_restart pwm_ir_timer(struct hrtimer= *timer) hrtimer_add_expires_ns(timer, ns); =20 pwm_ir->txbuf_index++; - - now =3D timer->base->get_time(); - } while (hrtimer_get_expires_tv64(timer) < now); + } while (hrtimer_expires_remaining(timer) > 0); =20 return HRTIMER_RESTART; } --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 7319133EAE8; Thu, 21 Aug 2025 13:29: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=1755782986; cv=none; b=eYmBCQISgqBDobUtwYxK4e1RWD/JoQ7NrTI2i+G+nS1mQ3gtBcbyHNz4uvsEXAo3TsNv82/BqdPtTuv8b0+WJFRimlyJG1fZVAvbKpsQVYv3d0MNPyPvEu5kGy/WEYjm5k72kMhGMYO3+ylIpTNqT1f79kz/J3udr6t2Jxr7Sj0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782986; c=relaxed/simple; bh=C8HA7MAat4CTutH8Ds7RWrlApJ2Ch9U6nnOVfDGpy68=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=eWV52B2jXsG5/O+EMjadISypZjNtgSNqFCrviz99hXl3bAyZn4UmlHgzqSYiIKSxR8CenImrUG4hyLwXpbhmLOL5yK4aGwW2NSB3iMmQzKfP3RNWpucOhBGizYLRSbk3jCOeRhNOgM2AarLRoIVxTwXPs4fs3Q3yNJMx774whvk= 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=g4mNJ5Hs; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=qXUa5MRv; 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="g4mNJ5Hs"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="qXUa5MRv" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782982; h=from:from: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=nUo2PCWANZGhiqLojJUR13Al4FbX97gqpA4dHy48tgI=; b=g4mNJ5HsLTqMTEuEc/HtY3ZTgIIldiQqasLr4KHJ3bdJoewEBRSxNOu2imOHPdPOvbP8VQ st7PUcP9zG4P+qmGSNw2pFuAHz79F+qiuiTuMIE/ZKgUB/oS2tg1m2d9vshzePw2fwoKYy ShgbNfRYNGfry6fAGMB1XflMmJbRsFpVzwCkfv5qCSbXd7sbjmq+eMbCh2MdzdKB9WLQrq RZ4+dMFYD3VVXO9ewnR6Qjr3vxWTBc4qSlvPBtnwhZNeo8HDuJuvmnW21GqfpO7e/Ennsq elbbE1AhK8ZPielhXeznao1IHfXqk6XSM8jBznKebUcO9ERL9iXl9HI73axW+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782982; h=from:from: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=nUo2PCWANZGhiqLojJUR13Al4FbX97gqpA4dHy48tgI=; b=qXUa5MRv05RQCq/DTM8Ys1TTTMzy+xMDiZuups3a+Ja7RBFgQfTEofl7WgAlpai6SCk24T d7gW0box2K9ypODw== Date: Thu, 21 Aug 2025 15:28:14 +0200 Subject: [PATCH v2 7/9] hrtimer: Use hrtimer_cb_get_time() helper Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-7-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=2231; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=C8HA7MAat4CTutH8Ds7RWrlApJ2Ch9U6nnOVfDGpy68=; b=yrC8+fcvi8DFRKTnM0JwV0p4diWr20wIl1Tw904Ggedv7T0ZYK9puC8PVJjg3UzOT5V7oIILL LUvkbiD6X4WCX6UA9Qr7JT0oc5W9IE8AIyuMp8nUHgyT/4OGMCr/1xy X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Various other helpers contain open-coded implementations of hrtimer_cb_get_time(). This prevents refactoring the implementation. Reuse the existing helper. For this to work, move hrtimer_cb_get_time() a bit up in the file and also make its argument 'const'. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) --- include/linux/hrtimer.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 1ef867bb8c44b06812d8552441d4092922bfe170..e655502b14e6c4b1a69b67c9971= 32d628bd1470f 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -154,14 +154,14 @@ static inline s64 hrtimer_get_expires_ns(const struct= hrtimer *timer) return ktime_to_ns(timer->node.expires); } =20 -static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *time= r) +static inline ktime_t hrtimer_cb_get_time(const struct hrtimer *timer) { - return ktime_sub(timer->node.expires, timer->base->get_time()); + return timer->base->get_time(); } =20 -static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer) +static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *time= r) { - return timer->base->get_time(); + return ktime_sub(timer->node.expires, hrtimer_cb_get_time(timer)); } =20 static inline int hrtimer_is_hres_active(struct hrtimer *timer) @@ -200,8 +200,7 @@ __hrtimer_expires_remaining_adjusted(const struct hrtim= er *timer, ktime_t now) static inline ktime_t hrtimer_expires_remaining_adjusted(const struct hrtimer *timer) { - return __hrtimer_expires_remaining_adjusted(timer, - timer->base->get_time()); + return __hrtimer_expires_remaining_adjusted(timer, hrtimer_cb_get_time(ti= mer)); } =20 #ifdef CONFIG_TIMERFD @@ -363,7 +362,7 @@ hrtimer_forward(struct hrtimer *timer, ktime_t now, kti= me_t interval); static inline u64 hrtimer_forward_now(struct hrtimer *timer, ktime_t interval) { - return hrtimer_forward(timer, timer->base->get_time(), interval); + return hrtimer_forward(timer, hrtimer_cb_get_time(timer), interval); } =20 /* Precise sleep: */ --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 7676833EAEB; Thu, 21 Aug 2025 13:29: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=1755782986; cv=none; b=cL7t1RLrC4zDPXWrlj+AXv5vt1GKzd3Ufs+ra2AqszZUfhCzc/INPwyMdz4VJzQcHhNcXfzVPyzE6Etq3fcrt0O3zx7ftgasewCb3bhypgRWa19tv9YkgROTTlyld35bvMIMjl6vYBVKvblkrkMJLFmrfc6OnKtMv23OvJNVTMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782986; c=relaxed/simple; bh=qpjr8ot/J+wMQRWHJUPzO6GjMqaoAg72AV15leLjvtY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=te2itBJpsHUO+k6JSKLjKJIqAFQq7VYM6HFgtRHan+fh1oBl4h6VB43rpNpGtoif2gw/UfneSgMld7/JWT7b5r7OB6OHiPHrhUl/MehuFCxazBvEcmL/SNGmAZV+uKpJTNemrb7hUYuK2oJM7+VtF+N+5u7MjYC8r33s4G9L4DM= 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=0hevwVvA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SZyQ6jcz; 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="0hevwVvA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SZyQ6jcz" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782982; h=from:from: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=DzL6VRBRkeHjRnUDbRTMOIjcdnEpTnpBNvpp2PcQGcY=; b=0hevwVvASkfgHFkYDmXiKVndEYUhmQUfvOMxo4K3XH6owroRGqCRLszg5Wep2BJKQhPZmi tli6+tyZCwqfXnavbMIFqrhYKruD5w1lCvBUazvNu5mTd4rGml5FuL8p7DbavGHII/kXd+ RbGsC3NoBPnBRgBalC+mAwKY8SMze6Wk5hS2ufHHuK5PwH9VQRNJrL/2W5svv9EoxgBBol mOMbP3novdIS9v6Em8avO9yveoMxQHUyaiG0ik2KXjcxUmZ2CDGa1i7tB7RAw8MPdjxETF WKPeLkVP40/LhMde9RD7ukM15p0F6TUKYtMeYkogX5+lvDH1w071o9eaP6Zk8w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782982; h=from:from: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=DzL6VRBRkeHjRnUDbRTMOIjcdnEpTnpBNvpp2PcQGcY=; b=SZyQ6jczh4Re4vh/vfW5iG5Bs2vyDqntfuFvuXS1t6LOqVXtOTsvDU1kx8nRsymqlVDqcj 6cLGS3/gzllYDrCQ== Date: Thu, 21 Aug 2025 15:28:15 +0200 Subject: [PATCH v2 8/9] hrtimer: Remove hrtimer_clock_base::get_time Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-8-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782975; l=6086; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=qpjr8ot/J+wMQRWHJUPzO6GjMqaoAg72AV15leLjvtY=; b=ubonTTeSCuQz5djsEWCW/U8+5YfrtGF92gu/lohfVRZ/uvqDXDXBOKsRCbY2mzoP/ecB8myba MmRlv+Afy+kD+wl1MK95rlTCwSdxFE6NlPXXYQrIkoryrUxTLxw9/Tv X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= The get_time() callbacks always need to match the bases clockid. Instead of maintaining that association twice in hrtimer_bases, use a helper. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Peter Zijlstra (Intel) --- v2: Reorder branches in __hrtimer_cb_get_base() --- include/linux/hrtimer.h | 5 +---- include/linux/hrtimer_defs.h | 2 -- kernel/time/hrtimer.c | 34 +++++++++++++++++++++++++--------- kernel/time/timer_list.c | 2 -- scripts/gdb/linux/timerlist.py | 2 -- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index e655502b14e6c4b1a69b67c997132d628bd1470f..2cf1bf65b22578499e7de5417db= da1d34cf12fce 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -154,10 +154,7 @@ static inline s64 hrtimer_get_expires_ns(const struct = hrtimer *timer) return ktime_to_ns(timer->node.expires); } =20 -static inline ktime_t hrtimer_cb_get_time(const struct hrtimer *timer) -{ - return timer->base->get_time(); -} +ktime_t hrtimer_cb_get_time(const struct hrtimer *timer); =20 static inline ktime_t hrtimer_expires_remaining(const struct hrtimer *time= r) { diff --git a/include/linux/hrtimer_defs.h b/include/linux/hrtimer_defs.h index 84a5045f80f36f88cb47bf23a62a4d0afbd1a2c6..aa49ffa130e57f7278a7d9f96a6= d86e6630c69de 100644 --- a/include/linux/hrtimer_defs.h +++ b/include/linux/hrtimer_defs.h @@ -41,7 +41,6 @@ * @seq: seqcount around __run_hrtimer * @running: pointer to the currently running hrtimer * @active: red black tree root node for the active timers - * @get_time: function to retrieve the current time of the clock * @offset: offset of this clock to the monotonic base */ struct hrtimer_clock_base { @@ -51,7 +50,6 @@ struct hrtimer_clock_base { seqcount_raw_spinlock_t seq; struct hrtimer *running; struct timerqueue_head active; - ktime_t (*get_time)(void); ktime_t offset; } __hrtimer_clock_base_align; =20 diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 30899a8cc52c0a9203ce0216fe47f5f19a7bf6ec..fedd1d793f6cdf8923cc8a6707f= f793f36b77f26 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -59,6 +59,7 @@ #define HRTIMER_ACTIVE_ALL (HRTIMER_ACTIVE_SOFT | HRTIMER_ACTIVE_HARD) =20 static void retrigger_next_event(void *arg); +static ktime_t __hrtimer_cb_get_time(clockid_t clock_id); =20 /* * The timer bases: @@ -76,42 +77,34 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) = =3D { .index =3D HRTIMER_BASE_MONOTONIC, .clockid =3D CLOCK_MONOTONIC, - .get_time =3D &ktime_get, }, { .index =3D HRTIMER_BASE_REALTIME, .clockid =3D CLOCK_REALTIME, - .get_time =3D &ktime_get_real, }, { .index =3D HRTIMER_BASE_BOOTTIME, .clockid =3D CLOCK_BOOTTIME, - .get_time =3D &ktime_get_boottime, }, { .index =3D HRTIMER_BASE_TAI, .clockid =3D CLOCK_TAI, - .get_time =3D &ktime_get_clocktai, }, { .index =3D HRTIMER_BASE_MONOTONIC_SOFT, .clockid =3D CLOCK_MONOTONIC, - .get_time =3D &ktime_get, }, { .index =3D HRTIMER_BASE_REALTIME_SOFT, .clockid =3D CLOCK_REALTIME, - .get_time =3D &ktime_get_real, }, { .index =3D HRTIMER_BASE_BOOTTIME_SOFT, .clockid =3D CLOCK_BOOTTIME, - .get_time =3D &ktime_get_boottime, }, { .index =3D HRTIMER_BASE_TAI_SOFT, .clockid =3D CLOCK_TAI, - .get_time =3D &ktime_get_clocktai, }, }, .csd =3D CSD_INIT(retrigger_next_event, NULL) @@ -1253,7 +1246,7 @@ static int __hrtimer_start_range_ns(struct hrtimer *t= imer, ktime_t tim, remove_hrtimer(timer, base, true, force_local); =20 if (mode & HRTIMER_MODE_REL) - tim =3D ktime_add_safe(tim, base->get_time()); + tim =3D ktime_add_safe(tim, __hrtimer_cb_get_time(base->clockid)); =20 tim =3D hrtimer_update_lowres(timer, tim, mode); =20 @@ -1588,6 +1581,29 @@ static inline int hrtimer_clockid_to_base(clockid_t = clock_id) } } =20 +static ktime_t __hrtimer_cb_get_time(clockid_t clock_id) +{ + switch (clock_id) { + case CLOCK_MONOTONIC: + return ktime_get(); + case CLOCK_REALTIME: + return ktime_get_real(); + case CLOCK_BOOTTIME: + return ktime_get_boottime(); + case CLOCK_TAI: + return ktime_get_clocktai(); + default: + WARN(1, "Invalid clockid %d. Using MONOTONIC\n", clock_id); + return ktime_get(); + } +} + +ktime_t hrtimer_cb_get_time(const struct hrtimer *timer) +{ + return __hrtimer_cb_get_time(timer->base->clockid); +} +EXPORT_SYMBOL_GPL(hrtimer_cb_get_time); + static void __hrtimer_setup(struct hrtimer *timer, enum hrtimer_restart (*function)(struct hrtimer *), clockid_t clock_id, enum hrtimer_mode mode) diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index b03d0ada64695058d4c57f3e29d546ba18bff591..488e47e96e93f96a5a18c0f72b8= f4df36270943f 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c @@ -102,8 +102,6 @@ print_base(struct seq_file *m, struct hrtimer_clock_bas= e *base, u64 now) SEQ_printf(m, " .index: %d\n", base->index); =20 SEQ_printf(m, " .resolution: %u nsecs\n", hrtimer_resolution); - - SEQ_printf(m, " .get_time: %ps\n", base->get_time); #ifdef CONFIG_HIGH_RES_TIMERS SEQ_printf(m, " .offset: %Lu nsecs\n", (unsigned long long) ktime_to_ns(base->offset)); diff --git a/scripts/gdb/linux/timerlist.py b/scripts/gdb/linux/timerlist.py index 98445671fe83897d50187f302f844919729388dc..ccc24d30de8063b28e0a3068416= af341f8951876 100644 --- a/scripts/gdb/linux/timerlist.py +++ b/scripts/gdb/linux/timerlist.py @@ -56,8 +56,6 @@ def print_base(base): text +=3D " .index: {}\n".format(base['index']) =20 text +=3D " .resolution: {} nsecs\n".format(constants.LX_hrtimer_resol= ution) - - text +=3D " .get_time: {}\n".format(base['get_time']) if constants.LX_CONFIG_HIGH_RES_TIMERS: text +=3D " .offset: {} nsecs\n".format(base['offset']) text +=3D "active timers:\n" --=20 2.50.1 From nobody Sat Oct 4 01:39:25 2025 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 B52DD34165C; Thu, 21 Aug 2025 13:29:45 +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=1755782987; cv=none; b=s5lFQj/px0K6kVUsorqqfGHiU6iwwe/Jwz4iOfuefz2RWCeuUEAoDzrAunaCxM77gjS0g/W7ztASRbqVvAfg0Uwav64DlPiM+tOdIMuEclcZ/abDfkXe8Wvn7oiUdwhwEW5ks6ZMlUgYCq40Qr0y5EzvjaVrjerQLtImLWswr3o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755782987; c=relaxed/simple; bh=lRNEtqcrtlw74Q5TFa9XsODgun9hFWArZJOwnOWoo2E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FjhLpSUkGudlOaPcR4q48N6lrhSzbU55fDpOLB9sXMHfY2606h60QEbnwULvMDLEmUSr7rDSsJxnni4NmAKY/XNqo3Qo8o+TsERDXsemQagMogcVA/y+YuF4FFrFLDoEYssg1n/Bgbg1XGA/9i+Ysp9DuiiQ0oTRWuzHAJ9betY= 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=sbWEZzS9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Ej46kqb5; 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="sbWEZzS9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Ej46kqb5" From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755782983; h=from:from: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=/IFfXb2Gts/wINwWBJRkteFrwzlStBGHf9GvRYuutbo=; b=sbWEZzS9RpijCcTfWGULdNkOaitzT7INtDE+7XhR76hdc3RdH7lQe3J0T+0slwNnrUSJS7 TDP7BuP8pXIcqbq5n7fxBRfaw2kPQjYbD5lXkh/tdmlUMGCbuVL+KspzwYkfRNigqgURYx hNq+qHTkoJysQe2PwIlscKD8js5IUolD2/wYCU0sGmZagCgtQ92/9Kp/TzNVs78vysanYA iHCsYcktO58z+mBvDR8egjaXjnCs+t3Pkm7S2V9C6Qq8KV4kooeDooSaJ1HA5nbo8jRqCW S2W5r5QkPsO6AK2fho514PoA+zfwrUD++MTZ3U1f/mDA0SqHRdNrplLkfwGvkA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755782983; h=from:from: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=/IFfXb2Gts/wINwWBJRkteFrwzlStBGHf9GvRYuutbo=; b=Ej46kqb5WCNAosfV2HN79ixwnaFLactfkbLvZsHJCyzAJ2P1Y24yz0l2D6XhrKcOBjJwFz Cn0mdygi2Gc9MGCg== Date: Thu, 21 Aug 2025 15:28:16 +0200 Subject: [PATCH v2 9/9] hrtimer: Reorder branches in hrtimer_clockid_to_base() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20250821-hrtimer-cleanup-get_time-v2-9-3ae822e5bfbd@linutronix.de> References: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> In-Reply-To: <20250821-hrtimer-cleanup-get_time-v2-0-3ae822e5bfbd@linutronix.de> To: Anna-Maria Behnsen , Frederic Weisbecker , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Matt Wu , Andrew Morton , Jaroslav Kysela , Takashi Iwai , Sean Young , Mauro Carvalho Chehab , Jan Kiszka , Kieran Bingham Cc: linux-kernel@vger.kernel.org, linux-sound@vger.kernel.org, linux-media@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Developer-Signature: v=1; a=ed25519-sha256; t=1755782976; l=898; i=thomas.weissschuh@linutronix.de; s=20240209; h=from:subject:message-id; bh=lRNEtqcrtlw74Q5TFa9XsODgun9hFWArZJOwnOWoo2E=; b=vqkNbf2HDc9MrwNYTlgNZcaXjPwKmO8nzmctb1RJqQ7MWtSVWXM+JlSG1p27AZCkXGbENtHUi pzFWlcUBNJbA9pAFtazbmHpBdCfoY1IMbm5HzMzCgTDf4tSQdjuFN7Q X-Developer-Key: i=thomas.weissschuh@linutronix.de; a=ed25519; pk=pfvxvpFUDJV2h2nY0FidLUml22uGLSjByFbM6aqQQws= Align the ordering to the one used for hrtimer_bases. Signed-off-by: Thomas Wei=C3=9Fschuh --- v2: New patch --- kernel/time/hrtimer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index fedd1d793f6cdf8923cc8a6707ff793f36b77f26..f383df28c5325919b4d22df383d= 7fb286ea05874 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -1567,10 +1567,10 @@ u64 hrtimer_next_event_without(const struct hrtimer= *exclude) static inline int hrtimer_clockid_to_base(clockid_t clock_id) { switch (clock_id) { - case CLOCK_REALTIME: - return HRTIMER_BASE_REALTIME; case CLOCK_MONOTONIC: return HRTIMER_BASE_MONOTONIC; + case CLOCK_REALTIME: + return HRTIMER_BASE_REALTIME; case CLOCK_BOOTTIME: return HRTIMER_BASE_BOOTTIME; case CLOCK_TAI: --=20 2.50.1