include/linux/preempt.h | 1 - 1 file changed, 1 deletion(-)
It turns out the previous usage of hardirq_disable_count() in
__irq_exit_rcu() would cause softirq pending issues. Without that usage,
hardirq_disable_count() doesn't need to exist, so remove it.
Signed-off-by: Boqun Feng <boqun@kernel.org>
---
include/linux/preempt.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 8299657f0f86..6d2fedbd6758 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -168,7 +168,6 @@ static __always_inline unsigned char interrupt_context_level(void)
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
-#define hardirq_disable_count() ((preempt_count() & HARDIRQ_DISABLE_MASK) >> HARDIRQ_DISABLE_SHIFT)
#define hardirq_disable_enter() __preempt_count_add_return(HARDIRQ_DISABLE_OFFSET)
#define hardirq_disable_exit() __preempt_count_sub_return(HARDIRQ_DISABLE_OFFSET)
--
2.50.1 (Apple Git-155)
The following commit has been merged into the locking/urgent branch of tip:
Commit-ID: 2af470916a208b576ac9975d221d9a378cf8ace9
Gitweb: https://git.kernel.org/tip/2af470916a208b576ac9975d221d9a378cf8ace9
Author: Boqun Feng <boqun@kernel.org>
AuthorDate: Thu, 27 Aug 2026 12:48:35 -07:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sun, 30 Aug 2026 20:25:21 +02:00
preempt: Remove hardirq_disable_count()
It turns out the previous usage of hardirq_disable_count() in
__irq_exit_rcu() would cause softirq pending issues. Without that usage,
hardirq_disable_count() doesn't need to exist, so remove it.
Also move hardirq_disable_enter/exit() into the Rust specific interrupt_rc
header.
[ tglx: Move the helpers over ]
Signed-off-by: Boqun Feng <boqun@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260827194835.38968-1-boqun@kernel.org
---
include/linux/interrupt_rc.h | 3 +++
include/linux/preempt.h | 4 ----
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/linux/interrupt_rc.h b/include/linux/interrupt_rc.h
index e68e1be..a9ed937 100644
--- a/include/linux/interrupt_rc.h
+++ b/include/linux/interrupt_rc.h
@@ -52,6 +52,9 @@ extern void _local_interrupt_save_state(unsigned long flags);
extern void _local_interrupt_enable(void);
#endif /* !MODULE */
+#define hardirq_disable_enter() __preempt_count_add_return(HARDIRQ_DISABLE_OFFSET)
+#define hardirq_disable_exit() __preempt_count_sub_return(HARDIRQ_DISABLE_OFFSET)
+
static inline void local_interrupt_disable(void)
{
int new_count;
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 8299657..2e689de 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -168,10 +168,6 @@ static __always_inline unsigned char interrupt_context_level(void)
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
-#define hardirq_disable_count() ((preempt_count() & HARDIRQ_DISABLE_MASK) >> HARDIRQ_DISABLE_SHIFT)
-#define hardirq_disable_enter() __preempt_count_add_return(HARDIRQ_DISABLE_OFFSET)
-#define hardirq_disable_exit() __preempt_count_sub_return(HARDIRQ_DISABLE_OFFSET)
-
/*
* The preempt_count offset after preempt_disable();
*/
The following commit has been merged into the locking/urgent branch of tip:
Commit-ID: 95a5037ec202adb579f532afb6b35680001b564e
Gitweb: https://git.kernel.org/tip/95a5037ec202adb579f532afb6b35680001b564e
Author: Boqun Feng <boqun@kernel.org>
AuthorDate: Thu, 27 Aug 2026 12:48:35 -07:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Sun, 30 Aug 2026 08:39:04 +02:00
preempt: Remove hardirq_disable_count()
It turns out the previous usage of hardirq_disable_count() in
__irq_exit_rcu() would cause softirq pending issues. Without that usage,
hardirq_disable_count() doesn't need to exist, so remove it.
Signed-off-by: Boqun Feng <boqun@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260827194835.38968-1-boqun@kernel.org
---
include/linux/preempt.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 8299657..6d2fedb 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -168,7 +168,6 @@ static __always_inline unsigned char interrupt_context_level(void)
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
-#define hardirq_disable_count() ((preempt_count() & HARDIRQ_DISABLE_MASK) >> HARDIRQ_DISABLE_SHIFT)
#define hardirq_disable_enter() __preempt_count_add_return(HARDIRQ_DISABLE_OFFSET)
#define hardirq_disable_exit() __preempt_count_sub_return(HARDIRQ_DISABLE_OFFSET)
© 2016 - 2026 Red Hat, Inc.