Commit graph

1,294,499 commits

Author SHA1 Message Date
Javier Carrasco
7b34303d9d clk: lpc32xx: Constify struct regmap_config
`lpc32xx_scb_regmap_config` is not modified and can be declared as const
to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240703-clk-const-regmap-v1-7-7d15a0671d6f@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 13:32:47 -07:00
Javier Carrasco
db8061ef91 clk: xilinx: Constify struct regmap_config
`vcu_settings_regmap_config` is not modified and can be declared as
const to move its data to a read-only section.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://lore.kernel.org/r/20240703-clk-const-regmap-v1-10-7d15a0671d6f@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 13:32:26 -07:00
Puranjay Mohan
90dc946059 selftests/bpf: DENYLIST.aarch64: Remove fexit_sleep
fexit_sleep test runs successfully now on the BPF CI so remove it
from the deny list. ftrace direct calls was blocking tracing programs
on arm64 but it has been resolved by now. For more details see also
discussion in [*].

Signed-off-by: Puranjay Mohan <puranjay@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20240705145009.32340-1-puranjay@kernel.org [*]
2024-07-08 22:24:54 +02:00
FUJITA Tomonori
549d3c2ffb rust: add 'firmware' field support to module! macro
This adds 'firmware' field support to module! macro, corresponds to
MODULE_FIRMWARE macro. You can specify the file names of binary
firmware that the kernel module requires. The information is embedded
in the modinfo section of the kernel module. For example, a tool to
build an initramfs uses this information to put the firmware files
into the initramfs image.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240501123548.51769-1-fujita.tomonori@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-07-08 22:20:09 +02:00
Aswin Unnikrishnan
63249a070e rust: fix datatype in docs for module macro arguments
Remove the mention of byte array as datatype for `module` macro arguments
since the arguments are defined as string, and `alias` is a string array.

Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240512112324.8514-2-aswinunni01@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-07-08 22:20:08 +02:00
Aswin Unnikrishnan
67f9c312b0 rust: add example for alias argument in module macro documentation
Add example for `alias` argument supported by `module` macro.
`alias` accepts an array of alternate names for the module as string.

Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Aswin Unnikrishnan <aswinunni01@gmail.com>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Link: https://lore.kernel.org/r/20240512112324.8514-1-aswinunni01@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-07-08 22:20:08 +02:00
Uwe Kleine-König
19a01155dd ipmi: Drop explicit initialization of struct i2c_device_id::driver_data to 0
These drivers don't use the driver_data member of struct i2c_device_id,
so don't explicitly initialize this member.

This prepares putting driver_data in an anonymous union which requires
either no initialization or named designators. But it's also a nice
cleanup on its own.

While at it, also remove commas after the sentinel entries.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Message-Id: <20240708150914.18190-2-u.kleine-koenig@baylibre.com>
Signed-off-by: Corey Minyard <corey@minyard.net>
2024-07-08 15:05:18 -05:00
Oliver Upton
cb52b5c8b8 Revert "KVM: arm64: nv: Fix RESx behaviour of disabled FGTs with negative polarity"
This reverts commit eb9d53d4a9.

As Marc pointed out on the list [*], this patch is wrong, and those who
find themselves in the SOB chain should have their heads checked.

Annoyingly, the architecture has some FGT trap bits that are negative
(i.e. 0 implies trap), and there was some confusion how KVM handles
this for nested guests. However, it is clear now that KVM honors the
RES0-ness of FGT traps already, meaning traps for features never exposed
to the guest hypervisor get handled at L0. As they should.

Link: https://lore.kernel.org/kvmarm/86bk3c3uss.wl-maz@kernel.org/T/#mb9abb3dd79f6a4544a91cb35676bd637c3a5e836
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2024-07-08 19:50:51 +00:00
Chunyan Zhang
f3a6a54104
MAINTAINERS: Move myself from SPRD Maintainer to Reviewer
I've resigned from Unisoc (formerly Spreadtrum) and cannot access
internal HW specifications any more, also cannot commit much
time for maintaining sprd code, especially DTS.

While I'm happy to help review the sprd drivers I wrote before.

Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Link: https://lore.kernel.org/r/20240705091133.3308539-1-zhangchunyan@iscas.ac.cn
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-08 21:38:00 +02:00
Arnd Bergmann
a4dd55f8c2 soc/tegra: Changes for v6.11-rc1
This is a simple change that condenses two function calls into one in
 two places to save some boilerplate.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAmZ+3LYACgkQ3SOs138+
 s6G08Q//e0ikflcmOtRpPBq/0/63yQJG3ztIIRBdxnLoCQX+hTsjnKUvzL4X59s1
 ubI8hmtLZWrEdid5rn0LwB8bD1Td3cWwX6fmCUUuqODtlXN46gDN5cDmmGWowlIw
 cd62F6rYQsMpIQeTfbGoT1eLOlpfFYGGP+Xy5ut83pgxU2d/03CER9NdlXrEmvoP
 64RZa4k9XKVcHfYhQne6vfwICAJDIj9JzHZkSkggbyt0MGhe+a6YM8NOV6khzxnY
 7M+y/dz4QX7HnjFFpi+Gjg629WX/HxVWQa9g5YTUnBXk3eQfypatu7bcVUA7InVk
 Vi8owYbeH+bgtNJ66W2IdSeZidP9iRtcQbBqFPuVf47tKqChYJYAXQW8IOxZSnWS
 nnx7xUtrcZ6vTVdx19u8NjfXjRDLdLoH3BaSHnxtmQ/6muzn1IV26/CsWs+u3KOG
 vqR+GUwSGP5PduVLVwSts23WeCDyXQ/no6Bbj3a/R03qanQdo4zyxCWuNn72QzY7
 D71+6SLAWVlT/8XqA8tkJ1AyQGXlbS1IH15tDRpYH6d6GSLHmBlfLzHE23Ha0kl0
 j4bK+DoVjNqvqipHghIkWqKnvTqk4EE5UG1JdirBjXGG/MhcWCQq3MElWzAPruT4
 F6sWo1sroFiEy1fvKChykjyK/hjXaQ08QHpMvRTdRDeJJWG5aw8=
 =c6cF
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaMP2cACgkQYKtH/8kJ
 UifAyBAAx2hAmPqg25o8ZRpDHXz6A0iLQ982W5oVm/ADOWjwALAGLQ5OEiTmzpxq
 FTPk7YQK168nKnoCIAXlud5Ct7IjtaD5DQ72hgu6ZmT54NLoGHw6qZv8xte038FS
 glPoqOnQzQksji4xwXl6HwuKI8dMXCcVL0xJVKdl0kVeK1UAvEDNsxoPZ8HvHr5P
 vFPVioDxXiOq6HrPbcM13gMqz1fog5OLEcix/c1N7Tqxre+v6hx3xcxVqSMYCSRl
 RG9w+10CfMmQElvwinZcqasIyK8nkF2UQVPe0CG7BBnfX73Z+mqhb7B4ZH7pdJkW
 oO5UizXzw0XuZoRRbGTB0zeKxHEGdMx5LZ8OJRj3cFg0r4YGAQ4Kr9kPv76gX8Us
 LeFv41oP/zKeztmqO3uKlbYe596I4qfpIyxX77KC+2ZymLxDZ4HyprRn+3VM2zv7
 ppU+94aPvTfvayX+ax/4YCUwrI1tCgTecifLRrlJA8e9JImNs72cE7tU+rUEiZVe
 OEN2fDMGBtKOGEPZxTPI35KBYyLHSpp8P476dfzC8mEsgS6qHRDiZ1GjrOJwNbQg
 ZVTFNvcYNyvb43iTwb/Q9rgRqPjyluS7mpG09bj0nLAEL3aieyXQ8SFHYla0WZB8
 TAzThGuUQjMI++P0Ki9B4HJClE0Xt8n/ZXbBUbGtyAMGi6fh3OM=
 =5chF
 -----END PGP SIGNATURE-----

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

soc/tegra: Changes for v6.11-rc1

This is a simple change that condenses two function calls into one in
two places to save some boilerplate.

* tag 'tegra-for-6.11-soc' of https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  soc/tegra: pmc: Simplify resource lookup

Link: https://lore.kernel.org/r/20240628210818.3627404-1-thierry.reding@gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-08 21:35:03 +02:00
Arnd Bergmann
43528789a0 RISC-V config update for v6.11
StarFive:
 Enable most of the options needed for the jh7100 based boards to be
 properly testable with defconfig.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZorLpAAKCRB4tDGHoIJi
 0jCRAPwP4dWXvXRr3889fZKWhwG8QgPp4WOMWUN6qEXXrc5p1gD+L6VOKPblFH6e
 4cVv8BwYHpqhhVt0P+wU6lvtq2xnLAc=
 =PAkK
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaMPwMACgkQYKtH/8kJ
 UieEvQ//XP74fK0j/RCHTJlTzpT7J6rcl5dumQ6Y4Abt+DQTFcwC5evMmFwLcZFc
 WBVsDiuJi7NXJhIJaXUEbAjQhgAMR+lNm985Gi1dKMEuYGtUvpoNH2D4h0/RBJJH
 rnJ3FNZBwkfsXf7pF3BY8jlBQk9Qu9yGYfiD3F2sjuClLYvU0AIjv0cO7yph/pUR
 NLrgfPr748A5SnwbQDN9zO8S6uv6hjpL4qG0q/ao9UjiD76yTK61Xet27KRr9coE
 B3ylawAw484D72/iJBtoYgtqZlUDCTJQxsXIE9Fxz3kfGzCIhEV4dG0LSqqNkn8I
 nq3hUkoONt1HYkgOP5HkV4Nl51Z0Haf7Nu4h0ikORg6VFGGKeou+6MYrc/tRNgTl
 bqa0hKAyeQhr/xZuPgKFve8prIeJNoBaxLEzC1pvk++pgfyLaCMvu2/8uH0C1mhW
 dH7TxvmF/P7nsaGANOIWD7cz7d4Gear0qiFYXsNHOBRoHR2wHpqipiVTIv4cgw4A
 u4NWC9e9OKoB1HYqaUYreHkMYuocCLvwAj+Bi22kH5YgofbQx/zn4GCQaQn6XX6f
 /s9XV+Tn8kt/wz39DJr9MVTFoJ0YdUlJwCYmA+F2qz+DXDOmExj14U/sP7nnKqgR
 jEolQVmRv9PjcTjhu48P1NBQb5SsWINUZH9cz8+rUVmrdBO6vsU=
 =ib+4
 -----END PGP SIGNATURE-----

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

RISC-V config update for v6.11

StarFive:
Enable most of the options needed for the jh7100 based boards to be
properly testable with defconfig.

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

* tag 'riscv-config-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  riscv: defconfig: Enable StarFive JH7110 drivers

Link: https://lore.kernel.org/r/20240707-unused-outflank-aa127ccb2cfe@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-08 21:33:23 +02:00
Arnd Bergmann
fa38c95798 Qualcomm Arm64 defconfig updates for v6.11
This enables the newly introduce Shared Memory Bridge driver which
 improves the mechansim with which buffers are shared with TrustZone.
 
 It turns MSM8996, SM8150 and SM8350 interconnect providers to builtin,
 as debug UART now depends on these.  The SM8350 GPU clock controller is
 enabled.
 
 The secure QFPROM driver is enabled, to provide access to OTP
 configuration for the LLCC driver on the QDU1000 platform.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmaJaGsVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3F5zwQAMidZd3wszmWZ945zWq/p+kNNqxx
 N+/Stb4Yxg/6jvjROiWZ8XhFEpjEBlV/90EdruQfs1NuRjtHZowRtPhsTPOw1DQ1
 DssJOZBWPJu5E5ar0WVi/JYQJA2S18FwgCn3PB5BSvTaHnA495HBpqMd8EJ+0hO6
 rkWI585xRNAyyFISfsFLR7S5c3STyRnDnSBafTFkXPlALwiRg/6rl/JGIA246Z4Q
 lDWmrt1tMUtrL97JR9fm9qDSiZ5AF22s1DujlaeVtXym7Ob0iwJsMpoRml/uH4Wv
 sZP/LGi39YCFTa+l8C+Ymx/LSlXmTfjGQPx/y/GUQSpLte92yNckaYtP0TvOZeVr
 4iPaq4LDUdNK++iOJJOOsJvOgRYv39CRLAMfoP8RWi0r1V2Ds014waaQX62b43bx
 Xo9cam8IeuvJTstvYiz7n4KjANZJ3XVvxdDY67ClJwXxHRJghQtCrj7QVgR6F7mN
 EMe79YiwZtGAZubxD4OeGQP2LfyphQyxVo67gHI8Zf3SP2YBzgFyNh+Xiiurqxx+
 6WVaE1ZQqxzpGvdrqa4W4hEC7KOoTMmbFs7n+CbTTJTYzqSXUfMDN56IT7CGioAV
 U1POw6mMDtGVwcQwCcSOusPoAqfaJMjVq4D/4sLg03KQfOrUrLQJUl/N9oiTRFKx
 sbsN5wPzBcBTSbP2
 =NYA7
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaMPrgACgkQYKtH/8kJ
 UieBbRAA3F0Kx6xXTjsUe+3bkUXszN2ZwRA+tLlUU9wQ0iC4FqKz2itrYfOBUgzm
 fNsH9Xrv2+zNgbcQiJBmAQyax7v2D5Z6Cnk46ZVU1hkd2zqxhJEKok2M86tt1U9F
 uRAOCf6Ct3Xi3ZAFA+fbpUUyVxvjevdi/Hg5kqHQzpvLImu9YznYzI5SHsj/6eTw
 p8xJQt6Hy9TaRTrESj7W+9/rf77Ly064YwaQARkuQ8uEMENeoudndVSX1Vgu2f0o
 8EQB25M7krVzzd8rUybhm6r03EVTmcuf0avt8nJFFlcD0X7G0o+lpgl4lhDNRk6M
 agMluwa6wneTQP4UD6QZT02qAjqa6zF2riryakqw7lvhKAtocdQjEkO81I3857RC
 YheP1Y2F7W2Dc2gEZD5+E/WlBJoDH51stzHuAAZrVS5YTiVwbvr0mAlxwkqv2EsT
 kqqFKiY6hEdwKXZ8o5pTIBZyZT4wTpyBXK8172cSgu9ecwfgQ1Xa1HhXXGmeYhCq
 rhIF2xA0IPP7xaVnGFZHRfFfMDUQzCr5pPAXSPm0Dmx5+8cZ9w+0c1orMkpVhMWX
 wRKrH3iD/WH0MzDOJDoXA39l+xtl0XE0tEEqUEyw1kl9nRLzfy2S2gcW8HjIy6y3
 bzwEzNDQ0ep9QY0OVFj4oLlpqQde+k8HH4s4uNXdcaFiyiT+YDg=
 =SFGH
 -----END PGP SIGNATURE-----

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

Qualcomm Arm64 defconfig updates for v6.11

This enables the newly introduce Shared Memory Bridge driver which
improves the mechansim with which buffers are shared with TrustZone.

It turns MSM8996, SM8150 and SM8350 interconnect providers to builtin,
as debug UART now depends on these.  The SM8350 GPU clock controller is
enabled.

The secure QFPROM driver is enabled, to provide access to OTP
configuration for the LLCC driver on the QDU1000 platform.

* tag 'qcom-arm64-defconfig-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: enable SHM Bridge support for the TZ memory allocator
  arm64: defconfig: Enable secure QFPROM driver
  arm64: defconfig: enable several Qualcomm interconnects
  arm64: defconfig: make CONFIG_INTERCONNECT_QCOM_SM8350 built-in
  arm64: defconfig: enable CONFIG_SM_GPUCC_8350

Link: https://lore.kernel.org/r/20240706155347.16207-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-08 21:32:07 +02:00
Arnd Bergmann
31f62c5d88 TI K3 defconfig updates for v6.11
Enable Hyperbus support present on various J7xx EVMs
 OMAP_USB2 driver for AM65 SoC
 LP873X PMIC related drivers for am642-phyboard-electra
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEEyRC2zAhGcGjrhiNExEYeRXyRFuMFAmaICZIQHHZpZ25lc2hy
 QHRpLmNvbQAKCRDERh5FfJEW4wzwCADHoqrzlfTrO4n6tRJ5Gz8YRHu4G5HZryJv
 SQgR2Nt+6H63rmxSgmI9vvr6KdEpYxUdbWNgsj3d13lgkN8S1yuKlF6JT14Esh2g
 crWags8GC/YU+3rhzCvami1kmGBxGC6Hlprsrm2qBLFWh3GMtfZ4eEtzdu7ybi8m
 yuarCgglUhj4+fwpoH2CkoLJdR6xrxKhwJZyHeaBnlVbicw0FJGT9UcrVOGldBqe
 1GZxVBxMnLgjGL0MyDTmREwNOEkXPDkiK3LsUkmi3Iq1jeZO4v7RCFDPTaopJ2pD
 espb8fG1Ot08/CQlRemRKmDcXZm+3ZaFYRW9K2vH1v+PNhSjXsuf
 =ixot
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmaMPpYACgkQYKtH/8kJ
 UicJZw/6AjM43yMPZutn+QaLxxDv5GltMa5S35ZPPkzYU4Kik8nVb0eoC5GBWnIc
 NfVhaGnZh2dxW5bpGGLWPAzMru/5emZ5sulXfivVnJdeOsOTWeYzvQuV57xlc/Ge
 orsoocsyR7P5pnTo+GMB88eT2375NUFCBTjUpILyybaQpa4+6bjW/6MuG91ALJaa
 aTRsGSEygaCWSeHaejy/Bb2VPPmmAbOtH7bMHSqNzQkBMH9f1LpAws7Hd2pzwkn/
 ncJEleeEfY1d/Qn+ysa2b16OQMW9bj1kEwPuglFbMfKNQ/IaAdmqNkTxdX7CSBFU
 fPijky9BEXgv2rZ9wWV1CG+3Q+EWVUNAYx0PpIYDzNUMx6QPKftdOa5/Hvm179pV
 D8U1Qu1oTCfKzeCbINrPDUHTrDZ/xlPGV0QsCmW9jK0Z57Cnuh8VbzuXdWi4qX5p
 iFujquYRpDwisFs3Vm3tFSQsP2tPc/ENwqlMW2G0KbQlOXeH9M35IxjjFDkWTkuW
 tovZj7nvYlTNfP4mvrO0EUXeEIGO6QqIRA3ZASTUFGqP7x4AuChdYKBDuEfyCQM8
 BpSPEeskolklzJmHDw11EboMv1nP/gCmMepj7e84FsEx70T3VbQOALRKD0xk8FXP
 ALjA7sX+xSXsLOIVePbpVepCIn56L10auC8/QPAqej9t6LPWiVg=
 =Q7zZ
 -----END PGP SIGNATURE-----

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

TI K3 defconfig updates for v6.11

Enable Hyperbus support present on various J7xx EVMs
OMAP_USB2 driver for AM65 SoC
LP873X PMIC related drivers for am642-phyboard-electra

* tag 'ti-k3-config-for-v6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: defconfig: Enable TI LP873X PMIC
  arm64: defconfig: Enable USB2 PHY Driver
  arm64: defconfig: Enable MTD support for Hyperbus

Link: https://lore.kernel.org/r/c6b2a0c3-e8c3-4e7a-90ca-a3b9834c63c9@ti.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-08 21:31:34 +02:00
Christophe Roullier
d7d906675d
ARM: multi_v7_defconfig: Add MCP23S08 pinctrl support
Enable MCP23S08 I/O expanders to manage Ethernet PHY
reset in STM32MP135F-DK board.

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>
Link: https://lore.kernel.org/r/20240705134407.2833659-1-alexandre.torgue@foss.st.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-07-08 21:31:12 +02:00
Thorsten Blum
18c18b1ff6 gcc-plugins: Remove duplicate included header file stringpool.h
The header file stringpool.h is included for GCC version >= 8 and then
again for all versions.

Since the header file stringpool.h was added in GCC 4.9 and the kernel
currently requires GCC 5.1 as a minimum, remove the conditional include.

Including the header file only once removes the following warning
reported by make includecheck:

  stringpool.h is included more than once

However, it's important to include stringpool.h before attribs.h
because attribs.h uses some of its functions.

Compile-tested with GCC 14.

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Link: https://lore.kernel.org/r/20240629233608.278028-2-thorsten.blum@toblux.com
Signed-off-by: Kees Cook <kees@kernel.org>
2024-07-08 12:20:32 -07:00
Bert Karwatzki
50b040ef37 PCI/pwrctl: only call of_platform_populate() if CONFIG_OF is enabled
If of_platform_populate() is called when CONFIG_OF is not defined this
leads to spurious error messages of the following type:
 pci 0000:00:01.1: failed to populate child OF nodes (-19)
 pci 0000:00:02.1: failed to populate child OF nodes (-19)

Fixes: 8fb18619d9 ("PCI/pwrctl: Create platform devices for child OF nodes of the port node")
Signed-off-by: Bert Karwatzki <spasswolf@web.de>
Closes: https://lore.kernel.org/all/20240702173255.39932-1-superm1@kernel.org/
Reviewed-by: Lukas Wunner <lukas@wunner.de>
Acked-by: Krzysztof Wilczyński <kw@linux.com>
Reported-by: Praveenkumar Patil <PraveenKumar.Patil@amd.com>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240707183829.41519-1-spasswolf@web.de
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-07-08 21:15:26 +02:00
Lorenzo Bianconi
bf288bd25d clk: en7523: Remove PCIe reset open drain configuration for EN7581
PCIe reset open drain configuration will be managed by pinctrl driver.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/43276af5f08a554b4ab2e52e8d437fff5c06a732.1719485847.git.lorenzo@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:08:43 -07:00
Lorenzo Bianconi
db7a4a11e8 clk: en7523: Remove pcie prepare/unpreare callbacks for EN7581 SoC
Get rid of prepare and unpreare callbacks for PCIe clock since they can
be modeled as a reset line cosumed by the PCIe driver
(pcie-mediatek-gen3)

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/16df149975514d3030499c48fc1c64f090093595.1719485847.git.lorenzo@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:08:43 -07:00
Lorenzo Bianconi
e0d8ea4ed5 clk: en7523: Add reset-controller support for EN7581 SoC
Introduce reset API support to EN7581 clock driver.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Tested-by: Zhengping Zhang <zhengping.zhang@airoha.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/4f735d17e549ea53769bf5a3f50406debb879a44.1719485847.git.lorenzo@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:08:43 -07:00
Lorenzo Bianconi
7aa291962f dt-bindings: clock: airoha: Add reset support to EN7581 clock binding
Introduce reset capability to EN7581 device-tree clock binding
documentation. Add reset register mapping between misc scu and pb scu
ones in order to follow the memory order. This change is not
introducing any backward compatibility issue since the EN7581 dts is not
upstream yet.

Fixes: 0a382be005 ("dt-bindings: clock: airoha: add EN7581 binding")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/28fef3e83062d5d71e7b4be4b47583f851a15bf8.1719485847.git.lorenzo@kernel.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:08:43 -07:00
AngeloGioacchino Del Regno
6681afbb9c dt-bindings: clock: mediatek: Document reset cells for MT8188 sys
The MT8188 sys clocks embed a reset controller: add #reset-cells
to the binding to allow using resets.

Fixes: 1086a5310f ("dt-bindings: clock: mediatek: Add new MT8188 clock")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20240619085322.66716-2-angelogioacchino.delregno@collabora.com
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:07:51 -07:00
Alper Nebi Yasak
7f294d10eb clk: mediatek: mt8173-infracfg: Handle unallocated infracfg when module
The MT8173 infracfg clock driver does initialization in two steps, via a
CLK_OF_DECLARE_DRIVER declaration. However its early init function
doesn't get to run when it's built as a module, presumably since it's
not loaded by the time it would have been called by of_clk_init(). This
causes its second-step probe() to return -ENOMEM when trying to register
clocks, as the necessary clock_data struct isn't initialized by the
first step.

MT2701 and MT6797 clock drivers also use this mechanism, but they try to
allocate the necessary clock_data structure if missing in the second
step. Mimic that for the MT8173 infracfg clock as well to make it work
as a module.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Link: https://lore.kernel.org/r/20240612201211.91683-1-alpernebiyasak@gmail.com
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:06:43 -07:00
Christian Marangi
9f7809c6a8 dt-bindings: clock: mediatek: add syscon compatible for mt7622 pciesys
Add required syscon compatible for mt7622 pciesys. This is required for
SATA interface as the regs are shared.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://lore.kernel.org/r/20240628105542.5456-2-ansuelsmth@gmail.com
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 12:01:46 -07:00
Stanislav Jakubek
db469084e3 dt-bindings: clock: sprd,sc9860-clk: convert to YAML
Convert the Spreadtrum SC9860 clock bindings to DT schema.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Link: https://lore.kernel.org/r/ZobghvwZAyMjl4eB@standask-GA-A55M-S2HP
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 11:59:20 -07:00
Frank Li
0d796569e1 dt-bindings: clock: qoriq-clock: convert to yaml format
Convert qoria-clock DT binding to yaml format. Split to two files
qoriq-clock.yaml and qoriq-clock-legancy.yaml.

Addtional change:
- Remove clock consumer part in example
- Fixed example dts error
- Deprecated legancy node
- fsl,b4420-clockgen and fsl,b4860-clockgen fallback to fsl,b4-clockgen.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20240701205809.1978389-1-Frank.Li@nxp.com
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 11:58:17 -07:00
Stephen Boyd
54cb3bb483 RISC-V SG2042 clock driver changes for v6.11
Sophgo:
 Added clock support for sg2042
 
 Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEyXBewyFOIoMq4pDN7RKLaY1m8IIFAmZr6VMACgkQ7RKLaY1m
 8IJxlgv9HsYLD8VxRiW9x94EZvrMAAVmf7YMV06QXOdtNBeqSmLUqRQlSld0rBZL
 O6dnWgnIEmCiUg1CzmIZNezy86CDxciItF1nHkya6dggJIXTca1EAAesfcy1MVML
 iNK3mE2xln7QU5NXOlW7epmlXXsuY6TTd0faYq5v3LsoAYihavTd8EfjMUiHV/Ye
 sh2lK056xfG9OWrhBxAZqiDiPlATEOIvn+3Mo4sTLuD9aRz5RfkQkgtf9wVThTHX
 a2Kk29Me0sI1ydOGz2ff3049oL55OQVJIMhAkfbVb24uk1lB0ntFO/Sshv1CCYdb
 aYGNBhVYC8lVYYuMyBez0eCI7K32EmwLRPmLpdv2rbRWZwOJxjjla6qYeh/s8BBy
 RExBHk65gb12cFDKj61vzZIPluK/QitFRTW4QfE43jsC1zHxZAjWybvZkLpzQBwr
 rpeSV5RPz/eIckVZ/w+W998VQeuOHR9N6+uciscrE5T7m/sMIx78XhR+7RzHTsRz
 3bk8qtL9
 =yHTh
 -----END PGP SIGNATURE-----

Merge tag 'riscv-sg2042-clk-for-v6.11' of https://github.com/sophgo/linux into clk-sophgo

Pull RISC-V SG2042 clock driver changes from Chen Wang:

 - Add sg2042 clk driver

* tag 'riscv-sg2042-clk-for-v6.11' of https://github.com/sophgo/linux:
  clk: sophgo: Add SG2042 clock driver
  dt-bindings: clock: sophgo: add clkgen for SG2042
  dt-bindings: clock: sophgo: add RP gate clocks for SG2042
  dt-bindings: clock: sophgo: add pll clocks for SG2042
2024-07-08 11:46:31 -07:00
Stephen Boyd
04718d1e4d More exported clocks for rk3128 peripherals, conversion to kmemduo_array
for clock controllers and both rk3128 and rk3188 drop the CLK_NR_CLKS
 from their dt-binding header, where it does not belong.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmaG9OkQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgRK1CACGI6t5JF2iMisJq0dpwA9HhREvu9NnUwtu
 v/AteJyo9rl/3ox55U3srlaTM4AP2+F4e7ZsVrjwVXKcGg4ir6PEkxTJ3sigOcAK
 7FSHbcOcDfsRk46Yu/ZhvRQEuVJpuL5F/M36Vdmt2/wVUooCSWVc6RJPtnsdJpx7
 rvGY7/fnc0b5uRtZq8mhvbIF11uj80kokKNENWWJ11uymQp4igtEGxYnYMlb/5CO
 bXqo98+8ce6cz50piRuFB6NzWhl7BlnSTf5RiMATvi0zgu2I7BVNw5yjvfHVkv6L
 XTEF/4B+gxpDOcn65Z7YlD2lhnX5uNvh4kjCsmYxmhkG3L5j+OtT
 =TXXc
 -----END PGP SIGNATURE-----

Merge tag 'v6.11-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip

Pull Rockchip clk driver updates from Heiko Stuebner:

 - Export more clocks for Rockchip rk3128 peripherals
 - Convert Rockchip clk drivers to use kmemdup_array()
 - Drop CLK_NR_CLKS from Rockchip rk3128 and rk3188 binding headers

* tag 'v6.11-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  dt-bindings: clock: rk3188-cru-common: remove CLK_NR_CLKS
  clk: rockchip: rk3188: Drop CLK_NR_CLKS usage
  clk: rockchip: Switch to use kmemdup_array()
  clk: rockchip: rk3128: Add HCLK_SFC
  dt-bindings: clock: rk3128: Add HCLK_SFC
  dt-bindings: clock: rk3128: Drop CLK_NR_CLKS
  clk: rockchip: rk3128: Drop CLK_NR_CLKS usage
  clk: rockchip: rk3128: Add hclk_vio_h2p to critical clocks
  clk: rockchip: rk3128: Export PCLK_MIPIPHY
  dt-bindings: clock: rk3128: Add PCLK_MIPIPHY
2024-07-08 11:34:41 -07:00
Stephen Boyd
01a0a6cc8c clk: qcom: Park shared RCGs upon registration
There's two problems with shared RCGs.

The first problem is that they incorrectly report the parent after
commit 703db1f5da ("clk: qcom: rcg2: Cache CFG register updates for
parked RCGs"). That's because the cached CFG register value needs to be
populated when the clk is registered. clk_rcg2_shared_enable() writes
the cached CFG register value 'parked_cfg'. This value is initially zero
due to static initializers. If a driver calls clk_enable() before
setting a rate or parent, it will set the parent to '0' which is
(almost?) always XO, and may not reflect the parent at registration. In
the worst case, this switches the RCG from sourcing a fast PLL to the
slow crystal speed.

The second problem is that the force enable bit isn't cleared. The force
enable bit is only used during parking and unparking of shared RCGs.
Otherwise it shouldn't be set because it keeps the RCG enabled even when
all the branches on the output of the RCG are disabled (the hardware has
a feedback mechanism so that any child branches keep the RCG enabled
when the branch enable bit is set). This problem wastes power if the clk
is unused, and is harmful in the case that the clk framework disables
the parent of the force enabled RCG. In the latter case, the GDSC the
shared RCG is associated with will get wedged if the RCG's source clk is
disabled and the GDSC tries to enable the RCG to do "housekeeping" while
powering on.

Both of these problems combined with incorrect runtime PM usage in the
display driver lead to a black screen on Qualcomm sc7180 Trogdor
chromebooks. What happens is that the bootloader leaves the
'disp_cc_mdss_rot_clk' enabled and the 'disp_cc_mdss_rot_clk_src' force
enabled and parented to 'disp_cc_pll0'. The mdss driver probes and
runtime suspends, disabling the mdss_gdsc which uses the
'disp_cc_mdss_rot_clk_src' for "housekeeping". The
'disp_cc_mdss_rot_clk' is disabled during late init because the clk is
unused, but the parent 'disp_cc_mdss_rot_clk_src' is still force enabled
because the force enable bit was never cleared. Then 'disp_cc_pll0' is
disabled because it is also unused. That's because the clk framework
believes the parent of the RCG is XO when it isn't. A child device of
the mdss device (e.g. DSI) runtime resumes mdss which powers on the
mdss_gdsc. This wedges the GDSC because 'disp_cc_mdss_rot_clk_src' is
parented to 'disp_cc_pll0' and that PLL is off. With the GDSC wedged,
mdss_runtime_resume() tries to enable 'disp_cc_mdss_mdp_clk' but it
can't because the GDSC has wedged all the clks associated with the GDSC
causing clks to stay stuck off.

This leads to the following warning seen at boot and a black screen
because the display driver fails to probe.

 disp_cc_mdss_mdp_clk status stuck at 'off'
 WARNING: CPU: 1 PID: 81 at drivers/clk/qcom/clk-branch.c:87 clk_branch_toggle+0x114/0x168
 Modules linked in:
 CPU: 1 PID: 81 Comm: kworker/u16:4 Not tainted 6.7.0-g0dd3ee311255 #1 f5757d475795053fd2ad52247a070cd50dd046f2
 Hardware name: Google Lazor (rev1 - 2) with LTE (DT)
 Workqueue: events_unbound deferred_probe_work_func
 pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
 pc : clk_branch_toggle+0x114/0x168
 lr : clk_branch_toggle+0x110/0x168
 sp : ffffffc08084b670
 pmr_save: 00000060
 x29: ffffffc08084b680 x28: ffffff808006de00 x27: 0000000000000001
 x26: ffffff8080dbd4f4 x25: 0000000000000000 x24: 0000000000000000
 x23: 0000000000000000 x22: ffffffd838461198 x21: ffffffd838007997
 x20: ffffffd837541d5c x19: 0000000000000001 x18: 0000000000000004
 x17: 0000000000000000 x16: 0000000000000010 x15: ffffffd837070fac
 x14: 0000000000000003 x13: 0000000000000004 x12: 0000000000000001
 x11: c0000000ffffdfff x10: ffffffd838347aa0 x9 : 08dadf92e516c000
 x8 : 08dadf92e516c000 x7 : 0000000000000000 x6 : 0000000000000027
 x5 : ffffffd8385a61f2 x4 : 0000000000000000 x3 : ffffffc08084b398
 x2 : ffffffc08084b3a0 x1 : 00000000ffffdfff x0 : 00000000fffffff0
 Call trace:
  clk_branch_toggle+0x114/0x168
  clk_branch2_enable+0x24/0x30
  clk_core_enable+0x5c/0x1c8
  clk_enable+0x38/0x58
  clk_bulk_enable+0x40/0xb0
  mdss_runtime_resume+0x68/0x258
  pm_generic_runtime_resume+0x30/0x44
  __genpd_runtime_resume+0x30/0x80
  genpd_runtime_resume+0x124/0x214
  __rpm_callback+0x7c/0x15c
  rpm_callback+0x30/0x88
  rpm_resume+0x390/0x4d8
  rpm_resume+0x43c/0x4d8
  __pm_runtime_resume+0x54/0x98
  __device_attach+0xe0/0x170
  device_initial_probe+0x1c/0x28
  bus_probe_device+0x48/0xa4
  device_add+0x52c/0x6fc
  mipi_dsi_device_register_full+0x104/0x1a8
  devm_mipi_dsi_device_register_full+0x28/0x78
  ti_sn_bridge_probe+0x1dc/0x2bc
  auxiliary_bus_probe+0x4c/0x94
  really_probe+0xf8/0x270
  __driver_probe_device+0xa8/0x130
  driver_probe_device+0x44/0x104
  __device_attach_driver+0xa4/0xcc
  bus_for_each_drv+0x94/0xe8
  __device_attach+0xf8/0x170
  device_initial_probe+0x1c/0x28
  bus_probe_device+0x48/0xa4
  deferred_probe_work_func+0x9c/0xd8

Fix these problems by parking shared RCGs at boot. This will properly
initialize the parked_cfg struct member so that the parent is reported
properly and ensure that the clk won't get stuck on or off because the
RCG is parented to the safe source (XO).

Fixes: 703db1f5da ("clk: qcom: rcg2: Cache CFG register updates for parked RCGs")
Reported-by: Stephen Boyd <sboyd@kernel.org>
Closes: https://lore.kernel.org/r/1290a5a0f7f584fcce722eeb2a1fd898.sboyd@kernel.org
Closes: https://issuetracker.google.com/319956935
Reported-by: Laura Nao <laura.nao@collabora.com>
Closes: https://lore.kernel.org/r/20231218091806.7155-1-laura.nao@collabora.com
Cc: Bjorn Andersson <andersson@kernel.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Douglas Anderson <dianders@chromium.org>
Cc: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Link: https://lore.kernel.org/r/20240502224703.103150-1-swboyd@chromium.org
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
2024-07-08 11:31:57 -07:00
Mark Brown
54e49a3c9d
ASoC: fsl-asoc-card: add S/PDIF controller support
Merge series from Elinor Montmasson <elinor.montmasson@savoirfairelinux.com>:

This is a series of patches aiming to make the machine driver
`fsl-asoc-card` compatible with S/PDIF controllers on imx boards.  The
main goal is to allow the use of S/PDIF controllers with ASRC modules.

The `imx-spdif` machine driver already has specific support for S/PDIF
controllers but doesn't support using an ASRC with it. However, the
`fsl-asoc-card` machine driver has the necessary code to create a sound
card which can use an ASRC module.
It is then possible to extend the support for S/PDIF audio cards by
merging the `imx-spdif` driver into `fsl-asoc-card`.

The first three patches adapt the `fsl-asoc-card` driver to support
multiple codec use cases.
The driver can get 2 codec phandles from the device tree, and
codec-related variables are doubled.
`for_each_codecs` macros are also used when possible to ease adding
other multi-codec use cases in the future.
It makes possible to use the two S/PDIF dummy codec drivers
`spdif_receiver` and `spdif_transmitter` instead of `snd-soc-dummy`,
which was used in `imx-spdif`.

The fourth patch merges the S/PDIF support from `imx-spdif` to
`fsl-asoc-card`.
`fsl-asoc-card` offers the same functionalities as `imx-spdif` did, but
this merge also extends the S/PDIF support with the possibility of using
an ASRC.
Compatible "fsl,imx-audio-spdif" is kept, but `fsl-asoc-card` uses
different DT properties compared to `imx-spdif`:
* The "spdif-controller" property from `imx-spdif` is named "audio-cpu"
  in `fsl-asoc-card`.
* `fsl-asoc-card` uses codecs explicitly declared in DT with
  "audio-codec". With an S/PDIF, codec drivers `spdif_transmitter` and
  `spdif_receiver` should be used. Driver `imx-spdif` used instead the
  dummy codec and a pair of boolean properties, "spdif-in" and
  "spdif-out".
Backward compatibility is therefore implemented in `fsl-asoc-card`.
However, it is recommended to use the new properties when needed.
Especially, declaring and using S/PDIF transmitter and/or receiver nodes
is better than using the dummy codec.

The last three patches update the device tree bindings of
`fsl-asoc-card` and update all in-tree device trees to use the
`fsl-asoc-card` properties.
Note that as the old properties are still supported:
* previous versions of in-tree device trees are still supported.
* out-of-tree device trees are still supported.

This series of patches was successfully built for arm64 and x86 on top
of the latest "for-next" branch of the ASoC git tree on the 26th of June
2024.
These modifications have also been tested on an i.MX8MN evaluation board
with a linux kernel RT v6.1.26-rt8.
2024-07-08 19:30:39 +01:00
Gaosheng Cui
a3123341dc gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey
If we fail to call crypto_sync_skcipher_setkey, we should free the
memory allocation for cipher, replace err_return with err_free_cipher
to free the memory of cipher.

Fixes: 4891f2d008 ("gss_krb5: import functionality to derive keys into the kernel")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:06 -04:00
Chuck Lever
f436833a3d MAINTAINERS: Add a bugzilla link for NFSD
I recently found out about B: for noting where subsystem bugs can be
filed. I do pay attention to bugzilla.kernel.org. The Linux NFS
community has decided to steer kernel NFS issues to the kernel.org
bugzilla instead of bugzilla.linux-nfs.org.

Remove the W: entry; the sourceforge information is stale and
unmaintained.

Cc: Thorsten Leemhuis <linux@leemhuis.info>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:06 -04:00
Jeff Layton
00506072d7 nfsd: new netlink ops to get/set server pool_mode
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:05 -04:00
Jeff Layton
5f71f3c325 sunrpc: refactor pool_mode setting code
Allow the pool_mode setting code to be called from internal callers
so we can call it from a new netlink op. Add a new svc_pool_map_get
function to return the current setting. Change the existing module
parameter handling to use the new interfaces under the hood.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:05 -04:00
Jeff Layton
7f5c330b26 nfsd: allow passing in array of thread counts via netlink
Now that nfsd_svc can handle an array of thread counts, fix up the
netlink threads interface to construct one from the netlink call
and pass it through so we can start a pooled server the same way we
would start a normal one.

Note that any unspecified values in the array are considered zeroes,
so it's possible to shut down a pooled server by passing in a short
array that has only zeros, or even an empty array.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:05 -04:00
Jeff Layton
b4d8f22891 nfsd: make nfsd_svc take an array of thread counts
Now that the refcounting is fixed, rework nfsd_svc to use the same
thread setup as the pool_threads interface. Have it take an array of
thread counts instead of just a single value, and pass that from the
netlink threads set interface.  Since the new netlink interface doesn't
have the same restriction as pool_threads, move the guard against
shutting down all threads to write_pool_threads.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:04 -04:00
Jeff Layton
8e0c8d2395 sunrpc: fix up the special handling of sv_nrpools == 1
Only pooled services take a reference to the svc_pool_map. The sunrpc
code has always used the sv_nrpools value to detect whether the service
is pooled.

The problem there is that nfsd is a pooled service, but when it's
running in "global" pool_mode, it doesn't take a reference to the pool
map because it has a sv_nrpools value of 1. This means that we have
two separate codepaths for starting the server, depending on whether
it's pooled or not.

Fix this by adding a new flag to the svc_serv, that indicates whether
the serv is pooled. With this we can have the nfsd service
unconditionally take a reference, regardless of pool_mode.

Note that this is a behavior change for
/sys/module/sunrpc/parameters/pool_mode. Usually this file does not
allow you to change the pool-mode while there are nfsd threads running,
but if the pool-mode is "global" it's allowed. My assumption is that
this is a bug, since it probably should never have worked this way.

This patch changes the behavior such that you get back EBUSY even
when nfsd is running in global mode. I think this is more reasonable
behavior, and given that most people set this today using the module
parameter, it's doubtful anyone will notice.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:04 -04:00
Chuck Lever
3a6adfcae8 SUNRPC: Add a trace point in svc_xprt_deferred_close
The trace point in svc_xprt_close() reports only some local close
requests. Try to capture more local close requests.

Note that "trace-cmd record -T -e sunrpc:svc_xprt_close" will
neatly capture the identity of the caller requesting the close.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:04 -04:00
Chuck Lever
abc02e5602 NFSD: Support write delegations in LAYOUTGET
I noticed LAYOUTGET(LAYOUTIOMODE4_RW) returning NFS4ERR_ACCESS
unexpectedly. The NFS client had created a file with mode 0444, and
the server had returned a write delegation on the OPEN(CREATE). The
client was requesting a RW layout using the write delegation stateid
so that it could flush file modifications.

Creating a read-only file does not seem to be problematic for
NFSv4.1 without pNFS, so I began looking at NFSD's implementation of
LAYOUTGET.

The failure was because fh_verify() was doing a permission check as
part of verifying the FH presented during the LAYOUTGET. It uses the
loga_iomode value to specify the @accmode argument to fh_verify().
fh_verify(MAY_WRITE) on a file whose mode is 0444 fails with -EACCES.

To permit LAYOUT* operations in this case, add OWNER_OVERRIDE when
checking the access permission of the incoming file handle for
LAYOUTGET and LAYOUTCOMMIT.

Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org # v6.6+
Message-Id: 4E9C0D74-A06D-4DC3-A48A-73034DC40395@oracle.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:03 -04:00
Andy Shevchenko
e5d85ec52b lockd: Use *-y instead of *-objs in Makefile
*-objs suffix is reserved rather for (user-space) host programs while
usually *-y suffix is used for kernel drivers (although *-objs works
for that purpose for now).

Let's correct the old usages of *-objs in Makefiles.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:03 -04:00
Chuck Lever
18a5450684 NFSD: Fix nfsdcld warning
Since CONFIG_NFSD_LEGACY_CLIENT_TRACKING is a new config option, its
initial default setting should have been Y (if we are to follow the
common practice of "default Y, wait, default N, wait, remove code").

Paul also suggested adding a clearer remedy action to the warning
message.

Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Message-Id: <d2ab4ee7-ba0f-44ac-b921-90c8fa5a04d2@molgen.mpg.de>
Fixes: 74fd48739d ("nfsd: new Kconfig option for legacy client tracking")
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:02 -04:00
Chuck Lever
d1b586e75e svcrdma: Handle ADDR_CHANGE CM event properly
Sagi tells me that when a bonded device reports an address change,
the consumer must destroy its listener IDs and create new ones.

See commit a032e4f6d6 ("nvmet-rdma: fix bonding failover possible
NULL deref").

Suggested-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:02 -04:00
Chuck Lever
283d285462 svcrdma: Refactor the creation of listener CMA ID
In a moment, I will add a second consumer of CMA ID creation in
svcrdma. Refactor so this code can be reused.

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:02 -04:00
Dr. David Alan Gilbert
022d0574ef NFSD: remove unused structs 'nfsd3_voidargs'
'nfsd3_voidargs' in nfs[23]acl.c is unused since
commit 788f7183fb ("NFSD: Add common helpers to decode void args and
encode void results").

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:01 -04:00
Dan Carpenter
dbc834e5db NFSD: harden svcxdr_dupstr() and svcxdr_tmpalloc() against integer overflows
These lengths come from xdr_stream_decode_u32() and so we should be a
bit careful with them.  Use size_add() and struct_size() to avoid
integer overflows.  Saving size_add()/struct_size() results to a u32 is
unsafe because it truncates away the high bits.

Also generally storing sizes in longs is safer.  Most systems these days
use 64 bit CPUs.  It's harder for an addition to overflow 64 bits than
it is to overflow 32 bits.  Also functions like vmalloc() can
successfully allocate UINT_MAX bytes, but nothing can allocate ULONG_MAX
bytes.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-07-08 14:10:01 -04:00
Stephen Boyd
ef0ae098a1 Qualcomm clock updates for v6.11
This adds clock controllers for SM7150 camera, display and video,
 QCM2290 GPU, QCS8386/QCS8084 NSS, SM8650 camera and video.
 
 qcom_cc_really_probe() is transitioned to take a struct device, to allow
 reuse in non-platform-drivers. Prepare-only branch clock ops are
 introduced to support clocks on buses that takes locks.
 
 The parent/child relationship for SC7280 camera GDSCs are added.
 
 Support for the Huayra 2290 alpha PLL is added.
 
 The highest SDCC clock frequency on IPQ6018 is adjusted to match the
 HS200 support. For IPQ9574 missing PCIe PIPE clocks are added.
 
 Various configuration and properties of the SA8775P, X1E80100 and SM7280
 clocks and GDSCs are corrected. SM8350 GPU RCGs are made to park on XO
 while disabled.
 
 Unused CONFIG_QCOM_RPMCC Kconfig symbol is removed, and missing
 MODULE_DESCRIPTIONs are added in a few drivers.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmaJglgVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FpRAQAItnvABmeAHsiHzGLBhhu8Th6VnM
 A7K6RnauGbwq935hhwrffLKT4/j+0rAJkkRP0AwgdsKVyi+rxcnGABkQMpjYpDwu
 i4PbYnhyxqn47JEkOyHkeUWKawEfzTVghtsez5+3KUyPVYU/K7UwbVqrvX/1j+Tj
 23a+D0cDgNQ0BkXxkm5+SPRIYEZBihqfZx6rgbxF23YR8jAGvi/I0pVsP0RuErQ0
 pGuUKFgRtJQ4NbOih4X+43STLqmDu7gAm/opJZxEHfewh+np9X37QmMTsgbSHnfv
 Kldyx+iqxB/klr7Za8vkrjsBhGyftfbOAQ/xtxZFoiIOH7ohLJpbeSsguTpOO8Cb
 rdkdn09pjl/EPv7QjKiOpgCTrM5PuBjT6tfr4clBQkryPkQyyl89lP3A4d2k17Np
 wYae2P9X9JRC45L550h400R/pX6nKUQexgiiwlZkYFjB20oGTbgZ2Kj7B3rF6es2
 y+veNfPoa3QMweEbW9MtKzMpIyW+kbtpGTkAlzbljbDAR0wbuom8h02LbXqWz6Bo
 yPWn3zXtpYfNyEfxbYHFc4I3YejZBkq/y5fh0Uka7YemvGyWazvY8/UC3BVYajSP
 SdpOx/T81S0u03yV8V4F/kEBB+5vT2DvseV39G8sM+1Ysj5sQldlN0Pk0gwE2f3U
 RSaEoUK1C2gP8xvo
 =jddZ
 -----END PGP SIGNATURE-----

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

Pull Qualcomm clk driver updates from Bjorn Andersson:

 - Add clk drivers for Qualcomm SM7150 camera, display and video
 - Add Qualcomm QCM2290 GPU clk driver
 - Add Qualcomm QCS8386/QCS8084 NSS clk driver
 - Add Qualcomm SM8650 camera and video drivers
 - Make qcom_cc_really_probe() take a struct device to allow reuse in
   non-platform-drivers
 - Introduce prepare-only branch clock ops in the qcom clk driver to
   support clocks on buses that take locks
 - Describe parent/child relationship for Qualcomm SC7280 camera GDSCs
 - Support Qualcomm Huayra 2290 alpha PLL
 - Adjust the highest SDCC clock frequency on Qualcomm IPQ6018 to match
   HS200 support
 - Add missing PCIe PIPE clocks on Qualcomm IPQ9574
 - Fix various configurations and properties in the Qualcomm SA8775P,
   X1E80100 and SM7280 drivers
 - Park Qualcomm SM8350 GPU RCGs on XO while disabled
 - Remove unused CONFIG_QCOM_RPMCC Kconfig symbol
 - Add missing MODULE_DESCRIPTIONs to some qcom clk drivers

* tag 'qcom-clk-for-6.11' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (61 commits)
  clk: qcom: gcc-x1e80100: Fix halt_check for all pipe clocks
  clk: qcom: gcc-ipq6018: update sdcc max clock frequency
  clk: qcom: camcc-sm8650: Add SM8650 camera clock controller driver
  dt-bindings: clock: qcom: Add SM8650 camera clock controller
  dt-bindings: clock: qcom: Update the order of SC8280XP camcc header
  clk: qcom: videocc-sm8550: Add SM8650 video clock controller
  clk: qcom: videocc-sm8550: Add support for videocc XO clk ares
  dt-bindings: clock: qcom: Add SM8650 video clock controller
  dt-bindings: clock: qcom: Update SM8450 videocc header file name
  clk: qcom: gpucc-sa8775p: Update wait_val fields for GPU GDSC's
  clk: qcom: gpucc-sa8775p: Park RCG's clk source at XO during disable
  clk: qcom: gpucc-sa8775p: Remove the CLK_IS_CRITICAL and ALWAYS_ON flags
  clk: qcom: gcc-sa8775p: Set FORCE_MEM_CORE_ON for gcc_ufs_phy_ice_core_clk
  clk: qcom: gcc-sa8775p: Update the GDSC wait_val fields and flags
  clk: qcom: gcc-sa8775p: Remove support for UFS hw ctl clocks
  clk: qcom: gpucc-sm8350: Park RCG's clk source at XO during disable
  clk: qcom: nsscc-qca8k: Fix the MDIO functions undefined issue
  clk: qcom: select right config in CLK_QCM2290_GPUCC definition
  clk: qcom: Remove QCOM_RPMCC symbol
  clk: qcom: Add QCM2290 GPU clock controller driver
  ...
2024-07-08 10:57:49 -07:00
Christoph Hellwig
b571cfcb9d nfs: don't reuse partially completed requests in nfs_lock_and_join_requests
When NFS requests are split into sub-requests, nfs_inode_remove_request
calls nfs_page_group_sync_on_bit to set PG_REMOVE on this sub-request and
only completes the head requests once PG_REMOVE is set on all requests.
This means that when nfs_lock_and_join_requests sees a PG_REMOVE bit, I/O
on the request is in progress and has partially completed.   If such a
request is returned to nfs_try_to_update_request, it could be extended
with the newly dirtied region and I/O for the combined range will be
re-scheduled, leading to extra I/O.

Change the logic to instead restart the search for a request when any
PG_REMOVE bit is set, as the completion handler will remove the request
as soon as it can take the page group lock.  This not only avoid
extending the I/O but also does the right thing for the callers that
want to cancel or flush the request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2024-07-08 13:47:51 -04:00
Christoph Hellwig
f1b7c7552c nfs: move nfs_wait_on_request to write.c
nfs_wait_on_request is now only used in write.c.  Move it there
and mark it static.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2024-07-08 13:47:51 -04:00
Christoph Hellwig
25edbcac6e nfs: fold nfs_page_group_lock_subrequests into nfs_lock_and_join_requests
Fold nfs_page_group_lock_subrequests into nfs_lock_and_join_requests to
prepare for future changes to this code, and move the helpers to write.c
as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2024-07-08 13:47:51 -04:00
Christoph Hellwig
c3f2235782 nfs: fold nfs_folio_find_and_lock_request into nfs_lock_and_join_requests
Fold nfs_folio_find_and_lock_request into the only caller to prepare
for changes to this code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2024-07-08 13:47:51 -04:00
Christoph Hellwig
9eb7c484db nfs: simplify nfs_folio_find_and_lock_request
nfs_folio_find_and_lock_request and the nfs_page_group_lock_head helper
called by it spend quite some effort to deal with head vs subrequests.
But given that only the head request can be stashed in the folio private
data, non of that is required.

Fold the locking logic from nfs_page_group_lock_head into
nfs_folio_find_and_lock_request and simplify the result based on the
invariant that we always find the head request in the folio private data.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
2024-07-08 13:47:51 -04:00