Commit ca589ea8 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Vasily Gorbik

s390/idle: fix suspicious RCU usage

After commit eb1f0023 ("lockdep,trace: Expose tracepoints") the
lock tracepoints are visible to lockdep and RCU-lockdep is finding a
bunch more RCU violations that were previously hidden.

Switch the idle->seqcount over to using raw_write_*() to avoid the
lockdep annotation and thus the lock tracepoints.
Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 856deb86
...@@ -39,14 +39,13 @@ void enabled_wait(void) ...@@ -39,14 +39,13 @@ void enabled_wait(void)
local_irq_restore(flags); local_irq_restore(flags);
/* Account time spent with enabled wait psw loaded as idle time. */ /* Account time spent with enabled wait psw loaded as idle time. */
/* XXX seqcount has tracepoints that require RCU */ raw_write_seqcount_begin(&idle->seqcount);
write_seqcount_begin(&idle->seqcount);
idle_time = idle->clock_idle_exit - idle->clock_idle_enter; idle_time = idle->clock_idle_exit - idle->clock_idle_enter;
idle->clock_idle_enter = idle->clock_idle_exit = 0ULL; idle->clock_idle_enter = idle->clock_idle_exit = 0ULL;
idle->idle_time += idle_time; idle->idle_time += idle_time;
idle->idle_count++; idle->idle_count++;
account_idle_time(cputime_to_nsecs(idle_time)); account_idle_time(cputime_to_nsecs(idle_time));
write_seqcount_end(&idle->seqcount); raw_write_seqcount_end(&idle->seqcount);
} }
NOKPROBE_SYMBOL(enabled_wait); NOKPROBE_SYMBOL(enabled_wait);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment