<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cpufreq, branch v3.10.26</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/cpufreq?h=v3.10.26</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/cpufreq?h=v3.10.26'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-01-09T20:24:23Z</updated>
<entry>
<title>intel_pstate: Fail initialization if P-state information is missing</title>
<updated>2014-01-09T20:24:23Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-12-31T12:37:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ec84b71390b0433179f25364979d500453bf0468'/>
<id>urn:sha1:ec84b71390b0433179f25364979d500453bf0468</id>
<content type='text'>
commit 98a947abdd54e5de909bebadfced1696ccad30cf upstream.

If pstate.current_pstate is 0 after the initial
intel_pstate_get_cpu_pstates(), this means that we were unable to
obtain any useful P-state information and there is no reason to
continue, so free memory and return an error in that case.

This fixes the following divide error occuring in a nested KVM
guest:

Intel P-state driver initializing.
Intel pstate controlling: cpu 0
cpufreq: __cpufreq_add_dev: -&gt;get() failed
divide error: 0000 [#1] SMP
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-0.rc4.git5.1.fc21.x86_64 #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
task: ffff88001ea20000 ti: ffff88001e9bc000 task.ti: ffff88001e9bc000
RIP: 0010:[&lt;ffffffff815c551d&gt;]  [&lt;ffffffff815c551d&gt;] intel_pstate_timer_func+0x11d/0x2b0
RSP: 0000:ffff88001ee03e18  EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88001a454348 RCX: 0000000000006100
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffff88001ee03e38 R08: 0000000000000000 R09: 0000000000000000
R10: ffff88001ea20000 R11: 0000000000000000 R12: 00000c0a1ea20000
R13: 1ea200001ea20000 R14: ffffffff815c5400 R15: ffff88001a454348
FS:  0000000000000000(0000) GS:ffff88001ee00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000000 CR3: 0000000001c0c000 CR4: 00000000000006f0
Stack:
 fffffffb1a454390 ffffffff821a4500 ffff88001a454390 0000000000000100
 ffff88001ee03ea8 ffffffff81083e9a ffffffff81083e15 ffffffff82d5ed40
 ffffffff8258cc60 0000000000000000 ffffffff81ac39de 0000000000000000
Call Trace:
 &lt;IRQ&gt;
 [&lt;ffffffff81083e9a&gt;] call_timer_fn+0x8a/0x310
 [&lt;ffffffff81083e15&gt;] ? call_timer_fn+0x5/0x310
 [&lt;ffffffff815c5400&gt;] ? pid_param_set+0x130/0x130
 [&lt;ffffffff81084354&gt;] run_timer_softirq+0x234/0x380
 [&lt;ffffffff8107aee4&gt;] __do_softirq+0x104/0x430
 [&lt;ffffffff8107b5fd&gt;] irq_exit+0xcd/0xe0
 [&lt;ffffffff81770645&gt;] smp_apic_timer_interrupt+0x45/0x60
 [&lt;ffffffff8176efb2&gt;] apic_timer_interrupt+0x72/0x80
 &lt;EOI&gt;
 [&lt;ffffffff810e15cd&gt;] ? vprintk_emit+0x1dd/0x5e0
 [&lt;ffffffff81757719&gt;] printk+0x67/0x69
 [&lt;ffffffff815c1493&gt;] __cpufreq_add_dev.isra.13+0x883/0x8d0
 [&lt;ffffffff815c14f0&gt;] cpufreq_add_dev+0x10/0x20
 [&lt;ffffffff814a14d1&gt;] subsys_interface_register+0xb1/0xf0
 [&lt;ffffffff815bf5cf&gt;] cpufreq_register_driver+0x9f/0x210
 [&lt;ffffffff81fb19af&gt;] intel_pstate_init+0x27d/0x3be
 [&lt;ffffffff81761e3e&gt;] ? mutex_unlock+0xe/0x10
 [&lt;ffffffff81fb1732&gt;] ? cpufreq_gov_dbs_init+0x12/0x12
 [&lt;ffffffff8100214a&gt;] do_one_initcall+0xfa/0x1b0
 [&lt;ffffffff8109dbf5&gt;] ? parse_args+0x225/0x3f0
 [&lt;ffffffff81f64193&gt;] kernel_init_freeable+0x1fc/0x287
 [&lt;ffffffff81f638d0&gt;] ? do_early_param+0x88/0x88
 [&lt;ffffffff8174b530&gt;] ? rest_init+0x150/0x150
 [&lt;ffffffff8174b53e&gt;] kernel_init+0xe/0x130
 [&lt;ffffffff8176e27c&gt;] ret_from_fork+0x7c/0xb0
 [&lt;ffffffff8174b530&gt;] ? rest_init+0x150/0x150
Code: c1 e0 05 48 63 bc 03 10 01 00 00 48 63 83 d0 00 00 00 48 63 d6 48 c1 e2 08 c1 e1 08 4c 63 c2 48 c1 e0 08 48 98 48 c1 e0 08 48 99 &lt;49&gt; f7 f8 48 98 48 0f af f8 48 c1 ff 08 29 f9 89 ca c1 fa 1f 89
RIP  [&lt;ffffffff815c551d&gt;] intel_pstate_timer_func+0x11d/0x2b0
 RSP &lt;ffff88001ee03e18&gt;
---[ end trace f166110ed22cc37a ]---
Kernel panic - not syncing: Fatal exception in interrupt

Reported-and-tested-by: Kashyap Chamarthy &lt;kchamart@redhat.com&gt;
Cc: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: highbank-cpufreq: Enable Midway/ECX-2000</title>
<updated>2013-12-04T18:57:18Z</updated>
<author>
<name>Mark Langsdorf</name>
<email>mark.langsdorf@calxeda.com</email>
</author>
<published>2013-10-01T15:30:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16802f7ac3a42b6e97af4e9b203adfa7bbb25994'/>
<id>urn:sha1:16802f7ac3a42b6e97af4e9b203adfa7bbb25994</id>
<content type='text'>
commit fbbc5bfb44a22e7a8ef753a1c8dfb448d7ac8b85 upstream.

Calxeda's new ECX-2000 part uses the same cpufreq interface as highbank,
so add it to the driver's compatibility list.

This is a minor change that can safely be applied to the 3.10 and 3.11
stable trees.

Signed-off-by: Mark Langsdorf &lt;mark.langsdorf@calxeda.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq / intel_pstate: Fix max_perf_pct on resume</title>
<updated>2013-11-13T03:05:30Z</updated>
<author>
<name>Dirk Brandewie</name>
<email>dirk.j.brandewie@intel.com</email>
</author>
<published>2013-10-15T18:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f606b358df6e174cd57f0509e5f5299bd4a73854'/>
<id>urn:sha1:f606b358df6e174cd57f0509e5f5299bd4a73854</id>
<content type='text'>
commit 52e0a509e5d6f902ec26bc2a8bb02b137dc453be upstream.

If the system is suspended while max_perf_pct is less than 100 percent
or no_turbo set policy-&gt;{min,max} will be set incorrectly with scaled
values which turn the scaled values into hard limits.

References: https://bugzilla.kernel.org/show_bug.cgi?id=61241
Reported-by: Patrick Bartels &lt;petzicus@googlemail.com&gt;
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: rename ignore_nice as ignore_nice_load</title>
<updated>2013-08-15T05:59:06Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2013-08-05T06:58:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=da712f3a8c493986b19fd0863b45607c34061ba6'/>
<id>urn:sha1:da712f3a8c493986b19fd0863b45607c34061ba6</id>
<content type='text'>
commit 6c4640c3adfd97ce10efed7c07405f52d002b9a8 upstream.

This sysfs file was called ignore_nice_load earlier and commit
4d5dcc4 (cpufreq: governor: Implement per policy instances of
governors) changed its name to ignore_nice by mistake.

Lets get it renamed back to its original name.

Reported-by: Martin von Gagern &lt;Martin.vGagern@gmx.net&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: loongson2: fix regression related to clock management</title>
<updated>2013-08-15T05:59:06Z</updated>
<author>
<name>Aaro Koskinen</name>
<email>aaro.koskinen@iki.fi</email>
</author>
<published>2013-08-05T18:27:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4b0be00599c98bb20e0396f41f47a593e1c9d4ea'/>
<id>urn:sha1:4b0be00599c98bb20e0396f41f47a593e1c9d4ea</id>
<content type='text'>
commit f54fe64d14dff3df6d45a48115d248a82557811f upstream.

Commit 42913c799 (MIPS: Loongson2: Use clk API instead of direct
dereferences) broke the cpufreq functionality on Loongson2 boards:
clk_set_rate() is called before the CPU frequency table is
initialized, and therefore will always fail.

Fix by moving the clk_set_rate() after the table initialization.
Tested on Lemote FuLoong mini-PC.

Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: Fix cpufreq driver module refcount balance after suspend/resume</title>
<updated>2013-08-12T01:35:24Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2013-07-29T22:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e9ef4410a75bea04e5f9e30c41fba0ebfa9b7559'/>
<id>urn:sha1:e9ef4410a75bea04e5f9e30c41fba0ebfa9b7559</id>
<content type='text'>
commit 2a99859932281ed6c2ecdd988855f8f6838f6743 upstream.

Since cpufreq_cpu_put() called by __cpufreq_remove_dev() drops the
driver module refcount, __cpufreq_remove_dev() causes that refcount
to become negative for the cpufreq driver after a suspend/resume
cycle.

This is not the only bad thing that happens there, however, because
kobject_put() should only be called for the policy kobject at this
point if the CPU is not the last one for that policy.

Namely, if the given CPU is the last one for that policy, the
policy kobject's refcount should be 1 at this point, as set by
cpufreq_add_dev_interface(), and only needs to be dropped once for
the kobject to go away.  This actually happens under the cpu == 1
check, so it need not be done before by cpufreq_cpu_put().

On the other hand, if the given CPU is not the last one for that
policy, this means that cpufreq_add_policy_cpu() has been called
at least once for that policy and cpufreq_cpu_get() has been
called for it too.  To balance that cpufreq_cpu_get(), we need to
call cpufreq_cpu_put() in that case.

Thus, to fix the described problem and keep the reference
counters balanced in both cases, move the cpufreq_cpu_get() call
in __cpufreq_remove_dev() to the code path executed only for
CPUs that share the policy with other CPUs.

Reported-and-tested-by: Toralf Förster &lt;toralf.foerster@gmx.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Reviewed-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq / intel_pstate: Change to scale off of max P-state</title>
<updated>2013-08-04T08:50:51Z</updated>
<author>
<name>Dirk Brandewie</name>
<email>dirk.j.brandewie@intel.com</email>
</author>
<published>2013-07-18T15:48:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cb631ac7738411616e461ae43af9b6d4cb9d29d4'/>
<id>urn:sha1:cb631ac7738411616e461ae43af9b6d4cb9d29d4</id>
<content type='text'>
commit 2134ed4d614349b2b4e8d7bb593baa9179b8dd1e upstream.

Change to using max P-state instead of max turbo P-state.  This
change resolves two issues.

On a quiet system intel_pstate can fail to respond to a load change.

On CPU SKUs that have a limited number of P-states and no turbo range
intel_pstate fails to select the highest available P-state.

This change is suitable for stable v3.9+

References: https://bugzilla.kernel.org/show_bug.cgi?id=59481
Reported-and-tested-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Reported-and-tested-by: dsmythies@telus.net
Signed-off-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: Revert commit 2f7021a8 to fix CPU hotplug regression</title>
<updated>2013-07-25T21:07:23Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2013-07-16T20:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=916f4dbc2a827677212a3bf3ffcc22745fa6e0b1'/>
<id>urn:sha1:916f4dbc2a827677212a3bf3ffcc22745fa6e0b1</id>
<content type='text'>
commit e8d05276f236ee6435e78411f62be9714e0b9377 upstream.

commit 2f7021a8 "cpufreq: protect 'policy-&gt;cpus' from offlining
during __gov_queue_work()" caused a regression in CPU hotplug,
because it lead to a deadlock between cpufreq governor worker thread
and the CPU hotplug writer task.

Lockdep splat corresponding to this deadlock is shown below:

[   60.277396] ======================================================
[   60.277400] [ INFO: possible circular locking dependency detected ]
[   60.277407] 3.10.0-rc7-dbg-01385-g241fd04-dirty #1744 Not tainted
[   60.277411] -------------------------------------------------------
[   60.277417] bash/2225 is trying to acquire lock:
[   60.277422]  ((&amp;(&amp;j_cdbs-&gt;work)-&gt;work)){+.+...}, at: [&lt;ffffffff810621b5&gt;] flush_work+0x5/0x280
[   60.277444] but task is already holding lock:
[   60.277449]  (cpu_hotplug.lock){+.+.+.}, at: [&lt;ffffffff81042d8b&gt;] cpu_hotplug_begin+0x2b/0x60
[   60.277465] which lock already depends on the new lock.

[   60.277472] the existing dependency chain (in reverse order) is:
[   60.277477] -&gt; #2 (cpu_hotplug.lock){+.+.+.}:
[   60.277490]        [&lt;ffffffff810ac6d4&gt;] lock_acquire+0xa4/0x200
[   60.277503]        [&lt;ffffffff815b6157&gt;] mutex_lock_nested+0x67/0x410
[   60.277514]        [&lt;ffffffff81042cbc&gt;] get_online_cpus+0x3c/0x60
[   60.277522]        [&lt;ffffffff814b842a&gt;] gov_queue_work+0x2a/0xb0
[   60.277532]        [&lt;ffffffff814b7891&gt;] cs_dbs_timer+0xc1/0xe0
[   60.277543]        [&lt;ffffffff8106302d&gt;] process_one_work+0x1cd/0x6a0
[   60.277552]        [&lt;ffffffff81063d31&gt;] worker_thread+0x121/0x3a0
[   60.277560]        [&lt;ffffffff8106ae2b&gt;] kthread+0xdb/0xe0
[   60.277569]        [&lt;ffffffff815bb96c&gt;] ret_from_fork+0x7c/0xb0
[   60.277580] -&gt; #1 (&amp;j_cdbs-&gt;timer_mutex){+.+...}:
[   60.277592]        [&lt;ffffffff810ac6d4&gt;] lock_acquire+0xa4/0x200
[   60.277600]        [&lt;ffffffff815b6157&gt;] mutex_lock_nested+0x67/0x410
[   60.277608]        [&lt;ffffffff814b785d&gt;] cs_dbs_timer+0x8d/0xe0
[   60.277616]        [&lt;ffffffff8106302d&gt;] process_one_work+0x1cd/0x6a0
[   60.277624]        [&lt;ffffffff81063d31&gt;] worker_thread+0x121/0x3a0
[   60.277633]        [&lt;ffffffff8106ae2b&gt;] kthread+0xdb/0xe0
[   60.277640]        [&lt;ffffffff815bb96c&gt;] ret_from_fork+0x7c/0xb0
[   60.277649] -&gt; #0 ((&amp;(&amp;j_cdbs-&gt;work)-&gt;work)){+.+...}:
[   60.277661]        [&lt;ffffffff810ab826&gt;] __lock_acquire+0x1766/0x1d30
[   60.277669]        [&lt;ffffffff810ac6d4&gt;] lock_acquire+0xa4/0x200
[   60.277677]        [&lt;ffffffff810621ed&gt;] flush_work+0x3d/0x280
[   60.277685]        [&lt;ffffffff81062d8a&gt;] __cancel_work_timer+0x8a/0x120
[   60.277693]        [&lt;ffffffff81062e53&gt;] cancel_delayed_work_sync+0x13/0x20
[   60.277701]        [&lt;ffffffff814b89d9&gt;] cpufreq_governor_dbs+0x529/0x6f0
[   60.277709]        [&lt;ffffffff814b76a7&gt;] cs_cpufreq_governor_dbs+0x17/0x20
[   60.277719]        [&lt;ffffffff814b5df8&gt;] __cpufreq_governor+0x48/0x100
[   60.277728]        [&lt;ffffffff814b6b80&gt;] __cpufreq_remove_dev.isra.14+0x80/0x3c0
[   60.277737]        [&lt;ffffffff815adc0d&gt;] cpufreq_cpu_callback+0x38/0x4c
[   60.277747]        [&lt;ffffffff81071a4d&gt;] notifier_call_chain+0x5d/0x110
[   60.277759]        [&lt;ffffffff81071b0e&gt;] __raw_notifier_call_chain+0xe/0x10
[   60.277768]        [&lt;ffffffff815a0a68&gt;] _cpu_down+0x88/0x330
[   60.277779]        [&lt;ffffffff815a0d46&gt;] cpu_down+0x36/0x50
[   60.277788]        [&lt;ffffffff815a2748&gt;] store_online+0x98/0xd0
[   60.277796]        [&lt;ffffffff81452a28&gt;] dev_attr_store+0x18/0x30
[   60.277806]        [&lt;ffffffff811d9edb&gt;] sysfs_write_file+0xdb/0x150
[   60.277818]        [&lt;ffffffff8116806d&gt;] vfs_write+0xbd/0x1f0
[   60.277826]        [&lt;ffffffff811686fc&gt;] SyS_write+0x4c/0xa0
[   60.277834]        [&lt;ffffffff815bbbbe&gt;] tracesys+0xd0/0xd5
[   60.277842] other info that might help us debug this:

[   60.277848] Chain exists of:
  (&amp;(&amp;j_cdbs-&gt;work)-&gt;work) --&gt; &amp;j_cdbs-&gt;timer_mutex --&gt; cpu_hotplug.lock

[   60.277864]  Possible unsafe locking scenario:

[   60.277869]        CPU0                    CPU1
[   60.277873]        ----                    ----
[   60.277877]   lock(cpu_hotplug.lock);
[   60.277885]                                lock(&amp;j_cdbs-&gt;timer_mutex);
[   60.277892]                                lock(cpu_hotplug.lock);
[   60.277900]   lock((&amp;(&amp;j_cdbs-&gt;work)-&gt;work));
[   60.277907]  *** DEADLOCK ***

[   60.277915] 6 locks held by bash/2225:
[   60.277919]  #0:  (sb_writers#6){.+.+.+}, at: [&lt;ffffffff81168173&gt;] vfs_write+0x1c3/0x1f0
[   60.277937]  #1:  (&amp;buffer-&gt;mutex){+.+.+.}, at: [&lt;ffffffff811d9e3c&gt;] sysfs_write_file+0x3c/0x150
[   60.277954]  #2:  (s_active#61){.+.+.+}, at: [&lt;ffffffff811d9ec3&gt;] sysfs_write_file+0xc3/0x150
[   60.277972]  #3:  (x86_cpu_hotplug_driver_mutex){+.+...}, at: [&lt;ffffffff81024cf7&gt;] cpu_hotplug_driver_lock+0x17/0x20
[   60.277990]  #4:  (cpu_add_remove_lock){+.+.+.}, at: [&lt;ffffffff815a0d32&gt;] cpu_down+0x22/0x50
[   60.278007]  #5:  (cpu_hotplug.lock){+.+.+.}, at: [&lt;ffffffff81042d8b&gt;] cpu_hotplug_begin+0x2b/0x60
[   60.278023] stack backtrace:
[   60.278031] CPU: 3 PID: 2225 Comm: bash Not tainted 3.10.0-rc7-dbg-01385-g241fd04-dirty #1744
[   60.278037] Hardware name: Acer             Aspire 5741G    /Aspire 5741G    , BIOS V1.20 02/08/2011
[   60.278042]  ffffffff8204e110 ffff88014df6b9f8 ffffffff815b3d90 ffff88014df6ba38
[   60.278055]  ffffffff815b0a8d ffff880150ed3f60 ffff880150ed4770 3871c4002c8980b2
[   60.278068]  ffff880150ed4748 ffff880150ed4770 ffff880150ed3f60 ffff88014df6bb00
[   60.278081] Call Trace:
[   60.278091]  [&lt;ffffffff815b3d90&gt;] dump_stack+0x19/0x1b
[   60.278101]  [&lt;ffffffff815b0a8d&gt;] print_circular_bug+0x2b6/0x2c5
[   60.278111]  [&lt;ffffffff810ab826&gt;] __lock_acquire+0x1766/0x1d30
[   60.278123]  [&lt;ffffffff81067e08&gt;] ? __kernel_text_address+0x58/0x80
[   60.278134]  [&lt;ffffffff810ac6d4&gt;] lock_acquire+0xa4/0x200
[   60.278142]  [&lt;ffffffff810621b5&gt;] ? flush_work+0x5/0x280
[   60.278151]  [&lt;ffffffff810621ed&gt;] flush_work+0x3d/0x280
[   60.278159]  [&lt;ffffffff810621b5&gt;] ? flush_work+0x5/0x280
[   60.278169]  [&lt;ffffffff810a9b14&gt;] ? mark_held_locks+0x94/0x140
[   60.278178]  [&lt;ffffffff81062d77&gt;] ? __cancel_work_timer+0x77/0x120
[   60.278188]  [&lt;ffffffff810a9cbd&gt;] ? trace_hardirqs_on_caller+0xfd/0x1c0
[   60.278196]  [&lt;ffffffff81062d8a&gt;] __cancel_work_timer+0x8a/0x120
[   60.278206]  [&lt;ffffffff81062e53&gt;] cancel_delayed_work_sync+0x13/0x20
[   60.278214]  [&lt;ffffffff814b89d9&gt;] cpufreq_governor_dbs+0x529/0x6f0
[   60.278225]  [&lt;ffffffff814b76a7&gt;] cs_cpufreq_governor_dbs+0x17/0x20
[   60.278234]  [&lt;ffffffff814b5df8&gt;] __cpufreq_governor+0x48/0x100
[   60.278244]  [&lt;ffffffff814b6b80&gt;] __cpufreq_remove_dev.isra.14+0x80/0x3c0
[   60.278255]  [&lt;ffffffff815adc0d&gt;] cpufreq_cpu_callback+0x38/0x4c
[   60.278265]  [&lt;ffffffff81071a4d&gt;] notifier_call_chain+0x5d/0x110
[   60.278275]  [&lt;ffffffff81071b0e&gt;] __raw_notifier_call_chain+0xe/0x10
[   60.278284]  [&lt;ffffffff815a0a68&gt;] _cpu_down+0x88/0x330
[   60.278292]  [&lt;ffffffff81024cf7&gt;] ? cpu_hotplug_driver_lock+0x17/0x20
[   60.278302]  [&lt;ffffffff815a0d46&gt;] cpu_down+0x36/0x50
[   60.278311]  [&lt;ffffffff815a2748&gt;] store_online+0x98/0xd0
[   60.278320]  [&lt;ffffffff81452a28&gt;] dev_attr_store+0x18/0x30
[   60.278329]  [&lt;ffffffff811d9edb&gt;] sysfs_write_file+0xdb/0x150
[   60.278337]  [&lt;ffffffff8116806d&gt;] vfs_write+0xbd/0x1f0
[   60.278347]  [&lt;ffffffff81185950&gt;] ? fget_light+0x320/0x4b0
[   60.278355]  [&lt;ffffffff811686fc&gt;] SyS_write+0x4c/0xa0
[   60.278364]  [&lt;ffffffff815bbbbe&gt;] tracesys+0xd0/0xd5
[   60.280582] smpboot: CPU 1 is now offline

The intention of that commit was to avoid warnings during CPU
hotplug, which indicated that offline CPUs were getting IPIs from the
cpufreq governor's work items.  But the real root-cause of that
problem was commit a66b2e5 (cpufreq: Preserve sysfs files across
suspend/resume) because it totally skipped all the cpufreq callbacks
during CPU hotplug in the suspend/resume path, and hence it never
actually shut down the cpufreq governor's worker threads during CPU
offline in the suspend/resume path.

Reflecting back, the reason why we never suspected that commit as the
root-cause earlier, was that the original issue was reported with
just the halt command and nobody had brought in suspend/resume to the
equation.

The reason for _that_ in turn, as it turns out, is that earlier
halt/shutdown was being done by disabling non-boot CPUs while tasks
were frozen, just like suspend/resume....  but commit cf7df378a
(reboot: migrate shutdown/reboot to boot cpu) which came somewhere
along that very same time changed that logic: shutdown/halt no longer
takes CPUs offline.  Thus, the test-cases for reproducing the bug
were vastly different and thus we went totally off the trail.

Overall, it was one hell of a confusion with so many commits
affecting each other and also affecting the symptoms of the problems
in subtle ways.  Finally, now since the original problematic commit
(a66b2e5) has been completely reverted, revert this intermediate fix
too (2f7021a8), to fix the CPU hotplug deadlock.  Phew!

Reported-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Reported-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Tested-by: Peter Wu &lt;lekensteyn@gmail.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: Revert commit a66b2e to fix suspend/resume regression</title>
<updated>2013-07-25T21:07:23Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2013-07-11T22:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9d3ce4af3be0235d4cf41ea9fd774205a32e58a2'/>
<id>urn:sha1:9d3ce4af3be0235d4cf41ea9fd774205a32e58a2</id>
<content type='text'>
commit aae760ed21cd690fe8a6db9f3a177ad55d7e12ab upstream.

commit a66b2e (cpufreq: Preserve sysfs files across suspend/resume)
has unfortunately caused several things in the cpufreq subsystem to
break subtly after a suspend/resume cycle.

The intention of that patch was to retain the file permissions of the
cpufreq related sysfs files across suspend/resume.  To achieve that,
the commit completely removed the calls to cpufreq_add_dev() and
__cpufreq_remove_dev() during suspend/resume transitions.  But the
problem is that those functions do 2 kinds of things:
  1. Low-level initialization/tear-down that are critical to the
     correct functioning of cpufreq-core.
  2. Kobject and sysfs related initialization/teardown.

Ideally we should have reorganized the code to cleanly separate these
two responsibilities, and skipped only the sysfs related parts during
suspend/resume.  Since we skipped the entire callbacks instead (which
also included some CPU and cpufreq-specific critical components),
cpufreq subsystem started behaving erratically after suspend/resume.

So revert the commit to fix the regression.  We'll revisit and address
the original goal of that commit separately, since it involves quite a
bit of careful code reorganization and appears to be non-trivial.

(While reverting the commit, note that another commit f51e1eb
 (cpufreq: Fix cpufreq regression after suspend/resume) already
 reverted part of the original set of changes.  So revert only the
 remaining ones).

Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Acked-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Tested-by: Paul Bolle &lt;pebolle@tiscali.nl&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>cpufreq: Fix cpufreq regression after suspend/resume</title>
<updated>2013-07-13T18:42:27Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2013-06-30T22:40:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c02527487f0c8feb578c0394ad481a97f26d3bd2'/>
<id>urn:sha1:c02527487f0c8feb578c0394ad481a97f26d3bd2</id>
<content type='text'>
commit f51e1eb63d9c28cec188337ee656a13be6980cfd upstream.

Toralf Förster reported that the cpufreq ondemand governor behaves erratically
(doesn't scale well) after a suspend/resume cycle. The problem was that the
cpufreq subsystem's idea of the cpu frequencies differed from the actual
frequencies set in the hardware after a suspend/resume cycle. Toralf bisected
the problem to commit a66b2e5 (cpufreq: Preserve sysfs files across
suspend/resume).

Among other (harmless) things, that commit skipped the call to
cpufreq_update_policy() in the resume path. But cpufreq_update_policy() plays
an important role during resume, because it is responsible for checking if
the BIOS changed the cpu frequencies behind our back and resynchronize the
cpufreq subsystem's knowledge of the cpu frequencies, and update them
accordingly.

So, restore the call to cpufreq_update_policy() in the resume path to fix
the cpufreq regression.

Reported-and-tested-by: Toralf Förster &lt;toralf.foerster@gmx.de&gt;
Signed-off-by: Srivatsa S. Bhat &lt;srivatsa.bhat@linux.vnet.ibm.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
