lkml.org 
[lkml]   [2024]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [tip: timers/urgent] timekeeping: Use READ/WRITE_ONCE() for tick_do_timer_cpu

* tip-bot2 for Thomas Gleixner <tip-bot2@linutronix.de> wrote:

> The following commit has been merged into the timers/urgent branch of tip:
>
> Commit-ID: 0200ddd723d6056d0b1c1ebde4b11e75a0f2ed7e
> Gitweb: https://git.kernel.org/tip/0200ddd723d6056d0b1c1ebde4b11e75a0f2ed7e
> Author: Thomas Gleixner <tglx@linutronix.de>
> AuthorDate: Tue, 09 Apr 2024 12:29:12 +02:00
> Committer: Thomas Gleixner <tglx@linutronix.de>
> CommitterDate: Tue, 09 Apr 2024 23:09:44 +02:00
>
> timekeeping: Use READ/WRITE_ONCE() for tick_do_timer_cpu

> @@ -232,7 +233,7 @@ static void tick_setup_device(struct tick_device *td,
> !tick_nohz_full_cpu(cpu)) {
> tick_take_do_timer_from_boot();
> tick_do_timer_boot_cpu = -1;
> - WARN_ON(tick_do_timer_cpu != cpu);
> + WARN_ON(READ_ON_ONCE(tick_do_timer_cpu) != cpu);

So there's no such thing as READ_ON_ONCE() - I've amended the commit with
the fix below.

Thanks,

Ingo


kernel/time/tick-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index a285f4deb96d..d88b13076b79 100644
--- a/kernel/time/tick-common.c
+++ b/kernel/time/tick-common.c
@@ -233,7 +233,7 @@ static void tick_setup_device(struct tick_device *td,
!tick_nohz_full_cpu(cpu)) {
tick_take_do_timer_from_boot();
tick_do_timer_boot_cpu = -1;
- WARN_ON(READ_ON_ONCE(tick_do_timer_cpu) != cpu);
+ WARN_ON(READ_ONCE(tick_do_timer_cpu) != cpu);
#endif
}

\
 
 \ /
  Last update: 2024-05-27 16:32    [W:0.094 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site