diff options
author | John Crispin <john@phrozen.org> | 2017-03-22 09:43:01 +0100 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-03-22 09:45:18 +0100 |
commit | 3a3564ead5e4cf2f6ff73302c1e680b5575079ec (patch) | |
tree | e7acdf854e6577dd56616d8e5e0def8a2e0427d3 /target/linux/ipq806x/patches-4.4/170-OPP-Allow-notifiers-to-call-dev_pm_opp_get_voltage-freq-RCU-free.patch | |
parent | ef6c4cc4ee046aa3f0bdb307c2ceea45ac2636aa (diff) | |
download | upstream-3a3564ead5e4cf2f6ff73302c1e680b5575079ec.tar.gz upstream-3a3564ead5e4cf2f6ff73302c1e680b5575079ec.tar.bz2 upstream-3a3564ead5e4cf2f6ff73302c1e680b5575079ec.zip |
ipq806x: remove v4.4 support
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ipq806x/patches-4.4/170-OPP-Allow-notifiers-to-call-dev_pm_opp_get_voltage-freq-RCU-free.patch')
-rw-r--r-- | target/linux/ipq806x/patches-4.4/170-OPP-Allow-notifiers-to-call-dev_pm_opp_get_voltage-freq-RCU-free.patch | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/target/linux/ipq806x/patches-4.4/170-OPP-Allow-notifiers-to-call-dev_pm_opp_get_voltage-freq-RCU-free.patch b/target/linux/ipq806x/patches-4.4/170-OPP-Allow-notifiers-to-call-dev_pm_opp_get_voltage-freq-RCU-free.patch deleted file mode 100644 index 7be47a3509..0000000000 --- a/target/linux/ipq806x/patches-4.4/170-OPP-Allow-notifiers-to-call-dev_pm_opp_get_voltage-freq-RCU-free.patch +++ /dev/null @@ -1,114 +0,0 @@ -From d330eae026b4a73e77ca0422f5cae5207d80f738 Mon Sep 17 00:00:00 2001 -From: Stephen Boyd <sboyd@codeaurora.org> -Date: Mon, 1 Jun 2015 18:47:57 -0700 -Subject: OPP: Allow notifiers to call dev_pm_opp_get_{voltage, freq} RCU-free - -We pass the dev_pm_opp structure to OPP notifiers but the users -of the notifier need to surround calls to dev_pm_opp_get_*() with -RCU read locks to avoid lockdep warnings. The notifier is already -called with the dev_opp's srcu lock held, so it should be safe to -assume the devm_pm_opp structure is already protected inside the -notifier. Update the lockdep check for this. - -Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com> -Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> ---- - drivers/base/power/opp/core.c | 27 +++++++++++++++------------ - 1 file changed, 15 insertions(+), 12 deletions(-) - ---- a/drivers/base/power/opp/core.c -+++ b/drivers/base/power/opp/core.c -@@ -31,9 +31,10 @@ static LIST_HEAD(dev_opp_list); - /* Lock to allow exclusive modification to the device and opp lists */ - DEFINE_MUTEX(dev_opp_list_lock); - --#define opp_rcu_lockdep_assert() \ -+#define opp_rcu_lockdep_assert(s) \ - do { \ - RCU_LOCKDEP_WARN(!rcu_read_lock_held() && \ -+ !(s && srcu_read_lock_held(s)) && \ - !lockdep_is_held(&dev_opp_list_lock), \ - "Missing rcu_read_lock() or " \ - "dev_opp_list_lock protection"); \ -@@ -91,7 +92,7 @@ struct device_opp *_find_device_opp(stru - { - struct device_opp *dev_opp; - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(NULL); - - if (IS_ERR_OR_NULL(dev)) { - pr_err("%s: Invalid parameters\n", __func__); -@@ -125,10 +126,11 @@ unsigned long dev_pm_opp_get_voltage(str - struct dev_pm_opp *tmp_opp; - unsigned long v = 0; - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(&opp->dev_opp->srcu_head.srcu); - -- tmp_opp = rcu_dereference(opp); -- if (IS_ERR_OR_NULL(tmp_opp)) -+ tmp_opp = srcu_dereference_check(opp, &opp->dev_opp->srcu_head.srcu, -+ rcu_read_lock_held()); -+ if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available) - pr_err("%s: Invalid parameters\n", __func__); - else - v = tmp_opp->u_volt; -@@ -157,9 +159,10 @@ unsigned long dev_pm_opp_get_freq(struct - struct dev_pm_opp *tmp_opp; - unsigned long f = 0; - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(&opp->dev_opp->srcu_head.srcu); - -- tmp_opp = rcu_dereference(opp); -+ tmp_opp = srcu_dereference_check(opp, &opp->dev_opp->srcu_head.srcu, -+ rcu_read_lock_held()); - if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available) - pr_err("%s: Invalid parameters\n", __func__); - else -@@ -191,7 +194,7 @@ bool dev_pm_opp_is_turbo(struct dev_pm_o - { - struct dev_pm_opp *tmp_opp; - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(&opp->dev_opp->srcu_head.srcu); - - tmp_opp = rcu_dereference(opp); - if (IS_ERR_OR_NULL(tmp_opp) || !tmp_opp->available) { -@@ -246,7 +249,7 @@ struct dev_pm_opp *dev_pm_opp_get_suspen - { - struct device_opp *dev_opp; - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(NULL); - - dev_opp = _find_device_opp(dev); - if (IS_ERR(dev_opp) || !dev_opp->suspend_opp || -@@ -326,7 +329,7 @@ struct dev_pm_opp *dev_pm_opp_find_freq_ - struct device_opp *dev_opp; - struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ERANGE); - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(NULL); - - dev_opp = _find_device_opp(dev); - if (IS_ERR(dev_opp)) { -@@ -374,7 +377,7 @@ struct dev_pm_opp *dev_pm_opp_find_freq_ - struct device_opp *dev_opp; - struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ERANGE); - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(NULL); - - if (!dev || !freq) { - dev_err(dev, "%s: Invalid argument freq=%p\n", __func__, freq); -@@ -424,7 +427,7 @@ struct dev_pm_opp *dev_pm_opp_find_freq_ - struct device_opp *dev_opp; - struct dev_pm_opp *temp_opp, *opp = ERR_PTR(-ERANGE); - -- opp_rcu_lockdep_assert(); -+ opp_rcu_lockdep_assert(NULL); - - if (!dev || !freq) { - dev_err(dev, "%s: Invalid argument freq=%p\n", __func__, freq); |