summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-12-10thermal: intel: pch: use macro for temperature calculationSumeet Pawnikar
Use macro for temperature calculation Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201210124801.13850-1-sumeet.r.pawnikar@intel.com
2020-12-10thermal: int340x: processor_thermal: Add mailbox driverSrinivas Pandruvada
Added processor thermal device mail box interface for workload hints setting. These hints will give indication to hardware to better manage power and thermals. The supported hints are: idle semi_active burusty sustained battery_life For example when the system is on battery, the hardware can be less aggressive in power ramp up. This will create an attribute group at /sys/bus/pci/devices/0000:00:04.0/workload_request This folder contains two attributes: workload_available_types : (RO): This shows available workload types workload_type: (RW) : Allows to set and get current workload type setting Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126171829.945969-4-srinivas.pandruvada@linux.intel.com
2020-12-10thermal: int340x: processor_thermal: Add RFIM driverSrinivas Pandruvada
Add support for RFIM (Radio Frequency Interference Mitigation) support via processor thermal PCI device. This drivers allows adjustment of FIVR (Fully Integrated Voltage Regulator) and DDR (Double Data Rate) frequencies to avoid RF interference with WiFi and 5G. Switching voltage regulators (VR) generate radiated EMI or RFI at the fundamental frequency and its harmonics. Some harmonics may interfere with very sensitive wireless receivers such as Wi-Fi and cellular that are integrated into host systems like notebook PCs. One of mitigation methods is requesting SOC integrated VR (IVR) switching frequency to a small % and shift away the switching noise harmonic interference from radio channels. OEM or ODMs can use the driver to control SOC IVR operation within the range where it does not impact IVR performance. DRAM devices of DDR IO interface and their power plane can generate EMI at the data rates. Similar to IVR control mechanism, Intel offers a mechanism by which DDR data rates can be changed if several conditions are met: there is strong RFI interference because of DDR; CPU power management has no other restriction in changing DDR data rates; PC ODMs enable this feature (real time DDR RFI Mitigation referred to as DDR-RFIM) for Wi-Fi from BIOS. This change exports two folders under /sys/bus/pci/devices/0000:00:04.0. One folder "fivr" contains all attributes exposed for controling FIVR features. The other folder "dvfs" contains all attributes for DDR features. Changes done to implement: - New module for rfim interfaces - Two new per processor features for DDR and FIVR - Enable feature for Tiger Lake (FIVR only) and Alder Lake The attributes exposed and explanation: FIVR attributes vco_ref_code_lo (RW): The VCO reference code is an 11-bit field and controls the FIVR switching frequency. This is the 3-bit LSB field. vco_ref_code_hi (RW): The VCO reference code is an 11-bit field and controls the FIVR switching frequency. This is the 8-bit MSB field. spread_spectrum_pct (RW): Set the FIVR spread spectrum clocking percentage spread_spectrum_clk_enable (RW): Enable/disable of the FIVR spread spectrum clocking feature rfi_vco_ref_code (RW): This field is a read only status register which reflects the current FIVR switching frequency fivr_fffc_rev (RW): This field indicated the revision of the FIVR HW. DVFS attributes rfi_restriction_run_busy (RW): Request the restriction of specific DDR data rate and set this value 1. Self reset to 0 after operation. rfi_restriction_err_code (RW): Values: 0 :Request is accepted, 1:Feature disabled, 2: the request restricts more points than it is allowed rfi_restriction_data_rate_Delta (RW): Restricted DDR data rate for RFI protection: Lower Limit rfi_restriction_data_rate_Base (RW): Restricted DDR data rate for RFI protection: Upper Limit ddr_data_rate_point_0 (RO): DDR data rate selection 1st point ddr_data_rate_point_1 (RO): DDR data rate selection 2nd point ddr_data_rate_point_2 (RO): DDR data rate selection 3rd point ddr_data_rate_point_3 (RO): DDR data rate selection 4th point rfi_disable (RW): Disable DDR rate change feature Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126171829.945969-3-srinivas.pandruvada@linux.intel.com
2020-12-10thermal: int340x: processor_thermal: Add AlderLake PCI device idSrinivas Pandruvada
Added AlderLake PCI device id to support processor thermal driver. Reuse the feature set (just includes RAPL) from previous generations. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126171829.945969-2-srinivas.pandruvada@linux.intel.com
2020-12-10thermal: int340x: processor_thermal: Refactor MMIO interfaceSrinivas Pandruvada
The Processor Thermal PCI device supports multiple features. Currently we export only RAPL. But we need more features from this device exposed for Tiger Lake and Alder Lake based platforms. So re-structure the current MMIO interface, so that more features can be added cleanly. No functional changes are expected with this change. Changes done in this patch: - Using PCI_DEVICE_DATA(), hence names of defines changed - Move RAPL MMIO code to its own module - Move the RAPL MMIO offsets to RAPL MMIO module - Adjust Kconfig dependency of PROC_THERMAL_MMIO_RAPL - Per processor driver data now contains the supported features - Moved all the common data structures and defines to a common header file - This new header file contains all the processor_thermal_* interfaces - Based on the features supported the module interface is called - Each module atleast provides one add and one remove function Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126171829.945969-1-srinivas.pandruvada@linux.intel.com
2020-12-08thermal: rcar_gen3_thermal: Add r8a779a0 supportNiklas Söderlund
Add support for R-Car V3U. The new THCODE values are taken from the example in the datasheet. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126223028.3119044-4-niklas.soderlund+renesas@ragnatech.se
2020-12-08dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 supportNiklas Söderlund
Add support for R-Car V3U. The V3U IP differs a bit from its siblings in such way that it have 4 TSC nodes and the interrupts are not routed to the INTC-AP but to the ECM. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126223028.3119044-2-niklas.soderlund+renesas@ragnatech.se
2020-12-07platform/x86/drivers/acerhdf: Check the interval value when it is setDaniel Lezcano
Currently the code checks the interval value when the temperature is read which is bad for two reasons: - checking and setting the interval in the get_temp callback is inaccurate and awful, that can be done when changing the value. - Changing the thermal zone structure internals is an abuse of the exported structure, moreover no lock is taken here. The goal of this patch is to solve the first item by using the 'set' function called when changing the interval. The check is done there and removed from the get_temp function. If the thermal zone was not initialized yet, the interval is not updated in this case as that will happen in the init function when registering the thermal zone device. I don't have any hardware to test the changes. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Peter Kaestle <peter@piie.net> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201203071738.2363701-2-daniel.lezcano@linaro.org
2020-12-07platform/x86/drivers/acerhdf: Use module_param_cb to set/get polling intervalDaniel Lezcano
The module parameter can be set by using ops to get and set the values. The change will allow to check the correctness of the interval value everytime it is changed instead of checking in the get_temp function. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Acked-by: Peter Kaestle <peter@piie.net> Acked-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20201203071738.2363701-1-daniel.lezcano@linaro.org
2020-12-04thermal: imx8mm: Disable the clock on probe failureFabio Estevam
Prior to returning an error in probe, disable the previously enabled clock. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201202232448.2692-2-festevam@gmail.com
2020-12-04thermal: imx8mm: Print the correct error codeFabio Estevam
Currently the error message does not print the correct error code. Fix it by initializing 'ret' to the proper error code. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201202232448.2692-1-festevam@gmail.com
2020-11-30thermal: rcar_gen3_thermal: Do not use interrupts for normal operationNiklas Söderlund
Remove the usage of interrupts for the normal temperature operation and depend on the polling performed by the thermal core. This is done to prepare to use the interrupts as they are intended to trigger once specific trip points are passed and not to react to temperature changes in the normal operational range. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201126220923.3107213-1-niklas.soderlund+renesas@ragnatech.se
2020-11-30thermal: core: Constify static attribute_group structsRikard Falkeborn
The only usage of these structs is to assign their address to the thermal_zone_attribute_groups array, which consists of pointers to const, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201128234342.36684-1-rikard.falkeborn@gmail.com
2020-11-26thermal: power allocator: change the 'k_*' always in estimate_pid_constants()Lukasz Luba
The PID coefficients should be estimated again when there was a change to sustainable power value made by user. This change removes unused argument 'force' and makes the function ready for such updates. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201124161025.27694-4-lukasz.luba@arm.com
2020-11-26thermal: power allocator: refactor sustainable power estimationLukasz Luba
The sustainable power value might come from the Device Tree or can be estimated in run time. The sustainable power might be updated by the user via sysfs interface, which should trigger new estimation of PID coefficients. There is no need to estimate it every time when the governor is called and temperature is high. Instead, store the estimated value and make it available via standard sysfs interface, so it can be checked from the user-space. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201124161025.27694-3-lukasz.luba@arm.com
2020-11-26thermal: power allocator: change the 'k_i' coefficient estimationLukasz Luba
Intelligent Power Allocation (IPA) is built around the PID controller concept. The initialization code tries to setup the environment based on the information available in DT or estimate the value based on minimum power reported by each of the cooling device. The estimation will have an impact on the PID controller behaviour via the related 'k_po', 'k_pu', 'k_i' coefficients and also on the power budget calculation. This change prevents the situation when 'k_i' is relatively big compared to 'k_po' and 'k_pu' values. This might happen when the estimation for 'sustainable_power' returned small value, thus 'k_po' and 'k_pu' are small. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Reviewed-by: Ionela Voinescu <ionela.voinescu@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201124161025.27694-2-lukasz.luba@arm.com
2020-11-17thermal: intel_pch_thermal: fix build for ACPI not enabledRandy Dunlap
The reference to acpi_gbl_FADT causes a build error when ACPI is not enabled. Fix by making that conditional on CONFIG_ACPI. ../drivers/thermal/intel/intel_pch_thermal.c: In function 'pch_wpt_suspend': ../drivers/thermal/intel/intel_pch_thermal.c:217:8: error: 'acpi_gbl_FADT' undeclared (first use in this function); did you mean 'acpi_get_type'? if (!(acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0)) ^~~~~~~~~~~~~ Fixes: ef63b043ac86 ("thermal: intel: pch: fix S0ix failure due to PCH temperature above threshold") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Amit Kucheria <amitk@kernel.org> Cc: linux-pm@vger.kernel.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201117023807.8266-1-rdunlap@infradead.org
2020-11-16thermal: amlogic: Add hwmon supportMartin Blumenstingl
Many monitoring tools read the CPU temperature using the hwmon interface. Expose the thermal sensors on Amlogic boards as hwmon devices. Without this lm_sensors' "sensors" tool does not find any temperature sensors. Now it prints: cpu_thermal-virtual-0 Adapter: Virtual device temp1: +44.7 C (crit = +110.0 C) ddr_thermal-virtual-0 Adapter: Virtual device temp1: +45.9 C (crit = +110.0 C) Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201115190658.631578-1-martin.blumenstingl@googlemail.com
2020-11-14thermal: intel_pch_thermal: Add PCI ids for Lewisburg PCH.Andres Freund
I noticed that I couldn't read the PCH temperature on my workstation (C620 series chipset, w/ 2x Xeon Gold 5215 CPUs) directly, but had to go through IPMI. Looking at the data sheet, it looks to me like the existing intel PCH thermal driver should work without changes for Lewisburg. I suspect there's some other PCI IDs missing. But I hope somebody at Intel would have an easier time figuring that out than I... Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Cc: Tushar Dave <tushar.n.dave@intel.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/lkml/20200115184415.1726953-1-andres@anarazel.de/ Signed-off-by: Andres Freund <andres@anarazel.de> Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@linux.intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201113204916.1144907-1-andres@anarazel.de
2020-11-12docs: thermal: time_in_state is displayed in msec and not usertimeViresh Kumar
The sysfs stats for cooling devices shows the time_in_state in msec, remove the unwanted usertime comment. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/d5461bdf9ab6b6fee7f28f538582edbb426aa077.1605004905.git.viresh.kumar@linaro.org
2020-11-12dt-bindings: thermal: rcar-thermal: Improve schema validationGeert Uytterhoeven
- Factor out common required properties, - "interrupts", "clocks", and "power-domains" are required on R-Mobile APE6, too, - Invert logic to simplify descriptions. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201028153541.1736279-1-geert+renesas@glider.be
2020-11-12thermal/drivers/cpufreq_cooling: Update cpufreq_state only if state has changedZhuguangqing
If state has not changed successfully and we updated cpufreq_state, next time when the new state is equal to cpufreq_state (not changed successfully last time), we will return directly and miss a freq_qos_update_request() that should have been. Fixes: 5130802ddbb1 ("thermal: cpu_cooling: Switch to QoS requests for freq limits") Cc: v5.4+ <stable@vger.kernel.org> # v5.4+ Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201106092243.15574-1-zhuguangqing83@gmail.com
2020-11-12thermal/drivers/hwmon: Cleanup coding style a bitBernard Zhao
Function thermal_add_hwmon_sysfs, hwmon will be NULL when new_hwmon_device = 0, so there is no need to check, kfree will handle NULL point. Signed-off-by: Bernard Zhao <bernard@vivo.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201102023121.3312-1-bernard@vivo.com
2020-11-12thermal: sun8i: Use bitmap API instead of open codeYangtao Li
The bitmap_* API is the standard way to access data in the bitfield. So convert irq_ack to return an unsigned long, and make things to use bitmap API. Signed-off-by: Yangtao Li <frank@allwinnertech.com> Acked-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201109114624.23035-1-frank@allwinnertech.com
2020-11-07thermal: intel: pch: fix S0ix failure due to PCH temperature above thresholdSumeet Pawnikar
When system tries to enter S0ix suspend state, just after active load scenarios, it fails due to PCH current temperature is higher than set threshold. This patch introduces delay loop mechanism that allows PCH temperature to go down below threshold during suspend so it won't fail to enter S0ix. Add delay loop timeout and count as module parameters for user to tune it, if required based on system design. This change notifies the different warning messages like when PCH temperature above the threshold and executing delay loop. Also, notify the messages when it success or failure for S0ix entry. Previously out of 1000 runs around 3 to 5 times it might fail to enter S0ix just after heavy workload. With this change, S0ix failures reduced as PCH cools down below threshold. Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201106170633.20838-1-sumeet.r.pawnikar@intel.com
2020-10-27thermal: mtk_thermal: make device_reset optionalFabien Parent
MT8516 does not support thermal reset. Use device_reset_optional instead of device_reset. Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201021164231.3029956-3-fparent@baylibre.com
2020-10-27dt-bindings: thermal: mediatek: add documentation for MT8516 SoCFabien Parent
Add binding documentation for the MediaTek MT8516 SoC. The SoC thermal IP is similar to MT2701. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201021164231.3029956-2-fparent@baylibre.com
2020-10-27dt-bindings: thermal: mediatek: make resets property optionalFabien Parent
MT8516 Thermal IP does not support reset. Make the resets property optional in order to be able to support MT8516 SoC. Signed-off-by: Fabien Parent <fparent@baylibre.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201021164231.3029956-1-fparent@baylibre.com
2020-10-27thermal/drivers/rcar: Replace spin_lock_irqsave by spin_lock in hard IRQTian Tao
On RT or even on mainline with 'threadirqs' on the command line all interrupts which are not explicitly requested with IRQF_NO_THREAD run their handlers in thread context. The same applies to soft interrupts. That means they are subject to the normal scheduler rules and no other code is going to acquire that lock from hard interrupt context either, so the irqsave() here is pointless in all cases. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/1603760790-37748-1-git-send-email-tiantao6@hisilicon.com
2020-10-27drivers/thermal/core: Optimize trip points checkBernard Zhao
The trip points are checked one by one with multiple condition branches where one condition is enough to disable the trip point. Merge all these conditions in a single 'OR' statement. Signed-off-by: Bernard Zhao <bernard@vivo.com> Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201027013743.62392-1-bernard@vivo.com [dlezcano] Changed patch description
2020-10-27thermal: core: Move power_actor_set_power into IPALukasz Luba
Since the power actor section has one function power_actor_set_power() move it into Intelligent Power Allocation (IPA). There is no other user of that helper function. It would also allow to remove the check of cdev_is_power_actor() because the code which calls it in IPA already does the needed check. Make the function static since only IPA use it. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201015112441.4056-5-lukasz.luba@arm.com
2020-10-27thermal: core: Remove unused functions in power actor sectionLukasz Luba
Since the Intelligent Power Allocation (IPA) uses different way to get minimum and maximum power for a given cooling device, the helper functions are not needed. There is no other code which uses them, so remove the helper functions. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201015112441.4056-4-lukasz.luba@arm.com
2020-10-27thermal: power_allocator: Respect upper and lower bounds for cooling deviceLukasz Luba
The thermal cooling device specified in DT might be instantiated for a thermal zone trip point with a limited set of OPPs to operate on. This configuration should be supported by Intelligent Power Allocation (IPA), since it is a standard for other governors. Change the code and allow IPA to get power value of lower and upper bound set for a given cooling device. Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201015112441.4056-3-lukasz.luba@arm.com
2020-10-26thermal: core: Add upper and lower limits to power_actor_set_powerMichael Kao
The upper and lower limits of thermal throttle state in the DT do not apply to the Intelligent Power Allocation (IPA) governor. Add the clamping for cooling device upper and lower limits in the power_actor_set_power() used by IPA. Signed-off-by: Michael Kao <michael.kao@mediatek.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com> Tested-by: Lukasz Luba <lukasz.luba@arm.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201007024332.30322-1-michael.kao@mediatek.com
2020-10-25Linux 5.10-rc1Linus Torvalds
2020-10-25treewide: Convert macro and uses of __section(foo) to __section("foo")Joe Perches
Use a more generic form for __section that requires quotes to avoid complications with clang and gcc differences. Remove the quote operator # from compiler_attributes.h __section macro. Convert all unquoted __section(foo) uses to quoted __section("foo"). Also convert __attribute__((section("foo"))) uses to __section("foo") even if the __attribute__ has multiple list entry forms. Conversion done using the script at: https://lore.kernel.org/lkml/75393e5ddc272dc7403de74d645e6c6e0f4e70eb.camel@perches.com/2-convert_section.pl Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Nick Desaulniers <ndesaulniers@gooogle.com> Reviewed-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-25kernel/sys.c: fix prototype of prctl_get_tid_address()Rasmus Villemoes
tid_addr is not a "pointer to (pointer to int in userspace)"; it is in fact a "pointer to (pointer to int in userspace) in userspace". So sparse rightfully complains about passing a kernel pointer to put_user(). Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-25mm: remove kzfree() compatibility definitionEric Biggers
Commit 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()") renamed kzfree() to kfree_sensitive(), but it left a compatibility definition of kzfree() to avoid being too disruptive. Since then a few more instances of kzfree() have slipped in. Just get rid of them and remove the compatibility definition once and for all. Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-25checkpatch: enable GIT_DIR environment use to set git repository locationJoe Perches
If set, use the environment variable GIT_DIR to change the default .git location of the kernel git tree. If GIT_DIR is unset, keep using the current ".git" default. Link: https://lkml.kernel.org/r/c5e23b45562373d632fccb8bc04e563abba4dd1d.camel@perches.com Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-10-25Merge tag 'timers-urgent-2020-10-25' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "A time namespace fix and a matching selftest. The futex absolute timeouts which are based on CLOCK_MONOTONIC require time namespace corrected. This was missed in the original time namesapce support" * tag 'timers-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: selftests/timens: Add a test for futex() futex: Adjust absolute futex timeouts with per time namespace offset
2020-10-25Merge tag 'sched-urgent-2020-10-25' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "Two scheduler fixes: - A trivial build fix for sched_feat() to compile correctly with CONFIG_JUMP_LABEL=n - Replace a zero lenght array with a flexible array" * tag 'sched-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/features: Fix !CONFIG_JUMP_LABEL case sched: Replace zero-length array with flexible-array
2020-10-25Merge tag 'perf-urgent-2020-10-25' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fix from Thomas Gleixner: "A single fix to compute the field offset of the SNOOPX bit in the data source bitmask of perf events correctly" * tag 'perf-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: correct SNOOPX field offset
2020-10-25Merge tag 'locking-urgent-2020-10-25' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "Just a trivial fix for kernel-doc warnings" * tag 'locking-urgent-2020-10-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/seqlocks: Fix kernel-doc warnings
2020-10-25Merge tag 'ntb-5.10' of git://github.com/jonmason/ntbLinus Torvalds
Pull NTB fixes from Jon Mason. * tag 'ntb-5.10' of git://github.com/jonmason/ntb: NTB: Use struct_size() helper in devm_kzalloc() ntb: intel: Fix memleak in intel_ntb_pci_probe NTB: hw: amd: fix an issue about leak system resources
2020-10-25Merge branch 'i2c/for-5.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "Regression fix for rc1 and stable kernels as well" * 'i2c/for-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: core: Restore acpi_walk_dep_device_list() getting called after registering the ACPI i2c devs
2020-10-25Merge tag '5.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6Linus Torvalds
Pull more cifs updates from Steve French: "Add support for stat of various special file types (WSL reparse points for char, block, fifo)" * tag '5.10-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module version number smb3: add some missing definitions from MS-FSCC smb3: remove two unused variables smb3: add support for stat of WSL reparse points for special file types
2020-10-25Merge branch 'parisc-5.10-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull more parisc updates from Helge Deller: - During this merge window O_NONBLOCK was changed to become 000200000, but we missed that the syscalls timerfd_create(), signalfd4(), eventfd2(), pipe2(), inotify_init1() and userfaultfd() do a strict bit-wise check of the flags parameter. To provide backward compatibility with existing userspace we introduce parisc specific wrappers for those syscalls which filter out the old O_NONBLOCK value and replaces it with the new one. - Prevent HIL bus driver to get stuck when keyboard or mouse isn't attached - Improve error return codes when setting rtc time - Minor documentation fix in pata_ns87415.c * 'parisc-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: ata: pata_ns87415.c: Document support on parisc with superio chip parisc: Add wrapper syscalls to fix O_NONBLOCK flag usage hil/parisc: Disable HIL driver when it gets stuck parisc: Improve error return codes when setting rtc time
2020-10-25Merge tag 'for-linus-5.10b-rc1c-tag' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull more xen updates from Juergen Gross: - a series for the Xen pv block drivers adding module parameters for better control of resource usge - a cleanup series for the Xen event driver * tag 'for-linus-5.10b-rc1c-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: Documentation: add xen.fifo_events kernel parameter description xen/events: unmask a fifo event channel only if it was masked xen/events: only register debug interrupt for 2-level events xen/events: make struct irq_info private to events_base.c xen: remove no longer used functions xen-blkfront: Apply changed parameter name to the document xen-blkfront: add a parameter for disabling of persistent grants xen-blkback: add a parameter for disabling of persistent grants
2020-10-25Merge tag 'safesetid-5.10' of git://github.com/micah-morton/linuxLinus Torvalds
Pull SafeSetID updates from Micah Morton: "The changes are mostly contained to within the SafeSetID LSM, with the exception of a few 1-line changes to change some ns_capable() calls to ns_capable_setid() -- causing a flag (CAP_OPT_INSETID) to be set that is examined by SafeSetID code and nothing else in the kernel. The changes to SafeSetID internally allow for setting up GID transition security policies, as already existed for UIDs" * tag 'safesetid-5.10' of git://github.com/micah-morton/linux: LSM: SafeSetID: Fix warnings reported by test bot LSM: SafeSetID: Add GID security policy handling LSM: Signal to SafeSetID when setting group IDs
2020-10-25Merge tag '20201024-v4-5.10' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom Pull random32 updates from Willy Tarreau: "Make prandom_u32() less predictable. This is the cleanup of the latest series of prandom_u32 experimentations consisting in using SipHash instead of Tausworthe to produce the randoms used by the network stack. The changes to the files were kept minimal, and the controversial commit that used to take noise from the fast_pool (f227e3ec3b5c) was reverted. Instead, a dedicated "net_rand_noise" per_cpu variable is fed from various sources of activities (networking, scheduling) to perturb the SipHash state using fast, non-trivially predictable data, instead of keeping it fully deterministic. The goal is essentially to make any occasional memory leakage or brute-force attempt useless. The resulting code was verified to be very slightly faster on x86_64 than what is was with the controversial commit above, though this remains barely above measurement noise. It was also tested on i386 and arm, and build- tested only on arm64" Link: https://lore.kernel.org/netdev/20200808152628.GA27941@SDF.ORG/ * tag '20201024-v4-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/prandom: random32: add a selftest for the prandom32 code random32: add noise from network and scheduling activity random32: make prandom_u32() output unpredictable