diff options
Diffstat (limited to 'arch/arm/mm/alignment.c')
| -rw-r--r-- | arch/arm/mm/alignment.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 6f98c358989a..d073b64ae87e 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
| @@ -924,8 +924,20 @@ static int __init alignment_init(void) | |||
| 924 | ai_usermode = UM_FIXUP; | 924 | ai_usermode = UM_FIXUP; |
| 925 | } | 925 | } |
| 926 | 926 | ||
| 927 | hook_fault_code(1, do_alignment, SIGILL, "alignment exception"); | 927 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, |
| 928 | hook_fault_code(3, do_alignment, SIGILL, "alignment exception"); | 928 | "alignment exception"); |
| 929 | |||
| 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 | } | ||
| 929 | 941 | ||
| 930 | return 0; | 942 | return 0; |
| 931 | } | 943 | } |
