* Andy Lutomirski <l...@kernel.org> wrote: > + event->hw.idx = -1; > + event->hw.event_base = (event->attr.config == APERFMPERF_EVENT_APERF ? > + MSR_IA32_APERF : MSR_IA32_MPERF);
So instead of having a separate driver per MSR, I think it might be more useful to have a generic 'MSR as counters' PMU driver, for such really simple cases where MSR contents represent an interesting hardware metric, and have a table that enumerates the MSRs we allow to be measured, and a sysfs list of them, to allow easy discovery. APERF/MPERF would be one such MSR, MSR_SMI_COUNT another one - but there are also other interesting ones. Some of these are per CPU, some are system wide. Such an approach would be far more robust than tooling poking around in /dev/msr (!). Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/