summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/alignment.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-08-04 14:43:45 +0300
committerTony Lindgren <tony@atomide.com>2010-08-04 14:43:45 +0300
commit7590d1defdc720a97a9e186f45f529c4ae1b40f7 (patch)
treee7ffdc043a2847f410d654d8e99e001f3138937a /arch/arm/mm/alignment.c
parent7e788b4289bb025a96e327c604cb2db92e17108f (diff)
parent869fef41547db95df8523bf67845a21313709428 (diff)
downloadop-kernel-dev-7590d1defdc720a97a9e186f45f529c4ae1b40f7.zip
op-kernel-dev-7590d1defdc720a97a9e186f45f529c4ae1b40f7.tar.gz
Merge branch 'devel-map-io' into omap-for-linus
Diffstat (limited to 'arch/arm/mm/alignment.c')
-rw-r--r--arch/arm/mm/alignment.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 6f98c35..d073b64 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -924,8 +924,20 @@ static int __init alignment_init(void)
ai_usermode = UM_FIXUP;
}
- hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
- hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
+ hook_fault_code(1, 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;
}
OpenPOWER on IntegriCloud