Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / tools / perf / arch / powerpc / util / utils_header.h
blob5788eb1f1fe3398d0e5b95b5b8b780bc1d339811
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 */