@@ -1007,13 +1007,13 @@ static atomic_t global_nwo;
10071007 * in the entry order.
10081008 * TBD double check parallel CPU hotunplug
10091009 */
1010- static int mce_start (int * no_way_out )
1010+ static noinstr int mce_start (int * no_way_out )
10111011{
1012- int order ;
10131012 u64 timeout = (u64 )mca_cfg .monarch_timeout * NSEC_PER_USEC ;
1013+ int order , ret = -1 ;
10141014
10151015 if (!timeout )
1016- return -1 ;
1016+ return ret ;
10171017
10181018 atomic_add (* no_way_out , & global_nwo );
10191019 /*
@@ -1023,14 +1023,17 @@ static int mce_start(int *no_way_out)
10231023 order = atomic_inc_return (& mce_callin );
10241024 cpumask_clear_cpu (smp_processor_id (), & mce_missing_cpus );
10251025
1026+ /* Enable instrumentation around calls to external facilities */
1027+ instrumentation_begin ();
1028+
10261029 /*
10271030 * Wait for everyone.
10281031 */
10291032 while (atomic_read (& mce_callin ) != num_online_cpus ()) {
10301033 if (mce_timed_out (& timeout ,
10311034 "Timeout: Not all CPUs entered broadcast exception handler" )) {
10321035 atomic_set (& global_nwo , 0 );
1033- return -1 ;
1036+ goto out ;
10341037 }
10351038 ndelay (SPINUNIT );
10361039 }
@@ -1056,7 +1059,7 @@ static int mce_start(int *no_way_out)
10561059 if (mce_timed_out (& timeout ,
10571060 "Timeout: Subject CPUs unable to finish machine check processing" )) {
10581061 atomic_set (& global_nwo , 0 );
1059- return -1 ;
1062+ goto out ;
10601063 }
10611064 ndelay (SPINUNIT );
10621065 }
@@ -1067,7 +1070,12 @@ static int mce_start(int *no_way_out)
10671070 */
10681071 * no_way_out = atomic_read (& global_nwo );
10691072
1070- return order ;
1073+ ret = order ;
1074+
1075+ out :
1076+ instrumentation_end ();
1077+
1078+ return ret ;
10711079}
10721080
10731081/*
0 commit comments