<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/cpufreq, branch v2.6.32.46</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/cpufreq?h=v2.6.32.46</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/cpufreq?h=v2.6.32.46'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-06-23T22:24:07Z</updated>
<entry>
<title>CPUFREQ: Remove cpufreq_stats sysfs entries on module unload.</title>
<updated>2011-06-23T22:24:07Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2011-06-12T20:35:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=21dfd57873ccc7e4ff42d3dbc281cafe03dfb4a4'/>
<id>urn:sha1:21dfd57873ccc7e4ff42d3dbc281cafe03dfb4a4</id>
<content type='text'>
commit 13f067537f34456443f61c950cd6dc37d1d5f3ee upstream.

cpufreq_stats leaves behind its sysfs entries, which causes a panic
when something stumbled across them.
(Discovered by unloading cpufreq_stats while powertop was loaded).

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Fix memory leak in cpufreq_stat</title>
<updated>2011-06-23T22:24:00Z</updated>
<author>
<name>steven finney</name>
<email>Steven.Finney@palm.com</email>
</author>
<published>2011-05-02T18:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=301808c57ed6c7b429aaad2819d1778a91144d62'/>
<id>urn:sha1:301808c57ed6c7b429aaad2819d1778a91144d62</id>
<content type='text'>
commit 98586ed8b8878e10691203687e89a42fa3355300 upstream.

When a CPU is taken offline in an SMP system, cpufreq_remove_dev()
nulls out the per-cpu policy before cpufreq_stats_free_table() can
make use of it.  cpufreq_stats_free_table() then skips the
call to sysfs_remove_group(), leaving about 100 bytes of sysfs-related
memory unclaimed each time a CPU-removal occurs. Break up
cpu_stats_free_table into sysfs and table portions, and
call the sysfs portion early.

Signed-off-by: Steven Finney &lt;steven.finney@palm.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>CPU hotplug, re-create sysfs directory and symlinks</title>
<updated>2011-06-23T22:24:00Z</updated>
<author>
<name>Jacob Shin</name>
<email>jacob.shin@amd.com</email>
</author>
<published>2011-04-27T18:32:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c6d087337f7ab5624f8322a4001d8ec81b589a4'/>
<id>urn:sha1:1c6d087337f7ab5624f8322a4001d8ec81b589a4</id>
<content type='text'>
commit 27ecddc2a9f99ce4ac9a59a0acd77f7100b6d034 upstream.

When we discover CPUs that are affected by each other's
frequency/voltage transitions, the first CPU gets a sysfs directory
created, and rest of the siblings get symlinks. Currently, when we
hotplug off only the first CPU, all of the symlinks and the sysfs
directory gets removed. Even though rest of the siblings are still
online and functional, they are orphaned, and no longer governed by
cpufreq.

This patch, given the above scenario, creates a sysfs directory for
the first sibling and symlinks for the rest of the siblings.

Please note the recursive call, it was rather too ugly to roll it
out. And the removal of redundant NULL setting (it is already taken
care of near the top of the function).

Signed-off-by: Jacob Shin &lt;jacob.shin@amd.com&gt;
Acked-by: Mark Langsdorf &lt;mark.langsdorf@amd.com&gt;
Reviewed-by: Thomas Renninger &lt;trenn@suse.de&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)"</title>
<updated>2010-08-02T17:21:25Z</updated>
<author>
<name>Andrej Gelenberg</name>
<email>andrej.gelenberg@udo.edu</email>
</author>
<published>2010-05-14T22:15:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ddcd49b943272f275e890e9c1c06cfdbc0a899e3'/>
<id>urn:sha1:ddcd49b943272f275e890e9c1c06cfdbc0a899e3</id>
<content type='text'>
commit accd846698439ba18250e8fd5681af280446b853 upstream.

395913d0b1db37092ea3d9d69b832183b1dd84c5 ("[CPUFREQ] remove rwsem lock
from CPUFREQ_GOV_STOP call (second call site)") is not needed, because
there is no rwsem lock in cpufreq_ondemand and cpufreq_conservative
anymore.  Lock should not be released until the work done.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=1594

Signed-off-by: Andrej Gelenberg &lt;andrej.gelenberg@udo.edu&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Cc: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Acked-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>[CPUFREQ] Fix stale cpufreq_cpu_governor pointer</title>
<updated>2009-11-18T04:15:04Z</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2009-11-12T14:18:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=90e41bac100e34f955f48e7686c2fc685ac9aa30'/>
<id>urn:sha1:90e41bac100e34f955f48e7686c2fc685ac9aa30</id>
<content type='text'>
Dave,

Attached is an update of my patch against the cpufreq fixes branch.

Before applying the patch I compiled and booted the tree to see if the panic
was still there -- to my surprise it was not.  This is because of the conversion
of cpufreq_cpu_governor to a char[].

While the panic is kaput, the problem of stale data continues and my patch is
still valid.  It is possible to end up with the wrong governor after hotplug
events because CPUFREQ_DEFAULT_GOVERNOR is statically linked to a default,
while the cpu siblings may have had a different governor assigned by a user.

ie) the patch is still needed in order to keep the governors assigned
properly when hotplugging devices

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Resolve time unit thinko in ondemand/conservative govs</title>
<updated>2009-11-18T04:15:04Z</updated>
<author>
<name>Pallipadi, Venkatesh</name>
<email>venkatesh.pallipadi@intel.com</email>
</author>
<published>2009-11-12T00:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=54c9a35d9faef06e00e2a941eb8fe674f1886901'/>
<id>urn:sha1:54c9a35d9faef06e00e2a941eb8fe674f1886901</id>
<content type='text'>
ondemand and conservative governors are messing up time units in the
code path where NO_HZ is not enabled and ignore_nice is set. The walltime
idletime stored is in jiffies and nice time calculation is happening in
microseconds.

The problem was reported and diagnosed by Alexander here.
http://marc.info/?l=linux-kernel&amp;m=125752550404513&amp;w=2

The patch below fixes this thinko.

Reported-by: Alexander Miller &lt;Miller@fmi.uni-stuttgart.de&gt;
Tested-by: Alexander Miller &lt;Miller@fmi.uni-stuttgart.de&gt;
Signed-off-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>[CPUFREQ] Fix use after free on governor restore</title>
<updated>2009-11-18T04:15:04Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2009-10-04T20:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e77b89f13a0d48aea70b69976e854f2a2444a519'/>
<id>urn:sha1:e77b89f13a0d48aea70b69976e854f2a2444a519</id>
<content type='text'>
Currently on governer backup/restore path we storing governor's pointer.
This is wrong because one may unload governor's module after cpu goes
offline. As result use-after-free will take place on restored cpu.
It is not easy to exploit this bug, but still we have to close this
issue ASAP. Issue was introduced by following commit
084f34939424161669467c19280dbcf637730314

##TESTCASE##
#!/bin/sh -x
modprobe acpi_cpufreq
# Any non default governor, in may case it is "ondemand"
modprobe cpufreq_ondemand
echo ondemand &gt; /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
rmmod acpi_cpufreq
rmmod cpufreq_ondemand
modprobe acpi_cpufreq  # &lt;&lt; use-after-free here.

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq</title>
<updated>2009-09-18T16:16:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-18T16:16:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=714af0693863dfb6f075f4465053976d2d076a21'/>
<id>urn:sha1:714af0693863dfb6f075f4465053976d2d076a21</id>
<content type='text'>
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq:
  [CPUFREQ] Fix NULL ptr regression in powernow-k8
  [CPUFREQ] Create a blacklist for processors that should not load the acpi-cpufreq module.
  [CPUFREQ] Powernow-k8: Enable more than 2 low P-states
  [CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)
  [CPUFREQ] ondemand - Use global sysfs dir for tuning settings
  [CPUFREQ] Introduce global, not per core: /sys/devices/system/cpu/cpufreq
  [CPUFREQ] Bail out of cpufreq_add_dev if the link for a managed CPU got created
  [CPUFREQ] Factor out policy setting from cpufreq_add_dev
  [CPUFREQ] Factor out interface creation from cpufreq_add_dev
  [CPUFREQ] Factor out symlink creation from cpufreq_add_dev
  [CPUFREQ] cleanup up -ENOMEM handling in cpufreq_add_dev
  [CPUFREQ] Reduce scope of cpu_sys_dev in cpufreq_add_dev
  [CPUFREQ] update Doc for cpuinfo_cur_freq and scaling_cur_freq
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu</title>
<updated>2009-09-15T16:39:44Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-09-15T16:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ada3fa15057205b7d3f727bba5cd26b5912e350f'/>
<id>urn:sha1:ada3fa15057205b7d3f727bba5cd26b5912e350f</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: (46 commits)
  powerpc64: convert to dynamic percpu allocator
  sparc64: use embedding percpu first chunk allocator
  percpu: kill lpage first chunk allocator
  x86,percpu: use embedding for 64bit NUMA and page for 32bit NUMA
  percpu: update embedding first chunk allocator to handle sparse units
  percpu: use group information to allocate vmap areas sparsely
  vmalloc: implement pcpu_get_vm_areas()
  vmalloc: separate out insert_vmalloc_vm()
  percpu: add chunk-&gt;base_addr
  percpu: add pcpu_unit_offsets[]
  percpu: introduce pcpu_alloc_info and pcpu_group_info
  percpu: move pcpu_lpage_build_unit_map() and pcpul_lpage_dump_cfg() upward
  percpu: add @align to pcpu_fc_alloc_fn_t
  percpu: make @dyn_size mandatory for pcpu_setup_first_chunk()
  percpu: drop @static_size from first chunk allocators
  percpu: generalize first chunk allocator selection
  percpu: build first chunk allocators selectively
  percpu: rename 4k first chunk allocator to page
  percpu: improve boot messages
  percpu: fix pcpu_reclaim() locking
  ...

Fix trivial conflict as by Tejun Heo in kernel/sched.c
</content>
</entry>
<entry>
<title>[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)</title>
<updated>2009-09-01T16:45:18Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@polymtl.ca</email>
</author>
<published>2009-06-08T17:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=395913d0b1db37092ea3d9d69b832183b1dd84c5'/>
<id>urn:sha1:395913d0b1db37092ea3d9d69b832183b1dd84c5</id>
<content type='text'>
remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)

commit	42a06f2166f2f6f7bf04f32b4e823eacdceafdc9

Missed a call site for CPUFREQ_GOV_STOP to remove the rwlock taken around the
teardown. To make a long story short, the rwlock write-lock causes a circular
dependency with cancel_delayed_work_sync(), because the timer handler takes the
read lock.

Note that all callers to __cpufreq_set_policy are taking the rwsem. All sysfs
callers (writers) hold the write rwsem at the earliest sysfs calling stage.

However, the rwlock write-lock is not needed upon governor stop.

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Acked-by: Venkatesh Pallipadi &lt;venkatesh.pallipadi@intel.com&gt;
CC: rjw@sisk.pl
CC: mingo@elte.hu
CC: Shaohua Li &lt;shaohua.li@intel.com&gt;
CC: Pekka Enberg &lt;penberg@cs.helsinki.fi&gt;
CC: Dave Young &lt;hidave.darkstar@gmail.com&gt;
CC: "Rafael J. Wysocki" &lt;rjw@sisk.pl&gt;
CC: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
CC: trenn@suse.de
CC: sven.wegener@stealer.net
CC: cpufreq@vger.kernel.org
Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
</content>
</entry>
</feed>
