diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-09-27 11:13:48 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-27 11:13:48 -0400 |
commit | e5beac371af0af47bcbd6819f4c2a0a2721a1735 (patch) | |
tree | 6dbaf0a1ba258977da34e3efa00b035a69ef67ec /arch | |
parent | 80878d6c4ab8611a0edf139a7f8a7a64860b87c9 (diff) |
[ARM] do_bad_area() always takes current and current->active_mm
Since do_bad_area() always takes the currently active task and
(supposed to) take the currently active MM, there's no point passing
them to this function. Instead, obtain references to them inside
do_bad_area().
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/alignment.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/fault.c | 15 | ||||
-rw-r--r-- | arch/arm/mm/fault.h | 5 |
3 files changed, 8 insertions, 14 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c index e0d21bbbe7d7..aa109f074dd9 100644 --- a/arch/arm/mm/alignment.c +++ b/arch/arm/mm/alignment.c | |||
@@ -735,7 +735,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | |||
735 | /* | 735 | /* |
736 | * We got a fault - fix it up, or die. | 736 | * We got a fault - fix it up, or die. |
737 | */ | 737 | */ |
738 | do_bad_area(current, current->mm, addr, fsr, regs); | 738 | do_bad_area(addr, fsr, regs); |
739 | return 0; | 739 | return 0; |
740 | 740 | ||
741 | swp: | 741 | swp: |
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index c5e0622c7765..f0943d160ffe 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c | |||
@@ -131,10 +131,11 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr, | |||
131 | force_sig_info(sig, &si, tsk); | 131 | force_sig_info(sig, &si, tsk); |
132 | } | 132 | } |
133 | 133 | ||
134 | void | 134 | void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
135 | do_bad_area(struct task_struct *tsk, struct mm_struct *mm, unsigned long addr, | ||
136 | unsigned int fsr, struct pt_regs *regs) | ||
137 | { | 135 | { |
136 | struct task_struct *tsk = current; | ||
137 | struct mm_struct *mm = tsk->active_mm; | ||
138 | |||
138 | /* | 139 | /* |
139 | * If we are in kernel mode at this point, we | 140 | * If we are in kernel mode at this point, we |
140 | * have no context to handle this fault with. | 141 | * have no context to handle this fault with. |
@@ -319,7 +320,6 @@ static int | |||
319 | do_translation_fault(unsigned long addr, unsigned int fsr, | 320 | do_translation_fault(unsigned long addr, unsigned int fsr, |
320 | struct pt_regs *regs) | 321 | struct pt_regs *regs) |
321 | { | 322 | { |
322 | struct task_struct *tsk; | ||
323 | unsigned int index; | 323 | unsigned int index; |
324 | pgd_t *pgd, *pgd_k; | 324 | pgd_t *pgd, *pgd_k; |
325 | pmd_t *pmd, *pmd_k; | 325 | pmd_t *pmd, *pmd_k; |
@@ -351,9 +351,7 @@ do_translation_fault(unsigned long addr, unsigned int fsr, | |||
351 | return 0; | 351 | return 0; |
352 | 352 | ||
353 | bad_area: | 353 | bad_area: |
354 | tsk = current; | 354 | do_bad_area(addr, fsr, regs); |
355 | |||
356 | do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); | ||
357 | return 0; | 355 | return 0; |
358 | } | 356 | } |
359 | 357 | ||
@@ -364,8 +362,7 @@ bad_area: | |||
364 | static int | 362 | static int |
365 | do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) | 363 | do_sect_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) |
366 | { | 364 | { |
367 | struct task_struct *tsk = current; | 365 | do_bad_area(addr, fsr, regs); |
368 | do_bad_area(tsk, tsk->active_mm, addr, fsr, regs); | ||
369 | return 0; | 366 | return 0; |
370 | } | 367 | } |
371 | 368 | ||
diff --git a/arch/arm/mm/fault.h b/arch/arm/mm/fault.h index 73b59e83227f..49e9e3804de4 100644 --- a/arch/arm/mm/fault.h +++ b/arch/arm/mm/fault.h | |||
@@ -1,6 +1,3 @@ | |||
1 | void do_bad_area(struct task_struct *tsk, struct mm_struct *mm, | 1 | void do_bad_area(unsigned long addr, unsigned int fsr, struct pt_regs *regs); |
2 | unsigned long addr, unsigned int fsr, struct pt_regs *regs); | ||
3 | |||
4 | void show_pte(struct mm_struct *mm, unsigned long addr); | ||
5 | 2 | ||
6 | unsigned long search_exception_table(unsigned long addr); | 3 | unsigned long search_exception_table(unsigned long addr); |