Go to the documentation of this file. 1 #ifndef __ASM_ARM_CP15_H
2 #define __ASM_ARM_CP15_H
4 #include <asm/barrier.h>
19 #define CR_F (1 << 10)
20 #define CR_Z (1 << 11)
21 #define CR_I (1 << 12)
22 #define CR_V (1 << 13)
23 #define CR_RR (1 << 14)
24 #define CR_L4 (1 << 15)
25 #define CR_DT (1 << 16)
26 #define CR_IT (1 << 18)
27 #define CR_ST (1 << 19)
28 #define CR_FI (1 << 21)
29 #define CR_U (1 << 22)
30 #define CR_XP (1 << 23)
31 #define CR_VE (1 << 24)
32 #define CR_EE (1 << 25)
33 #define CR_TRE (1 << 28)
34 #define CR_AFE (1 << 29)
35 #define CR_TE (1 << 30)
39 #if __LINUX_ARM_ARCH__ >= 4
40 #define vectors_high() (cr_alignment & CR_V)
42 #define vectors_high() (0)
48 static inline unsigned int get_cr(
void)
51 asm(
"mrc p15, 0, %0, c1, c0, 0 @ get CR" :
"=r" (
val) : :
"cc");
55 static inline void set_cr(
unsigned int val)
57 asm volatile(
"mcr p15, 0, %0, c1, c0, 0 @ set CR"
58 : :
"r" (
val) :
"cc");
66 #define CPACC_FULL(n) (3 << (n * 2))
67 #define CPACC_SVC(n) (1 << (n * 2))
68 #define CPACC_DISABLE(n) (0 << (n * 2))
70 static inline unsigned int get_copro_access(
void)
73 asm(
"mrc p15, 0, %0, c1, c0, 2 @ get copro access"
74 :
"=r" (
val) : :
"cc");
78 static inline void set_copro_access(
unsigned int val)
80 asm volatile(
"mcr p15, 0, %0, c1, c0, 2 @ set copro access"
81 : :
"r" (
val) :
"cc");