Okay, here's the 3rd attempt at support for hardware perf events support on ARMv6. After feedback from Jean and Will, I've added an arm_pmu structure that allows other CPU versions to be supported in the future. At the moment only ARMv6 is supported in hardware. Thanks to Will and Jean for their comments.