]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/percpu: Fix __per_cpu_hot_end marker
authorUros Bizjak <ubizjak@gmail.com>
Tue, 4 Mar 2025 17:34:36 +0000 (18:34 +0100)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Mar 2025 19:30:33 +0000 (20:30 +0100)
Make __per_cpu_hot_end marker point to the end of the percpu cache
hot data, not to the end of the percpu cache hot section.

This fixes CONFIG_MPENTIUM4 case where X86_L1_CACHE_SHIFT
is set to 7 (128 bytes).

Also update assert message accordingly.

Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Link: https://lore.kernel.org/r/20250304173455.89361-1-ubizjak@gmail.com
Closes: https://lore.kernel.org/lkml/Z8a-NVJs-pm5W-mG@gmail.com/
arch/x86/kernel/vmlinux.lds.S
include/asm-generic/vmlinux.lds.h

index 31f9102b107f156b8e1f5567e960b73f6a97b9f6..ccdc45e5b75961711580f62cb2a73f48c1c433c5 100644 (file)
@@ -331,7 +331,7 @@ SECTIONS
        }
 
        PERCPU_SECTION(L1_CACHE_BYTES)
-       ASSERT(__per_cpu_hot_end - __per_cpu_hot_start <= 64, "percpu cache hot section too large")
+       ASSERT(__per_cpu_hot_end - __per_cpu_hot_start <= 64, "percpu cache hot data too large")
 
        RUNTIME_CONST_VARIABLES
        RUNTIME_CONST(ptr, USER_PTR_MAX)
index c4e8fac502543ee605fddd8fec57f368bfdec437..4925441bc4714acb9c74b4a3bd3cebfc7f6ad474 100644 (file)
@@ -1072,9 +1072,8 @@ defined(CONFIG_AUTOFDO_CLANG) || defined(CONFIG_PROPELLER_CLANG)
        . = ALIGN(cacheline);                                           \
        __per_cpu_hot_start = .;                                        \
        *(SORT_BY_ALIGNMENT(.data..percpu..hot.*))                      \
-       __per_cpu_hot_pad = .;                                          \
-       . = ALIGN(cacheline);                                           \
        __per_cpu_hot_end = .;                                          \
+       . = ALIGN(cacheline);                                           \
        *(.data..percpu..read_mostly)                                   \
        . = ALIGN(cacheline);                                           \
        *(.data..percpu)                                                \