linux-stable/drivers/firmware
Michael Kelley 6d9e8dabd4 firmware: smccc: Fix check for ARCH_SOC_ID not implemented
[ Upstream commit e95d8eaee2 ]

The ARCH_FEATURES function ID is a 32-bit SMC call, which returns
a 32-bit result per the SMCCC spec.  Current code is doing a 64-bit
comparison against -1 (SMCCC_RET_NOT_SUPPORTED) to detect that the
feature is unimplemented.  That check doesn't work in a Hyper-V VM,
where the upper 32-bits are zero as allowed by the spec.

Cast the result as an 'int' so the comparison works. The change also
makes the code consistent with other similar checks in this file.

Fixes: 821b67fa46 ("firmware: smccc: Add ARCH_SOC_ID support")
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-12-01 09:19:04 +01:00
..
arm_scmi firmware: arm_scmi: pm: Propagate return value to caller 2021-12-01 09:19:03 +01:00
broadcom firmware: tee_bnxt: Release TEE shm, session, and context during kexec 2021-08-15 14:00:25 +02:00
efi efi: Change down_interruptible() in virt_efi_reset_system() to down_trylock() 2021-10-20 11:45:00 +02:00
google efi: gsmi: fix false dependency on CONFIG_EFI_VARS 2020-09-29 19:40:57 +02:00
imx firmware: imx: select SOC_BUS to fix firmware build 2021-02-03 23:28:46 +01:00
meson
psci firmware/psci: fix application of sizeof to pointer 2021-11-18 14:03:38 +01:00
smccc firmware: smccc: Fix check for ARCH_SOC_ID not implemented 2021-12-01 09:19:04 +01:00
tegra firmware: tegra: bpmp: Fix Tegra234-only builds 2021-07-25 14:36:15 +02:00
xilinx firmware: xilinx: Fix dereferencing freed memory 2021-05-14 09:50:05 +02:00
arm_scpi.c firmware: arm_scpi: Prevent the ternary sign expansion bug 2021-05-26 12:06:47 +02:00
arm_sdei.c firmware: arm_sdei: Remove _sdei_event_unregister() 2020-09-28 21:52:23 +01:00
dmi-id.c firmware/dmi: Report DMI Bios & EC firmware release 2020-06-06 11:35:50 +02:00
dmi-sysfs.c firmware: dmi-sysfs: Replace zero-length array with flexible-array member 2020-06-15 23:08:04 -05:00
dmi_scan.c Replace HTTP links with HTTPS ones: DMI/SMBIOS SUPPORT 2020-07-16 11:46:24 +02:00
edd.c
iscsi_ibft.c ibft: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
iscsi_ibft_find.c
Kconfig firmware: arm_scmi: Add SMCCC discovery dependency in Kconfig 2021-07-25 14:36:14 +02:00
Makefile firmware: arm_scmi: Enable building as a single module 2020-09-14 07:31:03 +01:00
memmap.c
pcdp.c
pcdp.h firmware: pcdp: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
qcom_scm-legacy.c firmware: qcom_scm-legacy: Replace zero-length array with flexible-array 2020-05-12 15:16:33 -07:00
qcom_scm-smc.c firmware: qcom_scm: Reduce locking section for __get_convention() 2021-05-14 09:50:14 +02:00
qcom_scm.c firmware: qcom_scm: Fix error retval in __qcom_scm_is_call_available() 2021-11-18 14:04:20 +01:00
qcom_scm.h firmware: qcom_scm: Reduce locking section for __get_convention() 2021-05-14 09:50:14 +02:00
qemu_fw_cfg.c qemu_fw_cfg: Make fw_cfg_rev_attr a proper kobj_attribute 2021-07-19 09:44:59 +02:00
raspberrypi.c firmware: raspberrypi: Fix a leak in 'rpi_firmware_get()' 2021-09-15 09:50:41 +02:00
scpi_pm_domain.c
stratix10-rsu.c firmware: stratix10-rsu: fix warnings 2020-07-02 14:48:48 +02:00
stratix10-svc.c firmware: stratix10-svc: Fix a resource leak in an error handling path 2021-07-14 16:56:39 +02:00
ti_sci.c ARM: SoC-related driver updates 2020-10-24 10:39:22 -07:00
ti_sci.h firmware: ti_sci: Replace HTTP links with HTTPS ones 2020-07-24 14:44:52 -07:00
trusted_foundations.c firmware: tf: Different way of L2 cache enabling after LP2 suspend 2020-05-06 18:27:26 +02:00
turris-mox-rwtm.c firmware: turris-mox-rwtm: add marvell,armada-3700-rwtm-firmware compatible string 2021-07-25 14:36:17 +02:00