From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752815AbdEPSwd (ORCPT ); Tue, 16 May 2017 14:52:33 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:41216 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750784AbdEPSwc (ORCPT ); Tue, 16 May 2017 14:52:32 -0400 Message-Id: <20170516184231.564888231@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 16 May 2017 20:42:31 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Ingo Molnar , Steven Rostedt , Mark Rutland , Greg Kroah-Hartman Subject: [patch V2 00/17] init: Enable might_sleep() and smp_processor_id() debugging early Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 might_sleep(). 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 Thanks, tglx