lkml.org 
[lkml]   [2013]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: [PATCH 0/4] CPUFreq Fixes for 3.9
From
On 8 February 2013 01:09, Artem Savkov <artem.savkov@gmail.com> wrote:
> Tested out linux-pm.git/linux-next with this patches pulled. It seems
> that my systemd-sleep issue is fixed, however there is a new 'sleeping
> in invalid context' bug during boot:
>
> [ 12.736484] BUG: sleeping function called from invalid context at mm/slub.c:925
> [ 12.739727] in_atomic(): 1, irqs_disabled(): 1, pid: 1799, name: systemd-modules
> [ 12.742961] 2 locks held by systemd-modules/1799:
> [ 12.746153] #0: (subsys mutex#3){......}, at: [<c13f4056>] subsys_interface_register+0x36/0xb0
> [ 12.749499] #1: (cpufreq_driver_lock){......}, at: [<c14ba53b>] cpufreq_add_dev+0x22b/0x3d0
> [ 12.752865] Pid: 1799, comm: systemd-modules Not tainted 3.8.0-rc6+ #1
> [ 12.756175] Call Trace:
> [ 12.759538] [<c1068150>] __might_sleep+0xe0/0x100
> [ 12.762156] [<c112a481>] kmem_cache_alloc_trace+0xb1/0x150
> [ 12.765432] [<f804e653>] ? acpi_cpufreq_cpu_init+0x73/0x5c0 [acpi_cpufreq]
> [ 12.768780] [<f804e653>] acpi_cpufreq_cpu_init+0x73/0x5c0 [acpi_cpufreq]
> [ 12.772161] [<c14ba53b>] ? cpufreq_add_dev+0x22b/0x3d0
> [ 12.775549] [<c1695af7>] ? _raw_spin_lock_irqsave+0x77/0x90
> [ 12.778932] [<c14ba53b>] ? cpufreq_add_dev+0x22b/0x3d0
> [ 12.782307] [<c14ba548>] cpufreq_add_dev+0x238/0x3d0

Can you please try out this:

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 819aa33..a77d0bc 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -919,17 +919,14 @@ static int cpufreq_add_dev(struct device *dev,
struct subsys_interface *sif)
init_completion(&policy->kobj_unregister);
INIT_WORK(&policy->update, handle_update);

- spin_lock_irqsave(&cpufreq_driver_lock, flags);
/* call driver. From then on the cpufreq must be able
* to accept all calls to ->verify and ->setpolicy for this CPU
*/
ret = driver->init(policy);
if (ret) {
pr_debug("initialization failed\n");
- spin_unlock_irqrestore(&cpufreq_driver_lock, flags);
goto err_set_policy_cpu;
}
- spin_unlock_irqrestore(&cpufreq_driver_lock, flags);

/* related cpus should atleast have policy->cpus */
cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);

\
 
 \ /
  Last update: 2013-02-08 04:21    [W:0.175 / U:0.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site