<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/power/cpupower/Makefile, branch linux-4.16.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2017-11-18T02:32:27+00:00</updated>
<entry>
<title>kbuild: /bin/pwd -&gt; pwd</title>
<updated>2017-11-18T02:32:27+00:00</updated>
<author>
<name>Bjørn Forsman</name>
<email>bjorn.forsman@gmail.com</email>
</author>
<published>2017-11-05T09:44:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=16f8259ca77d04f95e5ca90be1b1894ed45816c0'/>
<id>urn:sha1:16f8259ca77d04f95e5ca90be1b1894ed45816c0</id>
<content type='text'>
Most places use pwd and rely on $PATH lookup. Moving the remaining
absolute path /bin/pwd users over for consistency.

Also, a reason for doing /bin/pwd -&gt; pwd instead of the other way around
is because I believe build systems should make little assumptions on
host filesystem layout. Case in point, we do this kind of patching
already in NixOS.

Ref. commit 028568d84da3cfca49f5f846eeeef01441d70451
("kbuild: revert $(realpath ...) to $(shell cd ... &amp;&amp; /bin/pwd)").

Signed-off-by: Bjørn Forsman &lt;bjorn.forsman@gmail.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
</content>
</entry>
<entry>
<title>tools/power/cpupower: Add 64 bit library detection</title>
<updated>2017-11-09T17:50:40+00:00</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2017-11-02T00:48:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d4dbfa4bb4c624636eeef9efc6d87c4b7bf2c611'/>
<id>urn:sha1:d4dbfa4bb4c624636eeef9efc6d87c4b7bf2c611</id>
<content type='text'>
The kernel-tools-lib rpm is installing the library to /usr/lib64, and not
/usr/lib as the cpupower Makefile is doing in the kernel tree.  This
resulted in a conflict between the two libraries.  After looking at how
other tools installed libraries, and looking at the perf code in
tools/perf it looks like installing to /usr/lib64 for 64-bit arches is the
correct thing to do.

Checks with 'ldd cpupower' on SLES, RHEL, Fedora, and Ubuntu result in
the correct binary AFAICT:

[root@testsystem cpupower]# ldd cpupower | grep cpupower
        libcpupower.so.0 =&gt; /lib64/libcpupower.so.0 (0x00007f1dab447000)

Commit ac5a181d065d ("cpupower: Add cpuidle parts into library") added a
new cpupower library version.  On Fedora, executing the cpupower binary
then resulted in this error

[root@testsystem cpupower]# ./cpupower monitor
./cpupower: symbol lookup error: ./cpupower: undefined symbol:
get_cpu_topology

64-bit libraries should be installed to /usr/lib64, and other libraries
should be installed to /usr/lib.

This code was taken from the perf Makefile.config which supports /usr/lib
and /usr/lib64.

Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Cc: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>kbuild: revert $(realpath ...) to $(shell cd ... &amp;&amp; /bin/pwd)</title>
<updated>2017-10-07T11:08:02+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-10-02T08:07:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=028568d84da3cfca49f5f846eeeef01441d70451'/>
<id>urn:sha1:028568d84da3cfca49f5f846eeeef01441d70451</id>
<content type='text'>
I thought commit 8e9b46679923 ("kbuild: use $(abspath ...) instead of
$(shell cd ... &amp;&amp; /bin/pwd)") was a safe conversion, but it changed
the behavior.

$(abspath ...) / $(realpath ...) does not expand shell special
characters, such as '~'.

Here is a simple Makefile example:

  ----------------&gt;8----------------
  $(info /bin/pwd: $(shell cd ~/; /bin/pwd))
  $(info abspath: $(abspath ~/))
  $(info realpath: $(realpath ~/))
  all:
          @:
  ----------------&gt;8----------------

  $ make
  /bin/pwd: /home/masahiro
  abspath: /home/masahiro/workspace/~
  realpath:

This can be a real problem if 'make O=~/foo' is invoked from another
Makefile or primitive shell like dash.

This commit partially reverts 8e9b46679923.

Fixes: 8e9b46679923 ("kbuild: use $(abspath ...) instead of $(shell cd ... &amp;&amp; /bin/pwd)")
Reported-by: Julien Grall &lt;julien.grall@arm.com&gt;
Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Tested-by: Julien Grall &lt;julien.grall@arm.com&gt;
</content>
</entry>
<entry>
<title>kbuild: use $(abspath ...) instead of $(shell cd ... &amp;&amp; /bin/pwd)</title>
<updated>2017-08-31T23:50:32+00:00</updated>
<author>
<name>Masahiro Yamada</name>
<email>yamada.masahiro@socionext.com</email>
</author>
<published>2017-08-20T06:04:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8e9b466799230bc20a029579e92d4cd526e5a2e1'/>
<id>urn:sha1:8e9b466799230bc20a029579e92d4cd526e5a2e1</id>
<content type='text'>
Kbuild conventionally uses $(shell cd ... &amp;&amp; /bin/pwd) idiom to get
the absolute path of the directory because GNU Make 3.80, the minimal
supported version at that time, did not support $(abspath ...) or
$(realpath ...).

Commit 37d69ee30808 ("docs: bump minimal GNU Make version to 3.81")
dropped the GNU Make 3.80 support, so we are now allowed to use those
make-builtin helpers.

This conversion will provide better portability without relying on
the pwd command or its location /bin/pwd.

I am intentionally using $(realpath ...) instead $(abspath ...) in
some places.  The difference between the two is $(realpath ...)
returns an empty string if the given path does not exist.  It is
convenient in places where we need to error-out if the makefile fails
to create an output directory.

Signed-off-by: Masahiro Yamada &lt;yamada.masahiro@socionext.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>make use of make variable CURDIR instead of calling pwd</title>
<updated>2016-12-11T11:12:56+00:00</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2016-11-22T08:30:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e19b7cee020441dd690613d223aed7abb0bcda81'/>
<id>urn:sha1:e19b7cee020441dd690613d223aed7abb0bcda81</id>
<content type='text'>
make already provides the current working directory in a variable, so make
use of it instead of forking a shell. Also replace usage of PWD by
CURDIR. PWD is provided by most shells, but not all, so this makes the
build system more robust.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.com&gt;
</content>
</entry>
<entry>
<title>cpupower: Add cpuidle parts into library</title>
<updated>2016-04-28T14:02:29+00:00</updated>
<author>
<name>Thomas Renninger</name>
<email>trenn@suse.com</email>
</author>
<published>2016-04-28T13:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ac5a181d065d74fb6b213d538f743392f27bcdbd'/>
<id>urn:sha1:ac5a181d065d74fb6b213d538f743392f27bcdbd</id>
<content type='text'>
This more or less is a renaming and moving of functions and should not
introduce any functional change.

cpupower was built from cpufrequtils (which had a C library providing easy
access to cpu frequency platform info). In the meantime it got enhanced
by quite some neat cpuidle userspace tools.

Now the cpu idle functions have been separated and added to the cpupower.so
library.
So beside an already existing public header file:
cpufreq.h
cpupower now also exports these cpu idle functions in:
cpuidle.h

Here again pasted for better review of the interfaces:

======================================
int cpuidle_is_state_disabled(unsigned int cpu,
                                       unsigned int idlestate);
int cpuidle_state_disable(unsigned int cpu, unsigned int idlestate,
                                   unsigned int disable);
unsigned long cpuidle_state_latency(unsigned int cpu,
                                                unsigned int idlestate);
unsigned long cpuidle_state_usage(unsigned int cpu,
                                        unsigned int idlestate);
unsigned long long cpuidle_state_time(unsigned int cpu,
                                                unsigned int idlestate);
char *cpuidle_state_name(unsigned int cpu,
                                unsigned int idlestate);
char *cpuidle_state_desc(unsigned int cpu,
                                unsigned int idlestate);
unsigned int cpuidle_state_count(unsigned int cpu);

char *cpuidle_get_governor(void);
char *cpuidle_get_driver(void);

======================================

Signed-off-by: Thomas Renninger &lt;trenn@suse.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpupower: Provide STATIC variable in Makefile for debug builds</title>
<updated>2015-12-03T01:30:30+00:00</updated>
<author>
<name>Thomas Renninger</name>
<email>trenn@suse.com</email>
</author>
<published>2015-12-01T16:14:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e51207f0030474958e59bbc7e002f169bdb05c50'/>
<id>urn:sha1:e51207f0030474958e59bbc7e002f169bdb05c50</id>
<content type='text'>
When working on cpupower code, you often want to compile library code into the
binary.

This allows to execute modified cpupower code, even with library changes
without doing "make install"

Signed-off-by: Thomas Renninger &lt;trenn@suse.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Revert "cpupower Makefile change to help run the tool without 'make install'"</title>
<updated>2015-03-11T20:56:49+00:00</updated>
<author>
<name>Josh Boyer</name>
<email>jwboyer@fedoraproject.org</email>
</author>
<published>2015-03-11T00:26:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b8ea351b0e154c9dc28609db58eddc6c2934c954'/>
<id>urn:sha1:b8ea351b0e154c9dc28609db58eddc6c2934c954</id>
<content type='text'>
This reverts commit 5c1de006e8e66b0be05be422416629e344c71652.

While the original commit makes it easier to run cpupower from the
local build directory, it also leaves the binary with a rather poor
rpath of './' in it after it is installed on a system via 'make install'.

This is considered bad practice and can cause cpupower to fail in
rpmbuild with the following error:

ERROR   0004: file '/usr/bin/cpupower' contains an insecure rpath './' in [./]
error: Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)
    Bad exit status from /var/tmp/rpm-tmp.A6u26r (%install)

Developers should be able to use LD_LIBRARY_PATH to achieve the same
effect and not introduce rpath into the binary.

Signed-off-by: Josh Boyer &lt;jwboyer@feoraproject.org&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>cpupower Makefile change to help run the tool without 'make install'</title>
<updated>2015-01-30T00:47:41+00:00</updated>
<author>
<name>sriram@marirs.net.in</name>
<email>sriram@marirs.net.in</email>
</author>
<published>2014-12-22T16:47:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c1de006e8e66b0be05be422416629e344c71652'/>
<id>urn:sha1:5c1de006e8e66b0be05be422416629e344c71652</id>
<content type='text'>
The cpupower tool, when compiled against libcpupower.so fail's to run as
the linker file path's are missing during compilation. So added changes
in the Makefile to run cpupower tool, which helps us run the tool
without doing a 'make install'.

Signed-off-by: Sriram Raghunathan &lt;sriram@marirs.net.in&gt;
Acked-by: Thomas Renninger &lt;trenn@suse.de&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'acpi-tools' and 'pm-tools'</title>
<updated>2014-06-03T21:13:34+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2014-06-03T21:13:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e30baad228624e3868714af6ecab967c4445d4a'/>
<id>urn:sha1:2e30baad228624e3868714af6ecab967c4445d4a</id>
<content type='text'>
* acpi-tools:
  ACPI / tools: Introduce ec_access.c - tool to access the EC

* pm-tools:
  cpupower: Remove mc and smt power aware scheduler info/settings
  cpupower: cpupower info -b should return 0 on success, not the perf bias value
  cpupower: If root, try to load msr driver on x86 if /dev/cpu/0/msr is not available
  cpupower: Install recently added cpupower-idle-{set, info} manpages
  cpupower: Introduce idle state disable-by-latency and enable-all
  cpupower: Remove all manpages on make uninstall
  cpupower: Remove dead link to homepage, and update the targets built.
  cpupower: Rename cpufrequtils -&gt; cpupower, and libcpufreq -&gt; libcpupower.
  PM / tools: cpupower: add option to display values without round offs
  tools / power: turbostat: Drop temperature checks
</content>
</entry>
</feed>
