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
     

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


09 Dec, 2014

14 commits


08 Dec, 2014

3 commits


25 Nov, 2014

2 commits

  • The Armada 375 Z1 SoC revision is no longer supported. This commit
    removes the quirk needed for the thermal sensor.

    Acked-by: Jason Cooper
    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Eduardo Valentin

    Ezequiel Garcia
     
  • Thermal is TS-ADC Controller module supports
    user-defined mode and automatic mode.

    User-defined mode refers,TSADC all the control signals entirely by
    software writing to register for direct control.

    Automaic mode refers to the module automatically poll TSADC output,
    and the results were checked.If you find that the temperature High
    in a period of time,an interrupt is generated to the processor
    down-measures taken;If the temperature over a period of time High,
    the resulting TSHUT gave CRU module,let it reset the entire chip,
    or via GPIO give PMIC.

    Signed-off-by: zhaoyifeng
    Signed-off-by: Caesar Wang
    Reviewed-by: Dmitry Torokhov
    Signed-off-by: Eduardo Valentin

    Caesar Wang
     

22 Nov, 2014

2 commits


21 Nov, 2014

1 commit

  • Existing code updates cupfreq policy only while executing
    cpufreq_apply_cooling() function (i.e. when notify_device != NOTIFY_INVALID).
    It doesn't apply constraints when cpufreq policy update happens from any other
    place but it should update the cpufreq policy with thermal constraints every
    time when there is a cpufreq policy update, to keep state of
    cpufreq_cooling_device and max_feq of cpufreq policy in sync. For instance
    while resuming cpufreq updates cpufreq_policy and it restores default
    policy->usr_policy values irrespective of cooling device's cpufreq_state since
    notification gets missed because (notify_device == NOTIFY_INVALID).
    Another problem, is that userspace is able to change max_freq irrespective of
    cooling device's state, as notification gets missed.

    This patch modifies code to maintain a global cpufreq_dev_list and applies
    constraints of all matching cooling devices for policy's cpu when there is any
    policy update(ends up applying the lowest max_freq among the matching cpu
    cooling devices).

    This patch also removes redundant check (max_freq > policy->user_policy.max),
    as cpufreq framework takes care of user_policy constraints already where ever
    required, otherwise its causing an issue while increasing max_freq in normal
    scenerio as it restores max_freq with policy->user_policy.max which is old
    (smaller) value.

    Signed-off-by: Yadwinder Singh Brar
    Signed-off-by: Eduardo Valentin

    Yadwinder Singh Brar
     

20 Nov, 2014

13 commits

  • There is no longer need to share defines between exynos_tmu.c
    and exynos_tmu_data.c (as they are now only used by the former
    file) so move them accordingly. Then move externs for struct
    exynos_tmu_init_data instances to exynos_tmu.h and remove no
    longer needed exynos_tmu_data.h include.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • __EXYNOS5420_TMU_DATA macro is now identical to __EXYNOS5260_TMU_DATA
    one and can be removed.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Maximum theoretical size saving (i.e. with only Exynos5410
    SoC support enabled in kernel config so all SoC dependend
    Exynos thermal driver code was dropped) is 4096 bytes so
    there is no much sense in keeping these ifdefs (especially
    given that they are useless once the driver gets updated to
    use device tree).

    While at it remove needless 'void *' casts.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Replace pdata->test_mux check in get_con_reg() by explicitly
    checking for SoC type.

    Also since the used pdata->test_mux value is always identical
    use it directly and remove pdata->test_mux completely.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Remove unused TMU_SUPPORT_MULTI_INST flag, no longer
    needed TMU_SUPPORTS() macro and features field from
    struct exynos_tmu_platform_data.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Replace TMU_SUPPORT_ADDRESS_MULTIPLE flag check in exynos_map_dt_data()
    by an explicit check for a SoC type (only Exynos5420 with TRIMINFO
    quirk and Exynos5440 have TMU_SUPPORT_ADDRESS_MULTIPLE flag set in
    their struct exynos_tmu_init_data instances).

    Please note that this requires moving SoC type assignment and verification
    from exynos_tmu_probe() to exynos_map_dt_data() so it happens earlier
    (which is a good thing in itself).

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Replace TMU_SUPPORT_EMULATION flag check in exynos_tmu_set_emulation()
    by an explicit check for a SoC type (all SoC types except Exynos4210
    have TMU_SUPPORT_EMULATION flag set in their struct exynos_tmu_init_data
    instances).

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Replace TMU_SUPPORT_EMUL_TIME flag check in get_emul_con_reg()
    by an explicit check for a SoC type (all SoC types except
    Exynos4210 and Exynos5440 have TMU_SUPPORT_EMUL_TIME flag set
    in their struct exynos_tmu_init_data instances).

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Replace TMU_SUPPORT_FALLING_TRIP flag check in
    exynos[4210,5440]_tmu_control() by an explicit check
    for a SoC type (all SoC types except Exynos4210 have
    TMU_SUPPORT_FALLING_TRIP flag set in their struct
    exynos_tmu_init_data instances).

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Add ->tmu_clear_irqs method to struct exynos_tmu_data and use
    it instead exynos_tmu_clear_irqs(). Then add ->tmu_clear_irqs
    implementations for Exynos4210+ and Exynos5440. Finally
    remove no longer needed reg->tmu_int[stat,clear] abstractions
    and struct exynos_tmu_registers instances.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Add ->tmu_set_emulation method to struct exynos_tmu_data and
    use it in exynos_tmu_set_emulation(). Then add ->tmu_set_emulation
    implementations for Exynos4412+ and Exynos5440. Finally remove
    no longer needed reg->emul_con abstraction.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Factor out code for preparing EMUL_CON register value from
    exynos_tmu_set_emulation() into get_emul_con_reg().

    This is a preparation for introducing per-SoC type
    tmu_set_emulation method.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz
     
  • Add ->tmu_read method to struct exynos_tmu_data and use it
    in exynos_tmu_control(). Then add ->tmu_read implementations
    for Exynos4210, Exynos4412+ and Exynos5440. Finally remove
    no longer needed reg->tmu_cur_temp abstractions.

    There should be no functional changes caused by this patch.

    Cc: Amit Daniel Kachhap
    Cc: Lukasz Majewski
    Cc: Eduardo Valentin
    Cc: Zhang Rui
    Signed-off-by: Bartlomiej Zolnierkiewicz
    Acked-by: Kyungmin Park
    Tested-by: Lukasz Majewski
    Signed-off-by: Eduardo Valentin

    Bartlomiej Zolnierkiewicz