Messages in this thread | | | From | Joel Fernandes <> | Date | Mon, 2 Oct 2017 14:31:02 -0700 | Subject | Re: [PATCH v6 2/2] tracing: Add support for preempt and irq enable/disable events |
| |
Hi Steven,
On Mon, Oct 2, 2017 at 12:37 PM, Steven Rostedt <rostedt@goodmis.org> wrote: > 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.
I agree, its cleaner. thanks,
- Joel
| |