From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753360AbZCHRVV (ORCPT ); Sun, 8 Mar 2009 13:21:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753118AbZCHRVM (ORCPT ); Sun, 8 Mar 2009 13:21:12 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:40888 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbZCHRVM (ORCPT ); Sun, 8 Mar 2009 13:21:12 -0400 Date: Sun, 8 Mar 2009 10:20:22 -0700 (PDT) From: Linus Torvalds X-X-Sender: torvalds@localhost.localdomain To: Alan Stern cc: "Rafael J. Wysocki" , Jeremy Fitzhardinge , LKML , Jesse Barnes , Thomas Gleixner , "Eric W. Biederman" , Ingo Molnar , pm list , =?ISO-8859-15?Q?Arve__Hj=F8nnev=E5g?= Subject: Re: [linux-pm] [RFC][PATCH][1/8] PM: Rework handling of interrupts during suspend-resume (rev. 5) In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 7 Mar 2009, Alan Stern wrote: > > You didn't answer my question. Why bother to distinguish between > "wake-up" interrupts and non-"wake-up" interrupts? > > In other words, why not simply abort the suspend if IRQ_PENDING is set > for _any_ interrupt during sysdev_suspend()? .. because some drivers might not actually shut down the hardware until they get to "suspend_late"? If even then, for that matter - a driver may simply not care, knowing that the hardware will be powered off, and will be re-initialized at resume. The thinking that you have to shut your hardware down at "->suspend()" time is a _disease_. There are literally classes of hardware out there where that would be an outright _bug_, like for a PCI bridge device. For many devices, "suspend()" has to be the phase where you shut down the _external_ stuff (eg for a disk controller, it's when you'd flush and stop your disks), but the controller itself may well be alive until later. Linus