ramips: register ethernet device on the WHR-G300N and V22RW-2x2 boards
[openwrt.git] / target / linux / pxa / patches-2.6.21 / 032-misalignment-handling.patch
1 Change the default alingment handling to not be silent failure
2 --- a/arch/arm/mm/alignment.c
3 +++ b/arch/arm/mm/alignment.c
4 @@ -797,6 +797,8 @@ static int __init alignment_init(void)
5 res->write_proc = proc_alignment_write;
6 #endif
7
8 + ai_usermode = CONFIG_ALIGNMENT_HANDLING;
9 +
10 hook_fault_code(1, do_alignment, SIGILL, "alignment exception");
11 hook_fault_code(3, do_alignment, SIGILL, "alignment exception");
12
13 --- a/arch/arm/Kconfig
14 +++ b/arch/arm/Kconfig
15 @@ -709,6 +709,19 @@ config ALIGNMENT_TRAP
16 correct operation of some network protocols. With an IP-only
17 configuration it is safe to say N, otherwise say Y.
18
19 +config ALIGNMENT_HANDLING
20 + hex "Userspace alignment trap handling"
21 + default "0x3"
22 + depends on ALIGNMENT_TRAP
23 + help
24 + How should we handle alignment errors in userspace by default? This is a bitfield where:
25 + 0 - silently ignore alignment errors (will lead to unexpected results)
26 + 1 - report alignment errors through printk (will lead to unexpected results, but you'll know about them)
27 + 2 - fix the alignment and make things work properly (performance degradation for un-aligned code)
28 + 4 - raise SIGBUS on alignment traps
29 + A good number to choose is probably either 3 (work slowly but log message) or 5 (log message and SIGBUS).
30 + You can change the behavior at runtime through /proc/cpu/alignment if you have PROC_FS enabled.
31 +
32 endmenu
33
34 menu "Boot options"
This page took 0.041325 seconds and 5 git commands to generate.