1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __PERF_UTIL_HEADER_H 3 #define __PERF_UTIL_HEADER_H 4 5 #include <linux/stringify.h> 6 7 #define mfspr(rn) ({unsigned long rval; \ 8 asm volatile("mfspr %0," __stringify(rn) \ 9 : "=r" (rval)); rval; }) 10 11 #define SPRN_PVR 0x11F /* Processor Version Register */ 12 #define PVR_VER(pvr) (((pvr) >> 16) & 0xFFFF) /* Version field */ 13 #define PVR_REV(pvr) (((pvr) >> 0) & 0xFFFF) /* Revison field */ 14 15 #endif /* __PERF_UTIL_HEADER_H */ 16