diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/firmware_class.c | 1 | ||||
-rw-r--r-- | drivers/base/power/clock_ops.c | 4 | ||||
-rw-r--r-- | drivers/base/power/opp.c | 8 | ||||
-rw-r--r-- | drivers/cpufreq/speedstep-lib.c | 3 | ||||
-rw-r--r-- | drivers/cpufreq/speedstep-smi.c | 12 | ||||
-rw-r--r-- | drivers/devfreq/event/exynos-ppmu.c | 4 | ||||
-rw-r--r-- | drivers/idle/intel_idle.c | 1 |
7 files changed, 21 insertions, 12 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index 58470c395301..c3293f0a8573 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -855,7 +855,6 @@ fw_create_instance(struct firmware *firmware, const char *fw_name, | |||
855 | 855 | ||
856 | fw_priv = kzalloc(sizeof(*fw_priv), GFP_KERNEL); | 856 | fw_priv = kzalloc(sizeof(*fw_priv), GFP_KERNEL); |
857 | if (!fw_priv) { | 857 | if (!fw_priv) { |
858 | dev_err(device, "%s: kmalloc failed\n", __func__); | ||
859 | fw_priv = ERR_PTR(-ENOMEM); | 858 | fw_priv = ERR_PTR(-ENOMEM); |
860 | goto exit; | 859 | goto exit; |
861 | } | 860 | } |
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index d626576a4f75..7fdd0172605a 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
@@ -81,10 +81,8 @@ static int __pm_clk_add(struct device *dev, const char *con_id, | |||
81 | return -EINVAL; | 81 | return -EINVAL; |
82 | 82 | ||
83 | ce = kzalloc(sizeof(*ce), GFP_KERNEL); | 83 | ce = kzalloc(sizeof(*ce), GFP_KERNEL); |
84 | if (!ce) { | 84 | if (!ce) |
85 | dev_err(dev, "Not enough memory for clock entry.\n"); | ||
86 | return -ENOMEM; | 85 | return -ENOMEM; |
87 | } | ||
88 | 86 | ||
89 | if (con_id) { | 87 | if (con_id) { |
90 | ce->con_id = kstrdup(con_id, GFP_KERNEL); | 88 | ce->con_id = kstrdup(con_id, GFP_KERNEL); |
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp.c index 15bf29974c31..677fb2843553 100644 --- a/drivers/base/power/opp.c +++ b/drivers/base/power/opp.c | |||
@@ -474,10 +474,8 @@ static int _opp_add_dynamic(struct device *dev, unsigned long freq, | |||
474 | 474 | ||
475 | /* allocate new OPP node */ | 475 | /* allocate new OPP node */ |
476 | new_opp = kzalloc(sizeof(*new_opp), GFP_KERNEL); | 476 | new_opp = kzalloc(sizeof(*new_opp), GFP_KERNEL); |
477 | if (!new_opp) { | 477 | if (!new_opp) |
478 | dev_warn(dev, "%s: Unable to create new OPP node\n", __func__); | ||
479 | return -ENOMEM; | 478 | return -ENOMEM; |
480 | } | ||
481 | 479 | ||
482 | /* Hold our list modification lock here */ | 480 | /* Hold our list modification lock here */ |
483 | mutex_lock(&dev_opp_list_lock); | 481 | mutex_lock(&dev_opp_list_lock); |
@@ -695,10 +693,8 @@ static int _opp_set_availability(struct device *dev, unsigned long freq, | |||
695 | 693 | ||
696 | /* keep the node allocated */ | 694 | /* keep the node allocated */ |
697 | new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL); | 695 | new_opp = kmalloc(sizeof(*new_opp), GFP_KERNEL); |
698 | if (!new_opp) { | 696 | if (!new_opp) |
699 | dev_warn(dev, "%s: Unable to create OPP\n", __func__); | ||
700 | return -ENOMEM; | 697 | return -ENOMEM; |
701 | } | ||
702 | 698 | ||
703 | mutex_lock(&dev_opp_list_lock); | 699 | mutex_lock(&dev_opp_list_lock); |
704 | 700 | ||
diff --git a/drivers/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c index 7047821a7f8a..4ab7a2156672 100644 --- a/drivers/cpufreq/speedstep-lib.c +++ b/drivers/cpufreq/speedstep-lib.c | |||
@@ -400,6 +400,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
400 | 400 | ||
401 | pr_debug("previous speed is %u\n", prev_speed); | 401 | pr_debug("previous speed is %u\n", prev_speed); |
402 | 402 | ||
403 | preempt_disable(); | ||
403 | local_irq_save(flags); | 404 | local_irq_save(flags); |
404 | 405 | ||
405 | /* switch to low state */ | 406 | /* switch to low state */ |
@@ -464,6 +465,8 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
464 | 465 | ||
465 | out: | 466 | out: |
466 | local_irq_restore(flags); | 467 | local_irq_restore(flags); |
468 | preempt_enable(); | ||
469 | |||
467 | return ret; | 470 | return ret; |
468 | } | 471 | } |
469 | EXPORT_SYMBOL_GPL(speedstep_get_freqs); | 472 | EXPORT_SYMBOL_GPL(speedstep_get_freqs); |
diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c index 5fc96d5d656b..819229e824fb 100644 --- a/drivers/cpufreq/speedstep-smi.c +++ b/drivers/cpufreq/speedstep-smi.c | |||
@@ -156,6 +156,7 @@ static void speedstep_set_state(unsigned int state) | |||
156 | return; | 156 | return; |
157 | 157 | ||
158 | /* Disable IRQs */ | 158 | /* Disable IRQs */ |
159 | preempt_disable(); | ||
159 | local_irq_save(flags); | 160 | local_irq_save(flags); |
160 | 161 | ||
161 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); | 162 | command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff); |
@@ -166,9 +167,19 @@ static void speedstep_set_state(unsigned int state) | |||
166 | 167 | ||
167 | do { | 168 | do { |
168 | if (retry) { | 169 | if (retry) { |
170 | /* | ||
171 | * We need to enable interrupts, otherwise the blockage | ||
172 | * won't resolve. | ||
173 | * | ||
174 | * We disable preemption so that other processes don't | ||
175 | * run. If other processes were running, they could | ||
176 | * submit more DMA requests, making the blockage worse. | ||
177 | */ | ||
169 | pr_debug("retry %u, previous result %u, waiting...\n", | 178 | pr_debug("retry %u, previous result %u, waiting...\n", |
170 | retry, result); | 179 | retry, result); |
180 | local_irq_enable(); | ||
171 | mdelay(retry * 50); | 181 | mdelay(retry * 50); |
182 | local_irq_disable(); | ||
172 | } | 183 | } |
173 | retry++; | 184 | retry++; |
174 | __asm__ __volatile__( | 185 | __asm__ __volatile__( |
@@ -185,6 +196,7 @@ static void speedstep_set_state(unsigned int state) | |||
185 | 196 | ||
186 | /* enable IRQs */ | 197 | /* enable IRQs */ |
187 | local_irq_restore(flags); | 198 | local_irq_restore(flags); |
199 | preempt_enable(); | ||
188 | 200 | ||
189 | if (new_state == state) | 201 | if (new_state == state) |
190 | pr_debug("change to %u MHz succeeded after %u tries " | 202 | pr_debug("change to %u MHz succeeded after %u tries " |
diff --git a/drivers/devfreq/event/exynos-ppmu.c b/drivers/devfreq/event/exynos-ppmu.c index 135be0aada9d..ad8347385f53 100644 --- a/drivers/devfreq/event/exynos-ppmu.c +++ b/drivers/devfreq/event/exynos-ppmu.c | |||
@@ -327,8 +327,8 @@ static int exynos_ppmu_probe(struct platform_device *pdev) | |||
327 | 327 | ||
328 | for (i = 0; i < info->num_events; i++) { | 328 | for (i = 0; i < info->num_events; i++) { |
329 | edev[i] = devm_devfreq_event_add_edev(&pdev->dev, &desc[i]); | 329 | edev[i] = devm_devfreq_event_add_edev(&pdev->dev, &desc[i]); |
330 | if (IS_ERR(edev)) { | 330 | if (IS_ERR(edev[i])) { |
331 | ret = PTR_ERR(edev); | 331 | ret = PTR_ERR(edev[i]); |
332 | dev_err(&pdev->dev, | 332 | dev_err(&pdev->dev, |
333 | "failed to add devfreq-event device\n"); | 333 | "failed to add devfreq-event device\n"); |
334 | goto err; | 334 | goto err; |
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index 9cceacb92f9d..1bc0c170f12a 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c | |||
@@ -727,6 +727,7 @@ static const struct x86_cpu_id intel_idle_ids[] = { | |||
727 | ICPU(0x46, idle_cpu_hsw), | 727 | ICPU(0x46, idle_cpu_hsw), |
728 | ICPU(0x4d, idle_cpu_avn), | 728 | ICPU(0x4d, idle_cpu_avn), |
729 | ICPU(0x3d, idle_cpu_bdw), | 729 | ICPU(0x3d, idle_cpu_bdw), |
730 | ICPU(0x47, idle_cpu_bdw), | ||
730 | ICPU(0x4f, idle_cpu_bdw), | 731 | ICPU(0x4f, idle_cpu_bdw), |
731 | ICPU(0x56, idle_cpu_bdw), | 732 | ICPU(0x56, idle_cpu_bdw), |
732 | {} | 733 | {} |