treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / arch / powerpc / boot / reg.h
blobfd8f4fcbfc4a71f1a6a5ec4f6dc0a278d476e99b
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 #ifndef _PPC_BOOT_REG_H
3 #define _PPC_BOOT_REG_H
4 /*
5 * Copyright 2007 Davud Gibson, IBM Corporation.
6 */
8 static inline u32 mfpvr(void)
10 u32 pvr;
11 asm volatile ("mfpvr %0" : "=r"(pvr));
12 return pvr;
15 #define __stringify_1(x) #x
16 #define __stringify(x) __stringify_1(x)
18 #define mfspr(rn) ({unsigned long rval; \
19 asm volatile("mfspr %0," __stringify(rn) \
20 : "=r" (rval)); rval; })
21 #define mtspr(rn, v) asm volatile("mtspr " __stringify(rn) ",%0" : : "r" (v))
23 register void *__stack_pointer asm("r1");
24 #define get_sp() (__stack_pointer)
26 #endif /* _PPC_BOOT_REG_H */