diff options
Diffstat (limited to 'arch/arm/include/asm/cp15.h')
| -rw-r--r-- | arch/arm/include/asm/cp15.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/arm/include/asm/cp15.h b/arch/arm/include/asm/cp15.h index 5ef4d8015a60..1f3262e99d81 100644 --- a/arch/arm/include/asm/cp15.h +++ b/arch/arm/include/asm/cp15.h | |||
| @@ -42,6 +42,8 @@ | |||
| 42 | #define vectors_high() (0) | 42 | #define vectors_high() (0) |
| 43 | #endif | 43 | #endif |
| 44 | 44 | ||
| 45 | #ifdef CONFIG_CPU_CP15 | ||
| 46 | |||
| 45 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ | 47 | extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ |
| 46 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ | 48 | extern unsigned long cr_alignment; /* defined in entry-armv.S */ |
| 47 | 49 | ||
| @@ -82,6 +84,18 @@ static inline void set_copro_access(unsigned int val) | |||
| 82 | isb(); | 84 | isb(); |
| 83 | } | 85 | } |
| 84 | 86 | ||
| 85 | #endif | 87 | #else /* ifdef CONFIG_CPU_CP15 */ |
| 88 | |||
| 89 | /* | ||
| 90 | * cr_alignment and cr_no_alignment are tightly coupled to cp15 (at least in the | ||
| 91 | * minds of the developers). Yielding 0 for machines without a cp15 (and making | ||
| 92 | * it read-only) is fine for most cases and saves quite some #ifdeffery. | ||
| 93 | */ | ||
| 94 | #define cr_no_alignment UL(0) | ||
| 95 | #define cr_alignment UL(0) | ||
| 96 | |||
| 97 | #endif /* ifdef CONFIG_CPU_CP15 / else */ | ||
| 98 | |||
| 99 | #endif /* ifndef __ASSEMBLY__ */ | ||
| 86 | 100 | ||
| 87 | #endif | 101 | #endif |
