irq: in_irq() cleanup
PATCH RESEND 1/1 irq: in_irq() cleanup
Replace the obsolete and ambiguos macro in_irq() with new macro in_hardirq().
Signed-off-by Changbin Du <[email protected]>
--- kernel/irq/irqdesc.c | 4 ++-- kernel/softirq.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
kernel/irq/irqdesc.c +2 -2
@@ -640,7 +640,7 @@ int handle_irq_desc(struct irq_desc *desc)return -EINVAL ; data =irq_desc_get_irq_data (desc); -if (WARN_ON_ONCE (!in_irq () &&handle_enforce_irqctx (data))) +if (WARN_ON_ONCE (!in_hardirq () &&handle_enforce_irqctx (data)))return -EPERM ;generic_handle_irq_desc (desc);
@@ -676,7 +676,7 @@ EXPORT_SYMBOL_GPL(generic_handle_irq);*/ int generic_handle_domain_irq (struct irq_domain *domain,unsigned int hwirq) { -WARN_ON_ONCE (!in_irq ()); +WARN_ON_ONCE (!in_hardirq ());return handle_irq_desc (irq_resolve_mapping (domain, hwirq)); }EXPORT_SYMBOL_GPL (generic_handle_domain_irq);
kernel/softirq.c +5 -5
@@ -222,7 +222,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)u32 pending;int curcnt; -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());lockdep_assert_irqs_enabled ();local_irq_save (flags);
@@ -305,7 +305,7 @@ void __local_bh_disable_ip(unsigned long ip, unsigned int cnt) {unsigned long flags; -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());raw_local_irq_save (flags);/*
@@ -352,14 +352,14 @@ static void __local_bh_enable(unsigned int cnt)*/ void _local_bh_enable (void ) { -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());__local_bh_enable (SOFTIRQ_DISABLE_OFFSET ); }EXPORT_SYMBOL (_local_bh_enable);void __local_bh_enable_ip (unsigned long ip,unsigned int cnt) { -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());lockdep_assert_irqs_enabled ();#ifdef CONFIG_TRACE_IRQFLAGS local_irq_disable ();
@@ -618,7 +618,7 @@ static inline void tick_irq_exit(void)/* Make sure that timer wheel updates are propagated */ if ((idle_cpu (cpu) && !need_resched ()) ||tick_nohz_full_cpu (cpu)) { -if (!in_irq ()) +if (!in_hardirq ())tick_nohz_irq_exit (); }#endif
Signature · 1 line
2.32.0
[tip: irq/core] genirq, softirq: Use in_hardirq() instead of in_irq()
The following commit has been merged into the irq/core branch of tip:
The following commit has been merged into the irq/core branch of tip:
Commit-ID: fe13889c390e14205e064d7e159e61eb5da4b1c3 Gitweb: https://git.kernel.org/tip/fe13889c390e14205e064d7e159e61eb5da4b1c3 Author: Changbin Du <[email protected]> AuthorDate: Fri, 28 Jan 2022 19:07:27 +08:00 Committer: Thomas Gleixner <[email protected]> CommitterDate: Wed, 02 Feb 2022 21:34:19 +01:00
genirq, softirq: Use in_hardirq() instead of in_irq()
Replace the obsolete and ambiguos macro in_irq() with the new macro in_hardirq().
Signed-off-by Changbin Du <[email protected]>
Signed-off-by Thomas Gleixner <[email protected]>
--- kernel/irq/irqdesc.c | 4 ++-- kernel/softirq.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
kernel/irq/irqdesc.c +2 -2
@@ -640,7 +640,7 @@ int handle_irq_desc(struct irq_desc *desc)return -EINVAL ; data =irq_desc_get_irq_data (desc); -if (WARN_ON_ONCE (!in_irq () &&handle_enforce_irqctx (data))) +if (WARN_ON_ONCE (!in_hardirq () &&handle_enforce_irqctx (data)))return -EPERM ;generic_handle_irq_desc (desc);
@@ -676,7 +676,7 @@ EXPORT_SYMBOL_GPL(generic_handle_irq);*/ int generic_handle_domain_irq (struct irq_domain *domain,unsigned int hwirq) { -WARN_ON_ONCE (!in_irq ()); +WARN_ON_ONCE (!in_hardirq ());return handle_irq_desc (irq_resolve_mapping (domain, hwirq)); }EXPORT_SYMBOL_GPL (generic_handle_domain_irq);
kernel/softirq.c +5 -5
@@ -222,7 +222,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)u32 pending;int curcnt; -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());lockdep_assert_irqs_enabled ();local_irq_save (flags);
@@ -305,7 +305,7 @@ void __local_bh_disable_ip(unsigned long ip, unsigned int cnt) {unsigned long flags; -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());raw_local_irq_save (flags);/*
@@ -352,14 +352,14 @@ static void __local_bh_enable(unsigned int cnt)*/ void _local_bh_enable (void ) { -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());__local_bh_enable (SOFTIRQ_DISABLE_OFFSET ); }EXPORT_SYMBOL (_local_bh_enable);void __local_bh_enable_ip (unsigned long ip,unsigned int cnt) { -WARN_ON_ONCE (in_irq ()); +WARN_ON_ONCE (in_hardirq ());lockdep_assert_irqs_enabled ();#ifdef CONFIG_TRACE_IRQFLAGS local_irq_disable ();
@@ -618,7 +618,7 @@ static inline void tick_irq_exit(void)/* Make sure that timer wheel updates are propagated */ if ((idle_cpu (cpu) && !need_resched ()) ||tick_nohz_full_cpu (cpu)) { -if (!in_irq ()) +if (!in_hardirq ())tick_nohz_irq_exit (); }#endif