aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2024-06-27dt-bindings: ti: fix TISCI protocol URL linkRichard Genoud4-4/+4
The http://processors.wiki.ti.com EOL in january 2021 Fix the old URL with the new one. Signed-off-by: Richard Genoud <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nishanth Menon <[email protected]>
2024-06-27soc: ti: pm33xx: Fix missing newlines in log statementsVasyl Gomonovych1-2/+2
Add the missing newline characters to two pm33xx log statements to ensure proper log formatting. Signed-off-by: Vasyl Gomonovych <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Nishanth Menon <[email protected]>
2024-06-27MAINTAINERS: add microchip soc binding directory to microchip soc driver entryConor Dooley1-0/+1
I noticed that there's technically not an explicit maintainer for this directory, even if the files currently in it are covered by either the Mircochip FPGA or AT91 entries. Add it to the entry covering the corresponding driver directory. Acked-by: Nicolas Ferre <[email protected]> Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2024-06-27MAINTAINERS: add cache binding directory to cache driver entryConor Dooley1-0/+1
The directory covering cache controller bindings has no MAINTAINER other than the fallback to myself, Rob and Krzysztof. Add it to the entry for the corresponding drivers. Acked-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2024-06-27Merge tag 'optee-notif-wait-timeout-for-v6.11' of ↵Arnd Bergmann4-5/+20
https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers optee: add timeout parameter for notification wait * tag 'optee-notif-wait-timeout-for-v6.11' of https://git.linaro.org/people/jens.wiklander/linux-tee: optee: add timeout value to optee_notif_wait() to support timeout Link: https://lore.kernel.org/r/20240627095325.GA2585076@rayden Signed-off-by: Arnd Bergmann <[email protected]>
2024-06-27Merge tag 'reset-for-v6.11' of git://git.pengutronix.de/pza/linux into ↵Arnd Bergmann6-25/+167
soc/drivers Reset controller updates for v6.11 Move reset controller registration to the end in rzg2l-usbphy-ctrl, to simplify the probe error path, add a new i.MX8MP AudioMix reset driver, allow to build some drivers under COMPILE_TEST with fewer dependencies, and use the devm_clk_get_enabled convenience wrapper in meson-audio-arb. The latter causes a trivial merge conflict [1] with b99e9c096148f ("reset: meson-audio-arb: Convert to platform remove callback returning void") because I didn't manage to send that in last round. There is no overlap though. [1] https://lore.kernel.org/all/[email protected]/ * tag 'reset-for-v6.11' of git://git.pengutronix.de/pza/linux: reset: RESET_IMX8MP_AUDIOMIX should depend on ARCH_MXC reset: zynqmp: allow building under COMPILE_TEST reset: imx8mp-audiomix: Add AudioMix Block Control reset driver reset: meson-audio-arb: Use devm_clk_get_enabled() reset: sti: allow building under COMPILE_TEST reset: rzg2l-usbphy-ctrl: Move reset controller registration Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2024-06-27soc: add missing MODULE_DESCRIPTION() macrosJeff Johnson5-0/+5
With ARCH=x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/imx/soc-imx8m.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/ixp4xx/ixp4xx-qmgr.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/ixp4xx/ixp4xx-npe.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/mediatek/mtk-cmdq-helper.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/soc/amlogic/meson-clk-measure.o Add the missing invocations of the MODULE_DESCRIPTION() macro. Reviewed-by: Linus Walleij <[email protected]> Acked-by: Shawn Guo <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> # for amlogic/meson-clk-measure.c Signed-off-by: Jeff Johnson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2024-06-27Merge tag 'ffa-updates-6.11' of ↵Arnd Bergmann4-29/+58
git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm FF-A driver updates for v6.11 The main addition is the split of bus and driver into distinct modules The FF-A bus module is initialized at subsys_initcall level when builtin. FF-A drivers initialization is now changed to module_init level so that pKVM ffa proxy is all setup and running in case pKVM hypervisor needs to trap and handle FF-A calls. One of the reason for not having this split from the beginning is the need to workaround the FF-A v1.0 NULL UUID. The FF-A bus layer called into FF-A driver and populated the device UUID if it matches with the driver attempting to match. Moving the workaround away from the FF-A bus layer to the FF-A core driver as a bus notifier will help to remove the dependency. * tag 'ffa-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_ffa: Split bus and driver into distinct modules firmware: arm_ffa: Move the FF-A v1.0 NULL UUID workaround to bus notifier Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2024-06-27Merge tag 'scmi-updates-6.11' of ↵Arnd Bergmann6-11/+86
git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers Arm SCMI driver updates for v6.11 The main addition this time is the support for platform to agent(p2a also referred sometimes as notification or Rx) channel completion via interrupt driven method. Currently, the OSPM agent clears or acknowledge the receipt of the norification or delayed response by updating the flags in the shared memory region which the platform is expected to poll. On some platforms that are completely interrupt driven, the OSPM agent is expected to send a response message instead. This change adds the support for the same. Other changes include addition of a separate mailing list specific to SCMI to allow open discussions about the interface itself in addition to the kernel driver updates and support for system suspend via the platform noification used on some systems. * tag 'scmi-updates-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Add support for platform to agent channel completion dt-bindings: firmware: arm,scmi: Add support for notification completion channel firmware: arm_scmi: Add support for system suspend in power control driver MAINTAINERS: Add mailing list for SCMI drivers Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2024-06-27soc: mtk-cmdq: Add cmdq_pkt_logic_command to support math operationJason-JH.Lin2-0/+76
Add cmdq_pkt_logic_command to support math operation. cmdq_pkt_logic_command can append logic command to the CMDQ packet, ask GCE to execute a arithmetic calculate instruction, such as add, subtract, multiply, AND, OR and NOT, etc. Note that all arithmetic instructions are unsigned calculations. If there are any overflows, GCE will sent the invalid IRQ to notify CMDQ driver. Signed-off-by: Jason-JH.Lin <[email protected]> Signed-off-by: Hsiao Chien Sung <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
2024-06-27soc: mediatek: Disable 9-bit alpha in ETHDRHsiao Chien Sung1-0/+1
When 9-bit alpha is enabled, its value will be converted from 0-255 to 0-256 (255 = not defined). This is designed for special HDR related calculation, which should be disabled by default, otherwise, alpha blending will not work correctly. Signed-off-by: Hsiao Chien Sung <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
2024-06-27soc: mediatek: mtk-mutex: Add MDP_TCC0 mod to MT8188 mutex tableAngeloGioacchino Del Regno1-0/+1
MT8188's MDP3 is able to use MDP_TCC0, this mutex_mod bit does actually exist and it's the same as MT8195: add it to the table. Fixes: 26bb17dae6fa ("soc: mediatek: mtk-mutex: Add support for MT8188 VPPSYS") Reviewed-by: Fei Shao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
2024-06-27soc/tegra: pmc: Simplify resource lookupJon Hunter1-6/+2
Commit 6f4429e21a7f ("soc/tegra: pmc: Update address mapping sequence for PMC apertures") updated the resource lookup code in the PMC driver. Instead of calling platform_get_resource_byname() and devm_ioremap_resource() simplify the code by simply calling devm_platform_ioremap_resource_byname(). Signed-off-by: Jon Hunter <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
2024-06-26regulator: core: Add helper for allow HW access to enable/disable regulatorBiju Das3-0/+41
Add a helper function that allow regulator consumers to allow low-level HW access, in order to enable/disable regulator in atomic context. The use-case for RZ/G2L SoC is to enable VBUS selection register based on vbus detection that happens in interrupt context. Signed-off-by: Biju Das <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
2024-06-25soc: qcom: icc-bwmon: Allow for interrupts to be shared across instancesSibi Sankar1-3/+9
The multiple BWMONv4 instances available on the X1E80100 SoC use the same interrupt number. Mark them are shared to allow for re-use across instances. Using IRQF_SHARED coupled with devm_request_threaded_irq implies that the irq can still trigger during/after bwmon_remove due to other active bwmon instances. Handle this race by relying on bwmon_disable to disable the interrupt and coupled with explicit request/free irqs. Signed-off-by: Sibi Sankar <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-25dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instancesSibi Sankar1-0/+2
Document X1E80100 BWMONs, which has multiple (one per cluster) BWMONv4 instances for the CPU->LLCC path and one BWMONv5 instance for LLCC->DDR path. Reviewed-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Acked-by: Georgi Djakov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-25dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the ↵Sibi Sankar1-1/+0
required list Remove opp-table from the required list as the bindings shouldn't care where the OPP tables (referenced by the operating-points-v2 property) comes from. Suggested-by: Konrad Dybcio <[email protected]> Signed-off-by: Sibi Sankar <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Acked-by: Georgi Djakov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-25reset: RESET_IMX8MP_AUDIOMIX should depend on ARCH_MXCGeert Uytterhoeven1-0/+1
The i.MX8MP AudioMix reset controller is only present on Freescale i.MX8 SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without i.MX SoC support. Fixes: fe125601d17cc1ea ("reset: imx8mp-audiomix: Add AudioMix Block Control reset driver") Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Link: https://lore.kernel.org/r/6d8116a56186fbf468229e823c7c8dfcd9488959.1719316665.git.geert+renesas@glider.be Signed-off-by: Philipp Zabel <[email protected]>
2024-06-24firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new()Bartosz Golaszewski1-0/+1
EXPORT_SYMBOL_GPL() is missing for devm_qcom_tzmem_pool_new() which causes build failures with randconfig. Add it and fix the issue. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected] Fixes: 84f5a7b67b61 ("firmware: qcom: add a dedicated TrustZone buffer allocator") Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-24Merge branch '[email protected]' into ↵Bjorn Andersson6-298/+1075
drivers-for-6.11 Merge the in-kernel protection-domain mapper implementation through a feature branch, to allow sharing with the remoteproc tree.
2024-06-24soc: qcom: add pd-mapper implementationDmitry Baryshkov5-0/+737
Existing userspace protection domain mapper implementation has several issue. It doesn't play well with CONFIG_EXTRA_FIRMWARE, it doesn't reread JSON files if firmware location is changed (or if firmware was not available at the time pd-mapper was started but the corresponding directory is mounted later), etc. Provide in-kernel service implementing protection domain mapping required to work with several services, which are provided by the DSP firmware. This module is loaded automatically by the remoteproc drivers when necessary via the symbol dependency. It uses a root node to match a protection domains map for a particular board. It is not possible to implement it as a 'driver' as there is no corresponding device. Tested-by: Steev Klimaszewski <[email protected]> Tested-by: Alexey Minnekhanov <[email protected]> Reviewed-by: Chris Lew <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] [bjorn: include linux/slab.h] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-24reset: zynqmp: allow building under COMPILE_TESTPhilipp Zabel2-1/+7
The ZynqMP reset driver can be compiled without ARCH_ZYNQMP being enabled. Allow it to be built under COMPILE_TEST. Acked-by: Michal Simek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
2024-06-24reset: imx8mp-audiomix: Add AudioMix Block Control reset driverShengjiu Wang3-0/+136
Add support for the resets on i.MX8MP Audio Block Control module, which includes the EARC PHY software reset and EARC controller software reset. The reset controller is created using the auxiliary device framework and set up in the clock driver. Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Marco Felsch <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
2024-06-24firmware: meson_sm: add missing MODULE_DESCRIPTION() macroJeff Johnson1-0/+1
With ARCH=arm64, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/firmware/meson/meson_sm.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-firmware-meson-v1-1-28e4138a8597@quicinc.com Signed-off-by: Neil Armstrong <[email protected]>
2024-06-24reset: meson-audio-arb: Use devm_clk_get_enabled()Philipp Zabel1-8/+1
Use devm_clk_get_enabled() to reduce a bit of boilerplate and to disable the clock in case devm_reset_controller_register() fails. Reviewed-by: Jerome Brunet <[email protected]> Link: https://lore.kernel.org/r/20240621-reset-devm-clk-get-enabled-v1-1-8408c7962b6c@pengutronix.de Signed-off-by: Philipp Zabel <[email protected]>
2024-06-24reset: sti: allow building under COMPILE_TESTPhilipp Zabel2-3/+3
The STIH407 reset driver can be compiled without ARCH_STI being enabled. Allow it to be built under COMPILE_TEST. Reviewed-by: Patrice Chotard <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
2024-06-23soc: qcom: pdr: extract PDR message marshalling dataDmitry Baryshkov4-296/+334
The in-kernel PD mapper is going to use same message structures as the QCOM_PDR_HELPERS module. Extract message marshalling data to separate module that can be used by both PDR helpers and by PD mapper. Reviewed-by: Bryan O'Donoghue <[email protected]> Tested-by: Steev Klimaszewski <[email protected]> Tested-by: Alexey Minnekhanov <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23soc: qcom: pdr: fix parsing of domains listsDmitry Baryshkov1-1/+1
While parsing the domains list, start offsets from 0 rather than from domains_read. The domains_read is equal to the total count of the domains we have seen, while the domains list in the message starts from offset 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Steev Klimaszewski <[email protected]> Tested-by: Alexey Minnekhanov <[email protected]> Reviewed-by: Chris Lew <[email protected]> Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23soc: qcom: pdr: protect locator_addr with the main mutexDmitry Baryshkov1-2/+4
If the service locator server is restarted fast enough, the PDR can rewrite locator_addr fields concurrently. Protect them by placing modification of those fields under the main pdr->lock. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Neil Armstrong <[email protected]> # on SM8550-QRD Tested-by: Steev Klimaszewski <[email protected]> Tested-by: Alexey Minnekhanov <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23Linux 6.10-rc5Linus Torvalds1-1/+1
2024-06-23firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image()Bartosz Golaszewski1-0/+7
The "memory protection" mechanism mentioned in the comment is the SHM Bridge. This is also the reason why we do not convert this call to using the TZ memory allocator. Signed-off-by: Bartosz Golaszewski <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: add support for SHM bridge memory carveoutBartosz Golaszewski1-0/+6
Parse the "memory-region" property and - if present - use it to assign the dedicated reserved memory to the underlying DMA callbacks which will then allocate memory for the SCM calls from it. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: tzmem: enable SHM Bridge supportBartosz Golaszewski2-1/+88
SHM Bridge is a safety mechanism allowing to limit the amount of memory shared between the kernel and the TrustZone to regions explicitly marked as such. Add a variant of the tzmem allocator that configures the memory pools as SHM bridges. It also enables the SHM bridge globally so non-SHM bridge memory will no longer work with SCM calls. If enabled at build-time, it will still be checked for availability at run-time. If the architecture doesn't support SHM Bridge, the allocator will fall back to the generic mode. Signed-off-by: Bartosz Golaszewski <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: add support for SHM bridge operationsBartosz Golaszewski3-0/+69
SHM Bridge is a safety mechanism allowing to limit the amount of memory shared between the kernel and the TrustZone to regions explicitly marked as such. Add low-level primitives for enabling SHM bridge support as well as creating and destroying SHM bridges to qcom-scm. Signed-off-by: Bartosz Golaszewski <[email protected]> Acked-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: qseecom: convert to using the TZ allocatorBartosz Golaszewski4-172/+117
Drop the DMA mapping operations from qcom_scm_qseecom_app_send() and convert all users of it in the qseecom module to using the TZ allocator for creating SCM call buffers. As this is largely a module separate from the SCM driver, let's use a separate memory pool. Set the initial size to 4K and - if we run out - add twice the current amount to the pool. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Elliot Berman <[email protected]> Reviewed-by: Amirreza Zarrabi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocatorBartosz Golaszewski1-14/+4
Let's use the new TZ memory allocator to obtain a buffer for this call instead of manually kmalloc()ing it and then mapping to physical space. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Maximilian Luz <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocatorBartosz Golaszewski1-5/+4
Let's use the new TZ memory allocator to obtain a buffer for this call instead of using dma_alloc_coherent(). Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocatorBartosz Golaszewski1-16/+5
Let's use the new TZ memory allocator to obtain a buffer for this call instead of using dma_alloc_coherent(). Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocatorBartosz Golaszewski1-4/+6
Let's use the new TZ memory allocator to obtain a buffer for this call instead of using dma_alloc_coherent(). Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: smc: switch to using the SCM allocatorBartosz Golaszewski3-22/+16
We need to allocate, map and pass a buffer to the trustzone if we have more than 4 arguments for a given SCM call. Let's use the new TrustZone allocator for that memory and shrink the code in process. As this code lives in a different compilation unit than the rest of the SCM code, we need to provide a helper in the form of qcom_scm_get_tzmem_pool() that allows the SMC low-level routines to access the SCM memory pool. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: scm: enable the TZ mem allocatorBartosz Golaszewski2-0/+23
Select the TrustZone memory allocator in Kconfig and create a pool of memory shareable with the TrustZone when probing the SCM driver. This will allow a gradual conversion of all relevant SCM calls to using the dedicated allocator. The policy used for the pool is "on-demand" and the initial size is 0 as - depending on the config - it's possible that no SCM calls needing to allocate memory will be called. The sizes of possible allocations also vary substiantially further warranting the "on-demand" approach. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23firmware: qcom: add a dedicated TrustZone buffer allocatorBartosz Golaszewski6-0/+487
We have several SCM calls that require passing buffers to the TrustZone on top of the SMC core which allocates memory for calls that require more than 4 arguments. Currently every user does their own thing which leads to code duplication. Many users call dma_alloc_coherent() for every call which is terribly unperformant (speed- and size-wise). Provide a set of library functions for creating and managing pools of memory which is suitable for sharing with the TrustZone, that is: page-aligned, contiguous and non-cachable as well as provides a way of mapping of kernel virtual addresses to physical space. Make the allocator ready for extending with additional modes of operation which will allow us to support the SHM bridge safety mechanism once all users convert. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Andrew Halaney <[email protected]> Tested-by: Andrew Halaney <[email protected]> # sc8280xp-lenovo-thinkpad-x13s Tested-by: Deepti Jaggi <[email protected]> #sa8775p-ride Reviewed-by: Elliot Berman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23dt-bindings: firmware: qcom,scm: add memory-region for sa8775pBartosz Golaszewski1-0/+15
Document a new property (currently only for sa8775p) that describes the memory region reserved for communicating with the TrustZone. Signed-off-by: Bartosz Golaszewski <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
2024-06-23Merge tag 'i2c-for-6.10-rc5' of ↵Linus Torvalds6-41/+83
git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "The core gains placeholders for recently added functions when CONFIG_I2C is not defined as well documentation fixes to start using inclusive terminology. The drivers get paths in DT bindings fixed as well as proper interrupt handling for the ocores driver" * tag 'i2c-for-6.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: docs: i2c: summary: be clearer with 'controller/target' and 'adapter/client' pairs docs: i2c: summary: document 'local' and 'remote' targets docs: i2c: summary: document use of inclusive language docs: i2c: summary: update speed mode description docs: i2c: summary: update I2C specification link docs: i2c: summary: start sentences consistently. i2c: Add nop fwnode operations i2c: ocores: set IACK bit after core is enabled dt-bindings: i2c: google,cros-ec-i2c-tunnel: correct path to i2c-controller schema dt-bindings: i2c: atmel,at91sam: correct path to i2c-controller schema
2024-06-23Merge tag '6.10-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6Linus Torvalds5-32/+27
Pull smb client fixes from Steve French: "Five smb3 client fixes - three nets/fiolios cifs fixes - fix typo in module parameters description - fix incorrect swap warning" * tag '6.10-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: Move the 'pid' from the subreq to the req cifs: Only pick a channel once per read request cifs: Defer read completion cifs: fix typo in module parameter enable_gcm_256 cifs: drop the incorrect assertion in cifs_swap_rw()
2024-06-23Merge tag 'fixes-2024-06-23' of ↵Linus Torvalds2-21/+12
git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock Pull memblock fix from Mike Rapoport: "Fix fragility in checks for unset node ID. Use numa_valid_node() function to verify that nid is a valid node ID instead of inconsistent comparisons with either NUMA_NO_NODE or MAX_NUMNODES" * tag 'fixes-2024-06-23' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock: use numa_valid_node() helper to check for invalid node ID
2024-06-23Merge tag 'mips-fixes_6.10_2' of ↵Linus Torvalds2-2/+2
git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix lseek in o32 compat mode - fix for microMIPS MT ASE helpers * tag 'mips-fixes_6.10_2' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: mips: fix compat_sys_lseek syscall MIPS: mipsmtregs: Fix target register for MFTC0
2024-06-23Merge tag 'x86_urgent_for_v6.10_rc5' of ↵Linus Torvalds2-2/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - An ARM-relevant fix to not free default RMIDs of a resource control group - A randconfig build fix for the VMware virtual GPU driver * tag 'x86_urgent_for_v6.10_rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/resctrl: Don't try to free nonexistent RMIDs drm/vmwgfx: Fix missing HYPERVISOR_GUEST dependency
2024-06-23Merge tag 'powerpc-6.10-3' of ↵Linus Torvalds2-5/+15
git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Prevent use-after-free in 64-bit KVM VFIO - Add generated Power8 crypto asm to .gitignore Thanks to Al Viro and Nathan Lynch. * tag 'powerpc-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group() powerpc/crypto: Add generated P8 asm to .gitignore
2024-06-23Merge tag 'i2c-host-fixes-6.10-rc5' of ↵Wolfram Sang3-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux into i2c/for-current This pull request fixes the paths of the dt-schema to their complete locations for the ChromeOS EC tunnel driver and the Atmel at91sam drivers. Additionally, the OpenCores driver receives a fix for an issue that dates back to version 2.6.18. Specifically, the interrupts need to be acknowledged (clearing all pending interrupts) after enabling the core.