<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/powercap, branch v3.15-rc1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/powercap?h=v3.15-rc1</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/powercap?h=v3.15-rc1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-04-07T21:55:46Z</updated>
<entry>
<title>Merge tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm</title>
<updated>2014-04-07T21:55:46Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-04-07T21:55:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=467a9e1633043810259a7f5368fbcc1e84746137'/>
<id>urn:sha1:467a9e1633043810259a7f5368fbcc1e84746137</id>
<content type='text'>
Pull CPU hotplug notifiers registration fixes from Rafael Wysocki:
 "The purpose of this single series of commits from Srivatsa S Bhat
  (with a small piece from Gautham R Shenoy) touching multiple
  subsystems that use CPU hotplug notifiers is to provide a way to
  register them that will not lead to deadlocks with CPU online/offline
  operations as described in the changelog of commit 93ae4f978ca7f ("CPU
  hotplug: Provide lockless versions of callback registration
  functions").

  The first three commits in the series introduce the API and document
  it and the rest simply goes through the users of CPU hotplug notifiers
  and converts them to using the new method"

* tag 'cpu-hotplug-3.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (52 commits)
  net/iucv/iucv.c: Fix CPU hotplug callback registration
  net/core/flow.c: Fix CPU hotplug callback registration
  mm, zswap: Fix CPU hotplug callback registration
  mm, vmstat: Fix CPU hotplug callback registration
  profile: Fix CPU hotplug callback registration
  trace, ring-buffer: Fix CPU hotplug callback registration
  xen, balloon: Fix CPU hotplug callback registration
  hwmon, via-cputemp: Fix CPU hotplug callback registration
  hwmon, coretemp: Fix CPU hotplug callback registration
  thermal, x86-pkg-temp: Fix CPU hotplug callback registration
  octeon, watchdog: Fix CPU hotplug callback registration
  oprofile, nmi-timer: Fix CPU hotplug callback registration
  intel-idle: Fix CPU hotplug callback registration
  clocksource, dummy-timer: Fix CPU hotplug callback registration
  drivers/base/topology.c: Fix CPU hotplug callback registration
  acpi-cpufreq: Fix CPU hotplug callback registration
  zsmalloc: Fix CPU hotplug callback registration
  scsi, fcoe: Fix CPU hotplug callback registration
  scsi, bnx2fc: Fix CPU hotplug callback registration
  scsi, bnx2i: Fix CPU hotplug callback registration
  ...
</content>
</entry>
<entry>
<title>powercap, intel-rapl: Fix CPU hotplug callback registration</title>
<updated>2014-03-20T12:43:44Z</updated>
<author>
<name>Srivatsa S. Bhat</name>
<email>srivatsa.bhat@linux.vnet.ibm.com</email>
</author>
<published>2014-03-10T20:39:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=009f225ef050d231ebb7b87264a21a7daac0f175'/>
<id>urn:sha1:009f225ef050d231ebb7b87264a21a7daac0f175</id>
<content type='text'>
Subsystems that want to register CPU hotplug callbacks, as well as perform
initialization for the CPUs that are already online, often do it as shown
below:

	get_online_cpus();

	for_each_online_cpu(cpu)
		init_cpu(cpu);

	register_cpu_notifier(&amp;foobar_cpu_notifier);

	put_online_cpus();

This is wrong, since it is prone to ABBA deadlocks involving the
cpu_add_remove_lock and the cpu_hotplug.lock (when running concurrently
with CPU hotplug operations).

Instead, the correct and race-free way of performing the callback
registration is:

	cpu_notifier_register_begin();

	for_each_online_cpu(cpu)
		init_cpu(cpu);

	/* Note the use of the double underscored version of the API */
	__register_cpu_notifier(&amp;foobar_cpu_notifier);

	cpu_notifier_register_done();

Fix the intel-rapl code in the powercap driver by using this latter form
of callback registration. But retain the calls to get/put_online_cpus(),
since they also protect the function rapl_cleanup_data(). By nesting
get/put_online_cpus() *inside* cpu_notifier_register_begin/done(), we avoid
the ABBA deadlock possibility mentioned above.

Cc: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Tested-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&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;
</content>
</entry>
<entry>
<title>powercap / intel_rapl: spell out SoC names</title>
<updated>2014-02-13T23:49:34Z</updated>
<author>
<name>Jacob Pan</name>
<email>jacob.jun.pan@linux.intel.com</email>
</author>
<published>2014-02-10T14:11:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6b2e6d09aa18738dd29277617a186fa827bd7e1'/>
<id>urn:sha1:d6b2e6d09aa18738dd29277617a186fa827bd7e1</id>
<content type='text'>
Spell out names for supported SoCs.

Signed-off-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap / intel_rapl: relax sanity check on energy counters</title>
<updated>2014-02-13T23:49:33Z</updated>
<author>
<name>Jacob Pan</name>
<email>jacob.jun.pan@linux.intel.com</email>
</author>
<published>2014-02-10T14:11:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7b8747725d0a6842a82ea60fe95b9d4d7ae008fd'/>
<id>urn:sha1:7b8747725d0a6842a82ea60fe95b9d4d7ae008fd</id>
<content type='text'>
Some RAPL domains may not be active at the time driver is being
loaded. Checking energy counter increment may be too strict and
time consuming. So relax the sanity check on energy counters of
these domains.

Otherwise, they may be ignored and become unavailable to the
powercap framework.

Signed-off-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>powercap / RAPL: add support for ValleyView Soc</title>
<updated>2013-12-22T00:27:51Z</updated>
<author>
<name>Jacob Pan</name>
<email>jacob.jun.pan@linux.intel.com</email>
</author>
<published>2013-12-11T22:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ed93b71492da3464b4798613aa8a99bed914251b'/>
<id>urn:sha1:ed93b71492da3464b4798613aa8a99bed914251b</id>
<content type='text'>
This patch adds support for RAPL on Intel ValleyView based SoC
platforms, such as Baytrail.

Besides adding CPU ID, special energy unit encoding is handled
for ValleyView.

Signed-off-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Fix mode for energy counter</title>
<updated>2013-12-05T01:05:48Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-12-04T19:12:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=95677a9a3847de4f37e0f463aeb94aa8d5cccc50'/>
<id>urn:sha1:95677a9a3847de4f37e0f463aeb94aa8d5cccc50</id>
<content type='text'>
As per the documentation of powercap sysfs, energy_uj field is read only,
if it can't be reset. Currently it always allows write but will fail,
if there is no reset callback.
Changing mode field, to read only if there is no reset callback.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Reported-by: Dirk Brandewie &lt;dirk.j.brandewie@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Fix build error with option -Werror=format-security</title>
<updated>2013-11-05T01:36:57Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-11-04T16:53:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=08ff4cbe10da402e7c493ac72e298975f62a9e78'/>
<id>urn:sha1:08ff4cbe10da402e7c493ac72e298975f62a9e78</id>
<content type='text'>
Fix compile error with gcc option: -Werror=format-security for
dev_set_name(&amp;control_type-&gt;dev, name).

Changed to dev_set_name(&amp;control_type-&gt;dev, "%s", name).

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Convert class code to use dev_groups</title>
<updated>2013-10-25T21:16:31Z</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@gmail.com</email>
</author>
<published>2013-10-23T11:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9e3410b764b79670a59d6c1ccdcad483b92c058c'/>
<id>urn:sha1:9e3410b764b79670a59d6c1ccdcad483b92c058c</id>
<content type='text'>
The newly added power capping framework uses the obsolete .dev_attrs
field of struct class. However this field will be removed in 3.13, so
convert the code to use the .dev_groups field instead.

Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Introduce Intel RAPL power capping driver</title>
<updated>2013-10-18T11:29:52Z</updated>
<author>
<name>Jacob Pan</name>
<email>jacob.jun.pan@linux.intel.com</email>
</author>
<published>2013-10-17T17:28:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2d281d8196e38dd3a4ee9af26621ddde8329f269'/>
<id>urn:sha1:2d281d8196e38dd3a4ee9af26621ddde8329f269</id>
<content type='text'>
The Intel Running Average Power Limit (RAPL) technology provides platform
software with the ability to monitor, control, and get notifications on
power usage.

This feature is present in all Sandy Bridge and later Intel processors.
Newer models allow more fine grained controls to be applied.  In RAPL,
power control is divided into domains, which include package, DRAM
controller, CPU core (Power Plane 0), graphics uncore (power plane 1), etc.

The purpose of this driver is to expose the RAPL settings to userspace.
Overall, RAPL fits in the new powercap class driver in that platform
level power capping controls are exposed via this generic interface.

This driver is based on an earlier patch from Zhang Rui.

However, while the previous work was mainly focused on thermal monitoring
the focus here is on the usability from user space perspective.

References: https://lkml.org/lkml/2011/5/26/93
Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>PowerCap: Add class driver</title>
<updated>2013-10-16T22:36:06Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2013-10-11T23:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=75d2364ea0cab3a95be3f8d1f8dabd20ac4b1b2a'/>
<id>urn:sha1:75d2364ea0cab3a95be3f8d1f8dabd20ac4b1b2a</id>
<content type='text'>
The power capping framework providing a consistent interface between the
kernel and user space that allows power capping drivers to expose their
settings to user space in a uniform way.
The overall design of the framework is described in the documentation
added by the previous patch in this series.

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Jacob Pan &lt;jacob.jun.pan@linux.intel.com&gt;
Reviewed-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
</feed>
