1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __PERF_UTIL_HEADER_H
3 #define __PERF_UTIL_HEADER_H
5 #include <linux/stringify.h>
7 #define mfspr(rn) ({unsigned long rval; \
8 asm volatile("mfspr %0," __stringify(rn) \
9 : "=r" (rval)); rval; })
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 */
15 #endif /* __PERF_UTIL_HEADER_H */