Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201487
b: refs/heads/master
c: b8ab539
h: refs/heads/master
i:
  201485: 5a107e5
  201483: 6b257e6
  201479: 4b34b57
  201471: a90e296
v: v3
  • Loading branch information
Kirill A. Shutemov authored and Russell King committed Jul 27, 2010
1 parent 42842ec commit 27b2dbb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 993bf4ec8c2a2b7979389ab196bf2fe217117158
refs/heads/master: b8ab5397bcbd92e3fd4a9770e0bf59315fa38dab
14 changes: 12 additions & 2 deletions trunk/arch/arm/mm/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,8 +926,18 @@ static int __init alignment_init(void)

hook_fault_code(1, do_alignment, SIGBUS, BUS_ADRALN,
"alignment exception");
hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN,
"alignment exception");

/*
* ARMv6K and ARMv7 use fault status 3 (0b00011) as Access Flag section
* fault, not as alignment error.
*
* TODO: handle ARMv6K properly. Runtime check for 'K' extension is
* needed.
*/
if (cpu_architecture() <= CPU_ARCH_ARMv6) {
hook_fault_code(3, do_alignment, SIGBUS, BUS_ADRALN,
"alignment exception");
}

return 0;
}
Expand Down
11 changes: 11 additions & 0 deletions trunk/arch/arm/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,17 @@ static int __init exceptions_init(void)
"I-cache maintenance fault");
}

if (cpu_architecture() >= CPU_ARCH_ARMv7) {
/*
* TODO: Access flag faults introduced in ARMv6K.
* Runtime check for 'K' extension is needed
*/
hook_fault_code(3, do_bad, SIGSEGV, SEGV_MAPERR,
"section access flag fault");
hook_fault_code(6, do_bad, SIGSEGV, SEGV_MAPERR,
"section access flag fault");
}

return 0;
}

Expand Down

0 comments on commit 27b2dbb

Please sign in to comment.