On Fri, 2007-10-19 at 19:25 -0700, Linus Torvalds wrote:His suspend routine wrote to the IRQ mask (or equivalent) register in his code example, thus the HW should shut up eventually, thus that isn't strictly necessary, the IRQ in that case is just a "short interrupt" (noticed by the PIC and delivered but possibly not asserted anymore at this stage or about to go down). We have many scenario generating such short interrupts (pretty much any time we use interrupt disable/enable on the chip, for example it's common with NAPI). This is one of the reasons why we used to have a "timebomb" causing an IRQ to erroneously get disabled by the IRQ core assuming the IRQ was stuck, just because we accumulated too many short interrupts on that line. A recent patch by Alan fixed that to use some more sensible algorithm checking the time since the last spurrious interrupt, though I suspect he's being too optimistic on his timeout value and some scenario, such as NAPI with just the wrong packet rate, can still trigger the bug. I need to find a piece of HW slow enough in de-asserting the IRQ to try to make a repro-case one of these days. And you forgot that he still needs synchronize_irq(), or his IRQ handler might well be in the middle of doing something on another CPU, past the point where it tested "insuspend", which will do no good when a simultaneous pci_set_power_state() puts the chip into D3. On some machines, this will machine check. Either that or he needs a spinlock in his IRQ handler that he also takes around the code that sets insuspend. Yes, this is a easier way to deal with devices that are on a directly mapped bus (path to them isn't gone by the time you hit suspend_late) and don't need to do fancy things involing waiting for a queue to drain using interrupts etc... (at one stage of HW complexity, having to re-implement polled versions of everything is just not worth the benefit). In general, suspend_late should cover the need of most PCI devices I suppose. Ben. -
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Linus Torvalds | Linux 2.6.21-rc1 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| pageexec | Re: [stable] Linux 2.6.25.10 |
| Linus Torvalds | Re: [GIT]: Networking |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Natalie Protasevich | [BUG] New Kernel Bugs |
| Jarek Poplawski | [PATCH take 2] pkt_sched: Protect gen estimators under est_lock. |
git: | |
