15 Jan, 2015

1 commit

  • Pull thermal fixes from Zhang Rui:
    "Specifics:

    - bogus type qualifier fix in OF thermal code.
    - Minor fixes on imx and rcar thermal drivers.
    - Update TI SoC thermal maintainer entry.
    - Updated documentation of OF cpufreq cooling register"

    * 'thermal-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux:
    thermal: rcar: Spelling/grammar: s/drier use .../driver uses ...s/
    thermal: rcar: change type of ctemp in rcar_thermal_update_temp()
    thermal: rcar: fix ENR register value
    Documentation: thermal: document of_cpufreq_cooling_register()
    Thermal: imx: add clk disable/enable for suspend/resume
    MAINTAINERS: update ti-soc-thermal status
    MAINTAINERS: Add linux-omap to list of reviewers for TI Thermal
    thermal: of: Remove bogus type qualifier for of_thermal_get_trip_points()

    Linus Torvalds
     

13 Jan, 2015

1 commit


07 Jan, 2015

2 commits

  • Since the ctemp is used for rcar_thermal_write() in
    rcar_thermal_update_temp(), the type of 'ctemp' should be "u32" instead
    of "int". This patch also changes type of the helper variables 'old'
    and 'new'.

    Acked-by: Geert Uytterhoeven
    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Eduardo Valentin

    Yoshihiro Shimoda
     
  • On R-Mobile APE6, since it has 3 thermal zones, ENR register
    has enable bits in bit 19-16, bit 11-8 and bit 3-0.

    However, on R-Car gen2, since it has 1 thermal zone, ENR register has
    enable bits in bit 3-0. (In other words, the write value should always
    be 0 for bit 31-4 of ENR register.)

    So, this patch fixes the ENR register value using I/O resource sets.

    Acked-by: Geert Uytterhoeven
    Signed-off-by: Yoshihiro Shimoda
    Signed-off-by: Eduardo Valentin

    Yoshihiro Shimoda
     

06 Jan, 2015

4 commits


24 Dec, 2014

5 commits


22 Dec, 2014

2 commits


21 Dec, 2014

4 commits


20 Dec, 2014

1 commit

  • Pull NOHZ update from Thomas Gleixner:
    "Remove the call into the nohz idle code from the fake 'idle' thread in
    the powerclamp driver along with the export of those functions which
    was smuggeled in via the thermal tree. People have tried to hack
    around it in the nohz core code, but it just violates all rightful
    assumptions of that code about the only valid calling context (i.e.
    the proper idle task).

    The powerclamp trainwreck will still work, it just wont get the
    benefit of long idle sleeps"

    * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    tick/powerclamp: Remove tick_nohz_idle abuse

    Linus Torvalds
     

19 Dec, 2014

1 commit

  • commit 4dbd27711cd9 "tick: export nohz tick idle symbols for module
    use" was merged via the thermal tree without an explicit ack from the
    relevant maintainers.

    The exports are abused by the intel powerclamp driver which implements
    a fake idle state from a sched FIFO task. This causes all kinds of
    wreckage in the NOHZ core code which rightfully assumes that
    tick_nohz_idle_enter/exit() are only called from the idle task itself.

    Recent changes in the NOHZ core lead to a failure of the powerclamp
    driver and now people try to hack completely broken and backwards
    workarounds into the NOHZ core code. This is completely unacceptable
    and just papers over the real problem. There are way more subtle
    issues lurking around the corner.

    The real solution is to fix the powerclamp driver by rewriting it with
    a sane concept, but that's beyond the scope of this.

    So the only solution for now is to remove the calls into the core NOHZ
    code from the powerclamp trainwreck along with the exports.

    Fixes: d6d71ee4a14a "PM: Introduce Intel PowerClamp Driver"
    Signed-off-by: Thomas Gleixner
    Cc: Preeti U Murthy
    Cc: Viresh Kumar
    Cc: Frederic Weisbecker
    Cc: Fengguang Wu
    Cc: Frederic Weisbecker
    Cc: Pan Jacob jun
    Cc: LKP
    Cc: Peter Zijlstra
    Cc: Zhang Rui
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412181110110.17382@nanos
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

18 Dec, 2014

1 commit

  • Pull thermal management update from Zhang Rui:
    "Summary:

    - of-thermal extension to allow drivers to register and use its
    functionality in a better way, without exploiting thermal core.
    From Lukasz Majewski.

    - Fix a bug in intel_soc_dts_thermal driver which calls a sleep
    function in interrupt handler. From Maurice Petallo.

    - add a thermal UAPI header file for exporting the thermal generic
    netlink information to user-space. From Florian Fainelli.

    - First round of refactoring in Exynos driver. Bartlomiej and Lukasz
    are attempting to make it lean and easier to understand.

    - New thermal driver for Rockchip (rk3288), with support for DT
    thermal. From Caesar Wang.

    - New thermal driver for Nvidia, Tegra124 SOCTHERM driver, with
    support for DT thermal. From Mikko Perttunen.

    - New cooling device, based on common clock framework. From Eduardo
    Valentin.

    - a couple of small fixes in thermal core framework. From Srinivas
    Pandruvada, Javi Merino, Luis Henriques.

    - Dropping Armada A375-Z1 SoC thermal support as the chip is not in
    the market, armada folks decided to drop its support.

    - a couple of small fixes and cleanups in int340x thermal driver"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (58 commits)
    thermal: provide an UAPI header file
    Thermal/int340x: Clear the error value of the last acpi_bus_get_device() call
    thermal/powerclamp: add id for braswell cpu
    thermal: Intel SoC DTS: Don't do thermal zone update inside spin_lock
    Thermal: fix platform_no_drv_owner.cocci warnings
    Thermal/int340x: avoid unnecessary pointer casting
    thermal: int3403: Delete a check before thermal_zone_device_unregister()
    thermal/int3400: export uuids
    thermal: of: Extend current of-thermal.c code to allow setting emulated temp
    thermal: of: Extend of-thermal to export table of trip points
    thermal: of: Rename struct __thermal_trip to struct thermal_trip
    thermal: of: Extend of-thermal.c to provide check if trip point is valid
    thermal: of: Extend of-thermal.c to provide number of trip points
    thermal: Fix error path in thermal_init()
    thermal: lock the thermal zone when switching governors
    thermal: core: ignore invalid trip temperature
    thermal: armada: Remove support for A375-Z1 SoC
    thermal: rockchip: add driver for thermal
    dt-bindings: document Rockchip thermal
    thermal: exynos: remove exynos_tmu_data.h include
    ...

    Linus Torvalds
     

17 Dec, 2014

1 commit

  • There was a left over return here so the error handling isn't run.
    It leads to a small memory leak and a static checker warning.

    drivers/thermal/cpu_cooling.c:351 __cpufreq_cooling_register()
    info: ignoring unreachable code.

    Fixes: f6859014c7e7 ("thermal: cpu_cooling: Store frequencies in descending order")
    Acked-by: Viresh Kumar
    Signed-off-by: Dan Carpenter
    Signed-off-by: Eduardo Valentin

    Dan Carpenter
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

13 Dec, 2014

1 commit


12 Dec, 2014

3 commits


10 Dec, 2014

1 commit

  • As samsung thermal support is enabled only for ARCH_EXYNOS, there is no
    need to select ARCH_HAS_BANDGAP from the arch-specific code. Removing this
    dependency will also allow the driver to be enabled on 64-bit SoCs.

    Reviewed-by: Bartlomiej Zolnierkiewicz
    Reviewed-by: Lukasz Majewski
    Acked-by: Lukasz Majewski
    Signed-off-by: Abhilash Kesavan
    Signed-off-by: Eduardo Valentin

    Abhilash Kesavan
     

09 Dec, 2014

11 commits

  • Previously the return value of the last acpi_bus_get_device() was
    returned. However, since we only report those issues, it should be
    cleared to continue as expected.

    Signed-off-by: Ilkka Koskinen
    Acked-by: Jacob Pan

    Ilkka Koskinen
     
  • Zhang Rui
     
  • Braswell also has package C-states which can be used for idle
    injection. This patch adds Braswell CPU ID in intel powerclamp
    driver.

    Signed-off-by: Jacob Pan
    Signed-off-by: Zhang Rui

    Jacob Pan
     
  • The driver calls spin_lock_irqsave during DTS interrupt. The interrupt
    handle then calls thermal_zone_device_update which implicitly calls
    a sleep function and produce the following bug:

    BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97
    in_atomic(): 1, irqs_disabled(): 1, pid: 920, name: irq/86-soc_dts
    CPU: 0 PID: 920 Comm: irq/86-soc_dts Tainted: G E 3.17.0-rc2+ #1
    Hardware name: Intel Corp. VALLEYVIEW B3 PLATFORM/NOTEBOOK, BIOS BYTICRB1.86C.0092.R31.1408290850 08/29/2014
    00000000 00000000 c25dbe74 c1818cfd f3cc488c c25dbe9c c1059305 c1b4063b
    00000001 00000001 00000398 f3cc488c f6817644 f6817644 f3ecc6c0 c25dbea8
    c18208f2 f6817400 c25dbebc c159b0bb c25dbedc f6817400 f32a2300 c25dbee8
    Call Trace:
    [] dump_stack+0x48/0x60
    [] __might_sleep+0xec/0xf4
    [] mutex_lock+0x1c/0x34
    [] thermal_zone_get_temp+0x34/0x59
    [] thermal_zone_device_update+0x2d/0xcb
    [] ? iosf_mbi_write+0x6c/0x74 [iosf_mbi]
    [] soc_irq_thread_fn+0x10c/0x163 [intel_soc_dts_thermal]
    [] irq_thread_fn+0x18/0x2a
    [] irq_thread+0x81/0x11f
    [] ? irq_finalize_oneshot+0x7c/0x7c
    [] ? irq_thread+0x11f/0x11f
    [] ? wake_threads_waitq+0x31/0x31
    [] kthread+0x87/0x8c
    [] ret_from_kernel_thread+0x21/0x30
    [] ? __kthread_parkme+0x55/0x55

    Signed-off-by: Maurice Petallo
    Acked-by: Srinivas Pandruvada
    Acked-by: Eduardo Valentin
    CC: Kweh, Hock Leong
    Signed-off-by: Zhang Rui

    Maurice Petallo
     
  • …inux-soc-thermal into eduardo-soc-thermal

    Zhang Rui
     
  • drivers/thermal/int340x_thermal/int3403_thermal.c:468:3-8: No need to set .owner here. The core will do it.

    Remove .owner field if calls are used which set it automatically

    Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

    Signed-off-by: Fengguang Wu
    Acked-by: Zhang Rui
    Signed-off-by: Zhang Rui

    Wu Fengguang
     
  • Avoid pointer casting which may also lead to problems on big endian
    64 bit systems.

    Reported-by: Dan Carpenter
    Signed-off-by: Jacob Pan
    Signed-off-by: Zhang Rui

    Jacob Pan
     
  • The thermal_zone_device_unregister() function tests whether its argument
    is NULL and then returns immediately. Thus the test around the call
    is not needed.

    This issue was detected by using the Coccinelle software.

    Signed-off-by: Markus Elfring
    Signed-off-by: Zhang Rui

    Markus Elfring
     
  • INT3400 currently supports only one policy, which can't be changed.
    This change exports all available policies (uuids) to user space and
    allow this to be changed.
    It introduces an attribute group uuids in INT3400 platform driver.
    There are two attributes exposed:
    - available_uuids
    - current_uuid

    User space can set current_uuid via this interface to one of the
    available uuids. The uuid change is communicated to firmware, only
    when the current zone mode is changed to "enabled". So the ideal
    sequence should be
    - set INT3400 zone mode to "disabled"
    - change current_uuid
    - set INT3400 zone mode to "enabled"

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Zhang Rui

    Srinivas Pandruvada
     
  • The return code from ->get_max_state() callback was not checked during
    binding cooling device to thermal zone device.

    Signed-off-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Lukasz Majewski
     
  • Before this change it was only possible to set get_temp() and get_trend()
    methods to be used in the common code handling passing parameters via
    device tree to "cpu-thermal" CPU thermal zone device.

    Now it is possible to also set emulated value of temperature for debug
    purposes.

    Signed-off-by: Lukasz Majewski
    Acked-by: Eduardo Valentin
    Signed-off-by: Eduardo Valentin

    Lukasz Majewski