File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,10 @@ referred to as subsystem-level callbacks in what follows.
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
@@ -483,6 +482,7 @@ pm_runtime_suspend()
483
482
pm_runtime_autosuspend()
484
483
pm_runtime_resume()
485
484
pm_runtime_get_sync()
485
+ pm_runtime_put_sync()
486
486
pm_runtime_put_sync_suspend()
487
487
488
488
5. Runtime PM Initialization, Device Probing and Removal
Original file line number Diff line number Diff line change @@ -80,7 +80,6 @@ static void genpd_set_active(struct generic_pm_domain *genpd)
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 :
@@ -112,7 +111,7 @@ int pm_genpd_poweron(struct generic_pm_domain *genpd)
112
111
}
113
112
114
113
if (genpd -> power_on ) {
115
- int ret = genpd -> power_on (genpd );
114
+ ret = genpd -> power_on (genpd );
116
115
if (ret )
117
116
goto out ;
118
117
}
Original file line number Diff line number Diff line change @@ -226,11 +226,17 @@ static int rpm_idle(struct device *dev, int rpmflags)
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;
You can’t perform that action at this time.
0 commit comments