]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
x86/softirq: Move softirq_pending to percpu hot section
authorBrian Gerst <brgerst@gmail.com>
Mon, 3 Mar 2025 16:52:41 +0000 (11:52 -0500)
committerIngo Molnar <mingo@kernel.org>
Tue, 4 Mar 2025 19:30:33 +0000 (20:30 +0100)
No functional change.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250303165246.2175811-7-brgerst@gmail.com
arch/x86/include/asm/current.h
arch/x86/include/asm/hardirq.h
arch/x86/kernel/irq.c

index 8ba2c0f8bcaf92de0ece35637ef47b3edfddd421..f153c77853de1867d060a95242357b390a294fb1 100644 (file)
@@ -16,7 +16,6 @@ struct pcpu_hot {
        struct task_struct      *current_task;
        unsigned long           top_of_stack;
        void                    *hardirq_stack_ptr;
-       u16                     softirq_pending;
 #ifdef CONFIG_X86_64
        bool                    hardirq_stack_inuse;
 #else
index 6ffa8b75f4cd337b928e70ecf09e321cb4b0a6f8..f00c09ffe6a95f07342bb0c6cea3769d71eecfa9 100644 (file)
@@ -3,7 +3,6 @@
 #define _ASM_X86_HARDIRQ_H
 
 #include <linux/threads.h>
-#include <asm/current.h>
 
 typedef struct {
 #if IS_ENABLED(CONFIG_KVM_INTEL)
@@ -66,7 +65,8 @@ extern u64 arch_irq_stat_cpu(unsigned int cpu);
 extern u64 arch_irq_stat(void);
 #define arch_irq_stat          arch_irq_stat
 
-#define local_softirq_pending_ref       pcpu_hot.softirq_pending
+DECLARE_PER_CPU_CACHE_HOT(u16, __softirq_pending);
+#define local_softirq_pending_ref       __softirq_pending
 
 #if IS_ENABLED(CONFIG_KVM_INTEL)
 /*
index feca4f20b06aaa164b0298e8ad1c0338272ba859..83a5252a473c3d7d42b45e4cd3b996318c1ce55f 100644 (file)
@@ -33,6 +33,9 @@
 DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
 EXPORT_PER_CPU_SYMBOL(irq_stat);
 
+DEFINE_PER_CPU_CACHE_HOT(u16, __softirq_pending);
+EXPORT_PER_CPU_SYMBOL(__softirq_pending);
+
 atomic_t irq_err_count;
 
 /*