summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* thermal: cpu_cooling: pr_err() strings should end with newlinesArvind Yadav2017-11-011-1/+1
| | | | | | | | | | pr_err() messages should end with a new-line to avoid other messages being concatenated. Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Javi Merino <javi.merino@kernel.org> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: add brcmstb AVS TMON driverBrian Norris2017-11-014-1/+396
| | | | | | | | | | | | | | | | | | The AVS TMON core provides temperature readings, a pair of configurable high- and low-temperature threshold interrupts, and an emergency over-temperature chip reset. The driver utilizes the first two to provide temperature readings and high-temperature notifications to applications. The over-temperature reset is not exposed to applications; this reset threshold is critical to the system and should be set with care within the bootloader. Applications may choose to utilize the notification mechanism, the temperature reading mechanism (e.g., through polling), or both. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* Documentation: devicetree: add binding for Broadcom STB AVS TMONBrian Norris2017-11-012-0/+28
| | | | | | | | | Add binding for Broadcom STB thermal. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Add support for hi3660 SoCKevin Wangtao2017-11-011-1/+144
| | | | | | | | | | | | This patch adds the support for thermal sensor on the Hi3660 SoC. Hi3660 tsensor support alarm in alarm threshold, it also has a configurable hysteresis interval, interrupt will be triggered when temperature rise above the alarm threshold or fall below the hysteresis threshold. Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Prepare to add support for other hisi platformsKevin Wangtao2017-11-011-45/+87
| | | | | | | | | | | | For platform compatibility, add the tsensor ops to a thermal data structure. Each platform has its own probe function to register proper tsensor ops function to the pointer, platform related resource request are also implemented in the platform probe function. Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Add platform prefix to function nameKevin Wangtao2017-11-011-72/+73
| | | | | | | | | | | | | | | | As the next patches will provide support for the hikey3660's sensor, several functions with the same purpose but for different platforms will be introduced. In order to make a clear distinction between them, let's prefix the function names with the platform name. This patch has no functional changes, only name changes. Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Put platform code togetherKevin Wangtao2017-11-011-38/+38
| | | | | | | | | | | Reorganize the code for next patches by moving the functions upper in the file which will prevent a forward declaration. There is no functional change here. Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/qcom-spmi: Use devm_iio_channel_getDaniel Lezcano2017-11-011-29/+14Star
| | | | | | | | | | | | The iio_channel_get() function has now its devm_ version. Use it and remove all the rollback code for iio_channel_release() as well as the .remove ops. [Compiled tested only] Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/generic-iio-adc: Switch tz request to devm versionDaniel Lezcano2017-11-011-20/+4Star
| | | | | | | | | | | | | | | | | | Everything mentionned here: https://lkml.org/lkml/2016/4/20/850 This driver was added before the devm_iio_channel_get() function version was merged. The sensor should be released before the iio channel, thus we had to use the non-devm version of thermal_zone_of_sensor_register(). Now the devm_iio_channel_get() is available, do the corresponding change in this driver and remove gadc_thermal_remove(). [Compiled tested only] Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/step_wise: Fix temperature regulation misbehaviorDaniel Lezcano2017-11-011-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a particular situation when the cooling device is cpufreq and the heat dissipation is not efficient enough where the temperature increases little by little until reaching the critical threshold and leading to a SoC reset. The behavior is reproducible on a hikey6220 with bad heat dissipation (eg. stacked with other boards). Running a simple C program doing while(1); for each CPU of the SoC makes the temperature to reach the passive regulation trip point and ends up to the maximum allowed temperature followed by a reset. This issue has been also reported by running the libhugetlbfs test suite. What is observed is a ping pong between two cpu frequencies, 1.2GHz and 900MHz while the temperature continues to grow. It appears the step wise governor calls get_target_state() the first time with the throttle set to true and the trend to 'raising'. The code selects logically the next state, so the cpu frequency decreases from 1.2GHz to 900MHz, so far so good. The temperature decreases immediately but still stays greater than the trip point, then get_target_state() is called again, this time with the throttle set to true *and* the trend to 'dropping'. From there the algorithm assumes we have to step down the state and the cpu frequency jumps back to 1.2GHz. But the temperature is still higher than the trip point, so get_target_state() is called with throttle=1 and trend='raising' again, we jump to 900MHz, then get_target_state() is called with throttle=1 and trend='dropping', we jump to 1.2GHz, etc ... but the temperature does not stabilizes and continues to increase. [ 237.922654] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 237.922678] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 237.922690] thermal cooling_device0: cur_state=0 [ 237.922701] thermal cooling_device0: old_target=0, target=1 [ 238.026656] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 238.026680] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=1 [ 238.026694] thermal cooling_device0: cur_state=1 [ 238.026707] thermal cooling_device0: old_target=1, target=0 [ 238.134647] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 238.134667] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 238.134679] thermal cooling_device0: cur_state=0 [ 238.134690] thermal cooling_device0: old_target=0, target=1 In this situation the temperature continues to increase while the trend is oscillating between 'dropping' and 'raising'. We need to keep the current state untouched if the throttle is set, so the temperature can decrease or a higher state could be selected, thus preventing this oscillation. Keeping the next_target untouched when 'throttle' is true at 'dropping' time fixes the issue. The following traces show the governor does not change the next state if trend==2 (dropping) and throttle==1. [ 2306.127987] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 2306.128009] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 2306.128021] thermal cooling_device0: cur_state=0 [ 2306.128031] thermal cooling_device0: old_target=0, target=1 [ 2306.231991] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 2306.232016] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=1 [ 2306.232030] thermal cooling_device0: cur_state=1 [ 2306.232042] thermal cooling_device0: old_target=1, target=1 [ 2306.335982] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=0,throttle=1 [ 2306.336006] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=0,throttle=1 [ 2306.336021] thermal cooling_device0: cur_state=1 [ 2306.336034] thermal cooling_device0: old_target=1, target=1 [ 2306.439984] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 2306.440008] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=0 [ 2306.440022] thermal cooling_device0: cur_state=1 [ 2306.440034] thermal cooling_device0: old_target=1, target=0 [ ... ] After a while, if the temperature continues to increase, the next state becomes 2 which is 720MHz on the hikey. That results in the temperature stabilizing around the trip point. [ 2455.831982] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 2455.832006] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=0 [ 2455.832019] thermal cooling_device0: cur_state=1 [ 2455.832032] thermal cooling_device0: old_target=1, target=1 [ 2455.935985] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=0,throttle=1 [ 2455.936013] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=0,throttle=0 [ 2455.936027] thermal cooling_device0: cur_state=1 [ 2455.936040] thermal cooling_device0: old_target=1, target=1 [ 2456.043984] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=0,throttle=1 [ 2456.044009] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=0,throttle=0 [ 2456.044023] thermal cooling_device0: cur_state=1 [ 2456.044036] thermal cooling_device0: old_target=1, target=1 [ 2456.148001] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=1,throttle=1 [ 2456.148028] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=1,throttle=1 [ 2456.148042] thermal cooling_device0: cur_state=1 [ 2456.148055] thermal cooling_device0: old_target=1, target=2 [ 2456.252009] thermal thermal_zone0: Trip0[type=1,temp=65000]:trend=2,throttle=1 [ 2456.252041] thermal thermal_zone0: Trip1[type=1,temp=75000]:trend=2,throttle=0 [ 2456.252058] thermal cooling_device0: cur_state=2 [ 2456.252075] thermal cooling_device0: old_target=2, target=1 IOW, this change is needed to keep the state for a cooling device if the temperature trend is oscillating while the temperature increases slightly. Without this change, the situation above leads to a catastrophic crash by a hardware reset on hikey. This issue has been reported to happen on an OMAP dra7xx also. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Keerthy <j-keerthy@ti.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Leo Yan <leo.yan@linaro.org> Tested-by: Keerthy <j-keerthy@ti.com> Reviewed-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Use round up step valueKevin Wangtao2017-11-011-14/+8Star
| | | | | | | | | | | | Use round up division to ensure the programmed value of threshold and the lag are not less than what we set, and in order to keep the accuracy while using round up division, the step value should be a rounded up value. There is no need to use hisi_thermal_round_temp. Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Move the clk setup in the corresponding functionsKevin Wangtao2017-11-011-20/+9Star
| | | | | | | | | | | | The sensor's clock is enabled and disabled outside of the probe and disable function. Moving the corresponding action in the hisi_thermal_setup() and hisi_thermal_disable_sensor(), factors out some lines of code and makes the code more symmetric. Signed-off-by: Kevin Wangtao <kevin.wangtao@linaro.org> Tested-by: Daniel Lezcano <daniel.lezcano@linaro.org> # hikey6220 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Remove mutex_lock in the codeDaniel Lezcano2017-11-011-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | The mutex is used to protect against writes in the configuration register. That happens at probe time, with no possible race yet. Then when the module is unloaded and at suspend/resume. When the module is unloaded, it is an userspace operation, thus via a process. Suspending the system goes through the freezer to suspend all the tasks synchronously before continuing. So it is not possible to hit the suspend ops in this driver while we are unloading it. The resume is the same situation than the probe. In other words, even if there are several places where we write the configuration register, there is no situation where we can write it at the same time, so far as I can judge Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Remove thermal data back pointerDaniel Lezcano2017-11-011-6/+5Star
| | | | | | | | | | | The presence of the thermal data pointer in the sensor structure has the unique purpose of accessing the thermal data in the interrupt handler. The sensor pointer is passed when registering the interrupt handler, replace the cookie by the thermal data pointer, so the back pointer is no longer needed. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Convert long to intDaniel Lezcano2017-11-011-2/+2
| | | | | | | | | | | There is no point to specify the temperature as long variable, the int is enough. Replace all long variables to int, so making the code consistent. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Rename and remove unused fieldDaniel Lezcano2017-11-011-10/+8Star
| | | | | | | | | | Rename the 'sensors' field to 'sensor' as we describe only one sensor. Remove the 'sensor_temp' as it is no longer used. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Remove costly sensor inspectionDaniel Lezcano2017-11-011-110/+93Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sensor is all setup, bind, resetted, acked, etc... every single second. That was the way to workaround a problem with the interrupt bouncing again and again. With the following changes, we fix all in one: - Do the setup, one time, at probe time - Add the IRQF_ONESHOT, ack the interrupt in the threaded handler - Remove the interrupt handler - Set the correct value for the LAG register - Remove all the irq_enabled stuff in the code as the interruption handling is fixed - Remove the 3ms delay - Reorder the initialization routine to be in the right order It ends up to a nicer code and more efficient, the 3-5ms delay is removed from the get_temp() path. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Fix configuration register settingDaniel Lezcano2017-11-011-5/+29
| | | | | | | | | | | | | The TEMP0_CFG configuration register contains different field to set up the temperature controller. However in the code, nothing prevents a setup to overwrite the previous one: eg. writing the hdak value overwrites the sensor selection, the sensor selection overwrites the hdak value. In order to prevent such thing, use a regmap-like mechanism by reading the value before, set the corresponding bits and write the result. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Encapsulate register writes into helpersDaniel Lezcano2017-11-011-22/+70
| | | | | | | | Hopefully, the function name can help to clarify the semantic of the operations when writing in the register. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Remove pointless lockDaniel Lezcano2017-11-011-5/+1Star
| | | | | | | | | | | The threaded interrupt inspect the sensors structure to look in the temp threshold field, but this field is read-only in all the code, except in the probe function before the threaded interrupt is set. In other words there is not race window in the threaded interrupt when reading the field value. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Fix multiple alarm interrupts firingDaniel Lezcano2017-11-011-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DT specifies a threshold of 65000, we setup the register with a value in the temperature resolution for the controller, 64656. When we reach 64656, the interrupt fires, the interrupt is disabled. Then the irq thread runs and calls thermal_zone_device_update() which will call in turn hisi_thermal_get_temp(). The function will look if the temperature decreased, assuming it was more than 65000, but that is not the case because the current temperature is 64656 (because of the rounding when setting the threshold). This condition being true, we re-enable the interrupt which fires immediately after exiting the irq thread. That happens again and again until the temperature goes to more than 65000. Potentially, there is here an interrupt storm if the temperature stabilizes at this temperature. A very unlikely case but possible. In any case, it does not make sense to handle dozens of alarm interrupt for nothing. Fix this by rounding the threshold value to the controller resolution so the check against the threshold is consistent with the one set in the controller. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Simplify the temperature/step computationDaniel Lezcano2017-11-011-13/+28
| | | | | | | | | | | | | | | The step and the base temperature are fixed values, we can simplify the computation by converting the base temperature to milli celsius and use a pre-computed step value. That saves us a lot of mult + div for nothing at runtime. Take also the opportunity to change the function names to be consistent with the rest of the code. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Fix kernel panic on alarm interruptDaniel Lezcano2017-11-011-9/+9
| | | | | | | | | | | | | The threaded interrupt for the alarm interrupt is requested before the temperature controller is setup. This one can fire an interrupt immediately leading to a kernel panic as the sensor data is not initialized. In order to prevent that, move the threaded irq after the Tsensor is setup. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Remove the multiple sensors supportDaniel Lezcano2017-11-011-56/+19Star
| | | | | | | | | | | | | | | | By essence, the tsensor does not really support multiple sensor at the same time. It allows to set a sensor and use it to get the temperature, another sensor could be switched but with a delay of 3-5ms. It is difficult to read simultaneously several sensors without a big delay. Today, just one sensor is used, it is not necessary to deal with multiple sensors in the code. Remove them and if it is needed in the future add them on top of a code which will be clean up in the meantime. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Acked-by: Wangtao (Kevin, Kirin) <kevin.wangtao@hisilicon.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal/drivers/hisi: Fix missing interrupt enablementDaniel Lezcano2017-11-011-2/+3
| | | | | | | | | | | | | | | | | | | The interrupt for the temperature threshold is not enabled at the end of the probe function, enable it after the setup is complete. On the other side, the irq_enabled is not correctly set as we are checking if the interrupt is masked where 'yes' means irq_enabled=false. irq_get_irqchip_state(data->irq, IRQCHIP_STATE_MASKED, &data->irq_enabled); As we are always enabling the interrupt, it is pointless to check if the interrupt is masked or not, just set irq_enabled to 'true'. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Reviewed-by: Leo Yan <leo.yan@linaro.org> Tested-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: ti-soc-thermal: Fix ti_thermal_unregister_cpu_cooling NULL pointer ↵Tony Lindgren2017-11-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | on unload While debugging some PM issues and trying to remove all the loaded modules, I ran across the following when unloading ti-soc-thermal: Unable to handle kernel NULL pointer dereference at virtual address 000000b4 ... [<c08db340>] (kobject_put) from [<bf28954c>] (ti_thermal_unregister_cpu_cooling+0x20/0x28 [ti_soc_thermal]) [<bf28954c>] (ti_thermal_unregister_cpu_cooling [ti_soc_thermal]) from [<bf287c88>] (ti_bandgap_remove+0x3c/0x104 [ti_soc_thermal]) [<bf287c88>] (ti_bandgap_remove [ti_soc_thermal]) from [<c0610d48>] (platform_drv_remove+0x24/0x3c) [<c0610d48>] (platform_drv_remove) from [<c060f114>] (device_release_driver_internal+0x160/0x208) [<c060f114>] (device_release_driver_internal) from [<c060f200>] (driver_detach+0x38/0x6c) [<c060f200>] (driver_detach) from [<c060e2d4>] (bus_remove_driver+0x4c/0xa0) [<c060e2d4>] (bus_remove_driver) from [<c01f2370>] (SyS_delete_module+0x168/0x238) [<c01f2370>] (SyS_delete_module) from [<c0108240>] (ret_fast_syscall+0x0/0x28) Cc: Keerthy <j-keerthy@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: rcar_gen3_thermal: fix initialization sequence for H3 ES2.0Niklas Söderlund2017-11-011-19/+15Star
| | | | | | | | | | | | | The initialization sequence for H3 (r8a7795) ES1.x and ES2.0 is different. H3 ES2.0 and later uses the same sequence as M3 (r8a7796) ES1.0. Fix this by not looking at compatible strings and instead defaulting to the r8a7796 initialization sequence and use soc_device_match() to check for H3 ES1.x. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: armada: fix formula documentation commentBaruch Siach2017-11-011-1/+1
| | | | | | | | | The formula implementation at armada_get_temp() indicates that the sign in the formula is inverted. Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: tegra: remove null check for dev pointerNicolin Chen2017-11-011-1/+1
| | | | | | | | | The dev pointer is going through a null check after a dereference. So this patch removes that useless check since the driver does not pass a null dev pointer in any case. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: enable broadcom menu for arm64 bcm2835Allen Wild2017-11-011-1/+1
| | | | | | | | | | | | | | Moving the bcm2835 thermal driver to the broadcom directory prevented it from getting enabled for arm64 builds, since the broadcom directory is only available when 32-bit specific ARCH_BCM is set. Fix this by enabling the Broadcom menu for ARCH_BCM or ARCH_BCM2835. Fixes: 6892cf07e733 ("thermal: bcm2835: move to the broadcom subdirectory") Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Allen Wild <allenwild93@gmail.com> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* thermal: rockchip: Support the RV1108 SoC in thermal driverRocky Hao2017-11-011-0/+67
| | | | | | | | RV1108 SOC has one Temperature Sensor for CPU. Reviewed-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* dt-bindings: rockchip-thermal: Support the RV1108 SoC compatibleRocky Hao2017-11-011-0/+1
| | | | | | | | Add a new compatible for thermal founding on RV1108 SoCs. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
* Linux 4.14-rc1Linus Torvalds2017-09-171-2/+2
|
* Merge tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifsLinus Torvalds2017-09-164-16/+16
|\ | | | | | | | | | | | | | | | | | | | | | | Pull UBI updates from Richard Weinberger: "Minor improvements" * tag 'upstream-4.14-rc1' of git://git.infradead.org/linux-ubifs: UBI: Fix two typos in comments ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate" ubi: pr_err() strings should end with newlines ubi: pr_err() strings should end with newlines ubi: pr_err() strings should end with newlines
| * UBI: Fix two typos in commentsUwe Kleine-König2017-09-131-2/+2
| | | | | | | | | | Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * ubi: fastmap: fix spelling mistake: "invalidiate" -> "invalidate"Colin Ian King2017-09-131-1/+1
| | | | | | | | | | | | | | | | Trivial fix to spelling mistake in ubi_err error message Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at>
| * ubi: pr_err() strings should end with newlinesBen Dooks2017-09-131-3/+3
| | | | | | | | | | | | | | | | In build.c, the following pr_err calls should be terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
| * ubi: pr_err() strings should end with newlinesBen Dooks2017-09-131-4/+4
| | | | | | | | | | | | | | | | | | In ubi_attach_mtd_dev() the pr_err() calls should have their messgaes terminated with a new-line to avoid other messages being concatenated onto the end. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
| * ubi: pr_err() strings should end with newlinesBen Dooks2017-09-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | The ubi_init() function has a few error paths that use the pr_err() to output errors. These should have new lines on them as pr_err() does not automatically do this. This fixes issues where if multiple mtd fail to bind to ubi the console output starts wrapping around. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
* | Merge branch 'for-linus-4.14-rc1' of ↵Linus Torvalds2017-09-1614-27/+41
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - minor improvements - fixes for Debian's new gcc defaults (pie enabled by default) - fixes for XSTATE/XSAVE to make UML work again on modern systems * 'for-linus-4.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: return negative in tuntap_open_tramp() um: remove a stray tab um: Use relative modversions with LD_SCRIPT_DYN um: link vmlinux with -no-pie um: Fix CONFIG_GCOV for modules. Fix minor typos and grammar in UML start_up help um: defconfig: Cleanup from old Kconfig options um: Fix FP register size for XSTATE/XSAVE
| * | um: return negative in tuntap_open_tramp()Dan Carpenter2017-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The intention is to return negative error codes. "pid" is already negative but we accidentally negate it again back to positive. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: remove a stray tabDan Carpenter2017-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Static checkers would urge us to add curly braces to this code, but actually the code works correctly. It just isn't indented right. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: Use relative modversions with LD_SCRIPT_DYNThomas Meyer2017-09-131-0/+1
| | | | | | | | | | | | | | | | | | | | | When building a dynamic kernel image use relative symbols with MODVERSIONS. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: link vmlinux with -no-pieThomas Meyer2017-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Debian's gcc defaults to pie. The global Makefile already defines the -fno-pie option. Link UML dynamic kernel image also with -no-pie to fix the build. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: Fix CONFIG_GCOV for modules.Thomas Meyer2017-09-131-0/+7
| | | | | | | | | | | | | | | | | | | | | Explicitly export symbols so modpost doesn't complain. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | Fix minor typos and grammar in UML start_up helpJames Pack2017-09-131-3/+3
| | | | | | | | | | | | | | | Signed-off-by: James Pack <jpack61108@gmail.com> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: defconfig: Cleanup from old Kconfig optionsKrzysztof Kozlowski2017-09-132-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | Remove old, dead Kconfig option INET_LRO. It is gone since commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library"). Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Richard Weinberger <richard@nod.at>
| * | um: Fix FP register size for XSTATE/XSAVEThomas Meyer2017-09-136-19/+27
| |/ | | | | | | | | | | | | | | Hard code max size. Taken from https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/common/x86-xstate.h Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netLinus Torvalds2017-09-1648-234/+467
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull networking fixes from David Miller: 1) Fix hotplug deadlock in hv_netvsc, from Stephen Hemminger. 2) Fix double-free in rmnet driver, from Dan Carpenter. 3) INET connection socket layer can double put request sockets, fix from Eric Dumazet. 4) Don't match collect metadata-mode tunnels if the device is down, from Haishuang Yan. 5) Do not perform TSO6/GSO on ipv6 packets with extensions headers in be2net driver, from Suresh Reddy. 6) Fix scaling error in gen_estimator, from Eric Dumazet. 7) Fix 64-bit statistics deadlock in systemport driver, from Florian Fainelli. 8) Fix use-after-free in sctp_sock_dump, from Xin Long. 9) Reject invalid BPF_END instructions in verifier, from Edward Cree. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (43 commits) mlxsw: spectrum_router: Only handle IPv4 and IPv6 events Documentation: link in networking docs tcp: fix data delivery rate bpf/verifier: reject BPF_ALU64|BPF_END sctp: do not mark sk dumped when inet_sctp_diag_fill returns err sctp: fix an use-after-free issue in sctp_sock_dump netvsc: increase default receive buffer size tcp: update skb->skb_mstamp more carefully net: ipv4: fix l3slave check for index returned in IP_PKTINFO net: smsc911x: Quieten netif during suspend net: systemport: Fix 64-bit stats deadlock net: vrf: avoid gcc-4.6 warning qed: remove unnecessary call to memset tg3: clean up redundant initialization of tnapi tls: make tls_sw_free_resources static sctp: potential read out of bounds in sctp_ulpevent_type_enabled() MAINTAINERS: review Renesas DT bindings as well net_sched: gen_estimator: fix scaling error in bytes/packets samples nfp: wait for the NSP resource to appear on boot nfp: wait for board state before talking to the NSP ...
| * | mlxsw: spectrum_router: Only handle IPv4 and IPv6 eventsIdo Schimmel2017-09-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver doesn't support events from address families other than IPv4 and IPv6, so ignore them. Otherwise, we risk queueing a work item before it's initialized. This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES is enabled, as the VRF driver will try to add an l3mdev rule for the IPMR family. Fixes: 65e65ec137f4 ("mlxsw: spectrum_router: Don't ignore IPv6 notifications") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reported-by: Andreas Rammhold <andreas@rammhold.de> Reported-by: Florian Klink <flokli@flokli.de> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>