summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/ring_buffer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index e145969a8eda..aa40ae92233b 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -1483,7 +1483,9 @@ rb_reserve_next_event(struct ring_buffer_per_cpu *cpu_buffer,
static int trace_irq_level(void)
{
- return hardirq_count() + softirq_count() + in_nmi();
+ return (hardirq_count() >> HARDIRQ_SHIFT) +
+ (softirq_count() >> + SOFTIRQ_SHIFT) +
+ !!in_nmi();
}
static int trace_recursive_lock(void)
OpenPOWER on IntegriCloud