Skip to content

x86/idle: Cure RCU violations and cleanups

Thomas Gleixner lkml 1 version Applied

Status from this message: The following commit has been merged into the x86/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/6sched/idle: Conditionally handle tick broadcast in default_idle_call()include/linux/cpu.h include/linux/tick.h kernel/sched/idle.c +1 more+31 -00 replies
2/6x86/idle: Sanitize X86_BUG_AMD_E400 handlingarch/x86/Kconfig arch/x86/kernel/process.c+9 -331 reply
3/6x86/idle: Clean up idle selectionarch/x86/kernel/process.c+7 -50 replies
4/6x86/idle: Cleanup idle_setup()arch/x86/kernel/process.c+7 -170 replies
5/6x86/idle: Let prefer_mwait_c1_over_halt() return boolarch/x86/kernel/process.c+6 -60 replies
6/6x86/idle: Select idle routine only oncearch/x86/include/asm/processor.h arch/x86/kernel/cpu/common.c arch/x86/kernel/process.c+7 -92 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchBorislav Petkov (AMD)
SeriesT-b
1/6
2/6
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [patch 0/6] x86/idle: Cure RCU violations and cleanups

Boris reported that a RCU related warning triggers in the tracer code on AMD machines which are affected by Erratum 400. On those CPUs the local APIC timer stops in the C1E halt state. This is handled by a special idle function which invokes tick_broadcast_enter()/exit() around HALT. These functions can end up in lockdep or tracing which use RCU protected data, but the core code already set RCU to idle which means that the RCU protection is not longer given.

This series fixes this by handling the tick broadcast conditionally in the core idle function. While working on it I noticed a few bogosities in the related code and cleaned that up on top.

The series is also available from git:

git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git x86/core

Thanks,

tglx

---
 arch/x86/Kconfig                 |    1 
 arch/x86/include/asm/processor.h |    2 
 arch/x86/kernel/cpu/common.c     |    4 -
 arch/x86/kernel/process.c        |   89 +++++++++++----------------------------
 include/linux/cpu.h              |    2 
 include/linux/tick.h             |    3 +
 kernel/sched/idle.c              |   21 +++++++++
 kernel/time/Kconfig              |    5 ++
 8 files changed, 62 insertions(+), 65 deletions(-)