]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/barrier: Make array_index_mask_nospec() __always_inline
authorVasily Gorbik <gor@linux.ibm.com>
Thu, 26 Mar 2026 13:38:44 +0000 (14:38 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 27 Mar 2026 23:43:24 +0000 (00:43 +0100)
Mark array_index_mask_nospec() as __always_inline to guarantee the
mitigation is emitted inline regardless of compiler inlining decisions.

Fixes: e2dd833389cc ("s390: add optimized array_index_mask_nospec")
Cc: stable@kernel.org
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/barrier.h

index f3184073e754ff22b63864b539ec53a01b34bbe6..dad02f5b3c8d306534fb404d361e0d44d81e9847 100644 (file)
@@ -62,8 +62,8 @@ do {                                                                  \
  * @size: number of elements in array
  */
 #define array_index_mask_nospec array_index_mask_nospec
-static inline unsigned long array_index_mask_nospec(unsigned long index,
-                                                   unsigned long size)
+static __always_inline unsigned long array_index_mask_nospec(unsigned long index,
+                                                            unsigned long size)
 {
        unsigned long mask;