All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH linux-next v2] timers: replace in_irq() with
@ 2022-10-12  1:26 yexingchen116
  2022-10-12  2:57 ` John Stultz
  2022-10-17 14:09 ` [tip: timers/core] timers: Replace in_irq() with in_hardirq() tip-bot2 for ye xingchen
  0 siblings, 2 replies; 3+ messages in thread
From: yexingchen116 @ 2022-10-12  1:26 UTC (permalink / raw)
  To: jstultz; +Cc: tglx, sboyd, linux-kernel, ye xingchen

From: ye xingchen <ye.xingchen@zte.com.cn>

Replace the obsolete and ambiguos macro in_irq() with new
macro in_hardirq().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
---
v1 -> v2
Replace both instances of in_irq() in the flie.
 kernel/time/timer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 717fcb9fb14a..8872670a285e 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1422,7 +1422,7 @@ int del_timer_sync(struct timer_list *timer)
 	 * don't use it in hardirq context, because it
 	 * could lead to deadlock.
 	 */
-	WARN_ON(in_irq() && !(timer->flags & TIMER_IRQSAFE));
+	WARN_ON(in_hardirq() && !(timer->flags & TIMER_IRQSAFE));
 
 	/*
 	 * Must be able to sleep on PREEMPT_RT because of the slowpath
 	 * in
@@ -1838,7 +1838,7 @@ void update_process_times(int user_tick)
 	run_local_timers();
 	rcu_sched_clock_irq(user_tick);
 #ifdef CONFIG_IRQ_WORK
-	if (in_irq())
+	if (in_hardirq())
 		irq_work_tick();
 #endif
 	scheduler_tick();
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next v2] timers: replace in_irq() with
  2022-10-12  1:26 [PATCH linux-next v2] timers: replace in_irq() with yexingchen116
@ 2022-10-12  2:57 ` John Stultz
  2022-10-17 14:09 ` [tip: timers/core] timers: Replace in_irq() with in_hardirq() tip-bot2 for ye xingchen
  1 sibling, 0 replies; 3+ messages in thread
From: John Stultz @ 2022-10-12  2:57 UTC (permalink / raw)
  To: yexingchen116; +Cc: Thomas Gleixner, Stephen Boyd, LKML, ye xingchen

On Tue, Oct 11, 2022 at 6:26 PM <yexingchen116@gmail.com> wrote:
>
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Replace the obsolete and ambiguos macro in_irq() with new

ambiguous ?

> macro in_hardirq().
>
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>

Acked-by: John Stultz <jstultz@google.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: timers/core] timers: Replace in_irq() with in_hardirq()
  2022-10-12  1:26 [PATCH linux-next v2] timers: replace in_irq() with yexingchen116
  2022-10-12  2:57 ` John Stultz
@ 2022-10-17 14:09 ` tip-bot2 for ye xingchen
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for ye xingchen @ 2022-10-17 14:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: ye xingchen, Thomas Gleixner, John Stultz, x86, linux-kernel

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     8be3f96ceddb911539a53d87a66da84a04502366
Gitweb:        https://git.kernel.org/tip/8be3f96ceddb911539a53d87a66da84a04502366
Author:        ye xingchen <ye.xingchen@zte.com.cn>
AuthorDate:    Wed, 12 Oct 2022 01:26:29 
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 17 Oct 2022 16:00:04 +02:00

timers: Replace in_irq() with in_hardirq()

Replace the obsolete and ambiguous macro in_irq() with new
macro in_hardirq().

Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: John Stultz <jstultz@google.com>
Link: https://lore.kernel.org/r/20221012012629.334966-1-ye.xingchen@zte.com.cn

---
 kernel/time/timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 717fcb9..f40c88c 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -1422,7 +1422,7 @@ int del_timer_sync(struct timer_list *timer)
 	 * don't use it in hardirq context, because it
 	 * could lead to deadlock.
 	 */
-	WARN_ON(in_irq() && !(timer->flags & TIMER_IRQSAFE));
+	WARN_ON(in_hardirq() && !(timer->flags & TIMER_IRQSAFE));
 
 	/*
 	 * Must be able to sleep on PREEMPT_RT because of the slowpath in

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-17 14:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-12  1:26 [PATCH linux-next v2] timers: replace in_irq() with yexingchen116
2022-10-12  2:57 ` John Stultz
2022-10-17 14:09 ` [tip: timers/core] timers: Replace in_irq() with in_hardirq() tip-bot2 for ye xingchen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.