lkml.org 
[lkml]   [2017]   [Oct]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@google.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

\
 
 \ /
  Last update: 2017-10-02 21:39    [W:0.056 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site