1 /* SPDX-License-Identifier: GPL-2.0 */
3 * psr.h: This file holds the macros for masking off various parts of
4 * the processor status register on the Sparc. This is valid
5 * for Version 8. On the V9 this is renamed to the PSTATE
6 * register and its members are accessed as fields like
7 * PSTATE.PRIV for the current CPU privilege level.
9 * Copyright (C) 1994 David S. Miller (davem@caip.rutgers.edu)
11 #ifndef __LINUX_SPARC_PSR_H
12 #define __LINUX_SPARC_PSR_H
14 #include <uapi/asm/psr.h>
18 /* Get the %psr register. */
19 static inline unsigned int get_psr(void)
34 static inline void put_psr(unsigned int new_psr
)
37 "wr %0, 0x0, %%psr\n\t"
46 /* Get the %fsr register. Be careful, make sure the floating point
47 * enable bit is set in the %psr when you execute this or you will
51 extern unsigned int fsr_storage
;
53 static inline unsigned int get_fsr(void)
66 #endif /* !(__ASSEMBLY__) */
68 #endif /* !(__LINUX_SPARC_PSR_H) */