[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1233633315.16867.45.camel@pasglop>
Date: Tue, 03 Feb 2009 14:55:15 +1100
From: Benjamin Herrenschmidt <benh@...nel.crashing.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Jesse Barnes <jesse.barnes@...el.com>,
Andreas Schwab <schwab@...e.de>, Len Brown <lenb@...nel.org>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: PCI PM: Restore standard config registers of all devices early
> Note that I notice on various powerbook models a bunch of things like
>
> <some pci device> : restoring config space at offset XX (was: 0xffffffff, writin 0 ...)
>
> I'm not sure if that will do any good :-)
>
> The reason is that some devices (here sungem, ide-pmac and the firewire OHCI) -do-
> get clock gated until either you hit some of my magic pmac_feature calls in
> the driver or the driver calls pci_enable_device() (I have a hook there).
>
> So far, it appears to be harmless ... at least on the one machine I have here,
> but it shows that we are doing something wrong.
Another little nit here...
The new code will basically make the core bring back everything to D0 on
resume. That's a huge power surge and often not needed at all...
If we set aside the shared interrupt problem for a moment, why should
waking up from sleep suddenly D0 everything in my system including stuff
that might have self suspended due to not being used (wifi killswitched,
audio off, etc...) and is still not going to be used until I actually
decide to do so (aka the user)...
I suppose the drivers can then turn those things back off right away but
it's still a bit fishy...
Of course, drivers that can do that sort of dynamic power management
must already be ready to cope with interrupts coming from a shared line
while asleep...
Maybe we need some flags in the drivers telling the core "I know what
I'm doing and I'm ready to take shared interrupts after suspended, but
please don't mess with my device behind my back"... but then, even
stupid driver writers will abuse the flags ... hard.
Cheers,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists