|
14 | 14 | #define CPU_ARCH_ARMv6 8 |
15 | 15 | #define CPU_ARCH_ARMv7 9 |
16 | 16 |
|
17 | | -/* |
18 | | - * CR1 bits (CP#15 CR1) |
19 | | - */ |
20 | | -#define CR_M (1 << 0) /* MMU enable */ |
21 | | -#define CR_A (1 << 1) /* Alignment abort enable */ |
22 | | -#define CR_C (1 << 2) /* Dcache enable */ |
23 | | -#define CR_W (1 << 3) /* Write buffer enable */ |
24 | | -#define CR_P (1 << 4) /* 32-bit exception handler */ |
25 | | -#define CR_D (1 << 5) /* 32-bit data address range */ |
26 | | -#define CR_L (1 << 6) /* Implementation defined */ |
27 | | -#define CR_B (1 << 7) /* Big endian */ |
28 | | -#define CR_S (1 << 8) /* System MMU protection */ |
29 | | -#define CR_R (1 << 9) /* ROM MMU protection */ |
30 | | -#define CR_F (1 << 10) /* Implementation defined */ |
31 | | -#define CR_Z (1 << 11) /* Implementation defined */ |
32 | | -#define CR_I (1 << 12) /* Icache enable */ |
33 | | -#define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ |
34 | | -#define CR_RR (1 << 14) /* Round Robin cache replacement */ |
35 | | -#define CR_L4 (1 << 15) /* LDR pc can set T bit */ |
36 | | -#define CR_DT (1 << 16) |
37 | | -#define CR_IT (1 << 18) |
38 | | -#define CR_ST (1 << 19) |
39 | | -#define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */ |
40 | | -#define CR_U (1 << 22) /* Unaligned access operation */ |
41 | | -#define CR_XP (1 << 23) /* Extended page tables */ |
42 | | -#define CR_VE (1 << 24) /* Vectored interrupts */ |
43 | | -#define CR_EE (1 << 25) /* Exception (Big) Endian */ |
44 | | -#define CR_TRE (1 << 28) /* TEX remap enable */ |
45 | | -#define CR_AFE (1 << 29) /* Access flag enable */ |
46 | | -#define CR_TE (1 << 30) /* Thumb exception enable */ |
47 | | - |
48 | 17 | /* |
49 | 18 | * This is used to ensure the compiler did actually allocate the register we |
50 | 19 | * asked it for some inline assembly sequences. Apparently we can't trust |
@@ -119,12 +88,6 @@ extern void (*arm_pm_restart)(char str, const char *cmd); |
119 | 88 |
|
120 | 89 | extern unsigned int user_debug; |
121 | 90 |
|
122 | | -#if __LINUX_ARM_ARCH__ >= 4 |
123 | | -#define vectors_high() (cr_alignment & CR_V) |
124 | | -#else |
125 | | -#define vectors_high() (0) |
126 | | -#endif |
127 | | - |
128 | 91 | #if __LINUX_ARM_ARCH__ >= 7 || \ |
129 | 92 | (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) |
130 | 93 | #define sev() __asm__ __volatile__ ("sev" : : : "memory") |
@@ -185,46 +148,6 @@ extern unsigned int user_debug; |
185 | 148 | #define set_mb(var, value) do { var = value; smp_mb(); } while (0) |
186 | 149 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); |
187 | 150 |
|
188 | | -extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ |
189 | | -extern unsigned long cr_alignment; /* defined in entry-armv.S */ |
190 | | - |
191 | | -static inline unsigned int get_cr(void) |
192 | | -{ |
193 | | - unsigned int val; |
194 | | - asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); |
195 | | - return val; |
196 | | -} |
197 | | - |
198 | | -static inline void set_cr(unsigned int val) |
199 | | -{ |
200 | | - asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" |
201 | | - : : "r" (val) : "cc"); |
202 | | - isb(); |
203 | | -} |
204 | | - |
205 | | -#ifndef CONFIG_SMP |
206 | | -extern void adjust_cr(unsigned long mask, unsigned long set); |
207 | | -#endif |
208 | | - |
209 | | -#define CPACC_FULL(n) (3 << (n * 2)) |
210 | | -#define CPACC_SVC(n) (1 << (n * 2)) |
211 | | -#define CPACC_DISABLE(n) (0 << (n * 2)) |
212 | | - |
213 | | -static inline unsigned int get_copro_access(void) |
214 | | -{ |
215 | | - unsigned int val; |
216 | | - asm("mrc p15, 0, %0, c1, c0, 2 @ get copro access" |
217 | | - : "=r" (val) : : "cc"); |
218 | | - return val; |
219 | | -} |
220 | | - |
221 | | -static inline void set_copro_access(unsigned int val) |
222 | | -{ |
223 | | - asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" |
224 | | - : : "r" (val) : "cc"); |
225 | | - isb(); |
226 | | -} |
227 | | - |
228 | 151 | /* |
229 | 152 | * switch_mm() may do a full cache flush over the context switch, |
230 | 153 | * so enable interrupts over the context switch to avoid high |
|
0 commit comments