Re: [PATCH 2/5 v3] irq / PM: Make wakeup interrupts work with suspend-to-idle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 28 Aug 2014, Rafael J. Wysocki wrote:
> On Wednesday, August 27, 2014 10:32:23 PM Thomas Gleixner wrote:
> > void suspend_device_irqs(void)
> > {
> > 	for_each_irq_desc(irq, desc) {
> > 		/* Disable the interrupt unconditionally */	       
> > 		disable_irq(irq);
> 
> We still need to skip the IRQF_NO_SUSPEND stuff (eg. timers), so I guess
> everything left disabled here needs to be IRQS_SUSPENDED, so we know which
> ones to re-enable in resume_device_irqs().

Right. I skipped that one for simplicity. I wanted to look into the
whole maze today again with brain awake. I think it's simple to
integrate the no suspend magic here and have a separate handler for
it.

> > 
> > 		/* Is the irq a wakeup source? */
> > 		if (!irqd_is_wakeup_set(&desc->irq_data))
> > 			continue;
> > 
> > 		/* Replace the handler */
> > 		raw_spin_lock_irqsave(&desc->lock, flags);
> > 	     	desc->saved_handler = desc->handler;
> > 		desc->handler = handle_wakeup_irq;
> 
> Hmm.  There's no handler field in struct irq_desc (/me is puzzled).
> 
> Did you mean handle_irq (I think you did)?

Yup.
 
> There is quite some ugliness related to resume_irqs(), the want_early thing
> and IRQF_EARLY_RESUME / IRQF_FORCE_RESUME.  I guess that needs to be preserved?

Probably. Did not look into the madness of that yet.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux