lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 19 May 2015 08:15:05 -0700 From: Tony Lindgren <tony@...mide.com> To: "Rafael J. Wysocki" <rjw@...ysocki.net> Cc: Felipe Balbi <balbi@...com>, "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>, Alan Stern <stern@...land.harvard.edu>, Andreas Fenkart <afenkart@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Huiquan Zhong <huiquan.zhong@...el.com>, Kevin Hilman <khilman@...nel.org>, NeilBrown <neilb@...e.de>, Mika Westerberg <mika.westerberg@...ux.intel.com>, Nishanth Menon <nm@...com>, Peter Hurley <peter@...leysoftware.com>, Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Ulf Hansson <ulf.hansson@...aro.org>, Thomas Gleixner <tglx@...utronix.de>, linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org, linux-omap@...r.kernel.org Subject: Re: [PATCH 2/5] PM / Wakeirq: Add automated device wake IRQ handling * Rafael J. Wysocki <rjw@...ysocki.net> [150519 06:40]: > On Monday, May 18, 2015 04:44:01 PM Tony Lindgren wrote: > > +/** > > + * handle_threaded_wake_irq - Handler for dedicated wake-up interrupts > > + * @irq: Device dedicated wake-up interrupt > > + * @_wirq: Wake IRQ data > > + * > > + * Some devices have a separate wake-up interrupt in addition to the > > + * device IO interrupt. The wake-up interrupts signal that the device > > + * should be woken up from a idle state. This handler uses device > > + * specific pm_runtime functions to wake the device and then it's > > + * up to the device to do whatever it needs to. Note as the device > > + * may need to restore context and start up regulators, we use a > > + * threaded IRQ. > > + * > > + * Also note that we are not resending the lost device interrupts. > > + * We assume that the wake-up interrupt just needs to wake-up the > > + * device, and the device pm_runtime_resume() can deal with the > > + * situation. > > + */ > > +static irqreturn_t handle_threaded_wake_irq(int irq, void *_wirq) > > +{ > > + struct wake_irq *wirq = _wirq; > > + > > + /* We don't want RPM_ASYNC or RPM_NOWAIT here */ > > + return pm_runtime_resume(wirq->dev) ? IRQ_NONE : IRQ_HANDLED; > > There are various reasons why pm_runtime_resume() may return error codes and > some of them don't mean that the interrupt was not legitimate. > > Moreover, it returns 1 if the device is already active, in which case the above > check won't do any good to us. OK yeah that check won't work then. > Why not to return IRQ_HANDLED unconditionally from here? OK Regards, Tony -- 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