Skip to content

Commit ded4c39

Browse files
Marc Zyngierctmarinas
authored andcommitted
arm/arm64: smccc: Make function identifiers an unsigned quantity
Function identifiers are a 32bit, unsigned quantity. But we never tell so to the compiler, resulting in the following: 4ac: b26187e0 mov x0, #0xffffffff80000001 We thus rely on the firmware narrowing it for us, which is not always a reasonable expectation. Cc: stable@vger.kernel.org Reported-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent e78eef5 commit ded4c39

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/linux/arm-smccc.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
#ifndef __LINUX_ARM_SMCCC_H
1515
#define __LINUX_ARM_SMCCC_H
1616

17+
#include <uapi/linux/const.h>
18+
1719
/*
1820
* This file provides common defines for ARM SMC Calling Convention as
1921
* specified in
2022
* http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html
2123
*/
2224

23-
#define ARM_SMCCC_STD_CALL 0
24-
#define ARM_SMCCC_FAST_CALL 1
25+
#define ARM_SMCCC_STD_CALL _AC(0,U)
26+
#define ARM_SMCCC_FAST_CALL _AC(1,U)
2527
#define ARM_SMCCC_TYPE_SHIFT 31
2628

2729
#define ARM_SMCCC_SMC_32 0

0 commit comments

Comments
 (0)