diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/alignment.c | 6 | ||||
-rw-r--r-- | arch/arm/mm/fault.c | 14 |
2 files changed, 12 insertions, 8 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index 53a609680c10..77cfdbed9501 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -924,8 +924,10 @@ 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, SIGBUS, "alignment exception"); | 927 | hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN, |
928 | hook_fault_code(3, do_alignment, SIGBUS, "alignment exception"); | 928 | "alignment exception"); |
929 | hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN, | ||
930 | "alignment exception"); | ||
929 | 931 | ||
930 | return 0; | 932 | return 0; |
931 | } | 933 | } |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index ce6f3a422c81..84131c832430 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -508,13 +508,15 @@ static struct fsr_info { | |||
508 | 508 | ||
509 | void __init | 509 | void __init |
510 | hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), | 510 | hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, struct pt_regs *), |
511 | int sig, const char *name) | 511 | int sig, int code, const char *name) |
512 | { | 512 | { |
513 | if (nr >= 0 && nr < ARRAY_SIZE(fsr_info)) { | 513 | if (nr < 0 || nr >= ARRAY_SIZE(fsr_info)) |
514 | fsr_info[nr].fn = fn; | 514 | BUG(); |
515 | fsr_info[nr].sig = sig; | 515 | |
516 | fsr_info[nr].name = name; | 516 | fsr_info[nr].fn = fn; |
517 | } | 517 | fsr_info[nr].sig = sig; |
518 | fsr_info[nr].code = code; | ||
519 | fsr_info[nr].name = name; | ||
518 | } | 520 | } |
519 | 521 | ||
520 | /* | 522 | /* |