Skip to content

Commit 54c3931

Browse files
Yipeng Zourostedt
authored andcommitted
tracing: hold caller_addr to hardirq_{enable,disable}_ip
Currently, The arguments passing to lockdep_hardirqs_{on,off} was fixed in CALLER_ADDR0. The function trace_hardirqs_on_caller should have been intended to use caller_addr to represent the address that caller wants to be traced. For example, lockdep log in riscv showing the last {enabled,disabled} at __trace_hardirqs_{on,off} all the time(if called by): [ 57.853175] hardirqs last enabled at (2519): __trace_hardirqs_on+0xc/0x14 [ 57.853848] hardirqs last disabled at (2520): __trace_hardirqs_off+0xc/0x14 After use trace_hardirqs_xx_caller, we can get more effective information: [ 53.781428] hardirqs last enabled at (2595): restore_all+0xe/0x66 [ 53.782185] hardirqs last disabled at (2596): ret_from_exception+0xa/0x10 Link: https://lkml.kernel.org/r/[email protected] Cc: [email protected] Fixes: c3bc8fd ("tracing: Centralize preemptirq tracepoints and unify their usage") Signed-off-by: Yipeng Zou <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 54be550 commit 54c3931

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/trace/trace_preemptirq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
9595
}
9696

9797
lockdep_hardirqs_on_prepare();
98-
lockdep_hardirqs_on(CALLER_ADDR0);
98+
lockdep_hardirqs_on(caller_addr);
9999
}
100100
EXPORT_SYMBOL(trace_hardirqs_on_caller);
101101
NOKPROBE_SYMBOL(trace_hardirqs_on_caller);
102102

103103
__visible void trace_hardirqs_off_caller(unsigned long caller_addr)
104104
{
105-
lockdep_hardirqs_off(CALLER_ADDR0);
105+
lockdep_hardirqs_off(caller_addr);
106106

107107
if (!this_cpu_read(tracing_irq_cpu)) {
108108
this_cpu_write(tracing_irq_cpu, 1);

0 commit comments

Comments
 (0)