File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 3
3
config TRACE_IRQFLAGS_SUPPORT
4
4
def_bool y
5
5
6
+ config TRACE_IRQFLAGS_NMI_SUPPORT
7
+ def_bool y
8
+
6
9
config EARLY_PRINTK_USB
7
10
bool
8
11
Original file line number Diff line number Diff line change @@ -3714,6 +3714,9 @@ void noinstr lockdep_hardirqs_on(unsigned long ip)
3714
3714
* and not rely on hardware state like normal interrupts.
3715
3715
*/
3716
3716
if (unlikely (in_nmi ())) {
3717
+ if (!IS_ENABLED (CONFIG_TRACE_IRQFLAGS_NMI ))
3718
+ return ;
3719
+
3717
3720
/*
3718
3721
* Skip:
3719
3722
* - recursion check, because NMI can hit lockdep;
@@ -3773,7 +3776,10 @@ void noinstr lockdep_hardirqs_off(unsigned long ip)
3773
3776
* they will restore the software state. This ensures the software
3774
3777
* state is consistent inside NMIs as well.
3775
3778
*/
3776
- if (unlikely (!in_nmi () && (current -> lockdep_recursion & LOCKDEP_RECURSION_MASK )))
3779
+ if (in_nmi ()) {
3780
+ if (!IS_ENABLED (CONFIG_TRACE_IRQFLAGS_NMI ))
3781
+ return ;
3782
+ } else if (current -> lockdep_recursion & LOCKDEP_RECURSION_MASK )
3777
3783
return ;
3778
3784
3779
3785
/*
Original file line number Diff line number Diff line change @@ -1326,11 +1326,17 @@ config WW_MUTEX_SELFTEST
1326
1326
endmenu # lock debugging
1327
1327
1328
1328
config TRACE_IRQFLAGS
1329
+ depends on TRACE_IRQFLAGS_SUPPORT
1329
1330
bool
1330
1331
help
1331
1332
Enables hooks to interrupt enabling and disabling for
1332
1333
either tracing or lock debugging.
1333
1334
1335
+ config TRACE_IRQFLAGS_NMI
1336
+ def_bool y
1337
+ depends on TRACE_IRQFLAGS
1338
+ depends on TRACE_IRQFLAGS_NMI_SUPPORT
1339
+
1334
1340
config STACKTRACE
1335
1341
bool "Stack backtrace support"
1336
1342
depends on STACKTRACE_SUPPORT
You can’t perform that action at this time.
0 commit comments