Re: [PATCH 6.1.y] arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 8c462d56487e3abdbf8a61cedfe7c795a54f4a78


Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 701fae8dce72)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
1:  8c462d56487e3 ! 1:  0246f2b20419d arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
    @@ Metadata
      ## Commit message ##
         arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint
     
    +    [ Upstream commit 8c462d56487e3abdbf8a61cedfe7c795a54f4a78 ]
    +
         SMCCCv1.3 added a hint bit which callers can set in an SMCCC function ID
         (AKA "FID") to indicate that it is acceptable for the SMCCC
         implementation to discard SVE and/or SME state over a specific SMCCC
    @@ Commit message
         Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
         Link: https://lore.kernel.org/r/20241106160448.2712997-1-mark.rutland@xxxxxxx
         Signed-off-by: Will Deacon <will@xxxxxxxxxx>
    +    [ Mark: fix conflicts in <linux/arm-smccc.h> ]
    +    Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
     
      ## arch/arm64/kernel/smccc-call.S ##
     @@
    @@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, uns
     -
     -#endif
     -
    - #define __constraint_read_2	"r" (arg0)
    - #define __constraint_read_3	__constraint_read_2, "r" (arg1)
    - #define __constraint_read_4	__constraint_read_3, "r" (arg2)
    + #define ___count_args(_0, _1, _2, _3, _4, _5, _6, _7, _8, x, ...) x
    + 
    + #define __count_args(...)						\
     @@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
    + 
    + #define ___constraints(count)						\
    + 	: __constraint_read_ ## count					\
    +-	: smccc_sve_clobbers "memory"
    ++	: "memory"
    + #define __constraints(count)	___constraints(count)
    + 
    + /*
    +@@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
    + 		register unsigned long r2 asm("r2");			\
      		register unsigned long r3 asm("r3"); 			\
    - 		CONCATENATE(__declare_arg_,				\
    - 			    COUNT_ARGS(__VA_ARGS__))(__VA_ARGS__);	\
    + 		__declare_args(__count_args(__VA_ARGS__), __VA_ARGS__);	\
     -		asm volatile(SMCCC_SVE_CHECK				\
     -			     inst "\n" :				\
     +		asm volatile(inst "\n" :				\
      			     "=r" (r0), "=r" (r1), "=r" (r2), "=r" (r3)	\
    - 			     : CONCATENATE(__constraint_read_,		\
    - 					   COUNT_ARGS(__VA_ARGS__))	\
    --			     : smccc_sve_clobbers "memory");		\
    -+			     : "memory");				\
    - 		if (___res)						\
    - 			*___res = (typeof(*___res)){r0, r1, r2, r3};	\
    - 	} while (0)
    -@@ include/linux/arm-smccc.h: asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1,
    - 		asm ("" :						\
    - 		     : CONCATENATE(__constraint_read_,			\
    - 				   COUNT_ARGS(__VA_ARGS__))		\
    --		     : smccc_sve_clobbers "memory");			\
    -+		     : "memory");					\
    + 			     __constraints(__count_args(__VA_ARGS__)));	\
      		if (___res)						\
    - 			___res->a0 = SMCCC_RET_NOT_SUPPORTED;		\
    - 	} while (0)
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux