Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
PM / Runtime: Allow _put_sync() from interrupts-disabled context
PM / Domains: Fix pm_genpd_poweron()

+14 -9
+5 -5
Documentation/power/runtime_pm.txt
··· 54 54 By default, the callbacks are always invoked in process context with interrupts 55 55 enabled. However, subsystems can use the pm_runtime_irq_safe() helper function 56 56 to tell the PM core that a device's ->runtime_suspend() and ->runtime_resume() 57 - callbacks should be invoked in atomic context with interrupts disabled 58 - (->runtime_idle() is still invoked the default way). This implies that these 59 - callback routines must not block or sleep, but it also means that the 60 - synchronous helper functions listed at the end of Section 4 can be used within 61 - an interrupt handler or in an atomic context. 57 + callbacks should be invoked in atomic context with interrupts disabled. 58 + This implies that these callback routines must not block or sleep, but it also 59 + means that the synchronous helper functions listed at the end of Section 4 can 60 + be used within an interrupt handler or in an atomic context. 62 61 63 62 The subsystem-level suspend callback is _entirely_ _responsible_ for handling 64 63 the suspend of the device as appropriate, which may, but need not include ··· 482 483 pm_runtime_autosuspend() 483 484 pm_runtime_resume() 484 485 pm_runtime_get_sync() 486 + pm_runtime_put_sync() 485 487 pm_runtime_put_sync_suspend() 486 488 487 489 5. Runtime PM Initialization, Device Probing and Removal
+1 -2
drivers/base/power/domain.c
··· 80 80 int pm_genpd_poweron(struct generic_pm_domain *genpd) 81 81 { 82 82 struct generic_pm_domain *parent = genpd->parent; 83 - DEFINE_WAIT(wait); 84 83 int ret = 0; 85 84 86 85 start: ··· 111 112 } 112 113 113 114 if (genpd->power_on) { 114 - int ret = genpd->power_on(genpd); 115 + ret = genpd->power_on(genpd); 115 116 if (ret) 116 117 goto out; 117 118 }
+8 -2
drivers/base/power/runtime.c
··· 226 226 callback = NULL; 227 227 228 228 if (callback) { 229 - spin_unlock_irq(&dev->power.lock); 229 + if (dev->power.irq_safe) 230 + spin_unlock(&dev->power.lock); 231 + else 232 + spin_unlock_irq(&dev->power.lock); 230 233 231 234 callback(dev); 232 235 233 - spin_lock_irq(&dev->power.lock); 236 + if (dev->power.irq_safe) 237 + spin_lock(&dev->power.lock); 238 + else 239 + spin_lock_irq(&dev->power.lock); 234 240 } 235 241 236 242 dev->power.idle_notification = false;