From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757095AbZCBXea (ORCPT ); Mon, 2 Mar 2009 18:34:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753898AbZCBXeW (ORCPT ); Mon, 2 Mar 2009 18:34:22 -0500 Received: from smtp1.linux-foundation.org ([140.211.169.13]:46656 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbZCBXeV (ORCPT ); Mon, 2 Mar 2009 18:34:21 -0500 Date: Mon, 2 Mar 2009 15:32:52 -0800 (PST) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: =?ISO-8859-15?Q?Arve_Hj=F8nnev=E5g?= cc: "Rafael J. Wysocki" , LKML , Ingo Molnar , "Eric W. Biederman" , Benjamin Herrenschmidt , Jeremy Fitzhardinge , pm list , Len Brown , Jesse Barnes , Thomas Gleixner , Alan Stern , Johannes Berg Subject: Re: [RFC][PATCH 1/4] PM: Rework handling of interrupts during suspend-resume (rev. 4) In-Reply-To: Message-ID: References: <200902221837.49396.rjw@sisk.pl> <200903012324.39327.rjw@sisk.pl> <200903030013.02805.rjw@sisk.pl> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2 Mar 2009, Arve Hjønnevåg wrote: > > > enable_irq() clears IRQ_SUSPENDED.  This has already been discussed btw. > > I'm if I missed that discussion, but enable_irq cannot know who is > calling it and therefore cannot know if IRQ_SUSPENDED should be > cleared. Sure it can. If IRQ_SUSPENDED is not set, then clearing it is a no-op, so that's fine. If IRQ_SUSPENDED _is_ set, then that means that we're after the suspend_late() sequence and before the resume_early() sequence, and no device driver is possibly called in between, so they'd sure better not be doing anything that does an enable_irq(). IOW, we know who the caller is, simply because there can be no other valid caller! Linus From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Torvalds Subject: Re: [RFC][PATCH 1/4] PM: Rework handling of interrupts during suspend-resume (rev. 4) Date: Mon, 2 Mar 2009 15:32:52 -0800 (PST) Message-ID: References: <200902221837.49396.rjw@sisk.pl> <200903012324.39327.rjw@sisk.pl> <200903030013.02805.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: =?ISO-8859-15?Q?Arve_Hj=F8nnev=E5g?= Cc: Jeremy Fitzhardinge , LKML , Jesse Barnes , Johannes Berg , Thomas Gleixner , "Eric W. Biederman" , Ingo Molnar , pm list List-Id: linux-pm@vger.kernel.org On Mon, 2 Mar 2009, Arve Hj=F8nnev=E5g wrote: > > > enable_irq() clears IRQ_SUSPENDED. =A0This has already been discussed b= tw. > = > I'm if I missed that discussion, but enable_irq cannot know who is > calling it and therefore cannot know if IRQ_SUSPENDED should be > cleared. Sure it can. = If IRQ_SUSPENDED is not set, then clearing it is a no-op, so that's fine. If IRQ_SUSPENDED _is_ set, then that means that we're after the = suspend_late() sequence and before the resume_early() sequence, and no = device driver is possibly called in between, so they'd sure better not be = doing anything that does an enable_irq(). IOW, we know who the caller is, simply because there can be no other valid = caller! Linus