1. 14 5月, 2019 2 次提交
  2. 06 5月, 2019 3 次提交
  3. 06 2月, 2019 1 次提交
  4. 29 1月, 2019 1 次提交
    • A
      thermal: cpu_cooling: Require thermal core to be compiled in · afa1f2ab
      Amit Kucheria 提交于
      The CPU cooling driver (cpu_cooling.c) allows the platform's cpufreq
      driver to register as a cooling device and cool down the platform by
      throttling the CPU frequency. In order to be able to auto-register a
      cpufreq driver as a cooling device from the cpufreq core, we need access
      to code inside cpu_cooling.c which, in turn, accesses code inside
      thermal core.
      
      CPU_FREQ is a bool while THERMAL is tristate.  In some configurations
      (e.g. allmodconfig), CONFIG_THERMAL ends up as a module while
      CONFIG_CPU_FREQ is compiled in. This leads to following error:
      
      drivers/cpufreq/cpufreq.o: In function `cpufreq_offline':
      cpufreq.c:(.text+0x407c): undefined reference to `cpufreq_cooling_unregister'
      drivers/cpufreq/cpufreq.o: In function `cpufreq_online':
      cpufreq.c:(.text+0x70c0): undefined reference to `of_cpufreq_cooling_register'
      
      Given that platforms using CPU_THERMAL usually want it compiled-in so it
      is available early in boot, make CPU_THERMAL depend on THERMAL being
      compiled-in instead of allowing it to be a module.
      
      As a result of this change, get rid of the ugly (!CPU_THERMAL ||
      THERMAL) dependency in all cpufreq drivers using CPU_THERMAL.
      Suggested-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: NAmit Kucheria <amit.kucheria@linaro.org>
      Acked-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      afa1f2ab
  5. 02 1月, 2019 1 次提交
  6. 21 12月, 2018 1 次提交
  7. 07 12月, 2018 2 次提交
  8. 26 10月, 2018 1 次提交
  9. 26 7月, 2018 1 次提交
    • H
      Thermal: Intel SoC DTS: Translate IO-APIC GSI number to linux irq number · 54c5848c
      Hans de Goede 提交于
      The Intel SoC DTS uses a hardcoded GSI number, before this commit
      it was passing it to request_irq as if it were a linux irq number,
      but there is no 1:1 mapping so in essence it was requesting a
      random interrupt.
      
      Besides this causing the DTS driver to not actually get an interrupt
      if the thermal thresholds are exceeded this also is causing an
      interrupt conflict on some devices since the linux irq 86 which is
      being requested is already in use, leading to oopses like this:
      
      genirq: Flags mismatch irq 86. 00002001 (soc_dts) vs. 00000083 (volume_down)
      CPU: 0 PID: 601 Comm: systemd-udevd Tainted: G         C OE     4.17.0-rc6+ #45
      Hardware name: Insyde i86/Type2 - Board Product Name, BIOS CHUWI.D86JLBNR03 01/14/2015
      Call Trace:
        dump_stack+0x5c/0x80
        __setup_irq.cold.50+0x4e/0xac
        ? request_threaded_irq+0xad/0x160
        request_threaded_irq+0xf5/0x160
        ? 0xffffffffc0a93000
        intel_soc_thermal_init+0x74/0x1000 [intel_soc_dts_thermal]
      
      This commit makes the intel_soc_dts_thermal.c code call
      acpi_register_gsi() to translate the hardcoded IO-APIC GSI number (86)
      to a linux irq, so that the dts code uses the right interrupt and we
      no longer get an oops about an irq conflict.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      54c5848c
  10. 02 4月, 2018 1 次提交
    • V
      thermal: Add cooling device's statistics in sysfs · 8ea22951
      Viresh Kumar 提交于
      This extends the sysfs interface for thermal cooling devices and exposes
      some pretty useful statistics. These statistics have proven to be quite
      useful specially while doing benchmarks related to the task scheduler,
      where we want to make sure that nothing has disrupted the test,
      specially the cooling device which may have put constraints on the CPUs.
      The information exposed here tells us to what extent the CPUs were
      constrained by the thermal framework.
      
      The write-only "reset" file is used to reset the statistics.
      
      The read-only "time_in_state_ms" file shows the time (in msec) spent by the
      device in the respective cooling states, and it prints one line per
      cooling state.
      
      The read-only "total_trans" file shows single positive integer value
      showing the total number of cooling state transitions the device has
      gone through since the time the cooling device is registered or the time
      when statistics were reset last.
      
      The read-only "trans_table" file shows a two dimensional matrix, where
      an entry <i,j> (row i, column j) represents the number of transitions
      from State_i to State_j.
      
      This is how the directory structure looks like for a single cooling
      device:
      
      $ ls -R /sys/class/thermal/cooling_device0/
      /sys/class/thermal/cooling_device0/:
      cur_state  max_state  power  stats  subsystem  type  uevent
      
      /sys/class/thermal/cooling_device0/power:
      autosuspend_delay_ms  runtime_active_time  runtime_suspended_time
      control               runtime_status
      
      /sys/class/thermal/cooling_device0/stats:
      reset  time_in_state_ms  total_trans  trans_table
      
      This is tested on ARM 64-bit Hisilicon hikey620 board running Ubuntu and
      ARM 64-bit Hisilicon hikey960 board running Android.
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      8ea22951
  11. 02 1月, 2018 1 次提交
  12. 01 11月, 2017 2 次提交
  13. 18 10月, 2017 1 次提交
    • A
      thermal: imx: add NVMEM dependency · 531fcdeb
      Arnd Bergmann 提交于
      The driver now fails to link into vmlinux when CONFIG_NVMEM is a loadable
      module:
      
      drivers/thermal/imx_thermal.o: In function `imx_thermal_probe':
      imx_thermal.c:(.text+0x360): undefined reference to `nvmem_cell_read_u32'
      imx_thermal.c:(.text+0x360): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32'
      imx_thermal.c:(.text+0x388): undefined reference to `nvmem_cell_read_u32'
      imx_thermal.c:(.text+0x388): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `nvmem_cell_read_u32'
      
      This adds a Kconfig dependency to force it to be a module as well
      when its dependency is loadable.
      
      Fixes: 7fe5ba04fcdc ("thermal: imx: Add support for reading OCOTP through nvmem")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NLeonard Crestez <leonard.crestez@nxp.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      531fcdeb
  14. 11 8月, 2017 1 次提交
  15. 08 8月, 2017 1 次提交
  16. 05 5月, 2017 1 次提交
    • K
      thermal: core: Add a back up thermal shutdown mechanism · ef1d87e0
      Keerthy 提交于
      orderly_poweroff is triggered when a graceful shutdown
      of system is desired. This may be used in many critical states of the
      kernel such as when subsystems detects conditions such as critical
      temperature conditions. However, in certain conditions in system
      boot up sequences like those in the middle of driver probes being
      initiated, userspace will be unable to power off the system in a clean
      manner and leaves the system in a critical state. In cases like these,
      the /sbin/poweroff will return success (having forked off to attempt
      powering off the system. However, the system overall will fail to
      completely poweroff (since other modules will be probed) and the system
      is still functional with no userspace (since that would have shut itself
      off).
      
      However, there is no clean way of detecting such failure of userspace
      powering off the system. In such scenarios, it is necessary for a backup
      workqueue to be able to force a shutdown of the system when orderly
      shutdown is not successful after a configurable time period.
      Reported-by: NNishanth Menon <nm@ti.com>
      Signed-off-by: NKeerthy <j-keerthy@ti.com>
      Acked-by: NEduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NZhang Rui <rui.zhang@intel.com>
      ef1d87e0
  17. 27 4月, 2017 1 次提交
  18. 23 4月, 2017 1 次提交
  19. 07 4月, 2017 2 次提交
    • S
      thermal: da9062/61: Thermal junction temperature monitoring driver · 608567aa
      Steve Twiss 提交于
      Add junction temperature monitoring supervisor device driver, compatible
      with the DA9062 and DA9061 PMICs. A MODULE_DEVICE_TABLE() macro is added.
      
      If the PMIC's internal junction temperature rises above T_WARN (125 degC)
      an interrupt is issued. This T_WARN level is defined as the
      THERMAL_TRIP_HOT trip-wire inside the device driver.
      
      The thermal triggering mechanism is interrupt based and happens when the
      temperature rises above a given threshold level. The component cannot
      return an exact temperature, it only has knowledge if the temperature is
      above or below a given threshold value. A status bit must be polled to
      detect when the temperature falls below that threshold level again. A
      kernel work queue is configured to repeatedly poll and detect when the
      temperature falls below this trip-wire, between 1 and 10 second intervals
      (defaulting at 3 seconds).
      
      This scheme is provided as an example. It would be expected that any
      final implementation will also include a notify() function and any of these
      settings could be altered to match the application where appropriate.
      
      When over-temperature is reached, the interrupt from the DA9061/2 will be
      repeatedly triggered. The IRQ is therefore disabled when the first
      over-temperature event happens and the status bit is polled using a
      work-queue until it becomes false.
      
      This strategy is designed to allow the periodic transmission of uevents
      (HOT trip point) as the first level of temperature supervision method. It
      is intended for non-invasive temperature control, where the necessary
      measures for cooling the system down are left to the host software. Once
      the temperature falls again, the IRQ is re-enabled so a new critical
      over-temperature event can be detected.
      Reviewed-by: NLukasz Luba <lukasz.luba@arm.com>
      Signed-off-by: NSteve Twiss <stwiss.opensource@diasemi.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      608567aa
    • R
      thermal: broadcom: add Northstar thermal driver · a94cb7ee
      Rafał Miłecki 提交于
      Northstar is a SoC family commonly used in home routers. This commit
      adds a driver for checking CPU temperature. As Northstar Plus seems to
      also have this IP block this new symbol gets ARCH_BCM_IPROC dependency.
      Signed-off-by: NRafał Miłecki <rafal@milecki.pl>
      Signed-off-by: NJon Mason <jon.mason@broadcom.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      a94cb7ee
  20. 02 4月, 2017 1 次提交
  21. 16 3月, 2017 1 次提交
  22. 19 2月, 2017 1 次提交
  23. 20 1月, 2017 1 次提交
  24. 23 11月, 2016 1 次提交
  25. 27 9月, 2016 4 次提交
  26. 06 9月, 2016 1 次提交
  27. 17 5月, 2016 3 次提交
  28. 11 5月, 2016 1 次提交
  29. 21 4月, 2016 1 次提交