diff options
author | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:51:02 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:51:02 -0500 |
commit | b28bc9b38c52f63f43e3fd875af982f2240a2859 (patch) | |
tree | 76cdb7b52b58f5685993cc15ed81d1c903023358 /drivers/cpufreq | |
parent | 8d30726912cb39c3a3ebde06214d54861f8fdde2 (diff) | |
parent | 802eee95bde72fd0cd0f3a5b2098375a487d1eda (diff) |
Merge tag 'v3.13-rc6' into for-3.14/core
Needed to bring blk-mq uptodate, since changes have been going in
since for-3.14/core was established.
Fixup merge issues related to the immutable biovec changes.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Conflicts:
block/blk-flush.c
fs/btrfs/check-integrity.c
fs/btrfs/extent_io.c
fs/btrfs/scrub.c
fs/logfs/dev_bdev.c
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/at32ap-cpufreq.c | 2 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 69 | ||||
-rw-r--r-- | drivers/cpufreq/exynos4210-cpufreq.c | 1 | ||||
-rw-r--r-- | drivers/cpufreq/exynos4x12-cpufreq.c | 1 | ||||
-rw-r--r-- | drivers/cpufreq/exynos5250-cpufreq.c | 1 | ||||
-rw-r--r-- | drivers/cpufreq/tegra-cpufreq.c | 4 |
6 files changed, 39 insertions, 39 deletions
diff --git a/drivers/cpufreq/at32ap-cpufreq.c b/drivers/cpufreq/at32ap-cpufreq.c index 856ad80418ae..7c03dd84f66a 100644 --- a/drivers/cpufreq/at32ap-cpufreq.c +++ b/drivers/cpufreq/at32ap-cpufreq.c | |||
@@ -58,7 +58,7 @@ static int at32_set_target(struct cpufreq_policy *policy, unsigned int index) | |||
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
61 | static int __init at32_cpufreq_driver_init(struct cpufreq_policy *policy) | 61 | static int at32_cpufreq_driver_init(struct cpufreq_policy *policy) |
62 | { | 62 | { |
63 | unsigned int frequency, rate, min_freq; | 63 | unsigned int frequency, rate, min_freq; |
64 | int retval, steps, i; | 64 | int retval, steps, i; |
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 02d534da22dd..16d7b4ac94be 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -828,6 +828,12 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy) | |||
828 | int ret = 0; | 828 | int ret = 0; |
829 | 829 | ||
830 | memcpy(&new_policy, policy, sizeof(*policy)); | 830 | memcpy(&new_policy, policy, sizeof(*policy)); |
831 | |||
832 | /* Use the default policy if its valid. */ | ||
833 | if (cpufreq_driver->setpolicy) | ||
834 | cpufreq_parse_governor(policy->governor->name, | ||
835 | &new_policy.policy, NULL); | ||
836 | |||
831 | /* assure that the starting sequence is run in cpufreq_set_policy */ | 837 | /* assure that the starting sequence is run in cpufreq_set_policy */ |
832 | policy->governor = NULL; | 838 | policy->governor = NULL; |
833 | 839 | ||
@@ -845,8 +851,7 @@ static void cpufreq_init_policy(struct cpufreq_policy *policy) | |||
845 | 851 | ||
846 | #ifdef CONFIG_HOTPLUG_CPU | 852 | #ifdef CONFIG_HOTPLUG_CPU |
847 | static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, | 853 | static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, |
848 | unsigned int cpu, struct device *dev, | 854 | unsigned int cpu, struct device *dev) |
849 | bool frozen) | ||
850 | { | 855 | { |
851 | int ret = 0; | 856 | int ret = 0; |
852 | unsigned long flags; | 857 | unsigned long flags; |
@@ -877,11 +882,7 @@ static int cpufreq_add_policy_cpu(struct cpufreq_policy *policy, | |||
877 | } | 882 | } |
878 | } | 883 | } |
879 | 884 | ||
880 | /* Don't touch sysfs links during light-weight init */ | 885 | return sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq"); |
881 | if (!frozen) | ||
882 | ret = sysfs_create_link(&dev->kobj, &policy->kobj, "cpufreq"); | ||
883 | |||
884 | return ret; | ||
885 | } | 886 | } |
886 | #endif | 887 | #endif |
887 | 888 | ||
@@ -926,6 +927,27 @@ err_free_policy: | |||
926 | return NULL; | 927 | return NULL; |
927 | } | 928 | } |
928 | 929 | ||
930 | static void cpufreq_policy_put_kobj(struct cpufreq_policy *policy) | ||
931 | { | ||
932 | struct kobject *kobj; | ||
933 | struct completion *cmp; | ||
934 | |||
935 | down_read(&policy->rwsem); | ||
936 | kobj = &policy->kobj; | ||
937 | cmp = &policy->kobj_unregister; | ||
938 | up_read(&policy->rwsem); | ||
939 | kobject_put(kobj); | ||
940 | |||
941 | /* | ||
942 | * We need to make sure that the underlying kobj is | ||
943 | * actually not referenced anymore by anybody before we | ||
944 | * proceed with unloading. | ||
945 | */ | ||
946 | pr_debug("waiting for dropping of refcount\n"); | ||
947 | wait_for_completion(cmp); | ||
948 | pr_debug("wait complete\n"); | ||
949 | } | ||
950 | |||
929 | static void cpufreq_policy_free(struct cpufreq_policy *policy) | 951 | static void cpufreq_policy_free(struct cpufreq_policy *policy) |
930 | { | 952 | { |
931 | free_cpumask_var(policy->related_cpus); | 953 | free_cpumask_var(policy->related_cpus); |
@@ -986,7 +1008,7 @@ static int __cpufreq_add_dev(struct device *dev, struct subsys_interface *sif, | |||
986 | list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) { | 1008 | list_for_each_entry(tpolicy, &cpufreq_policy_list, policy_list) { |
987 | if (cpumask_test_cpu(cpu, tpolicy->related_cpus)) { | 1009 | if (cpumask_test_cpu(cpu, tpolicy->related_cpus)) { |
988 | read_unlock_irqrestore(&cpufreq_driver_lock, flags); | 1010 | read_unlock_irqrestore(&cpufreq_driver_lock, flags); |
989 | ret = cpufreq_add_policy_cpu(tpolicy, cpu, dev, frozen); | 1011 | ret = cpufreq_add_policy_cpu(tpolicy, cpu, dev); |
990 | up_read(&cpufreq_rwsem); | 1012 | up_read(&cpufreq_rwsem); |
991 | return ret; | 1013 | return ret; |
992 | } | 1014 | } |
@@ -1096,7 +1118,10 @@ err_get_freq: | |||
1096 | if (cpufreq_driver->exit) | 1118 | if (cpufreq_driver->exit) |
1097 | cpufreq_driver->exit(policy); | 1119 | cpufreq_driver->exit(policy); |
1098 | err_set_policy_cpu: | 1120 | err_set_policy_cpu: |
1121 | if (frozen) | ||
1122 | cpufreq_policy_put_kobj(policy); | ||
1099 | cpufreq_policy_free(policy); | 1123 | cpufreq_policy_free(policy); |
1124 | |||
1100 | nomem_out: | 1125 | nomem_out: |
1101 | up_read(&cpufreq_rwsem); | 1126 | up_read(&cpufreq_rwsem); |
1102 | 1127 | ||
@@ -1118,7 +1143,7 @@ static int cpufreq_add_dev(struct device *dev, struct subsys_interface *sif) | |||
1118 | } | 1143 | } |
1119 | 1144 | ||
1120 | static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy, | 1145 | static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy, |
1121 | unsigned int old_cpu, bool frozen) | 1146 | unsigned int old_cpu) |
1122 | { | 1147 | { |
1123 | struct device *cpu_dev; | 1148 | struct device *cpu_dev; |
1124 | int ret; | 1149 | int ret; |
@@ -1126,10 +1151,6 @@ static int cpufreq_nominate_new_policy_cpu(struct cpufreq_policy *policy, | |||
1126 | /* first sibling now owns the new sysfs dir */ | 1151 | /* first sibling now owns the new sysfs dir */ |
1127 | cpu_dev = get_cpu_device(cpumask_any_but(policy->cpus, old_cpu)); | 1152 | cpu_dev = get_cpu_device(cpumask_any_but(policy->cpus, old_cpu)); |
1128 | 1153 | ||
1129 | /* Don't touch sysfs files during light-weight tear-down */ | ||
1130 | if (frozen) | ||
1131 | return cpu_dev->id; | ||
1132 | |||
1133 | sysfs_remove_link(&cpu_dev->kobj, "cpufreq"); | 1154 | sysfs_remove_link(&cpu_dev->kobj, "cpufreq"); |
1134 | ret = kobject_move(&policy->kobj, &cpu_dev->kobj); | 1155 | ret = kobject_move(&policy->kobj, &cpu_dev->kobj); |
1135 | if (ret) { | 1156 | if (ret) { |
@@ -1196,7 +1217,7 @@ static int __cpufreq_remove_dev_prepare(struct device *dev, | |||
1196 | if (!frozen) | 1217 | if (!frozen) |
1197 | sysfs_remove_link(&dev->kobj, "cpufreq"); | 1218 | sysfs_remove_link(&dev->kobj, "cpufreq"); |
1198 | } else if (cpus > 1) { | 1219 | } else if (cpus > 1) { |
1199 | new_cpu = cpufreq_nominate_new_policy_cpu(policy, cpu, frozen); | 1220 | new_cpu = cpufreq_nominate_new_policy_cpu(policy, cpu); |
1200 | if (new_cpu >= 0) { | 1221 | if (new_cpu >= 0) { |
1201 | update_policy_cpu(policy, new_cpu); | 1222 | update_policy_cpu(policy, new_cpu); |
1202 | 1223 | ||
@@ -1218,8 +1239,6 @@ static int __cpufreq_remove_dev_finish(struct device *dev, | |||
1218 | int ret; | 1239 | int ret; |
1219 | unsigned long flags; | 1240 | unsigned long flags; |
1220 | struct cpufreq_policy *policy; | 1241 | struct cpufreq_policy *policy; |
1221 | struct kobject *kobj; | ||
1222 | struct completion *cmp; | ||
1223 | 1242 | ||
1224 | read_lock_irqsave(&cpufreq_driver_lock, flags); | 1243 | read_lock_irqsave(&cpufreq_driver_lock, flags); |
1225 | policy = per_cpu(cpufreq_cpu_data, cpu); | 1244 | policy = per_cpu(cpufreq_cpu_data, cpu); |
@@ -1249,22 +1268,8 @@ static int __cpufreq_remove_dev_finish(struct device *dev, | |||
1249 | } | 1268 | } |
1250 | } | 1269 | } |
1251 | 1270 | ||
1252 | if (!frozen) { | 1271 | if (!frozen) |
1253 | down_read(&policy->rwsem); | 1272 | cpufreq_policy_put_kobj(policy); |
1254 | kobj = &policy->kobj; | ||
1255 | cmp = &policy->kobj_unregister; | ||
1256 | up_read(&policy->rwsem); | ||
1257 | kobject_put(kobj); | ||
1258 | |||
1259 | /* | ||
1260 | * We need to make sure that the underlying kobj is | ||
1261 | * actually not referenced anymore by anybody before we | ||
1262 | * proceed with unloading. | ||
1263 | */ | ||
1264 | pr_debug("waiting for dropping of refcount\n"); | ||
1265 | wait_for_completion(cmp); | ||
1266 | pr_debug("wait complete\n"); | ||
1267 | } | ||
1268 | 1273 | ||
1269 | /* | 1274 | /* |
1270 | * Perform the ->exit() even during light-weight tear-down, | 1275 | * Perform the ->exit() even during light-weight tear-down, |
diff --git a/drivers/cpufreq/exynos4210-cpufreq.c b/drivers/cpufreq/exynos4210-cpufreq.c index f2c75065ce19..dfd1643b0b2f 100644 --- a/drivers/cpufreq/exynos4210-cpufreq.c +++ b/drivers/cpufreq/exynos4210-cpufreq.c | |||
@@ -157,4 +157,3 @@ err_moutcore: | |||
157 | pr_debug("%s: failed initialization\n", __func__); | 157 | pr_debug("%s: failed initialization\n", __func__); |
158 | return -EINVAL; | 158 | return -EINVAL; |
159 | } | 159 | } |
160 | EXPORT_SYMBOL(exynos4210_cpufreq_init); | ||
diff --git a/drivers/cpufreq/exynos4x12-cpufreq.c b/drivers/cpufreq/exynos4x12-cpufreq.c index 8683304ce62c..efad5e657f6f 100644 --- a/drivers/cpufreq/exynos4x12-cpufreq.c +++ b/drivers/cpufreq/exynos4x12-cpufreq.c | |||
@@ -211,4 +211,3 @@ err_moutcore: | |||
211 | pr_debug("%s: failed initialization\n", __func__); | 211 | pr_debug("%s: failed initialization\n", __func__); |
212 | return -EINVAL; | 212 | return -EINVAL; |
213 | } | 213 | } |
214 | EXPORT_SYMBOL(exynos4x12_cpufreq_init); | ||
diff --git a/drivers/cpufreq/exynos5250-cpufreq.c b/drivers/cpufreq/exynos5250-cpufreq.c index 9fae466d7746..8feda86fe42c 100644 --- a/drivers/cpufreq/exynos5250-cpufreq.c +++ b/drivers/cpufreq/exynos5250-cpufreq.c | |||
@@ -236,4 +236,3 @@ err_moutcore: | |||
236 | pr_err("%s: failed initialization\n", __func__); | 236 | pr_err("%s: failed initialization\n", __func__); |
237 | return -EINVAL; | 237 | return -EINVAL; |
238 | } | 238 | } |
239 | EXPORT_SYMBOL(exynos5250_cpufreq_init); | ||
diff --git a/drivers/cpufreq/tegra-cpufreq.c b/drivers/cpufreq/tegra-cpufreq.c index f42df7ec03c5..b7309c37033d 100644 --- a/drivers/cpufreq/tegra-cpufreq.c +++ b/drivers/cpufreq/tegra-cpufreq.c | |||
@@ -142,10 +142,8 @@ static int tegra_target(struct cpufreq_policy *policy, unsigned int index) | |||
142 | 142 | ||
143 | mutex_lock(&tegra_cpu_lock); | 143 | mutex_lock(&tegra_cpu_lock); |
144 | 144 | ||
145 | if (is_suspended) { | 145 | if (is_suspended) |
146 | ret = -EBUSY; | ||
147 | goto out; | 146 | goto out; |
148 | } | ||
149 | 147 | ||
150 | freq = freq_table[index].frequency; | 148 | freq = freq_table[index].frequency; |
151 | 149 | ||