Commit 98a3bf19 authored by Thomas Gleixner's avatar Thomas Gleixner

genirq: Provide __irq_enter/exit_raw()

Like __irq_enter/exit() but without time accounting. To be used for "empty"
system vectors like the scheduler IPI to avoid the overhead.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Reviewed-by: default avatarAndy Lutomirski <luto@kernel.org>
Link: https://lore.kernel.org/r/20200521202117.671682341@linutronix.de
parent 8a6bc478
...@@ -37,6 +37,17 @@ static __always_inline void rcu_irq_enter_check_tick(void) ...@@ -37,6 +37,17 @@ static __always_inline void rcu_irq_enter_check_tick(void)
lockdep_hardirq_enter(); \ lockdep_hardirq_enter(); \
} while (0) } while (0)
/*
* Like __irq_enter() without time accounting for fast
* interrupts, e.g. reschedule IPI where time accounting
* is more expensive than the actual interrupt.
*/
#define __irq_enter_raw() \
do { \
preempt_count_add(HARDIRQ_OFFSET); \
lockdep_hardirq_enter(); \
} while (0)
/* /*
* Enter irq context (on NO_HZ, update jiffies): * Enter irq context (on NO_HZ, update jiffies):
*/ */
...@@ -56,6 +67,15 @@ void irq_enter_rcu(void); ...@@ -56,6 +67,15 @@ void irq_enter_rcu(void);
preempt_count_sub(HARDIRQ_OFFSET); \ preempt_count_sub(HARDIRQ_OFFSET); \
} while (0) } while (0)
/*
* Like __irq_exit() without time accounting
*/
#define __irq_exit_raw() \
do { \
lockdep_hardirq_exit(); \
preempt_count_sub(HARDIRQ_OFFSET); \
} while (0)
/* /*
* Exit irq context and process softirqs if needed: * Exit irq context and process softirqs if needed:
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment