Various changes to make the driver work on AMD (finally!).
Various changes to make the driver work on AMD (finally!).

pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi,arm-hpc/papi,pyrovski/papi,arm-hpc/papi,arm-hpc/papi,pyrovski/papi,pyrovski/papi