On Wed, May 27, 2015 at 02:03:36PM -0500, Aravind Gopalakrishnan wrote:
+static void trigger_dfr_int(void *info)Hardcoded naked numbers huh?
+{
+ asm volatile("int $244");
+}
+
+static void trigger_thr_int(void *info)
+{
+ asm volatile("int $249");
+}
Guess what happens when someone changes DEFERRED_ERROR_VECTOR and
THRESHOLD_APIC_VECTOR.
- smp_call_function_single(cpu, trigger_mce, NULL, 0);
+ if (inj_type == DFR_INT_INJ)
+ smp_call_function_single(cpu, trigger_dfr_int, NULL, 0);
+ else if (inj_type == THR_INT_INJ)
+ smp_call_function_single(cpu, trigger_thr_int, NULL, 0);
+ else
+ smp_call_function_single(cpu, trigger_mce, NULL, 0);
I guess a switch-case is kinda offering itself here...