License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[sfrench/cifs-2.6.git] / arch / cris / include / arch-v32 / arch / system.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_CRIS_ARCH_SYSTEM_H
3 #define _ASM_CRIS_ARCH_SYSTEM_H
4
5
6 /* Read the CPU version register. */
7 static inline unsigned long rdvr(void)
8 {
9         unsigned char vr;
10
11         __asm__ __volatile__ ("move $vr, %0" : "=rm" (vr));
12         return vr;
13 }
14
15 #define cris_machine_name "crisv32"
16
17 /* Read the user-mode stack pointer. */
18 static inline unsigned long rdusp(void)
19 {
20         unsigned long usp;
21
22         __asm__ __volatile__ ("move $usp, %0" : "=rm" (usp));
23         return usp;
24 }
25
26 /* Read the current stack pointer. */
27 static inline unsigned long rdsp(void)
28 {
29         unsigned long sp;
30
31         __asm__ __volatile__ ("move.d $sp, %0" : "=rm" (sp));
32         return sp;
33 }
34
35 /* Write the user-mode stack pointer. */
36 #define wrusp(usp) __asm__ __volatile__ ("move %0, $usp" : : "rm" (usp))
37
38 #endif /* _ASM_CRIS_ARCH_SYSTEM_H */