|
@@ -112,6 +112,11 @@ static struct extra_reg intel_westmere_extra_regs[] __read_mostly =
|
|
|
EVENT_EXTRA_END
|
|
|
};
|
|
|
|
|
|
+static struct event_constraint intel_v1_event_constraints[] __read_mostly =
|
|
|
+{
|
|
|
+ EVENT_CONSTRAINT_END
|
|
|
+};
|
|
|
+
|
|
|
static struct event_constraint intel_gen_event_constraints[] __read_mostly =
|
|
|
{
|
|
|
FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
|
|
@@ -1606,11 +1611,19 @@ static __init int intel_pmu_init(void)
|
|
|
break;
|
|
|
|
|
|
default:
|
|
|
- /*
|
|
|
- * default constraints for v2 and up
|
|
|
- */
|
|
|
- x86_pmu.event_constraints = intel_gen_event_constraints;
|
|
|
- pr_cont("generic architected perfmon, ");
|
|
|
+ switch (x86_pmu.version) {
|
|
|
+ case 1:
|
|
|
+ x86_pmu.event_constraints = intel_v1_event_constraints;
|
|
|
+ pr_cont("generic architected perfmon v1, ");
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ /*
|
|
|
+ * default constraints for v2 and up
|
|
|
+ */
|
|
|
+ x86_pmu.event_constraints = intel_gen_event_constraints;
|
|
|
+ pr_cont("generic architected perfmon, ");
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
return 0;
|
|
|
}
|