linux-stable/drivers/firmware/smccc
Michael Kelley e95d8eaee2 firmware: smccc: Fix check for ARCH_SOC_ID not implemented
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>
2021-11-22 11:42:59 +01:00
..
Kconfig firmware: smccc: Add ARCH_SOC_ID support 2020-07-06 09:48:06 +01:00
Makefile arm/arm64: Probe for the presence of KVM hypervisor 2021-03-31 09:16:55 +01:00
kvm_guest.c arm/arm64: Probe for the presence of KVM hypervisor 2021-03-31 09:16:55 +01:00
smccc.c firmware: smccc: Register smccc_trng platform device 2021-08-06 19:45:25 +08:00
soc_id.c firmware: smccc: Fix check for ARCH_SOC_ID not implemented 2021-11-22 11:42:59 +01:00