From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847AbZDERjs (ORCPT ); Sun, 5 Apr 2009 13:39:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751550AbZDERjj (ORCPT ); Sun, 5 Apr 2009 13:39:39 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:40931 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750930AbZDERji (ORCPT ); Sun, 5 Apr 2009 13:39:38 -0400 From: "Rafael J. Wysocki" To: Ingo Molnar Subject: Re: [RFC][PATCH] PM: Warn if interrupts are enabled during suspend-resume of sysdevs Date: Sun, 5 Apr 2009 19:39:29 +0200 User-Agent: KMail/1.11.2 (Linux/2.6.29-rjw; KDE/4.2.2; x86_64; ; ) Cc: Peter Zijlstra , Len Brown , pm list , LKML References: <200904042323.19866.rjw@sisk.pl> <20090405135108.GC25250@elte.hu> In-Reply-To: <20090405135108.GC25250@elte.hu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200904051939.30170.rjw@sisk.pl> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sunday 05 April 2009, Ingo Molnar wrote: > > * Rafael J. Wysocki wrote: > > > From: Rafael J. Wysocki > > > > Sysdev have to be suspended and resumed with interrupts disabled > > and things usually break in a way that's difficult to debug if one > > of sysdev drivers enables interrupts by mistake during suspend or > > resume. Add extra checks that will generate warnings in such > > cases. > > no objections - but obviously the real solution would be to finish > PeterZ's "detect assymetric kernel functions" patch: > > That patch (Peter posted an initial version of it already on lkml) > works the following way: > > the ftrace function-graph-tracer plugin is utilized to instrument > every function call in the kernel. That is extended with the > following check: every function except __lockfunc and __sched > functions must be 'balanced' - i.e. they must enter and exit with > the same IRQ flags, preempt count and lock depth counter. Nothing wrong with that, but I'd also like to have checks that don't depend on ftrace. :-) Thanks, Rafael