@@ -1007,13 +1007,13 @@ static atomic_t global_nwo;
1007
1007
* in the entry order.
1008
1008
* TBD double check parallel CPU hotunplug
1009
1009
*/
1010
- static int mce_start (int * no_way_out )
1010
+ static noinstr int mce_start (int * no_way_out )
1011
1011
{
1012
- int order ;
1013
1012
u64 timeout = (u64 )mca_cfg .monarch_timeout * NSEC_PER_USEC ;
1013
+ int order , ret = -1 ;
1014
1014
1015
1015
if (!timeout )
1016
- return -1 ;
1016
+ return ret ;
1017
1017
1018
1018
atomic_add (* no_way_out , & global_nwo );
1019
1019
/*
@@ -1023,14 +1023,17 @@ static int mce_start(int *no_way_out)
1023
1023
order = atomic_inc_return (& mce_callin );
1024
1024
cpumask_clear_cpu (smp_processor_id (), & mce_missing_cpus );
1025
1025
1026
+ /* Enable instrumentation around calls to external facilities */
1027
+ instrumentation_begin ();
1028
+
1026
1029
/*
1027
1030
* Wait for everyone.
1028
1031
*/
1029
1032
while (atomic_read (& mce_callin ) != num_online_cpus ()) {
1030
1033
if (mce_timed_out (& timeout ,
1031
1034
"Timeout: Not all CPUs entered broadcast exception handler" )) {
1032
1035
atomic_set (& global_nwo , 0 );
1033
- return -1 ;
1036
+ goto out ;
1034
1037
}
1035
1038
ndelay (SPINUNIT );
1036
1039
}
@@ -1056,7 +1059,7 @@ static int mce_start(int *no_way_out)
1056
1059
if (mce_timed_out (& timeout ,
1057
1060
"Timeout: Subject CPUs unable to finish machine check processing" )) {
1058
1061
atomic_set (& global_nwo , 0 );
1059
- return -1 ;
1062
+ goto out ;
1060
1063
}
1061
1064
ndelay (SPINUNIT );
1062
1065
}
@@ -1067,7 +1070,12 @@ static int mce_start(int *no_way_out)
1067
1070
*/
1068
1071
* no_way_out = atomic_read (& global_nwo );
1069
1072
1070
- return order ;
1073
+ ret = order ;
1074
+
1075
+ out :
1076
+ instrumentation_end ();
1077
+
1078
+ return ret ;
1071
1079
}
1072
1080
1073
1081
/*
0 commit comments