]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/cris/include/arch-v10/arch/system.h
CRISv10: remove redundant macros from system.h
[mirror_ubuntu-bionic-kernel.git] / arch / cris / include / arch-v10 / arch / system.h
CommitLineData
1da177e4
LT
1#ifndef __ASM_CRIS_ARCH_SYSTEM_H
2#define __ASM_CRIS_ARCH_SYSTEM_H
3
1da177e4
LT
4
5/* read the CPU version register */
6
d9b5444e 7static inline unsigned long rdvr(void) {
1da177e4
LT
8 unsigned char vr;
9 __asm__ volatile ("move $vr,%0" : "=rm" (vr));
10 return vr;
11}
12
7cf32cad
MS
13#define cris_machine_name "cris"
14
1da177e4
LT
15/* read/write the user-mode stackpointer */
16
d9b5444e 17static inline unsigned long rdusp(void) {
1da177e4
LT
18 unsigned long usp;
19 __asm__ __volatile__("move $usp,%0" : "=rm" (usp));
20 return usp;
21}
22
23#define wrusp(usp) \
24 __asm__ __volatile__("move %0,$usp" : /* no outputs */ : "rm" (usp))
25
26/* read the current stackpointer */
27
d9b5444e 28static inline unsigned long rdsp(void) {
1da177e4
LT
29 unsigned long sp;
30 __asm__ __volatile__("move.d $sp,%0" : "=rm" (sp));
31 return sp;
32}
33
d9b5444e 34static inline unsigned long _get_base(char * addr)
1da177e4
LT
35{
36 return 0;
37}
38
1da177e4 39#endif