Re: [PATCH] irq: provide debug_poll_all_shared_irqs() method under CONFIG_DEBUG_SHIRQ

Linus Torvalds
2009-01-16T17:31:14Z

On Fri, 16 Jan 2009, Ingo Molnar wrote:
>
> Would it be possible to have a s2ram debug/test mode that puts as much
> stuff into low-power mode as possible - except for the console.

Yeah, well.. Our own Documentation says that "no_console_suspend" is known
to work with serial consoles and VGA, but that's not actually true. It
_often_ works with those, especially if the serial line and the graphics
are basically on the southbridge (ie integrated). But we do not really
track any more complex topology.

But we could certainly do a "put everything but PCI bridge chips into D3"
mode, and then do the whole "echo core > /sys/power/pm_test" thing. Right
now I _think_ we don't actually put chips into D3 by default, because it
has caused so many problems (ie only drivers with real suspend routines
will put their chips into D3).

Of course, if the devices aren't on the power rail, they will lose power
if we do a _real_ suspend (as opposed to that pm_test thing) and then come
up in D3 anyway, so that means that we literally lack a lot of test
coverage on this.

You can try it out: right now I think we do

pci_pm_set_unknown_state(pci_dev);

And you could replace it with something like

/* Bridge chip or VGA controller? */
if (pci_dev->subordinate || dev_is_graphics(pci_dev))
pci_pm_set_unknown_state(pci_dev);
else
pci_set_power_state(PCI_D3cold);

and see what happens. I suspect a lot of machines are unhappy, and I
suspect they are unhappy exactly because of the fact that this will
suddenly show all the irq problems more.

But that, together with 'no_console_suspend', your irq injection, _and_
then using pm_test=core should probably be able to give some interesting
debug data.

I dunno. I'm handwaving. There may be other problems.

Linus