[patch V2 00/17] init: Enable might_sleep() and smp_processor_id() debugging early

From: Thomas Gleixner
Date: Tue May 16 2017 - 14:52:37 EST

We recentlty discovered a call path which takes a mutex from the low level
secondary CPU bringup code and wondered why this was not caught by

The reason is that both debug facilities depend on system_state ==
SYSTEM_RUNNING, which is set after init memory is freed.

That means that SMP bootup and builtin driver initialization are not
covered by these checks at all.

The patch series addresses this by adding an intermediate state which
enables both debug features right when scheduling starts, i.e. the boot CPU
idle task schedules the first time.

Changes since V1:
- Use only one new state
- Enable both debug facilities right before scheduling starts
- Add more commentry about state ordering and placement of the
state switch
- CC ACPI folks on the relevant patch and amend changelog.
- Collected acks/reviewed-by's