[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171002153756.485fa6a9@gandalf.local.home>
Date: Mon, 2 Oct 2017 15:37:56 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Joel Fernandes <joelaf@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>, kernel-team@...roid.com
Subject: Re: [PATCH v6 2/2] tracing: Add support for preempt and irq
enable/disable events
On Mon, 2 Oct 2017 12:33:30 -0700
Joel Fernandes <joelaf@...gle.com> wrote:
> diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
> index 5dd1272d1ab2..2a1af0dd9cc4 100644
> --- a/include/linux/irqflags.h
> +++ b/include/linux/irqflags.h
> @@ -93,7 +93,9 @@
> #define local_irq_save(flags) \
> do { \
> raw_local_irq_save(flags); \
> - trace_hardirqs_off(); \
> + if (!raw_irqs_disabled_flags(flags)) { \
> + trace_hardirqs_off(); \
> + } \
> } while (0)
>
>
> @@ -101,7 +103,6 @@
> do { \
> if (raw_irqs_disabled_flags(flags)) { \
> raw_local_irq_restore(flags); \
> - trace_hardirqs_off(); \
> } else { \
> trace_hardirqs_on(); \
> raw_local_irq_restore(flags); \
I rather have the protection in trace_hardirqs_on/off(). Let's keep the
ugliness from spreading.
-- Steve
Powered by blists - more mailing lists