Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1519465
| From | "Rafael J. Wysocki" <rafael@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs |
| Date | 2016-11-11 01:10 +0100 |
| Message-ID | <sC7zQ-5dV-19@gated-at.bofh.it> (permalink) |
| References | <sC1Xw-1gl-27@gated-at.bofh.it> <sC278-1l5-9@gated-at.bofh.it> <sC2Aa-1Ba-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Thu, Nov 10, 2016 at 7:49 PM, Brian Norris <briannorris@chromium.org> wrote: > On Thu, Nov 10, 2016 at 10:13:55AM -0800, Dmitry Torokhov wrote: >> On Thu, Nov 10, 2016 at 10:07 AM, Brian Norris <briannorris@chromium.org> wrote: >> > It's important that user space can figure out what device woke the >> > system from suspend -- e.g., for debugging, or for implementing >> > conditional wake behavior. Dedicated wakeup IRQs don't currently do >> > that. >> > >> > Let's report the event (pm_wakeup_event()) and also allow drivers to >> > synchronize with these events in their resume path (hence, disable_irq() >> > instead of disable_irq_nosync()). >> >> Hmm, dev_pm_disable_wake_irq() is called from >> rpm_suspend()/rpm_resume() that take dev->power.lock spinlock and >> disable interrupts. Dropping _nosync() feels dangerous. > > Indeed. So how do you suggest we get sane wakeup reports? Every device > or bus that's going to use the dedicated wake APIs has to > synchronize_irq() [1] in their resume() routine? Seems like an odd > implementation detail to have to remember (and therefore most drivers > will get it wrong). > > Brian > > [1] Or maybe at least create a helper API that will extract the > dedicated wake IRQ number and do the synchronize_irq() for us, so > drivers don't have to stash this separately (or poke at > dev->power.wakeirq->irq) for no good reason. Well, in the first place, can anyone please refresh my memory on why it is necessary to call dev_pm_disable_wake_irq() under power.lock? Thanks, Rafael
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Brian Norris <briannorris@chromium.org> - 2016-11-10 19:10 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-11-10 19:20 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Brian Norris <briannorris@chromium.org> - 2016-11-10 19:50 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Tony Lindgren <tony@atomide.com> - 2016-11-10 21:50 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Brian Norris <briannorris@chromium.org> - 2016-11-10 22:40 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Tony Lindgren <tony@atomide.com> - 2016-11-11 17:50 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Brian Norris <briannorris@chromium.org> - 2016-11-11 20:50 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs "Rafael J. Wysocki" <rafael@kernel.org> - 2016-11-11 01:10 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Tony Lindgren <tony@atomide.com> - 2016-11-11 17:40 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Pavel Machek <pavel@ucw.cz> - 2016-11-10 22:00 +0100
Re: [PATCH] PM / wakeirq: report wakeup events in dedicated wake-IRQs Brian Norris <briannorris@chromium.org> - 2016-11-10 22:50 +0100
csiph-web