Commit graph

3708 commits

Author SHA1 Message Date
Linus Torvalds
2bbb54ba1b EFI fixes for v6.8 #2
- Fix phys_addr_t size confusion in 32-bit capsule loader
 - Reduce maximum EFI variable name size to 512 to work around buggy
   firmware
 - Drop some redundant code from efivarfs while at it
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZdr/HgAKCRAwbglWLn0t
 XGqrAP96SmiLbkEBzBAkjpIvQIwoiPUAQmfBXs4PuZ6MH/aq3wEA0VOxxH8CpVAu
 dpjd2HIjO59zMr4G7BvR/ezit3Gp2A0=
 =Bd3Z
 -----END PGP SIGNATURE-----

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

Pull EFI fixes from Ard Biesheuvel:
 "Only the EFI variable name size change is significant, and will be
  backported once it lands. The others are cleanup.

   - Fix phys_addr_t size confusion in 32-bit capsule loader

   - Reduce maximum EFI variable name size to 512 to work around buggy
     firmware

   - Drop some redundant code from efivarfs while at it"

* tag 'efi-fixes-for-v6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efivarfs: Drop 'duplicates' bool parameter on efivar_init()
  efivarfs: Drop redundant cleanup on fill_super() failure
  efivarfs: Request at most 512 bytes for variable names
  efi/capsule-loader: fix incorrect allocation size
2024-03-01 11:40:29 -08:00
Dan Carpenter
9fa2679b7f firmware/sysfb: fix an error code in sysfb_init()
This error path accidentally returns success when it should preserve the
error code from sysfb_parent_dev().

Fixes: 4e754597d6 ("firmware/sysfb: Create firmware device only for enabled PCI devices")
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/aaaa2e13-849b-41a0-8186-25f3d2a16f86@moroto.mountain
2024-02-27 09:21:06 +01:00
Daniel Vetter
f112b68f27 Linux 6.8-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmXb0T4eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG5YQH/3eCV90sNGch0Y94
 8rtTdqFrVx7QPNl0pz+Mo6OUIKUUHvTuwime16ckLxG+3x2Y3I0MjP1edd1NB99C
 Kje//JTpaZBPpTZ/jY4u8B1Shov2Drdx/J4NFnE/9rG6yXzKQBtvON/xAxXDCVHT
 mLhst2LR0FeCSMk9jAX6CoqUPEgwlylNyAetKxaDQgoHl4GTZC7FDO17WxyjpIxe
 1rVHsrV9Eq8kD4uxrzpTYWgZrwTObPmlZjvefa1JfzSwRNABIBJj/C1nra1Zc1oi
 b7xVaXS1cMOxrtuuG00fmHsPnWivu0tuND7H3/yLd1mRCZAPSsVbVvrI/KNtoeV4
 1euINlY=
 =7IFt
 -----END PGP SIGNATURE-----

Merge v6.8-rc6 into drm-next

Thomas Zimmermann asked to backmerge -rc6 for drm-misc branches,
there's a few same-area-changed conflicts (xe and amdgpu mostly) that
are getting a bit too annoying.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2024-02-26 11:41:07 +01:00
Baoquan He
443cbaf9e2 crash: split vmcoreinfo exporting code out from crash_core.c
Now move the relevant codes into separate files:
kernel/crash_reserve.c, include/linux/crash_reserve.h.

And add config item CRASH_RESERVE to control its enabling.

And also update the old ifdeffery of CONFIG_CRASH_CORE, including of
<linux/crash_core.h> and config item dependency on CRASH_CORE
accordingly.

And also do renaming as follows:
 - arch/xxx/kernel/{crash_core.c => vmcore_info.c}
because they are only related to vmcoreinfo exporting on x86, arm64,
riscv.

And also Remove config item CRASH_CORE, and rely on CONFIG_KEXEC_CORE to
decide if build in crash_core.c.

[yang.lee@linux.alibaba.com: remove duplicated include in vmcore_info.c]
  Link: https://lkml.kernel.org/r/20240126005744.16561-1-yang.lee@linux.alibaba.com
Link: https://lkml.kernel.org/r/20240124051254.67105-3-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Acked-by: Hari Bathini <hbathini@linux.ibm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pingfan Liu <piliu@redhat.com>
Cc: Klara Modin <klarasmodin@gmail.com>
Cc: Michael Kelley <mhklinux@outlook.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-02-23 17:48:22 -08:00
Arnd Bergmann
4d934f94ad Microchip firmware driver fixes for v6.8-rc6
A single fix for me incorrectly using sizeof().
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZdYmOQAKCRB4tDGHoIJi
 0hTQAQDCFXu/AYZJHRpoF3GyafM3JnJ/FlXVsm/ShzvnTF9LXAEAyN1XqaxZ0vuW
 7RMcf8KxsM2Y5/5X+7SZ9MtLQMorjQI=
 =BN1C
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmXYlVgACgkQYKtH/8kJ
 Uic1KA/+JdxTN4rfsp/4TWQZmVr/1+JT5Soue14gTyjZY1pdzbpgvIdwLl/EZVQJ
 Yg1Mq6OGsIu2qnTgm0Cl9GayEhzan3KfvEHlqO0YAceX4pbnEt6C56djxPO5gEDq
 GcLGAaBjFEe/spG8D9dxABtsT9wy8BDhu+H1aeQwsROD5t8/ujDMKDyR8eXLKVbt
 ZODHMZrnl79c1BfZNmegXMnTicoM9q5GIVaa0h3D7JpGanmJvRZcudgAkYLDPool
 C3OXPOq/dZqeFa5+LyLex7DtEvdAGHRNzJTUUoV8ZYN9+o+uGReXUB3w7ZheAMaK
 rI3H1NZyz3fz9uiN8yLKFB7c2V6ddaBm0DQ2K0NdOqE6g8Jex4u9JqZ5O7lvxt+s
 K81xQ+J84c6gwb0eIQ7cny4teXNAQz6oPqQ9M+k9y0AYnsnjBGby/RAbRESl36ng
 RHwNMFy0zJQelg/xqM1kzVhyB1wyNvtSkDE2Xt+wleHe2VxAr90gQ0dN8U2F6YEc
 E3fzgUnrCySvcDz+qtGCvMF0KaKXdQcvHxKQDPioHrGAwlHtv4rA3F8w+5m3wiBn
 bDWThBb+gEIv6ZG//yXFtZFwtoIyc7Ntv7qrjAOupJfGxBjEglY3WEZvODcG0Xn7
 YWbHGvC/lYxNfcDJZ0ioo3nKQFgVYY92M+7qt0Ls6EpU99GEDf4=
 =FJ4K
 -----END PGP SIGNATURE-----

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

Microchip firmware driver fixes for v6.8-rc6

A single fix for me incorrectly using sizeof().

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

* tag 'riscv-firmware-fixes-for-v6.8-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  firmware: microchip: fix wrong sizeof argument

Link: https://lore.kernel.org/r/20240221-recognize-dust-4bb575f4e67b@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-02-23 13:53:44 +01:00
Nathan Chancellor
2947a4567f treewide: update LLVM Bugzilla links
LLVM moved their issue tracker from their own Bugzilla instance to GitHub
issues.  While all of the links are still valid, they may not necessarily
show the most up to date information around the issues, as all updates
will occur on GitHub, not Bugzilla.

Another complication is that the Bugzilla issue number is not always the
same as the GitHub issue number.  Thankfully, LLVM maintains this mapping
through two shortlinks:

  https://llvm.org/bz<num> -> https://bugs.llvm.org/show_bug.cgi?id=<num>
  https://llvm.org/pr<num> -> https://github.com/llvm/llvm-project/issues/<mapped_num>

Switch all "https://bugs.llvm.org/show_bug.cgi?id=<num>" links to the
"https://llvm.org/pr<num>" shortlink so that the links show the most up to
date information.  Each migrated issue links back to the Bugzilla entry,
so there should be no loss of fidelity of information here.

Link: https://lkml.kernel.org/r/20240109-update-llvm-links-v1-3-eb09b59db071@kernel.org
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Fangrui Song <maskray@google.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Mykola Lysenko <mykolal@fb.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-02-22 15:38:51 -08:00
Guilherme G. Piccoli
a28655c330 efi: pstore: Allow dynamic initialization based on module parameter
The efi-pstore module parameter "pstore_disable" warrants that users
are able to deactivate such backend. There is also a Kconfig option
for the default value of this parameter. It was originally added due
to some bad UEFI FW implementations that could break with many variables
written.

Some distros (such as Arch Linux) set this in their config file still
nowadays. And once it is set, even being a writable module parameter,
there is effectively no way to make use of efi-pstore anymore.
If "pstore_disable" is set to true, the init function of the module exits
early and is never called again after the initcall processing.

Let's switch this module parameter to have a callback and perform the
pstore backend registration again each time it's set from Y->N (and
vice-versa). With this, the writable nature of the parameter starts to
make sense, given that users now can switch back to using efi-pstore
or not during runtime by writing into it.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
Link: https://lore.kernel.org/r/20240103184053.226203-1-gpiccoli@igalia.com
Signed-off-by: Kees Cook <keescook@chromium.org>
2024-02-22 10:37:21 -08:00
Cristian Marussi
5e0d2fe70c firmware: arm_scmi: Update the supported clock protocol version
And finally update the supported clock protocol version to v3.2(0x30000).

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-6-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:11 +00:00
Cristian Marussi
62092c428f firmware: arm_scmi: Add standard clock OEM definitions
Add a common enum to define the standard clock OEM types defined by the
SCMI specification, so as to enable the configuration of such extended
configuration properties with the existent clock protocol operations.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-5-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:11 +00:00
Cristian Marussi
e4ad2b0130 firmware: arm_scmi: Add clock check for extended config support
SCMI v3.2 added support to set/get clock custom OEM types; such support is
conditionally present, though, depending on an extended config attribute
bit possibly advertised by the platform server on a per-domain base.

Add a check to verify if OEM types are supported before allowing any kind
of OEM-specific get/set operation. Also add a check around all the new
v3.2 clock features.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-4-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:10 +00:00
Cristian Marussi
8c80c42ad4 firmware: arm_scmi: Add support for v3.2 NEGOTIATE_PROTOCOL_VERSION
Freshly introduced NEGOTIATE_PROTOCOL_VERSION allows the agent to ascertain
upfront if a specific protocol(usually older) version is supported by the
platform.

It is used by the agent in case the platform has advertised the support of
a newer protocol version than the latest version supported by the agent,
since backward compatibility cannot be automatically assumed.

Emit a warning about possible incompatibility when negotiation was not
possible or just print the successfully negotiated protocol.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240214183006.3403207-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:10 +00:00
Randy Dunlap
a9c049f47e firmware: arm_scmi: Fix struct kernel-doc warnings in optee transport
Fix the kernel-doc notation for the nested union in struct
scmi_optee_channel to eliminate kernel-doc warnings:

  |  optee.c:130: warning: Excess struct member 'shmem' description
  |			   in 'scmi_optee_channel'
  |  optee.c:131: warning: Function parameter or struct member 'req'
  |			   not described in 'scmi_optee_channel'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>
Cc:  <linux-arm-kernel@lists.infradead.org>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240221062157.8694-1-rdunlap@infradead.org
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-22 08:17:10 +00:00
Markus Elfring
1315848f1f firmware: tegra: bpmp: Return directly after a failed kzalloc() in get_filename()
The kfree() function was called in one case by
the get_filename() function during error handling
even if the passed variable contained a null pointer.
This issue was detected by using the Coccinelle software.

Thus return directly after a call of the function “kzalloc” failed
at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2024-02-21 17:10:32 +01:00
Cristian Marussi
22ffc748a6 firmware: arm_scmi: Report frequencies in the perf notifications
Extend the perf notification report to include pre-calculated frequencies
corresponding to the reported limits/levels event; such frequencies are
properly computed based on the stored known OPPs information taking into
consideration if the current operating mode is level indexed or not.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-12-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
23443a3c7c firmware: arm_scmi: Use opps_by_lvl to store opps
Store all the discovered OPPs into the XArray opps_by_lvl even when
level_indexing mode is not used, since it comes handy to easily retrieve
OPPs by level.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-11-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
e85beaf760 firmware: arm_scmi: Implement is_notify_supported callback in powercap protocol
Add a preliminary check to verify if the powercap protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-10-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
12d6a03f32 firmware: arm_scmi: Implement is_notify_supported callback in reset protocol
Add a preliminary check to verify if the reset protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-9-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
7ac7932df2 firmware: arm_scmi: Implement is_notify_supported callback in sensor protocol
Add a preliminary check to verify if the sensor protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-8-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:29 +00:00
Cristian Marussi
cf1bba2775 firmware: arm_scmi: Implement is_notify_supported callback in clock protocol
Add a preliminary check to verify if the clock protocol related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-7-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 12:22:18 +00:00
Ricardo B. Marliere
989e8661dc firmware: arm_ffa: Make ffa_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the ffa_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:40:34 +00:00
Cristian Marussi
9f5ddbc222 firmware: arm_scmi: Implement is_notify_supported callback in system power protocol
Add a preliminary check to verify if the system power protocol related
notify enable commands are supported at all by the SCMI platform, and
then provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain supports
notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-6-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
b7e400bc2e firmware: arm_scmi: Implement is_notify_supported callback in power protocol
Add a preliminary check to verify if the power related notify enable
commands are supported at all by the SCMI platform, and then provide
the callback needed to allow the core SCMI notification subsytem to do
a fine-grain check if a specific resource domain supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-5-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
120d26312a firmware: arm_scmi: Implement is_notify_supported callback in perf protocol
Add a preliminary check to verify if the performance related notify
enable commands are supported at all by the SCMI platform, and then
provide the callback needed to allow the core SCMI notification
subsytem to do a fine-grain check if a specific resource domain
supports notifications.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-4-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
637b6d6cae firmware: arm_scmi: Add a common helper to check if a message is supported
A common helper is provided to check if a specific protocol message is
supported or not.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Cristian Marussi
8733e86a80 firmware: arm_scmi: Check for notification support
When registering protocol events, use the optional .is_notify_supported
callback provided by the protocol to check if that specific notification
type is available for that particular resource on the running system,
marking it as unsupported otherwise.

Then, when a notification enable request is received, return an error if
it was previously marked as unsuppported, so avoiding to send a needless
notification enable command and check the returned value for failure.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240212123233.1230090-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Ricardo B. Marliere
961745b2c4 firmware: arm_scmi: Make scmi_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the scmi_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240211-bus_cleanup-firmware2-v1-2-1851c92c7be7@marliere.net
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:55 +00:00
Andre Przywara
f1d71576d2 firmware: arm_scmi: Fix double free in SMC transport cleanup path
When the generic SCMI code tears down a channel, it calls the chan_free
callback function, defined by each transport. Since multiple protocols
might share the same transport_info member, chan_free() might want to
clean up the same member multiple times within the given SCMI transport
implementation. In this case, it is SMC transport. This will lead to a NULL
pointer dereference at the second time:

    | scmi_protocol scmi_dev.1: Enabled polling mode TX channel - prot_id:16
    | arm-scmi firmware:scmi: SCMI Notifications - Core Enabled.
    | arm-scmi firmware:scmi: unable to communicate with SCMI
    | Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    | Mem abort info:
    |   ESR = 0x0000000096000004
    |   EC = 0x25: DABT (current EL), IL = 32 bits
    |   SET = 0, FnV = 0
    |   EA = 0, S1PTW = 0
    |   FSC = 0x04: level 0 translation fault
    | Data abort info:
    |   ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
    |   CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    |   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    | user pgtable: 4k pages, 48-bit VAs, pgdp=0000000881ef8000
    | [0000000000000000] pgd=0000000000000000, p4d=0000000000000000
    | Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
    | Modules linked in:
    | CPU: 4 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc2-00124-g455ef3d016c9-dirty #793
    | Hardware name: FVP Base RevC (DT)
    | pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
    | pc : smc_chan_free+0x3c/0x6c
    | lr : smc_chan_free+0x3c/0x6c
    | Call trace:
    |  smc_chan_free+0x3c/0x6c
    |  idr_for_each+0x68/0xf8
    |  scmi_cleanup_channels.isra.0+0x2c/0x58
    |  scmi_probe+0x434/0x734
    |  platform_probe+0x68/0xd8
    |  really_probe+0x110/0x27c
    |  __driver_probe_device+0x78/0x12c
    |  driver_probe_device+0x3c/0x118
    |  __driver_attach+0x74/0x128
    |  bus_for_each_dev+0x78/0xe0
    |  driver_attach+0x24/0x30
    |  bus_add_driver+0xe4/0x1e8
    |  driver_register+0x60/0x128
    |  __platform_driver_register+0x28/0x34
    |  scmi_driver_init+0x84/0xc0
    |  do_one_initcall+0x78/0x33c
    |  kernel_init_freeable+0x2b8/0x51c
    |  kernel_init+0x24/0x130
    |  ret_from_fork+0x10/0x20
    | Code: f0004701 910a0021 aa1403e5 97b91c70 (b9400280)
    | ---[ end trace 0000000000000000 ]---

Simply check for the struct pointer being NULL before trying to access
its members, to avoid this situation.

This was found when a transport doesn't really work (for instance no SMC
service), the probe routines then tries to clean up, and triggers a crash.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Fixes: 1dc6558062 ("firmware: arm_scmi: Add smc/hvc transport")
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240126122325.2039669-1-andre.przywara@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:35:54 +00:00
Peng Fan
dc36561e15 firmware: arm_scmi: Implement clock get permissions
ARM SCMI v3.2 introduces clock get permission command. To implement the
same let us stash the values of those permissions in the scmi_clock_info.
They indicate if the operation is forbidden or not.

If the CLOCK_GET_PERMISSIONS command is not supported, the default
permissions are set to allow the operations, otherwise they will be set
according to the response of CLOCK_GET_PERMISSIONS from the SCMI
platform firmware.

Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240121110901.1414856-1-peng.fan@oss.nxp.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:43 +00:00
Cristian Marussi
2858f6e5f0 firmware: arm_scmi: Add multiple protocols registration support
Add the capability for a SCMI driver to register to the core SCMI stack
with multiple SCMI protocols. In such a case the SCMI driver probe
function will end up being called once for each registered protocol
which have been also found as implemented on the platform.

This is especially useful in testing scenarios.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20231221151129.325749-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:37 +00:00
Cristian Marussi
dea893a66c firmware: arm_scmi: Rework clock domain info lookups
Accessing clock domains descriptors by the index from the SCMI drivers
can potentially lead to out-of-bound violations if the SCMI drivers
misbehaves.

Use a common helper to check the consistency of such accesses.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240110120916.2482603-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:31 +00:00
Sudeep Holla
534224b958 firmware: arm_scmi: Warn if domain frequency multiplier is 0 or rounded off
When (sustained_freq_khz * 1000) is less than sustained_perf_level, the
multiplier will be less than 1 and hence rounded down as 0. Similarly if
it is not multiple of sustained_perf_level the dom_info->mult_factor will
contain rounded down value and will end up impacting all the frequency
calculations done using it.

Add warning if and when the domain frequency multiplier is 0 or rounded
down so that it gives a clue to get the firmware tables fixed.

Suggested-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240119152338.3047620-1-sudeep.holla@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-02-20 06:29:26 +00:00
Nícolas F. R. A. Prado
8a0a62941a firmware: coreboot: Replace tag with id table in driver struct
Switch the plain 'tag' field in struct coreboot_driver for the newly
created coreboot_device_id struct, which also contains a tag field and
has the benefit of allowing modalias generation, and update all coreboot
drivers accordingly.

While at it, also add the id table for each driver to the module device
table to allow automatically loading the module.

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20240212-coreboot-mod-defconfig-v4-3-d14172676f6d@collabora.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2024-02-17 08:53:06 +08:00
Nícolas F. R. A. Prado
c2b28f6806 firmware: coreboot: Generate modalias uevent for devices
Generate a modalias uevent for devices in the coreboot bus to allow
userspace to automatically load the corresponding modules.

Acked-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Link: https://lore.kernel.org/r/20240212-coreboot-mod-defconfig-v4-1-d14172676f6d@collabora.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2024-02-17 08:53:05 +08:00
Thomas Zimmermann
78aa89d1df firmware/sysfb: Update screen_info for relocated EFI framebuffers
On ARM PCI systems, the PCI hierarchy might be reconfigured during
boot and the firmware framebuffer might move as a result of that.
The values in screen_info will then be invalid.

Work around this problem by tracking the framebuffer's initial
location before it get relocated; then fix the screen_info state
between reloaction and creating the firmware framebuffer's device.

This functionality has been lifted from efifb. See the commit message
of commit 55d728a40d ("efi/fb: Avoid reconfiguration of BAR that
covers the framebuffer") for more information.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-8-tzimmermann@suse.de
2024-02-14 10:09:21 +01:00
Thomas Zimmermann
4e754597d6 firmware/sysfb: Create firmware device only for enabled PCI devices
Test if the firmware framebuffer's parent PCI device, if any, has
been enabled. If not, the firmware framebuffer is most likely not
working. Hence, do not create a device for the firmware framebuffer
on disabled PCI devices.

So far, efifb tracked the status of the PCI parent device internally
and did not bind if it was disabled. This patch implements the
functionality for all PCI-based firmware framebuffers.

v3:
	* make commit message more precise (Sui)
v2:
	* rework sysfb_pci_dev_is_enabled() (Javier)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-6-tzimmermann@suse.de
2024-02-14 10:09:18 +01:00
Thomas Zimmermann
9eac534db0 firmware/sysfb: Set firmware-framebuffer parent device
Set the firmware framebuffer's parent device, which usually is the
graphics hardware's physical device. Integrates the framebuffer in
the Linux device hierarchy and lets Linux handle dependencies among
devices. For example, the graphics hardware won't be suspended while
the firmware device is still active.

v4:
	* fix build for CONFIG_SYSFB_SIMPLEFB=n, again
v3:
	* fix build for CONFIG_SYSFB_SIMPLEFB=n (Sui)
	* test result of screen_info_pci_dev() for errors (Sui)
v2:
	* detect parent device in sysfb_parent_dev()

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-4-tzimmermann@suse.de
2024-02-14 10:09:17 +01:00
Thomas Zimmermann
75fa9b7e37 video: Add helpers for decoding screen_info
The plain values as stored in struct screen_info need to be decoded
before being used. Add helpers that decode the type of video output
and the framebuffer I/O aperture.

Old or non-x86 systems may not set the type of video directly, but
only indicate the presence by storing 0x01 in orig_video_isVGA. The
decoding logic in screen_info_video_type() takes this into account.
It then follows similar code in vgacon's vgacon_startup() to detect
the video type from the given values.

A call to screen_info_resources() returns all known resources of the
given screen_info. The resources' values have been taken from existing
code in vgacon and vga16fb. These drivers can later be converted to
use the new interfaces.

v2:
	* return ssize_t from screen_info_resources()
	* don't call __screen_info_has_lfb() unnecessarily

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240212090736.11464-2-tzimmermann@suse.de
2024-02-14 10:09:13 +01:00
Arnd Bergmann
fccfa646ef efi/capsule-loader: fix incorrect allocation size
gcc-14 notices that the allocation with sizeof(void) on 32-bit architectures
is not enough for a 64-bit phys_addr_t:

drivers/firmware/efi/capsule-loader.c: In function 'efi_capsule_open':
drivers/firmware/efi/capsule-loader.c:295:24: error: allocation of insufficient size '4' for type 'phys_addr_t' {aka 'long long unsigned int'} with size '8' [-Werror=alloc-size]
  295 |         cap_info->phys = kzalloc(sizeof(void *), GFP_KERNEL);
      |                        ^

Use the correct type instead here.

Fixes: f24c4d4780 ("efi/capsule-loader: Reinstate virtual capsule mapping")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-02-13 16:30:07 +01:00
Linus Torvalds
e6f39a90de EFI fixes for v6.8 #1
- Tighten ELF relocation checks on the RISC-V EFI stub
 - Give up if the new EFI memory attributes protocol fails spuriously on
   x86
 - Take care not to place the kernel in the lowest 16 MB of DRAM on x86
 - Omit special purpose EFI memory from memblock
 - Some fixes for the CXL CPER reporting code
 - Make the PE/COFF layout of mixed-mode capable images comply with a
   strict interpretation of the spec
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZcDtKAAKCRAwbglWLn0t
 XMDfAP9ttq8Ir4+hp8A0DGE79x6eSgBIkl5ztGmMQGybzEkzdAEAgxfDUieQW4TT
 GmbyGGUouvSYxfZf4gVTQn8b/bd57AI=
 =Af8A
 -----END PGP SIGNATURE-----

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

Pull EFI fixes from Ard Biesheuvel:
 "The only notable change here is the patch that changes the way we deal
  with spurious errors from the EFI memory attribute protocol. This will
  be backported to v6.6, and is intended to ensure that we will not
  paint ourselves into a corner when we tighten this further in order to
  comply with MS requirements on signed EFI code.

  Note that this protocol does not currently exist in x86 production
  systems in the field, only in Microsoft's fork of OVMF, but it will be
  mandatory for Windows logo certification for x86 PCs in the future.

   - Tighten ELF relocation checks on the RISC-V EFI stub

   - Give up if the new EFI memory attributes protocol fails spuriously
     on x86

   - Take care not to place the kernel in the lowest 16 MB of DRAM on
     x86

   - Omit special purpose EFI memory from memblock

   - Some fixes for the CXL CPER reporting code

   - Make the PE/COFF layout of mixed-mode capable images comply with a
     strict interpretation of the spec"

* tag 'efi-fixes-for-v6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  x86/efistub: Use 1:1 file:memory mapping for PE/COFF .compat section
  cxl/trace: Remove unnecessary memcpy's
  cxl/cper: Fix errant CPER prints for CXL events
  efi: Don't add memblocks for soft-reserved memory
  efi: runtime: Fix potential overflow of soft-reserved region size
  efi/libstub: Add one kernel-doc comment
  x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR
  x86/efistub: Give up if memory attribute protocol returns an error
  riscv/efistub: Tighten ELF relocation check
  riscv/efistub: Ensure GP-relative addressing is not used
2024-02-09 10:40:50 -08:00
Ricardo B. Marliere
e3c5df1381 firmware: coreboot: make coreboot_bus_type const
Now that the driver core can properly handle constant struct bus_type,
move the coreboot_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240204-bus_cleanup-firmware-v1-1-d1bff946606d@marliere.net
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2024-02-06 11:56:17 +08:00
Ira Weiny
54ce1927eb cxl/cper: Fix errant CPER prints for CXL events
Jonathan reports that CXL CPER events dump an extra generic error
message.

	{1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 1
	{1}[Hardware Error]: event severity: recoverable
	{1}[Hardware Error]:  Error 0, type: recoverable
	{1}[Hardware Error]:   section type: unknown, fbcd0a77-c260-417f-85a9-088b1621eba6
	{1}[Hardware Error]:   section length: 0x90
	{1}[Hardware Error]:   00000000: 00000090 00000007 00000000 0d938086 ................
	{1}[Hardware Error]:   00000010: 00100000 00000000 00040000 00000000 ................
	...

CXL events were rerouted though the CXL subsystem for additional
processing.  However, when that work was done it was missed that
cper_estatus_print_section() continued with a generic error message
which is confusing.

Teach CPER print code to ignore printing details of some section types.
Assign the CXL event GUIDs to this set to prevent confusing unknown
prints.

Reported-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Suggested-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-02-03 18:31:17 +01:00
Andrew Bresticker
0bcff59ef7 efi: Don't add memblocks for soft-reserved memory
Adding memblocks for soft-reserved regions prevents them from later being
hotplugged in by dax_kmem.

Signed-off-by: Andrew Bresticker <abrestic@rivosinc.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-02-02 19:31:24 +01:00
Andrew Bresticker
de1034b38a efi: runtime: Fix potential overflow of soft-reserved region size
md_size will have been narrowed if we have >= 4GB worth of pages in a
soft-reserved region.

Signed-off-by: Andrew Bresticker <abrestic@rivosinc.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-02-02 19:31:24 +01:00
Yang Li
aa0e784dea efi/libstub: Add one kernel-doc comment
Add the description of @memory_type to silence the warning:
drivers/firmware/efi/libstub/alignedmem.c:27: warning: Function parameter or struct member 'memory_type' not described in 'efi_allocate_pages_aligned'

Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
[ardb: tweak comment]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-01-30 21:44:21 +01:00
Ard Biesheuvel
2f77465b05 x86/efistub: Avoid placing the kernel below LOAD_PHYSICAL_ADDR
The EFI stub's kernel placement logic randomizes the physical placement
of the kernel by taking all available memory into account, and picking a
region at random, based on a random seed.

When KASLR is disabled, this seed is set to 0x0, and this results in the
lowest available region of memory to be selected for loading the kernel,
even if this is below LOAD_PHYSICAL_ADDR. Some of this memory is
typically reserved for the GFP_DMA region, to accommodate masters that
can only access the first 16 MiB of system memory.

Even if such devices are rare these days, we may still end up with a
warning in the kernel log, as reported by Tom:

 swapper/0: page allocation failure: order:10, mode:0xcc1(GFP_KERNEL|GFP_DMA), nodemask=(null),cpuset=/,mems_allowed=0

Fix this by tweaking the random allocation logic to accept a low bound
on the placement, and set it to LOAD_PHYSICAL_ADDR.

Fixes: a1b87d54f4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
Reported-by: Tom Englund <tomenglund26@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218404
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-01-30 21:44:21 +01:00
Samasth Norway Ananda
0abcac4fe3 firmware: microchip: fix wrong sizeof argument
response_msg is a pointer to an unsigned int (u32). So passing just
response_msg to sizeof would not print the size of the variable. To get
the size of response_msg we need to pass it as a pointer variable.

Fixes: ec5b0f1193 ("firmware: microchip: add PolarFire SoC Auto Update support")
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2024-01-29 18:52:11 +00:00
Linus Torvalds
168174d781 drm fixes for 6.8-rc2
fb:
 - fix simpledrm/i915 regression by reverting change
 
 scheduler:
 - fix regression affecting amdgpu users due to sched draining
 
 nouveau:
 - revert 6.7 deadlock fix as it has side effects
 
 dp:
 - fix documentation warning
 
 ttm:
 - fix dummy page read on some platforms
 
 bridge:
 - anx7625 suspend fix
 - sii902x: fix probing and audio registration
 - parade-ps8640: fix suspend of bridge, aux fixes
 - samsung-dsim: avoid using FORCE_STOP_STATE
 
 panel:
 - simple add missing bus flags
 - fix samsung-s6d7aa0 flags
 
 amdgpu:
 - AC/DC power supply tracking fix
 - Don't show invalid vram vendor data
 - SMU 13.0.x fixes
 - GART fix for umr on systems without VRAM
 - GFX 10/11 UNORD_DISPATCH fixes
 - IPS display fixes (required for S0ix on some platforms)
 - Misc fixes
 
 i915:
 - DSI sequence revert to fix GitLab #10071 and DP test-pattern fix
 - Drop -Wstringop-overflow (broken on GCC11)
 
 ivpu:
 - fix recovery/reset support
 - improve submit ioctl stability
 - fix dev open/close races on unbind
 - PLL disable reset fix
 - deprecate context priority param
 - improve debug buffer logging
 - disable buffer sharing across VPU contexts
 - free buffer sgt on unbind
 - fix missing lock around shmem vmap
 - add better boot diagnostics
 - add more debug prints around mapping
 - dump MMU events in case of timeout
 
 v3d:
 - NULL ptr dereference fix
 
 exynos:
 - fix stack usage
 - fix incorrect type
 - fix dt typo
 - fix gsc runtime resume
 
 xe:
 - Make an ops struct static
 - Fix an implicit 0 to NULL conversion
 - A couple of 32-bit fixes
 - A migration coherency fix for Lunar Lake.
 - An error path vm id leak fix
 - Remove PVC references in kunit tests
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEEKbZHaGwW9KfbeusDHTzWXnEhr4FAmWz/lsACgkQDHTzWXnE
 hr4m2Q/8DB5XlLPXQCW7xGwS6H546xItKZv32VxnqChl2qG7CIzLpqO1ZTQm8OtW
 QSE5Xc1kBG2qZeWV5vvtRn3wtwejgzIMBg1KUkDUXllAHGhifZfzti4J8muWXLIx
 ioL4pWefwnq/bhL4F0IzN7j1qSxxR0UyL/0WORvCjIIVBVG/QJpHbpM5gX/00qQE
 APPLJrrU+2dnAEHlKzFwCkp9bR1b2Tf6yRRh7p1gbLjkYS8rfy36BWFYdP6JC/a3
 EU1tPclLVJomt9rfPjhB33lD8DpBVGxi2cDjquMmrgLNPIuaOdD3Lk/awe7TKfiF
 g/ECLojJCIr50268cZ5X6Q1RvZZrbcorcG6EX2JzkP4sKI6fsc6XVPhtfXj59ysR
 jIRUp5eMKZPLF/FS2g68jFFos2HcNqopezNmo1pM/kT1FMT4k0N93PlW+Zr+Uhxx
 BEA2OsdCEXCwJLaLCXiRQkgpsvqyeRy7jK28J7CaY22bJFaRtGyzeSEcSrNb+nGI
 y+1Qqgy/7cSP4+yC7uOtytm/e20zzLt3lOsDPK3atHKa1X/HuWtm1gX2U4sGl9+A
 DChn2p5Xdl10SOt+f346kNGuJict59TGDsXD6ETsbmFG49VRZEzGhoSLZ7UYl90G
 NUBPS8dc6ctQnsLnOZ1iyp3NZxOGm+jLEPXb76Wt2sJPw4KBP1A=
 =eZEy
 -----END PGP SIGNATURE-----

Merge tag 'drm-fixes-2024-01-27' of git://anongit.freedesktop.org/drm/drm

Pull drm fixes from Dave Airlie:
 "Lots going on for rc2, ivpu has a bunch of stabilisation and debugging
  work, then amdgpu and xe are the main fixes. i915, exynos have a few,
  then some misc panel and bridge fixes.

  Worth mentioning are three regressions. One of the nouveau fixes in
  6.7 for a serious deadlock had side effects, so I guess we will bring
  back the deadlock until I can figure out what should be done properly.
  There was a scheduler regression vs amdgpu which was reported in a few
  places and is now fixed. There was an i915 vs simpledrm problem
  resulting in black screens, that is reverted also.

  I'll be working on a proper nouveau fix, it kinda looks like one of
  those cases where someone tried to use an atomic where they should
  have probably used a lock, but I'll see.

  fb:
   - fix simpledrm/i915 regression by reverting change

  scheduler:
   - fix regression affecting amdgpu users due to sched draining

  nouveau:
   - revert 6.7 deadlock fix as it has side effects

  dp:
   - fix documentation warning

  ttm:
   - fix dummy page read on some platforms

  bridge:
   - anx7625 suspend fix
   - sii902x: fix probing and audio registration
   - parade-ps8640: fix suspend of bridge, aux fixes
   - samsung-dsim: avoid using FORCE_STOP_STATE

  panel:
   - simple add missing bus flags
   - fix samsung-s6d7aa0 flags

  amdgpu:
   - AC/DC power supply tracking fix
   - Don't show invalid vram vendor data
   - SMU 13.0.x fixes
   - GART fix for umr on systems without VRAM
   - GFX 10/11 UNORD_DISPATCH fixes
   - IPS display fixes (required for S0ix on some platforms)
   - Misc fixes

  i915:
   - DSI sequence revert to fix GitLab #10071 and DP test-pattern fix
   - Drop -Wstringop-overflow (broken on GCC11)

  ivpu:
   - fix recovery/reset support
   - improve submit ioctl stability
   - fix dev open/close races on unbind
   - PLL disable reset fix
   - deprecate context priority param
   - improve debug buffer logging
   - disable buffer sharing across VPU contexts
   - free buffer sgt on unbind
   - fix missing lock around shmem vmap
   - add better boot diagnostics
   - add more debug prints around mapping
   - dump MMU events in case of timeout

  v3d:
   - NULL ptr dereference fix

  exynos:
   - fix stack usage
   - fix incorrect type
   - fix dt typo
   - fix gsc runtime resume

  xe:
   - Make an ops struct static
   - Fix an implicit 0 to NULL conversion
   - A couple of 32-bit fixes
   - A migration coherency fix for Lunar Lake.
   - An error path vm id leak fix
   - Remove PVC references in kunit tests"

* tag 'drm-fixes-2024-01-27' of git://anongit.freedesktop.org/drm/drm: (66 commits)
  Revert "nouveau: push event block/allowing out of the fence context"
  drm: bridge: samsung-dsim: Don't use FORCE_STOP_STATE
  drm/sched: Drain all entities in DRM sched run job worker
  drm/amd/display: "Enable IPS by default"
  drm/amd: Add a DC debug mask for IPS
  drm/amd/display: Disable ips before dc interrupt setting
  drm/amd/display: Replay + IPS + ABM in Full Screen VPB
  drm/amd/display: Add IPS checks before dcn register access
  drm/amd/display: Add Replay IPS register for DMUB command table
  drm/amd/display: Allow IPS2 during Replay
  drm/amdgpu/gfx11: set UNORD_DISPATCH in compute MQDs
  drm/amdgpu/gfx10: set UNORD_DISPATCH in compute MQDs
  drm/amd/amdgpu: Assign GART pages to AMD device mapping
  drm/amd/pm: Fetch current power limit from FW
  drm/amdgpu: Fix null pointer dereference
  drm/amdgpu: Show vram vendor only if available
  drm/amd/pm: update the power cap setting
  drm/amdgpu: Avoid fetching vram vendor information
  drm/amdgpu/pm: Fix the power source flag error
  drm/amd/display: Fix uninitialized variable usage in core_link_ 'read_dpcd() & write_dpcd()' functions
  ...
2024-01-26 13:52:18 -08:00
Ard Biesheuvel
a7a6a01f88 x86/efistub: Give up if memory attribute protocol returns an error
The recently introduced EFI memory attributes protocol should be used
if it exists to ensure that the memory allocation created for the kernel
permits execution. This is needed for compatibility with tightened
requirements related to Windows logo certification for x86 PCs.

Currently, we simply strip the execute protect (XP) attribute from the
entire range, but this might be rejected under some firmware security
policies, and so in a subsequent patch, this will be changed to only
strip XP from the executable region that runs early, and make it
read-only (RO) as well.

In order to catch any issues early, ensure that the memory attribute
protocol works as intended, and give up if it produces spurious errors.

Note that the DXE services based fallback was always based on best
effort, so don't propagate any errors returned by that API.

Fixes: a1b87d54f4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-01-26 16:58:19 +01:00
Arnd Bergmann
8ad2c84e2e Arm FF-A fixes for v6.8
Quite a few fixes addressing issues around missing RW lock initialisation
 in ffa_setup_partitions(), missing check for xa_load() return value,
 use of xa_insert instead of xa_store to flag case of duplicate insertion.
 It also simplifies ffa_partitions_cleanup() with xa_for_each() and xa_erase()
 instead of xa_extract() and kfree(). Finally it includes fixes around
 handling of partitions setup failures during initialisation.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmWuj+IACgkQAEG6vDF+
 4pgufA/9H73+TI0bKWhH9TqXONeJQEISJ3EKHJSsN1yuKsToYDetmadidXegLmGC
 nyJULeuTF9codmId5TQ8Zh29Bir38Nh4bFnfvVONPe78KYm6Xjt3HDei903fRIPK
 wch8ReenHdGzyhuAzcgL9CHUzgvJuM5KtaOgiAAOlNILzMk8nk1qbpoesTzvJOaD
 0sLT/KiN2aTICk6YnSBAHnPFZ2GWGJ7PHqKvzgNMPLloOEQn0xGmKgegH+pWjkWm
 qnLI/Gw/m0Y1yqBF1ffDRhC4qH2lMH2cSBR4UJTFQ4e01Hlr+kNgDqBbYJtsOhPJ
 Fj36RA/mc0uSDrMxgwi2SOVnPOumIGVzH6TjoxBthrSLza6AtI+qocF9SUXxfNFv
 VT/CR3CCZhIpBkSWA6XpFLXivNs5wyPau8HPYyU8w7JAeAihYj294eJpLcYeTYi5
 z6xyPbJFZQ1nTYmctMRaBgvOeJFUzpwlTeWkbjBAhsW5KrOKrdWqHv8/w7JSJEyS
 LGBEKWVKg0etx8tjKuR1nn2RsHegHWXqRiU0ahbhh5ukvOt6grfs/9tK8Nxh4N40
 /xdoEgx1TeIbRfjkcnhcjLdHO92kjZnEvmdPVmZjk6o1MiYl1VqaMks4unJTMXh6
 vYtDpK3LTZ7wq8y45IzXu1CZY+YfS+3J038eVp3KJjL2n5oX4Ig=
 =K7Rw
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWymK8ACgkQYKtH/8kJ
 UieGsQ/+LqAXbaAL9RA8Mb54HeS1g6JGYj+vEPOjPXb0ie1ow/92Hia87sqvQhBx
 hu1Vf45wypkAvuPnRrUBNiL7SlC8ae6VGaKtswiDNt8vuvwBu4NoV4GDJgBa7Ney
 mNl1wOeaPVl3DQ/zCZaDGkAcq+dNquhFNYb9t7EtOLhTZVf+yNHPYEbcH2Mx/f3h
 guaJJODlKCQjqU22lCQiFTi5iWpie3S8Kgq4PEhfREHIq8Ttbll0ZNC1TUxdD854
 Ye6JUE/xUb3rrUvgUMjA15xPzEd4kcJ/GMcMC7sISbUqJOlLCfv6HfEUM3lABbAA
 NNzbBXJAT9U8xu+qOiGLA8ddxqbkt9QrhftwZGBW93g+KgsTUBVv8AFzsrqba94Y
 o4sufePZd/siR66p2m/EvwT4RJFCZ+CKeu4Y+jSv4ki/5W6GgbB+jHgevLX+rSmW
 DeuRaFl6Up89VwmDpY5FdEJ/GQ0d4mzSJx7Yw0N/OITpYs6fZHhHyWKVMPCg7cSt
 NQn0r6YVh8x+ScwY6/m+ofFiuW+GWjNo+wSkAPW3fl3omChAI1KWwXuB7TfWP1io
 /lTl5Azjnd//2oMzdqqcca3m0p6ZHHOFWr9FfEXxpyUyh7aI3sPxM1yxvs3C77vq
 ID12SlHZRved2MuuO5vwVTH+b2w1ab57AA7lswviHqGY8eJO3QI=
 =IR2+
 -----END PGP SIGNATURE-----

Merge tag 'ffa-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

Arm FF-A fixes for v6.8

Quite a few fixes addressing issues around missing RW lock initialisation
in ffa_setup_partitions(), missing check for xa_load() return value,
use of xa_insert instead of xa_store to flag case of duplicate insertion.
It also simplifies ffa_partitions_cleanup() with xa_for_each() and xa_erase()
instead of xa_extract() and kfree(). Finally it includes fixes around
handling of partitions setup failures during initialisation.

* tag 'ffa-fixes-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Handle partitions setup failures
  firmware: arm_ffa: Use xa_insert() and check for result
  firmware: arm_ffa: Simplify ffa_partitions_cleanup()
  firmware: arm_ffa: Check xa_load() return value
  firmware: arm_ffa: Add missing rwlock_init() for the driver partition
  firmware: arm_ffa: Add missing rwlock_init() in ffa_setup_partitions()

Link: https://lore.kernel.org/r/20240122161652.3551159-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2024-01-25 18:21:50 +01:00
Thomas Zimmermann
d1b163aa07 Revert "drivers/firmware: Move sysfb_init() from device_initcall to subsys_initcall_sync"
This reverts commit 60aebc9559.

Commit 60aebc9559 ("drivers/firmware: Move sysfb_init() from
device_initcall to subsys_initcall_sync") messes up initialization order
of the graphics drivers and leads to blank displays on some systems. So
revert the commit.

To make the display drivers fully independent from initialization
order requires to track framebuffer memory by device and independently
from the loaded drivers. The kernel currently lacks the infrastructure
to do so.

Reported-by: Jaak Ristioja <jaak@ristioja.ee>
Closes: https://lore.kernel.org/dri-devel/ZUnNi3q3yB3zZfTl@P70.localdomain/T/#t
Reported-by: Huacai Chen <chenhuacai@loongson.cn>
Closes: https://lore.kernel.org/dri-devel/20231108024613.2898921-1-chenhuacai@loongson.cn/
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10133
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: stable@vger.kernel.org # v6.5+
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240123120937.27736-1-tzimmermann@suse.de
2024-01-24 17:03:44 +01:00
Ard Biesheuvel
d2baf8cc82 riscv/efistub: Tighten ELF relocation check
The EFI stub makefile contains logic to ensure that the objects that
make up the stub do not contain relocations that require runtime fixups
(typically to account for the runtime load address of the executable)

On RISC-V, we also avoid GP based relocations, as they require that GP
is assigned the correct base in the startup code, which is not
implemented in the EFI stub.

So add these relocation types to the grep expression that is used to
carry out this check.

Link: https://lkml.kernel.org/r/42c63cb9-87d0-49db-9af8-95771b186684%40siemens.com
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-01-23 14:31:33 +01:00
Jan Kiszka
afb2a4fb84 riscv/efistub: Ensure GP-relative addressing is not used
The cflags for the RISC-V efistub were missing -mno-relax, thus were
under the risk that the compiler could use GP-relative addressing. That
happened for _edata with binutils-2.41 and kernel 6.1, causing the
relocation to fail due to an invalid kernel_size in handle_kernel_image.
It was not yet observed with newer versions, but that may just be luck.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-01-23 14:31:32 +01:00
Cristian Marussi
0c565d16b8 firmware: arm_ffa: Handle partitions setup failures
Make ffa_setup_partitions() fail, cleanup and return an error when the Host
partition setup fails: in such a case ffa_init() itself will fail.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-6-75bf7035bc50@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:07:12 +00:00
Cristian Marussi
ace760d9c0 firmware: arm_ffa: Use xa_insert() and check for result
While adding new partitions descriptors to the XArray the outcome of the
stores should be checked and, in particular, it has also to be ensured
that an existing entry with the same index was not already present, since
partitions IDs are expected to be unique.

Use xa_insert() instead of xa_store() since it returns -EBUSY when the
index is already in use and log an error when that happens.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-5-75bf7035bc50@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:07:12 +00:00
Cristian Marussi
ad9d9a107a firmware: arm_ffa: Simplify ffa_partitions_cleanup()
On cleanup iterate the XArrays with xa_for_each() and remove the existent
entries with xa_erase(), finally destroy the XArray itself.

Remove partition_count field from drv_info since no more used anywhwere.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-4-75bf7035bc50@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:07:12 +00:00
Cristian Marussi
c00d9738fd firmware: arm_ffa: Check xa_load() return value
Add a check to verify the result of xa_load() during the partition
lookups done while registering/unregistering the scheduler receiver
interrupt callbacks and while executing the main scheduler receiver
interrupt callback handler.

Fixes: 0184450b8b ("firmware: arm_ffa: Add schedule receiver callback mechanism")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-3-75bf7035bc50@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:07:12 +00:00
Cristian Marussi
5ff30ade16 firmware: arm_ffa: Add missing rwlock_init() for the driver partition
Add the missing rwlock initialization for the FF-A partition associated
the driver in ffa_setup_partitions(). It will the primary scheduler
partition in the host or the VM partition in the virtualised environment.
IOW, it corresponds to the partition with VM ID == drv_info->vm_id.

Fixes: 1b6bf41b7a ("firmware: arm_ffa: Add notification handling mechanism")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-2-75bf7035bc50@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:07:12 +00:00
Cristian Marussi
59b2e242b1 firmware: arm_ffa: Add missing rwlock_init() in ffa_setup_partitions()
Add the missing rwlock initialization for the individual FF-A partition
information in ffa_setup_partitions().

Fixes: 0184450b8b ("firmware: arm_ffa: Add schedule receiver callback mechanism")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108-ffa_fixes_6-8-v1-1-75bf7035bc50@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:07:11 +00:00
Cristian Marussi
6bd1b3fede firmware: arm_scmi: Fix the clock protocol supported version
Rollback currently supported SCMI clock protocol version to v2.0 since
some of the mandatory v3.0 features are indeed still not supported yet.

Fixes: b5efc28a75 ("firmware: arm_scmi: Add protocol versioning checks")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240109181716.2338636-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:01:17 +00:00
Cristian Marussi
27600c96e2 firmware: arm_scmi: Fix the clock protocol version for v3.2
The clock protocol version as per the SCMI v3.2 specification is 0x30000.
Enable the v3.0 clock protocol features only when clock protocol version
equals 0x30000.

The previous beta version of the spec had this value set to 0x20001 and
th same value trickled down from the initial development. The version
update were missed in the driver.

Fixes: e49e314a2c ("firmware: arm_scmi: Add clock v3.2 CONFIG_SET support")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240109150106.2066739-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:01:17 +00:00
Cristian Marussi
b5dc0ffd36 firmware: arm_scmi: Use xa_insert() when saving raw queues
Use xa_insert() when saving per-channel raw queues to better check for
duplicates.

Fixes: 7860701d1e ("firmware: arm_scmi: Add per-channel raw injection support")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108185050.1628687-2-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:01:17 +00:00
Cristian Marussi
e8ef4bbe39 firmware: arm_scmi: Use xa_insert() to store opps
When storing opps by level or index use xa_insert() instead of xa_store()
and add error-checking to spot bad duplicates indexes possibly wrongly
provided by the platform firmware.

Fixes: 31c7c1397a ("firmware: arm_scmi: Add v3.2 perf level indexing mode support")
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240108185050.1628687-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:01:17 +00:00
Tanzir Hasan
0726fcc8d4 firmware: arm_scmi: Replace asm-generic/bug.h with linux/bug.h
linux/bug.h includes asm-generic/bug.h already and hence replacing
asm-generic/bug.h with linux/bug.h will not regress any build.
Also, it is always better to avoid header file inclusion from asm-generic
if possible.

Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tanzir Hasan <tanzirh@google.com>
Link: https://lore.kernel.org/r/20231226-shmem-v1-1-ea15ce81d8ba@google.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:01:16 +00:00
Cristian Marussi
437a310b22 firmware: arm_scmi: Check mailbox/SMT channel for consistency
On reception of a completion interrupt the shared memory area is accessed
to retrieve the message header at first and then, if the message sequence
number identifies a transaction which is still pending, the related
payload is fetched too.

When an SCMI command times out the channel ownership remains with the
platform until eventually a late reply is received and, as a consequence,
any further transmission attempt remains pending, waiting for the channel
to be relinquished by the platform.

Once that late reply is received the channel ownership is given back
to the agent and any pending request is then allowed to proceed and
overwrite the SMT area of the just delivered late reply; then the wait
for the reply to the new request starts.

It has been observed that the spurious IRQ related to the late reply can
be wrongly associated with the freshly enqueued request: when that happens
the SCMI stack in-flight lookup procedure is fooled by the fact that the
message header now present in the SMT area is related to the new pending
transaction, even though the real reply has still to arrive.

This race-condition on the A2P channel can be detected by looking at the
channel status bits: a genuine reply from the platform will have set the
channel free bit before triggering the completion IRQ.

Add a consistency check to validate such condition in the A2P ISR.

Reported-by: Xinglong Yang <xinglong.yang@cixtech.com>
Closes: https://lore.kernel.org/all/PUZPR06MB54981E6FA00D82BFDBB864FBF08DA@PUZPR06MB5498.apcprd06.prod.outlook.com/
Fixes: 5c8a47a5a9 ("firmware: arm_scmi: Make scmi core independent of the transport type")
Cc: stable@vger.kernel.org # 5.15+
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Tested-by: Xinglong Yang <xinglong.yang@cixtech.com>
Link: https://lore.kernel.org/r/20231220172112.763539-1-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
2024-01-22 10:01:16 +00:00
Helge Deller
2bebc3cd48 Revert "firmware/sysfb: Clear screen_info state after consuming it"
This reverts commit df67699c9c.

Jens Axboe reported a regression that his machine is failing to show a
console, or in fact anything, on current -git. There's no output and no
console after:

Loading Linux 6.7.0+ ...
Loading initial ramdisk ...

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jens Axboe <axboe@kernel.dk>
2024-01-19 22:22:26 +01:00
Linus Torvalds
296455ade1 Char/Misc and other Driver changes for 6.8-rc1
Here is the big set of char/misc and other driver subsystem changes for
 6.8-rc1.  Lots of stuff in here, but first off, you will get a merge
 conflict in drivers/android/binder_alloc.c when merging this tree due to
 changing coming in through the -mm tree.
 
 The resolution of the merge issue can be found here:
 	https://lore.kernel.org/r/20231207134213.25631ae9@canb.auug.org.au
 or in a simpler patch form in that thread:
 	https://lore.kernel.org/r/ZXHzooF07LfQQYiE@google.com
 
 If there are issues with the merge of this file, please let me know.
 
 Other than lots of binder driver changes (as you can see by the merge
 conflicts) included in here are:
  - lots of iio driver updates and additions
  - spmi driver updates
  - eeprom driver updates
  - firmware driver updates
  - ocxl driver updates
  - mhi driver updates
  - w1 driver updates
  - nvmem driver updates
  - coresight driver updates
  - platform driver remove callback api changes
  - tags.sh script updates
  - bus_type constant marking cleanups
  - lots of other small driver updates
 
 All of these have been in linux-next for a while with no reported issues
 (other than the binder merge conflict.)
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZaeMMQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ynWNgCfQ/Yz7QO6EMLDwHO5LRsb3YMhjL4AoNVdanjP
 YoI7f1I4GBcC0GKNfK6s
 =+Kyv
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char/misc and other driver updates from Greg KH:
 "Here is the big set of char/misc and other driver subsystem changes
  for 6.8-rc1.

  Other than lots of binder driver changes (as you can see by the merge
  conflicts) included in here are:

   - lots of iio driver updates and additions

   - spmi driver updates

   - eeprom driver updates

   - firmware driver updates

   - ocxl driver updates

   - mhi driver updates

   - w1 driver updates

   - nvmem driver updates

   - coresight driver updates

   - platform driver remove callback api changes

   - tags.sh script updates

   - bus_type constant marking cleanups

   - lots of other small driver updates

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (341 commits)
  android: removed duplicate linux/errno
  uio: Fix use-after-free in uio_open
  drivers: soc: xilinx: add check for platform
  firmware: xilinx: Export function to use in other module
  scripts/tags.sh: remove find_sources
  scripts/tags.sh: use -n to test archinclude
  scripts/tags.sh: add local annotation
  scripts/tags.sh: use more portable -path instead of -wholename
  scripts/tags.sh: Update comment (addition of gtags)
  firmware: zynqmp: Convert to platform remove callback returning void
  firmware: turris-mox-rwtm: Convert to platform remove callback returning void
  firmware: stratix10-svc: Convert to platform remove callback returning void
  firmware: stratix10-rsu: Convert to platform remove callback returning void
  firmware: raspberrypi: Convert to platform remove callback returning void
  firmware: qemu_fw_cfg: Convert to platform remove callback returning void
  firmware: mtk-adsp-ipc: Convert to platform remove callback returning void
  firmware: imx-dsp: Convert to platform remove callback returning void
  firmware: coreboot_table: Convert to platform remove callback returning void
  firmware: arm_scpi: Convert to platform remove callback returning void
  firmware: arm_scmi: Convert to platform remove callback returning void
  ...
2024-01-17 16:47:17 -08:00
Linus Torvalds
d97a78423c fbdev fixes and cleanups for 6.8-rc1:
- Remove intelfb fbdev driver (Thomas Zimmermann)
 - Remove amba-clcd fbdev driver (Linus Walleij)
 - Remove vmlfb Carillo Ranch fbdev driver (Matthew Wilcox)
 - fb_deferred_io flushing fixes (Nam Cao)
 - imxfb code fixes and cleanups (Dario Binacchi)
 - stifb primary screen detection cleanups (Thomas Zimmermann)
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZaEregAKCRD3ErUQojoP
 X0c9AP0ZdpE1zWFdjYg7ucKhNGrMfXWS8auvkC0qdd9Q0psnmQD/Z22JIl/fpgrk
 0T74KAEd7MwMXGIUm5VKMe/AZJtaBgs=
 =/sky
 -----END PGP SIGNATURE-----

Merge tag 'fbdev-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev

Pull fbdev updates from Helge Deller:
 "Three fbdev drivers (~8500 lines of code) removed. The Carillo Ranch
  fbdev driver is for an Intel product which was never shipped, and for
  the intelfb and the amba-clcd drivers the drm drivers can be used
  instead.

  The other code changes are minor: some fb_deferred_io flushing fixes,
  imxfb margin fixes and stifb cleanups.

  Summary:
   - Remove intelfb fbdev driver (Thomas Zimmermann)
   - Remove amba-clcd fbdev driver (Linus Walleij)
   - Remove vmlfb Carillo Ranch fbdev driver (Matthew Wilcox)
   - fb_deferred_io flushing fixes (Nam Cao)
   - imxfb code fixes and cleanups (Dario Binacchi)
   - stifb primary screen detection cleanups (Thomas Zimmermann)"

* tag 'fbdev-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: (28 commits)
  fbdev/intelfb: Remove driver
  fbdev/hyperv_fb: Do not clear global screen_info
  firmware/sysfb: Clear screen_info state after consuming it
  fbdev/hyperv_fb: Remove firmware framebuffers with aperture helpers
  drm/hyperv: Remove firmware framebuffers with aperture helper
  fbdev/sis: Remove dependency on screen_info
  video/logo: use %u format specifier for unsigned int values
  video/sticore: Remove info field from STI struct
  arch/parisc: Detect primary video device from device instance
  fbdev/stifb: Allocate fb_info instance with framebuffer_alloc()
  video/sticore: Store ROM device in STI struct
  fbdev: flush deferred IO before closing
  fbdev: flush deferred work in fb_deferred_io_fsync()
  fbdev: amba-clcd: Delete the old CLCD driver
  fbdev: Remove support for Carillo Ranch driver
  fbdev: hgafb: fix kernel-doc comments
  fbdev: mmp: Fix typo and wording in code comment
  fbdev: fsl-diu-fb: Fix sparse warning due to virt_to_phys() prototype change
  fbdev: imxfb: add '*/' on a separate line in block comment
  fbdev: imxfb: use __func__ for function name
  ...
2024-01-12 14:38:08 -08:00
Linus Torvalds
0c4b09cb54 Core:
- Move the generic PM domain and its governor to the pmdomain subsystem
  - Drop the unused pm_genpd_opp_to_performance_state()
 
 Providers:
  - Convert some providers to let the ->remove() callback return void
  - amlogic: Add support for G12A ISP power domain
  - arm: Move the SCPI power-domain driver to the pmdomain subsystem
  - arm: Move Kconfig options to the pmdomain subsystem
  - qcom: Update part number to X1E80100 for the rpmhpd
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmWhIk8XHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnvBBAAslgbFE31AthRFjRizsIhLD4+
 WXYbuAEWUGOV0VKbcs6JLGqMmgqZ8caPieNWNDPz18M2BpJ3MguS7k5YW6G12QIb
 7nmL/DCYrObO+Q8hMqPaHMRuV6+KjJ+y6UbZrKHKq+ROE+Pk5vfMk1x68nA+J5mO
 rmsDv6eAsBggo4ubDcQ79bJf4t7RdWAcNz6IY8fwZ9HkNbbaC6db6BT0t9f1aTX7
 yeZWxdy317y174xdwPTtQ5dnXQmC3FEBCuG4M0J4gb6nvLtbpoeYqlGrxkNGKxqv
 1IfMl45uu7OuGSq1f3LSpuQluAQs99KG8Y9vTG6kXKC5Xu3sIijciaGTJsCao91e
 af9pjLeX3DWl0RaLUtOB0h78meCHxf79kFUkGUv89FzIWh8iQMWcdwePeXXSNXag
 AklV/gpodCj501Dk1wjs2/3eVI5YUsEcqhLvu9Q3gzDqXy4px8Keut8AollNsfg8
 nZ9P3Kr0eHV2xqtTGYKheebLj5IDWGPC6XS+L60piij52gN6QWnywX/8Kjdms1l6
 2CclTrJ1YZG+I6tLTnrsdy0m9U2w5V2DP/rf+m/lQTRG2d9ZWdKQ+qzakQ7va4Pz
 hokLrm1cC0Wcx/ldwV1wC62WkTnRBmtA4ONMzibAFUCboay8xU7p0OaRmBJcOaPF
 +Nw7Mt3tt4Qn7iE8Fd4=
 =xSMR
 -----END PGP SIGNATURE-----

Merge tag 'pmdomain-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

Pull pmdomain updates from Ulf Hansson:
 "Core:
   - Move the generic PM domain and its governor to the pmdomain
     subsystem
   - Drop the unused pm_genpd_opp_to_performance_state()

  Providers:
   - Convert some providers to let the ->remove() callback return void
   - amlogic: Add support for G12A ISP power domain
   - arm: Move the SCPI power-domain driver to the pmdomain subsystem
   - arm: Move Kconfig options to the pmdomain subsystem
   - qcom: Update part number to X1E80100 for the rpmhpd"

* tag 'pmdomain-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
  PM: domains: Move genpd and its governor to the pmdomain subsystem
  PM: domains: Drop redundant header for genpd
  PM: domains: Drop the unused pm_genpd_opp_to_performance_state()
  PM: domains: fix domain_governor kernel-doc warnings
  pmdomain: xilinx/zynqmp: Convert to platform remove callback returning void
  pmdomain: qcom-cpr: Convert to platform remove callback returning void
  pmdomain: imx93-pd: Convert to platform remove callback returning void
  pmdomain: imx93-blk-ctrl: Convert to platform remove callback returning void
  pmdomain: imx8mp-blk-ctrl: Convert to platform remove callback returning void
  pmdomain: imx8m-blk-ctrl: Convert to platform remove callback returning void
  pmdomain: imx-gpcv2: Convert to platform remove callback returning void
  pmdomain: imx-gpc: Convert to platform remove callback returning void
  pmdomain: imx-pgc: Convert to platform remove callback returning void
  pmdomain: amlogic: meson-ee-pwrc: add support for G12A ISP power domain
  dt-bindings: power: meson-g12a-power: document ISP power domain
  firmware: arm_scpi: Move power-domain driver to the pmdomain dir
  pmdomain: arm_scmi: Move Kconfig options to the pmdomain subsystem
  pmdomain: qcom: rpmhpd: Update part number to X1E80100
  dt-bindings: power: rpmpd: Update part number to X1E80100
2024-01-12 13:54:25 -08:00
Thomas Zimmermann
df67699c9c firmware/sysfb: Clear screen_info state after consuming it
After consuming the global screen_info_state in sysfb_init(), the
created platform device maintains the firmware framebuffer. Clear
screen_info to avoid conflicting access. Subsequent kexec reboots
now ignore the firmware framebuffer.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2024-01-12 12:38:37 +01:00
Linus Torvalds
f6597d1706 SoC: driver updates for 6.8
A new drivers/cache/ subsystem is added to contain drivers for abstracting
 cache flush methods on riscv and potentially others, as this is needed for
 handling non-coherent DMA but several SoCs require nonstandard hardware
 methods for it.
 
 op-tee gains support for asynchronous notification with FF-A, as well
 as support for a system thread for executing in secure world.
 
 The tee, reset, bus, memory and scmi subsystems have a couple of minor
 updates.
 
 Platform specific soc driver changes include:
 
  - Samsung Exynos gains driver support for Google GS101 (Tensor G1)
    across multiple subsystems
 
  - Qualcomm Snapdragon gains support for SM8650 and X1E along with
    added features for some other SoCs
 
  - Mediatek adds support for "Smart Voltage Scaling" on MT8186 and MT8195,
    and driver support for MT8188 along with some code refactoring.
 
  - Microchip Polarfire FPGA support for "Auto Update" of the FPGA bitstream
 
  - Apple M1 mailbox driver is rewritten into a SoC driver
 
  - minor updates on amlogic, mvebu, ti, zynq, imx, renesas and hisilicon
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWeypsACgkQYKtH/8kJ
 UifCpxAA0CMZRXKZOuTw9we2eS9rCy5nBrJsDiEAi9UPgQYUIrD7BVng+PAMN5UD
 AeEDEjUEmZ+a4hyDDPxwdlhI2qIvIITAZ1qbwcElXvt41MTIyo+1BK+kI6A7oxHd
 oPh9kG0yRjb5tNc6utrHbXpEb6AxfXYcdAOzA2YRonqKohYUJlGqHtAub2Dqd6FD
 nuYXGXSZKWMpd0L1X7nuD8+uBj8DbQgq0HfhiAj3vUgzwkYk/SlTo/DYByJOQeMA
 HE1X/vG7qwrdHC4VNXaiJJ/GQ6ZXAZXdK+F97v+FtfClPVuxAffMlTbb6t/CyiVb
 4HrVzduyNMlIh8OqxLXabXJ0iJ970wkuPlOZy2pZmgkV5oKGSXSGxXWAwMvOmCVO
 RSgetXYHX3gDGQ59Si+LsEQhORdChMMik5nBPdyxj1UK3QsObV40qLpHBae7GWnA
 Qb6+3FrtnbiHfOMxGmhC4lqDfgSfByW1BspxsFyy33wb+TPfYJzOnXYe8aYTZ1iw
 GSuWNa/uHF61Q2v0d3Lt09GhUh9wWradnJ+caxpB0B0MHG2QQqFI8EVwIEn1/spu
 bWpItLT8UUDgNx+F9KRzP3HqwqbDzd9fnojSPescTzudpvpP9MC5X3w05pQ6iA1x
 HFJ+2J/ENvDAHWSAySn7Qx4JKSeLxm1YcquXQW2sVTVwFTkqigw=
 =4bKY
 -----END PGP SIGNATURE-----

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

Pull SoC driver updates from Arnd Bergmann:
 "A new drivers/cache/ subsystem is added to contain drivers for
  abstracting cache flush methods on riscv and potentially others, as
  this is needed for handling non-coherent DMA but several SoCs require
  nonstandard hardware methods for it.

  op-tee gains support for asynchronous notification with FF-A, as well
  as support for a system thread for executing in secure world.

  The tee, reset, bus, memory and scmi subsystems have a couple of minor
  updates.

  Platform specific soc driver changes include:

   - Samsung Exynos gains driver support for Google GS101 (Tensor G1)
     across multiple subsystems

   - Qualcomm Snapdragon gains support for SM8650 and X1E along with
     added features for some other SoCs

   - Mediatek adds support for "Smart Voltage Scaling" on MT8186 and
     MT8195, and driver support for MT8188 along with some code
     refactoring.

   - Microchip Polarfire FPGA support for "Auto Update" of the FPGA
     bitstream

   - Apple M1 mailbox driver is rewritten into a SoC driver

   - minor updates on amlogic, mvebu, ti, zynq, imx, renesas and
     hisilicon"

* tag 'soc-drivers-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (189 commits)
  memory: ti-emif-pm: Convert to platform remove callback returning void
  memory: ti-aemif: Convert to platform remove callback returning void
  memory: tegra210-emc: Convert to platform remove callback returning void
  memory: tegra186-emc: Convert to platform remove callback returning void
  memory: stm32-fmc2-ebi: Convert to platform remove callback returning void
  memory: exynos5422-dmc: Convert to platform remove callback returning void
  memory: renesas-rpc-if: Convert to platform remove callback returning void
  memory: omap-gpmc: Convert to platform remove callback returning void
  memory: mtk-smi: Convert to platform remove callback returning void
  memory: jz4780-nemc: Convert to platform remove callback returning void
  memory: fsl_ifc: Convert to platform remove callback returning void
  memory: fsl-corenet-cf: Convert to platform remove callback returning void
  memory: emif: Convert to platform remove callback returning void
  memory: brcmstb_memc: Convert to platform remove callback returning void
  memory: brcmstb_dpfe: Convert to platform remove callback returning void
  soc: qcom: llcc: Fix LLCC_TRP_ATTR2_CFGn offset
  firmware: qcom: qseecom: fix memory leaks in error paths
  dt-bindings: clock: google,gs101: rename CMU_TOP gate defines
  soc: qcom: llcc: Fix typo in kernel-doc
  dt-bindings: soc: qcom,aoss-qmp: document the X1E80100 Always-On Subsystem side channel
  ...
2024-01-11 11:31:46 -08:00
Linus Torvalds
a7e4c6cf5b EFI updates for v6.8
- Fix a syzbot reported issue in efivarfs where concurrent accesses to
   the file system resulted in list corruption
 
 - Add support for accessing EFI variables via the TEE subsystem (and a
   trusted application in the secure world) instead of via EFI runtime
   firmware running in the OS's execution context
 
 - Avoid linker tricks to discover the image base on LoongArch
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZYVaHQAKCRAwbglWLn0t
 XPm/AQDzX9A6TND00eOLYYWw91kybHnzrVd8GRKOv2EIxGz33AEAgW6nXIJlBRax
 MBq6S/sXdyknuCC3sO7H9FexdD4BzQM=
 =MZUx
 -----END PGP SIGNATURE-----

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

Pull EFI updates from Ard Biesheuvel:

 - Fix a syzbot reported issue in efivarfs where concurrent accesses to
   the file system resulted in list corruption

 - Add support for accessing EFI variables via the TEE subsystem (and a
   trusted application in the secure world) instead of via EFI runtime
   firmware running in the OS's execution context

 - Avoid linker tricks to discover the image base on LoongArch

* tag 'efi-next-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi: memmap: fix kernel-doc warnings
  efi/loongarch: Directly position the loaded image file
  efivarfs: automatically update super block flag
  efi: Add tee-based EFI variable driver
  efi: Add EFI_ACCESS_DENIED status code
  efi: expose efivar generic ops register function
  efivarfs: Move efivarfs list into superblock s_fs_info
  efivarfs: Free s_fs_info on unmount
  efivarfs: Move efivar availability check into FS context init
  efivarfs: force RO when remounting if SetVariable is not supported
2024-01-09 17:11:27 -08:00
Linus Torvalds
b9b56eb280 chrome platform firmware changes for 6.8
* Fixes
 
   - Fix an invalid address access.
 
 * Misc
 
   - Use .remove_new() for converting the callback to return void.
 -----BEGIN PGP SIGNATURE-----
 
 iIkEABYIADEWIQS0yQeDP3cjLyifNRUrxTEGBto89AUCZZu2NhMcdHp1bmdiaUBr
 ZXJuZWwub3JnAAoJECvFMQYG2jz0568A/2e7mfbrbOecSIJp+VFNnjg5sUJHKeKR
 qLMrQ2bW3N4bAQC6kb8hBi5bBjDu8qE/ivXn9MbKoXAdZ+gbWdGsSWD6DA==
 =ZOhl
 -----END PGP SIGNATURE-----

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

Pull chrome platform firmware updates from Tzung-Bi Shih:

  - Fix an invalid address access.

  - Use .remove_new() for converting the callback to return void

* tag 'tag-chrome-platform-firmware-for-v6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
  firmware: coreboot: Convert to platform remove callback returning void
  firmware: coreboot: framebuffer: Avoid invalid zero physical address
2024-01-09 17:04:44 -08:00
Linus Torvalds
bd012f3a5b ACPI updates for 6.8-rc1
- Add CSI-2 and DisCo for Imaging support to the ACPI device
    enumeration code (Sakari Ailus, Rafael J. Wysocki).
 
  - Adjust the cpufreq thermal reduction algorithm in the ACPI processor
    driver for Tegra241 (Srikar Srimath Tirumala, Arnd Bergmann).
 
  - Make acpi_proc_quirk_mwait_check() x86-specific (Rafael J. Wysocki).
 
  - Switch over ACPI to using a threaded interrupt handler for the
    SCI (Rafael J. Wysocki).
 
  - Allow ACPI Notify () handlers to run on all CPUs and clean up the
    ACPI interface for deferred events processing (Rafael J. Wysocki).
 
  - Switch over the ACPI EC driver to using a threaded handler for the
    dedicated IRQ on systems without the EC GPE (Rafael J. Wysocki).
 
  - Adjust code using ACPICA spinlocks and the ACPI EC driver spinlock to
    keep local interrupts on (Rafael J. Wysocki).
 
  - Adjust the USB4 _OSC handshake to correctly handle cases in which
    certain types of OS control are denied by the platform (Mika
    Westerberg).
 
  - Correct and clean up the generic function for parsing ACPI data-only
    tables with array structure (Yuntao Wang).
 
  - Modify acpi_dev_uid_match() to support different types of its second
    argument and adjust its users accordingly (Raag Jadav).
 
  - Clean up code related to acpi_evaluate_reference() and ACPI device
    lists (Rafael J. Wysocki).
 
  - Use generic ACPI helpers for evaluating trip point temperature
    objects in the ACPI thermal zone driver (Rafael J. Wysockii, Arnd
    Bergmann).
 
  - Add Thermal fast Sampling Period (_TFP) support to the ACPI thermal
    zone driver (Jeff Brasen).
 
  - Modify the ACPI LPIT table handling code to avoid u32 multiplication
    overflows in state residency computations (Nikita Kiryushin).
 
  - Drop an unused helper function from the ACPI backlight (video) driver
    and add a clarifying comment to it (Hans de Goede).
 
  - Update the ACPI backlight driver to avoid using uninitialized memory
    in some cases (Nikita Kiryushin).
 
  - Add ACPI backlight quirk for the Colorful X15 AT 23 laptop (Yuluo
    Qiu).
 
  - Add support for vendor-defined error types to the ACPI APEI error
    injection code (Avadhut Naik).
 
  - Adjust APEI to properly set MF_ACTION_REQUIRED on synchronous memory
    failure events, so they are handled differently from the asynchronous
    ones (Shuai Xue).
 
  - Fix NULL pointer dereference check in the ACPI extlog driver (Prarit
    Bhargava).
 
  - Adjust the ACPI extlog driver to clear the Extended Error Log status
    when RAS_CEC handled the error (Tony Luck).
 
  - Add IRQ override quirks for some Infinity laptops and for TongFang
    GMxXGxx (David McFarland, Hans de Goede).
 
  - Clean up the ACPI NUMA code and fix it to ensure that fake_pxm is not
    the same as one of the real pxm values (Yuntao Wang).
 
  - Fix the fractional clock divider flags in the ACPI LPSS (Intel SoC)
    driver so as to prevent miscalculation of the values in the clock
    divider (Andy Shevchenko).
 
  - Adjust comments in the ACPI watchdog driver to prevent kernel-doc
    from complaining during documentation builds (Randy Dunlap).
 
  - Make the ACPI button driver send wakeup key events to user space in
    addition to power button events on systems that can be woken up by
    the power button (Ken Xue).
 
  - Adjust pnpacpi_parse_allocated_vendor() to use memcpy() on a full
    structure field (Dmitry Antipov).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmWb8asSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxhsQP/jfRiEP7L9WUl66PdzxSWi1u7bVUZIbs
 z07ujAFdAbvpdM1WgWVq6mSzYewAqIm0A9Koabj7zKuG4VPh0Gjvq26jrK/et65m
 RJhC/qcnZ4h/2bELf9/JE7FIQMDWBGK8gNHBBXVQOZrQYIiBzJ2xyHJ4F0AvLVW6
 GGuX/4mb00jlWGr6uot6qjBgLLxY0EowneLUuH4onEWrThoNWy7zbD34LSsKuljA
 a69UkQPetXbkX4XQYnt4K4BAnwjRQNU2DlUE9lpMtheTS70wilxrC+P0XaETeO7c
 NCm38X2aUv/hSwJ0BekBRdNEvG/WQsfRdOt9jWAkoCL3oDCZdOgfM6Eas7ZDLF2n
 RoxLk2O9UXFwaSSGBVgkRLPCVyWBNI6C8GXnVDN8f9hqIk+jmlsXaXghpzVlGS54
 +ox6fjO81zJjEBxSP5ACCTNZq3BwwHhPhygtIkTO5JQ9SPn+WYCPM0C5Lcvzoj7A
 x7cdOguddhAi4ZWcoRo2cg7qN6vVaDgDgV+ylzh7q5N4cBY4edCJLzcFFuasriN4
 j9/Uj/EgCafrnOhlTJz0iZkAbPZ6T/qa3qBfF948dtFRkztTsddmGA4xof90jfG9
 /FLXL4wSiXK7jbFeUb1OCLOVANWpjHP3pM3gmnggiI3ApcweEGilhhbgVr7FuCG8
 7qj78EUqNVbW
 =Ntzm
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "From the new features standpoint, the most significant change here is
  the addition of CSI-2 and MIPI DisCo for Imaging support to the ACPI
  device enumeration code that will allow MIPI cameras to be enumerated
  through the platform firmware on systems using ACPI.

  Also significant is the switch-over to threaded interrupt handlers for
  the ACPI SCI and the dedicated EC interrupt (on systems where the
  former is not used) which essentially allows all ACPI code to run with
  local interrupts enabled. That should improve responsiveness
  significantly on systems where multiple GPEs are enabled and the
  handling of one SCI involves many I/O address space accesses which
  previously had to be carried out in one go with disabled interrupts on
  the local CPU.

  Apart from the above, the ACPI thermal zone driver will use the
  Thermal fast Sampling Period (_TFP) object if available, which should
  allow temperature changes to be followed more accurately on some
  systems, the ACPI Notify () handlers can run on all CPUs (not just on
  CPU0), which should generally speed up the processing of events
  signaled through the ACPI SCI, and the ACPI power button driver will
  trigger wakeup key events via the input subsystem (on systems where it
  is a system wakeup device)

  In addition to that, there are the usual bunch of fixes and cleanups.

  Specifics:

   - Add CSI-2 and DisCo for Imaging support to the ACPI device
     enumeration code (Sakari Ailus, Rafael J. Wysocki)

   - Adjust the cpufreq thermal reduction algorithm in the ACPI
     processor driver for Tegra241 (Srikar Srimath Tirumala, Arnd
     Bergmann)

   - Make acpi_proc_quirk_mwait_check() x86-specific (Rafael J. Wysocki)

   - Switch over ACPI to using a threaded interrupt handler for the SCI
     (Rafael J. Wysocki)

   - Allow ACPI Notify () handlers to run on all CPUs and clean up the
     ACPI interface for deferred events processing (Rafael J. Wysocki)

   - Switch over the ACPI EC driver to using a threaded handler for the
     dedicated IRQ on systems without the EC GPE (Rafael J. Wysocki)

   - Adjust code using ACPICA spinlocks and the ACPI EC driver spinlock
     to keep local interrupts on (Rafael J. Wysocki)

   - Adjust the USB4 _OSC handshake to correctly handle cases in which
     certain types of OS control are denied by the platform (Mika
     Westerberg)

   - Correct and clean up the generic function for parsing ACPI
     data-only tables with array structure (Yuntao Wang)

   - Modify acpi_dev_uid_match() to support different types of its
     second argument and adjust its users accordingly (Raag Jadav)

   - Clean up code related to acpi_evaluate_reference() and ACPI device
     lists (Rafael J. Wysocki)

   - Use generic ACPI helpers for evaluating trip point temperature
     objects in the ACPI thermal zone driver (Rafael J. Wysockii, Arnd
     Bergmann)

   - Add Thermal fast Sampling Period (_TFP) support to the ACPI thermal
     zone driver (Jeff Brasen)

   - Modify the ACPI LPIT table handling code to avoid u32
     multiplication overflows in state residency computations (Nikita
     Kiryushin)

   - Drop an unused helper function from the ACPI backlight (video)
     driver and add a clarifying comment to it (Hans de Goede)

   - Update the ACPI backlight driver to avoid using uninitialized
     memory in some cases (Nikita Kiryushin)

   - Add ACPI backlight quirk for the Colorful X15 AT 23 laptop (Yuluo
     Qiu)

   - Add support for vendor-defined error types to the ACPI APEI error
     injection code (Avadhut Naik)

   - Adjust APEI to properly set MF_ACTION_REQUIRED on synchronous
     memory failure events, so they are handled differently from the
     asynchronous ones (Shuai Xue)

   - Fix NULL pointer dereference check in the ACPI extlog driver
     (Prarit Bhargava)

   - Adjust the ACPI extlog driver to clear the Extended Error Log
     status when RAS_CEC handled the error (Tony Luck)

   - Add IRQ override quirks for some Infinity laptops and for TongFang
     GMxXGxx (David McFarland, Hans de Goede)

   - Clean up the ACPI NUMA code and fix it to ensure that fake_pxm is
     not the same as one of the real pxm values (Yuntao Wang)

   - Fix the fractional clock divider flags in the ACPI LPSS (Intel SoC)
     driver so as to prevent miscalculation of the values in the clock
     divider (Andy Shevchenko)

   - Adjust comments in the ACPI watchdog driver to prevent kernel-doc
     from complaining during documentation builds (Randy Dunlap)

   - Make the ACPI button driver send wakeup key events to user space in
     addition to power button events on systems that can be woken up by
     the power button (Ken Xue)

   - Adjust pnpacpi_parse_allocated_vendor() to use memcpy() on a full
     structure field (Dmitry Antipov)"

* tag 'acpi-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (56 commits)
  ACPI: resource: Add Infinity laptops to irq1_edge_low_force_override
  ACPI: button: trigger wakeup key events
  ACPI: resource: Add another DMI match for the TongFang GMxXGxx
  ACPI: EC: Use a spin lock without disabing interrupts
  ACPI: EC: Use a threaded handler for dedicated IRQ
  ACPI: OSL: Use spin locks without disabling interrupts
  ACPI: APEI: set memory failure flags as MF_ACTION_REQUIRED on synchronous events
  ACPI: utils: Introduce helper for _DEP list lookup
  ACPI: utils: Fix white space in struct acpi_handle_list definition
  ACPI: utils: Refine acpi_handle_list_equal() slightly
  ACPI: utils: Return bool from acpi_evaluate_reference()
  ACPI: utils: Rearrange in acpi_evaluate_reference()
  ACPI: arm64: export acpi_arch_thermal_cpufreq_pctg()
  ACPI: extlog: Clear Extended Error Log status when RAS_CEC handled the error
  ACPI: LPSS: Fix the fractional clock divider flags
  ACPI: NUMA: Fix the logic of getting the fake_pxm value
  ACPI: NUMA: Optimize the check for the availability of node values
  ACPI: NUMA: Remove unnecessary check in acpi_parse_gi_affinity()
  ACPI: watchdog: fix kernel-doc warnings
  ACPI: extlog: fix NULL pointer dereference check
  ...
2024-01-09 16:12:44 -08:00
Linus Torvalds
106b88d7a9 x86/asm changes for v6.8:
- Replace magic numbers in GDT descriptor definitions & handling:
 
    - Introduce symbolic names via macros for descriptor types/fields/flags,
      and then use these symbolic names.
 
    - Clean up definitions a bit, such as GDT_ENTRY_INIT()
 
    - Fix/clean up details that became visibly inconsistent after the
      symbol-based code was introduced:
 
       - Unify accessed flag handling
 
       - Set the D/B size flag consistently & according to the HW specification
 
 Signed-off-by: Ingo Molnar <mingo@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCgAvFiEEBpT5eoXrXCwVQwEKEnMQ0APhK1gFAmWb1hQRHG1pbmdvQGtl
 cm5lbC5vcmcACgkQEnMQ0APhK1j7/xAAk2L36n4ZpWqm4oWxMyRDTd713qT+Jzg5
 txVr7i8el5RZ8D9WQejzOWemJ/XgirkWuRSFfY+UzZZ+7lmioXWDFLz6PFpyMOwM
 OG2yyAAZIQzFhe1LxhurN5G7F+q9Nl/CcDnRWv+FUKs829GOGlaqirKfKwgIFzgw
 GUT0eT5gPfIfEFnzMUrix9+KNIZU6s6Lgg5tVpavNw6bKEimg8Mtn4J45voFbg98
 l/PU0RaC28vePTMdoBLv/ZZUHS9K/UdGUq600guzk/Zh2plqxGtqjXtaM5/8giPO
 JbgQCTP0LaCC0oZf0SAbUW7+TiKD03CP6QzleYyLdhTjLz1CCOswgz0upPjfa/5j
 nhgsMCk/CEhr6nMwhJiRNhOrFFFJWX00bpcQ2tyyVO156Q+CfhJxuk1XafeQ5MSs
 K4l97IVc/vPQSEZy5Nh6GdGmWljYxP3Ku4eHRkyVGVYf8YyaD2l6CimaRcdPNqqL
 w9GLwczLfEzkomfdxsyppwu364O91Lpv6gi6AY4Tj7Hgo1ZMm9ucUO3AsTUz5EJJ
 aiqX6o7puIJJkU2O3hKviTzNwTojjjicD/Az66re3lHZBND+luP7LjVY2wIomH5i
 bFPVdSCDmCdTrsTkO3f87FHbCVrbNllKLGChvJ66vyC2nJeIM8UHJ/MxYJsGRhqk
 87vU1DWYPrQ=
 =Y0pg
 -----END PGP SIGNATURE-----

Merge tag 'x86-asm-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 asm updates from Ingo Molnar:
 "Replace magic numbers in GDT descriptor definitions & handling:

   - Introduce symbolic names via macros for descriptor
     types/fields/flags, and then use these symbolic names.

   - Clean up definitions a bit, such as GDT_ENTRY_INIT()

   - Fix/clean up details that became visibly inconsistent after the
     symbol-based code was introduced:

      - Unify accessed flag handling

      - Set the D/B size flag consistently & according to the HW
        specification"

* tag 'x86-asm-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/asm: Add DB flag to 32-bit percpu GDT entry
  x86/asm: Always set A (accessed) flag in GDT descriptors
  x86/asm: Replace magic numbers in GDT descriptors, script-generated change
  x86/asm: Replace magic numbers in GDT descriptors, preparations
  x86/asm: Provide new infrastructure for GDT descriptors
2024-01-08 17:02:57 -08:00
Linus Torvalds
ab5f3fcb7c arm64 updates for 6.8
* for-next/cpufeature
 
   - Remove ARM64_HAS_NO_HW_PREFETCH copy_page() optimisation for ye olde
     Thunder-X machines.
   - Avoid mapping KPTI trampoline when it is not required.
   - Make CPU capability API more robust during early initialisation.
 
 * for-next/early-idreg-overrides
 
   - Remove dependencies on core kernel helpers from the early
     command-line parsing logic in preparation for moving this code
     before the kernel is mapped.
 
 * for-next/fpsimd
 
   - Restore kernel-mode fpsimd context lazily, allowing us to run fpsimd
     code sequences in the kernel with pre-emption enabled.
 
 * for-next/kbuild
 
   - Install 'vmlinuz.efi' when CONFIG_EFI_ZBOOT=y.
   - Makefile cleanups.
 
 * for-next/lpa2-prep
 
   - Preparatory work for enabling the 'LPA2' extension, which will
     introduce 52-bit virtual and physical addressing even with 4KiB
     pages (including for KVM guests).
 
 * for-next/misc
 
   - Remove dead code and fix a typo.
 
 * for-next/mm
 
   - Pass NUMA node information for IRQ stack allocations.
 
 * for-next/perf
 
   - Add perf support for the Synopsys DesignWare PCIe PMU.
   - Add support for event counting thresholds (FEAT_PMUv3_TH) introduced
     in Armv8.8.
   - Add support for i.MX8DXL SoCs to the IMX DDR PMU driver.
   - Minor PMU driver fixes and optimisations.
 
 * for-next/rip-vpipt
 
   - Remove what support we had for the obsolete VPIPT I-cache policy.
 
 * for-next/selftests
 
   - Improvements to the SVE and SME selftests.
 
 * for-next/stacktrace
 
   - Refactor kernel unwind logic so that it can used by BPF unwinding
     and, eventually, reliable backtracing.
 
 * for-next/sysregs
 
   - Update a bunch of register definitions based on the latest XML drop
     from Arm.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmWWvKYQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNIiTB/9agZBkEhZjP2sNDGyE4UFwawweWHkt2r8h
 WyvdwP91Z/AIsYSsGYu36J0l4pOnMKp/i6t+rt031SK4j+Q8hJYhSfDt3RvVbc0/
 Pz9D18V6cLrfq+Yxycqq9ufVdjs+m+CQ5WeLaRGmNIyEzJ/Jv/qrAN+2r603EeLP
 nq08qMZhDIQd2ZzbigCnGaNrTsVSafFfBFv1GsgDvnMZAjs1G6457A6zu+NatNUc
 +TMSG+3EawutHZZ2noXl0Ra7VOfIbVZFiUssxRPenKQByHHHR+QB2c/O1blri+dm
 XLMutvqO2/WvYGIfXO5koqZqvpVeR3zXxPwmGi5hQBsmOjtXzKd+
 =U4mo
 -----END PGP SIGNATURE-----

Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 updates from Will Deacon:
 "CPU features:

   - Remove ARM64_HAS_NO_HW_PREFETCH copy_page() optimisation for ye
     olde Thunder-X machines

   - Avoid mapping KPTI trampoline when it is not required

   - Make CPU capability API more robust during early initialisation

  Early idreg overrides:

   - Remove dependencies on core kernel helpers from the early
     command-line parsing logic in preparation for moving this code
     before the kernel is mapped

  FPsimd:

   - Restore kernel-mode fpsimd context lazily, allowing us to run
     fpsimd code sequences in the kernel with pre-emption enabled

  KBuild:

   - Install 'vmlinuz.efi' when CONFIG_EFI_ZBOOT=y

   - Makefile cleanups

  LPA2 prep:

   - Preparatory work for enabling the 'LPA2' extension, which will
     introduce 52-bit virtual and physical addressing even with 4KiB
     pages (including for KVM guests).

  Misc:

   - Remove dead code and fix a typo

  MM:

   - Pass NUMA node information for IRQ stack allocations

  Perf:

   - Add perf support for the Synopsys DesignWare PCIe PMU

   - Add support for event counting thresholds (FEAT_PMUv3_TH)
     introduced in Armv8.8

   - Add support for i.MX8DXL SoCs to the IMX DDR PMU driver.

   - Minor PMU driver fixes and optimisations

  RIP VPIPT:

   - Remove what support we had for the obsolete VPIPT I-cache policy

  Selftests:

   - Improvements to the SVE and SME selftests

  Stacktrace:

   - Refactor kernel unwind logic so that it can used by BPF unwinding
     and, eventually, reliable backtracing

  Sysregs:

   - Update a bunch of register definitions based on the latest XML drop
     from Arm"

* tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (87 commits)
  kselftest/arm64: Don't probe the current VL for unsupported vector types
  efi/libstub: zboot: do not use $(shell ...) in cmd_copy_and_pad
  arm64: properly install vmlinuz.efi
  arm64/sysreg: Add missing system instruction definitions for FGT
  arm64/sysreg: Add missing system register definitions for FGT
  arm64/sysreg: Add missing ExtTrcBuff field definition to ID_AA64DFR0_EL1
  arm64/sysreg: Add missing Pauth_LR field definitions to ID_AA64ISAR1_EL1
  arm64: memory: remove duplicated include
  arm: perf: Fix ARCH=arm build with GCC
  arm64: Align boot cpucap handling with system cpucap handling
  arm64: Cleanup system cpucap handling
  MAINTAINERS: add maintainers for DesignWare PCIe PMU driver
  drivers/perf: add DesignWare PCIe PMU driver
  PCI: Move pci_clear_and_set_dword() helper to PCI header
  PCI: Add Alibaba Vendor ID to linux/pci_ids.h
  docs: perf: Add description for Synopsys DesignWare PCIe PMU driver
  arm64: irq: set the correct node for shadow call stack
  Revert "perf/arm_dmc620: Remove duplicate format attribute #defines"
  arm64: fpsimd: Implement lazy restore for kernel mode FPSIMD
  arm64: fpsimd: Preserve/restore kernel mode NEON at context switch
  ...
2024-01-08 16:32:09 -08:00
Jay Buddhabhatti
0c4b2255b7 firmware: xilinx: Export function to use in other module
Export zynqmp_pm_get_family_info() to access and find family information
in other module.

Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com>
Link: https://lore.kernel.org/r/20231219055025.27570-2-jay.buddhabhatti@amd.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:02:49 +01:00
Uwe Kleine-König
408201eb2e firmware: zynqmp: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/b5a82472a6d61608c2cd7728ca364f6c88a821c3.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:15 +01:00
Uwe Kleine-König
31fd8f1ddd firmware: turris-mox-rwtm: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/9074d1ad2e889425991fecad664781ae27b2418a.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:15 +01:00
Uwe Kleine-König
51e24bac2f firmware: stratix10-svc: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/e574041cdce2e4e69f729dfa726a6d090762cff9.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:15 +01:00
Uwe Kleine-König
6ac63d0bb5 firmware: stratix10-rsu: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Dinh Nguyen <dinguyen@kernel.org>
Link: https://lore.kernel.org/r/06df45c697a747cb6543800a4613db6e1f5462b4.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:15 +01:00
Uwe Kleine-König
ffc3c92950 firmware: raspberrypi: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/5df31ef3c069f45634631c9c639bbb60ab1d4798.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:15 +01:00
Uwe Kleine-König
9eeec41226 firmware: qemu_fw_cfg: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/8d7d86a24ea36985845c17b6da0933fedbf99ad8.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:15 +01:00
Uwe Kleine-König
ab45e1f40b firmware: mtk-adsp-ipc: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/e2ea8abb4c30190392a86cf05cecd722d0f0b493.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:14 +01:00
Uwe Kleine-König
303cbf2a30 firmware: imx-dsp: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/f4cc1ffe30b837d5eab96f2924f51999dfa9f671.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:14 +01:00
Uwe Kleine-König
f69583d32f firmware: coreboot_table: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/d323e4f24bfab3ac1480933deb51e7c5cb025b09.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:14 +01:00
Uwe Kleine-König
2595665037 firmware: arm_scpi: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/e7b4bc389949c3613a358bd8e57d70d7acd5552b.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:14 +01:00
Uwe Kleine-König
927e11300d firmware: arm_scmi: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/86165c8ccd0bb47000a29e711102795b36c8df41.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-04 17:01:14 +01:00
Rafael J. Wysocki
f00571b58e Merge branch 'acpi-utils'
Merge ACPI utility functions updates for 6.8-rc1:

 - Modify acpi_dev_uid_match() to support different types of its second
   argument and adjust its users accordingly (Raag Jadav).

 - Clean up code related to acpi_evaluate_reference() and ACPI device
   lists (Rafael J. Wysocki).

* acpi-utils:
  ACPI: utils: Introduce helper for _DEP list lookup
  ACPI: utils: Fix white space in struct acpi_handle_list definition
  ACPI: utils: Refine acpi_handle_list_equal() slightly
  ACPI: utils: Return bool from acpi_evaluate_reference()
  ACPI: utils: Rearrange in acpi_evaluate_reference()
  perf: arm_cspmu: drop redundant acpi_dev_uid_to_integer()
  efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID
  ACPI: LPSS: use acpi_dev_uid_match() for matching _UID
  ACPI: bus: update acpi_dev_hid_uid_match() to support multiple types
  ACPI: bus: update acpi_dev_uid_match() to support multiple types
2024-01-04 12:57:48 +01:00
Linus Torvalds
94a502eb59 EFI fix for v6.7 #3
- Ensure that the KASLR load flag is set in boot_params when loading the
   kernel randomized directly from the EFI stub
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQQm/3uucuRGn1Dmh0wbglWLn0tXAUCZZQ5pwAKCRAwbglWLn0t
 XPP7AQDTyLbFq7UMt5w+rZj8bXBr80VLmM/hGo9XhQYfKTZgeAEA59UEj4Y7TCqE
 iPyvLihY+DuUT+EWgim0W3JwKeUM8gQ=
 =LqrP
 -----END PGP SIGNATURE-----

Merge tag 'efi-urgent-for-v6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi

Pull EFI fix from Ard Biesheuvel:

 - Ensure that the KASLR load flag is set in boot_params when loading
   the kernel randomized directly from the EFI stub

* tag 'efi-urgent-for-v6.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi:
  efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags
2024-01-03 11:50:17 -08:00
Yuntao Wang
01638431c4 efi/x86: Fix the missing KASLR_FLAG bit in boot_params->hdr.loadflags
When KASLR is enabled, the KASLR_FLAG bit in boot_params->hdr.loadflags
should be set to 1 to propagate KASLR status from compressed kernel to
kernel, just as the choose_random_location() function does.

Currently, when the kernel is booted via the EFI stub, the KASLR_FLAG
bit in boot_params->hdr.loadflags is not set, even though it should be.
This causes some functions, such as kernel_randomize_memory(), not to
execute as expected. Fix it.

Fixes: a1b87d54f4 ("x86/efistub: Avoid legacy decompressor when doing EFI boot")
Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
[ardb: drop 'else' branch clearing KASLR_FLAG]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2024-01-02 16:51:28 +01:00
Uwe Kleine-König
09aeaabebd firmware: coreboot: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/d323e4f24bfab3ac1480933deb51e7c5cb025b09.1703693980.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2023-12-28 10:42:25 +08:00
Arnd Bergmann
740f4bd6e4 Arm SCMI updates for v6.8
Few minor updates:
 
 1. Addition of protocol versioning checks to warn if the firmware version
    is newer or greater than the version supported by the kernel driver
 
 2. Increment of the maximum OPP count in the perf protocol from 16 to 32
    as needed by a few recent/future qualcomm platforms
 
 3. Optimisation of set performance operations by returning error
    immediately and avoiding to send the command to the platform(which
    would return error eventually) if the domain doesn't support perf
    operations. Similarly, the fastchannel handling is also optimised by
    avoiding to initialise the corresponding set operations fastchannels.
 
 4. Extension of extended names helper to accomodate recently added new
    flags parameter to be able to properly configure the command used to
    query the extended name of a resource.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmV5mGIACgkQAEG6vDF+
 4pjgUxAAkKEp2W9nPYwxyLZl2KVyoP0a2EsAmi0W0rTUO//kM5dUH2qET3toEs8B
 wed80pv5Pda4jzLci7TJlho/CT0Sz0O19o+Yeg6f96wdsXHgvf3oK1YVQfnYdL3k
 yZ4bXfblVhSJ0qfRhTIwFt+xa/Gtao6VDdKQb240vyXN+Xf/6mk/j3pplj9nx6FL
 DMuZkfYamvbNWAanXOTNsCeqQkW1bf6IsYecj6tJEmFNhQUrx7eS9vgpbfU9kkuH
 6Y6bsIuRqlJYHG7qk1dzCC36ORTf8taHr64G2MIw/SuxZDB/IGmseBBUTfD3fu3x
 cSDYTnzX0An+vhFe30rh3nWFZff+1Oz478JOsZVrHcLuXVtfp/barcb9znazlc8Q
 e2iigyWuwUQqM4busZEJ/N5kB12qF93SJNs/O7Y3AyTXibyxwkv0mD81iPKY5L7s
 P+eLxXfYTjjNFrJuytKZ46si3GTWMv+Si52IsY+Iq946dXgW+RirMO5cZjCPPj5+
 FMPAtlQo+DNVwMNukVInsmyIf+o2GdUYk5W8t65ZHiiWm3BjnZW6pbSW26gmba21
 49oWMoQWCd4+gXlevq/8LX7bFWfF6dBjYZfkrq7WXxQ4obUq867J5kQL4DevuFcC
 wSNxAsasPkmWTFRn7kuJyJ6AI9lMB95fbDrhVU4wq3nISrBM2uc=
 =VpGl
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWFdEUACgkQYKtH/8kJ
 UifNjQ/9FWSbxGA5joIUH/JpFNPxcw8whXyxHOdVar/p8NfLrAugQhr/1qrPP/Vg
 OW+2rOHAnstNF9VgRVuaufpO2yhWoyQlmSeuVGYSISctgDabtTjlT1nRaljHjRGp
 xQvsIbYT1fwaMhLHVyR+K6qlCibdN/K2y8wSInECfgAQcQWxmOKPrUdG3c+jXCzw
 RB7/KJmDcOBvDPswNe65Py24XBF+4B6h/ot4RaPVhxrEn9pnGKQs2dsCep7tsq22
 8MBigKW+bvGcBRzYgIVNwUTUlh+d+LFrenbk+8LStXALWp3w62syFhfnjsuEZHzj
 abdd7CjFXqvK4Gn+yyBevOc8JBI033V/FIsT+p+JHDXl068W8Dpadz6YRQ50OElj
 3L7v12xSaKiC7EM9CxJEQIcSrHmlcVeFf3AJ3fD07YiKFg9NhlSqed34FfJKiaNR
 jS6NGxiHlmzN6Xpp/V6YzcFAddhRkf5YVaTEP2eLC0QG94ddJSSt6saSCovekG1c
 xugYDedmOjEWkrXLE5tp6VyjIGEFuOFfRuChQj+bEMi+N7xiJsoeUlZ49BaoIRvS
 ZxSYrq66PFNtIbis0Y2Xd8SCbMMl7yxHLWEExFtmiROsJN15vdlncLYYtTak6FdY
 hcdq+qIoVV/OMBNq9JS/H4wcurvV+7Qm4bkF0Ch6ApH1lIDybM4=
 =h4CZ
 -----END PGP SIGNATURE-----

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

Arm SCMI updates for v6.8

Few minor updates:

1. Addition of protocol versioning checks to warn if the firmware version
   is newer or greater than the version supported by the kernel driver

2. Increment of the maximum OPP count in the perf protocol from 16 to 32
   as needed by a few recent/future qualcomm platforms

3. Optimisation of set performance operations by returning error
   immediately and avoiding to send the command to the platform(which
   would return error eventually) if the domain doesn't support perf
   operations. Similarly, the fastchannel handling is also optimised by
   avoiding to initialise the corresponding set operations fastchannels.

4. Extension of extended names helper to accomodate recently added new
   flags parameter to be able to properly configure the command used to
   query the extended name of a resource.

* tag 'scmi-updates-6.8' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_scmi: Add protocol versioning checks
  firmware: arm_scmi: Increase the maximum opp count in the perf protocol
  firmware: arm_scmi: Fix NULL pointer dereference during fastchannel init
  firmware: arm_scmi: Add optional flags to extended names helper
  firmware: arm_scmi: Populate fastchannel info only if set operations are allowed
  firmware: arm_scmi: Check beforehand if the perf domain set operations are allowed

Link: https://lore.kernel.org/r/20231213115953.3578115-1-sudeep.holla@arm.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-22 11:34:29 +00:00
Arnd Bergmann
cd845dfd46 RISC-V SoC drivers for v6.8
There's only one set of changes here, the addition of "Auto Update"
 support for PolarFire SoC. Auto Update is one of the ways that the FPGA
 bitstream can be updated, and the only one suitable for use from Linux
 as it does not immediately initiate a reboot when started.
 The driver was not accepted in the FPGA manager subsystem as the update
 only occurs after a reboot and makes no use of the FPGA manager
 framework.
 
 Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZYQwXQAKCRB4tDGHoIJi
 0lieAQC6en0Y0TRDRF18NX0SqnmrxMaiwJxV0tGp+WGgykpmEwEA9vZliqRRG+zJ
 ZTMkk+zHVTtYgIXt2WFelDLKj5abHAE=
 =4VMq
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWFcWgACgkQYKtH/8kJ
 UifdChAAjnUWNXC7jCfVqj5ALE/dGz8vPpXnY8FpNr90hZpbgAldMOvIkIGD1MlC
 eAglMXDDYnvuM5WUa6Pui/EHSSTbG4J8R6w36EUmG9mjzyCSsZ8fx4/hss6UI/hB
 pAHhpR3Er9v8eIg2Td0LE/hN+vVwJJiOgGkQgEYcr9ipmGDv+tXjUqDbtA7z933S
 lQO2zYZKcDA+WqfUnCKmN79MsZ/qo5Ve+VrJNyBhhQD1whRG/G0cFHvzA4oa2n5q
 UJ6KAAjLDDdG0zWd/Ig+KIXusDHHFyv65jaPMb0e9VLcMHhBl4uPZigVC64Q/SUA
 jrRT82PN2QA4hcDFwTmQ1xVzjXfsRfTCUvCVleYm/nU5tE7HAkIfwTDVTn3i7usd
 enoQmk08EDI6sM8fqq+vm0JuX8Lu/XzInQtegZswi4S8qR3dwwAxIVwabHc7CVse
 S2YIW+tWGaID2G1bFhHs5LnhqvlPsQD64o5Dft2orLkPGx0Rp7e2hfiBB3ghuloM
 Kk9lxtUa+Hw/gpQMuuk/X3jaBFQXEBa62P2vqqUicUH/Hj5y80MHbxtH/uQKrSVY
 FxnJY+D0PZ2ggnDXAkDv6+GGIO9WXVQ+KTGKoQHYJ6tCLUWN+1JiK61WyQ9ewdC1
 jE2Tig88hGRdEmTCAKZjUmLVuoNqnU7knKHaslg7+2lSAj1jpCE=
 =yAyj
 -----END PGP SIGNATURE-----

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

RISC-V SoC drivers for v6.8

There's only one set of changes here, the addition of "Auto Update"
support for PolarFire SoC. Auto Update is one of the ways that the FPGA
bitstream can be updated, and the only one suitable for use from Linux
as it does not immediately initiate a reboot when started.
The driver was not accepted in the FPGA manager subsystem as the update
only occurs after a reboot and makes no use of the FPGA manager
framework.

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

* tag 'riscv-soc-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux:
  MAINTAINERS: add auto-update driver to mpfs entry
  firmware: microchip: Replace of_device.h with explicit include
  firmware: microchip: add PolarFire SoC Auto Update support
  soc: microchip: mpfs: add auto-update subdev to system controller
  soc: microchip: mpfs: print service status in warning message
  soc: microchip: mpfs: enable access to the system controller's flash
  dt-bindings: soc: microchip: add a property for system controller flash
  firmware_loader: Expand Firmware upload error codes with firmware invalid error

Link: https://lore.kernel.org/r/20231221-droop-unblock-81e4fe14acee@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-22 11:22:16 +00:00
Arnd Bergmann
418188d878 Amlogic drivers changes for v6.8:
- meson-sm: unmap out_base shmem in error path
 - meson-sm: use dev_groups attrs for sysfs entries
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmWBY2sACgkQd9zb2sjI
 SdG03A//ffeK07EHOmm28enMPk108dCG5G/GJ70CmA5ClEaKA28PmcTpsByLKzyP
 Bsm/YaIq7DecUYvuOdZ7CM6AnHgERhzkieeILm2+Aooguzk0JE9V11GqpHLf4udr
 UjLsp2cHBpV4a493B50tE1yIfK08lfyl5LjslNDkt22TIkFFBhWEMDkQyKg4nK9u
 dan7yeLU8kT5G0hj3ZvwLP8yGo0OBiwYemIxE5PvW9io/rbPjszRTXU3uqBtEZno
 qbYzFdaBslYl1x4qumBm7BtPEuSCRKoIgBNcS3avMHTCOND7w/oPTT/kgD9u5Rb3
 NBCZi8/007y9a/r6KMrB5urSpfnWpX8H6j4F+myaPDB8vwmIpJRnlOVGsx++mA2U
 vlFUK6XOmCynXdnLhfvNzIyQ62CgQbMAQxbX90iaH38+87Mbm2zEoPmNvFxpLsw0
 fmD3s1XMeSjyQvXZG2S0UHITUKMWonLapqxwj0A9kWtvStMiHgiLJcPh70603qd3
 222swfkZBkOEIGjzdPRqcHUVOzzZ1JwNPhBKyUAlbIE5Mjs9lq5sz1fj8+cFIrTk
 cXxsLkAo28DQIWa/5ArS+hQGHs0X9KYlWAKPi1d691NjUjq/9B8T5wjlqGs4dFnC
 IDaU19Oth1vb7vaUb012oBx6EDTTA+h77crBIimJoZzQQLcWJ60=
 =3v7y
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWFcTEACgkQYKtH/8kJ
 UieZ8Q//bzfW4YKPRHqoIK4hxmBYMqoxOj3N/ICaC2mNVmos9ExkVTpW+H/Q0b5H
 kHmMewD1pE+p9SZF4UlV9ufPFFLe5S+PoikOlVsNpWO1BpFolu7zhLEuQ/QmqYgs
 h0Hj+12C89GZnWvhpZ1xYqpdBcGtiNO2VlCMxR5RZ0fdyvSit6963pmcEat/CIev
 bT0df0r51JAnQ18qAPwqbTiAwilvUCXjvKHA+UuAQCoEwoCQIuRuoWboFrFclxFB
 p/IjyTlmhfNAfbh/Ic3Zq4/lIVNJCEPi7iCxvyJ0RpTTKQNHlkaiZdX1YCwzMTny
 XzeTBfvlpM/qo4GqFnFPfRVQ3zvZNFomf0bX4bgPVkoX5UXrQ+rJdOZMRQfhMmTt
 FQluMagztuYRSVCVQPI1Rj8d8wnHi3eQu1J/qT2qFwG2NaqsJog1MQwfDfImNWYv
 oN0H8tPtzkNl5dxhdaTqpFBSODpzUx61VvOuPNevzXyMmBthRl2GLwPUpqfg0wl4
 pFUmt2DRNUdrJrfXpja/ZzpMTdECoDn+lTAwX3MH2mWlbDx8+4vp1NVOCGsfIxy1
 eHpuTX098F6rXcGTSXmr90Ht3ijyWSAdk9kpa67eVdutJa/Gqei/RT8RDitlqtd8
 PguY2NPRwodBONFLxStc452NgRSoouEOqPQL23nY294vqQnxZqY=
 =isnC
 -----END PGP SIGNATURE-----

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

Amlogic drivers changes for v6.8:
- meson-sm: unmap out_base shmem in error path
- meson-sm: use dev_groups attrs for sysfs entries

* tag 'amlogic-drivers-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  firmware: meson-sm: unmap out_base shmem in error path
  firmware: meson_sm: refactor serial sysfs entry via dev_groups attrs

Link: https://lore.kernel.org/r/a987f881-1c23-4528-9cb1-e5a875b7e7a8@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-22 11:21:21 +00:00
Arnd Bergmann
8eb0b1ed65 Qualcomm driver updates for v6.8
Support for SM8650 and X1E is added to the LLCC driver, the
 LLCC_TRP_ATTR2_CFGn register stride is corrected, and a bug where for
 each iteration looping over slices previous settings for dis_cap_alloc
 and retain_on_pc are overwritten.
 
 A quirk is introduced in UCSI, for implementations that does not handle
 UCSI_GET_PDOS for non-PD partners. With this, USCI support is enabled by
 default in pmic_glink. It is later reverted for SC8280XP due reported
 errors.
 
 A few memory leaks in error paths of qseecom are taken care of.
 
 A small driver to expose the ADSP PDCharger ULOG debug log is
 introduced, to aid debugging issues with pmic_glink.
 
 The identiy of SM8650, PM8937 and a few DSPs are added to the Qualcomm
 socinfo driver.
 
 The Qualcomm sleep stats driver is extended to allow getting detailed
 statistics about usage of various DDR states. Unfortunately this ABI
 does not seem to be stable across platforms, so this addition is dropped
 again while the reported problems are investigated further.
 
 Andy is moved from MAINTAINERS to CREDITS. Thank you, Andy.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmWBGFwVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FXh8QAJm4g1qmMkkcclQ2GGwa8nbimTHW
 tHvbFmTmpJ3z2Rkl+Dg/+b0D1HavsBwiaQ/VbkBnOjp8AqYX9rYyMSLSdLfPqO53
 n4SjutYGdIfgxCUlduNLLT1/AjEV+MrSqv1356jjKLAwiFTy3Z14MEE4n82zq3ih
 He5yvRIOrXJpOpM8XOsxp0b73CT9XAbZVbMncO8qpbZ1hZQbU0h4J0qBNaiWNyaw
 /AXXNiAHoqsarH45opgYzifrAkGvZFd+EDvvPwaSao57cQWC8Ql3vLxZQa0K3g6u
 V1nY0ZAiD0oCPKD0Y+/ISnW2IxbXeArvDWI6NTyxfQcbEzxsyW1vtKLdQ5ARKelr
 RFZfgCTXxvs2xfYkZ7X5xJRWGWwWUYpM5MDD3yRih6HfLk8XqYw8g9/Kw59Asxq/
 ryyfszAYlnUnkwjEUiCYZujOURCTyabOl00tRkSGVz0D/qHy4KF2KffUpk3K2IjC
 NodUamKFqR8s9SmNf5Nlr+IPft7OZmP2f1dR0+Z3wA833mLrFYCCvw3voCKzLgs0
 C13CIDxwyitN3hJNg2RHYNrHfRhPVnPGSZowbAUNZTtbGm/43s22TZQiHpmCEsOA
 96LyHfXv/aoUIrTsdD8n+SiiSCD84etluGwUdwTrmeKqwKt2q8Rgmm61DPfGo6qY
 CkW/5AsEfkysjWrT
 =ijVE
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWFcDQACgkQYKtH/8kJ
 Uic19xAAvTQ88D5t5h6Nf58NuHbYWql5Tb8Y/CIRN21WBP1xWBL7ApMs4PQE5nIN
 LvgzQXrPDmw08KZw3BboBqlXnLzH6sWBLqwO6FmCuu88lJAtd1//JduUPhbUJLnS
 cBegXZEJeM5oE/iHd4GzkNVcHU/8ubqr2AWW0kHsfp11WvZg53t9YxAmHH9VN9gn
 auETDqNgKDeBrSSkhjJ5zGJ2P8NNBJbfKe8IC+H1w6sNuogfyrzX9zSZIMmK3x3K
 G8fHp0+yPVb9UXMcPbgeRjD7FqkU8Mk4LTqO5Fr6Ava+okghsIYu3VBgUb7vZvSN
 uTIttcoCe4Djsas7ytyVGO1SiqyxjNVhrqo2XtMNJlgBiBcAtfxwSbbrl30QASqE
 cLFXM6bTBnKZxlDSlTO6RRLil3JDvczEvO0YjZyIgjeXMBzrTov6xaMgsMw0oj29
 cGdhKG79dQKNICveVXRzjs1UJWwOvuhmA7dlwgEBMzU+kIneff5n0auJ2xubkIB3
 /d45QpWh4XjaKD4227DBN2qOBHiXbR9AkKRc7Mmr9O+UON3+cGXc0/yE02MLhqsP
 PHmPS8qg1wGw8RgFLcGuqBIuPEvHjmzQFDZQkoMMmSdI8LDyxyRDut0gdKqSVctx
 14jENakNNMIz6wB9v2vp8UZYHr6O6Oul9UQNk6d4g5Kgl7Gv1jg=
 =Dr5+
 -----END PGP SIGNATURE-----

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

Qualcomm driver updates for v6.8

Support for SM8650 and X1E is added to the LLCC driver, the
LLCC_TRP_ATTR2_CFGn register stride is corrected, and a bug where for
each iteration looping over slices previous settings for dis_cap_alloc
and retain_on_pc are overwritten.

A quirk is introduced in UCSI, for implementations that does not handle
UCSI_GET_PDOS for non-PD partners. With this, USCI support is enabled by
default in pmic_glink. It is later reverted for SC8280XP due reported
errors.

A few memory leaks in error paths of qseecom are taken care of.

A small driver to expose the ADSP PDCharger ULOG debug log is
introduced, to aid debugging issues with pmic_glink.

The identiy of SM8650, PM8937 and a few DSPs are added to the Qualcomm
socinfo driver.

The Qualcomm sleep stats driver is extended to allow getting detailed
statistics about usage of various DDR states. Unfortunately this ABI
does not seem to be stable across platforms, so this addition is dropped
again while the reported problems are investigated further.

Andy is moved from MAINTAINERS to CREDITS. Thank you, Andy.

* tag 'qcom-drivers-for-6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (34 commits)
  soc: qcom: llcc: Fix LLCC_TRP_ATTR2_CFGn offset
  firmware: qcom: qseecom: fix memory leaks in error paths
  soc: qcom: llcc: Fix typo in kernel-doc
  dt-bindings: soc: qcom,aoss-qmp: document the X1E80100 Always-On Subsystem side channel
  MAINTAINERS: qcom: move Andy Gross to credits
  soc: qcom: pmic_glink: drop stray semicolons
  soc: qcom: pmic_glink: disable UCSI on sc8280xp
  soc: qcom: llcc: Fix dis_cap_alloc and retain_on_pc configuration
  soc: qcom: pmic_pdcharger_ulog: Fix hypothetical ulog request message endianess
  soc: qcom: pmic_pdcharger_ulog: Move TRACE_SYSTEM out of #if protection
  soc: qcom: pmic_pdcharger_ulog: Search current directory for headers
  soc: qcom: socinfo: Add few DSPs to get their image details
  soc: qcom: llcc: Add missing description for members in slice config
  Revert "soc: qcom: stats: Add DDR sleep stats"
  dt-bindings: firmware: qcom,scm: Allow interconnect for everyone
  dt-bindings: firmware: qcom,scm: document SCM on X1E80100 SoCs
  soc: qcom: socinfo: Add PM8937 Power IC
  soc: qcom: llcc: Add configuration data for X1E80100
  dt-bindings: cache: qcom,llcc: Add X1E80100 compatible
  soc: qcom: pmic_glink_altmode: fix port sanity check
  ...

Link: https://lore.kernel.org/r/20231219041855.732578-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-22 11:17:08 +00:00
Arnd Bergmann
1b31719291 TI SoC driver updates for v6.8
- ti_sci: Minor fixup for off by one error in debugfs_create
 - k3-socinfo: Refactoring and add j721e detection, j722s
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmWAXdUACgkQ3bWEnRc2
 JJ193BAAqjPOiorEELXiBZt1ViN+WGveImwdp0UIS7kkTZtBeGCGv57QlpJy2mYP
 CnjYaT/zXuEzWV4lJBYKtLAkG5Mo6dOTZO8P2SiqiFJRXyXyy1XCrab0S0W2noDc
 YxUGuqk+HbRBXR96/jYP+STzl2BZvVlUyrH9JOYZxnmrMMSFwzWvZC4Kec2PyQif
 6SrD4MBDWnnwwbHJdTOEtqwElsCzUga+jaaHFprn9e0BfQ4/SRhkfqv9axILeaIZ
 BVr06uXt2VyyBAPfslbODPLqr2bOAbLo2IzpRaW04d1ytcFzKunElNtN5l6tzfmv
 S3YcrNJ13tessi432BQfy4Rco3vXg6v/pZ8B6qgXM3zCol1L01LVWqNbZ2Oz+mV0
 Ipq0mcGrkGJC4v5d0E8qmM/Wo/+9k17mIX1ju8Htmixkbh0mWl6b3zzkDFoficuO
 ThNm21HHNaIL1coBJrFVf3pPwfSdvEwEoCR5xkwH6WoU1aUtJ4LsO7WWbGJz9KGy
 vamXPmWe1iO12aqtsLWx8m7G30EvLCvc2T+uaYn/jU8t4Fh9lPOfF4ySC0mXK6w3
 rwqmqPxkwpBXU7gz6/gSfj5YUbXIlSLLoSmVoYhzfQr0cKOns1af03hcbAhJ2p8D
 v+3OdjAurr0xYBlDvPrlM5MPJZuN1EnMNpeanse+dlMGeDqd3QQ=
 =HGxa
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWFb/sACgkQYKtH/8kJ
 UieuDw//VI8zWs16/aO2S7vKoURXeS1vQJKD09WhJa2YExHEtlguyi+SbxP/aavK
 TcSHXV4CrZ54GsLCOkY3hSnx+HoOboveZ/STIArLV+k9oQFQOSRXjroChJY62OIM
 2RX8r4llSe9r0xCVHDAqHiCMOxYohG9a701gIlo0d/9L1TOnhTsA1GYie9/69soG
 Ofh7hMd7mh2QUKDbJUzEuY4GNPhzw5gZe2AL0xldKQDpD2pv42hMbWi/HgOcpkby
 bGjCd1PnZ3KdtY6JXgx2WX0ZxD+0T9l6oqbEcyJox3lFVgcaa/FC8gO+MkeDLdTK
 UdYixuR56nlOsPeYwDmXfqGuOmF5kt27ZAjYdrsRdmURGXNpQ/n/1LKA9pzzv0nZ
 EVIBst0J2f4a1Okb65j45hjTFlc6rLN27jsF7euFUZ9eNwodIKdZwAaRz+q/bXi3
 77Fct1+gTPWozUU2xs0mLziYkRt18oQS+sYzXNYUj1fv/GulgLsPhgcn5dkBr5Gk
 nxR8yLcTS6FQVAohNk+GeVG7qeXCdi6AaG/APGFgUwMsf+2xO6nPDV3ndv0RA7hm
 UFPR6WmTKWRJE3M+cLee5o9GWvBZ8lDJpv4KZUcZtEJl6Tm9Rl1xrRcoawn1oIB4
 Um3rbzuuxMNlAfX4oh2/vkr2KMyT7lF/hea7fdNT9u5BVA2yb6w=
 =wpWw
 -----END PGP SIGNATURE-----

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

TI SoC driver updates for v6.8

- ti_sci: Minor fixup for off by one error in debugfs_create
- k3-socinfo: Refactoring and add j721e detection, j722s

* tag 'ti-driver-soc-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  soc: ti: k3-socinfo: Add JTAG ID for J722S
  soc: ti: k3-socinfo: Revamp driver to accommodate different rev structs
  firmware: ti_sci: Fix an off-by-one in ti_sci_debugfs_create()

Link: https://lore.kernel.org/r/20231218153043.r5psxbjjpccusjg4@september
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-22 11:16:11 +00:00
Arnd Bergmann
9d0e3c5a3d OP-TEE add reserved system thread
Add support for a reserved system thread in the SMC-ABI of the OP-TEE driver.
 SCMI with OP-TEE transport uses this to guarantee that it will always have
 a thread available in the secure world.
 -----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCgA4FiEEFV+gSSXZJY9ZyuB5LinzTIcAHJcFAmV23KsaHGplbnMud2lr
 bGFuZGVyQGxpbmFyby5vcmcACgkQLinzTIcAHJeEbBAAi5QNyLc9G6jhnix/QdeU
 s3kYLH4Vm0BeE3a+6iY3sxsfMQe+sGaAet5tBYGujJv4f1AzKjoCSysaCnekcJNQ
 JNph6nwCdg8DrohVvTiIq571uYv0pV43WQ+CWTnVl4H0qOtdiqrlUuxJ/ER/kKOo
 HdluX0HU22b6N9QllImjNQM5jEGzTJZNRxe2ruClxvEbcbbWAvYy4QW3XSeRt/dU
 mBeJslPydY5IexbTGhElbpRxAG1zSGPZYPEFKaVFQ+Cs3DBc3JpVwjOWrHoix8P+
 vln/WlKUoyesGssdqOT9nKxFG6lCKh+66TPi12F//7PN1fG2TsDcy3DTNLL0N/kk
 +msi/01QBSCBZs3zXIQT1TZ5ICPN1VMaKaHZ89zi/cL0cKpbe/j4IryDsl95HF3W
 QBkpTpYBbx1ehlL0y6Fdpv3Syx7z/1Uk/+oOqlF0dTPOv0aOBjGRyjZK/p3cZFAJ
 qyB6CI17UGzc8s8mPdxc2KjQMw+IZD+qPWPkNGutm3mto/mtc91cwjOKuj/k/x1j
 FkcKm+nm1nyrLGkkyvMa/HyWbFY/MG7oB0q+BquVKnjp2LXisWH/mKbhzr/h2Qjw
 y8yH6SYipDbJAY/WhwM5+wkJqTp5q7CyFv7P0ZTCTH0Ku5vxzvk2pLO/aTaeoyab
 APHDXEoBE8nj57wnNy7t6qI=
 =0+RD
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmWFaAsACgkQYKtH/8kJ
 UieeRg/+KDdh712emkEv8LCfTkS5mddPdx8MjLs/pUWmSV/OxA1qHDz1P7dEDU6t
 YEFFhN9vcQDcy5asJkgBkerjOqU4riJAWC/iEm3p/EAB6WTEBk5L/5txYAeTJBly
 4kDoCABkMaGbSTpqLC5QWHrOStWFrTqx742wUivJtdceCLJQ1bHBloB5e96mXm9M
 P0a4QSaAD+kWDZVsgaJWVNh54FcFERkvqSHtE/CES3UrHQZ6iKU2aOyNjw278DVO
 dX81Shm7N2OXy9s6CaDzry274/4Cc3lcw6Ey+TO5/h/QlzldBOu6t5seaG/AX2vV
 aboGvlZ81x6tw3CHhji3wz5nMPl99mOPOB0JMRZReZAFbFxXDAhl1KI8tzCruAnJ
 OhiIQIiz90JAyUcE+5OMLdYbu2RITHNl4JWwUzUKl+BLOWv7yF+tN3+hLVSiZPAZ
 FjSYWBbZaPktChA0v93Jxfqfenqr4p+MXuOqV7DT9cEU5KDAQ4qB+4dcXcm5yDJR
 Lqw6O9BazpfrwyXSpl1yMtZUHOmQjLHCj+08tjig/AZNWONFkPckaVRPLA6u2Sxi
 tujM738gE+kMr1DD0G98TUrJh70qo8gQOUz16VNfFlzwgTf26LbFb2QIFnuqgzQz
 8vu2z8P75xx5dU9255ZF4yqmodmGhjZ29BqzlAu+L0CBmFqhFKI=
 =IrSQ
 -----END PGP SIGNATURE-----

Merge tag 'system-thread-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee into soc/drivers

OP-TEE add reserved system thread

Add support for a reserved system thread in the SMC-ABI of the OP-TEE driver.
SCMI with OP-TEE transport uses this to guarantee that it will always have
a thread available in the secure world.

* tag 'system-thread-for-v6.8' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  firmware: arm_scmi: optee: use optee system invocation
  tee: optee: support tracking system threads
  tee: system session
  tee: optee: system thread call property

Link: https://lore.kernel.org/r/20231211102600.GA571787@rayden
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-12-22 10:42:19 +00:00
Randy Dunlap
4afa688d71 efi: memmap: fix kernel-doc warnings
Correct all kernel-doc notation to repair warnings that are
reported by scripts/kernel-doc:

memmap.c:38: warning: No description found for return value of '__efi_memmap_init'
memmap.c:82: warning: No description found for return value of 'efi_memmap_init_early'
memmap.c:132: warning: Function parameter or member 'addr' not described in 'efi_memmap_init_late'
memmap.c:132: warning: Excess function parameter 'phys_addr' description in 'efi_memmap_init_late'
memmap.c:132: warning: No description found for return value of 'efi_memmap_init_late'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: linux-efi@vger.kernel.org
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2023-12-22 10:42:06 +01:00
Vegard Nossum
3b184b71df x86/asm: Always set A (accessed) flag in GDT descriptors
We have no known use for having the CPU track whether GDT descriptors
have been accessed or not.

Simplify the code by adding the flag to the common flags and removing
it everywhere else.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20231219151200.2878271-5-vegard.nossum@oracle.com
2023-12-20 10:57:51 +01:00
Vegard Nossum
1445f6e15f x86/asm: Replace magic numbers in GDT descriptors, script-generated change
Actually replace the numeric values by the new symbolic values.

I used this to find all the existing users of the GDT_ENTRY*() macros:

  $ git grep -P 'GDT_ENTRY(_INIT)?\('

Some of the lines will exceed 80 characters, but some of them will be
shorter again in the next couple of patches.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20231219151200.2878271-4-vegard.nossum@oracle.com
2023-12-20 10:57:38 +01:00