platform/kernel/linux-rpi.git
16 months agoMerge tag 'optee-use-kmemdup-for-6.5' of https://git.linaro.org/people/jens.wiklander...
Arnd Bergmann [Thu, 22 Jun 2023 15:35:09 +0000 (17:35 +0200)]
Merge tag 'optee-use-kmemdup-for-6.5' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers

Use kmemdup() in OP-TEE driver

* tag 'optee-use-kmemdup-for-6.5' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: Use kmemdup() to replace kmalloc + memcpy

Link: https://lore.kernel.org/r/20230615130049.GA979203@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'memory-controller-drv-6.5' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Thu, 22 Jun 2023 15:34:02 +0000 (17:34 +0200)]
Merge tag 'memory-controller-drv-6.5' of https://git./linux/kernel/git/krzk/linux-mem-ctrl into soc/drivers

Memory controller drivers for v6.5

1. Renesas RPC IF: correct the Strobe Timing Adjustment.
2. Broadcom DPFE: fix smatch warning for testing array offset after use.
3. Atmel SDRAMC: drop driver because it was just a wrapper over enabling
   clock which is not handled by its clock controller.
4. Minor bindings cleanup.

* tag 'memory-controller-drv-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl:
  dt-bindings: memory-controllers: drop unneeded quotes
  memory: atmel-sdramc: remove the driver
  memory: brcmstb_dpfe: fix testing array offset after use
  memory: renesas-rpc-if: Fix PHYCNT.STRTIM setting

Link: https://lore.kernel.org/r/20230612175508.288775-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'scmi-updates-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep...
Arnd Bergmann [Thu, 22 Jun 2023 15:33:11 +0000 (17:33 +0200)]
Merge tag 'scmi-updates-6.5' of git://git./linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.5

Couple of main additions :-

1. Support for multiple SMC/HVC transports for SCMI:

   Some platforms need to support multiple SCMI instances within
   a platform(more commonly in a VM). The same SMC/HVC FID is used with
   all the instances. The platform or the hypervisor needs a way to
   distinguish among SMC/HVC calls made from different instances.

   This change adds support for passing shmem channel address as the
   parameters in the SMC/HVC call. The address is split into 4KB-page
   and offset for simiplicity.

2. Addition od SCMI v3.2 explicit powercap enable/disable support:

   SCMI v3.2 specification introduces support to disable powercapping
   as a whole on the desired zones.

   This change adds the needed support to the core SCMI powercap protocol,
   exposing enable/disable protocol operations and then wiring up the new
   operartions in the related powercap framework helpers.

* tag 'scmi-updates-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  powercap: arm_scmi: Add support for disabling powercaps on a zone
  firmware: arm_scmi: Add Powercap protocol enable support
  firmware: arm_scmi: Refactor the internal powercap get/set helpers
  firmware: arm_scmi: Augment SMC/HVC to allow optional parameters
  dt-bindings: firmware: arm,scmi: support for parameter in smc/hvc call

Link: https://lore.kernel.org/r/20230612121017.4108104-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'v6.5-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Thu, 22 Jun 2023 15:32:19 +0000 (17:32 +0200)]
Merge tag 'v6.5-rockchip-drivers1' of git://git./linux/kernel/git/mmind/linux-rockchip into soc/drivers

An addition to the rk3588 power-domains, some new syscon compatibles for
rk3588-based "General-register-files" register areas and a move to
C99 array inits for the dtpm driver to fix sparse warnings.

* tag 'v6.5-rockchip-drivers1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  soc: rockchip: dtpm: use C99 array init syntax
  dt-bindings: soc: rockchip: add rk3588 pipe-phy syscon
  dt-bindings: soc: rockchip: add rk3588 usb2phy syscon
  soc: rockchip: power-domain: add rk3588 mem module support

Link: https://lore.kernel.org/r/10286366.nUPlyArG6x@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'amlogic-drivers-for-v6.5' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Thu, 22 Jun 2023 14:37:07 +0000 (16:37 +0200)]
Merge tag 'amlogic-drivers-for-v6.5' of https://git./linux/kernel/git/amlogic/linux into soc/drivers

Amlogic Drivers changes for v6.5:
- tag some powers domains as always-on for secure-pwrc
- fix MAINTAINERS entry for PHY drivers & bindings
- Amlogic Meson GPIO interrupt controller binding to yaml conversion

* tag 'amlogic-drivers-for-v6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  dt-bindings: interrupt-controller: Convert Amlogic Meson GPIO interrupt controller binding
  MAINTAINERS: add PHY-related files to Amlogic SoC file list
  drivers: meson: secure-pwrc: always enable DMA domain

Link: https://lore.kernel.org/r/a10ea420-7599-3f41-dfd8-1742ef436ca0@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'ti-driver-soc-for-v6.5' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Wed, 21 Jun 2023 20:17:54 +0000 (22:17 +0200)]
Merge tag 'ti-driver-soc-for-v6.5' of https://git./linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.5

* pruss: Add helper functions for ethernet client driver usage, add compile-testing, fixup function pointer casts
* smartreflex: Cosmetic optimization for using devm_ioremap_resource
* wkup_m3_ipc: Fix error checking around debugfs_create_dir

* tag 'ti-driver-soc-for-v6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  wkup_m3_ipc.c: Fix error checking for debugfs_create_dir
  soc: ti: pruss: Add helper functions to set GPI mode, MII_RT_event and XFR
  soc: ti: pruss: Add pruss_cfg_read()/update(), pruss_cfg_get_gpmux()/set_gpmux() APIs
  soc: ti: pruss: Add pruss_{request,release}_mem_region() API
  soc: ti: pruss: Add pruss_get()/put() API
  soc: ti: pruss: Allow compile-testing
  soc: ti: pruss: Avoid cast to incompatible function type
  soc: ti: smartreflex: Use devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/20230615164134.6sd5hudyadq3fvk4@garage
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'qcom-drivers-for-6.5-2' of https://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Wed, 21 Jun 2023 20:15:10 +0000 (22:15 +0200)]
Merge tag 'qcom-drivers-for-6.5-2' of https://git./linux/kernel/git/qcom/linux into soc/drivers

More Qualcomm driver updates for v6.5

The detection of split/non-split firmware files in the MDT loader is
corrected. The Geni driver is updated to not enable unused interrupts,
in some configurations. The count unit for MSM8998 in BWMON is corrected.
RPM master stats driver is corrected to check for the right return value
of devm_ioremap().

Support for socinfo version 18 and 19 are aded, and IPQ5300 is added to
the list of platforms.

* tag 'qcom-drivers-for-6.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: geni-se: Do not bother about enable/disable of interrupts in secondary sequencer
  dt-bindings: sram: qcom,imem: document qdu1000
  soc: qcom: icc-bwmon: Fix MSM8998 count unit
  dt-bindings: soc: qcom,rpmh-rsc: Require power-domains
  soc: qcom: socinfo: Add Soc ID for IPQ5300
  dt-bindings: arm: qcom,ids: add SoC ID for IPQ5300
  soc: qcom: Fix a IS_ERR() vs NULL bug in probe
  soc: qcom: socinfo: Add support for new fields in revision 19
  soc: qcom: socinfo: Add support for new fields in revision 18
  dt-bindings: firmware: scm: Add compatible for SDX75
  soc: qcom: mdt_loader: Fix split image detection

Link: https://lore.kernel.org/r/20230615163104.1461905-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'v6.4-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias...
Arnd Bergmann [Wed, 21 Jun 2023 20:13:29 +0000 (22:13 +0200)]
Merge tag 'v6.4-next-soc' of https://git./linux/kernel/git/matthias.bgg/linux into soc/drivers

PMIC wrapper
- support companion device
- add support for MT6795

SPMI:
- add support for MT8186

SVS:
- change gpu node name to match binding

* tag 'v6.4-next-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux:
  soc: mediatek: remove DDP_DOMPONENT_DITHER from enum
  soc: mediatek: SVS: Fix MT8192 GPU node name
  soc: mediatek: mtk-mutex: Remove unnecessary .owner
  dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10
  dt-bindings: pwm: Add compatible for MediaTek MT6795
  dt-bindings: spmi: spmi-mtk-pmif: Document mediatek,mt8195-spmi as fallback of mediatek,mt8186-spmi
  soc: mediatek: pwrap: Add support for MT6795 Helio X10
  soc: mediatek: mtk-pmic-wrap: Add support for MT6331 w/ MT6332 companion
  soc: mediatek: mtk-pmic-wrap: Add support for companion PMICs
  soc: mediatek: pwrap: Add kerneldoc for struct pwrap_slv_type
  soc: mediatek: pwrap: Move PMIC read test sequence in function
  dt-bindings: soc: mediatek: pwrap: Add compatible for MT6795 Helio X10

Link: https://lore.kernel.org/r/1ed1e5ae-6305-e63a-84a0-3c43f69c8f8b@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'qcom-drivers-for-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Wed, 21 Jun 2023 19:58:32 +0000 (21:58 +0200)]
Merge tag 'qcom-drivers-for-6.5' of https://git./linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.5

Konrad Dybcio is promoted, from reviewer, to co-maintainer.

The mdt_loader gets a fix to the detection of split binaries, where the
previous logic sometimes concluded that the first segments was not
split, in a split image. The unconditional calling of
scm_pas_mem_setup() turns out to cause a regression and is reverted.

The altmode subfunction of pmic_glink is enabled for SM8450.

A new driver for exposing power statistics from the RPM, for debugging
purposes, is introduced.

OCMEM gets a debug prints of the hardware version, QMI helpers are
transitioned to alloc_ordered_workqueue() and an error message in
ramp_controller is improved.

An API is introduced to the SMEM driver to allow other drivers to query
the SoC id, rather than open-coding the parsing of the relevant SMEM
item. This is then used to clean up the Qualcomm NVMEM-based cpufreq
driver.

Socinfo is extended with knowledge about IPQ5018, IPQ5312 and IPQ5302.

* tag 'qcom-drivers-for-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (23 commits)
  soc: qcom: ocmem: Add OCMEM hardware version print
  cpufreq: qcom-nvmem: use helper to get SMEM SoC ID
  cpufreq: qcom-nvmem: use SoC ID-s from bindings
  soc: qcom: smem: introduce qcom_smem_get_soc_id()
  soc: qcom: smem: Switch to EXPORT_SYMBOL_GPL()
  soc: qcom: socinfo: move SMEM item struct and defines to a header
  soc: qcom: mdt_loader: Fix unconditional call to scm_pas_mem_setup
  MAINTAINERS: Add Konrad Dybcio as linux-arm-msm co-maintainer
  dt-bindings: sram: qcom,imem: Document MSM8226
  soc: qcom: socinfo: Add Soc ID for IPQ5312 and IPQ5302
  dt-bindings: arm: qcom,ids: add SoC ID for IPQ5312 and IPQ5302
  soc: qcom: socinfo: Add IDs for IPQ5018 family
  dt-bindings: arm: qcom,ids: Add IDs for IPQ5018 family
  soc: qcom: Introduce RPM master stats driver
  dt-bindings: soc: qcom: Add RPM Master stats
  soc: qcom: qmi: Use alloc_ordered_workqueue() to create ordered workqueues
  soc: qcom: ramp_controller: Improve error message for failure in .remove()
  dt-bindings: soc: qcom: smd-rpm: allow MSM8226 over SMD
  soc: qcom: rpmpd: use correct __le32 type
  dt-bindings: soc: qcom: eud: Fix compatible string in the example
  ...

Link: https://lore.kernel.org/r/20230611010044.2481875-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'tegra-for-6.5-pci' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Wed, 21 Jun 2023 19:49:59 +0000 (21:49 +0200)]
Merge tag 'tegra-for-6.5-pci' of git://git./linux/kernel/git/tegra/linux into soc/drivers

PCI: tegra: Changes for v6.5-rc1

This contains updates to the PCI driver for Tegra194 and later devices
that depend on the memory controller interconnect changes.

* tag 'tegra-for-6.5-pci' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  PCI: tegra194: Add interconnect support in Tegra234
  PCI: tegra194: Fix possible array out of bounds access

Link: https://lore.kernel.org/r/20230609193620.2275240-5-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'tegra-for-6.5-memory' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Wed, 21 Jun 2023 19:49:00 +0000 (21:49 +0200)]
Merge tag 'tegra-for-6.5-memory' of git://git./linux/kernel/git/tegra/linux into soc/drivers

memory: tegra: Changes for v6.5-rc1

This introduces an interconnect provider for the memory controller and
external memory controller found on Tegra234 chips that will eventually
be used to dynamically scale the EMC frequency based on a device's
bandwidth needs.

* tag 'tegra-for-6.5-memory' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  memory: tegra: Make CPU cluster BW request a multiple of MC channels
  memory: tegra: Add software memory clients in Tegra234
  memory: tegra: Add memory clients for Tegra234
  memory: tegra: Add interconnect support for DRAM scaling in Tegra234
  dt-bindings: tegra: Add ICC IDs for dummy memory clients
  dt-bindings: tegra: Document compatible for IGX

Link: https://lore.kernel.org/r/20230609193620.2275240-4-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'tegra-for-6.5-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Wed, 21 Jun 2023 19:47:02 +0000 (21:47 +0200)]
Merge tag 'tegra-for-6.5-firmware' of git://git./linux/kernel/git/tegra/linux into soc/drivers

firmware: tegra: Changes for v6.5-rc1

This adds support for using system memory as shared memory between the
CPU and the BPMP, which will be needed for Tegra264 support.

* tag 'tegra-for-6.5-firmware' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: bpmp: Add support for DRAM MRQ GSCs

Link: https://lore.kernel.org/r/20230609193620.2275240-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agoMerge tag 'tegra-for-6.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra...
Arnd Bergmann [Wed, 21 Jun 2023 19:39:18 +0000 (21:39 +0200)]
Merge tag 'tegra-for-6.5-soc' of git://git./linux/kernel/git/tegra/linux into soc/drivers

soc/tegra: Changes for v6.5-rc1

This adds initial support for identifying the Tegra264 SoC family and
fixes potential issues when reading from the FUSE block. A new software
wake event for the AON cluster is added on Tegra234 and the debugfs
initialization is drastically simplified.

* tag 'tegra-for-6.5-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Use devm_clk_notifier_register()
  soc/tegra: pmc: Simplify debugfs initialization
  soc/tegra: fuse: Fix Tegra234 fuse size
  soc/tegra: pmc: Add AON SW Wake support for Tegra234
  soc/tegra: fuse: Add support for Tegra264

Link: https://lore.kernel.org/r/20230609193620.2275240-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
16 months agodt-bindings: interrupt-controller: Convert Amlogic Meson GPIO interrupt controller...
Heiner Kallweit [Sun, 12 Mar 2023 21:29:07 +0000 (22:29 +0100)]
dt-bindings: interrupt-controller: Convert Amlogic Meson GPIO interrupt controller binding

Convert Amlogic Meson GPIO interrupt controller binding to yaml.

Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/e06e9f26-cf55-5596-c799-d698e9d7b409@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
16 months agoMAINTAINERS: add PHY-related files to Amlogic SoC file list
Heiner Kallweit [Sun, 15 Jan 2023 14:26:05 +0000 (15:26 +0100)]
MAINTAINERS: add PHY-related files to Amlogic SoC file list

Add PHY-related files to the Amlogic SoC file list.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/38f87b22-d9a8-b8d8-ba7b-a2c2d7311b04@gmail.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
16 months agodrivers: meson: secure-pwrc: always enable DMA domain
Alexey Romanov [Sat, 10 Jun 2023 09:04:14 +0000 (12:04 +0300)]
drivers: meson: secure-pwrc: always enable DMA domain

Starting from commit e45f243409db ("firmware: meson_sm:
populate platform devices from sm device tree data") pwrc
is probed successfully and disables unused pwr domains.
By A1 SoC family design, any TEE requires DMA pwr domain
always enabled.

Fixes: b3dde5013e13 ("soc: amlogic: Add support for Secure power domains controller")
Signed-off-by: Alexey Romanov <avromanov@sberdevices.ru>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230610090414.90529-1-avromanov@sberdevices.ru
[narmstrong: added fixes tag]
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
16 months agotee: optee: Use kmemdup() to replace kmalloc + memcpy
Jiapeng Chong [Tue, 13 Jun 2023 01:18:53 +0000 (09:18 +0800)]
tee: optee: Use kmemdup() to replace kmalloc + memcpy

Use kmemdup rather than duplicating its implementation.

./drivers/tee/optee/smc_abi.c:1542:12-19: WARNING opportunity for kmemdup.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5480
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
16 months agosoc: qcom: geni-se: Do not bother about enable/disable of interrupts in secondary...
Vijaya Krishna Nivarthi [Wed, 14 Jun 2023 11:28:07 +0000 (16:58 +0530)]
soc: qcom: geni-se: Do not bother about enable/disable of interrupts in secondary sequencer

The select_fifo/dma_mode() functions in geni driver enable/disable
interrupts (secondary included) conditionally for non-uart modes, while
uart is supposed to manage this internally.
However, only uart uses secondary IRQs while spi, i2c do not care about
these at all making their enablement (or disablement) totally unnecessary
for these protos.
Similarly, select_gpi_mode() also does disable s_irq and its useless again.

Drop enabling/disabling secondary IRQs.
This doesn't solve any observed problem but only gets rid of code pieces
that are not required.

Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1686742087-30731-1-git-send-email-quic_vnivarth@quicinc.com
16 months agodt-bindings: sram: qcom,imem: document qdu1000
Komal Bajaj [Mon, 22 May 2023 15:12:05 +0000 (20:42 +0530)]
dt-bindings: sram: qcom,imem: document qdu1000

Add compatible for QDU1000 and QRU1000 SoCs IMEM.

Signed-off-by: Komal Bajaj <quic_kbajaj@quicinc.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230522151206.22654-2-quic_kbajaj@quicinc.com
16 months agosoc: qcom: icc-bwmon: Fix MSM8998 count unit
Konrad Dybcio [Wed, 31 May 2023 16:33:03 +0000 (18:33 +0200)]
soc: qcom: icc-bwmon: Fix MSM8998 count unit

MSM8998's BWMON counts in megabytes. Fix it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230531-topic-msm8998-bwmon-v1-1-454f9d550ee5@linaro.org
16 months agodt-bindings: soc: qcom,rpmh-rsc: Require power-domains
Konrad Dybcio [Wed, 31 May 2023 13:22:35 +0000 (15:22 +0200)]
dt-bindings: soc: qcom,rpmh-rsc: Require power-domains

The Linux RPMh implementation refrains from sending some RPMh votes until
the system is about to enter suspend (which is indicated by all CPU cores
entering a low-power state). Lack of the power-domains property will make
it such that these votes are never sent.

Require the power-domains property as discussed in [1].

[1] https://lore.kernel.org/linux-arm-msm/20230512150425.3171122-1-quic_bjorande@quicinc.com/

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230531-topic-rsc-v1-1-b4a985f57b8b@linaro.org
16 months agosoc: qcom: socinfo: Add Soc ID for IPQ5300
Kathiravan T [Mon, 5 Jun 2023 08:05:29 +0000 (13:35 +0530)]
soc: qcom: socinfo: Add Soc ID for IPQ5300

Add the SoC ID for IPQ5300, which belong to the family of IPQ5332 SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230605080531.3879-3-quic_kathirav@quicinc.com
16 months agodt-bindings: arm: qcom,ids: add SoC ID for IPQ5300
Kathiravan T [Mon, 5 Jun 2023 08:05:28 +0000 (13:35 +0530)]
dt-bindings: arm: qcom,ids: add SoC ID for IPQ5300

Add the SoC ID for IPQ5300, which belong to the family of IPQ5332 SoC.

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230605080531.3879-2-quic_kathirav@quicinc.com
16 months agosoc: qcom: Fix a IS_ERR() vs NULL bug in probe
Dan Carpenter [Tue, 6 Jun 2023 08:21:22 +0000 (11:21 +0300)]
soc: qcom: Fix a IS_ERR() vs NULL bug in probe

The devm_ioremap() function returns NULL on error, it never returns
error pointers.

Fixes: a77b2a0b1280 ("soc: qcom: Introduce RPM master stats driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/ZH7sgpLAN23bCz9v@moroto
16 months agosoc: qcom: socinfo: Add support for new fields in revision 19
Naman Jain [Tue, 6 Jun 2023 13:46:26 +0000 (19:16 +0530)]
soc: qcom: socinfo: Add support for new fields in revision 19

Add support for below fields coming in socinfo structure under v19:
* num_func_clusters: number of clusters with at least one functional core
* boot_cluster: cluster selected as boot cluster
* boot_core: core selected as boot core
While at it, rename some variables to align them with their
functionalities.

Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230606134626.18790-3-quic_namajain@quicinc.com
16 months agosoc: qcom: socinfo: Add support for new fields in revision 18
Naman Jain [Tue, 6 Jun 2023 13:46:25 +0000 (19:16 +0530)]
soc: qcom: socinfo: Add support for new fields in revision 18

Add support for below fields coming in socinfo structure under v18:
* num_kvps: number of key value pairs (KVP)
* kvps_offset: the offset of the KVP table from the base address of
  socinfo structure in SMEM
KVP table has boolean values for certain feature flags, used to determine
hardware configuration.

Signed-off-by: Naman Jain <quic_namajain@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230606134626.18790-2-quic_namajain@quicinc.com
16 months agodt-bindings: firmware: scm: Add compatible for SDX75
Rohit Agarwal [Fri, 9 Jun 2023 11:50:35 +0000 (17:20 +0530)]
dt-bindings: firmware: scm: Add compatible for SDX75

Add devicetree compatible for SCM present in SDX75 platform.

Signed-off-by: Rohit Agarwal <quic_rohiagar@quicinc.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1686311438-24177-3-git-send-email-quic_rohiagar@quicinc.com
16 months agosoc: qcom: mdt_loader: Fix split image detection
Bjorn Andersson [Mon, 12 Jun 2023 21:58:04 +0000 (14:58 -0700)]
soc: qcom: mdt_loader: Fix split image detection

The enhanced detection introduced in commit '210d12c8197a ("soc: qcom:
mdt_loader: Enhance split binary detection")' requires that all segments
lies within the file on disk.

But the Qualcomm firmware files consistently has a BSS-like segment at
the end, with a p_offset aligned to the next 4k boundary. As the p_size
is 0 and there's nothing to load, the image is not padded to cover this
(empty) segment.

Ignore zero-sized segments when determining if the image is split, to
avoid this problem.

Fixes: 210d12c8197a ("soc: qcom: mdt_loader: Enhance split binary detection")
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # qrb5165-rb5
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230612215804.1883458-1-quic_bjorande@quicinc.com
16 months agodt-bindings: memory-controllers: drop unneeded quotes
Krzysztof Kozlowski [Fri, 9 Jun 2023 14:07:20 +0000 (16:07 +0200)]
dt-bindings: memory-controllers: drop unneeded quotes

Cleanup bindings dropping unneeded quotes. Once all these are fixed,
checking for this can be enabled in yamllint.

Link: https://lore.kernel.org/r/20230609140720.64743-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
16 months agosoc: rockchip: dtpm: use C99 array init syntax
Randy Dunlap [Mon, 1 May 2023 02:49:50 +0000 (19:49 -0700)]
soc: rockchip: dtpm: use C99 array init syntax

Eliminate sparse warnings in soc/rockchip/dtpm.c:

drivers/soc/rockchip/dtpm.c:15:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:17:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:20:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:23:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:26:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:29:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:32:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:35:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:38:12: sparse: warning: obsolete array initializer, use C99 syntax
drivers/soc/rockchip/dtpm.c:41:12: sparse: warning: obsolete array initializer, use C99 syntax

Fixes: b9d6c47a2be8 ("rockchip/soc/drivers: Add DTPM description for rk3399")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20230501024950.31518-1-rdunlap@infradead.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
17 months agofirmware: tegra: bpmp: Add support for DRAM MRQ GSCs
Peter De Schrijver [Mon, 8 May 2023 12:20:54 +0000 (15:20 +0300)]
firmware: tegra: bpmp: Add support for DRAM MRQ GSCs

Implement support for DRAM MRQ GSCs.

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
[treding@nvidia.com: drop unnecessary discrimination enum]
Signed-off-by: Thierry Reding <treding@nvidia.com>
17 months agosoc/tegra: pmc: Use devm_clk_notifier_register()
Thierry Reding [Fri, 9 Jun 2023 14:42:25 +0000 (16:42 +0200)]
soc/tegra: pmc: Use devm_clk_notifier_register()

Move to the device-managed version of clk_notifier_register() to remove
the need for manual cleanup. This fixes a potential issue where the
clock notifier would stick around after the driver fails to probe at a
later point.

Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
17 months agosoc/tegra: pmc: Simplify debugfs initialization
Thierry Reding [Fri, 9 Jun 2023 14:42:24 +0000 (16:42 +0200)]
soc/tegra: pmc: Simplify debugfs initialization

debugfs calls should generally not be error-checked to simplify the case
where debugfs is disabled. Since this driver is built-in and has the
sysfs bind/unbind attributes disabled, it cannot be unloaded, so there
is no need to hold onto a reference to the debugfs files that are
created.

We can further simplify this by moving the debugfs file creation to a
later stage to avoid any cleanup we might have to do during error unwind
operations. This is also a little cleaner because the debugfs file
relies on data structures that are created at a later point than when
the file was previously created.

Suggested-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
17 months agosoc: mediatek: remove DDP_DOMPONENT_DITHER from enum
Jason-JH.Lin [Mon, 6 Mar 2023 08:06:59 +0000 (16:06 +0800)]
soc: mediatek: remove DDP_DOMPONENT_DITHER from enum

After mmsys and drm change DITHER enum to DDP_COMPONENT_DITHER0,
mmsys header can remove the useless DDP_COMPONENT_DITHER enum.

Signed-off-by: Jason-JH.Lin <jason-jh.lin@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20230306080659.15261-3-jason-jh.lin@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agosoc: mediatek: SVS: Fix MT8192 GPU node name
Chen-Yu Tsai [Wed, 31 May 2023 06:35:30 +0000 (14:35 +0800)]
soc: mediatek: SVS: Fix MT8192 GPU node name

Device tree node names should be generic. The planned device node name
for the GPU, according to the bindings and posted DT changes, is "gpu",
not "mali".

Fix the GPU node name in the SVS driver to follow.

Fixes: 0bbb09b2af9d ("soc: mediatek: SVS: add mt8192 SVS GPU driver")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230531063532.2240038-1-wenst@chromium.org
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agoMerge tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx into soc...
Arnd Bergmann [Fri, 9 Jun 2023 13:01:45 +0000 (15:01 +0200)]
Merge tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx into soc/drivers

arm64: ZynqMP SoC changes for v6.5

soc-power
- Use of_property_present() instead of of_find_property()

soc-event
- Avoid use after free eve_data in event manager code

firmware:
- Extend zynqmp_pm_fpga_load() interface

MAINTAINERS:
- Clean xilinx records

* tag 'zynqmp-soc-for-v6.5' of https://github.com/Xilinx/linux-xlnx:
  MAINTAINERS: Switch to @amd.com emails
  MAINTAINERS: Remove Hyun and Anurag from maintainer list
  firmware: xilinx: Update the zynqmp_pm_fpga_load() API
  driver: soc: xilinx: use _safe loop iterator to avoid a use after free
  soc: xilinx: Use of_property_present() for testing DT property presence

Link: https://lore.kernel.org/r/411aee78-e7e8-5966-cbe8-40ff45e27ba2@monstr.eu
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoMerge tag 'omap-for-v6.5/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel...
Arnd Bergmann [Fri, 9 Jun 2023 12:47:25 +0000 (14:47 +0200)]
Merge tag 'omap-for-v6.5/ti-sysc-signed' of git://git./linux/kernel/git/tmlind/linux-omap into soc/drivers

Non-urgent ti-sysc driver fix for v6.5 merge window

A fix for masking bool variables that can wait for the merge window
no problem.

* tag 'omap-for-v6.5/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  bus: ti-sysc: Fix dispc quirk masking bool variables

Link: https://lore.kernel.org/r/pull-1685700720-242492@atomide.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoMerge tag 'samsung-drivers-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git...
Arnd Bergmann [Fri, 9 Jun 2023 12:46:47 +0000 (14:46 +0200)]
Merge tag 'samsung-drivers-6.5' of https://git./linux/kernel/git/krzk/linux into soc/drivers

Samsung SoC driver changes for v6.5

1. Re-introduce Exynos4212: Exynos PMU driver.
2. Convert S5P/Exynos Multi Format Codec bindings to DT schema.

* tag 'samsung-drivers-6.5' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  dt-bindings: media: s5p-mfc: convert bindings to json-schema
  soc: samsung: exynos-pmu: Re-introduce Exynos4212 support
  dt-bindings: soc: samsung: exynos-pmu: add Exynos4212 compatible

Link: https://lore.kernel.org/r/20230602091501.15178-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoMerge tag 'renesas-drivers-for-v6.5-tag2' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Fri, 9 Jun 2023 12:42:18 +0000 (14:42 +0200)]
Merge tag 'renesas-drivers-for-v6.5-tag2' of git://git./linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.5 (take two)

  - Convert the R-Mobile SYSC driver to readl_poll_timeout_atomic().

* tag 'renesas-drivers-for-v6.5-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rmobile-sysc: Convert to readl_poll_timeout_atomic()
  iopoll: Do not use timekeeping in read_poll_timeout_atomic()
  iopoll: Call cpu_relax() in busy loops

Link: https://lore.kernel.org/r/cover.1686304612.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agosoc/tegra: fuse: Fix Tegra234 fuse size
Kartik [Tue, 6 Jun 2023 15:36:08 +0000 (16:36 +0100)]
soc/tegra: fuse: Fix Tegra234 fuse size

The Tegra234 fuse size is incorrectly defined as 0x98c. The actual size
of the Tegra234 fuses is 0xf8c and so update the size of the Tegra234
fuses to fix this.

Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
17 months agosoc/tegra: pmc: Add AON SW Wake support for Tegra234
Viswanath L [Tue, 6 Jun 2023 15:36:07 +0000 (16:36 +0100)]
soc/tegra: pmc: Add AON SW Wake support for Tegra234

Wake-up signal 83 on Tegra234 is triggered by software writing to
WAKE_AOWAKE_SW_WAKE_TIER0_TRIGGER_0 register. This wake-up is mapped
to CPU interrupt 179 and is used by the Sensor Processing Engine (SPE)
in the Always-on (AON) power domain for waking up the system.

Signed-off-by: Viswanath L <viswanathl@nvidia.com>
Signed-off-by: Kartik <kkartik@nvidia.com>
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
17 months agowkup_m3_ipc.c: Fix error checking for debugfs_create_dir
Osama Muhammad [Wed, 17 May 2023 17:24:31 +0000 (22:24 +0500)]
wkup_m3_ipc.c: Fix error checking for debugfs_create_dir

This patch fixes the error checking in wkup_m3_ipc.c in
debugfs_create_dir. The correct way to check if an error occurred
is 'IS_ERR' inline function.

Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
Link: https://lore.kernel.org/r/20230517172431.13507-1-osmtendev@gmail.com
Signed-off-by: Nishanth Menon <nm@ti.com>
17 months agodt-bindings: soc: rockchip: add rk3588 pipe-phy syscon
Sebastian Reichel [Mon, 22 May 2023 17:34:18 +0000 (19:34 +0200)]
dt-bindings: soc: rockchip: add rk3588 pipe-phy syscon

The pipe-phy syscon is used by rockchip,rk3588-naneng-combphy,
which in turn is the PHY for USB3, PCIe and SATA.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230522173423.64691-2-sebastian.reichel@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
17 months agopowercap: arm_scmi: Add support for disabling powercaps on a zone
Cristian Marussi [Wed, 31 May 2023 15:20:39 +0000 (16:20 +0100)]
powercap: arm_scmi: Add support for disabling powercaps on a zone

Add support to disable/enable powercapping on a zone.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230531152039.2363181-4-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
17 months agofirmware: arm_scmi: Add Powercap protocol enable support
Cristian Marussi [Wed, 31 May 2023 15:20:38 +0000 (16:20 +0100)]
firmware: arm_scmi: Add Powercap protocol enable support

SCMI powercap protocol v3.2 supports disabling the powercap on a zone
by zone basis by providing a zero valued powercap.

Expose new operations to enable/disable powercapping on a per-zone base.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230531152039.2363181-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
17 months agofirmware: arm_scmi: Refactor the internal powercap get/set helpers
Cristian Marussi [Wed, 31 May 2023 15:20:37 +0000 (16:20 +0100)]
firmware: arm_scmi: Refactor the internal powercap get/set helpers

Refactor the SCMI powercap internal get/set helpers in preparation to
adding the powercap protocol enable/disable support.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20230531152039.2363181-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
17 months agosoc: renesas: rmobile-sysc: Convert to readl_poll_timeout_atomic()
Geert Uytterhoeven [Fri, 2 Jun 2023 08:50:41 +0000 (10:50 +0200)]
soc: renesas: rmobile-sysc: Convert to readl_poll_timeout_atomic()

Use readl_poll_timeout_atomic() instead of open-coding the same
operation.

  1. rmobile_pd_power_down(): as typically less than 20 retries are
     needed, PSTR_RETRIES (100) µs is a suitable timeout value.

  2. __rmobile_pd_power_up(): the old method of first polling some
     cycles with a 1 µs delay, followed by more polling cycles without
     any delay didn't make much sense, as the latter was insignificant
     compared to the former.  Furthermore, typically no retries are
     needed.  Hence just retain the polling with delay.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/ae4bf03ab8fd5a557c683086958d6764babc0723.1685692810.git.geert+renesas@glider.be
17 months agoMerge tag 'iopoll-busy-loop-timeout-tag' into renesas-drivers-for-v6.5
Geert Uytterhoeven [Mon, 5 Jun 2023 13:43:21 +0000 (15:43 +0200)]
Merge tag 'iopoll-busy-loop-timeout-tag' into renesas-drivers-for-v6.5

iopoll: Busy loop and timeout improvements

17 months agoiopoll: Do not use timekeeping in read_poll_timeout_atomic()
Geert Uytterhoeven [Fri, 2 Jun 2023 08:50:37 +0000 (10:50 +0200)]
iopoll: Do not use timekeeping in read_poll_timeout_atomic()

read_poll_timeout_atomic() uses ktime_get() to implement the timeout
feature, just like its non-atomic counterpart.  However, there are
several issues with this, due to its use in atomic contexts:

  1. When called in the s2ram path (as typically done by clock or PM
     domain drivers), timekeeping may be suspended, triggering the
     WARN_ON(timekeeping_suspended) in ktime_get():

WARNING: CPU: 0 PID: 654 at kernel/time/timekeeping.c:843 ktime_get+0x28/0x78

     Calling ktime_get_mono_fast_ns() instead of ktime_get() would get
     rid of that warning.  However, that would break timeout handling,
     as (at least on systems with an ARM architectured timer), the time
     returned by ktime_get_mono_fast_ns() does not advance while
     timekeeping is suspended.
     Interestingly, (on the same ARM systems) the time returned by
     ktime_get() does advance while timekeeping is suspended, despite
     the warning.

  2. Depending on the actual clock source, and especially before a
     high-resolution clocksource (e.g. the ARM architectured timer)
     becomes available, time may not advance in atomic contexts, thus
     breaking timeout handling.

Fix this by abandoning the idea that one can rely on timekeeping to
implement timeout handling in all atomic contexts, and switch from a
global time-based to a locally-estimated timeout handling.  In most
(all?) cases the timeout condition is exceptional and an error
condition, hence any additional delays due to underestimating wall clock
time are irrelevant.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/3d2a2f4e553489392d871108797c3be08f88300b.1685692810.git.geert+renesas@glider.be
17 months agoiopoll: Call cpu_relax() in busy loops
Geert Uytterhoeven [Fri, 2 Jun 2023 08:50:36 +0000 (10:50 +0200)]
iopoll: Call cpu_relax() in busy loops

It is considered good practice to call cpu_relax() in busy loops, see
Documentation/process/volatile-considered-harmful.rst.  This can not
only lower CPU power consumption or yield to a hyperthreaded twin
processor, but also allows an architecture to mitigate hardware issues
(e.g. ARM Erratum 754327 for Cortex-A9 prior to r2p0) in the
architecture-specific cpu_relax() implementation.

In addition, cpu_relax() is also a compiler barrier.  It is not
immediately obvious that the @op argument "function" will result in an
actual function call (e.g. in case of inlining).

Where a function call is a C sequence point, this is lost on inlining.
Therefore, with agressive enough optimization it might be possible for
the compiler to hoist the:

        (val) = op(args);

"load" out of the loop because it doesn't see the value changing. The
addition of cpu_relax() would inhibit this.

As the iopoll helpers lack calls to cpu_relax(), people are sometimes
reluctant to use them, and may fall back to open-coded polling loops
(including cpu_relax() calls) instead.

Fix this by adding calls to cpu_relax() to the iopoll helpers:
  - For the non-atomic case, it is sufficient to call cpu_relax() in
    case of a zero sleep-between-reads value, as a call to
    usleep_range() is a safe barrier otherwise.  However, it doesn't
    hurt to add the call regardless, for simplicity, and for similarity
    with the atomic case below.
  - For the atomic case, cpu_relax() must be called regardless of the
    sleep-between-reads value, as there is no guarantee all
    architecture-specific implementations of udelay() handle this.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/45c87bec3397fdd704376807f0eec5cc71be440f.1685692810.git.geert+renesas@glider.be
17 months agoMAINTAINERS: Switch to @amd.com emails
Michal Simek [Tue, 16 May 2023 13:48:52 +0000 (15:48 +0200)]
MAINTAINERS: Switch to @amd.com emails

@xilinx.com is still working but better to switch to new amd.com after
AMD/Xilinx acquisition.

Acked-by: Shubhrajyoti Datta <shubhrajyoti.datta@amd.com>
Acked-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f7773fdd002f89578b9e5262692a563fe7be4123.1684244928.git.michal.simek@amd.com
17 months agomemory: atmel-sdramc: remove the driver
Claudiu Beznea [Tue, 16 May 2023 07:24:05 +0000 (10:24 +0300)]
memory: atmel-sdramc: remove the driver

Driver does only clock request + enable for DDR clocks. DDR clocks are
enabled by bootloader and need to stay that way in Linux. To avoid having
these clocks disabled by clock subsystem in case there are no Linux
consumers for them the clocks were marked as critical in clock drivers
(in commit 68b3b6f1773d ("clk: at91: mark ddr clocks as critical")).
With this, there is no need to have a separate driver that only does
clock request + enable.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230516072405.2696225-1-claudiu.beznea@microchip.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
17 months agomemory: brcmstb_dpfe: fix testing array offset after use
Krzysztof Kozlowski [Sat, 13 May 2023 11:29:31 +0000 (13:29 +0200)]
memory: brcmstb_dpfe: fix testing array offset after use

Code should first check for valid value of array offset, then use it as
the index.  Fixes smatch warning:

  drivers/memory/brcmstb_dpfe.c:443 __send_command() error: testing array offset 'cmd' after use.

Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE")
Acked-by: Markus Mayer <mmayer@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20230513112931.176066-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
17 months agosoc: qcom: ocmem: Add OCMEM hardware version print
Luca Weiss [Mon, 29 May 2023 08:41:15 +0000 (10:41 +0200)]
soc: qcom: ocmem: Add OCMEM hardware version print

It might be useful to know what hardware version of the OCMEM block the
SoC contains. Add a debug print for that.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230509-ocmem-hwver-v3-1-e51f3488e0f4@z3ntu.xyz
17 months agosoc: mediatek: mtk-mutex: Remove unnecessary .owner
Jiapeng Chong [Fri, 5 May 2023 06:19:50 +0000 (14:19 +0800)]
soc: mediatek: mtk-mutex: Remove unnecessary .owner

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

./drivers/soc/mediatek/mtk-mutex.c:1054:3-8: No need to set .owner here. The core will do it.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4869
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230505061950.25977-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agodt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 11:27:14 +0000 (13:27 +0200)]
dt-bindings: phy: mediatek,dsi-phy: Add compatible for MT6795 Helio X10

Add a compatible string for MediaTek Helio X10 MT6795: this SoC uses
the same DSI PHY as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230412112739.160376-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agodt-bindings: pwm: Add compatible for MediaTek MT6795
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 11:27:13 +0000 (13:27 +0200)]
dt-bindings: pwm: Add compatible for MediaTek MT6795

Add a compatible string for MediaTek Helio X10 MT6795's display PWM
block: this is the same as MT8173.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20230412112739.160376-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agodt-bindings: spmi: spmi-mtk-pmif: Document mediatek,mt8195-spmi as fallback of mediat...
Allen-KH Cheng [Fri, 24 Mar 2023 02:12:54 +0000 (10:12 +0800)]
dt-bindings: spmi: spmi-mtk-pmif: Document mediatek,mt8195-spmi as fallback of mediatek,mt8186-spmi

The mt8186-spmi is used as compatible with mt8195-spmi on the MT8186,
document this situation.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Link: https://lore.kernel.org/r/20230324021258.15863-3-allen-kh.cheng@mediatek.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agosoc: mediatek: pwrap: Add support for MT6795 Helio X10
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 13:12:16 +0000 (15:12 +0200)]
soc: mediatek: pwrap: Add support for MT6795 Helio X10

Add the necessary bits to support the MT6795 Helio X10 smartphone SoC:
this is always paired with a MT6331 PMIC, with MT6332 companion.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230412131216.198313-7-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agosoc: mediatek: mtk-pmic-wrap: Add support for MT6331 w/ MT6332 companion
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 13:12:15 +0000 (15:12 +0200)]
soc: mediatek: mtk-pmic-wrap: Add support for MT6331 w/ MT6332 companion

Add support for the MT6331 PMIC and for its companion MT6332 PMIC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230412131216.198313-6-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agosoc: mediatek: mtk-pmic-wrap: Add support for companion PMICs
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 13:12:14 +0000 (15:12 +0200)]
soc: mediatek: mtk-pmic-wrap: Add support for companion PMICs

Some PMICs are designed to work with a companion part, which provides
more regulators and/or companion devices such as LED controllers,
display backlight controllers, battery charging, fuel gauge, etc:
this kind of PMICs are usually present in smartphone platforms, where
tight integration is required.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230412131216.198313-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agosoc: mediatek: pwrap: Add kerneldoc for struct pwrap_slv_type
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 13:12:13 +0000 (15:12 +0200)]
soc: mediatek: pwrap: Add kerneldoc for struct pwrap_slv_type

In preparation for adding new members with name abbreviations describe
the struct pwrap_slv_type with kerneldoc to enhance human readability.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230412131216.198313-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agosoc: mediatek: pwrap: Move PMIC read test sequence in function
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 13:12:12 +0000 (15:12 +0200)]
soc: mediatek: pwrap: Move PMIC read test sequence in function

The PMIC read test is performed in two places: pwrap_init_dual_io()
and pwrap_init_sidly().
In preparation for adding support for PMICs requiring a companion
part, move this sequence to a new function pwrap_pmic_read_test().

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230412131216.198313-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agodt-bindings: soc: mediatek: pwrap: Add compatible for MT6795 Helio X10
AngeloGioacchino Del Regno [Wed, 12 Apr 2023 13:12:11 +0000 (15:12 +0200)]
dt-bindings: soc: mediatek: pwrap: Add compatible for MT6795 Helio X10

Add a compatible for the PMIC Wrapper found on the MT6795 Helio X10 SoC.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230412131216.198313-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
17 months agocpufreq: qcom-nvmem: use helper to get SMEM SoC ID
Robert Marko [Fri, 26 May 2023 20:48:02 +0000 (22:48 +0200)]
cpufreq: qcom-nvmem: use helper to get SMEM SoC ID

Now that SMEM exports a helper to get the SMEM SoC ID lets utilize it.
Currently qcom_cpufreq_get_msm_id() is encoding the returned SMEM SoC ID
into an enum, however there is no reason to do so and we can just match
directly on the SMEM SoC ID as returned by qcom_smem_get_soc_id().

Signed-off-by: Robert Marko <robimarko@gmail.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko@gmail.com
17 months agocpufreq: qcom-nvmem: use SoC ID-s from bindings
Robert Marko [Fri, 26 May 2023 20:48:01 +0000 (22:48 +0200)]
cpufreq: qcom-nvmem: use SoC ID-s from bindings

SMEM SoC ID-s are now stored in DT bindings so lets use those instead of
defining them in the driver again.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko@gmail.com
17 months agosoc: qcom: smem: introduce qcom_smem_get_soc_id()
Robert Marko [Fri, 26 May 2023 20:48:00 +0000 (22:48 +0200)]
soc: qcom: smem: introduce qcom_smem_get_soc_id()

Introduce a helper to return the SoC SMEM ID, which is used to identify the
exact SoC model as there may be differences in the same SoC family.

Currently, cpufreq-nvmem does this completely in the driver and there has
been more interest expresed for other drivers to use this information so
lets expose a common helper to prevent redoing it in individual drivers
since this field is present on every SMEM table version.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230526204802.3081168-3-robimarko@gmail.com
17 months agosoc: qcom: smem: Switch to EXPORT_SYMBOL_GPL()
Robert Marko [Fri, 26 May 2023 20:47:59 +0000 (22:47 +0200)]
soc: qcom: smem: Switch to EXPORT_SYMBOL_GPL()

SMEM has been GPL licensed from the start, and there is no reason to use
EXPORT_SYMBOL() so switch to the GPL version.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Trilok Soni <quic_tsoni@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230526204802.3081168-2-robimarko@gmail.com
17 months agosoc: qcom: socinfo: move SMEM item struct and defines to a header
Robert Marko [Fri, 26 May 2023 20:47:58 +0000 (22:47 +0200)]
soc: qcom: socinfo: move SMEM item struct and defines to a header

Move SMEM item struct and related defines to a header in order to be able
to reuse them in the SMEM driver instead of duplicating them.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230526204802.3081168-1-robimarko@gmail.com
17 months agosoc: qcom: mdt_loader: Fix unconditional call to scm_pas_mem_setup
Christian Marangi [Fri, 26 May 2023 11:55:11 +0000 (13:55 +0200)]
soc: qcom: mdt_loader: Fix unconditional call to scm_pas_mem_setup

Commit ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS
mem_setup") dropped the relocate check and made pas_mem_setup run
unconditionally. The code was later moved with commit f4e526ff7e38
("soc: qcom: mdt_loader: Extract PAS operations") to
qcom_mdt_pas_init() effectively losing track of what was actually
done.

The assumption that PAS mem_setup can be done anytime was effectively
wrong, with no good reason and this caused regression on some SoC
that use remoteproc to bringup ath11k. One example is IPQ8074 SoC that
effectively broke resulting in remoteproc silently die and ath11k not
working.

On this SoC FW relocate is not enabled and PAS mem_setup was correctly
skipped in previous kernel version resulting in correct bringup and
function of remoteproc and ath11k.

To fix the regression, reintroduce the relocate check in
qcom_mdt_pas_init() and correctly skip PAS mem_setup where relocate is
not enabled.

Fixes: ebeb20a9cd3f ("soc: qcom: mdt_loader: Always invoke PAS mem_setup")
Tested-by: Robert Marko <robimarko@gmail.com>
Co-developed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Mukesh Ojha <quic_mojha@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230526115511.3328-1-ansuelsmth@gmail.com
17 months agoMerge tag 'sram-for-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
Arnd Bergmann [Fri, 26 May 2023 14:38:52 +0000 (16:38 +0200)]
Merge tag 'sram-for-soc' of git://git./linux/kernel/git/linusw/linux-nomadik into soc/drivers

This fixes a small bug in the SRAM misc driver and adds
a compatible for SRAMs to the SRAM bindings.

* tag 'sram-for-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik:
  misc: sram: Generate unique names for subpools
  dt-bindings: sram: Add compatible for ST-Ericsson U8500 eSRAM

Link: https://lore.kernel.org/r/CACRpkdbEQ7nTnJTj5WMtxvH057fDSbX5tNs5j4Y=5KSBMpa-Sw@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoarm-cci: add cci_enable_port_for_self prototype
Arnd Bergmann [Tue, 16 May 2023 20:12:12 +0000 (22:12 +0200)]
arm-cci: add cci_enable_port_for_self prototype

The cci_enable_port_for_self() is called from assembler, so
add the prototype only to shut up the W=1 warning:

drivers/bus/arm-cci.c:298:25: error: no previous prototype for 'cci_enable_port_for_self' [-Werror=missing-prototypes]

Link: https://lore.kernel.org/r/20230516201218.556437-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoMerge tag 'reset-for-v6.5' of git://git.pengutronix.de/pza/linux into soc/drivers
Arnd Bergmann [Fri, 26 May 2023 11:42:50 +0000 (13:42 +0200)]
Merge tag 'reset-for-v6.5' of git://git.pengutronix.de/pza/linux into soc/drivers

Reset controller updates for v6.5

Use devm_platform_ioremap_resource() instead of platform_get_resource()
and devm_ioremap_resource() in various drivers, simplify the stih407
Kconfig and use regmap_field_read_poll_timeout() instead of open-coded
waiting, and use dev_err_probe() in the meson-audio-arb reset driver.
With its platform gone, remove the now obsolete oxnas reset driver.
Drop depends on the non-user-visible CONFIG_AUXILIARY_BUS symbol.

* tag 'reset-for-v6.5' of git://git.pengutronix.de/pza/linux:
  reset: mpfs: select AUXILIARY_BUS
  reset: starfive: select AUXILIARY_BUS
  reset: oxnas: remove obsolete reset driver
  reset: sti: simplify driver's config and build
  reset: meson-audio-arb: Use dev_err_probe()
  reset: sti: rely on regmap_field_read_poll_timeout for ack wait
  reset: brcmstb-rescal: Use devm_platform_ioremap_resource()
  reset: meson: Use devm_platform_ioremap_resource()
  reset: reset-hsdk: Use devm_platform_ioremap_resource()
  reset: lpc18xx: Use devm_platform_ioremap_resource()
  reset: axs10x: Use devm_platform_ioremap_resource()
  reset: ath79: Use devm_platform_ioremap_resource()

Link: https://lore.kernel.org/r/20230511133235.874566-1-p.zabel@pengutronix.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoMerge tag 'renesas-drivers-for-v6.5-tag1' of git://git.kernel.org/pub/scm/linux/kerne...
Arnd Bergmann [Fri, 26 May 2023 11:41:18 +0000 (13:41 +0200)]
Merge tag 'renesas-drivers-for-v6.5-tag1' of git://git./linux/kernel/git/geert/renesas-devel into soc/drivers

Renesas driver updates for v6.5

  - Enable watchdog reset support on R-Car V3U.

* tag 'renesas-drivers-for-v6.5-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  soc: renesas: rcar-rst: Allow WDT reset on R-Car V3U

Link: https://lore.kernel.org/r/cover.1685094242.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
17 months agoMAINTAINERS: Add Konrad Dybcio as linux-arm-msm co-maintainer
Konrad Dybcio [Mon, 22 May 2023 21:23:39 +0000 (23:23 +0200)]
MAINTAINERS: Add Konrad Dybcio as linux-arm-msm co-maintainer

As discussed with Bjorn Andersson in private, step up to
co-maintainership.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230522-topic-maintainers-v1-1-2b91eb8e4f65@linaro.org
17 months agodt-bindings: sram: qcom,imem: Document MSM8226
Matti Lehtimäki [Sat, 20 May 2023 12:19:30 +0000 (15:19 +0300)]
dt-bindings: sram: qcom,imem: Document MSM8226

Add compatible for MSM8226 IMEM.

Signed-off-by: Matti Lehtimäki <matti.lehtimaki@gmail.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230520121933.15533-2-matti.lehtimaki@gmail.com
17 months agosoc: qcom: socinfo: Add Soc ID for IPQ5312 and IPQ5302
Kathiravan T [Tue, 9 May 2023 03:35:31 +0000 (09:05 +0530)]
soc: qcom: socinfo: Add Soc ID for IPQ5312 and IPQ5302

Add the SoC ID for IPQ5312 and IPQ5302, which belong to the family of
IPQ5332 SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230509033531.21468-3-quic_kathirav@quicinc.com
17 months agodt-bindings: arm: qcom,ids: add SoC ID for IPQ5312 and IPQ5302
Kathiravan T [Tue, 9 May 2023 03:35:30 +0000 (09:05 +0530)]
dt-bindings: arm: qcom,ids: add SoC ID for IPQ5312 and IPQ5302

Add the SoC ID for IPQ5312 and IPQ5302, which belong to the family of
IPQ5332 SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Kathiravan T <quic_kathirav@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230509033531.21468-2-quic_kathirav@quicinc.com
17 months agosoc: qcom: socinfo: Add IDs for IPQ5018 family
Robert Marko [Sat, 29 Apr 2023 19:33:36 +0000 (21:33 +0200)]
soc: qcom: socinfo: Add IDs for IPQ5018 family

Add SOC IDs for the IPQ5018 family.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230429193336.600629-2-robimarko@gmail.com
17 months agodt-bindings: arm: qcom,ids: Add IDs for IPQ5018 family
Robert Marko [Sat, 29 Apr 2023 19:33:35 +0000 (21:33 +0200)]
dt-bindings: arm: qcom,ids: Add IDs for IPQ5018 family

Add SOC IDs for the IPQ5018 family.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230429193336.600629-1-robimarko@gmail.com
17 months agosoc: qcom: Introduce RPM master stats driver
Konrad Dybcio [Thu, 20 Apr 2023 17:36:18 +0000 (19:36 +0200)]
soc: qcom: Introduce RPM master stats driver

Introduce a driver to query and expose detailed, per-subsystem (as opposed
to the existing qcom_stats driver which exposes SoC-wide data) about low
power mode states of a given RPM master. That includes the APSS (ARM),
MPSS (modem) and other remote cores, depending on the platform
configuration.

This is a vastly cleaned up and restructured version of a similar
driver found in msm-5.4.

Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230405-topic-master_stats-v6-2-2277b4433748@linaro.org
17 months agodt-bindings: soc: qcom: Add RPM Master stats
Konrad Dybcio [Thu, 20 Apr 2023 17:36:17 +0000 (19:36 +0200)]
dt-bindings: soc: qcom: Add RPM Master stats

The RPM MSG RAM contains per-RPM-master (e.g. APPS, ADSP etc.) sleep
statistics. They let one assess which core is actively preventing the
system from entering a true low-power mode.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230405-topic-master_stats-v6-1-2277b4433748@linaro.org
17 months agosoc: qcom: qmi: Use alloc_ordered_workqueue() to create ordered workqueues
Tejun Heo [Fri, 21 Apr 2023 02:50:38 +0000 (16:50 -1000)]
soc: qcom: qmi: Use alloc_ordered_workqueue() to create ordered workqueues

BACKGROUND
==========

When multiple work items are queued to a workqueue, their execution order
doesn't match the queueing order. They may get executed in any order and
simultaneously. When fully serialized execution - one by one in the queueing
order - is needed, an ordered workqueue should be used which can be created
with alloc_ordered_workqueue().

However, alloc_ordered_workqueue() was a later addition. Before it, an
ordered workqueue could be obtained by creating an UNBOUND workqueue with
@max_active==1. This originally was an implementation side-effect which was
broken by 4c16bd327c74 ("workqueue: restore WQ_UNBOUND/max_active==1 to be
ordered"). Because there were users that depended on the ordered execution,
5c0338c68706 ("workqueue: restore WQ_UNBOUND/max_active==1 to be ordered")
made workqueue allocation path to implicitly promote UNBOUND workqueues w/
@max_active==1 to ordered workqueues.

While this has worked okay, overloading the UNBOUND allocation interface
this way creates other issues. It's difficult to tell whether a given
workqueue actually needs to be ordered and users that legitimately want a
min concurrency level wq unexpectedly gets an ordered one instead. With
planned UNBOUND workqueue updates to improve execution locality and more
prevalence of chiplet designs which can benefit from such improvements, this
isn't a state we wanna be in forever.

This patch series audits all callsites that create an UNBOUND workqueue w/
@max_active==1 and converts them to alloc_ordered_workqueue() as necessary.

WHAT TO LOOK FOR
================

The conversions are from

  alloc_workqueue(WQ_UNBOUND | flags, 1, args..)

to

  alloc_ordered_workqueue(flags, args...)

which don't cause any functional changes. If you know that fully ordered
execution is not ncessary, please let me know. I'll drop the conversion and
instead add a comment noting the fact to reduce confusion while conversion
is in progress.

If you aren't fully sure, it's completely fine to let the conversion
through. The behavior will stay exactly the same and we can always
reconsider later.

As there are follow-up workqueue core changes, I'd really appreciate if the
patch can be routed through the workqueue tree w/ your acks. Thanks.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230421025046.4008499-15-tj@kernel.org
17 months agosoc: qcom: ramp_controller: Improve error message for failure in .remove()
Uwe Kleine-König [Sat, 15 Apr 2023 20:18:48 +0000 (22:18 +0200)]
soc: qcom: ramp_controller: Improve error message for failure in .remove()

When a platform_driver's .remove() callback returns an error, the driver
core emits

remove callback returned a non-zero value. This will be ignored.

. Replace this by a more specific error message. Then convert to
.remove_new() which is equivalent to returning zero unconditionally in
.remove(). See commit 5c5a7680e67b ("platform: Provide a remove callback
that returns no value") for its rationale.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230415201848.3779001-1-u.kleine-koenig@pengutronix.de
17 months agodt-bindings: soc: qcom: smd-rpm: allow MSM8226 over SMD
Krzysztof Kozlowski [Mon, 10 Apr 2023 18:10:36 +0000 (20:10 +0200)]
dt-bindings: soc: qcom: smd-rpm: allow MSM8226 over SMD

The MSM8226 RPM uses SMD, so it must allow qcom,smd-channels:

  qcom-msm8226-samsung-s3ve3g.dtb: rpm-requests: qcom,smd-channels: False schema does not allow ['rpm_requests']

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230410181036.25943-1-krzysztof.kozlowski@linaro.org
17 months agosoc: qcom: rpmpd: use correct __le32 type
Min-Hua Chen [Mon, 22 May 2023 16:07:56 +0000 (00:07 +0800)]
soc: qcom: rpmpd: use correct __le32 type

Use cpu_to_le32 to cast constants to __le32 before comparing
them with __le32 type pd->key. This fixes the following sparse
warnings:

drivers/soc/qcom/rpmpd.c:895:31: sparse: warning: restricted __le32 degrades to integer
drivers/soc/qcom/rpmpd.c:896:15: sparse: warning: restricted __le32 degrades to integer

Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230522160757.284165-1-minhuadotchen@gmail.com
17 months agodt-bindings: soc: qcom: eud: Fix compatible string in the example
Bhupesh Sharma [Tue, 2 May 2023 09:39:59 +0000 (15:09 +0530)]
dt-bindings: soc: qcom: eud: Fix compatible string in the example

As noted by Konrad while reviewing [1], the example node in the EUD
yaml documentation has a compatible string with no space after a comma.

Fix the same.

[1]. https://lore.kernel.org/linux-arm-msm/20221231131945.3286639-1-bhupesh.sharma@linaro.org

Signed-off-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230502093959.1258889-3-bhupesh.sharma@linaro.org
17 months agosoc: qcom: mdt_loader: Enhance split binary detection
Gokul krishna Krishnakumar [Tue, 9 May 2023 00:18:21 +0000 (17:18 -0700)]
soc: qcom: mdt_loader: Enhance split binary detection

It may be that the offset of the first program header lies inside the mdt's
filesize, in this case the loader would incorrectly assume that the bins
were not split and in this scenario the firmware authentication fails.
This change updates the logic used by the mdt loader to understand whether
the firmware images are split or not. It figures this out by checking if
each programs header's segment lies within the file or not.

Co-developed-by: Melody Olvera <quic_molvera@quicinc.com>
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230509001821.24010-1-quic_gokukris@quicinc.com
17 months agoqcom: pmic_glink: enable altmode for SM8450
Neil Armstrong [Tue, 23 May 2023 07:15:50 +0000 (09:15 +0200)]
qcom: pmic_glink: enable altmode for SM8450

Create a separate bitmask for sm8550 and enable altmode aux driver
for sm8450 platform to enable pmic-glink altmode events.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230503-topic-sm8450-graphics-dp-next-v3-6-6c43d293995f@linaro.org
17 months agoMAINTAINERS: Remove Hyun and Anurag from maintainer list
Michal Simek [Tue, 16 May 2023 13:47:15 +0000 (15:47 +0200)]
MAINTAINERS: Remove Hyun and Anurag from maintainer list

There is no activity from them for these drivers. All of them have Laurent
as active maintainer and their emails no longer works that's why remove
them from the list.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/18700dda117076510baf87a090acbb29cb3ba3ba.1684244832.git.michal.simek@amd.com
17 months agoLinux 6.4-rc3
Linus Torvalds [Sun, 21 May 2023 21:05:48 +0000 (14:05 -0700)]
Linux 6.4-rc3

17 months agoMerge tag 'uml-for-linus-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 21 May 2023 21:03:22 +0000 (14:03 -0700)]
Merge tag 'uml-for-linus-6.4-rc3' of git://git./linux/kernel/git/uml/linux

Pull UML fix from Richard Weinberger:

 - Fix modular build for UML watchdog

* tag 'uml-for-linus-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux:
  um: harddog: fix modular build

17 months agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 21 May 2023 20:58:37 +0000 (13:58 -0700)]
Merge tag 'for-linus' of git://git./virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "ARM:

   - Plug a race in the stage-2 mapping code where the IPA and the PA
     would end up being out of sync

   - Make better use of the bitmap API (bitmap_zero, bitmap_zalloc...)

   - FP/SVE/SME documentation update, in the hope that this field
     becomes clearer...

   - Add workaround for Apple SEIS brokenness to a new SoC

   - Random comment fixes

  x86:

   - add MSR_IA32_TSX_CTRL into msrs_to_save

   - fixes for XCR0 handling in SGX enclaves

  Generic:

   - Fix vcpu_array[0] races

   - Fix race between starting a VM and 'reboot -f'"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save
  KVM: x86: Don't adjust guest's CPUID.0x12.1 (allowed SGX enclave XFRM)
  KVM: VMX: Don't rely _only_ on CPUID to enforce XCR0 restrictions for ECREATE
  KVM: Fix vcpu_array[0] races
  KVM: VMX: Fix header file dependency of asm/vmx.h
  KVM: Don't enable hardware after a restart/shutdown is initiated
  KVM: Use syscore_ops instead of reboot_notifier to hook restart/shutdown
  KVM: arm64: vgic: Add Apple M2 PRO/MAX cpus to the list of broken SEIS implementations
  KVM: arm64: Clarify host SME state management
  KVM: arm64: Restructure check for SVE support in FP trap handler
  KVM: arm64: Document check for TIF_FOREIGN_FPSTATE
  KVM: arm64: Fix repeated words in comments
  KVM: arm64: Constify start/end/phys fields of the pgtable walker data
  KVM: arm64: Infer PA offset from VA in hyp map walker
  KVM: arm64: Infer the PA offset from IPA in stage-2 map walker
  KVM: arm64: Use the bitmap API to allocate bitmaps
  KVM: arm64: Slightly optimize flush_context()

17 months agoMerge tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git.kernel.org/pub/scm...
Linus Torvalds [Sun, 21 May 2023 20:24:59 +0000 (13:24 -0700)]
Merge tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git./linux/kernel/git/acme/linux

Pull perf tools fixes from Arnaldo Carvalho de Melo:

 - Fail graciously if BUILD_BPF_SKEL=1 is specified and clang isn't
   available

 - Add empty 'struct rq' to 'perf lock contention' to satisfy libbpf
   'runqueue' type verification. This feature is built only with
   BUILD_BPF_SKEL=1

 - Make vmlinux.h use bpf.h and perf_event.h in source directory, not
   system ones that may be old and not have things like 'union
   perf_sample_weight'

 - Add system include paths to BPF builds to pick things missing in the
   headers included by clang -target bpf

 - Update various header copies with the kernel sources

 - Change divide by zero and not supported events behavior to show
   'nan'/'not counted' in 'perf stat' output.

   This happens when using things like 'perf stat -M TopdownL2 true',
   involving JSON metrics

 - Update no event/metric expectations affected by using JSON metrics in
   'perf stat -ddd' perf test

 - Avoid segv with 'perf stat --topdown' for metrics without a group

 - Do not assume which events may have a PMU name, allowing the logic to
   keep an AUX event group together. Makes this usecase work again:

     $ perf record --no-bpf-event -c 10 -e '{intel_pt//,tlb_flush.stlb_any/aux-sample-size=8192/pp}:u' -- sleep 0.1
     [ perf record: Woken up 1 times to write data ]
     [ perf record: Captured and wrote 0.078 MB perf.data ]
     $ perf script -F-dso,+addr | grep -C5 tlb_flush.stlb_any | head -11
     sleep 20444 [003]  7939.510243:  1  branches:uH:  7f5350cc82a2 dl_main+0x9a2 => 7f5350cb38f0 _dl_add_to_namespace_list+0x0
     sleep 20444 [003]  7939.510243:  1  branches:uH:  7f5350cb3908 _dl_add_to_namespace_list+0x18 => 7f5350cbb080 rtld_mutex_dummy+0x0
     sleep 20444 [003]  7939.510243:  1  branches:uH:  7f5350cc8350 dl_main+0xa50 => 0 [unknown]
     sleep 20444 [003]  7939.510244:  1  branches:uH:  7f5350cc83ca dl_main+0xaca => 7f5350caeb60 _dl_process_pt_gnu_property+0x0
     sleep 20444 [003]  7939.510245:  1  branches:uH:  7f5350caeb60 _dl_process_pt_gnu_property+0x0 => 0 [unknown]
     sleep 20444  7939.510245:       10 tlb_flush.stlb_any/aux-sample-size=8192/pp: 0 7f5350caeb60 _dl_process_pt_gnu_property+0x0
     sleep 20444 [003]  7939.510254:  1  branches:uH:  7f5350cc87fe dl_main+0xefe => 7f5350ccd240 strcmp+0x0
     sleep 20444 [003]  7939.510254:  1  branches:uH:  7f5350cc8862 dl_main+0xf62 => 0 [unknown]

 - Add a check for the above use case in 'perf test test_intel_pt'

 - Fix build with refcount checking on arm64, it was still accessing
   fields that need to be wrapped so that the refcounted struct gets
   checked

 - Fix contextid validation in ARM's CS-ETM, so that older kernels
   without that field can still be supported

 - Skip unsupported aggregation for stat events found in perf.data files
   in 'perf script'

 - Add stat test for record and script to check the previous problem

 - Remove needless debuginfod queries from 'perf test java symbol', this
   was just making the test take a long time to complete

 - Address python SafeConfigParser() deprecation warning in 'perf test
   attr'

 - Fix __NR_execve undeclared on i386 'perf bench syscall' build error

* tag 'perf-tools-fixes-for-v6.4-1-2023-05-20' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (33 commits)
  perf bench syscall: Fix __NR_execve undeclared build error
  perf test attr: Fix python SafeConfigParser() deprecation warning
  perf test attr: Update no event/metric expectations
  tools headers disabled-features: Sync with the kernel sources
  tools headers UAPI: Sync arch prctl headers with the kernel sources
  tools headers: Update the copy of x86's mem{cpy,set}_64.S used in 'perf bench'
  tools headers x86 cpufeatures: Sync with the kernel sources
  tools headers UAPI: Sync s390 syscall table file that wires up the memfd_secret syscall
  tools headers UAPI: Sync linux/prctl.h with the kernel sources
  perf metrics: Avoid segv with --topdown for metrics without a group
  perf lock contention: Add empty 'struct rq' to satisfy libbpf 'runqueue' type verification
  perf cs-etm: Fix contextid validation
  perf arm64: Fix build with refcount checking
  perf test: Add stat test for record and script
  perf script: Skip aggregation for stat events
  perf build: Add system include paths to BPF builds
  perf bpf skels: Make vmlinux.h use bpf.h and perf_event.h in source directory
  perf parse-events: Do not break up AUX event group
  perf test test_intel_pt.sh: Test sample mode with event with PMU name
  perf evsel: Modify group pmu name for software events
  ...

17 months agoMerge tag 'powerpc-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
Linus Torvalds [Sun, 21 May 2023 18:53:52 +0000 (11:53 -0700)]
Merge tag 'powerpc-6.4-2' of git://git./linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix broken soft dirty tracking when using the Radix MMU (>= P9)

 - Fix ISA mapping when "ranges" property is not present, for PASemi
   Nemo boards

 - Fix a possible WARN_ON_ONCE hitting in BPF extable handling

 - Fix incorrect DMA address handling when using 2MB TCEs

 - Fix a bug in IOMMU table handling for SR-IOV devices

 - Fix the recent rework of IOMMU handling which left arch code calling
   clean up routines that are handled by the IOMMU core

 - A few assorted build fixes

Thanks to Christian Zigotzky, Dan Horák, Gaurav Batra, Hari Bathini,
Jason Gunthorpe, Nathan Chancellor, Naveen N. Rao, Nicholas Piggin, Pali
Rohár, Randy Dunlap, and Rob Herring.

* tag 'powerpc-6.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/iommu: Incorrect DDW Table is referenced for SR-IOV device
  powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs
  powerpc/iommu: Remove iommu_del_device()
  powerpc/crypto: Fix aes-gcm-p10 build when VSX=n
  powerpc/bpf: populate extable entries only during the last pass
  powerpc/boot: Disable power10 features after BOOTAFLAGS assignment
  powerpc/64s/radix: Fix soft dirty tracking
  powerpc/fsl_uli1575: fix kconfig warnings and build errors
  powerpc/isa-bridge: Fix ISA mapping when "ranges" is not present

17 months agoMerge tag 'ata-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal...
Linus Torvalds [Sun, 21 May 2023 18:46:23 +0000 (11:46 -0700)]
Merge tag 'ata-6.4-rc3' of git://git./linux/kernel/git/dlemoal/libata

Pull ata fix from Damien Le Moal:

 - Fix DT binding for the ahci-ceva driver to fully describe all iommus,
   from Michal

* tag 'ata-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dlemoal/libata:
  dt-bindings: ata: ahci-ceva: Cover all 4 iommus entries

17 months agoMerge tag 'fbdev-for-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
Linus Torvalds [Sun, 21 May 2023 18:13:23 +0000 (11:13 -0700)]
Merge tag 'fbdev-for-6.4-rc3' of git://git./linux/kernel/git/deller/linux-fbdev

Pull fbdev fixes from Helge Deller:
 "A few small unspectacular fbdev fixes:

   - Fix for USB endpoint check in udlfb (found by syzbot fuzzer)

   - Small fix in error code path in omapfb

   - compiler warning fixes in fbmem & i810

   - code removal and whitespace cleanups in stifb and atyfb"

* tag 'fbdev-for-6.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev:
  fbdev: stifb: Whitespace cleanups
  fbdev: udlfb: Use usb_control_msg_send()
  fbdev: udlfb: Fix endpoint check
  fbdev: atyfb: Remove unused clock determination
  fbdev: i810: include i810_main.h in i810_dvt.c
  fbdev: fbmem: mark get_fb_unmapped_area() static
  fbdev: omapfb: panel-tpo-td043mtea1: fix error code in probe()

17 months agoMerge tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd
Linus Torvalds [Sun, 21 May 2023 17:55:31 +0000 (10:55 -0700)]
Merge tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd

Pull ksmbd server fixes from Steve French:

 - two fixes for incorrect SMB3 message validation (one for client which
   uses 8 byte padding, and one for empty bcc)

 - two fixes for out of bounds bugs: one for username offset checks (in
   session setup) and the other for create context name length checks in
   open requests

* tag '6.4-rc2-ksmbd-server-fixes' of git://git.samba.org/ksmbd:
  ksmbd: smb2: Allow messages padded to 8byte boundary
  ksmbd: allocate one more byte for implied bcc[0]
  ksmbd: fix wrong UserName check in session_user
  ksmbd: fix global-out-of-bounds in smb2_find_context_vals

17 months agoMerge tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sun, 21 May 2023 17:20:58 +0000 (10:20 -0700)]
Merge tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs client fixes from Steve French:
 "Two smb3 client fixes, both related to deferred close, and also for
  stable:

   - send close for deferred handles before not after lease break
     response to avoid possible sharing violations

   - check all opens on an inode (looking for deferred handles) when
     lease break is returned not just the handle the lease break came in
     on"

* tag '6.4-rc2-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  SMB3: drop reference to cfile before sending oplock break
  SMB3: Close all deferred handles of inode in case of handle lease break

17 months agoKVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save
Mingwei Zhang [Tue, 9 May 2023 03:23:48 +0000 (03:23 +0000)]
KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save

Add MSR_IA32_TSX_CTRL into msrs_to_save[] to explicitly tell userspace to
save/restore the register value during migration. Missing this may cause
userspace that relies on KVM ioctl(KVM_GET_MSR_INDEX_LIST) fail to port the
value to the target VM.

In addition, there is no need to add MSR_IA32_TSX_CTRL when
ARCH_CAP_TSX_CTRL_MSR is not supported in kvm_get_arch_capabilities(). So
add the checking in kvm_probe_msr_to_save().

Fixes: c11f83e0626b ("KVM: vmx: implement MSR_IA32_TSX_CTRL disable RTM functionality")
Reported-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Mingwei Zhang <mizhang@google.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Message-Id: <20230509032348.1153070-1-mizhang@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>