Commit Graph

4058 Commits

Author SHA1 Message Date
Arnd Bergmann
13e87440bf This pull request contains Broadcom SoC driver updates for 6.12, please
pull the following:
 
 - Stefan improves the timeout warning within the Raspberry Pi firmware
   driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEm+Rq3+YGJdiR9yuFh9CWnEQHBwQFAmbZ5HEACgkQh9CWnEQH
 BwTbfBAAo6MX88WmJNQE8JNU7QcqNfYDd4neIyzn0GfVQaKwmRO6vgN6pothDgmt
 Us9CUFloCrqH/QNope47ku/02IW7AX/Rw161L+w9v3DWpxmR/wC9kCUGfjopINsT
 w+Q6FJe5tmajZW9ybbhW+n2QiofGO0mlLJNUql7rQBo6iYZLjSYrKjNVsBAj4YdU
 CYz+MJnlytQGCx8ANvdbpQfnG856PjpfBCPCjTxCpr+o6NOOMJ/Z8L1SpOkHkyr8
 J8+YDJ82eEOFfpZuFvTIz+tlo8r4QiA76UErHkq+GsegIMN/zb2By7xt7v1GkQyE
 z+kICjNUdXHvFEKvh8R715fldwZW9Rd2ybr6P+3CpcnG95b51VkmMlQ+RuN0a/kT
 ZJp79lG71loRITr4dj2z/NVdZ8kI7x5rDpdysSzNPueK+1akPhM/7xhVoKYHDGW9
 mCLwSM3Q9uDaf/G+i+YZkQKoitfuaj7E22IboondJ2sH5EH+3NpheCfLR0dG0fbu
 uyRUgP+r+ceu6Y+deyzx1MEqmHpedL0zSR/Pxlhg0Na5DPQmG85GLGYYOKQRB44u
 P2o65Q/Jt7IoAyRKHYeAoGCCpWvzIt0ps4eXdSOpe2+LD5/m/xf9QxpnM4FR7WH0
 +PJ4Q8+RpQNSCpt6p8nUm9WasI3nbj73i7hZA4wB8/0zlQIf86o=
 =AUWZ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbhXFAACgkQYKtH/8kJ
 UieJZBAAwzvnkwjjcXjpC1EKuNZy8Ch9sgU6BUwtvcfkLyn3SQjCS3XmC3USUtJK
 gJQBzezbFX45iHkMe1kOQg6ww1Zj4bn1gxeAQ9XUipmogw/ZveT8bS22MifIPtbB
 st3pgj+mv3wE2u0yiWjlwy0hVH8ehA/rqP82MHe1/5sakO42nOcM3kRh4AHYATMC
 cB1tTuQN9b4zjRmA5cCKGbYTIcg0iHTRW/T53yC0Nykhl2TmvSWXiIFqLEf4Nu5k
 AnSt5dtgHVn5FywJLpAl/TFxPsx/pg/utIrItOfWtyEZsJdKTx4TuPwXWotNePuT
 nVpej7VelnO5yTrlH5didyTUtGZKvWH8S88P73O45K/OHDjAO+/i43BSOeFKPO2X
 AVNCU39xJNCOKZeD1DecKfW0bY8NB+9o0j3wQnJIZpNjC/dyAN71hvrnY07Mo4Xu
 zdTF8z8rF1KoWtacv22pMDcZlO+Z8ujCwNs+qZTnis83lAYjY+jjQ6ctcOhjMPq1
 taOggiMQnINYPb54r8OJ2+dWOyd2htAzT0FcykurbCHKeiQwmIW8WzsZPrccSV7Q
 2IUKvbazR7KApRdUhHqAKlSkuDH7rpMnzDDFstZ2ISQVClZUf+tZ6LS14Xkdkj56
 Lmj1d54Zwe5ORVuHTnhw7dUg73lDEY9Cr6LOsbwo+jwCoZWUxbo=
 =3kby
 -----END PGP SIGNATURE-----

Merge tag 'arm-soc/for-6.12/drivers' of https://github.com/Broadcom/stblinux into soc/drivers

This pull request contains Broadcom SoC driver updates for 6.12, please
pull the following:

- Stefan improves the timeout warning within the Raspberry Pi firmware
  driver

* tag 'arm-soc/for-6.12/drivers' of https://github.com/Broadcom/stblinux:
  firmware: raspberrypi: Improve timeout warning

Link: https://lore.kernel.org/r/20240906180643.2275460-3-florian.fainelli@broadcom.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-11 09:01:03 +00:00
Arnd Bergmann
6d67480404 Qualcomm driver updates for v6.12
Support is added for making SCM driver configure the system either for a
 full or minimal ramdump following a system crash. The ramdump mode is
 changed from being enable-only to enable/disable as requested.
 
 The QSEECOM uefisecapp interface is allow-listed on Surface Laptop 7 and
 Lenovo Thinkpad T14s, providing EFI variable access.
 
 The change to match the SMD RPM driver based on the SMD channel name is
 reverted, in favor of stepping back to OF-based matching, as a means to
 get module autoloading to work properly.
 
 AOSS, APR, ICE, OCMEM, PBS and SMP2P drivers has error handling cleaned
 up using scoped resources.
 
 Trace events are added to the BWMON and SMP2P drivers, for better
 insights into their operations.
 
 The X1E LLCC configuration data is updated based on recommended values.
 
 A number of platforms are added to the in-kernel PD-mapper.
 
 SocInfo driver is extended with IDs from SM7325, QCS8275 and QCS8300
 families.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmbYs3AVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FjywP/1IDWiKrOrIBYc6ndmssYrQLzlRw
 SSt/Q0YjPKogxl4qwTjTQUmBI/1I+vOa7kf9i0/BNpuslnhJYW51r9bZrcI0n3PW
 P1Pm7J32WGOIauFU9XoGmqzdlPBCVZKcfeCV3n9xTvF0pAipQqz46+O5mVg77jVU
 L5MaVIr4guk/glBJTym97KOlkSSbBsSmheistxiBJUIkUlZqX3YwBQE0Cih1VYOn
 DcQy29EjTpxhbLqI5BqFN3iJqGaV3RS32hL9hM8nYlXth0u8ZBy/H9AEViEK8M1K
 YakDoRkGyihj0M7oFV405yJdSskEbTBlxAfX7LH7x37XocRpsFf+u/Ti8VWxLMnt
 VUciuWA8bg6LnhMK1tQKEGM+3Wp2NZDJStKtV+OnYkvWbKN9QwS4DyiWdPvJGsgJ
 j4qq4B3nF3JU8Pu8Ih59LtPPFTa9/jMkOkqmF7smNehji8gjzHmkAhw6fWPCE5+h
 p8EC/XrYvXCwkBwPWE5vopip8CIpl3bMPb5bbHYGb4NuY59ztht40EExYxnhQzoN
 3ezg+J2jIEaG/HQiBcxt0NrjyLRzkWJVryRxigg1co8Alcmxh7B1UNshiWRI70MA
 P3Emjh8Snixnp7ZD5O5hyiJ4yahomsfuCoDjVL6Vk4AYjon4ZjZ8pgcGBLgB1gry
 Zvkj5b5vc+8VNHnd
 =hZ0b
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbZvJUACgkQYKtH/8kJ
 Uice9w//SXO0VlWitafyNuWwwqZfWZY953j2sjAjPWC2OWLGgjTQPL2sDKaOnvWG
 FRl8dZmYRcaEb7C7NeWvs1QrUztvxKDXOCDKlmt82EotyBlH1vLFWJK5KJ3oO0sD
 0kQLWDr/KS/QIooXT/PcoFJ0mkpMqYKWV+XLLi+NDQsScMZsGyhZiDdv+qwX3qBw
 9lt/srB1VfgW8gBrOGAxmS/WDQ4wup7/KPNpaUTIdPR8JMNFgoMCVY03LkB+FCcM
 4s/MeecFzHavshFnZqcWzppf1FNX70lcaWEcbbNopM/bekZICFjGWZGoi+tK/8fZ
 WFj3OWZwDGYtxkYjT9M/zvxEJK2xDLosIOICV1dm+OcUN6LAXwknHBuCGMMNDQI1
 jOQjZBXn3A+aT/Amy5GpKV0ci4K/tTI6AfBGdlZJq9jsQOMfP8Cygsv6leRp3dpJ
 06v2ifSWUTv8+ucwYn/Oz0rZDZAe8ucswybzQo0lyor4Qg8lTZJFIU6iNoT/ZCCZ
 wlNg7t1OfkGGr08SuiAhV6+c5/CK2WivxCfKfZjw8+iMLJXyjE57fnf2HaU9Yfwp
 iJrV1euITVkLjmyMCg2YJSyWVl8O43T+LBcqreZel2iDJOBgY84zfk5hB/2sLLXj
 bo3H9QHD7IlQ3yOafT8zuxtanw3cJfBId34afsYD8h9khVz8OmI=
 =6GV4
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.12

Support is added for making SCM driver configure the system either for a
full or minimal ramdump following a system crash. The ramdump mode is
changed from being enable-only to enable/disable as requested.

The QSEECOM uefisecapp interface is allow-listed on Surface Laptop 7 and
Lenovo Thinkpad T14s, providing EFI variable access.

The change to match the SMD RPM driver based on the SMD channel name is
reverted, in favor of stepping back to OF-based matching, as a means to
get module autoloading to work properly.

AOSS, APR, ICE, OCMEM, PBS and SMP2P drivers has error handling cleaned
up using scoped resources.

Trace events are added to the BWMON and SMP2P drivers, for better
insights into their operations.

The X1E LLCC configuration data is updated based on recommended values.

A number of platforms are added to the in-kernel PD-mapper.

SocInfo driver is extended with IDs from SM7325, QCS8275 and QCS8300
families.

* tag 'qcom-drivers-for-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (33 commits)
  firmware: qcom: scm: Allow QSEECOM on Surface Laptop 7 models
  dt-bindings: soc: qcom: qcom,pmic-glink: Document SM7325 compatible
  soc: qcom: pd_mapper: Add SM7325 compatible
  soc: qcom: socinfo: Add Soc IDs for SM7325 family
  dt-bindings: arm: qcom,ids: Add IDs for SM7325 family
  soc: qcom: socinfo: add QCS8275/QCS8300 SoC ID
  dt-bindings: arm: qcom,ids: add SoC ID for QCS8275/QCS8300
  soc: qcom: smp2p: use scoped device node handling to simplify error paths
  soc: qcom: pbs: use scoped device node handling to simplify error paths
  soc: qcom: ocmem: use scoped device node handling to simplify error paths
  soc: qcom: ice: use scoped device node handling to simplify error paths
  soc: qcom: aoss: simplify with scoped for each OF child loop
  soc: qcom: apr: simplify with scoped for each OF child loop
  soc: qcom: smd-rpm: add qcom,smd-rpm compatible
  dt-bindings: soc: qcom: smd-rpm: add generic compatibles
  Revert "soc: qcom: smd-rpm: Match rpmsg channel instead of compatible"
  firmware: qcom: scm: Add multiple download mode support
  firmware: qcom: scm: Refactor code to support multiple dload mode
  soc: qcom: pd_mapper: Add more older platforms without domains
  soc: qcom: pd_mapper: Add X1E80100
  ...

Link: https://lore.kernel.org/r/20240904193042.15118-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-05 14:13:41 +00:00
Arnd Bergmann
95fe795c24 One more Qualcomm driver fix for v6.11
This resolves a deadlock in the Qualcomm uefisecapp driver following the
 attempt to acquire global context is acquired in the case the device
 isn't probed.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmbYczsVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FExoQAJ2bQZz7PNqEAhRepU4pR4CyH/WJ
 NuIcu3zdVGkA6/7VRPHGQ1cHyqzleXNvDD4FfhIh90lWGxBJSvXNAMbJSyd5CQZc
 bq5O85QKSCyu2pYUo8zloajZTF08fbT2xT895aQ9jhBd+hfVic1W3WEUMw5kCagr
 4XiPQhCjPFJJL3tscaHlOpiMK03SRpRd4zxsG4SxlwcIOcMrcG4zWVpGUze0vgqu
 6wyGb6zahwKcjlmUePyPGKTP1SWE5BSGTdx6Tkjf5j9SpgGSSUWBIX1NbjnHq4Ft
 8geh/Z3ls680tOXBmHY7FqTxcpMQ6fHXOVrMnBq+Wg7sCHPDqhzj6xBlEkCLTJME
 HTl8uHyjqms4DiFJ0R3rk/O+TpcGz16pOh54KdFCG0lyXM6lSN7rWnemog0MTl+e
 mPGubJDtwcisART7kqJytTuqt0UKl5UPgk0NkJ1zjJEFcYjkFRuUa1CK4PqeyCVO
 snBiHzFISMlb9Jpw7Tf0Uama4273QFRGdeqggYiMbnys8DbYREwz8rS04ntTDVLl
 Z88K8OAMq3rN7ex7f0gm0/rRAGCOOcp+lUoYqVt1se3hS0gwazNxNY+8zLOX77Gp
 Cw+r/eNGAEq5vyY3NYkh6IqEKiq5Lh1T0ynLNALp0H/+npciFn6ilikWwMevBGiF
 31DeqRgkLHU6LCdU
 =HJYI
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbZeNoACgkQYKtH/8kJ
 UidxxhAA4SnWHc0ErzC6e9iC3SNygoPnaJP8/j2nMUkZWlW7OkZccNeFPg5NI0Q9
 XjDf6Mz9IBgT/fRSBs88piAkNjynsifaeMzmAjbG3I9/m0Vfkc6TpqQUbftHTl2b
 eQ34iXRgwm0rntVkgnL7Wudy+RWenyc0l5mX2/zVKk7WbkoljUWaF4nNlJWNQWYB
 uB1QfcefWeXBre29Iz1WLHDMYoSrP1x2NmwZQmYdP80s9BqiBJJYO216NhWcQldq
 OQc//nW4enDT++8OmlNKfCM9/B91wfEI9kN3A00bGRNqfroGT1YcXbw/DTdDdnPt
 hqcNNkf84LAOnd/sUiEucGFAkzvQzd9upb/5jSkvVTqSyNPPp/V/bJZKaKa93R0n
 fWscJlkNACDcixhesenJ5AEHHNp97WmPNreuRX05VgnL+T9wvA7v2AaeaBvQ+5P2
 SksiIr8AEiAha0IhDx4MLgZ9lf85a4t6vz0nrQ/bsdpIbKM2FZwkhZB04cn/7UEj
 PJ9Q3AGtoc8naGDryx2aorbvjN2rSCtOQZhuKW01xUIGH3p9QUm1NqBh3hczC1P7
 8v3K3JPIQwywN99lO/q+faN68uNCt0X5v3DH/W235hCPBdnY2i/3qw/edjQsyW/X
 cMZUxTnZYe1n/WE13ZnFHgz+2skyM3b+sR26Sy+7gcSrobEJyK8=
 =rJbm
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-fixes-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

One more Qualcomm driver fix for v6.11

This resolves a deadlock in the Qualcomm uefisecapp driver following the
attempt to acquire global context is acquired in the case the device
isn't probed.

* tag 'qcom-drivers-fixes-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom: uefisecapp: Fix deadlock in qcuefi_acquire()

Link: https://lore.kernel.org/r/20240904145214.4089-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-05 09:24:42 +00:00
Arnd Bergmann
ec62e2e825 firmware: tegra: Changes for v6.12-rc1
The changes in this set remove some unused code and simplify error paths
 using scoped helpers.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmbR0NUACgkQ3SOs138+
 s6Evng/+K0MSYAKl6BlO2jVBReatt23DNPimrV6MNEUmjSvBvR7CLgyTvRqZpXCG
 NGhcvzlRkSKhxy+jy1dvzrhmL2DGoryENdjD08dU7GxGYesoM4wRO73P36Youyvp
 1FXrZ0cWc9VdhHCLUiTSQfhGM5epkRi4DGVZ7pb/dUeEcVBPDhSa/Ou1TlEI3or2
 vzmKVREaqvDDX0SQCWFwpwF8+FoRAz96Bg6tCUyPFAjsD9fPNUB8jPgMokSy/x8c
 XJLd48iweQlZZVVKWysbPzL26A340iT/WpXL09D5NhnG0ucuLhSM5q9PEqNlRH0h
 tIJq6gKI4oO1EDq2NxHtGkAvbJZt9DZ3CTRqAKQ29MKzLNZGNrG/MP0EeqSuM5T/
 000T/ff8eU5YlIl2DY0znW2kt6Fes5tR9zbn+BHNm5cXW/xJgso/mncPEc6V4wDg
 lntV1TpSaY1qtJjlH03rTpL8gJb4inkdhf6kv2LENlTiapT/P+K34rwg0xJz+Mbg
 jiW8/QIMji44EF8E3PZmt9mqgr0CK7mMWGhk/GcmTDDnm0Zc95ZBhq8dcQkJj3D1
 A3maDFvSC/ryDc/25XMlsbXY7ZWa+s8u5eysVwToqdQpJ1im0M/iAT3du6a1GY02
 xZiJzQMbC0GVmvCQdN2jRP+GjYUH5L6eIujPFKC5v/RqWQ1/oHU=
 =pomi
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVkhoACgkQYKtH/8kJ
 Uif6bRAAlcEY2OiiJ0Jn4gmFHzGX0est8Tt3jil5t9/khbMEWMecpIOwXRjuvrqU
 3zVfPlOGnZv7CwsKrzsL/DakQitNmFjgffvbcBVj/1yJKhaGlXNYILhc/t3WSMkk
 RwSh9s5K0v2jXwMN1zHWtko/RVZuBhEm+dmiBhY49MHpLBTg7lHPd0533efmfQIz
 0xVkR6LN492IRftrON9Q5fSw0ImrmfU6i8Rn9xSoTlewW7bRNdgw1aZi87yNvRdq
 bKE5gt0dKbk/UZMwozHBEA3ZylaRzKdxxCuvtyNpCYfHwOlO7PCOG6eQVxvhckcw
 XK99Ir5Opvfj040kgNIuUmd2cdyyXYt3BJ4l8fo93GZcoNlNIWkNRdgE07g+4SQZ
 GeO4UNBQz3tgFZ8yUKt3atf5W9snu+c6O5SE8it/aXkR3/gAZ58Out2UYOgDDgA0
 fFpngQKilDPYx+v3fy9y0XJDvIhDOY6JFvp9+KrYA5rJ6097TjTlywWyyCLvW4bK
 wKQ15cWuPdVgKXlxknQPUaIhKWhQx2PzEFpwXm+tYFv5Tj7s7XgpDWsUx12V1wzZ
 Ntp8iVoULdkqGxcV7FaU6abGy3cQV7Vzpe08GNvyPiOYltj4KlhYtF8n+YMwMZsl
 /hvOh7GZXcViRaTLfL9ApdW7+yg/1TvxDLEHvNIbcmjdKKoYxdU=
 =aNb0
 -----END PGP SIGNATURE-----

Merge tag 'tegra-for-6.12-firmware' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into soc/drivers

firmware: tegra: Changes for v6.12-rc1

The changes in this set remove some unused code and simplify error paths
using scoped helpers.

* tag 'tegra-for-6.12-firmware' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  firmware: tegra: bpmp: Use scoped device node handling to simplify error paths
  firmware: tegra: bpmp: Drop unused mbox_client_to_bpmp()

Link: https://lore.kernel.org/r/20240830141004.3195210-2-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 10:23:22 +00:00
Arnd Bergmann
cdcf626314 Arm SCMI updates for v6.12
Few main features include:
 
 1. SCMI transport as stand-alone drivers
 
     Currently the SCMI transport layer is being built embedded into in
     the core SCMI stack. Some of these transports, despite being currently
     part of the main SCMI module, are indeed also registered with different
     subsystems like optee or virtio, and actively probed also by those.
     This leads to a few awkward and convoluted tricks to properly handle
     such interactions at boot time in the SCMI stack.
 
     This change adds the new logic to the core SCMI stack so that each
     existing transport is transitioned to be a standi-alone driver. With
     that all the probe deferral and awkward retries between the SCMI
     core stack and the transports has been removed, since no more needed.
 
 2. Support for obtaining transport descriptors from the devicetree
 
     SCMI platform firmwares might have different designs depending on
     the platform. Some of the transport descriptors rely on such design.
     E.g. the maximum receive channel timeout value might vary depending
     on the specific underlying hardware and firmware design choices.
 
     This change adds support for max-rx-timeout-ms property to describe
     the transport needs of a specific platform design. It will be extended
     in the future to obtain other such hardware/firmware dependent
     transport related descriptors.
 
 3. NXP i.MX95 specific SCMI vendor protocol extensions
 
     SCMI specification allows vendor or platform-specific extensions to
     the interface. NXP i.MX95 System Manager(SM) that implements SCMI
     extends the interface to implement couple of vendor/platform specific
     protocol, namely:
     a. Battery Backed Module(BBM) Protocol
 
        This protocol is intended provide access to the battery-backed
        module. This contains persistent storage (GPR), an RTC, and the
        ON/OFF button. The protocol can also provide access to similar
        functions implemented via external board components.
 
     b. MISC Protocol for misc settings
 
         This includes controls that are misc settings/actions that must
 	be exposed from the SM to agents. They are device specific and
 	are usually define to access bit fields in various mix block
 	control modules, IOMUX_GPR, and other GPR/CSR owned by the SM.
 
 4. SCMI debug/tracking metrics
 
     Since SCMI involves interaction with the entity(software, firmware
     and/or hardware) providing services or features, it is quite useful
     to track certain metrics(for pure debugging purposes) like how many
     messages were sent or received, were there any failures, what kind
     of failures, ..etc. This feature adds support for the same via debugfs.
 
 Apart from these main features, there are some miscellaneous updates, fixes
 and cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmbRy5cACgkQAEG6vDF+
 4pimmRAAy+JMVqmgw33e9zvQ6mXsncTO2YXWYVgM3g+IypwpIwdPryUt9NA9xR8w
 BHc0hlsCVsLmww4epb5fnztqN7YmvP5NUQhe4ZNRE72Bak5fidThdsNhCOBtlt25
 WwK0447UglHU/aF8VT2ufRhnMYIJDixazsvz0vp7wJpIPbfuS7r2WZXzw8fBXizH
 oXiYZLsgcv2WAKY5Q9DQhfYzosYhp9BPNYSV2luyYPZNPUbal2WNoAp1tLOQaLNY
 a+vtgOiyZPvltFewWVTNk2q6EhSyuiA/qHlM2Lp3aVuscA+h7Wa+RjHFN1YQHw/b
 +hNmljDyUGDBsbNLR9EdmV2dutsLE3Sk0/4H5V+sXEuB+q2gaOUVfpsDW52o7LLW
 s6DCDX47/9t+7y0uaApQnzUlskJonEBGq1Qm1siNiCpRR6SbABjcXFl654Tu61dr
 bv31uEOjxYzqQXXsYdQvAIDAg1VSlUcyr4ITHMifj9mBZrQMvrizjlbpRGSOQsJv
 NNIxPcvEsCq07tHvD0sQqaNLZN/5VEVCqdNqGBDBsLCPDVKIqc2DxK2udUt8exVE
 WCHLJb+DT1Gd6eQ00KQKx8umJeXPLehtBCvBdlDTHPKZWrFenQFPkKZsnqeNuneS
 IDIdyfbWrMgalwzDTgOZWxDcydkxXKNhpn7k2x/BzWGGhwtfHSI=
 =fUHS
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVkXIACgkQYKtH/8kJ
 UicZlA//eDFRRTxL5MOHhVY5hpn8Sn0a59Wz0S1x+xy5WnGxxh6EMnyLGr8vxmGp
 FREvraghX0/ftPIvDMRD2WgR93R96Q0d10tmLf9Es7iG9WskXqNsWBkTijCdvst4
 1iEC/wSu8ab2HGhtoUIM1Wt9R+RlkS7UE0TPRzchGQTM9FdytVv9qECtX9JGi7Wn
 CvCgcFGifKyOzigm3a4kf3FPtB8Y/ggPLOoDyIHOlM8lrdGmDh5PXuzbeKMxwSt1
 YBZS4T5QaWvwaT8ZOraAMYjNN+PmiL587JbY9L+H+VwPV5VpoxlNmNo3wjkAb1q/
 hg4huRJlN7BvN1wTQtsnDpzt4VgnIDOh+RXJ/ulUKSGLQ3TosV88FFIGfAO+KTBP
 PaQI4taxcyhsnhl4ab040jumfUbeK8DHwCc1P/HsejYy6H9bmjwFV8WCbSZTNH6g
 if6fcGRYIzw8MzeqtTH1qjLwhqYt/iXUahHzzONWzskvzR/kPV1x/mSPQNVcJ51e
 rL6D485CjZh85pY7Pvn4+Ylur9uIe9wealipfSFzWlAgo57sTY6xrilO20UHnR6t
 n+202dPG8TAoDrpomLsF04rbuV4uhv0gWhtIyCzaJHYfgCUgAQvzniR2T6IaOTM3
 ks/SZ0j+sv65/KJd8rO1tZHwgEVwmDElRzO9CPF3pQxMrzKG5iw=
 =28qZ
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm SCMI updates for v6.12

Few main features include:

1. SCMI transport as stand-alone drivers

    Currently the SCMI transport layer is being built embedded into in
    the core SCMI stack. Some of these transports, despite being currently
    part of the main SCMI module, are indeed also registered with different
    subsystems like optee or virtio, and actively probed also by those.
    This leads to a few awkward and convoluted tricks to properly handle
    such interactions at boot time in the SCMI stack.

    This change adds the new logic to the core SCMI stack so that each
    existing transport is transitioned to be a standi-alone driver. With
    that all the probe deferral and awkward retries between the SCMI
    core stack and the transports has been removed, since no more needed.

2. Support for obtaining transport descriptors from the devicetree

    SCMI platform firmwares might have different designs depending on
    the platform. Some of the transport descriptors rely on such design.
    E.g. the maximum receive channel timeout value might vary depending
    on the specific underlying hardware and firmware design choices.

    This change adds support for max-rx-timeout-ms property to describe
    the transport needs of a specific platform design. It will be extended
    in the future to obtain other such hardware/firmware dependent
    transport related descriptors.

3. NXP i.MX95 specific SCMI vendor protocol extensions

    SCMI specification allows vendor or platform-specific extensions to
    the interface. NXP i.MX95 System Manager(SM) that implements SCMI
    extends the interface to implement couple of vendor/platform specific
    protocol, namely:
    a. Battery Backed Module(BBM) Protocol

       This protocol is intended provide access to the battery-backed
       module. This contains persistent storage (GPR), an RTC, and the
       ON/OFF button. The protocol can also provide access to similar
       functions implemented via external board components.

    b. MISC Protocol for misc settings

        This includes controls that are misc settings/actions that must
	be exposed from the SM to agents. They are device specific and
	are usually define to access bit fields in various mix block
	control modules, IOMUX_GPR, and other GPR/CSR owned by the SM.

4. SCMI debug/tracking metrics

    Since SCMI involves interaction with the entity(software, firmware
    and/or hardware) providing services or features, it is quite useful
    to track certain metrics(for pure debugging purposes) like how many
    messages were sent or received, were there any failures, what kind
    of failures, ..etc. This feature adds support for the same via debugfs.

Apart from these main features, there are some miscellaneous updates, fixes
and cleanups.

* tag 'scmi-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (31 commits)
  rtc: support i.MX95 BBM RTC
  input: keyboard: support i.MX95 BBM module
  firmware: imx: Add i.MX95 MISC driver
  firmware: arm_scmi: Add initial support for i.MX MISC protocol
  firmware: arm_scmi: Add initial support for i.MX BBM protocol
  firmware: arm_scmi: Add NXP i.MX95 SCMI documentation
  dt-bindings: firmware: Add i.MX95 SCMI Extension protocol
  firmware: arm_scmi: Replace comma with the semicolon
  firmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)
  firmware: arm_scmi: Fix trivial whitespace/coding style issues
  firmware: arm_scmi: Use max-rx-timeout-ms from devicetree
  dt-bindings: firmware: arm,scmi: Introduce property max-rx-timeout-ms
  firmware: arm_scmi: Remove const from transport descriptors
  firmware: arm_scmi: Simplify with scoped for each OF child loop
  firmware: arm_scmi: Update various protocols versions
  firmware: arm_scmi: Remove legacy transport-layer code
  firmware: arm_scmi: Make VirtIO transport a standalone driver
  firmware: arm_scmi: Make OPTEE transport a standalone driver
  firmware: arm_scmi: Make SMC transport a standalone driver
  firmware: arm_scmi: Make MBOX transport a standalone driver
  ...

Link: https://lore.kernel.org/r/20240830135918.2383664-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 10:20:34 +00:00
Arnd Bergmann
74f19eb2ff Arm FF-A updates for v6.12
The main addition this time is the basic support for FF-A v1.2
 specification which includes support for newly added:
 1. FFA_MSG_SEND_DIRECT_{REQ,RESP}2
 2. FFA_PARTITION_INFO_GET_REGS
 3. FFA_YIELD support in direct messaging
 
 Apart from these, the changes include support to fetch the Rx/Tx buffer
 size using FFA_FEATURES, addition of the FF-A FIDs for v1.2 and some
 coding style cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmbRpoMACgkQAEG6vDF+
 4phihQ/9ES+9WgORUITCUd1qW+RtazSY0BjsL7Cji44IOHUzRacAluI3ITbd6N0b
 rTjVAMXc3j2Fu++HItKaXWUdhp+ZaKwSK07YUrU/czYHoq9Xf6uuauK/8omZZX5D
 JreqvIZfV+qZ30uIMu/U4tClT0rNHMkwOd+DypRhXg0iZC+qCZA7fXMiHt9CcA/U
 OfKLywsiv81m6Hb/BqQ+KVFZM9HIc/5Dpmdts9PB9wzZXMnE7WdOwKgGLtqKjhrC
 fr1ZW+7KzXX5+mPYH530ySwveL+3vNedIJYD0IHvP8HRj5N3VtLdPGHMcrcROeLQ
 +G+OtnTSZ1iS15/U77+drGW33fjMIzjMlLE4qCLZhnuqBAdV86YOPL/UtjokPEf6
 5jNZ4C2famsNtMgETeyrAvBLbzRdDgYe9YwhG6UmMAgllakSV/bUHDaCBeAaBJ6L
 zy+p0ORYLMIhUFikVZnos5siu2HOLnYdfvUcF2Npr8ri9g+M5usT2Mxar8o+UK3w
 xVzMcxVcSVg+ah3B8d2k8cms+d7rov3ZtxWNjDSJ8GMTyNMINnN2jyXQ4nMT8Oe7
 sY54+1h1EXhXMGs/hxb9svAe1XEB7Y6ZP7YK/gLyy3e/BOXkcq4n8aVYDenhnmPB
 4x6Fv+F3RdORRDoMi2TRmYwrzjAjD+ReoO8hya0MZq/hLhNpD3o=
 =BpAd
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbVkQcACgkQYKtH/8kJ
 Uie7LxAAoOfhZZQVy7z9fCQa9562H7tCZPCk1hHzw/EgDJLU/9OB+x5QiKoqywFf
 4JIAzyJZrWjr+s4zOKYb5szuUCLMYjIvgZqVGu7z9pjcHgWr5fTK180Jhi5K4oXW
 lYSBKhjhIdVl1oCdF6WD9uNp3tta85CCOiDcMEi6Flm3+d0WZUO8baZbu2xL0os8
 zPvM106bTPU/Afuh/Jd4w1TEta7MKbTW19Rm85F6m7y4DRR+V/FOVGCllwtKwgyH
 qfRpkLZQG3jdUOyFNfXcwK/N7t6RRNOio0XycGkDNOa73C6KKF7kgWppHqItyaNy
 x1PPsPJbba0kUwz9jzMPS8SXNm83tUIB/q0BGuIq22ucLHSq6Vbpw/vFxrYnVR65
 bAIGjU6SyZ2gyqTnnd5o95P2eayIS2hFWZ6TjqzlYN27scMVoYPvRJMdS4ruuJvM
 8Oin5/3AenbD8F6gtMy6SRejLlKJBscSfbpm/Ksxt51NHi4WLOJqFWQnjE2l/Yrv
 i3aCCuH/+9eLmJHtGzJpQLjN0bo5rq9OPaeGa3v4rJYnw58s6PK6zAyaF6CXspDn
 w7Ta5dz5Ldk3D/mcoClfym/joFcA0BApZLxP9Oi7qkLHpc5QTf/BD+1KWUB9CvmX
 KAEknA5nw+s6p/zL32p1pFH9GoRJLRUV9+jnXRFWS5N5F/0Whok=
 =/d2i
 -----END PGP SIGNATURE-----

Merge tag 'ffa-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm FF-A updates for v6.12

The main addition this time is the basic support for FF-A v1.2
specification which includes support for newly added:
1. FFA_MSG_SEND_DIRECT_{REQ,RESP}2
2. FFA_PARTITION_INFO_GET_REGS
3. FFA_YIELD support in direct messaging

Apart from these, the changes include support to fetch the Rx/Tx buffer
size using FFA_FEATURES, addition of the FF-A FIDs for v1.2 and some
coding style cleanups.

* tag 'ffa-updates-6.12' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()
  firmware: arm_ffa: Add support for FFA_YIELD in direct messaging
  firmware: arm_ffa: Add support for FFA_MSG_SEND_DIRECT_{REQ,RESP}2
  firmware: arm_ffa: Add support for FFA_PARTITION_INFO_GET_REGS
  firmware: arm_ffa: Move the function ffa_features() earlier
  firmware: arm_ffa: Update the FF-A command list with v1.2 additions
  firmware: arm_ffa: Some coding style fixes

Link: https://lore.kernel.org/r/20240830135759.2383431-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 10:18:47 +00:00
Marek Behún
a79f256fc9
firmware: turris-mox-rwtm: Deduplicate command execution code
Deduplicate rWTM command execution calls
  mbox_send_message()
  wait_for_completion()
  mox_get_status()
to one function
  mox_rwtm_exec()

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-17-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:11 +00:00
Marek Behún
82944f65a0
firmware: turris-mox-rwtm: Use ALIGN() instead of hardcoding
Use ALIGN(max, 4) instead of hardcoding ((max + 3) & ~3).

Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-16-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
8a4853a65b
firmware: turris-mox-rwtm: Use EOPNOTSUPP instead of ENOSYS
Checkpatch warns agains -ENOSYS:
  WARNING: ENOSYS means 'invalid syscall nr' and nothing else
Use EOPNOTSUPP instead.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-15-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
21733f5902
firmware: turris-mox-rwtm: Use container_of() instead of hwrng .priv member
Use container_of() to get driver private structure from hwnrg structure,
instead of the hwrng's .priv member, as suggested by Herbert for another
driver.

Link: https://lore.kernel.org/soc/ZmLhQBdmg613KdET@gondor.apana.org.au/
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-14-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
db955e0847
firmware: turris-mox-rwtm: Use devm_mutex_init() instead of mutex_init()
Use devm_mutex_init() instead of mutex_init(), to properly call
mutex_destroy() on probe failure / driver unbind.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-13-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
ed09d6d4f5
firmware: turris-mox-rwtm: Drop redundant device pointer
Drop redundant device pointer from driver's private structure.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-12-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
869b1fc043
firmware: turris-mox-rwtm: Use dev_err_probe() where possible
Use dev_err_probe() where possible in the driver's .probe() method.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-11-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
fbd48bd8cf
firmware: turris-mox-rwtm: Convert rest to devm_* and get rid of driver .remove()
Use devm resource management for driver's mailbox. This allows us to get
rid of the driver's .remove() method and the gotos in .probe().

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-10-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
1b649ec180
firmware: turris-mox-rwtm: Simplify debugfs code
Simplify debugfs code: do not check for errors, as debugfs errors should
be ignored, and use devm action for dropping the debugfs directory.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-9-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:10 +00:00
Marek Behún
579e05ee1b
firmware: turris-mox-rwtm: Don't create own kobject type
In order to create attribute files in /sys/firmware/turris-mox-rwtm,
this driver creates it's own kobject type.

Simplify this by dropping this own kobject creation, and instead
creating standard device attribute files.

For backwards compatibility with sysfs ABI, create a symlink
/sys/firmware/turris-mox-rwtm, pointing to this device's sysfs
directory.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-8-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:09 +00:00
Marek Behún
97a9c5b3e0
firmware: turris-mox-rwtm: Use sysfs_emit() instead of sprintf()
Use sysfs_emit() instead of sprintf() in sysfs attribute .show()
method.

Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-7-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:09 +00:00
Marek Behún
671d5f6869
firmware: turris-mox-rwtm: Fix driver includes
Drop including of.h, include several other headers that are used but not
included directly.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-6-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:09 +00:00
Marek Behún
99ed7980b5
firmware: turris-mox-rwtm: Hide signature related constants behind macros
Hide signature generation related constants behind macros instead of
hardcoding the values.

Use SHA512_DIGEST_SIZE from crypto/sha2.h instead of hardcoded 64 as the
message size.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-5-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:09 +00:00
Marek Behún
b787a6b892
firmware: turris-mox-rwtm: Use the boolean type where appropriate
Use the boolean type for has_board_info, has_pubkey and last_sig_done
members of the driver's private structure.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-4-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:09 +00:00
Marek Behún
c3358e1017
firmware: turris-mox-rwtm: Use ETH_ALEN instead of hardcoded 6
Use the ETH_ALEN macro instead of hardcoded 6 for MAC address length.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-3-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:42:09 +00:00
Marek Behún
29d258542f
firmware: turris-mox-rwtm: Use macro constant instead of hardcoded 4096
The 4096 bytes limit in mox_hwrng_read() is due to the DMA buffer being
allocated to one PAGE_SIZE bytes. Use new local macro constant
RWTM_DMA_BUFFER_SIZE at allocation time and when used in mox_hwrng_read().

Use SZ_4K instead of PAGE_SIZE. Although PAGE_SIZE is never set to a
larger value on Armada 3720, it theoretically could, and this would be a
waste of space.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-2-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-09-02 09:41:56 +00:00
Kirill A. Shutemov
5adfeaecc4 mm: rework accept memory helpers
Make accept_memory() and range_contains_unaccepted_memory() take 'start'
and 'size' arguments instead of 'start' and 'end'.

Remove accept_page(), replacing it with direct calls to accept_memory(). 
The accept_page() name is going to be used for a different function.

Link: https://lkml.kernel.org/r/20240809114854.3745464-6-kirill.shutemov@linux.intel.com
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-09-01 20:26:07 -07:00
Linus Torvalds
35667a2969 ARM: SoC fixes for 6.11, part 2
There is a fairly large number of bug fixes for Qualcomm platforms,
 most of them addressing issues with the devicetree files for the
 newly added Snapdragon X1 based laptops to make them more reliable.
 The Qualcomm driver changes address a few build-time issues as well
 as runtime problems in the tzmem and scm firmware, the USB Type-C
 driver, and the cmd-db and pmic_glink soc drivers.
 
 The NXP i.MX usually gets a bunch of devicetree fixes that is proportional
 to the number of supported machines. This includes both warning fixes
 and correctness for the 64-bit i.MX9, i.MX8 and layerscape platforms,
 as well as a single fix for a 32-bit i.MX6 based board.
 
 The other changes are the usual minor changes, including an update to the
 MAINTAINERS file, an omap3 dts file and a SoC driver for mpfs (risc-v).
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbSNOgACgkQYKtH/8kJ
 UieuWg//eW9qg16Fw7ZeEDSrq7s7Mrr03zcF+Xqb1wpZZqDbUqgSWqaDDapd//bW
 st7eR2rxm5yySBRbYFNa/jjB7YQA1GSlYtFn3cBEe/lFiuhOeP5yWwKTT05yeWDr
 RzkPSDIt30YDsYV6+k5HpyzRNeuOd7QaVOz9XKqnEgzuRKC89OcSkHmXQUhvvbrg
 f+5/uSFTZBAYjUpuH3ZRX9elRYsHSYlsmLI71HWRIBZrvNWwv3O4N0nySbCdhE0V
 8hb3fCo/39rdjWjKuGHigsvxMLLmooFNvu/r/oZtqUjFDIjOkVzxI14K/yl2al7v
 nmEHnwFqTsTIGP21CmRV4fzrS/80gld3ieLavC9kZaWqfV9yMjF1+jg40qsrUXcR
 /Gfzq7XCrqx9CpFA62uytjkQZI5tk9Ip9FQHK80+OsDq8/zCJs77NIwR26VNT3O/
 HIf9yTdC4bzZW1hUpTsIy+/piSWja5kkSKHn5Zcqby05hPUjWe/utiBKW3lTE9OI
 EJ4swrHOenGea0AEeR2Rp5WOVfq26q12m4GYCi5YM+FGr64KHf5URQ1GoRTxorAx
 YLa8xGm88CfIU3rnW90b2/5lYgqAyL3xEq9p1qt9HmZx/0SuoGbV1EekgfPd52yV
 hrkn2gnNGS+A2ldqSRGZVJQSxKIpISORDj4y3sAI+JEQmm0UEM0=
 =tK5m
 -----END PGP SIGNATURE-----

Merge tag 'arm-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull ARM SoC fixes from Arnd Bergmann:
 "There is a fairly large number of bug fixes for Qualcomm platforms,
  most of them addressing issues with the devicetree files for the newly
  added Snapdragon X1 based laptops to make them more reliable.

  The Qualcomm driver changes address a few build-time issues as well as
  runtime problems in the tzmem and scm firmware, the USB Type-C driver,
  and the cmd-db and pmic_glink soc drivers.

  The NXP i.MX usually gets a bunch of devicetree fixes that is
  proportional to the number of supported machines. This includes both
  warning fixes and correctness for the 64-bit i.MX9, i.MX8 and
  layerscape platforms, as well as a single fix for a 32-bit i.MX6 based
  board.

  The other changes are the usual minor changes, including an update to
  the MAINTAINERS file, an omap3 dts file and a SoC driver for mpfs
  (risc-v)"

* tag 'arm-fixes-6.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (50 commits)
  firmware: microchip: fix incorrect error report of programming:timeout on success
  soc: qcom: pd-mapper: Fix singleton refcount
  firmware: qcom: tzmem: disable sdm670 platform
  soc: qcom: pmic_glink: Actually communicate when remote goes down
  usb: typec: ucsi: Move unregister out of atomic section
  soc: qcom: pmic_glink: Fix race during initialization
  firmware: qcom: qseecom: remove unused functions
  firmware: qcom: tzmem: fix virtual-to-physical address conversion
  firmware: qcom: scm: Mark get_wq_ctx() as atomic call
  arm64: dts: qcom: x1e80100: Fix Adreno SMMU global interrupt
  arm64: dts: qcom: disable GPU on x1e80100 by default
  arm64: dts: imx8mm-phygate: fix typo pinctrcl-0
  arm64: dts: imx95: correct L3Cache cache-sets
  arm64: dts: imx95: correct a55 power-domains
  arm64: dts: freescale: imx93-tqma9352-mba93xxla: fix typo
  arm64: dts: freescale: imx93-tqma9352: fix CMA alloc-ranges
  ARM: dts: imx6dl-yapp43: Increase LED current to match the yapp4 HW design
  arm64: dts: imx93: update default value for snps,clk-csr
  arm64: dts: freescale: tqma9352: Fix watchdog reset
  arm64: dts: imx8mp-beacon-kit: Fix Stereo Audio on WM8962
  ...
2024-09-01 06:42:13 +12:00
Dan Carpenter
db213b0cfe firmware: qcom: uefisecapp: Fix deadlock in qcuefi_acquire()
If the __qcuefi pointer is not set, then in the original code, we would
hold onto the lock.  That means that if we tried to set it later, then
it would cause a deadlock.  Drop the lock on the error path.  That's
what all the callers are expecting.

Fixes: 759e7a2b62 ("firmware: Add support for Qualcomm UEFI Secure Application")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/19829bc4-1b6f-47f7-847a-e90c25749e40@stanley.mountain
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-30 22:17:50 -05:00
Marc Zyngier
0ba5b4ba61 firmware/smccc: Call arch-specific hook on discovering KVM services
arm64 will soon require its own callback to initialise services
that are only available on this architecture. Introduce a hook
that can be overloaded by the architecture.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240830130150.8568-2-will@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2024-08-30 16:30:41 +01:00
Dave Airlie
27f5b729cb A revert for a previous TTM commit causing stuttering, 3 fixes for
vmwgfx related to buffer operations, a fix for video/aperture with
 non-VGA primary devices, and a preemption status fix for v3d
 -----BEGIN PGP SIGNATURE-----
 
 iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCZtCKzwAKCRAnX84Zoj2+
 drMcAYDvGyENhD3jcOSM0vd1pEgleMSKoD4sbsj+JO6vMona7/dWzpUXHyxZg0P9
 7gOZAkwBgMQHQKWBOga/LnloJi1/GC4Y7pjR4tDzLRO4ejbGdStLK8vEMKJKltwB
 ej1UUueBAQ==
 =4GlG
 -----END PGP SIGNATURE-----

Merge tag 'drm-misc-fixes-2024-08-29' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes

A revert for a previous TTM commit causing stuttering, 3 fixes for
vmwgfx related to buffer operations, a fix for video/aperture with
non-VGA primary devices, and a preemption status fix for v3d

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maxime Ripard <mripard@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240829-efficient-swift-from-lemuria-f60c05@houat
2024-08-30 11:28:11 +10:00
Peng Fan
0b4f8a68b2 firmware: imx: Add i.MX95 MISC driver
The i.MX95 System manager exports SCMI MISC protocol for linux to do
various settings, such as set board gpio expander as wakeup source.

The driver is to add the support.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-5-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 21:54:21 +01:00
Peng Fan
61c9f03e22 firmware: arm_scmi: Add initial support for i.MX MISC protocol
i.MX95 System Manager(SM) firmware includes a SCMI vendor protocol, SCMI
MISC protocol which includes controls that are misc settings/actions that
must be exposed from the SM to agents. They are device specific and are
usually define to access bit fields in various mix block control modules,
IOMUX_GPR, and other General Purpose registers, Control Status Registers
owned by the SM.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-3-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 21:54:13 +01:00
Peng Fan
41845541ad firmware: arm_scmi: Add initial support for i.MX BBM protocol
i.MX95 has a battery-backed module(BBM), which has persistent storage
(GPR), an RTC, and the ON/OFF button. The System Manager(SM) firmware
use SCMI vendor protocol(SCMI BBM) to let agent be able to use GPR, RTC
and ON/OFF button.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-2-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 21:54:03 +01:00
Peng Fan
c66beeab74 firmware: arm_scmi: Add NXP i.MX95 SCMI documentation
Add NXP i.MX95 System Control Management Interface(SCMI) vendor
extensions protocol documentation.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Message-Id: <20240823-imx95-bbm-misc-v2-v8-4-e600ed9e9271@nxp.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 21:53:54 +01:00
Arnd Bergmann
3536c01d65 RISC-V soc fixes for v6.11-rc6
Prevent an erroneous unconditional report of a timeout during firmware
 upload in the mpfs-auto-update driver.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZs9BTwAKCRB4tDGHoIJi
 0vTIAP9dDPlRxKxQrgelRUzTYb3YCJNR85VUsH2Iw8SS+4FKrgEA5f183mccadug
 lb4NMrMoAVHJVG2iobK44Tbr/q8cxgc=
 =Xg4H
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbPiIQACgkQYKtH/8kJ
 Uifl+xAAsEJSApcN9GV8Y334RXeQaEz+JT2LpYUOqfkyNJzyYO6Q3ZiaoWH77V8W
 g5g7j7agU/sNYwkqw0MtmSc8c8NoqdBv1O1PjtWcNkCQJPEqwRI1Z4o5NV4yYxHY
 zwlqye6oyfECNIvVTdTMqaubRLA6T9vt4qVXrG6gl+aJO42ufQHsewH3JrfRsyNA
 RKPT1xg4FxZDTBe/AhULZxL9JEEQVcuNBrDzpQr1JahHtF7+grCw3aVHQ6DWFR+p
 VZWrq/J5OI5jx7VLC0mHmP9I2Qfxk9bgGtU1pM4KHW80nmOgkSx+IuqGj7SppIXx
 9VBpiMnyciT+5JAUe15LoOp3pX+Pjm8MtiJnbSc5Cj35U3rnSHsci1wee+7GtY8h
 e2/SpjL5U1HCxBUTzGgLMZexWtX5fLrupcnfPqHRZXPmRbbvC3pJ10memW4MQ91a
 h42gV1H5xAO2/GIjTE97tjrCt+xy9/dWEyywu7wzaqVmaOtlWhDNi+EKzZEWZB2L
 YJfOUFu4mgbaWmwyQodaq/BQ3lWAda66oBtXOw2Cw+UXaL9d+jMg0Tp/XYBVFDOC
 381eI0UhgiErjmQq4nciA5PFagLlDdFp49xFIrRdOPfmH9NdhGpzc5FZgW8CAFG4
 ywNbUiy3h6TOVNRNQbIgjaTnNWNUJj5EXpZcdbhfllYAl8R2ZU4=
 =i909
 -----END PGP SIGNATURE-----

Merge tag 'riscv-soc-fixes-for-v6.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into arm/fixes

RISC-V soc fixes for v6.11-rc6

Prevent an erroneous unconditional report of a timeout during firmware
upload in the mpfs-auto-update driver.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'riscv-soc-fixes-for-v6.11-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  firmware: microchip: fix incorrect error report of programming:timeout on success

Link: https://lore.kernel.org/r/20240828-fidelity-almighty-18d5434aaef0@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-08-28 20:28:52 +00:00
Arnd Bergmann
d8f2638b83 Qualcomm driver fixes for v6.11
This corrects the tzmem virt-to-phys conversion, which caused issues for
 the uefisecapp implementation of EFI variable access. SDM670 is excluded
 from tzmem usage due to reported issues.
 
 The SCM get wait queue context call is corrected to be marked ATOMIC and
 some dead code in qseecom, following the tzmem conversion, is removed.
 
 The memory backing command DB is remapped writecombined, to avoid XPU
 violations when Linux runs without the Qualcomm hypervisor.
 
 Two compile fixes are added for pd-mapper, and the broken reference
 count is corrected, to make pd-mapper deal with remoteprocs going away.
 
 In pmic_glink a race condition where the client callbacks might be
 called before we returned the client handle is corrected. The broken conditions
 for when to signal that the firmware is going down is also corrected.
 
 In the pmic_glink UCSI driver, the ucsi_unregister() is moved out of the
 pdr callback, as this is being invoked in atomic context.
 
 Konrad's email address is updated in MAINTAINERS, and related mailmap
 entries are added.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmbMlmAVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FwZwP/iXn8Okj8Xsg0paofr9jwetFaGAr
 b6BGd09Ygm8xdNi9zNqLHBZFJQaKlX5Ah5iG0trX1ljDZvdK6JjDz5IUGxXY8T5l
 R0TW/h/kHiA0UdsQDiGiwK68r4k/9rCwHP14CFSFMSLbTyrX/fiVZy2+GyjJ4/CS
 53Dn3swGVeGU4HOZzh9AN4GVtzQu4ECUUZp50StuRvuDqCdjaHbc3JWieTtEWcSt
 1dJkacNi1yJi1XxHSW6o7jR7ogDxLvMz95x26zhramPBzbsfAAjrkiwNDMz4w2Cj
 P+TjGunlYAOUoqwx0r3ffawNqQg5IoQRSH5fe/39UjzAAXdZoBv81BiQYypkWAdz
 9Iyc13oEkKXUViS9tad9Qba31Ajxdgs2k0T8+XkLoEiFy9CIx7TtTcAP7549wxUI
 89U1LMMZN0iAnEtSmGIc/C7Pr5iap+0beVOJuIZ8tX2vPf2QP8rxe52gvNW39mD3
 IQeLnmxrmTSB9wk/ObddGNfftzA4yEOsnzHddv4w9AVoUH9dsvLuv+Y7C7oALTU+
 RRvHcuUjJ0NJp7xcK0iTR0iqCKg0Rs+VHTnvWxFaIDGH6QdUMMgdBHXWF/f5mR7K
 Jx19VHm2u4IyNLxE6tzC/048PM0qEFEQws1C+dXvtuaC38VX5PBIVWGHTeU4ctsN
 nfkPYQDcEo71FNI5
 =Zo90
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmbPiDsACgkQYKtH/8kJ
 Uifk1xAAzHhy/tsQXK0IPSSzvJZJN9NeTkkGad6Nt6nN+jMXf9c+vTtDcPFlKMlp
 hPgXLJ/lh3l6NkEZ+3oI11CL/s3XJEbJaXJ9sqG3E6CUzzO15yII4hd4IqZWIa6x
 +YxdOlAgoQ6LgumidlgeiwRMxBM51KY7kgJIjv3aNQR0EL1F8tgBOqWCpU7cf8nC
 dtAdMy7oaVQFLzW4vtSMipmp0ppr2Evgae/u7qAZuSBunFReeQWggIMI3+hAJvtb
 hInoo8DNksZPfkfLteBmMPO1eyh6ByL2c8PvsriCf+QOK8ADKTwON+6mIya6ubLI
 Azvvz9cBOuXFPhc5OJKG7ZaN1SLRbuhwN2bf//5H6s54/WZFW9/lKQtxq8zjpGW5
 NHKUGoIk/DgyfLs/rEZhvSEXr3jQUCBDNyMAAY0xoPwfqXhPS9flV4FcZn4qiIRh
 bnW1O4a1xwAT5Dwwla62LnzGbYJiKZ6Xi/VJQqg0uZABGdtw0FtjvY/Z8KJCEzYL
 H7T4iu9u+K43SNL/TytBXqMkVZNYMzSncu6NkYFpI0G3Pzw+h5q+BjncODn0Y8tX
 b8ZP/ee84Mumwi8k5lDBllaMoP3I7fyowgFsq5vrE9zpxRiMGJFDf9pxALXJddzN
 jgm/qia9XIU9VZe+Vnq9O73IPjd5P44v/HgUTRcJAB+5aHcylAk=
 =pkFq
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/fixes

Qualcomm driver fixes for v6.11

This corrects the tzmem virt-to-phys conversion, which caused issues for
the uefisecapp implementation of EFI variable access. SDM670 is excluded
from tzmem usage due to reported issues.

The SCM get wait queue context call is corrected to be marked ATOMIC and
some dead code in qseecom, following the tzmem conversion, is removed.

The memory backing command DB is remapped writecombined, to avoid XPU
violations when Linux runs without the Qualcomm hypervisor.

Two compile fixes are added for pd-mapper, and the broken reference
count is corrected, to make pd-mapper deal with remoteprocs going away.

In pmic_glink a race condition where the client callbacks might be
called before we returned the client handle is corrected. The broken conditions
for when to signal that the firmware is going down is also corrected.

In the pmic_glink UCSI driver, the ucsi_unregister() is moved out of the
pdr callback, as this is being invoked in atomic context.

Konrad's email address is updated in MAINTAINERS, and related mailmap
entries are added.

* tag 'qcom-drivers-fixes-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: pd-mapper: Fix singleton refcount
  firmware: qcom: tzmem: disable sdm670 platform
  soc: qcom: pmic_glink: Actually communicate when remote goes down
  usb: typec: ucsi: Move unregister out of atomic section
  soc: qcom: pmic_glink: Fix race during initialization
  firmware: qcom: qseecom: remove unused functions
  firmware: qcom: tzmem: fix virtual-to-physical address conversion
  firmware: qcom: scm: Mark get_wq_ctx() as atomic call
  MAINTAINERS: Update Konrad Dybcio's email address
  mailmap: Add an entry for Konrad Dybcio
  soc: qcom: pd-mapper: mark qcom_pdm_domains as __maybe_unused
  soc: qcom: cmd-db: Map shared memory as WC, not WB
  soc: qcom: pd-mapper: Depend on ARCH_QCOM || COMPILE_TEST

Link: https://lore.kernel.org/r/20240826145209.1646159-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-08-28 20:27:39 +00:00
Sudeep Holla
c4b908a23f firmware: arm_scmi: Replace comma with the semicolon
Replace the typo comma with the semicolon. No functional change.

Message-Id: <20240827143838.1465913-4-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 17:16:25 +01:00
Sudeep Holla
ccf5021931 firmware: arm_scmi: Replace the use of of_node_put() to __free(device_node)
Use __free for device_node values, and thus drop calls to of_node_put.

The goal is simplify of_node reference cleanup by using this scope-based
of_node_put() cleanup to simplify function exit handling. When using __free
a resource is allocated within a block, it is automatically freed at the
end of the block.

This cleanup aligns well with the recent change in shmem.c to use __free
instead of explicit of_node_put() calls.

Message-Id: <20240827143838.1465913-3-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 17:16:25 +01:00
Sudeep Holla
50db2ef5c7 firmware: arm_scmi: Fix trivial whitespace/coding style issues
Fix couple of unnecessary multiple blank lines and spaces instead of
tabs.

No functional change.

Message-Id: <20240827143838.1465913-2-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-28 17:16:25 +01:00
Krzysztof Kozlowski
8812b8689e firmware: tegra: bpmp: Use scoped device node handling to simplify error paths
Obtain the device node reference with scoped/cleanup.h to reduce error
handling and make the code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-08-27 15:58:38 +02:00
Krzysztof Kozlowski
9c3a62c20f firmware: tegra: bpmp: Drop unused mbox_client_to_bpmp()
mbox_client_to_bpmp() is not used, W=1 builds:

  drivers/firmware/tegra/bpmp.c:28:1: error: unused function 'mbox_client_to_bpmp' [-Werror,-Wunused-function]

Fixes: cdfa358b24 ("firmware: tegra: Refactor BPMP driver")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-08-27 15:57:17 +02:00
Yazen Ghannam
d7171eb494 efi/cper: Print correctable AER information
Currently, cper_print_pcie() only logs Uncorrectable Error Status, Mask
and Severity registers along with the TLP header.

If a correctable error is received immediately preceding or following an
Uncorrectable Fatal Error, its information is lost since Correctable
Error Status and Mask registers are not logged.

As such, to avoid skipping any possible error information, Correctable
Error Status and Mask registers should also be logged.

Additionally, ensure that AER information is also available through
cper_print_pcie() for Correctable and Uncorrectable Non-Fatal Errors.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Tested-by: Avadhut Naik <avadhut.naik@amd.com>
Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-08-27 12:23:19 +02:00
Alex Deucher
b49420d6a1 video/aperture: optionally match the device in sysfb_disable()
In aperture_remove_conflicting_pci_devices(), we currently only
call sysfb_disable() on vga class devices.  This leads to the
following problem when the pimary device is not VGA compatible:

1. A PCI device with a non-VGA class is the boot display
2. That device is probed first and it is not a VGA device so
   sysfb_disable() is not called, but the device resources
   are freed by aperture_detach_platform_device()
3. Non-primary GPU has a VGA class and it ends up calling sysfb_disable()
4. NULL pointer dereference via sysfb_disable() since the resources
   have already been freed by aperture_detach_platform_device() when
   it was called by the other device.

Fix this by passing a device pointer to sysfb_disable() and checking
the device to determine if we should execute it or not.

v2: Fix build when CONFIG_SCREEN_INFO is not set
v3: Move device check into the mutex
    Drop primary variable in aperture_remove_conflicting_pci_devices()
    Drop __init on pci sysfb_pci_dev_is_enabled()

Fixes: 5ae3716cfd ("video/aperture: Only remove sysfb on the default vga pci device")
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Helge Deller <deller@gmx.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240821191135.829765-1-alexander.deucher@amd.com
2024-08-26 19:14:48 -04:00
Konrad Dybcio
6614be0535 firmware: qcom: scm: Allow QSEECOM on Surface Laptop 7 models
Add the aforementioned machines to the list to get e.g. efivars up.

Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com>
Link: https://lore.kernel.org/r/20240826-topic-sl7-v2-2-c32ebae78789@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-26 11:28:32 -05:00
Steve Wilkins
591940e22e firmware: microchip: fix incorrect error report of programming:timeout on success
After successfully programming the SPI flash with an MFPS auto update
image, the error sysfs attribute reports programming:timeout.
This is caused by an incorrect check on the return value from
wait_for_completion_timeout() in mpfs_auto_update_poll_complete().

Fixes: ec5b0f1193 ("firmware: microchip: add PolarFire SoC Auto Update support")
Signed-off-by: Steve Wilkins <steve.wilkins@raymarine.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2024-08-22 20:47:16 +01:00
Richard Acayan
8342009efa firmware: qcom: tzmem: disable sdm670 platform
The Pixel 3a returns 4291821499 (-3145797 or 0xFFCFFFBB) when attempting
to load the GPU firmware if tzmem is allowed. Disable it on SDM670 so
the GPU can successfully probe.

Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240730013834.41840-2-mailingradian@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-21 08:37:37 -05:00
Sudeep Holla
61824feae5 firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()
An endpoint can discover the minimum size, maximum size and alignment
boundary for the Rx/Tx buffers by passing the function ID of the
FFA_RXTX_MAP ABI as input in the FFA_FEATURES interface. The maximum
size is an optional field and a value of 0 means that the partition
manager or the hypervisor does not enforce a maximum size.

Use the discovery mechanism and remove the hardcoded 4kB buffer size.
If the discovery fails, it still defaults to 4kB.

Message-Id: <20240820-ffa_v1-2-v2-7-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:45 +01:00
Sudeep Holla
eaca7ef8f3 firmware: arm_ffa: Add support for FFA_YIELD in direct messaging
Successful completion of both direct messaging function can be indicated
through an invocation of FFA_YIELD or GGA_INTERRUPT by the callee.

FFA_INTERRUPT indicates that the direct request was interrupted and must
be resumed through the FFA_RUN interface which is already done in the
driver.

FFA_YIELD indicates that the receiver endpoint has transitioned to the
blocked runtime state and must be resumed through the FFA_RUN interface.
However, the way receiver endpoint gets unblocked is implementation
defined. So, the driver just sleeps for 1 - 2ms and issues FFA_RUN. It
can return to the caller with FFA_YIELD is the receiver endpoint is still
blocked.

Message-Id: <20240820-ffa_v1-2-v2-6-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:45 +01:00
Sudeep Holla
aaef3bc981 firmware: arm_ffa: Add support for FFA_MSG_SEND_DIRECT_{REQ,RESP}2
FFA_MSG_SEND_DIRECT_{REQ,RESP} supported only x3-x7 to pass implementation
defined values as part of the message. This may not be sufficient sometimes
and also it would be good to use all the registers supported by SMCCC v1.2
(x0-x17) for such register based communication.

Also another limitation with the FFA_MSG_SEND_DIRECT_{REQ,RESP} is the
ability to target a specific service within the partition based on it's
UUID.

In order to address both of the above limitation, FF-A v1.2 introduced
FFA_MSG_SEND_DIRECT_{REQ,RESP}2 which has the ability to target the
message to a specific service based on its UUID within a partition as
well as utilise all the available registers(x4-x17 specifically) for
the communication.

This change adds support for FFA_MSG_SEND_DIRECT_REQ2 and
FFA_MSG_SEND_DIRECT_RESP2.

Message-Id: <20240820-ffa_v1-2-v2-5-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:44 +01:00
Sudeep Holla
ba85c644ac firmware: arm_ffa: Add support for FFA_PARTITION_INFO_GET_REGS
FF-A v1.2 introduced FFA_PARTITION_INFO_GET_REGS which is similar to
FFA_PARTITION_INFO_GET except that the former uses the registers to
get the required information instead of the Rx buffer which the latter
uses.

We need to first check if the platform supports this new API using
FFA_FEATURES so that we can fallback to the FFA_PARTITION_INFO_GET
(which is mandatory) if FFA_PARTITION_INFO_GET_REGS is not implemented.

Message-Id: <20240820-ffa_v1-2-v2-4-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:44 +01:00
Sudeep Holla
d37fff9826 firmware: arm_ffa: Move the function ffa_features() earlier
We need to use ffa_features() in ffa_partition_probe() to detect if
the newer FFA_PARTITION_INFO_GET_REGS API is supported in the platform
or not. To avoid unnecessary forward declaration within the file, let
us just move this ffa_features() earlier.

No funtional change.

Message-Id: <20240820-ffa_v1-2-v2-3-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:44 +01:00
Sudeep Holla
7c432a18ad firmware: arm_ffa: Update the FF-A command list with v1.2 additions
Arm Firmware Framework for A-profile(FFA) v1.2 introduces register based
discovery mechanism and direct messaging extensions that enables to target
specific UUID within a partition.

Let us add all the newly supported FF-A function IDs in the spec.
Also update to the error values and associated handling.

Message-Id: <20240820-ffa_v1-2-v2-2-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:44 +01:00
Sudeep Holla
fbbb0e5fd2 firmware: arm_ffa: Some coding style fixes
These changes fixes a set of below coding style issues:
1. spaces required around that '=' (ctx:VxW)
2. possible unnecessary 'out of memory' message
3. unnecessary for single statement blocks

Message-Id: <20240820-ffa_v1-2-v2-1-18c0c5f3c65e@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-20 15:40:44 +01:00
Cristian Marussi
1780e411ef firmware: arm_scmi: Use max-rx-timeout-ms from devicetree
Override default maximum RX timeout with the value picked from the
devicetree, when provided.

Suggested-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-4-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-18 20:22:16 +01:00
Cristian Marussi
668f0cb233 firmware: arm_scmi: Remove const from transport descriptors
The descriptor structure scmi_desc contains a variety of fields related to
the transport functionalities and it is defined by the transport drivers
themselves; such elements, though, serve varied purposes and have different
lifetime.

In particular, while there are some of those elements that provide a
description of transport features that are supposed to be immutable, on
the other side there are present also some other characteristics that are
instead supposed to be configurable on a per-platform base since they
represent configuration features tied to the specific hardware/firmware
system.

The immutable fields are already qualified as const on the their own; get
rid of the structure-level const qualifier which is not needed, so as to
enable possible runtime customization of the mutable configuration
features.

No functional change.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Message-Id: <20240730144707.1647025-2-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-18 20:22:16 +01:00
Krzysztof Kozlowski
a8bd37e645 firmware: arm_scmi: Simplify with scoped for each OF child loop
Use scoped for_each_child_of_node_scoped() when iterating over device
nodes to make code a bit simpler.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240816151407.155034-1-krzysztof.kozlowski@linaro.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-18 20:22:16 +01:00
Cristian Marussi
be9f086524 firmware: arm_scmi: Update various protocols versions
A few protocol versions had been increased with SCMI v3.2.
Update accordingly the supported version define in the kernel stack,
since all the mandatory base commands are indeed already supported.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240812174027.3931160-1-cristian.marussi@arm.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-16 10:26:58 +01:00
Cristian Marussi
fc789363c9 firmware: arm_scmi: Remove legacy transport-layer code
Since all SCMI transports have been made standalone drivers, remove all the
core SCMI stack legacy support that was needed to run transports as built
into the stack.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240812173340.3912830-10-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-16 10:26:58 +01:00
Cristian Marussi
20bda12a0e firmware: arm_scmi: Make VirtIO transport a standalone driver
Make SCMI VirtIO transport a standalone driver that can be optionally
loaded as a module.

CC: Michael S. Tsirkin <mst@redhat.com>
CC: Igor Skalkin <igor.skalkin@opensynergy.com>
CC: Peter Hilber <peter.hilber@opensynergy.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240812173340.3912830-9-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-16 10:26:58 +01:00
Cristian Marussi
db9cc5e677 firmware: arm_scmi: Make OPTEE transport a standalone driver
Make SCMI OPTEE transport a standalone driver that can be optionally
loaded as a module.

CC: Etienne Carriere <etienne.carriere@foss.st.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240812173340.3912830-8-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-16 10:26:58 +01:00
Cristian Marussi
a41759500b firmware: arm_scmi: Make SMC transport a standalone driver
Make SCMI SMC transport a standalone driver that can be optionally
loaded as a module.

CC: Peng Fan <peng.fan@nxp.com>
CC: Nikunj Kela <quic_nkela@quicinc.com>
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240812173340.3912830-7-cristian.marussi@arm.com>
[sudeep.holla: moved Clang Thumb2 build fix to the new makefile]
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-16 10:26:06 +01:00
Mukesh Ojha
d4d4049e41 firmware: qcom: scm: Add multiple download mode support
Currently, scm driver only supports full dump when download
mode is selected. Add support to enable minidump as well as
enable it along with fulldump.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240715155655.1811178-2-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:42 -05:00
Mukesh Ojha
c802b0a2ed firmware: qcom: scm: Refactor code to support multiple dload mode
Currently on Qualcomm SoC, download_mode is enabled if
CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is selected or
passed a boolean value from command line.

Refactor the code such that it supports multiple download
modes and drop CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT config
instead, give interface to set the download mode from
module parameter while being backword compatible at the
same time.

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240715155655.1811178-1-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:14:42 -05:00
Bjorn Andersson
3f780bba3f Merge branch 'drivers-fixes-for-6.11' into HEAD
Merge drivers-fixes-for-6.11 branch into drivers-for-6.12 to avoid the
(trivial) merge conflict occuring related to the qcom_pdm_domains
update.
2024-08-14 22:12:27 -05:00
Bartosz Golaszewski
1c753d001a firmware: qcom: tzmem: fix virtual-to-physical address conversion
We currently only correctly convert the virtual address passed by the
caller to qcom_tzmem_to_phys() if it corresponds to the base address of
the chunk. If the user wants to convert some pointer at an offset
relative to that base address, we'll return 0. Let's change the
implementation of qcom_tzmem_to_phys(): iterate over the chunks and try
to call gen_pool_virt_to_phys() just-in-time instead of trying to call
it only once when creating the chunk.

Fixes: 84f5a7b67b ("firmware: qcom: add a dedicated TrustZone buffer allocator")
Reported-by: Johan Hovold <johan+linaro@kernel.org>
Closes: https://lore.kernel.org/lkml/20240729095542.21097-1-johan+linaro@kernel.org/
Acked-by: Andrew Halaney <ahalaney@redhat.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240731-tzmem-efivars-fix-v2-1-f0e84071ec07@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:08:32 -05:00
Murali Nalajala
9960085a3a firmware: qcom: scm: Mark get_wq_ctx() as atomic call
Currently get_wq_ctx() is wrongly configured as a standard call. When two
SMC calls are in sleep and one SMC wakes up, it calls get_wq_ctx() to
resume the corresponding sleeping thread. But if get_wq_ctx() is
interrupted, goes to sleep and another SMC call is waiting to be allocated
a waitq context, it leads to a deadlock.

To avoid this get_wq_ctx() must be an atomic call and can't be a standard
SMC call. Hence mark get_wq_ctx() as a fast call.

Fixes: 6bf3259922 ("firmware: qcom: scm: Add wait-queue handling logic")
Cc: stable@vger.kernel.org
Signed-off-by: Murali Nalajala <quic_mnalajal@quicinc.com>
Signed-off-by: Unnathi Chalicheemala <quic_uchalich@quicinc.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240814223244.40081-1-quic_uchalich@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 22:08:28 -05:00
Mukesh Ojha
79cb2cb8d8 firmware: qcom: scm: Disable SDI and write no dump to dump mode
SDI is enabled for most of the Qualcomm SoCs and as per commit
ff4aa3bc98 ("firmware: qcom_scm: disable SDI if required")
it was recommended to disable SDI by mentioning it in device tree
to avoid hang during watchdog or during reboot.

However, for some cases if download mode tcsr register already
configured from boot firmware to collect dumps and if SDI is
disabled via means of mentioning it in device tree we could
still end up with dump collection. Disabling SDI alone is
not completely enough to disable dump mode and we also need to
zero out the bits download bits from tcsr register.

Current commit now, unconditionally call qcom_scm_set_download_mode()
based on download_mode flag, at max if TCSR register is not mentioned
or available for a SoC it will fallback to legacy way of setting
download mode through command which may be no-ops or return error
in case current firmware does not implements QCOM_SCM_INFO_IS_CALL_AVAIL
so, at worst it does nothing if it fails.

It also does to call SDI disable call if dload mode is disabled, which
looks fine to do as intention is to disable dump collection even if
system crashes.

Fixes: ff4aa3bc98 ("firmware: qcom_scm: disable SDI if required")
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Link: https://lore.kernel.org/r/20240708155332.4056479-1-quic_mojha@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-08-14 21:24:19 -05:00
Stefan Wahren
70c2cf283c firmware: raspberrypi: Improve timeout warning
Recent work on raspberry-power driver showed that even the
stacktrace on firmware property timeout doesn't provide
enough information. So add the first tag name to the warning
to be in line with a status error.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20240728114200.75559-2-wahrenst@gmx.net
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
2024-08-13 13:21:28 -07:00
Cristian Marussi
b53515fa17 firmware: arm_scmi: Make MBOX transport a standalone driver
Make SCMI mailbox transport a standalone driver that can be optionally
loaded as a module; while at it, create a dedicated subdirectory and
submenu for SCMI Transports.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240812173340.3912830-6-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-13 12:15:12 +01:00
Cristian Marussi
8b76a8c959 firmware: arm_scmi: Add support for standalone transport drivers
Extend the core SCMI stack with structures and methods to allow for
transports to be split out as standalone drivers, while still supporting
old style transports, defined as built into the SCMI core stack.

No functional change.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-Id: <20240812173340.3912830-5-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-13 12:15:12 +01:00
Cristian Marussi
b6b7c77c98 firmware: arm_scmi: Introduce packet handling helpers
Introduce a pair of structures initialized to contain all the existing
packet handling helpers, both for transports based on shared memory
and messages.

No functional change.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-Id: <20240812173340.3912830-4-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-13 12:15:12 +01:00
Peng Fan
1ebc28e935 firmware: arm_scmi: Introduce setup_shmem_iomap
To get the address of shmem could be generalized by introducing
setup_shmem_iomap. Then the duplicated code in mailbox.c, optee.c
and smc.c could be dropped.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
[ Cristian: use OF __free and make use of the new helper also in smc.c ]
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-Id: <20240812173340.3912830-3-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-13 12:15:12 +01:00
Cristian Marussi
e98dba934b firmware: arm_scmi: Fix double free in OPTEE transport
Channels can be shared between protocols, avoid freeing the same channel
descriptors twice when unloading the stack.

Fixes: 5f90f189a0 ("firmware: arm_scmi: Add optee transport")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Peng Fan <peng.fan@nxp.com>  #i.MX95 19x19 EVK
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-Id: <20240812173340.3912830-2-cristian.marussi@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-13 12:15:12 +01:00
Etienne Carriere
eedc060cff firmware: arm_scmi: Fix voltage description in failure cases
Reset the reception buffer max size when a voltage domain description
request fails, for example when the voltage domain returns an access
permission error (SCMI_ERR_ACCESS) unless what only a single 32bit
word is read back for the remaining voltage description requests
responses leading to invalid information. The side effect of this
issue is that the voltage regulators registered from those remaining
SCMI voltage domain were assigned a wrong regulator name.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240725065317.3758165-1-etienne.carriere@foss.st.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-09 14:21:51 +01:00
Luke Parkin
bd02b0737f firmware: arm_scmi: Add support to reset the debug metrics
It is sometimes useful to reset all these SCMI communication debug
metrics especially when we are interested in analysing these metrics
during a particular workload or for a fixed time duration. Let us
add the capability to reset all these metrics as once so that they
can be counted during the period of interest.

Signed-off-by: Luke Parkin <luke.parkin@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240805131013.587016-6-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-09 14:21:43 +01:00
Luke Parkin
f6a905eaf6 firmware: arm_scmi: Create debugfs files for SCMI communication debug metrics
Now that the basic support to collect the SCMI communication debug
metrics is in place, let us create debugfs files for the same so
that they are accessible to the users/debuggers.

Signed-off-by: Luke Parkin <luke.parkin@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240805131013.587016-5-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-09 14:21:35 +01:00
Luke Parkin
0b3d48c472 firmware: arm_scmi: Track basic SCMI communication debug metrics
Add the support for counting some of the SCMI communication debug metrics
like how many were sent successfully or with some errors, responses
received, notifications and delayed responses, transfer timeouts and
errors from the firmware/platform.

In many cases, the traces exists. But the traces are not always necessarily
enabled and getting such cumulative SCMI communication debug metrics helps
in understanding if there are any possible improvements that can be made
on either side of SCMI communication.

Signed-off-by: Luke Parkin <luke.parkin@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240805131013.587016-4-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-09 14:21:26 +01:00
Luke Parkin
1b18d4295f firmware: arm_scmi: Add support for debug metrics at the interface
Since SCMI involves interaction with the entity(software, firmware and/or
hardware) providing services or features, it is quite useful to track
certain metrics(for pure debugging purposes) like how many messages were
sent or received, were there any failures, what kind of failures, ..etc.

Add a new optional config option for the above purpose and the initial
support for counting such key debug metrics.

Signed-off-by: Luke Parkin <luke.parkin@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Message-Id: <20240805131013.587016-3-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-09 14:21:11 +01:00
Luke Parkin
20c9234d62 firmware: arm_scmi: Remove superfluous handle_to_scmi_info
Variable info is already defined in the outer code block and there is no
need to define the same again in the inner code block. Let us just remove
that duplicate definition of the variable info. No functional change.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Luke Parkin <luke.parkin@arm.com>
Message-Id: <20240805131013.587016-2-sudeep.holla@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-08-09 14:20:40 +01:00
Linus Torvalds
3894840a7a ARM updates for v6.11-rc1
- ftrace: don't assume stack frames are contiguous in memory
 - remove unused mod_inwind_map structure
 - spelling fixes
 - allow use of LD dead code/data elimination
 - fix callchain_trace() return value
 - add support for stackleak gcc plugin
 - correct some reset asm function prototypes for CFI
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEuNNh8scc2k/wOAE+9OeQG+StrGQFAmakrP8ACgkQ9OeQG+St
 rGRptA//Zr3FixLWZQ5FfHHaoEMAwIr76dwputg30Nvl4uFaYpc0XhksSfz3oSHM
 S/n2j4ognu9DZgEfoEUuCWgsZGBlt95Zrs1/XyD2aS6emXaL85QlCNlFtiRGUGUD
 i5uZyp7hnKjLixSGe+PZtSMHWId1+OQP4++EyAWPo5iejTgA61u7TWRYuP7Z8n93
 u2mKj2Zd4fHOiV5tUuT9gWovJqN9UiHRC+SVlm81bTftV/fAO0YZcMZDgRVa8KGx
 QheCYjJqS7ucDxvo8zIVbgQWdUobFwMZkLP049txv7zYGX888JF9ALY/Bb0GrwLg
 MUjxmiQMe7Rh775BUQP8zrhXnSEU4YDpeNCuPu72dAOvI0mOQXRB7HU43PQElHLV
 KuRAo4kTnjARGxfZ8B8kBACE63pOp7FemqGABPHx+//RDJDwgmzKv1NOKTWLBh6V
 bPxAmTm6VzqV5ft2c3+D+cWOUEG/ozgIwXdi1jUPlvjznxawjOkA9eWtaGeFIMAB
 cd8wH6cC6hOututO8ji+zOEo72zsnQe5Kre/0bTYIV7ggZpyR7rjc2i45TrUyMyS
 arvm4BLBJWM/t7rmCpKZKbtylkS5a4tzaXYFVcbdxPReGuxy6x5N50xFuHcbas5k
 I+Wkm+RohB2eXgp17Ap1N1fhjiAWfK5V+0LZ5KkrPg/01r/m6e0=
 =8sd2
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux

Pull ARM updates from Russell King:

 - ftrace: don't assume stack frames are contiguous in memory

 - remove unused mod_inwind_map structure

 - spelling fixes

 - allow use of LD dead code/data elimination

 - fix callchain_trace() return value

 - add support for stackleak gcc plugin

 - correct some reset asm function prototypes for CFI

[ Missed the merge window because Russell forgot to push out ]

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rmk/linux:
  ARM: 9408/1: mm: CFI: Fix some erroneous reset prototypes
  ARM: 9407/1: Add support for STACKLEAK gcc plugin
  ARM: 9406/1: Fix callchain_trace() return value
  ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION
  ARM: 9403/1: Alpine: Spelling s/initialiing/initializing/
  ARM: 9402/1: Kconfig: Spelling s/Cortex A-/Cortex-A/
  ARM: 9400/1: Remove unused struct 'mod_unwind_map'
2024-07-29 10:33:51 -07:00
Konrad Dybcio
e6b5a4c3ae firmware: qcom: scm: Allow QSEECOM on ThinkPad T14s
Add the aforementioned machine to the list to get e.g. efivars up.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20240719-topic-t14s_upstream-v1-2-d7d97fdebb28@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-07-28 22:04:31 -05:00
Linus Torvalds
c9f33436d8 RISC-V Patches for the 6.11 Merge Window, Part 2
* Support for NUMA (via SRAT and SLIT), console output (via SPCR), and
   cache info (via PPTT) on ACPI-based systems.
 * The trap entry/exit code no longer breaks the return address stack
   predictor on many systems, which results in an improvement to trap
   latency.
 * Support for HAVE_ARCH_STACKLEAK.
 * The sv39 linear map has been extended to support 128GiB mappings.
 * The frequency of the mtime CSR is now visible via hwprobe.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmaj2EYTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRAuExnzX7sYiVG3D/9kNHTI09iPDJd6fTChE3cpMxy7xXXE
 URX3Avu+gYsJmIbYyg4RnQ8FGFN7icKBCrQqs7JmLliU0NU+YMcCcjsJA2QaivbD
 VAlaex1qNcvNGteHrpbqhr3Zs4zw8GlBkB3KFTLyPAp61bybGo0a/A5ONJ7ScQIW
 RWHewAPgb86cQ0Q34JpO87TqvMM0KMvhQP5dip+olaFjLRBzhXmGFZfHqA80kTWl
 0ytYclVCHZMtO/5mnQpuIOVs1IKw9L4wa0sivOQF0iLTqfKDFALa6yZsThHA/w3e
 JVuBAdQhcPZ3fgO2fUfJPlW16GmRC2/tdiFg5NFw8k4vo7DYBwX55ztPKXqDrJDM
 8ah85IeLiPar/A/uHdn6bPjK+aGMuzklKF50r62XXAc2fL8mza1sdvKCVOy2EOLn
 JyGI9c/10KpvN/DW8g7hPefhvbx4+tCKkFcPqf++VQha6W8cQdCKi+Li0Pm8TTnp
 XPQjIvSlDDG1Pl4ofgBSFoyB8pkBXNzvv8NZp+YYtnqSOLAKaZuP+KwA8TwHdvGM
 pdCXcL3KHiLy4/pJWEoNTutD0mbJ7PUIb2P/KkjqYDgp4F1n0Hg+/aeSIp+7a4Pv
 yTBctIGxrlriQMIdtWCR8tyhcPP4pDpGYkW0K15EE16G0NK0fjD89LEXYqT6ae2R
 C0QgiwnVe/eopg==
 =zeUn
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.11-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull more RISC-V updates from Palmer Dabbelt:

 - Support for NUMA (via SRAT and SLIT), console output (via SPCR), and
   cache info (via PPTT) on ACPI-based systems.

 - The trap entry/exit code no longer breaks the return address stack
   predictor on many systems, which results in an improvement to trap
   latency.

 - Support for HAVE_ARCH_STACKLEAK.

 - The sv39 linear map has been extended to support 128GiB mappings.

 - The frequency of the mtime CSR is now visible via hwprobe.

* tag 'riscv-for-linus-6.11-mw2' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (21 commits)
  RISC-V: Provide the frequency of time CSR via hwprobe
  riscv: Extend sv39 linear mapping max size to 128G
  riscv: enable HAVE_ARCH_STACKLEAK
  riscv: signal: Remove unlikely() from WARN_ON() condition
  riscv: Improve exception and system call latency
  RISC-V: Select ACPI PPTT drivers
  riscv: cacheinfo: initialize cacheinfo's level and type from ACPI PPTT
  riscv: cacheinfo: remove the useless input parameter (node) of ci_leaf_init()
  RISC-V: ACPI: Enable SPCR table for console output on RISC-V
  riscv: boot: remove duplicated targets line
  trace: riscv: Remove deprecated kprobe on ftrace support
  riscv: cpufeature: Extract common elements from extension checking
  riscv: Introduce vendor variants of extension helpers
  riscv: Add vendor extensions to /proc/cpuinfo
  riscv: Extend cpufeature.c to detect vendor extensions
  RISC-V: run savedefconfig for defconfig
  RISC-V: hwprobe: sort EXT_KEY()s in hwprobe_isa_ext0() alphabetically
  ACPI: NUMA: replace pr_info with pr_debug in arch_acpi_numa_init
  ACPI: NUMA: change the ACPI_NUMA to a hidden option
  ACPI: NUMA: Add handler for SRAT RINTC affinity structure
  ...
2024-07-27 10:14:34 -07:00
Jisheng Zhang
b5db73fb18
riscv: enable HAVE_ARCH_STACKLEAK
Add support for the stackleak feature. Whenever the kernel returns to user
space the kernel stack is filled with a poison value.

At the same time, disables the plugin in EFI stub code because EFI stub
is out of scope for the protection.

Tested on qemu and milkv duo:
/ # echo STACKLEAK_ERASING > /sys/kernel/debug/provoke-crash/DIRECT
[   38.675575] lkdtm: Performing direct entry STACKLEAK_ERASING
[   38.678448] lkdtm: stackleak stack usage:
[   38.678448]   high offset: 288 bytes
[   38.678448]   current:     496 bytes
[   38.678448]   lowest:      1328 bytes
[   38.678448]   tracked:     1328 bytes
[   38.678448]   untracked:   448 bytes
[   38.678448]   poisoned:    14312 bytes
[   38.678448]   low offset:  8 bytes
[   38.689887] lkdtm: OK: the rest of the thread stack is properly erased

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240623235316.2010-1-jszhang@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-07-26 05:50:47 -07:00
Linus Torvalds
bba959f477 EFI fixes for v6.11 #1
- Wipe screen_info after allocating it from the heap - used by arm32 and
   EFI zboot, other EFI architectures allocate it statically
 
 - Revert to allocating boot_params from the heap on x86 when entering
   via the native PE entrypoint, to work around a regression on older
   Dell hardware
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZqDiNgAKCRAwbglWLn0t
 XBU/AQC1Qm7UFhBR6agbR1WMGcrmByR99t9bLNqOFHZxAJIvfQEAgCXcO3LpLfG5
 SfCAZFIdwoK48Avdq2OBktz82JKXgQ8=
 =ujzu
 -----END PGP SIGNATURE-----

Merge tag 'efi-fixes-for-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fixes from Ard Biesheuvel:

 - Wipe screen_info after allocating it from the heap - used by arm32
   and EFI zboot, other EFI architectures allocate it statically

 - Revert to allocating boot_params from the heap on x86 when entering
   via the native PE entrypoint, to work around a regression on older
   Dell hardware

* tag 'efi-fixes-for-v6.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  x86/efistub: Revert to heap allocated boot_params for PE entrypoint
  efi/libstub: Zero initialize heap allocated struct screen_info
2024-07-25 12:55:21 -07:00
Linus Torvalds
c2a96b7f18 Driver core changes for 6.11-rc1
Here is the big set of driver core changes for 6.11-rc1.
 
 Lots of stuff in here, with not a huge diffstat, but apis are evolving
 which required lots of files to be touched.  Highlights of the changes
 in here are:
   - platform remove callback api final fixups (Uwe took many releases to
     get here, finally!)
   - Rust bindings for basic firmware apis and initial driver-core
     interactions.  It's not all that useful for a "write a whole driver
     in rust" type of thing, but the firmware bindings do help out the
     phy rust drivers, and the driver core bindings give a solid base on
     which others can start their work.  There is still a long way to go
     here before we have a multitude of rust drivers being added, but
     it's a great first step.
   - driver core const api changes.  This reached across all bus types,
     and there are some fix-ups for some not-common bus types that
     linux-next and 0-day testing shook out.  This work is being done to
     help make the rust bindings more safe, as well as the C code, moving
     toward the end-goal of allowing us to put driver structures into
     read-only memory.  We aren't there yet, but are getting closer.
   - minor devres cleanups and fixes found by code inspection
   - arch_topology minor changes
   - other minor driver core cleanups
 
 All of these have been in linux-next for a very long time with no
 reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZqH+aQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ymoOQCfVBdLcBjEDAGh3L8qHRGMPy4rV2EAoL/r+zKm
 cJEYtJpGtWX6aAtugm9E
 =ZyJV
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core updates from Greg KH:
 "Here is the big set of driver core changes for 6.11-rc1.

  Lots of stuff in here, with not a huge diffstat, but apis are evolving
  which required lots of files to be touched. Highlights of the changes
  in here are:

   - platform remove callback api final fixups (Uwe took many releases
     to get here, finally!)

   - Rust bindings for basic firmware apis and initial driver-core
     interactions.

     It's not all that useful for a "write a whole driver in rust" type
     of thing, but the firmware bindings do help out the phy rust
     drivers, and the driver core bindings give a solid base on which
     others can start their work.

     There is still a long way to go here before we have a multitude of
     rust drivers being added, but it's a great first step.

   - driver core const api changes.

     This reached across all bus types, and there are some fix-ups for
     some not-common bus types that linux-next and 0-day testing shook
     out.

     This work is being done to help make the rust bindings more safe,
     as well as the C code, moving toward the end-goal of allowing us to
     put driver structures into read-only memory. We aren't there yet,
     but are getting closer.

   - minor devres cleanups and fixes found by code inspection

   - arch_topology minor changes

   - other minor driver core cleanups

  All of these have been in linux-next for a very long time with no
  reported problems"

* tag 'driver-core-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (55 commits)
  ARM: sa1100: make match function take a const pointer
  sysfs/cpu: Make crash_hotplug attribute world-readable
  dio: Have dio_bus_match() callback take a const *
  zorro: make match function take a const pointer
  driver core: module: make module_[add|remove]_driver take a const *
  driver core: make driver_find_device() take a const *
  driver core: make driver_[create|remove]_file take a const *
  firmware_loader: fix soundness issue in `request_internal`
  firmware_loader: annotate doctests as `no_run`
  devres: Correct code style for functions that return a pointer type
  devres: Initialize an uninitialized struct member
  devres: Fix memory leakage caused by driver API devm_free_percpu()
  devres: Fix devm_krealloc() wasting memory
  driver core: platform: Switch to use kmemdup_array()
  driver core: have match() callback in struct bus_type take a const *
  MAINTAINERS: add Rust device abstractions to DRIVER CORE
  device: rust: improve safety comments
  MAINTAINERS: add Danilo as FIRMWARE LOADER maintainer
  MAINTAINERS: add Rust FW abstractions to FIRMWARE LOADER
  firmware: rust: improve safety comments
  ...
2024-07-25 10:42:22 -07:00
Linus Torvalds
a362ade892 LoongArch changes for v6.11
1, Define __ARCH_WANT_NEW_STAT in unistd.h;
 2, Always enumerate MADT and setup logical-physical CPU mapping;
 3, Add irq_work support via self IPIs;
 4, Add RANDOMIZE_KSTACK_OFFSET support;
 5, Add ARCH_HAS_PTE_DEVMAP support;
 6, Add ARCH_HAS_DEBUG_VM_PGTABLE support;
 7, Add writecombine support for DMW-based ioremap();
 8, Add architectural preparation for CPUFreq;
 9, Add ACPI standard hardware register based S3 support;
 10, Add support for relocating the kernel with RELR relocation;
 11, Some bug fixes and other small changes.
 -----BEGIN PGP SIGNATURE-----
 
 iQJKBAABCAA0FiEEzOlt8mkP+tbeiYy5AoYrw/LiJnoFAmabzOsWHGNoZW5odWFj
 YWlAa2VybmVsLm9yZwAKCRAChivD8uImeqssD/9AG3WGb25R4IvgnZYuRCxpXsLk
 Qrj4YSPazaTLrQBWk1g+KqcBLe+jZV4zmnz0H93qoOpyMDwsmExugDug7QCKiBl1
 olVZ0CeQ6dyMHAnFjTgy29KcyJRFith4jXFGq6kpNa80pezsXz7b869GkLZflZfy
 W9hALfcaxB4kx+z4HXblbOIsfzVwh2eBD/nkWukBG28CPMQ7pV4TtejIqSd9kDC5
 LQjVQhjyrDgR3EPJEzr+48/hgFB6cZ8fmfv5JVTu+rQMngUldxDijj8xfoIUgIjN
 2khFc2Orx5RVyIuBxtLKWf70HD9xXC0fqUVjFEn0Yn5i1JVLoMdqjownSWvPy3t7
 z3V0E0VaYUdLgA3GeA5Fw1uZbORlocAZbA5B8bXY2foNfwPwLlGpNiyNiqx5kQmQ
 O+9jQJqdrZZ18wXEW8sR8AnT5+lzIQdv1GlkYt2f5a1rjMZwHtPZI4aPRDojPo/3
 Fv0Q1+2XVnbPngzJJz9tlYCzt5iuY9z7DwsnbEBSiLZRapJ9ZECmJjSGnnR/fLLS
 ifdyooua8bviMwzmUEmfSgPRHyTZs+BjkD7AQ4xyRDAv0T2d9sDwkAWYBcViTslF
 awe6+x+zn6yXekhiloN8L+3HJ67bYojXmLciNqvFcVtSNgJQpXBjLDO9orCbNqmw
 ISxNA0GbR+eWGMdvCA==
 =bla1
 -----END PGP SIGNATURE-----

Merge tag 'loongarch-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson

Pull LoongArch updates from Huacai Chen:

 - Define __ARCH_WANT_NEW_STAT in unistd.h

 - Always enumerate MADT and setup logical-physical CPU mapping

 - Add irq_work support via self IPIs

 - Add RANDOMIZE_KSTACK_OFFSET support

 - Add ARCH_HAS_PTE_DEVMAP support

 - Add ARCH_HAS_DEBUG_VM_PGTABLE support

 - Add writecombine support for DMW-based ioremap()

 - Add architectural preparation for CPUFreq

 - Add ACPI standard hardware register based S3 support

 - Add support for relocating the kernel with RELR relocation

 - Some bug fixes and other small changes

* tag 'loongarch-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
  LoongArch: Make the users of larch_insn_gen_break() constant
  LoongArch: Check TIF_LOAD_WATCH to enable user space watchpoint
  LoongArch: Use rustc option -Zdirect-access-external-data
  LoongArch: Add support for relocating the kernel with RELR relocation
  LoongArch: Remove a redundant checking in relocator
  LoongArch: Use correct API to map cmdline in relocate_kernel()
  LoongArch: Automatically disable KASLR for hibernation
  LoongArch: Add ACPI standard hardware register based S3 support
  LoongArch: Add architectural preparation for CPUFreq
  LoongArch: Add writecombine support for DMW-based ioremap()
  LoongArch: Add ARCH_HAS_DEBUG_VM_PGTABLE support
  LoongArch: Add ARCH_HAS_PTE_DEVMAP support
  LoongArch: Add RANDOMIZE_KSTACK_OFFSET support
  LoongArch: Add irq_work support via self IPIs
  LoongArch: Always enumerate MADT and setup logical-physical CPU mapping
  LoongArch: Define __ARCH_WANT_NEW_STAT in unistd.h
2024-07-22 13:44:22 -07:00
Linus Torvalds
f557af081d RISC-V Patches for the 6.11 Merge Window, Part 1
* Support for various new ISA extensions:
     * The Zve32[xf] and Zve64[xfd] sub-extensios of the vector
       extension.
     * Zimop and Zcmop for may-be-operations.
     * The Zca, Zcf, Zcd and Zcb sub-extensions of the C extension.
     * Zawrs,
 * riscv,cpu-intc is now dtschema.
 * A handful of performance improvements and cleanups to text patching.
 * Support for memory hot{,un}plug
 * The highest user-allocatable virtual address is now visible in
   hwprobe.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmabIGETHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRAuExnzX7sYiQe8D/9QPCaOnoP5OCZbwjkRBwaVxyknNyD0
 l+YNXk7Jk3B/oaOv3d7Bz+uWt1SG4j4jkfyuGJ81StZykp4/R7T823TZrPhog9VX
 IJm580MtvE49I2i1qJ+ZQti9wpiM+80lFnyMCzY6S7rrM9m62tKgUpARZcWoA55P
 iUo5bku99TYCcU2k1pnPrNSPQvVpECpv7tG0PwKpQd5DiYjbPp+aw5cQWN+izdOB
 6raOZ0buzP7McszvO/gcJs+kuHwrp0JSRvNxc2pwYZ0lx00p3hSV8UdtIMlI9Qm/
 z3gkQGHwc6UVMPHo1x0Gr5ShUTCI/iSwy4/7aY4NNXF6Sj99b8alt9GcbYqNAE7V
 k7sibCR7dhL4ods/GFMmzR7cQYlwlwtO+/ILak7rXhNvA32Xy1WUABguhP9ElTmw
 1ZS2hnRv6wc7MA2V7HBamf5mPXM6HQyC3oKy3njzDSJdiGIG7aa+TOfRAD+L/1Du
 QjIrKp6XcPIsZNjh8H3nMDVJ0VvDNnS4d4LbfNQc23VPzf57kFUqbli1pS0hBjFT
 ELEItH9dgSx+T5Qebdy/QMC3RG8Yc1IUdw6VQ7Jny/uCCEZNq+VZ+bXxspMmswCp
 sUIyDplJTJfRt3G2OxK0b95x6oj8jbaJOQfv6PBF71dDBsChg8eXFVJ2NDrX4Bvr
 h2MPK7vGBtFz8w==
 =+ICi
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.11-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V updates from Palmer Dabbelt:

 - Support for various new ISA extensions:
     * The Zve32[xf] and Zve64[xfd] sub-extensios of the vector
       extension
     * Zimop and Zcmop for may-be-operations
     * The Zca, Zcf, Zcd and Zcb sub-extensions of the C extension
     * Zawrs

 - riscv,cpu-intc is now dtschema

 - A handful of performance improvements and cleanups to text patching

 - Support for memory hot{,un}plug

 - The highest user-allocatable virtual address is now visible in
   hwprobe

* tag 'riscv-for-linus-6.11-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (58 commits)
  riscv: lib: relax assembly constraints in hweight
  riscv: set trap vector earlier
  KVM: riscv: selftests: Add Zawrs extension to get-reg-list test
  KVM: riscv: Support guest wrs.nto
  riscv: hwprobe: export Zawrs ISA extension
  riscv: Add Zawrs support for spinlocks
  dt-bindings: riscv: Add Zawrs ISA extension description
  riscv: Provide a definition for 'pause'
  riscv: hwprobe: export highest virtual userspace address
  riscv: Improve sbi_ecall() code generation by reordering arguments
  riscv: Add tracepoints for SBI calls and returns
  riscv: Optimize crc32 with Zbc extension
  riscv: Enable DAX VMEMMAP optimization
  riscv: mm: Add support for ZONE_DEVICE
  virtio-mem: Enable virtio-mem for RISC-V
  riscv: Enable memory hotplugging for RISC-V
  riscv: mm: Take memory hotplug read-lock during kernel page table dump
  riscv: mm: Add memory hotplugging support
  riscv: mm: Add pfn_to_kaddr() implementation
  riscv: mm: Refactor create_linear_mapping_range() for memory hot add
  ...
2024-07-20 09:11:27 -07:00
Huacai Chen
8e02c3b782 LoongArch: Add writecombine support for DMW-based ioremap()
Currently, only TLB-based ioremap() support writecombine, so add the
counterpart for DMW-based ioremap() with help of DMW2. The base address
(WRITECOMBINE_BASE) is configured as 0xa000000000000000.

DMW3 is unused by kernel now, however firmware may leave garbage in them
and interfere kernel's address mapping. So clear it as necessary.

BTW, centralize the DMW configuration to macro SETUP_DMWINS.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-07-20 22:40:59 +08:00
Linus Torvalds
12cc3d5389 sound updates for 6.11-rc1
Lots of changes in this cycle, but mostly for cleanups and
 refactoring.  Significant amount of changes are about DT schema
 conversions for ASoC at this time while we see other usual
 suspects, too.  Some highlights below:
 
 Core:
 - Re-introduction of PCM sync ID support API
 - MIDI2 time-base extension in ALSA sequencer API
 
 ASoC:
 - Syncing of features between simple-audio-card and the two
   audio-graph cards
 - Support for specifying the order of operations for components
   within cards to allow quirking for unusual systems
 - Lots of DT schema conversions
 - Continued SOF/Intel updates for topology, SoundWire, IPC3/4
 - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest
   Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS
   v2.5 and WCD937x, Realtek RT1318 and RT1320 and Texas
   Instruments PCM5242
 
 HD-audio:
 - More quirks, Intel PantherLake support, senarytech codec support
 - Refactoring of Cirrus codec component-binding
 
 Others:
 - ALSA control kselftest improvements, and fixes for input value
   checks in various drivers
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmaZNdoOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/PWw//XYFQ2v+bc0x62LI1rIEt1/mSz6R1moHf85fK
 CjDOvHoGlZEkXuTmycK8b522/9tslHyE+8P97TZAy/6ph/yT44JgwQaadAvTZdWK
 eKrchogf+v6DaQar8+nmXp8409HBcfJdrSJth2xR5OhY741/kGBF1/YCBHZaIQan
 T87ag0tu1PVWQuLhdRlghkNYds+oaSX6wMaLRzVYI2TFYfHZOWYfVYd/NACb8KtO
 z66TqybOxOpq4xCi+umNaGn2TxdDvo427JgioAKzcGLodowRKmqNV+mXddfrhBEE
 Fwq4o8YGxgX+oaNn4aLQdrrREc1tuwQj0Kwpt/rkh4ESTgugcElq5hJCgPY8U3Ej
 5+ih7ZeIojKnfjNivHuath7tXe1inqPEK3RBt3qMoUldIxNhJ8WfIF0RNzW/QRY2
 g4JAI/4lswqPz6vYKULatDk+ZEW6PiV72kwW+4Vt7NxZnn9VFzP27qHuwkUHP5HM
 0q4/NKrv+MFPedOLEeEm/1dmE7NRT4tRJuIV+RwMJ0cyP4l2jSCwyDpxfkFqGitc
 wB0AXK3YLwISlKjziCox1cAex8F2XhjCdpOyOV6hTc3Dv/DySMHysv+4Uf4/kvst
 3GrqdkMHy4cEUYj/Sj+VunfColsX2KnQAN+e4Sonn+5nPsw7ypGkpM1Kf+wTQuNK
 EoxpzGo=
 =hn0h
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "Lots of changes in this cycle, but mostly for cleanups and
  refactoring.

  Significant amount of changes are about DT schema conversions for ASoC
  at this time while we see other usual suspects, too.

  Some highlights below:

  Core:
   - Re-introduction of PCM sync ID support API
   - MIDI2 time-base extension in ALSA sequencer API

  ASoC:
   - Syncing of features between simple-audio-card and the two
     audio-graph cards
   - Support for specifying the order of operations for components
     within cards to allow quirking for unusual systems
   - Lots of DT schema conversions
   - Continued SOF/Intel updates for topology, SoundWire, IPC3/4
   - New support for Asahi Kasei AK4619, Cirrus Logic CS530x, Everest
     Semiconductors ES8311, NXP i.MX95 and LPC32xx, Qualcomm LPASS v2.5
     and WCD937x, Realtek RT1318 and RT1320 and Texas Instruments
     PCM5242

  HD-audio:
   - More quirks, Intel PantherLake support, senarytech codec support
   - Refactoring of Cirrus codec component-binding

  Others:
   - ALSA control kselftest improvements, and fixes for input value
     checks in various drivers"

* tag 'sound-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (349 commits)
  kselftest/alsa: Log the PCM ID in pcm-test
  kselftest/alsa: Use card name rather than number in test names
  ALSA: hda/realtek: Fix the speaker output on Samsung Galaxy Book Pro 360
  ALSA: hda/tas2781: Add new quirk for Lenovo Hera2 Laptop
  ALSA: seq: ump: Skip useless ports for static blocks
  ALSA: pcm_dmaengine: Don't synchronize DMA channel when DMA is paused
  ALSA: usb: Use BIT() for bit values
  ALSA: usb: Fix UBSAN warning in parse_audio_unit()
  ALSA: hda/realtek: Enable headset mic on Positivo SU C1400
  ASoC: tas2781: Add new Kontrol to set tas2563 digital Volume
  ASoC: codecs: wcd937x: Remove separate handling for vdd-buck supply
  ASoC: codecs: wcd937x: Remove the string compare in MIC BIAS widget settings
  ASoC: codecs: wcd937x-sdw: Fix Unbalanced pm_runtime_enable
  ASoC: dt-bindings: cirrus,cs42xx8: Convert to dtschema
  ASoC: cs530x: Remove bclk from private structure
  ASoC: cs530x: Calculate proper bclk rate using TDM
  ASoC: dt-bindings: cirrus,cs4270: Convert to dtschema
  firmware: cs_dsp: Rename fw_ver to wmfw_ver
  firmware: cs_dsp: Clarify wmfw format version log message
  firmware: cs_dsp: Make wmfw and bin filename arguments const char *
  ...
2024-07-19 12:39:34 -07:00
Linus Torvalds
f4f92db439 virtio: features, fixes, cleanups
Several new features here:
 
 - Virtio find vqs API has been reworked
   (required to fix the scalability issue we have with
    adminq, which I hope to merge later in the cycle)
 
 - vDPA driver for Marvell OCTEON
 
 - virtio fs performance improvement
 
 - mlx5 migration speedups
 
 Fixes, cleanups all over the place.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmaXjQQPHG1zdEByZWRo
 YXQuY29tAAoJECgfDbjSjVRpnIsH/jVNqAQbe/vaBQdNMdnsA+P9A9unLbYRxYCQ
 tN73mQRIXKtnZHBRAEbMGq52HPYg8HlN2HJSgyNo6I6t8VD+PiOco7m+3GpmqEcW
 aXPOPl0BAbVoDgyutxRuuodP8Z61lBx0mG6iOxpzTXOPGlpQqtPCFHO8YnodqnPf
 tMix/5uAqgZKV2siCbw5DtzwEc0gDHU8qsD0/nyoS5nBDF9yh/ardr5P/qiyFDQH
 atCNYTOhIFU83pLAaw0fpCGbkt7gxf+5RpWVx3wkYww+/MwvYhsveRvQyaGbBz3n
 WDtET3SOtVTta98OAGIKCq/2z8f6mYXBP7vXapBgnJG3vwS/poQ=
 =LYua
 -----END PGP SIGNATURE-----

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull virtio updates from Michael Tsirkin:
 "Several new features here:

   - Virtio find vqs API has been reworked (required to fix the
     scalability issue we have with adminq, which I hope to merge later
     in the cycle)

   - vDPA driver for Marvell OCTEON

   - virtio fs performance improvement

   - mlx5 migration speedups

  Fixes, cleanups all over the place"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (56 commits)
  virtio: rename virtio_find_vqs_info() to virtio_find_vqs()
  virtio: remove unused virtio_find_vqs() and virtio_find_vqs_ctx() helpers
  virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info()
  virtio_balloon: convert to use virtio_find_vqs_info()
  virtiofs: convert to use virtio_find_vqs_info()
  scsi: virtio_scsi: convert to use virtio_find_vqs_info()
  virtio_net: convert to use virtio_find_vqs_info()
  virtio_crypto: convert to use virtio_find_vqs_info()
  virtio_console: convert to use virtio_find_vqs_info()
  virtio_blk: convert to use virtio_find_vqs_info()
  virtio: rename find_vqs_info() op to find_vqs()
  virtio: remove the original find_vqs() op
  virtio: call virtio_find_vqs_info() from virtio_find_single_vq() directly
  virtio: convert find_vqs() op implementations to find_vqs_info()
  virtio_pci: convert vp_*find_vqs() ops to find_vqs_info()
  virtio: introduce virtio_queue_info struct and find_vqs_info() config op
  virtio: make virtio_find_single_vq() call virtio_find_vqs()
  virtio: make virtio_find_vqs() call virtio_find_vqs_ctx()
  caif_virtio: use virtio_find_single_vq() for single virtqueue finding
  vdpa/mlx5: Don't enable non-active VQs in .set_vq_ready()
  ...
2024-07-19 11:57:55 -07:00
Ard Biesheuvel
ae835a96d7 x86/efistub: Revert to heap allocated boot_params for PE entrypoint
This is a partial revert of commit

  8117961d98 ("x86/efi: Disregard setup header of loaded image")

which triggers boot issues on older Dell laptops. As it turns out,
switching back to a heap allocation for the struct boot_params
constructed by the EFI stub works around this, even though it is unclear
why.

Cc: Christian Heusel <christian@heusel.eu>
Reported-by: <mavrix#kernel@simplelogin.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-18 23:05:02 +02:00
Linus Torvalds
1200af3ac1 - New Drivers
- Add support for ROHM BD96801 Power Management IC
    - Add support for Cirrus Logic CS40L50 Haptic Driver with Waveform Memory
    - Add support for Marvell 88PM886 Power Management IC
 
  - New Device Support
    - Add support for Keyboard Backlight to ChromeOS Embedded Controller
    - Add support for LEDs to ChromeOS Embedded Controller
    - Add support for Charge Control to ChromeOS Embedded Controller
    - Add support for the HW Monitoring Service to ChromeOS Embedded Controller
    - Add support for AUXADCs to MediaTek MT635{7,8,9} Power Management ICs
 
  - New Functionality
    - Allow Syscon consumers to supply their own Regmaps on registration
 
  - Fix-ups
    - Constify/staticise applicable data structures
    - Remove superfluous/duplicated/unused sections
    - Device Tree binding adaptions/conversions/creation
    - Trivial; spelling, whitespace, coding-style adaptions
    - Utilise centrally provided helpers and macros to aid simplicity/duplication
    - Drop i2c_device_id::driver_data where the value is unused
    - Replace ACPI/DT firmware helpers with agnostic variants
    - Move over to GPIOD (descriptor-based) APIs
    - Annotate a bunch of __counted_by() cases
    - Straighten out some includes
 
  - Bug Fixes
    - Ensure potentially asserted recent lines are deasserted during initialisation
    - Avoid "<module>.ko is added to multiple modules" warnings
    - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings
    - Fix Wvoid-pointer-to-enum-cast warnings
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmaWf6sACgkQUa+KL4f8
 d2HhAw//UMujhKk/IfzGck3RoaKH3H22oVpd98BpzJCZBKSpl9pGsumHCicBMVAK
 gp8SuwKNCAX+Fa/TubHz0xH6FWxLFXezh5DvO1t1DrPNokG+u4QPTfgMJ1IfBMHO
 w7aL74rtJEyWBeod4+qNVoq6KNDaWjiWQlxGQ+9IoSNmxSTL6pkYMqo935RnqhRr
 nm2TfSOIshk4tiO9tVA1ecCgjVwsG51803hypmd1AH6qBb7JsY6k1HWukLGaqUiV
 +57oQzCTPIRYJhYdca06xi4ZmPg2kmoYKlxqW5ExyM7Mxs9aZZzwwZ7929LKXC6o
 ebAPDc3auoww7B5mHbbVuBj0gDZKtfXpBRKSHLNtmhi0xmjnwZxQIumkpVGQALkI
 0TQffgYVU4O7IXsAZG9w5igyMzEo9SZJMyrfFaQ0iB3rx5bXuh4b6btfewAkyI1H
 +o3Yjymf4CR1trY9qnWCGWM/COQLIiGRhsk/RqGjy0xtpQo1Skx+AIkc6QD2zl6Y
 ohC0JzEWTQe7c1DOM3SLpNoCb/GbFpVi0RrXRVfRltPHpVb/r54Zlbo+PrCaC8FB
 EkU+86XbxGMh7hLtz5yhmnNCWKHQ6jbaFESwtZLo4d42CKvZaobL4xVCL56OntsH
 ikmTNG+X0mUAZiCwGgK5OhEVCAtCcjRtz1U93wgDBaz7Y39z+yM=
 =DSjk
 -----END PGP SIGNATURE-----

Merge tag 'mfd-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd

Pull MFD updates from Lee Jones:
 "New Drivers:
   - ROHM BD96801 Power Management IC
   - Cirrus Logic CS40L50 Haptic Driver with Waveform Memory
   - Marvell 88PM886 Power Management IC

  New Device Support:
   - Keyboard Backlight to ChromeOS Embedded Controller
   - LEDs to ChromeOS Embedded Controller
   - Charge Control to ChromeOS Embedded Controller
   - HW Monitoring Service to ChromeOS Embedded Controller
   - AUXADCs to MediaTek MT635{7,8,9} Power Management ICs

  New Functionality:
   - Allow Syscon consumers to supply their own Regmaps on registration

  Fix-ups:
   - Constify/staticise applicable data structures
   - Remove superfluous/duplicated/unused sections
   - Device Tree binding adaptions/conversions/creation
   - Trivial; spelling, whitespace, coding-style adaptions
   - Utilise centrally provided helpers and macros to aid
     simplicity/duplication
   - Drop i2c_device_id::driver_data where the value is unused
   - Replace ACPI/DT firmware helpers with agnostic variants
   - Move over to GPIOD (descriptor-based) APIs
   - Annotate a bunch of __counted_by() cases
   - Straighten out some includes

  Bug Fixes:
   - Ensure potentially asserted recent lines are deasserted during
     initialisation
   - Avoid "<module>.ko is added to multiple modules" warnings
   - Supply a bunch of MODULE_DESCRIPTIONs to silence modpost warnings
   - Fix Wvoid-pointer-to-enum-cast warnings"

* tag 'mfd-next-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (87 commits)
  mfd: timberdale: Attach device properties to TSC2007 board info
  mfd: tmio: Move header to platform_data
  mfd: tmio: Sanitize comments
  mfd: tmio: Update include files
  mmc: tmio/sdhi: Fix includes
  mfd: tmio: Remove obsolete io accessors
  mfd: tmio: Remove obsolete platform_data
  watchdog: bd96801_wdt: Add missing include for FIELD_*()
  dt-bindings: mfd: syscon: Add APM poweroff mailbox
  dt-bindings: mfd: syscon: Split and enforce documenting MFD children
  dt-bindings: mfd: rk817: Merge support for RK809
  dt-bindings: mfd: rk817: Fixup clocks and reference dai-common
  dt-bindings: mfd: syscon: Add TI's opp table compatible
  mfd: omap-usb-tll: Use struct_size to allocate tll
  dt-bindings: mfd: Explain lack of child dependency in simple-mfd
  dt-bindings: mfd: Dual licensing for st,stpmic1 bindings
  mfd: omap-usb-tll: Annotate struct usbtll_omap with __counted_by
  mfd: tps6594-core: Remove unneeded semicolon in tps6594_check_crc_mode()
  mfd: lm3533: Move to new GPIO descriptor-based APIs
  mfd: tps65912: Use devm helper functions to simplify probe
  ...
2024-07-17 17:42:20 -07:00
Qiang Ma
ee8b8f5d83 efi/libstub: Zero initialize heap allocated struct screen_info
After calling uefi interface allocate_pool to apply for memory, we
should clear 0 to prevent the possibility of using random values.

Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Cc: <stable@vger.kernel.org> # v6.6+
Fixes: 732ea9db9d ("efi: libstub: Move screen_info handling to common code")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-17 22:51:20 +02:00
Jiri Pirko
6c85d6b653 virtio: rename virtio_find_vqs_info() to virtio_find_vqs()
Since the original virtio_find_vqs() is no longer present, rename
virtio_find_vqs_info() back to virtio_find_vqs().

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Message-Id: <20240708074814.1739223-20-jiri@resnulli.us>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-07-17 05:20:58 -04:00
Jiri Pirko
c95e67bac4 virtio: convert the rest virtio_find_vqs() users to virtio_find_vqs_info()
Instead of passing separate names and callbacks arrays
to virtio_find_vqs(), have one of virtual_queue_info structs and
pass it to virtio_find_vqs_info().

Suggested-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Message-Id: <20240708074814.1739223-18-jiri@resnulli.us>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-07-17 05:20:58 -04:00
Linus Torvalds
9de4ad3bde firmware: qcom: tzmem: don't ask about allocator mode when not enabled
The Qualcomm firmware code shouldn't ask about what memory allocator
mode should be used when the code isn't even enabled.

Get rid of pointless config-time question.

Link: https://lore.kernel.org/all/CAHk-=wg+38EHPKGou1MqXwAAXC30cM8sMgZAGnZ7TcFO4L9J2w@mail.gmail.com/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-07-16 17:35:45 -07:00
Linus Torvalds
e55037c879 EFI updates for v6.11
- Drop support for the 'fake' EFI memory map on x86
 
 - Add an SMBIOS based tweak to the EFI stub instructing the firmware on
   x86 Macbook Pros to keep both GPUs enabled
 
 - Replace 0-sized array with flexible array in EFI memory attributes
   table handling
 
 - Drop redundant BSS clearing when booting via the native PE entrypoint
   on x86
 
 - Avoid returning EFI_SUCCESS when aborting on an out-of-memory
   condition
 
 - Cosmetic tweak for arm64 KASLR loading logic
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZpTg5gAKCRAwbglWLn0t
 XOrOAQCpZjtjkPRPCBY+t3wUl84rOKiPr1SMHyL50Zl8udJKegD/bnwWSgX3FzLQ
 TN+xjnK7IAxEoKAEWt8lnt04cH5r3As=
 =7VWO
 -----END PGP SIGNATURE-----

Merge tag 'efi-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI updates from Ard Biesheuvel:
 "Note the removal of the EFI fake memory map support - this is believed
  to be unused and no longer worth supporting. However, we could easily
  bring it back if needed.

  With recent developments regarding confidential VMs and unaccepted
  memory, combined with kexec, creating a known inaccurate view of the
  firmware's memory map and handing it to the OS is a feature we can
  live without, hence the removal. Alternatively, I could imagine making
  this feature mutually exclusive with those confidential VM related
  features, but let's try simply removing it first.

  Summary:

   - Drop support for the 'fake' EFI memory map on x86

   - Add an SMBIOS based tweak to the EFI stub instructing the firmware
     on x86 Macbook Pros to keep both GPUs enabled

   - Replace 0-sized array with flexible array in EFI memory attributes
     table handling

   - Drop redundant BSS clearing when booting via the native PE
     entrypoint on x86

   - Avoid returning EFI_SUCCESS when aborting on an out-of-memory
     condition

   - Cosmetic tweak for arm64 KASLR loading logic"

* tag 'efi-next-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array
  efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
  arm64/efistub: Clean up KASLR logic
  x86/efistub: Drop redundant clearing of BSS
  x86/efistub: Avoid returning EFI_SUCCESS on error
  x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs
  x86/efistub: Enable SMBIOS protocol handling for x86
  efistub/smbios: Simplify SMBIOS enumeration API
  x86/efi: Drop support for fake EFI memory maps
2024-07-16 12:22:07 -07:00
Linus Torvalds
cc0f7c3f97 soc: driver updates for 6.11
The updates to the mediatek, allwinner, ti, tegra, microchip, stm32,
 samsung, imx, zynq and amlogic platoforms are farily small maintenance
 changes, either addressing minor mistakes or enabling additional hardware.
 
 The qualcomm platform changes add a number of features and are larger
 than the other ones combined, introducing the use of linux/cleanup.h
 across several drivers, adding support for Snapdragon X1E and other
 SoCs in platform drivers, a new "protection domain mapper" driver, and a
 "shared memory bridge" driver.
 
 The cznic "turris omnia" router based on Marvell Armada gets a platform
 driver that talks to the board specific microcontroller.
 
 The reset and cache subsystems get a few minor updates to SoC specific
 drivers, while the ff-a, scmi and optee firmware drivers get some
 code refactoring and new features.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaVTTUACgkQYKtH/8kJ
 UiegixAAqGfwUtwk2GGZJlEGjUjT4cqrwCTLhNlaNfgN/dZxjk1XBTKvtp2mVDi2
 lJN8TNqa0Csw8XZYPgHi0s1ppmwQl07Unpbc9tUeS4tAeIuputDe+ia0UtQx3Mkd
 GTAKJO6VzLeCnDxB4757OURZO9wYlPdZycQbnSKDyfBIapFuZwozmbAc7BuFGvBv
 2Zt5lca531EJuM5wg25f+F/8XSxZIqjMA6/PTGNCYig1bx5AM2tCWK2xN+BL+dxn
 YVLuRZT7lSgpwivg9OHzJ49g9WeJB7RArnSDg1Ac7sNfC8476UC17BAH4rF7QSTP
 q2GBP2VOdRJA9mJkavtLhE/1LPDJuYTM+nt1xq7jzG2MKN7yLjX0LMrMgKsk0pXZ
 T2qQh7+4MA9lwlpGEwDruMajTJahbMgiAUcSivLsr18LrifAnKVHBDTRmRwNiRX2
 T3/zk90kenJX1NOkc4SrdLd5iCyq0oSN+fukdh3UMgJLnAzaWOe5mKAMF7eefeog
 rMH276W8JwbbmIC4R2aQm6TL7IWBtaCaHuLqYOiTjooir31OgwW4Mztd7okU4v4I
 rOGhV0zJTSVXT+a4O2jOooWppS9xE45/F2DSigSvZjEiahZ0L4feaOrHui5PVVlW
 wmFmobCq6Y0Mjspdk64O1tbUWJ17CmRK1WDrUUk0VgmLy9gn6A8=
 =ChcR
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "The updates to the mediatek, allwinner, ti, tegra, microchip, stm32,
  samsung, imx, zynq and amlogic platoforms are fairly small maintenance
  changes, either addressing minor mistakes or enabling additional
  hardware.

  The qualcomm platform changes add a number of features and are larger
  than the other ones combined, introducing the use of linux/cleanup.h
  across several drivers, adding support for Snapdragon X1E and other
  SoCs in platform drivers, a new "protection domain mapper" driver, and
  a "shared memory bridge" driver.

  The cznic "turris omnia" router based on Marvell Armada gets a
  platform driver that talks to the board specific microcontroller.

  The reset and cache subsystems get a few minor updates to SoC specific
  drivers, while the ff-a, scmi and optee firmware drivers get some code
  refactoring and new features"

* tag 'soc-drivers-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (122 commits)
  firmware: turris-mox-rwtm: Initialize completion before mailbox
  firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
  firmware: turris-mox-rwtm: Do not complete if there are no waiters
  MAINTAINERS: drop riscv list from cache controllers
  platform: cznic: turris-omnia-mcu: fix Kconfig dependencies
  bus: sunxi-rsb: Constify struct regmap_bus
  soc: sunxi: sram: Constify struct regmap_config
  platform: cznic: turris-omnia-mcu: Depend on WATCHDOG
  platform: cznic: turris-omnia-mcu: Depend on OF
  soc: samsung: exynos-pmu: add support for PMU_ALIVE non atomic registers
  arm64: stm32: enable scmi regulator for stm32
  firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
  soc: qcom: wcnss: simplify with cleanup.h
  soc: qcom: pdr: simplify with cleanup.h
  soc: qcom: ocmem: simplify with cleanup.h
  soc: qcom: mdt_loader: simplify with cleanup.h
  soc: qcom: llcc: simplify with cleanup.h
  firmware: qcom: tzmem: simplify returning pointer without cleanup
  soc: qcom: socinfo: Add PM6350 PMIC
  arm64: dts: renesas: rz-smarc: Replace fixed regulator for USB VBUS
  ...
2024-07-16 11:35:27 -07:00
Linus Torvalds
cdf471c348 chrome platform firmware changes for 6.11
* Minor cleanups.
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYKADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCZo053hMcdHp1bmdiaUBr
 ZXJuZWwub3JnAAoJECvFMQYG2jz06DoBAIc3/IT7T+Ycr1rJlrTG2xVKBUxkzIF7
 DLvDgkBWVUKuAQCHN6mYWzTnw7i8tsFlXIWDE9BajNSn93t8xZ2JYxqjCQ==
 =6tiy
 -----END PGP SIGNATURE-----

Merge tag 'tag-chrome-platform-firmware-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform firmware update from Tzung-Bi Shih:

 - Minor cleanup: add missing MODULE_DESCRIPTION

* tag 'tag-chrome-platform-firmware-for-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  firmware: google: add missing MODULE_DESCRIPTION() macros
2024-07-15 17:28:40 -07:00
Marek Behún
49e24c80d3
firmware: turris-mox-rwtm: Initialize completion before mailbox
Initialize the completion before the mailbox channel is requested.

Fixes: 389711b374 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-15 16:57:57 +02:00
Marek Behún
8467cfe821
firmware: turris-mox-rwtm: Fix checking return value of wait_for_completion_timeout()
The wait_for_completion_timeout() function returns 0 if timed out, and a
positive value if completed. Fix the usage of this function.

Fixes: 389711b374 ("firmware: Add Turris Mox rWTM firmware driver")
Fixes: 2eab59cf0d ("firmware: turris-mox-rwtm: fail probing when firmware does not support hwrng")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-15 16:57:48 +02:00
Marek Behún
0bafb172b1
firmware: turris-mox-rwtm: Do not complete if there are no waiters
Do not complete the "command done" completion if there are no waiters.
This can happen if a wait_for_completion() timed out or was interrupted.

Fixes: 389711b374 ("firmware: Add Turris Mox rWTM firmware driver")
Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-15 16:57:33 +02:00
Linus Torvalds
9b48104b2c sound fixes for 6.10-final
Majority of changes here are small device-specific fixes for ASoC
 SOF / Intel and usual HD-audio quirks.
 
 The only significant high LOC is found in the Cirrus firmware driver,
 but all those are for hardening against malicious firmware blobs, and
 they look fine for taking as a last minute fix, too.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmaQAxwOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9AUA//ZxtSF9W8prfSVHWJt7vmCnsPfmYr+xC+I5H1
 Lys8i/eE+VCz+1s8esgwaatvLTQOBAWupnSpItLk4rVymzTIDih/FJGfQkxEQPj+
 bEWXep67COCatq7YqwXcHPvnjNTC1x3KQeqYeyL/NXcIj891SBw8Ao2CEx4L8O4w
 w6BWD95KhjdXAhc49U+1F89sDF+EG96uMBAcDWLtiteo38exsH87Fd+Q3/ZaPJ9Q
 9cRful99yWijgKmpsazwNaWFJgc7ScyXiE2eCinS3etRYTUW7jTHlHxMTWrRrkLj
 L3jNzhEuq5TUNXECd74yghpuq/TWqLkJ8lp7HBs87ZgK5cz7avE+Fb/6EC4oQ6sQ
 48XlL4j5E3gme0X9Mdq/LmuefxWUGQGQYkJDixaI6hUgvhd8b/pJEvtefjTmkwIG
 EqHUtJ4tsAsnmF2xu7w6jG/Ng4Oo3W8NpexBcIkTvOIm7k9C95lQ0ctBgG9H+Khi
 YPq7V36LfaFfG8fneHjqpUlDOVWYtL0mfqkfB6Vt3BSqxtJrPqOXC0nruC5LD+rW
 tnWlAbMP55+q0QD3h8gp1+auF/LbYxcIX3kXT/TuBsrMchpPxrg/mb4x00vludYn
 vBL/IB+ZgbQzxDI38sP2NhTG/RKrN75rePqR6BbIIX1otkCnSqJ406qzVhImD6yF
 HxsqOV4=
 =xfjV
 -----END PGP SIGNATURE-----

Merge tag 'sound-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "The majority of changes here are small device-specific fixes for ASoC
  SOF / Intel and usual HD-audio quirks.

  The only significant high LOC is found in the Cirrus firmware driver,
  but all those are for hardening against malicious firmware blobs, and
  they look fine for taking as a last minute fix, too"

* tag 'sound-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek: Enable Mute LED on HP 250 G7
  firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
  ALSA: hda/realtek: Limit mic boost on VAIO PRO PX
  ALSA: hda: cs35l41: Fix swapped l/r audio channels for Lenovo ThinBook 13x Gen4
  ASoC: SOF: Intel: hda-pcm: Limit the maximum number of periods by MAX_BDL_ENTRIES
  ASoC: rt711-sdw: add missing readable registers
  ASoC: SOF: Intel: hda: fix null deref on system suspend entry
  ALSA: hda/realtek: add quirk for Clevo V5[46]0TU
  firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
  firmware: cs_dsp: Validate payload length before processing block
  firmware: cs_dsp: Return error if block header overflows file
  firmware: cs_dsp: Fix overflow checking of wmfw header
2024-07-12 08:32:40 -07:00
Kees Cook
4a2ebb0822 efi: Replace efi_memory_attributes_table_t 0-sized array with flexible array
While efi_memory_attributes_table_t::entry isn't used directly as an
array, it is used as a base for pointer arithmetic. The type is wrong
as it's not technically an array of efi_memory_desc_t's; they could be
larger. Regardless, leave the type unchanged and remove the old style
"0" array size. Additionally replace the open-coded entry offset code
with the existing efi_memdesc_ptr() helper.

Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-12 10:06:01 +02:00
Kees Cook
887c4cf559 efi: Rename efi_early_memdesc_ptr() to efi_memdesc_ptr()
The "early" part of the helper's name isn't accurate[1]. Drop it in
preparation for adding a new (not early) usage.

Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/lkml/CAMj1kXEyDjH0uu3Z4eBesV3PEnKGi5ArXXMp7R-hn8HdRytiPg@mail.gmail.com [1]
Signed-off-by: Kees Cook <kees@kernel.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-12 10:06:01 +02:00
Mark Brown
1ee45e649e
firmware: cs_dsp: Some small coding improvements
Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

Commit series that makes some small improvements to code and the
kernel log messages.
2024-07-11 00:26:23 +01:00
Richard Fitzgerald
dc0e5ca885
firmware: cs_dsp: Rename fw_ver to wmfw_ver
Rename the confusingly named struct member fw_ver to wmfw_ver. It
contains the wmfw format version of the loaded wmfw file.

This commit also contains an update to wm_adsp for the new name.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240710103640.78197-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-10 18:45:05 +01:00
Richard Fitzgerald
a493911905
firmware: cs_dsp: Clarify wmfw format version log message
Change the log message of the wmfw format version to include
the file name, and change the message to say "format" instead
of "Firmware version". Merge this with the message that logs
the timestamp.

The wmfw format version is information that is useful to have
logged because the behaviour of firmware controls depends on
the wmfw format. So "unexpected" behaviour could be caused by
having expectations based on one format of wmfw when a
different format has been loaded.

But the original message was confusing. It reported the file
format version but didn't actually log the name of the file it
referred to. It also called it "Firmware version", which is
confusing when a later message also logs a firmware version
that is the version of the actual firmware within the wmfw.

The logging of the firmware timestamp has been merged into this.
That was originally a dbg-only message, but as we are already
logging a line of info, we might as well add a few extra
characters to log the timestamp. The timestamp is now logged
in hexadecimal - it's not particularly useful as a decimal
value.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240710103640.78197-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-10 18:45:04 +01:00
Richard Fitzgerald
584e86e14c
firmware: cs_dsp: Make wmfw and bin filename arguments const char *
The wmfw_filename and bin_filename strings passed into cs_dsp_power_up()
and cs_dsp_adsp1_power_up() should be const char *.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240710103640.78197-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-10 18:45:03 +01:00
Richard Fitzgerald
bff92858df
firmware: cs_dsp: Don't allocate temporary buffer for info text
Don't allocate a temporary buffer to hold a NUL-terminated copy
of the NAME/INFO string from the wmfw/bin. It can be printed
directly to the log. Also limit the maximum number of characters
that will be logged from this string.

The NAME/INFO blocks in the firmware files are an array of
characters with a length, not a NUL-terminated C string. The
original code allocated a temporary buffer to make a
NUL-terminated copy of the string and then passed that to
dev_info(). There's no need for this: printf formatting can
use "%.*s" to print a character array of a given length.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20240710103640.78197-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-10 18:45:02 +01:00
Ard Biesheuvel
12a01f66f0 arm64/efistub: Clean up KASLR logic
Clean up some redundant code in the KASLR placement handling logic. No
functional change intended.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-10 12:22:46 +02:00
Arnd Bergmann
8cfda4059f A few more Qualcomm driver updates for v6.11
This adds a quirk to skip using the newly introduced SHM Bridge
 implementation while regressions are being investigated.
 
 One occurance of return no_free_ptr() is replaced with return_ptr() to
 make code easier to read. llcc, mdt_loader, ocmem, pdr, socinfo and
 wcnss drivers gets simplified using cleanup.h.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmaNik4VHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FgKcQAMDBclsQBIRkAkPl6BnqNG2aoEVX
 VYI1W4IwqFutfVAH/0lpBX1jzj1QfHh7b7+9eB3q92+Zpi/wHW1hjUbWujFMuExt
 hoC+ZYc5Ciyikfii1nYCyXAjD7VIWZD6nFo0qgyYhpgEVIaq0cqBpCIAH0doUBYa
 WPEuxzxClgM0S2aHmlCforfYPGaRyQL+ZCW/ksrIgLsynJivp7VVQ6FlnfrjaLo2
 Yv7BqA7ydhcBFdlST20sSXBLqWksBbZokRN6ObqC8Z9MQ/Lux6ZV+CKO56OoZZTq
 vvUyl9fkaRcFr+l+6kLYsSYRRyNkw7fBy0fZhPOubdI3NCzOaOPk0nCHyrnFiXER
 vAzJazmD0+kOudc3YUFN1fNLpUyCUBZ2PWRF4GVn9SG0Yq3D/+MCfdob9bqREMBu
 8yaSdI0sr/G1yo3HPvReamaaYvefUn0KmiU5MqSiZJqDal3E1uLMxwTCp/0K5B/k
 xSOx0dxTewO2muHYZHllcey0Y7sJ+btNbZHgIBQTqzXD/5qkW4dx2tmhwwIPZsHl
 RwtlC8eE2UEsAL1f9l+vnFpu5+hVUmRO/L10D6tvZWA+h/hvDtJXGnGhMrZxXXba
 syg15AaAZIoNLPtUsoDul39pM3iXERN7Ht/aEb44UzOQvRNJISH2p+UMy1mv+xWW
 9ef3aGiq4sBmzGpz
 =1rmh
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaNopEACgkQYKtH/8kJ
 UieLxRAAqo2JxPyJlRk6bPCaANm2yCHvstK6TkikVamUqDWMBm0pMi+SzBEWJGpy
 OC9+iprwsHXclfo79lXSWKosc3leIy5HkLErWAaM42QSJpeUb5EtVsvjAFqcZp02
 Eq1GpmMujaZmOuIYhccfPimu7aBw6ajpwDVVPe4aupc5GOXAzQFEb1bFaw7jvz0T
 gcpkVuP4UM89osbgbxHVs3l/8m8zxtJSX6mG43alBWBq9dvlzaPTZtDFyxjXCYtS
 +bYYf99BixpLnqrr/zgczGudvj+8mUyUoyAUqeyEas5je0lTOkhIUGUiHRyi9wmo
 Z3IxvYqh4Xv/GyppdPNhkNKY4SVumtM40WcxheBKPvuhZMzbAZCiGyVaAz/QE34f
 zjiKPJ91imutu4YyQLzJiYyFr4znNCsh3QMkhRCa9X6IqYmEOpB0PlU9ftjZ7ScE
 pFzkEkSXgTRHYbsKaiQp0iBXYzV03mPPNqUb4NkDCllDw8llavsSX5xcoh0pgppp
 dZC1HYhDVnUCq/CJJBJOLchCuOoMmsD6HmKsnQyyQdLqGEfMn4l/g9fANdQxYZDL
 sX7vkDQlH4ptkiBbPzhsu0BLUk36POUGGc1yMxcBDKEEABhPl0fvc5zAnE03ZNkl
 RK0puEWhyKHuQBBFL4CqT4G7VFrwSWyLzMIG51KyEedS4rleMc8=
 =uvSl
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

A few more Qualcomm driver updates for v6.11

This adds a quirk to skip using the newly introduced SHM Bridge
implementation while regressions are being investigated.

One occurance of return no_free_ptr() is replaced with return_ptr() to
make code easier to read. llcc, mdt_loader, ocmem, pdr, socinfo and
wcnss drivers gets simplified using cleanup.h.

* tag 'qcom-drivers-for-6.11-2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
  soc: qcom: wcnss: simplify with cleanup.h
  soc: qcom: pdr: simplify with cleanup.h
  soc: qcom: ocmem: simplify with cleanup.h
  soc: qcom: mdt_loader: simplify with cleanup.h
  soc: qcom: llcc: simplify with cleanup.h
  firmware: qcom: tzmem: simplify returning pointer without cleanup
  soc: qcom: socinfo: Add PM6350 PMIC

Link: https://lore.kernel.org/r/20240709191246.3053-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-09 22:50:25 +02:00
Arnd Bergmann
782b726201 arm64: Xilinx SoC changes for 6.11
Timer
 - Fix u32 overflow issue in 32-bit width PWM mode.
 
 Event manager:
 - rename cpu_number1 to dummy_cpu_number
 
 Power:
 - Add cb event for subsystem restart
 - check return status of get_api_version()
 
 Firmware:
 - Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCZnrFgQAKCRDKSWXLKUoM
 IVNmAKCQ55ixxl264CwDePSngwKjGOERuQCggRhBvLHuml1mO9ia+U0ydmNMWyQ=
 =TT/N
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaNPMkACgkQYKtH/8kJ
 UicZfw/+PXtCsboxekVeZOrQi+cE61xlYw/vpN9mq6mOeEfA0c0hk0o+K89YwHkv
 wkNSCCh+KPiIFB+j/P8Nheef1E/IhCKwDvrdNSB3ZVvPfzv/Ixae4N9Y6hQdMCFN
 xmc9k/xTMRwRRkdydG5Q8W+QVBoy4scvLk7xQQHQiVyoZ0froyhFVpz7UteoYnti
 fbnvaCClKnfmVXkOvWh9Zb7C+4lHvX625yZFh2Vsenx/iBEJ3TJiYmUNw9VGPl0h
 8kQu5m7jli7ogpMCSUvtcc54jqcPH2vuT8o03e3N6jAyoWn4IJDRxwg6I4glB+Lk
 P1Y6xGomfX8gDTtci2cUbcC0jjpPKFNTw7U8uJu/TIf2AcvWI+iXN3kHehO3AkUM
 z7RPMLkR4jgfa8XcxqpzX86VKiOEkDPBkm96aq7YlLAYfSgTNOq9wfhE+VfSf7q1
 nnTQdXHtBu8Umh3dt2m8KpT28U3KaIgY2AGxy6jlm51SZbC9kJhzADx2U6p+8tyL
 Hf3V+lAaQVxRBrc2v1nYVZ5LDmT3pSs2jZb2Tnlv6FrOXOZo1GeVYZTX4Aub/tkv
 kuTAPJPMYwN0ghczijC8ddXmiBdhEW8rww3JROFQKtg/oQ3HEIG2rJiKr4m/3pgb
 iUhNXzoXs8XLUSjqDJ0r7VHDl8GtGNpdsD8qO4nv/roDq04anvA=
 =FltB
 -----END PGP SIGNATURE-----

Merge tag 'zynqmp-soc2-for-6.11' of https://github.com/Xilinx/linux-xlnx into soc/drivers

arm64: Xilinx SoC changes for 6.11

Timer
- Fix u32 overflow issue in 32-bit width PWM mode.

Event manager:
- rename cpu_number1 to dummy_cpu_number

Power:
- Add cb event for subsystem restart
- check return status of get_api_version()

Firmware:
- Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h

* tag 'zynqmp-soc2-for-6.11' of https://github.com/Xilinx/linux-xlnx:
  drivers: soc: xilinx: check return status of get_api_version()
  firmware: xilinx: Move FIRMWARE_VERSION_MASK to xlnx-zynqmp.h
  soc: xilinx: Add cb event for subsystem restart
  soc: xilinx: rename cpu_number1 to dummy_cpu_number
  pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode.

Link: https://lore.kernel.org/r/CAHTX3dKMtqgNpkEvrw0p2w+SPN83Ai1_kzhefUGOO5rMkPaH_w@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-09 15:36:09 +02:00
Arnd Bergmann
ee22fbd705 Qualcomm driver updates for v6.11
Support for Shared Memory (shm) Bridge is added, which provides a
 stricter interface for handling of buffers passed to TrustZone.
 
 The X1Elite platform is added to uefisecapp allow list, to instantiate
 the efivars implementation.
 
 A new in-kernel implementation of the pd-mapper (or servreg) service is
 introduced, to replace the userspace dependency for USB Type-C and
 battery management.
 
 Support for sharing interrupts across multiple bwmon instances is added,
 and a refcount imbalance issue is corrected.
 
 The LLCC support for recent platforms is corrected, and SA8775P support
 is added.
 
 A new interface is added to SMEM, to expose "feature codes". One example
 of the usecase for this is to indicate to the GPU driver which
 frequencies are available on the given device.
 
 The interrupt consumer and provider side of SMP2P is updated to provide
 more useful names in interrupt stats.
 
 Support for using the mailbox binding and driver for outgoing IPC
 interrupt in the SMSM driver is introduced.
 
 socinfo driver learns about SDM670 and IPQ5321, as well as get some
 updates to the X1E PMICs.
 
 pmic_glink is bumped to now support managing 3 USB Type-C ports.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmaHa9UVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FUOYP/1Z2gwAlkGLQsSVGmDAbEAClFyhm
 JvgBn87fouKQ5pPwbdLLhylxwlkdtCQ/WL9Zm0Ue5wfXmRlLApVrEfBbG9HY4fG7
 yTk0u5H0qcln5KqEB9XFxzHfPbjGBKrF5sRfFlTEncQ+/viwu4Jw2BdY9Hs2zCAV
 0Qbc7mFVzOYOC+MTil8p0qMAxi/cCnWwi+NCfy7bKgvdW3lzuDrvw3vdwf0TbzwQ
 asTjjH2+VA3cHqosRx5vhvoO89w2V1JAEEkifu9TtF0j8+FUNql9h8SxMGi3aOqw
 uXh+lSBLPkSv3aptkqxl7bUX4axtdwPqhvNb4Fe0Z1EaMGZ3v6C/LynTsSwF36H0
 fNYu5n1MW9Cl6ypxycSdcJxMbYv9Czy7GkwhTPZPWepvQC+XcjH/VyvzAmyDLpYe
 UZzYH/6AqT/lCSVQtb+ySML8BObXMZOfIAH2EtoyLw/jlKb2cAWwMXftSD9VgFH0
 j0PAM43w2LYgFFy6Cmla4jX9pW2MooEF/3K1GM2rvsQzinZa5+EK1UKpqam5Kq+d
 h8FakZ6cl86y5pzg6QcVbm2pxKpAGFjArzpHKshLMp9Krkjhfopyl3tN7aXG3VOF
 qSeWdEP2TAUyQFGJNuUxeb7PZc+VdBHBPmaGDFhaLy+J1Huu8kc3TQuAkxxpXXIj
 /vpF+Aeyl14J1lQS
 =Eknv
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaM/jYACgkQYKtH/8kJ
 UieyzBAAjEB2YIKZzlt/OFca+NG3zYlnt2rYxjW0Jc4wI/LaJn6fshQ/fExjvUqB
 lfYIn5rLVXsB29+Xc1fK8rGEp5N2AtY5syAr2Ji44EXheCNa5HsxkLVS9K6bjUvr
 ljJYo23Gr3S9XnkClGVxuZX7QfS0DUPSr1mo4kJXiNhUg++YDTG6A0z/Njo/LziO
 pzSmc8vG0pPGG+B5GNwiQO2KW8ZFgT6L0A8neLIcols3o0Vcnce6MnT+OHpRFbjx
 bEvo9I/JbKFRRzYzztTb2Qtl3tzo230K/D5/8oaLKkLj7FZrULudrPYs0nT4l8tN
 qN/8gqsKxKTqPxFgQlSIT9G+14OqsKWcLs4qTNnZUsVweIoCnWj2IEkXY6C4KOHX
 1LHTucglBK7LwBxBtbjE6bNwGuMnaZJycc9UDmDcGzuhEhFpUH6Jp6NG8Jf8xv7L
 Ua1JJbF4cnAFQMOxkukYqxu2G7j3qmK4irsoVUJDZsl6ZY3Qn7itkpsKCw24Gspz
 HvAASOp1wpkz4aFCR61kPOubsKKWMTe0zOTCDPHqeMX+PrjfH9nkuXCw0N44zlHB
 VuCl5yqVnWmmKbxZ5ahFgogZBu5gLF5LtMgLQAD2zzL01JT1kZydFtGvh5/uVdDC
 8yym+fdL7UeolocK9Qj6M1KKfpiLr2OYGuk9ONG7E/9yknOfDJk=
 =lPdX
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.11

Support for Shared Memory (shm) Bridge is added, which provides a
stricter interface for handling of buffers passed to TrustZone.

The X1Elite platform is added to uefisecapp allow list, to instantiate
the efivars implementation.

A new in-kernel implementation of the pd-mapper (or servreg) service is
introduced, to replace the userspace dependency for USB Type-C and
battery management.

Support for sharing interrupts across multiple bwmon instances is added,
and a refcount imbalance issue is corrected.

The LLCC support for recent platforms is corrected, and SA8775P support
is added.

A new interface is added to SMEM, to expose "feature codes". One example
of the usecase for this is to indicate to the GPU driver which
frequencies are available on the given device.

The interrupt consumer and provider side of SMP2P is updated to provide
more useful names in interrupt stats.

Support for using the mailbox binding and driver for outgoing IPC
interrupt in the SMSM driver is introduced.

socinfo driver learns about SDM670 and IPQ5321, as well as get some
updates to the X1E PMICs.

pmic_glink is bumped to now support managing 3 USB Type-C ports.

* tag 'qcom-drivers-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (48 commits)
  soc: qcom: smp2p: Use devname for interrupt descriptions
  soc: qcom: smsm: Add missing mailbox dependency to Kconfig
  soc: qcom: add missing pd-mapper dependencies
  soc: qcom: icc-bwmon: Allow for interrupts to be shared across instances
  dt-bindings: interconnect: qcom,msm8998-bwmon: Add X1E80100 BWMON instances
  dt-bindings: interconnect: qcom,msm8998-bwmon: Remove opp-table from the required list
  firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new()
  soc: qcom: add pd-mapper implementation
  soc: qcom: pdr: extract PDR message marshalling data
  soc: qcom: pdr: fix parsing of domains lists
  soc: qcom: pdr: protect locator_addr with the main mutex
  firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image()
  firmware: qcom: scm: add support for SHM bridge memory carveout
  firmware: qcom: tzmem: enable SHM Bridge support
  firmware: qcom: scm: add support for SHM bridge operations
  firmware: qcom: qseecom: convert to using the TZ allocator
  firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator
  firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator
  firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator
  firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator
  ...

Link: https://lore.kernel.org/r/20240705034410.13968-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-09 11:09:10 +02:00
Arnd Bergmann
9c148cb47a TI SoC driver updates for v6.11
- Update TISCI protocol URL link  which was dead
 - socinfo: Add j721E SR 2.0 detection support
 - MAINTAINER list additions: ti,pruss.yaml and ti,j721e-system-controller.yaml
 - pm33xx: log statement improvement
 - knav_qmss: minor data structure optimization
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmaIBEkACgkQ3bWEnRc2
 JJ3lohAAqgQGjtqyEBQ214AqfTbrk9LYHveXubN3O/qVZGt5APJYQ8flGsh0uPyL
 VIpIc1yo+8zu53MLnUXtDZrSKk/iVmqNy2edXkNCRyVbCkx0DJmHwWxNCS/qaU6y
 lXCjI4KpnK7EuGemJR/vmKIxfDfp/yauqS/oP03jms6WwYWO6OJu7lbyYsMfmach
 A05Lft0L0xV9GwMJsNQaa46K0Kp15ATocpnkcfkR5dCJQjKAWNOqdgI//bvnId3t
 Nf8gvEwi7dJy5twZjez5imj/2EfnGQdb+9F0gHcdQsp9935qENvxXlOlpJ0kBC9K
 RFpXxqFBaTyRN43I2bOJoTKUJTR+LnpuB/Xw/XDzZPGIXEAulpv7ezLWaC+U0PFh
 eTDjRgZHRywH+ZQD8QMje9Rcg5D2VQYlLT3V3BwsMfhUx1wrgFAPBq/2OwebOu5v
 WsALYN0bZwoyuDZCByEjg7sabReOZVtyBz39V2SrO4xRPcXgyV0FNcDcgi4tgeZZ
 grg02Eguv8CA0clGzak/Mmnqkng2GC8WGfpKU76XKGZ8Q+aT+a/ikl5IYIurfvB8
 wtepFo8G6X0vjPjx7E7KoJPgJKEZI0upgxxs6+yoEnXHfunp7GqbKAswJq2rnA+s
 YNniyOGz/b0+dsGHboShV6Ae4f64PTKODxtx3uaHPdmkeZzW5eQ=
 =Pvzq
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaM/dUACgkQYKtH/8kJ
 UicolA/+MTY07Nmo4puzxiU7hTa1imL/ELKmZEFqjJDJS1KOMjD9dwMNHSbDGckb
 It8i/Q64Q3l0nOCCs6qPKY1EqX8IzNf4JT3ZBG5AEbJ+9XeT2nbbNIkcNFtzJ+N7
 rrasmAYEPbZdrHhL5Kc/YrYgcirWgmgnwb4k7gSvuY0+5MsnoQq4fu+jRkyAH1Tx
 23dl4/Q8BGDSgERW0wgnIgChZ/8klqaqrL/h+/vbQJzpA3RLYa310rF+ifkAnXZ5
 3o3lPhWEzFhWx8ribmk2ni/yvR8kCn6YSaNrZqQ2XeYJY4tHFKujEezJKDXNTNtQ
 2poYy41UrxybO/Lh+ybj5OvBKinjjz/X5rXxDATiINRz2Zk5P6amAeBVRppOvmxP
 y4jghgX6y9UHvn7AIF2ynNYG98qfseiqk59tMQtoVP42wNC6VJqgvyTwNKj1M870
 NQvOaNg2Oy1JXtUKiZA0E7BJqBJzBk5dznM40JFSHqfU37qIp11/3qDjrVwJXEOG
 ul+WTMpGj25dC1MtamRXiR6nnD5xnT3KVSykXaH89i3nNyCSaiidTUMS8r5Mxl/U
 uf5SQS+fq5xlEjY+f6rSP2y0rECgOcpu9vrtagC3mnpbfPZKtTESmPP72zI7AAjC
 FM4UhI1EIvQwf48v5fXXk8O+27BuoCn4jX0vV/J0y6Xltrv8g/M=
 =4qGu
 -----END PGP SIGNATURE-----

Merge tag 'ti-driver-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/drivers

TI SoC driver updates for v6.11

- Update TISCI protocol URL link  which was dead
- socinfo: Add j721E SR 2.0 detection support
- MAINTAINER list additions: ti,pruss.yaml and ti,j721e-system-controller.yaml
- pm33xx: log statement improvement
- knav_qmss: minor data structure optimization

* tag 'ti-driver-soc-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  dt-bindings: soc: ti: Move ti,j721e-system-controller.yaml to soc/ti
  MAINTAINERS: Add entry for ti,pruss.yaml to TI KEYSTONE MULTICORE NAVIGATOR DRIVERS
  soc: ti: k3-socinfo: Add J721E SR2.0
  soc: ti: knav_qmss: Constify struct knav_range_ops
  firmware: ti_sci: fix TISCI protocol URL link
  dt-bindings: ti: fix TISCI protocol URL link
  soc: ti: pm33xx: Fix missing newlines in log statements

Link: https://lore.kernel.org/r/20240705151449.s4rngkehjn73favn@stream
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-09 11:07:33 +02:00
Arnd Bergmann
9f51147489 RISC-V firmware drivers for v6.11
Microchip:
 Support for writing "bitstream info" to the flash using the auto-update
 driver. At this point the "bitstream info" is a glorified dtbo wrapper,
 but there's plans to add more info there in the future. Additionally,
 rework some allocations in the driver and use scope-based cleanup on
 them.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZorOFAAKCRB4tDGHoIJi
 0mnOAQCyWCj/tH+Cq5VEhW6NLYzkkiv/4fkE5mNrYiTuEPg1sAD+Lu6Cu9dvMgiy
 hHLty4XT9CRV81yBWcBpViua1nkVwQ4=
 =MbUu
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaM/VYACgkQYKtH/8kJ
 UicDFRAAyjsmFzIZwHWbC25sUZEo2i+Um7RuIhluMiVIukT46r5wCE/NL9yDGTp1
 Vr+UWDShC2huqXHhXQeIrECUc9TH0rEX8/N+9XPJ+nepU97OJUfhHTXxkSqTz+xx
 EqHMZmtTwQz/fBjUo1dBDsIsD6ZXtNaUAA57r4RuxykHKk1qjJH6WplDwyc2moHj
 DMrgVxkvO/tTjG9341bVe+INVZCXftGAOIMQF8ldNBcMm4KAfvt+4WUlh5gxZs0o
 JtIvNGJgH5PgHNLxJXmQtulBisUOdgf4m77a7AQVra7y2dmj+o1VJk0+9vi/r/5D
 DRUE4HKRXhHQAljDo6NnZiAyOYXZ7nbihU5O0ow6pMWk0546or8NrMsu2g5q64LB
 P6DDhPcfteM/EQ4JQErey+lIUz9KktfiCxPqgs6WHQEr/50IR1l2zEmWPYc3zv+a
 wxMbr9FCfG9bpQzCvK514Ic70FVxFVMTFYlO84lgZPRNC7uxuXqDRsvr6UjT+iTP
 e5ATdzX/Yxv/4uaBMjM8ZNfCcq0ktWbizR2LDJn31ViICgL8Gnboaflqc5YwnBw6
 yke+8HdIyaRteuwqOh9OEKzOZPx0BTA18aWWDDKTyhc//CPOHZgmrDj6WMEqWEks
 r1Q8SFWm+o0DkXrMBFapDP+7DsMMb7ilYLWNb6IVKSkLep6qP4E=
 =KCwt
 -----END PGP SIGNATURE-----

Merge tag 'riscv-firmware-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/drivers

RISC-V firmware drivers for v6.11

Microchip:
Support for writing "bitstream info" to the flash using the auto-update
driver. At this point the "bitstream info" is a glorified dtbo wrapper,
but there's plans to add more info there in the future. Additionally,
rework some allocations in the driver and use scope-based cleanup on
them.

Signed-off-by: Conor Dooley <conor.dooley@microchip.com>

* tag 'riscv-firmware-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  firmware: microchip: use scope-based cleanup where possible
  firmware: microchip: move buffer allocation into mpfs_auto_update_set_image_address()
  firmware: microchip: support writing bitstream info to flash

Link: https://lore.kernel.org/r/20240707-lukewarm-film-8a9da40a1c27@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-09 11:05:26 +02:00
Richard Fitzgerald
680e126ec0
firmware: cs_dsp: Use strnlen() on name fields in V1 wmfw files
Use strnlen() instead of strlen() on the algorithm and coefficient name
string arrays in V1 wmfw files.

In V1 wmfw files the name is a NUL-terminated string in a fixed-size
array. cs_dsp should protect against overrunning the array if the NUL
terminator is missing.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f6bc909e76 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")
Link: https://patch.msgid.link/20240708144855.385332-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-08 15:55:11 +01:00
Ard Biesheuvel
ebf5a79acf x86/efistub: Drop redundant clearing of BSS
As it turns out, clearing the BSS was not the right fix for the issue
that was ultimately fixed by commit decd347c2a ("x86/efistub:
Reinstate soft limit for initrd loading"), and given that the Windows
EFI loader becomes very unhappy when entered with garbage in BSS, this
is one thing that x86 PC EFI implementations can be expected to get
right.

So drop it from the pure PE entrypoint. The handover protocol entrypoint
still needs this - it is used by the flaky distro bootloaders that
barely implement PE/COFF at all.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-08 10:17:45 +02:00
Ard Biesheuvel
fb318ca0a5 x86/efistub: Avoid returning EFI_SUCCESS on error
The fail label is only used in a situation where the previous EFI API
call succeeded, and so status will be set to EFI_SUCCESS. Fix this, by
dropping the goto entirely, and call efi_exit() with the correct error
code.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-08 10:17:45 +02:00
Aditya Garg
71e49eccdc x86/efistub: Call Apple set_os protocol on dual GPU Intel Macs
0c18184de9 ("platform/x86: apple-gmux: support MMIO gmux on T2 Macs")
brought support for T2 Macs in apple-gmux. But in order to use dual GPU,
the integrated GPU has to be enabled. On such dual GPU EFI Macs, the EFI
stub needs to report that it is booting macOS in order to prevent the
firmware from disabling the iGPU.

This patch is also applicable for some non T2 Intel Macs.

Based on this patch for GRUB by Andreas Heider <andreas@heider.io>:
https://lists.gnu.org/archive/html/grub-devel/2013-12/msg00442.html

Credits also goto Kerem Karabay <kekrby@gmail.com> for helping porting
the patch to the Linux kernel.

Cc: Orlando Chamberlain <orlandoch.dev@gmail.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
[ardb: limit scope using list of DMI matches provided by Lukas and Orlando]
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Tested-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-08 10:17:45 +02:00
Ard Biesheuvel
cd6193877c x86/efistub: Enable SMBIOS protocol handling for x86
The smbios.c source file is not currently included in the x86 build, and
before we can do so, it needs some tweaks to build correctly in
combination with the EFI mixed mode support.

Reviewed-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-08 10:17:44 +02:00
Dmitry Baryshkov
55751d3e9e firmware: qcom: tzmem: blacklist more platforms for SHM Bridge
The SHM bridge makes the Qualcomm RB3 and SM8150-HDK reset while probing
the RMTFS (in qcom_scm_assign_mem()). Blacklist the SHM Bridge on
corresponding platforms using SoC-level compat string. If later it's
found that the bad behaviour is limited just to the particular boards
rather than SoC, the compat strings can be adjusted.

Reported-by: Neil Armstrong <neil.armstrong@linaro.org>
Fixes: f86c61498a ("firmware: qcom: tzmem: enable SHM Bridge support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on Qualcomm RB3
Link: https://lore.kernel.org/r/20240704-shmbridge-blacklist-v1-1-14b027b3b2dc@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-07-06 12:59:50 -05:00
Krzysztof Kozlowski
d99b680b4a firmware: qcom: tzmem: simplify returning pointer without cleanup
Use 'return_ptr' helper for returning a pointer without cleanup for
shorter code.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240703083046.95811-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-07-06 12:56:38 -05:00
Daniel Vetter
2879b482a9 Merge tag 'drm-misc-fixes-2024-07-04' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes
drm-misc-fixes for v6.10-rc7:
- Add panel quirks.
- Firmware sysfb refcount fix.
- Another null pointer mode deref fix for nouveau.
- Panthor sync and uobj fixes.
- Fix fbdev regression since v6.7.
- Delay free imported bo in ttm to fix lockdep splat.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ffba0c63-2798-40b6-948d-361cd3b14e9f@linux.intel.com
2024-07-04 16:48:03 +02:00
Greg Kroah-Hartman
d69d804845 driver core: have match() callback in struct bus_type take a const *
In the match() callback, the struct device_driver * should not be
changed, so change the function callback to be a const *.  This is one
step of many towards making the driver core safe to have struct
device_driver in read-only memory.

Because the match() callback is in all busses, all busses are modified
to handle this properly.  This does entail switching some container_of()
calls to container_of_const() to properly handle the constant *.

For some busses, like PCI and USB and HV, the const * is cast away in
the match callback as those busses do want to modify those structures at
this point in time (they have a local lock in the driver structure.)
That will have to be changed in the future if they wish to have their
struct device * in read-only-memory.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Reviewed-by: Alex Elder <elder@kernel.org>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Link: https://lore.kernel.org/r/2024070136-wrongdoer-busily-01e8@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-07-03 15:16:54 +02:00
Richard Fitzgerald
62412a9357
firmware: cs_dsp: Don't allow writes to read-only controls
Add a check to cs_dsp_coeff_write_ctrl() to abort if the control
is not writeable.

The cs_dsp code originated as an ASoC driver (wm_adsp) where all
controls were exported as ALSA controls. It relied on ALSA to
enforce the read-only permission. Now that the code has been
separated from ALSA/ASoC it must perform its own permission check.

This isn't currently causing any problems so there shouldn't be any
need to backport this. If the client of cs_dsp exposes the control as
an ALSA control, it should set permissions on that ALSA control to
protect it. The few uses of cs_dsp_coeff_write_ctrl() inside drivers
are for writable controls.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20240702110809.16836-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-02 13:59:35 +01:00
Jinjie Ruan
2335c9cb83 ARM: 9407/1: Add support for STACKLEAK gcc plugin
Add the STACKLEAK gcc plugin to arm32 by adding the helper used by
stackleak common code: on_thread_stack(). It initialize the stack with the
poison value before returning from system calls which improves the kernel
security. Additionally, this disables the plugin in EFI stub code and
decompress code, which are out of scope for the protection.

Before the test on Qemu versatilepb board:
	# echo STACKLEAK_ERASING  > /sys/kernel/debug/provoke-crash/DIRECT
	lkdtm: Performing direct entry STACKLEAK_ERASING
	lkdtm: XFAIL: stackleak is not supported on this arch (HAVE_ARCH_STACKLEAK=n)

After:
	# echo STACKLEAK_ERASING  > /sys/kernel/debug/provoke-crash/DIRECT
	lkdtm: Performing direct entry STACKLEAK_ERASING
	lkdtm: stackleak stack usage:
	  high offset: 80 bytes
	  current:     280 bytes
	  lowest:      696 bytes
	  tracked:     696 bytes
	  untracked:   192 bytes
	  poisoned:    7220 bytes
	  low offset:  4 bytes
	lkdtm: OK: the rest of the thread stack is properly erased

Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2024-07-02 09:18:43 +01:00
Ard Biesheuvel
0dad9ee3c1 efistub/smbios: Simplify SMBIOS enumeration API
Update the efi_get_smbios_string() macro to take a pointer to the entire
record struct rather than the header. This removes the need to pass the
type explicitly, as it can be inferred from the typed pointer. Also,
drop 'type' from the prototype of __efi_get_smbios_string(), as it is
never referenced.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-02 00:42:04 +02:00
Ard Biesheuvel
37aee82c21 x86/efi: Drop support for fake EFI memory maps
Between kexec and confidential VM support, handling the EFI memory maps
correctly on x86 is already proving to be rather difficult (as opposed
to other EFI architectures which manage to never modify the EFI memory
map to begin with)

EFI fake memory map support is essentially a development hack (for
testing new support for the 'special purpose' and 'more reliable' EFI
memory attributes) that leaked into production code. The regions marked
in this manner are not actually recognized as such by the firmware
itself or the EFI stub (and never have), and marking memory as 'more
reliable' seems rather futile if the underlying memory is just ordinary
RAM.

Marking memory as 'special purpose' in this way is also dubious, but may
be in use in production code nonetheless. However, the same should be
achievable by using the memmap= command line option with the ! operator.

EFI fake memmap support is not enabled by any of the major distros
(Debian, Fedora, SUSE, Ubuntu) and does not exist on other
architectures, so let's drop support for it.

Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-07-02 00:26:24 +02:00
Arnd Bergmann
276d7eab38 Amlogic drivers changes for v6.11:
- Add S905L & A113X SoC IDs
 - add missing MODULE_DESCRIPTION() macro for meson_sm driver
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmaCabgACgkQd9zb2sjI
 SdG6iRAAoDFDUuHa6wp4F/l4B2T1LV+KT5r4bmmP/PyXAl6Tt2pXXUMXxxgidED2
 dGw3Rn4VD5oZaKIIeJSgCr7/LBuJ44eh+XEIESeSXMslnE5MgOK7+fziJIjc5BiZ
 +4PJSe1xHd/rqflvuQqoIRgyDfTVkmWJcCPeZI3JOjrOdR+S2y3pCq407lo4J8SJ
 JKkgH9vCxt0cuz6EUgt+TiVPohTDf2S4reanT7Nr5XlCMD9JvOLDlpToQ/oNWY2b
 jBF4NVEJLUeX+s/W3qtEfX4Jg7lX+UvTflPX9y8VLciNpwqGV/2LcP1RfAMChupS
 v7NrPqz2Fetn2uN8U4DJKDAVS/AdruR+Ct53GPXd5I/jquTgzjOzWNhmvvseHv8j
 JQKUtMMX9E53yF+Xnn7j1A/FA0evNvaptxxjNLL1a4mJWALutKCFSpddS13Ddfzb
 XKXATotwzFEyo9clzsSvN0Z2DSiy8ze4Q98k9SddqWgic+WCm5aO2U/1UZDvTJcg
 NsulG4dgzXLGkPyZgqCloDY4dfBYqiROBe38eilLoclJXNrIsnvpqNc+/vf1wDBp
 o+Kvt5EJ0ybrwUBKvW4HXsVw8n99/jjT777P0kJZUxcfVQj9GvYHdeqId2rvdfbQ
 hiYf2r8Msh8vIrV2iWg1n+ZWZ8ibrcgRS0+tfkQW2D7bFZPmqH4=
 =l2SM
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaCs8EACgkQYKtH/8kJ
 UifgsQ/+KIEX75iw0AB3hlIbqx2ZQ7Y8Lbt3L3x3uBJpV5drAh138Ub5OEF/TWyb
 mHZxoJOuZhUJM2Y1gvQwtVP9PhXpbP9W0/5bBJBcjcIQtiaKn7JvGSV5ugTDabeq
 s22mM9lvoHPhaKk+BeJSsM8axXjEf8ALUdXHz6EowyxpAqQPgGlDRCtb+FKfvoDJ
 /1o9haga14IsWJVBrn8bm00MvZG+Pvx+hgOWQX/uz1YupA37xa2lXJEvAKfrGyar
 MmruSA+Fnh/HVtizNL7faNOwZ/YvonMcWOmH0JV5Mx177woYC66G7FB1nYVQMlZL
 ur1O5rXYQyVPVe7I0s/jtggD/6Fp95dYewCU9NG9oej3/WokXJpvH+QDhG2IRYGF
 P8OnoK6p1C33q/x5HQTHkao3Up4lkClPtPXPUdNXCUaQvIaiclsx02/9qy7KrpC8
 EuyCcN3zS92Ge0EHcLnq0tr2ewNJb1MJ1RL96V0yfwA5HVth4mVlwRTKsJ6ekvJ/
 RdXak3xVotc5tmlPWT75kzm8B94McipwkhN90potAOjSzqapinQ1ss21svyZiLQm
 nq+Fo/aMhv4cdyII6djG0eT2k/vTezjypI9Zj/g7MVp0iNM8G7A2NAhDvQWgOF5i
 a9QGgf+YzGwE5Mw6phOEqu6SkjUgMDH7XFwSGCRZaCWC9eT9nfU=
 =839V
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-drivers-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/drivers

Amlogic drivers changes for v6.11:
- Add S905L & A113X SoC IDs
- add missing MODULE_DESCRIPTION() macro for meson_sm driver

* tag 'amlogic-drivers-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  firmware: meson_sm: add missing MODULE_DESCRIPTION() macro
  soc: amlogic: meson-gx-socinfo: add new A113X SoC id
  soc: amlogic: meson-gx-socinfo: Add S905L ID

Link: https://lore.kernel.org/r/35093904-c4a8-432d-b010-a994fc1ee536@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-01 15:48:48 +02:00
Richard Fitzgerald
2163aff6be
firmware: cs_dsp: Prevent buffer overrun when processing V2 alg headers
Check that all fields of a V2 algorithm header fit into the available
firmware data buffer.

The wmfw V2 format introduced variable-length strings in the algorithm
block header. This means the overall header length is variable, and the
position of most fields varies depending on the length of the string
fields. Each field must be checked to ensure that it does not overflow
the firmware data buffer.

As this ia bugfix patch, the fixes avoid making any significant change to
the existing code. This makes it easier to review and less likely to
introduce new bugs.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f6bc909e76 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")
Link: https://patch.msgid.link/20240627141432.93056-5-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-01 14:10:25 +01:00
Richard Fitzgerald
6598afa932
firmware: cs_dsp: Validate payload length before processing block
Move the payload length check in cs_dsp_load() and cs_dsp_coeff_load()
to be done before the block is processed.

The check that the length of a block payload does not exceed the number
of remaining bytes in the firwmware file buffer was being done near the
end of the loop iteration. However, some code before that check used the
length field without validating it.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f6bc909e76 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")
Link: https://patch.msgid.link/20240627141432.93056-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-01 14:10:24 +01:00
Richard Fitzgerald
959fe01e85
firmware: cs_dsp: Return error if block header overflows file
Return an error from cs_dsp_power_up() if a block header is longer
than the amount of data left in the file.

The previous code in cs_dsp_load() and cs_dsp_load_coeff() would loop
while there was enough data left in the file for a valid region. This
protected against overrunning the end of the file data, but it didn't
abort the file processing with an error.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f6bc909e76 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")
Link: https://patch.msgid.link/20240627141432.93056-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-01 14:10:23 +01:00
Richard Fitzgerald
3019b86bce
firmware: cs_dsp: Fix overflow checking of wmfw header
Fix the checking that firmware file buffer is large enough for the
wmfw header, to prevent overrunning the buffer.

The original code tested that the firmware data buffer contained
enough bytes for the sums of the size of the structs

	wmfw_header + wmfw_adsp1_sizes + wmfw_footer

But wmfw_adsp1_sizes is only used on ADSP1 firmware. For ADSP2 and
Halo Core the equivalent struct is wmfw_adsp2_sizes, which is
4 bytes longer. So the length check didn't guarantee that there
are enough bytes in the firmware buffer for a header with
wmfw_adsp2_sizes.

This patch splits the length check into three separate parts. Each
of the wmfw_header, wmfw_adsp?_sizes and wmfw_footer are checked
separately before they are used.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Fixes: f6bc909e76 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs")
Link: https://patch.msgid.link/20240627141432.93056-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2024-07-01 14:10:22 +01:00
James Ogletree
205fdba5d0 firmware: cs_dsp: Add write sequence interface
A write sequence is a sequence of register addresses
and values executed by some Cirrus DSPs following
certain power state transitions.

Add support for Cirrus drivers to update or add to a
write sequence present in firmware.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: James Ogletree <jogletre@opensource.cirrus.com>
Reviewed-by: Jeff LaBundy <jeff@labundy.com>
Link: https://lore.kernel.org/r/20240620161745.2312359-2-jogletre@opensource.cirrus.com
Signed-off-by: Lee Jones <lee@kernel.org>
2024-06-28 15:35:57 +01:00
Thomas Zimmermann
3285d8f0a2 firmware: sysfb: Fix reference count of sysfb parent device
Retrieving the system framebuffer's parent device in sysfb_init()
increments the parent device's reference count. Hence release the
reference before leaving the init function.

Adding the sysfb platform device acquires and additional reference
for the parent. This keeps the parent device around while the system
framebuffer is in use.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 9eac534db0 ("firmware/sysfb: Set firmware-framebuffer parent device")
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sui Jingfeng <suijingfeng@loongson.cn>
Cc: <stable@vger.kernel.org> # v6.9+
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240625081818.15696-1-tzimmermann@suse.de
2024-06-28 08:50:33 +02:00
Richard Genoud
f1de10ae7b firmware: ti_sci: fix TISCI protocol URL link
The http://processors.wiki.ti.com EOL in january 2021

Fix the old URL with the new one.

Signed-off-by: Richard Genoud <richard.genoud@bootlin.com>
Link: https://lore.kernel.org/r/20240618150933.1824185-3-richard.genoud@bootlin.com
Signed-off-by: Nishanth Menon <nm@ti.com>
2024-06-27 17:44:48 -05:00
Arnd Bergmann
87dcb2f079 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmZ1dMsACgkQAEG6vDF+
 4phkJBAA0ybLo3iExgUTUi7G+zoCvbnt2vCWGhcd/TnOHuQYEl2pJG8N4tAytBDd
 CsUpWtX7nzo2DKV9UOM+TjyFVP0J2m8UvlUVb+X2CNbg2vUfVZLm831EN7WbdS1w
 yXAgyf3QMaLrmT9QVhf5FZDLJF2YV589cdBLML8PsJjbkKE5q3Xre2w3uv7dW7uE
 21zfAxrlqdbj3AuWSTt9aBxnkOXifhw93raoFL3Jr3RHOhaIot7KJbsFUFPNikZQ
 Q5daFnwGkKMslW18LUBB7VYlkDBtsHe4QPFddMKXRSufdQk65kB4q/TL79QDoSQ3
 7CgJZ2yl/gCeLr5nEmTGeQVnxaqQDE0bw1q9DqskcE/2Tfo916l260qix3qzLmtF
 /nmkP8geLijRAqkeAKXxj0vr5j3CWSGn2ziLi0167QUPnYBvtAgKKuPVUwZG3GBE
 hLwPIiclzJA5HnswsQm8zEOWwF1po5mycRV+dxINRWt6rh4jhSWVZvYH77kg6t0I
 wEc7mauh879G5CHuLGiwSof6R2pDzhXRwX9Q37kpYoq10/Vm9KPnm5XeUOQZ5F/s
 lZH8PZfds6M7tALrc9nsdMMF3YMU31oH9bpBYYQrad5J89Cx41OeNM41BkKLK7dW
 K2pJ7wOL3Us7a/gNszbL7kUG7wRVe/qVNouhC0y3uGOPFNScuTs=
 =Kl7/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmZ9eiUACgkQYKtH/8kJ
 Uif0zBAAjk+BS5UP627Uhej+cXrZhHkwRrj6mJ9C4wFYR6672vxhdMh+wPZcbh/H
 yl8/Z+1TUBTmVmQtmKyi0cRhFFX12I0FyXpa7n7WVMhXnmvYRd2SjbRctYfc3pxW
 C1TqHxM3a7bkaknzM4N5Uuj3qpwV74Hbp+rfaEdH4pL44vV2o2OkueM5IsBpgnSb
 Pe1Wn6zXgXFIQyo8aVF7DGxNuBleNgxtX+zfcY5694IGKDKn2llsKxVeM5cDNg2q
 WmKQ7rz7ZqpkDxQBL3wLZnd7lziSPVQ9jJ3m7ECzj7W0RAPQTskeNIlKyKK+9kHB
 HmmiOlLbQu+lirgZ15N3t8kiYFNVh8HDK+p5w/dgUD4EAT+TZgQgun9d61VLf6AT
 uD4XF0fPB3B3PKAfOhp7ZOU6sZH4uibFh+8RAm9xRJjXYvA0Il7gcwbC45O1dQK7
 cqusKECEPTKsFggj0fuYgfDiNEgZpGSFjKAfYvB63aRZjoj7L29YhMl0Hwr87dFC
 vsoJgs0pDW+V4ajqDoRPOLWkDwafMWjIrXxDFTEEw8xLQMTSOUC2Yei4sPDViLLG
 3HTlssc1gO2axhrn5SpxPCgX+UruC4MIacj7kntv1VhYmOE5yoOLeTGV6lWA0LGm
 NSqz0Gr8N+ycbtU2hNu/HULt6TViI3/SwRr2KK45rWHK7qHBu0Q=
 =tW+N
 -----END PGP SIGNATURE-----

Merge tag 'ffa-updates-6.11' of 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/20240624103451.2870146-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-06-27 16:41:41 +02:00
Arnd Bergmann
7cab811dfe 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmZy+u8ACgkQAEG6vDF+
 4pi1txAAqhkjxC+pRVomJXkFvpUBGuFXYegChIMIheMfuFWp52zbIBq9Vapb1GnV
 ropLGFyjp5lfV8aOHGHOitkw8NNpXjvrUGyE/l4ClFClIsPrDiAO5OoM5e6rpZek
 +JmVpUcRzbC4r4xiTWSuHu+qIlp/QZln7lY65/1rwPZIot51gPe5P8aMBAsgJDOM
 FK8LgVPbcHsyiXUetZHT/OcooBXI/Rg27Av28gOLce4gTAZhwYhTQTioXq3mSQMI
 tEPX0P2qqDkgGHEgriISFrsidezRYSt65wb9nSaQPT31wkF/p/oDTVqVH5GodiAP
 th44xePd6bIb/t0fo56Wb9SeLAYwgz1lHwz/gt8esIbUxVo9PLl2Jv71dR1lntBv
 KK3mfUQnvXG3P8YTmLG8/lUNKGqryynic8SHI4TAYl4Urz2QJ0fUHlLik14LjRa7
 j9+g9Ry9hOvppUakPmQKQfzo6QLMVrFbxcU5rL7o4CPaNuZXSxkuapGVgZ5UGDPR
 03PtDpjO/jCLb3pGYZzzTOg5qCHM7nBcxM8Qpq+zGep24/3/kEmnbYkKMUKhEKzb
 cVPCKkbSaq37XQ3Xu7UU62ljv1nV9IvBaIs3hNPyZgrwhtjs9JLwGV5zcFpIzNQ7
 bQgVCuU/Me7wggUW7SGY2OnHGyHwGEbe8xT3pFSWXobEg8c6znw=
 =LNEQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmZ9eeEACgkQYKtH/8kJ
 UidkXBAA3HIWe16KwHu1O6tMQSu1v3/3Mf2brakIDZf6ygI6x9SM7cf+xXTiqiBR
 h3tVhbig17mUHiIUKvUolhwh1DEwdBohUzrAy6PLeBQgN+YQ0yFR9cI8koiwZKWj
 b/n44baDixmqNxu1twd7lJgiJO/aZrK6lDGtnfHTvXm0hH7mqYsWwF95uk2nFZwU
 LffjAq+8XhIzbOeG0jpVO6mZKHksLdlMdr9lPYc3xXlxpn/tFhG8CwUTJfrAXB2A
 6MKk0gNBbYORoD7SSt2L9oE1iXlZpfEnBAwTsNfdpPJhL2Fz8HeOA8vUi0u4iC+h
 5wobxSRjJFqTkidrYsdTcPsvZEU6rq5ulPJm7b+p3elX9zD8zic9wE9/GdNr938P
 qpTqZPrP2Lae3hmjObuxKygtS10qjgwPlYwd3pRlVk/1l76TuReL/yZyigJx5zNd
 ZUQ21Rj6aoMiCqoetyYt39oW2p6DfAvIJKwjdLdLc0cvlHuQrYRb3ou1YUdetFMq
 fblRH4/0j+GUT+GsxKglHBBdoZn2zwqE4CWCXSoW0R3U/utPzyXK54X5JPEMiA9l
 CJrKdsqjO2nVZ2T1+1yqH8H0lHruUQoK2ly0bkMR5wTBXon9Bb4ga8G3kQgM320i
 gko/Zxvw0rHIpausOdBXb65xM041ZAcVfRkryP1+Z8rnzdxx9f4=
 =y+uP
 -----END PGP SIGNATURE-----

Merge tag 'scmi-updates-6.11' of 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/20240620093924.375244-3-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-06-27 16:40:33 +02:00
Haibo Xu
d6ecd18893
riscv: dmi: Add SMBIOS/DMI support
Enable the dmi driver for riscv which would allow access the
SMBIOS info through some userspace file(/sys/firmware/dmi/*).

The change was based on that of arm64 and has been verified
by dmidecode tool.

Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20240613065507.287577-1-haibo1.xu@intel.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2024-06-26 08:02:33 -07:00
Bartosz Golaszewski
d96377892d firmware: qcom: tzmem: export devm_qcom_tzmem_pool_new()
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 <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406250127.8Pl2kqFp-lkp@intel.com
Fixes: 84f5a7b67b ("firmware: qcom: add a dedicated TrustZone buffer allocator")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240624190615.36282-1-brgl@bgdev.pl
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-24 17:43:28 -05:00
Jeff Johnson
5375986e16 firmware: meson_sm: add missing MODULE_DESCRIPTION() macro
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 <quic_jjohnson@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20240613-md-arm64-drivers-firmware-meson-v1-1-28e4138a8597@quicinc.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2024-06-24 10:08:53 +02:00
Bartosz Golaszewski
dcf5bd889a firmware: qcom: scm: clarify the comment in qcom_scm_pas_init_image()
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 <bartosz.golaszewski@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-13-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:43 -05:00
Bartosz Golaszewski
a33b2579c8 firmware: qcom: scm: add support for SHM bridge memory carveout
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-12-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:21 -05:00
Bartosz Golaszewski
f86c61498a firmware: qcom: tzmem: enable SHM Bridge support
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 <bartosz.golaszewski@linaro.org>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-11-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:21 -05:00
Bartosz Golaszewski
178e19c0df firmware: qcom: scm: add support for SHM bridge operations
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 <bartosz.golaszewski@linaro.org>
Acked-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-10-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:20 -05:00
Bartosz Golaszewski
6612103ec3 firmware: qcom: qseecom: convert to using the TZ allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Reviewed-by: Amirreza Zarrabi <quic_azarrabi@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-9-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:05 -05:00
Bartosz Golaszewski
bd6ad954e7 firmware: qcom: scm: make qcom_scm_qseecom_app_get_id() use the TZ allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Maximilian Luz <luzmaximilian@gmail.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-8-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:05 -05:00
Bartosz Golaszewski
d7e23490bc firmware: qcom: scm: make qcom_scm_lmh_dcvsh() use the TZ allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-7-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:05 -05:00
Bartosz Golaszewski
ab6902690d firmware: qcom: scm: make qcom_scm_ice_set_key() use the TZ allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-6-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:05 -05:00
Bartosz Golaszewski
2dcd12ca6f firmware: qcom: scm: make qcom_scm_assign_mem() use the TZ allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-5-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:05 -05:00
Bartosz Golaszewski
449d0d84bc firmware: qcom: scm: smc: switch to using the SCM allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-4-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:05 -05:00
Bartosz Golaszewski
40289e35ca firmware: qcom: scm: enable the TZ mem allocator
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 <bartosz.golaszewski@linaro.org>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Tested-by: Andrew Halaney <ahalaney@redhat.com> # sc8280xp-lenovo-thinkpad-x13s
Tested-by: Deepti Jaggi <quic_djaggi@quicinc.com> #sa8775p-ride
Reviewed-by: Elliot Berman <quic_eberman@quicinc.com>
Link: https://lore.kernel.org/r/20240527-shm-bridge-v10-3-ce7afaa58d3a@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2024-06-23 16:08:04 -05:00