From: "Rafael J. Wysocki" Subject: Re: [linux-pm] [PATCH ver. 2] PM: add synchronous runtime interface for interrupt handlers Date: Mon, 22 Nov 2010 00:45:19 +0100 Message-ID: <201011220045.20059.rjw@sisk.pl> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from ogre.sisk.pl ([217.79.144.158]:41620 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297Ab0KUXqJ (ORCPT ); Sun, 21 Nov 2010 18:46:09 -0500 In-Reply-To: Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Alan Stern Cc: Partha Basak , Linux-pm mailing list , linux-omap@vger.kernel.org On Saturday, November 20, 2010, Alan Stern wrote: > On Sat, 20 Nov 2010, Alan Stern wrote: > > > On Sat, 20 Nov 2010, Rafael J. Wysocki wrote: > > > > > On Friday, November 19, 2010, Alan Stern wrote: ... > > > > I don't think Linus will object to this. What he doesn't like is when > > some code drops a lock, reacquires it, and then behaves as though the > > lock had been held all along. That's not the case here; rpm_idle() > > does not depend on any state remaining unchanged across the callback. > > One other thing I forgot to mention... If Linus doesn't like the way > the new code drops the spinlock and then reacquires it, then he must > also not like the existing code, which does the same thing. The only > difference lies in whether or not interrupts are re-enabled. The problem I have with this change is that switching interrupts off really is a part of the locking operation, so using spin_unlock() after spin_lock_irq...() is kind of like releasing the lock partially, which I don't think is valid (even if we're going to reacquire the lock immediately). Thanks, Rafael