]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - arch/cris/include/arch-v32/arch/system.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-hirsute-kernel.git] / arch / cris / include / arch-v32 / arch / system.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
51533b61
MS
2#ifndef _ASM_CRIS_ARCH_SYSTEM_H
3#define _ASM_CRIS_ARCH_SYSTEM_H
4
51533b61
MS
5
6/* Read the CPU version register. */
d9b5444e 7static inline unsigned long rdvr(void)
51533b61
MS
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. */
d9b5444e 18static inline unsigned long rdusp(void)
51533b61
MS
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. */
d9b5444e 27static inline unsigned long rdsp(void)
51533b61
MS
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
51533b61 38#endif /* _ASM_CRIS_ARCH_SYSTEM_H */