Re: [RFC][PATCH 2/2] PM: Rework handling of interrupts during suspend-resume

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

 



On Thursday 26 February 2009, Linus Torvalds wrote:
> 
> On Thu, 26 Feb 2009, Rafael J. Wysocki wrote:
> > 
> > Well, how exactly the $subject patch does cause this problem to happen?
> 
> Rafael, the problem is that if an interrupt happens while it's disabled - 
> but before the CPU has actually turned all interrupts off - the CPU will 
> ACK the interrupt (but just set a flag for it being PENDING), so now the 
> chipset logic around it will not see it as pending any more, so now the 
> chipset won't auto-wake the CPU immediately (or more likely, it won't 
> even suspend it).

Ah, I see now, thanks.

> It's trivial to fix multiple ways, so I wouldn't worry. The most trivial 
> way is to just have some sysdev drievr code simply do something like
> 
>   static int sysdev_suspend()
>   {
> 	for_each_irq(irq,desc) {
> 		if (!(desc->flags & IRQF_WAKE))
> 			continue;
> 		if (desc->flags & IRQ_PENDING)
> 			return -EBUSY;
> 	}
> 	return 0;
>   }
> 
> and that should automatically mean that if any irq is pending, the suspend 
> will fail and we'll immediately wake up again.

Yeah.

Thanks,
Rafael
_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux