Message ID | 20230803220202.78036-6-robdclark@gmail.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | drm/msm+PM+icc: Make job_run() reclaim-safe | expand |
diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c index 4537d93ddb45..6cb4143d1090 100644 --- a/drivers/base/power/qos.c +++ b/drivers/base/power/qos.c @@ -1010,3 +1010,14 @@ void dev_pm_qos_hide_latency_tolerance(struct device *dev) pm_runtime_put(dev); } EXPORT_SYMBOL_GPL(dev_pm_qos_hide_latency_tolerance); + +static int __init dev_pm_qos_init(void) +{ + /* Teach lockdep about lock ordering wrt. shrinker: */ + fs_reclaim_acquire(GFP_KERNEL); + might_lock(&dev_pm_qos_mtx); + fs_reclaim_release(GFP_KERNEL); + + return 0; +} +early_initcall(dev_pm_qos_init);