File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -3069,18 +3069,17 @@ static inline void note_cmpxchg_failure(const char *n,
30693069
30703070 pr_info ("%s %s: cmpxchg redo " , n , s -> name );
30713071
3072- #ifdef CONFIG_PREEMPTION
3073- if ( tid_to_cpu (tid ) != tid_to_cpu (actual_tid ))
3072+ if ( IS_ENABLED ( CONFIG_PREEMPTION ) &&
3073+ tid_to_cpu (tid ) != tid_to_cpu (actual_tid )) {
30743074 pr_warn ("due to cpu change %d -> %d\n" ,
30753075 tid_to_cpu (tid ), tid_to_cpu (actual_tid ));
3076- else
3077- #endif
3078- if (tid_to_event (tid ) != tid_to_event (actual_tid ))
3076+ } else if (tid_to_event (tid ) != tid_to_event (actual_tid )) {
30793077 pr_warn ("due to cpu running other code. Event %ld->%ld\n" ,
30803078 tid_to_event (tid ), tid_to_event (actual_tid ));
3081- else
3079+ } else {
30823080 pr_warn ("for unknown reason: actual=%lx was=%lx target=%lx\n" ,
30833081 actual_tid , tid , next_tid (tid ));
3082+ }
30843083#endif
30853084 stat (s , CMPXCHG_DOUBLE_CPU_FAIL );
30863085}
You can’t perform that action at this time.
0 commit comments