1. 07 10月, 2017 1 次提交
    • M
      kbuild: revert $(realpath ...) to $(shell cd ... && /bin/pwd) · 028568d8
      Masahiro Yamada 提交于
      I thought commit 8e9b4667 ("kbuild: use $(abspath ...) instead of
      $(shell cd ... && /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:
      
        ---------------->8----------------
        $(info /bin/pwd: $(shell cd ~/; /bin/pwd))
        $(info abspath: $(abspath ~/))
        $(info realpath: $(realpath ~/))
        all:
                @:
        ---------------->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 8e9b4667.
      
      Fixes: 8e9b4667 ("kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd)")
      Reported-by: NJulien Grall <julien.grall@arm.com>
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: NJulien Grall <julien.grall@arm.com>
      028568d8
  2. 01 9月, 2017 1 次提交
    • M
      kbuild: use $(abspath ...) instead of $(shell cd ... && /bin/pwd) · 8e9b4667
      Masahiro Yamada 提交于
      Kbuild conventionally uses $(shell cd ... && /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 37d69ee3 ("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: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: NThierry Reding <treding@nvidia.com>
      8e9b4667
  3. 04 8月, 2017 2 次提交
  4. 31 7月, 2017 1 次提交
    • P
      tools/power/cpupower: allow running without cpu0 · d0e4a193
      Prarit Bhargava 提交于
      Linux-3.7 added CONFIG_BOOTPARAM_HOTPLUG_CPU0,
      allowing systems to offline cpu0.
      
      But when cpu0 is offline, cpupower monitor will not display all
      processor and Mperf information:
      
      [root@intel-skylake-dh-03 cpupower]# ./cpupower monitor
      WARNING: at least one cpu is offline
          |Idle_Stats
      CPU | POLL | C1-S | C1E- | C3-S | C6-S | C7s- | C8-S
         4|  0.00|  0.00|  0.00|  0.00|  0.90|  0.00| 96.13
         1|  0.00|  0.00|  5.49|  0.00|  0.01|  0.00| 92.26
         5|  0.00|  0.00|  0.00|  0.00|  0.46|  0.00| 99.50
         2| 45.42|  0.00|  0.00|  0.00| 22.94|  0.00| 28.84
         6|  0.00| 37.54|  0.00|  0.00|  0.00|  0.00|  0.00
         3|  0.00|  0.00|  0.00|  0.00|  0.30|  0.00| 91.99
         7|  0.00|  0.00|  0.00|  0.00|  4.70|  0.00|  0.70
      
      This patch replaces the hard-coded use of cpu0 in cpupower with the
      current cpu, allowing it to run without a cpu0.
      
      After the patch is applied,
      
      [root@intel-skylake-dh-03 cpupower]# ./cpupower monitor
      WARNING: at least one cpu is offline
          |Nehalem                    || Mperf              || Idle_Stats
      CPU | C3   | C6   | PC3  | PC6  || C0   | Cx   | Freq || POLL | C1-S | C1E- | C3-S | C6-S | C7s- | C8-S
         4|  0.01|  1.27|  0.00|  0.00||  0.04| 99.96|  3957||  0.00|  0.00|  0.00|  0.00|  1.43|  0.00| 98.52
         1|  0.00| 98.82|  0.00|  0.00||  0.05| 99.95|  3361||  0.00|  0.00|  0.01|  0.00|  0.03|  0.00| 99.88
         5|  0.00| 98.82|  0.00|  0.00||  0.09| 99.91|  3917||  0.00|  0.00|  0.00|  0.00| 99.38|  0.00|  0.50
         2|  0.33|  0.00|  0.00|  0.00||  0.00|100.00|  3890||  0.00|  0.00|  0.00|  0.00|  0.00|  0.00|100.00
         6|  0.33|  0.00|  0.00|  0.00||  0.01| 99.99|  3903||  0.00|  0.00|  0.00|  0.00|  0.00|  0.00| 99.99
         3|  0.01|  0.71|  0.00|  0.00||  0.06| 99.94|  3678||  0.00|  0.00|  0.00|  0.00|  0.80|  0.00| 99.13
         7|  0.01|  0.71|  0.00|  0.00||  0.03| 99.97|  3538||  0.00|  0.69| 11.70|  0.00|  0.00|  0.00| 87.57
      
      There are some minor cleanups included in this patch.
      Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
      Signed-off-by: NThomas Renninger <trenn@suse.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      d0e4a193
  5. 22 7月, 2017 3 次提交
    • T
      pm-graph: package makefile and man pages · 2158e724
      Todd E Brandt 提交于
      update help text and man pages for both tools
      - added more examples and separated them by category
      Makefile upgrades
      - uninstall: remove errors from uninstall if tool not found
      - install: perform uninstall before install
      Signed-off-by: NTodd Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      2158e724
    • T
      pm-graph: AnalyzeBoot v2.1 · 370f4c23
      Todd E Brandt 提交于
      - changed output from single html file to dir with html/dmesg/ftrace
      - add sysinfo to logs and timeline
      - add -sysinfo command, displays dmidecode values and cpu/mem info
      - set trace buffer size to lesser of memtotal/2 or 2GB when using callgraph
      - extended timeline to the last init call in user space
        separated timeline into two phases, kernel mode & user mode
      - add kernel version check for ftrace usage, 4.10 minimum
      - change -filter argument to -func
      - add strict protections on -func usage with full symbol checks
        now only works for statically linked functions
        cmd -flistall now ignores all loadable module functions
      - add -cgfilter argument for reducing timeline size by removing callgraphs
      - crontab usage: preserve existing @reboot lines in user crontab
      - fedora support added: uses grub2 loader, handles fedora crontab
      - stop using "which" to find binaries, search pre-defined path list
      - moved most output processing to analyze_suspend library
      Signed-off-by: NTodd Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      370f4c23
    • T
      pm-graph: AnalyzeSuspend v4.7 · 49218edd
      Todd E Brandt 提交于
      - changed -rtcwake parameter to be on & 15 sec by default,
        to disable rtcwake use: "-rtcwake off"
      - changed behavior of -o: renames HTML file on rerun, subdir on new run
      - changed execution_misalignment error to missing_function_name
      - add sysinfo to logs and timeline via a custom dmidecode call
        it supplants dmidecode tool when used as a library call
      - add -sysinfo command, displays dmidecode values and cpu/mem info
      - set trace buffer size to lesser of memtotal/2 or 2GB when using callgraph
      - add support for /sys/power/mem_sleep. if mem_sleep found:
        mem-shallow=standby, mem-s2idle=freeze, mem-deep=mem
      - remove redundant javascript
      - cosmetic changes to HTML layout
      Signed-off-by: NTodd Brandt <todd.e.brandt@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      49218edd
  6. 28 6月, 2017 1 次提交
  7. 27 6月, 2017 2 次提交
  8. 25 6月, 2017 3 次提交
  9. 24 6月, 2017 2 次提交
  10. 13 5月, 2017 1 次提交
  11. 12 5月, 2017 1 次提交
    • L
      tools/power x86_energy_perf_policy: support HWP.EPP · 4beec1d7
      Len Brown 提交于
      x86_energy_perf_policy(8) was created as an example
      of how the user, or upper-level OS, can manage
      MSR_IA32_ENERGY_PERF_BIAS (EPB).
      
      Hardware consults EPB when it makes internal decisions
      balancing energy-saving vs performance.
      For example, should HW quickly or slowly
      transition into and out of power-saving idles states?
      Should HW quickly or slowly ramp frequency up or down
      in response to demand in the turbo-frequency range?
      
      Depending on the processor, EPB may have package, core,
      or CPU thread scope.  As such, the only general policy
      is to write the same value to EPB on every CPU in the system.
      
      Recent platforms add support for Hardware Performance States (HWP).
      HWP effectively extends hardware frequency control from
      the opportunistic turbo-frequency range to control the entire
      range of available processor frequencies.
      
      Just as turbo-mode used EPB, HWP can use EPB to help decicde
      how quickly to ramp frequency and voltage up and down
      in response to changing demand.  Indeed, BDX and BDX-DE,
      the first processors to support HWP, use EPB for this purpose.
      
      Starting in SKL, HWP no longer looks to EPB for influence.
      Instead, it looks in a new MSR specifically for this purpose:
      IA32_HWP_REQUEST.Energy_Performance_Preference (HWP.EPP).
      HWP.EPP is like EPB, except that it is specific to HWP-mode
      frequency selection.  Also, HWP.EPP is defined to have
      per CPU-thread scope.
      
      Starting in SKX, IA32_HWP_REQUEST is augmented by
      IA32_HWP_REQUEST_PKG -- which has the same function, but is
      defined to have package-wide scope.  A new bit in IA32_HWP_REQUEST
      determines if it over-rides the IA32_HWP_REQUEST_PKG or not.
      
      Note that HWP-mode can be enabled in several ways.
      The "in-band" method is for HWP to be exposed in CPUID,
      and for the Linux intel_pstate driver to recognized that,
      and thus enable HWP.  In this case, starting in Linux 4.10, intel_pstate
      exports cpufreq sysfs attribute "energy_performance_preference"
      which can be used to manage HWP.EPP.  This interface can be
      used to set HWP.EPP to these values:
      
      0 performance
      128 balance_performance (default)
      192 balance_power
      255 power
      
      Here, x86_energy_performance_policy is updated to use
      idential strings and values as intel_pstate.
      
      But HWP-mode may also be enabled by firmware before the OS boots,
      and the OS may not be aware of HWP.  In this case, intel_pstate
      is not available to provide sysfs attributes, and x86_energy_perf_policy
      or a similar utility is invaluable for managing HWP.EPP, for
      this utility works the same, no matter if cpufreq is enabled or not.
      Signed-off-by: NLen Brown <len.brown@intel.com>
      4beec1d7
  12. 20 4月, 2017 3 次提交
  13. 19 4月, 2017 1 次提交
  14. 13 4月, 2017 7 次提交
  15. 05 3月, 2017 1 次提交
  16. 01 3月, 2017 10 次提交