diff options
author | Kirill A. Shutemov <kirill@shutemov.name> | 2010-07-26 06:20:41 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-27 05:48:41 -0400 |
commit | b8ab5397bcbd92e3fd4a9770e0bf59315fa38dab (patch) | |
tree | 4def9ea84d54ce112c91e906e10fb8756151327c /arch/arm/mm/alignment.c | |
parent | 993bf4ec8c2a2b7979389ab196bf2fe217117158 (diff) |
ARM: 6268/1: ARMv6K and ARMv7 use fault statuses 3 and 6 as Access Flag fault
Statuses 3 (0b00011) and 6 (0x00110) of DFSR are Access Flags faults on
ARMv6K and ARMv7. Let's patch fsr_info[] at runtime if we are on ARMv7
or later.
Unfortunately, we don't have runtime check for 'K' extension, so we
can't check for it.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/alignment.c')
-rw-r--r-- | arch/arm/mm/alignment.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 77cfdbed9501..d073b64ae87e 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -926,8 +926,18 @@ static int __init alignment_init(void) | |||
926 | 926 | ||
927 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, | 927 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, |
928 | "alignment exception"); | 928 | "alignment exception"); |
929 | hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN, | 929 | |
930 | "alignment exception"); | 930 | /* |
931 | * ARMv6K and ARMv7 use fault status 3 (0b00011) as Access Flag section | ||
932 | * fault, not as alignment error. | ||
933 | * | ||
934 | * TODO: handle ARMv6K properly. Runtime check for 'K' extension is | ||
935 | * needed. | ||
936 | */ | ||
937 | if (cpu_architecture() <= CPU_ARCH_ARMv6) { | ||
938 | hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN, | ||
939 | "alignment exception"); | ||
940 | } | ||
931 | 941 | ||
932 | return 0; | 942 | return 0; |
933 | } | 943 | } |