1. 01 Apr, 2023 1 commit
  2. 13 Mar, 2023 3 commits
  3. 08 Mar, 2023 1 commit
    • Rafael J. Wysocki's avatar
      Merge branch 'thermal-core' into thermal · 2b6db9ef
      Rafael J. Wysocki authored
      Merge thermal control updates for 6.4-rc1:
      
       - Add a thermal zone 'devdata' accessor and modify several drivers to
         use it (Daniel Lezcano).
      
       - Prevent drivers from using the 'device' internal thermal zone
         structure field directly (Daniel Lezcano).
      
       - Clean up the hwmon thermal driver (Daniel Lezcano).
      
       - Add thermal zone id accessor and thermal zone type accessor
         and prevent drivers from using thermal zone fields directly (Daniel
         Lezcano).
      
       - Clean up the acerhdf and tegra thermal drivers (Daniel Lezcano).
      
      * thermal-core:
        thermal/drivers/acerhdf: Remove pointless governor test
        thermal/drivers/acerhdf: Make interval setting only at module load time
        thermal/drivers/tegra: Remove unneeded lock when setting a trip point
        thermal/hwmon: Use the thermal_core.h header
        thermal/drivers/da9062: Don't access the thermal zone device fields
        thermal: Use thermal_zone_device_type() accessor
        thermal: Add a thermal zone id accessor
        thermal/drivers/spear: Don't use tz->device but pdev->dev
        thermal/core: Add thermal_zone_device structure 'type' accessor
        thermal: Don't use 'device' internal thermal zone structure field
        thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()
        thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs()
        thermal: Remove debug or error messages in get_temp() ops
        thermal/core: Show a debug message when get_temp() fails
        thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers
        thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers
        thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers
        thermal/core: Add a thermal zone 'devdata' accessor
      2b6db9ef
  4. 03 Mar, 2023 32 commits
    • Daniel Lezcano's avatar
      thermal/drivers/acerhdf: Remove pointless governor test · 20918cca
      Daniel Lezcano authored
      The thermal zone parameter specifies the bang-bang governor.
      
      The Kconfig selects the bang-bang governor. So it is pointless to test
      if the governor was set for the thermal zone assuming it may not have
      been compiled-in.
      
      Remove the test and prevent another access into the thermal internals.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarPeter Kaestle <peter@piie.net>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      20918cca
    • Daniel Lezcano's avatar
      thermal/drivers/acerhdf: Make interval setting only at module load time · cad450d1
      Daniel Lezcano authored
      The thermal zone device structure is in the process of being private
      to the thermal framework core code. This driver is directly accessing
      and changing the monitoring polling rate.
      
      After discussing with the maintainers of this driver, having the
      polling interval at module loading time is enough for their purpose.
      
      Change the code to take into account the interval when the module is
      loaded but restrict the permissions so the value can not be changed
      afterwards.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarPeter Kaestle <peter@piie.net>
      Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      cad450d1
    • Daniel Lezcano's avatar
      thermal/drivers/tegra: Remove unneeded lock when setting a trip point · 0cf321c8
      Daniel Lezcano authored
      The function tegra_tsensor_enable_hw_channel() takes the thermal zone
      lock to prevent "a potential" race with a call to set_trips()
      callback.
      
      The driver must not play with the thermal framework core code
      internals.
      
      The tegra_tsensor_enable_hw_channel() is called by:
      
       - the suspend / resume callbacks
       - the probe function after the thermal zones are registered
      
      The thermal zone lock taken in this function is supposed to protect
      from a call to the set_trips() callback which writes in the same
      register.
      
      The potential race is when suspend / resume are called at the same
      time as set_trips. This one is called only in
      thermal_zone_device_update().
      
       - At suspend time, the 'in_suspend' is set, thus the
         thermal_zone_device_update() bails out immediately and set_trips is
         not called during this moment.
      
       - At resume time, the thermal zone is updated at PM_POST_SUSPEND,
         thus the driver has already set the TH2 temperature.
      
       - At probe time, we register the thermal zone and then we set the
         TH2. The only scenario I can see so far is the interrupt fires, the
         thermal_zone_update() is called exactly at the moment
         tegra_tsensor_enable_hw_channel() a few lines after registering it.
      
      Enable the channels before setting up the interrupt. We close the
      potential race window without using the thermal zone's lock.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Suggested-by: default avatarThierry Reding <thierry.reding@gmail.com>
      Acked-by: default avatarThierry Reding <treding@nvidia.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0cf321c8
    • Daniel Lezcano's avatar
      thermal/hwmon: Use the thermal_core.h header · ec2c8aae
      Daniel Lezcano authored
      The thermal_hwmon is playing with the thermal core code
      internals. Changing the code would be too invasive for now.
      
      We can consider the thermal_hwmon.c is part of the thermal core code
      as it provides a glue to tie the hwmon and the thermal zones.
      
      Let's include the thermal_core.h header.
      
      No functional change intended.
      
      Cc: Jean Delvare <jdelvare@suse.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Reviewed-by: default avatarJean Delvare <jdelvare@suse.de>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      ec2c8aae
    • Daniel Lezcano's avatar
      thermal/drivers/da9062: Don't access the thermal zone device fields · 0adad092
      Daniel Lezcano authored
      The driver is reading the passive polling rate in the thermal zone
      structure. We want to prevent the drivers to rummage around in the
      thermal zone structure.
      
      On the other side, the delay is what the driver passed to the
      thermal_zone_device_register() function, so it has already the
      information.
      
      Reuse the information we have instead of reading the information we
      set.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: default avatarAdam Ward <DLG-Adam.Ward.opensource@dm.renesas.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0adad092
    • Daniel Lezcano's avatar
      thermal: Use thermal_zone_device_type() accessor · dbb0ea15
      Daniel Lezcano authored
      Replace the accesses to 'tz->type' by its accessor version in order to
      self-encapsulate the thermal_zone_device structure.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Ido Schimmel <idosch@nvidia.com> #mlxsw
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek LVTS
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dbb0ea15
    • Daniel Lezcano's avatar
      thermal: Add a thermal zone id accessor · 3034f859
      Daniel Lezcano authored
      In order to get the thermal zone id but without directly accessing the
      thermal zone device structure, add an accessor.
      
      Use the accessor in the hwmon_scmi and acpi_thermal.
      
      No functional change intented.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3034f859
    • Daniel Lezcano's avatar
      thermal/drivers/spear: Don't use tz->device but pdev->dev · 25e43976
      Daniel Lezcano authored
      Use the spear associated device instead of the thermal zone device
      which belongs to the thermal framework internals.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      25e43976
    • Daniel Lezcano's avatar
      thermal/core: Add thermal_zone_device structure 'type' accessor · 072e35c9
      Daniel Lezcano authored
      The thermal zone device structure is exposed via the exported
      thermal.h header. This structure should stay private the thermal core
      code. In order to encapsulate the structure, let's add an accessor to
      get the 'type' of the thermal zone.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      072e35c9
    • Daniel Lezcano's avatar
      thermal: Don't use 'device' internal thermal zone structure field · dec07d39
      Daniel Lezcano authored
      Some drivers are directly using the thermal zone's 'device' structure
      field.
      
      Use the driver device pointer instead of the thermal zone device when
      it is available.
      
      Remove the traces when they are duplicate with the traces in the core
      code.
      
      Cc: Jean Delvare <jdelvare@suse.com>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek LVTS
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek LVTS
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      dec07d39
    • Daniel Lezcano's avatar
      thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs() · 4a16c190
      Daniel Lezcano authored
      The devres variant of thermal_add_hwmon_sysfs() only takes the thermal
      zone structure pointer as parameter.
      
      Actually, it uses the tz->device to add it in the devres list.
      
      It is preferable to use the device registering the thermal zone
      instead of the thermal zone device itself. That prevents the driver
      accessing the thermal zone structure internals and it is from my POV
      more correct regarding how devm_ is used.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> #amlogic_thermal
      Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> #sun8i_thermal
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek auxadc
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4a16c190
    • Daniel Lezcano's avatar
      thermal/hwmon: Do not set no_hwmon before calling thermal_add_hwmon_sysfs() · 8f3f4ad4
      Daniel Lezcano authored
      The thermal->tzp->no_hwmon parameter is only used when calling
      thermal_zone_device_register().
      
      Setting it to 'false' before calling thermal_add_hwmon_sysfs() has no
      effect.
      
      Remove the call and again prevent the drivers to access the thermal
      internals.
      
      Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: Florian Fainelli <f.fainelli@gmail.com> #Broadcom
      Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      8f3f4ad4
    • Daniel Lezcano's avatar
      thermal: Remove debug or error messages in get_temp() ops · abda7383
      Daniel Lezcano authored
      Some get_temp() ops implementation are showing an error or a debug
      message if the reading of the sensor fails.
      
      The debug message is already displayed from the call site of this
      ops. So we can remove it.
      
      On the other side, the error should not be displayed because in
      production that can raise tons of messages.
      
      Finally, some drivers are showing a debug message with the
      temperature, this is also accessible through the trace from the core
      code in the temperature_update() function.
      
      Another benefit is the dev_* messages are accessing the thermal zone
      device field from the structure, so we encapsulate even more the code
      by preventing these accesses.
      
      Remove those messages.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> #Armada
      Acked-by: Florian Fainelli <f.fainelli@gmail.com> #brcmstb_thermal.c
      Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      abda7383
    • Daniel Lezcano's avatar
      thermal/core: Show a debug message when get_temp() fails · 4216e815
      Daniel Lezcano authored
      The different thermal drivers are showing an error in case the
      get_temp() fails. Actually no traces should be displayed in the
      backend ops but in the call site of this ops.
      
      Furthermore, the message is often a dev_dbg message where the
      tz->device is used, thus using the internal of the structure from the
      driver.
      
      Show a debug message if the thermal_zone_get_temp() fails to read the
      sensor temperature, so code showing the message is factored out and
      the tz->device accesss is in the scope of the thermal core framework.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      4216e815
    • Daniel Lezcano's avatar
      thermal/core: Use the thermal zone 'devdata' accessor in remaining drivers · 3d4e1bad
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Use the devdata accessor introduced in the previous patch.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: Ido Schimmel <idosch@nvidia.com> #mlxsw
      Acked-by: Gregory Greenman <gregory.greenman@intel.com> #iwlwifi
      Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> #power_supply
      Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> #ahci
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      3d4e1bad
    • Daniel Lezcano's avatar
      thermal/core: Use the thermal zone 'devdata' accessor in hwmon located drivers · 0ce637a5
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Use the devdata accessor introduced in the previous patch.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: Guenter Roeck <linux@roeck-us.net> #hwmon
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      0ce637a5
    • Daniel Lezcano's avatar
      thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers · 5f68d078
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Use the devdata accessor introduced in the previous patch.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek auxadc and lvts
      Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek lvts
      Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com> #da9062
      Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>  #spread
      Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> #sun8i_thermal
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: Florian Fainelli <f.fainelli@gmail.com> #Broadcom
      Reviewed-by: Dhruva Gole <d-gole@ti.com> # K3 bandgap
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip
      Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> #uniphier
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      5f68d078
    • Daniel Lezcano's avatar
      thermal/core: Add a thermal zone 'devdata' accessor · a6ff3c00
      Daniel Lezcano authored
      The thermal zone device structure is exposed to the different drivers
      and obviously they access the internals while that should be
      restricted to the core thermal code.
      
      In order to self-encapsulate the thermal core code, we need to prevent
      the drivers accessing directly the thermal zone structure and provide
      accessor functions to deal with.
      
      Provide an accessor to the 'devdata' structure and make use of it in
      the different drivers.
      
      No functional changes intended.
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a6ff3c00
    • Srinivas Pandruvada's avatar
      thermal: intel: int340x: processor_thermal: Fix deadlock · 52f04f10
      Srinivas Pandruvada authored
      When user space updates the trip point there is a deadlock, which results
      in caller gets blocked forever.
      
      Commit 05eeee2b ("thermal/core: Protect sysfs accesses to thermal
      operations with thermal zone mutex"), added a mutex for tz->lock in the
      function trip_point_temp_store(). Hence, trip set callback() can't
      call any thermal zone API as they are protected with the same mutex lock.
      
      The callback here calling thermal_zone_device_enable(), which will result
      in deadlock.
      
      Move the thermal_zone_device_enable() to proc_thermal_pci_probe() to
      avoid this deadlock.
      
      Fixes: 05eeee2b ("thermal/core: Protect sysfs accesses to thermal operations with thermal zone mutex")
      Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@intel.com>
      Cc: 6.2+ <stable@vger.kernel.org> # 6.2+
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      52f04f10
    • Linus Torvalds's avatar
      Merge tag 'thermal-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 0a3f9a6b
      Linus Torvalds authored
      Pull more thermal control updates from Rafael Wysocki:
       "These fix two issues in the Intel thermal control drivers.
      
        Specifics:
      
         - Fix an error pointer dereference in the quark_dts Intel thermal
           driver (Dan Carpenter)
      
         - Fix the intel_bxt_pmic_thermal driver Kconfig entry to select
           REGMAP which is not user-visible instead of depending on it (Randy
           Dunlap)"
      
      * tag 'thermal-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thermal: intel: BXT_PMIC: select REGMAP instead of depending on it
        thermal: intel: quark_dts: fix error pointer dereference
      0a3f9a6b
    • Linus Torvalds's avatar
      Merge tag 'acpi-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 44b6f565
      Linus Torvalds authored
      Pull more ACPI updates from Rafael Wysocki:
       "These update ACPI quirks for some x86 platforms and add an IRQ
        override quirk for one more system.
      
        Specifics:
      
         - Add an ACPI IRQ override quirk for Asus Expertbook B2402FBA
           (Vojtech Hejsek)
      
         - Drop a suspend-to-idle quirk for HP Elitebook G9 that is not needed
           any more after a firmware update (Mario Limonciello)
      
         - Add all Cezanne systems to the list for forcing StorageD3Enable,
           because they all need the same quirk (Mario Limonciello)"
      
      * tag 'acpi-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable
        ACPI: x86: Drop quirk for HP Elitebook
        ACPI: resource: Skip IRQ override on Asus Expertbook B2402FBA
      44b6f565
    • Linus Torvalds's avatar
      Merge tag 'pm-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c8b4accf
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These update power capping (new hardware support and cleanup) and
        cpufreq (bug fixes, cleanups and intel_pstate adjustment for a new
        platform).
      
        Specifics:
      
         - Fix error handling in the apple-soc cpufreq driver (Dan Carpenter)
      
         - Change the log level of a message in the amd-pstate cpufreq driver
           so it is more visible to users (Kai-Heng Feng)
      
         - Adjust the balance_performance EPP value for Sapphire Rapids in the
           intel_pstate cpufreq driver (Srinivas Pandruvada)
      
         - Remove MODULE_LICENSE from 3 pieces of non-modular code (Nick
           Alcock)
      
         - Make a read-only kobj_type structure in the schedutil cpufreq
           governor constant (Thomas Weißschuh)
      
         - Add Add Power Limit4 support for Meteor Lake SoC to the Intel RAPL
           power capping driver (Sumeet Pawnikar)"
      
      * tag 'pm-6.3-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        cpufreq: apple-soc: Fix an IS_ERR() vs NULL check
        powercap: remove MODULE_LICENSE in non-modules
        cpufreq: intel_pstate: remove MODULE_LICENSE in non-modules
        powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC
        cpufreq: amd-pstate: remove MODULE_LICENSE in non-modules
        cpufreq: schedutil: make kobj_type structure constant
        cpufreq: amd-pstate: Let user know amd-pstate is disabled
        cpufreq: intel_pstate: Adjust balance_performance EPP for Sapphire Rapids
      c8b4accf
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.3-2023-03-03' of git://git.kernel.dk/linux · 53ae7e11
      Linus Torvalds authored
      Pull more io_uring updates from Jens Axboe:
       "Here's a set of fixes/changes that didn't make the first cut, either
        because they got queued before I sent the early merge request, or
        fixes that came in afterwards. In detail:
      
         - Don't set MSG_NOSIGNAL on recv/recvmsg opcodes, as AF_PACKET will
           error out (David)
      
         - Fix for spurious poll wakeups (me)
      
         - Fix for a file leak for buffered reads in certain conditions
           (Joseph)
      
         - Don't allow registered buffers of mixed types (Pavel)
      
         - Improve handling of huge pages for registered buffers (Pavel)
      
         - Provided buffer ring size calculation fix (Wojciech)
      
         - Minor cleanups (me)"
      
      * tag 'io_uring-6.3-2023-03-03' of git://git.kernel.dk/linux:
        io_uring/poll: don't pass in wake func to io_init_poll_iocb()
        io_uring: fix fget leak when fs don't support nowait buffered read
        io_uring/poll: allow some retries for poll triggering spuriously
        io_uring: remove MSG_NOSIGNAL from recvmsg
        io_uring/rsrc: always initialize 'folio' to NULL
        io_uring/rsrc: optimise registered huge pages
        io_uring/rsrc: optimise single entry advance
        io_uring/rsrc: disallow multi-source reg buffers
        io_uring: remove unused wq_list_merge
        io_uring: fix size calculation when registering buf ring
        io_uring/rsrc: fix a comment in io_import_fixed()
        io_uring: rename 'in_idle' to 'in_cancel'
        io_uring: consolidate the put_ref-and-return section of adding work
      53ae7e11
    • Linus Torvalds's avatar
      Merge tag 'block-6.3-2023-03-03' of git://git.kernel.dk/linux · 9d0281b5
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - NVMe pull request via Christoph:
            - Don't access released socket during error recovery (Akinobu
              Mita)
            - Bring back auto-removal of deleted namespaces during sequential
              scan (Christoph Hellwig)
            - Fix an error code in nvme_auth_process_dhchap_challenge (Dan
              Carpenter)
            - Show well known discovery name (Daniel Wagner)
            - Add a missing endianess conversion in effects masking (Keith
              Busch)
      
       - Fix for a regression introduced in blk-rq-qos during init in this
         merge window (Breno)
      
       - Reorder a few fields in struct blk_mq_tag_set, eliminating a few
         holes and shrinking it (Christophe)
      
       - Remove redundant bdev_get_queue() NULL checks (Juhyung)
      
       - Add sed-opal single user mode support flag (Luca)
      
       - Remove SQE128 check in ublk as it isn't needed, saving some memory
         (Ming)
      
       - Op specific segment checking for cloned requests (Uday)
      
       - Exclusive open partition scan fixes (Yu)
      
       - Loop offset/size checking before assigning them in the device (Zhong)
      
       - Bio polling fixes (me)
      
      * tag 'block-6.3-2023-03-03' of git://git.kernel.dk/linux:
        blk-mq: enforce op-specific segment limits in blk_insert_cloned_request
        nvme-fabrics: show well known discovery name
        nvme-tcp: don't access released socket during error recovery
        nvme-auth: fix an error code in nvme_auth_process_dhchap_challenge()
        nvme: bring back auto-removal of deleted namespaces during sequential scan
        blk-iocost: Pass gendisk to ioc_refresh_params
        nvme: fix sparse warning on effects masking
        block: be a bit more careful in checking for NULL bdev while polling
        block: clear bio->bi_bdev when putting a bio back in the cache
        loop: loop_set_status_from_info() check before assignment
        ublk: remove check IO_URING_F_SQE128 in ublk_ch_uring_cmd
        block: remove more NULL checks after bdev_get_queue()
        blk-mq: Reorder fields in 'struct blk_mq_tag_set'
        block: fix scan partition for exclusively open device again
        block: Revert "block: Do not reread partition table on exclusively open device"
        sed-opal: add support flag for SUM in status ioctl
      9d0281b5
    • Linus Torvalds's avatar
      Merge tag 'ata-6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata · 1bd1aee6
      Linus Torvalds authored
      Pull ATA fix from Damien Le Moal:
      
       - Revert commit 104ff59a ("ata: ahci: Add Tiger Lake UP{3,4} AHCI
         controller") as it is causing serious regressions (failure to boot)
         on some laptops
      
      * tag 'ata-6.3-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
        ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller"
      1bd1aee6
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-pm' and 'acpi-x86' · 57b76324
      Rafael J. Wysocki authored
      Merge additional ACPI quirks for x86 systems:
      
       - Drop a suspend-to-idle quirk for HP Elitebook G9 that is not needed
         any more after a firmware update (Mario Limonciello).
      
       - Add all Cezanne systems to the list for forcing StorageD3Enable,
         because they all need the same quirk (Mario Limonciello).
      
      * acpi-pm:
        ACPI: x86: Drop quirk for HP Elitebook
      
      * acpi-x86:
        ACPI: x86: utils: Add Cezanne to the list for forcing StorageD3Enable
      57b76324
    • Linus Torvalds's avatar
      Merge tag 's390-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux · 0bdf4a8b
      Linus Torvalds authored
      Pull more s390 updates from Heiko Carstens:
      
       - Add empty command line parameter handling stubs to kernel for all
         command line parameters which are handled in the decompressor. This
         avoids invalid "Unknown kernel command line parameters" messages from
         the kernel, and also avoids that these will be incorrectly passed to
         user space. This caused already confusion, therefore add the empty
         stubs
      
       - Add missing phys_to_virt() handling to machine check handler
      
       - Introduce and use a union to be used for zcrypt inline assemblies.
         This makes sure that only a register wide member of the union is
         passed as input and output parameter to inline assemblies, while
         usual C code uses other members of the union to access bit fields of
         it
      
       - Add and use a READ_ONCE_ALIGNED_128() macro, which can be used to
         atomically read a 128-bit value from memory. This replaces the
         (mis-)use of the 128-bit cmpxchg operation to do the same in cpum_sf
         code. Currently gcc does not generate the used lpq instruction if
         __READ_ONCE() is used for aligned 128-bit accesses, therefore use
         this s390 specific helper
      
       - Simplify machine check handler code if a task needs to be killed
         because of e.g. register corruption due to a machine malfunction
      
       - Perform CPU reset to clear pending interrupts and TLB entries on an
         already stopped target CPU before delegating work to it
      
       - Generate arch/s390/boot/vmlinux.map link map for the decompressor,
         when CONFIG_VMLINUX_MAP is enabled for debugging purposes
      
       - Fix segment type handling for dcssblk devices. It incorrectly always
         returned type "READ/WRITE" even for read-only segements, which can
         result in a kernel panic if somebody tries to write to a read-only
         device
      
       - Sort config S390 select list again
      
       - Fix two kprobe reenter bugs revealed by a recently added kprobe kunit
         test
      
      * tag 's390-6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
        s390/kprobes: fix current_kprobe never cleared after kprobes reenter
        s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler
        s390/Kconfig: sort config S390 select list again
        s390/extmem: return correct segment type in __segment_load()
        s390/decompressor: add link map saving
        s390/smp: perform cpu reset before delegating work to target cpu
        s390/mcck: cleanup user process termination path
        s390/cpum_sf: use READ_ONCE_ALIGNED_128() instead of 128-bit cmpxchg
        s390/rwonce: add READ_ONCE_ALIGNED_128() macro
        s390/ap,zcrypt,vfio: introduce and use ap_queue_status_reg union
        s390/nmi: fix virtual-physical address confusion
        s390/setup: do not complain about parameters handled in decompressor
      0bdf4a8b
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-6.3-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · bf1a1bad
      Linus Torvalds authored
      Pull more RISC-V updates from Palmer Dabbelt:
      
       - Some cleanups and fixes for the Zbb-optimized string routines
      
       - Support for custom (vendor or implementation defined) perf events
      
       - COMMAND_LINE_SIZE has been increased to 1024
      
      * tag 'riscv-for-linus-6.3-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: Bump COMMAND_LINE_SIZE value to 1024
        drivers/perf: RISC-V: Allow programming custom firmware events
        riscv, lib: Fix Zbb strncmp
        RISC-V: improve string-function assembly
      bf1a1bad
    • Rafael J. Wysocki's avatar
      Merge branch 'powercap' · 5719638d
      Rafael J. Wysocki authored
      Merge additional power capping changes for 6.3-rc1:
      
       - Remove MODULE_LICENSE from non-modular power capping code (Nick
         Alcock).
      
       - Add Add Power Limit4 support for Meteor Lake SoC to the Intel RAPL
         power capping driver (Sumeet Pawnikar).
      
      * powercap:
        powercap: remove MODULE_LICENSE in non-modules
        powercap: RAPL: Add Power Limit4 support for Meteor Lake SoC
      5719638d
    • Linus Torvalds's avatar
      Merge tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux · 271d8939
      Linus Torvalds authored
      Pull RTC updates from Alexandre Belloni:
       "A few drivers got some nice cleanups and a new driver are making the
        bulk of the changes.
      
        Subsystem:
         - allow rtc_read_alarm without read_alarm callback
      
        New driver:
         - NXP BBNSM module RTC
      
        Drivers:
         - use IRQ flags from fwnode when available
         - abx80x: nvmem support
         - brcmstb-waketimer: add non-wake alarm support
         - ingenic: provide CLK32K clock
         - isl12022: cleanups
         - moxart: switch to using gpiod API
         - pcf85363: allow setting quartz load
         - pm8xxx: cleanups and support for setting time
         - rv3028, rv3032: add ACPI support"
      
      * tag 'rtc-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (64 commits)
        rtc: pm8xxx: add support for nvmem offset
        dt-bindings: rtc: qcom-pm8xxx: add nvmem-cell offset
        rtc: abx80x: Add nvmem support
        rtc: rx6110: Remove unused of_gpio,h
        rtc: efi: Avoid spamming the log on RTC read failure
        rtc: isl12022: sort header inclusion alphabetically
        rtc: isl12022: Join string literals back
        rtc: isl12022: Drop unneeded OF guards and of_match_ptr()
        rtc: isl12022: Explicitly use __le16 type for ISL12022_REG_TEMP_L
        rtc: isl12022: Get rid of unneeded private struct isl12022
        rtc: pcf85363: add support for the quartz-load-femtofarads property
        dt-bindings: rtc: nxp,pcf8563: move pcf85263/pcf85363 to a dedicated binding
        rtc: allow rtc_read_alarm without read_alarm callback
        rtc: rv3032: add ACPI support
        rtc: rv3028: add ACPI support
        rtc: bbnsm: Add the bbnsm rtc support
        rtc: jz4740: Register clock provider for the CLK32K pin
        rtc: jz4740: Use dev_err_probe()
        rtc: jz4740: Use readl_poll_timeout
        dt-bindings: rtc: Add #clock-cells property
        ...
      271d8939
    • Damien Le Moal's avatar
      ata: ahci: Revert "ata: ahci: Add Tiger Lake UP{3,4} AHCI controller" · 6210038a
      Damien Le Moal authored
      Commit 104ff59a ("ata: ahci: Add Tiger Lake UP{3,4} AHCI
      controller") enabled low power mode for the Tiger Lake AHIC adapter in
      the author system but created regressions for others. Revert this patch
      for now until a better solution is found to make this adapter
      eco-friendly.
      
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=217114
      CC: stable@vger.kernel.org
      Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
      6210038a
    • Uday Shankar's avatar
      blk-mq: enforce op-specific segment limits in blk_insert_cloned_request · 49d24398
      Uday Shankar authored
      The block layer might merge together discard requests up until the
      max_discard_segments limit is hit, but blk_insert_cloned_request checks
      the segment count against max_segments regardless of the req op. This
      can result in errors like the following when discards are issued through
      a DM device and max_discard_segments exceeds max_segments for the queue
      of the chosen underlying device.
      
      blk_insert_cloned_request: over max segments limit. (256 > 129)
      
      Fix this by looking at the req_op and enforcing the appropriate segment
      limit - max_discard_segments for REQ_OP_DISCARDs and max_segments for
      everything else.
      Signed-off-by: default avatarUday Shankar <ushankar@purestorage.com>
      Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
      Reviewed-by: default avatarMing Lei <ming.lei@redhat.com>
      Link: https://lore.kernel.org/r/20230301000655.48112-1-ushankar@purestorage.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
      49d24398
  5. 02 Mar, 2023 3 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm · 2eb29d59
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "fbdev:
         - fix uninit var in error path
      
        shmem:
         - revert unGPLing an export
      
        i915:
         - Don't use stolen memory or BAR mappings for ring buffers with LLC
         - Add inverted backlight quirk for HP 14-r206nv
         - Fix GSI offset for MCR lookups
         - GVT fixes (memleak, debugfs attributes, kconfig, typos)
      
        amdgpu:
         - SMU 13 fixes
         - Enable TMZ for GC 10.3.6
         - Misc display fixes
         - Buddy allocator fixes
         - GC 11 fixes
         - S0ix fix
         - INFO IOCTL queries for GC 11
         - VCN harvest fixes for SR-IOV
         - UMC 8.10 RAS fixes
         - Don't restrict bpc to 8
         - NBIO 7.5 fix
         - Allow freesync on PCon for more devices
      
        amdkfd:
         - SDMA fix
         - Illegal memory access fix"
      
      * tag 'drm-next-2023-03-03-1' of git://anongit.freedesktop.org/drm/drm: (45 commits)
        drm/amdgpu/vcn: fix compilation issue with legacy gcc
        drm/amd/display: Extend Freesync over PCon support for more devices
        Revert "drm/amd/display: Do not set DRR on pipe commit"
        drm/amd/display: fix shift-out-of-bounds in CalculateVMAndRowBytes
        drm/amd/display: Ext displays with dock can't recognized after resume
        drm/amdgpu: fix ttm_bo calltrace warning in psp_hw_fini
        drm/amdgpu: remove unused variable ring
        drm/amd/display: fix dm irq error message in gpu recover
        drm/amd: Fix initialization for nbio 7.5.1
        drm/amd/display: Don't restrict bpc to 8 bpc
        drm/amdgpu: Make umc_v8_10_convert_error_address static and remove unused variable
        drm/radeon: Fix eDP for single-display iMac11,2
        drm/shmem-helper: Revert accidental non-GPL export
        drm: omapdrm: Do not use helper unininitialized in omap_fbdev_init()
        drm/amd/pm: downgrade log level upon SMU IF version mismatch
        drm/amdgpu: Add ecc info query interface for umc v8_10
        drm/amdgpu: Add convert_error_address function for umc v8_10
        drm/amdgpu: add bad_page_threshold check in ras_eeprom_check_err
        drm/amdgpu: change default behavior of bad_page_threshold parameter
        drm/amdgpu: exclude duplicate pages from UMC RAS UE count
        ...
      2eb29d59
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 39ce4395
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - In copy_highpage(), only reset the tag of the destination pointer if
         KASAN_HW_TAGS is enabled so that user-space MTE does not interfere
         with KASAN_SW_TAGS (which relies on top-byte-ignore).
      
       - Remove warning if SME is detected without SVE, the kernel can cope
         with such configuration (though none in the field currently).
      
       - In cfi_handler(), pass the ESR_EL1 value to die() for consistency
         with other die() callers.
      
       - Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP on arm64 since the pte
         manipulation from the generic vmemmap_remap_pte() does not follow the
         required ARM break-before-make sequence (clear the pte, flush the
         TLBs, set the new pte). It may be re-enabled once this sequence is
         sorted.
      
       - Fix possible memory leak in the arm64 ACPI code if the SMCCC version
         and conduit checks fail.
      
       - Forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE since gcc ignores
        -falign-functions=N with -Os.
      
       - Don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN as no
         randomisation would actually take place.
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: kaslr: don't pretend KASLR is enabled if offset < MIN_KIMG_ALIGN
        arm64: ftrace: forbid CALL_OPS with CC_OPTIMIZE_FOR_SIZE
        arm64: acpi: Fix possible memory leak of ffh_ctxt
        arm64: mm: hugetlb: Disable HUGETLB_PAGE_OPTIMIZE_VMEMMAP
        arm64: pass ESR_ELx to die() of cfi_handler
        arm64/fpsimd: Remove warning for SME without SVE
        arm64: Reset KASAN tag in copy_highpage with HW tags only
      39ce4395
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-6.3-2023-03-02' of... · 54ceb927
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-6.3-2023-03-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
      
      amd-drm-fixes-6.3-2023-03-02:
      
      amdgpu:
      - SMU 13 fixes
      - Enable TMZ for GC 10.3.6
      - Misc display fixes
      - Buddy allocator fixes
      - GC 11 fixes
      - S0ix fix
      - INFO IOCTL queries for GC 11
      - VCN harvest fixes for SR-IOV
      - UMC 8.10 RAS fixes
      - Don't restrict bpc to 8
      - NBIO 7.5 fix
      - Allow freesync on PCon for more devices
      
      amdkfd:
      - SDMA fix
      - Illegal memory access fix
      
      radeon:
      - Display fix for iMac11,2
      
      UAPI:
      - Add some additional INFO IOCTL queries for GC 11 fixes
        Mesa MR: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21403Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230302051843.7793-1-alexander.deucher@amd.com
      54ceb927