Skip to content

Commit b704882

Browse files
committed
[IA64] Rationalize kernel mode alignment checking
Itanium processors can handle some misaligned data accesses. They also provide a mode where all such accesses are forced to trap. The kernel was schizophrenic about use of this mode: * Base kernel code ran in permissive mode where the only traps generated were from those cases that the h/w could not handle. * Interrupt, syscall and trap code ran in strict mode where all unaligned accesses caused traps to the 0x5a00 unaligned reference vector. Use strict alignment checking throughout the kernel, but make sure that we continue to let user mode use more relaxed mode as the default. Signed-off-by: Tony Luck <[email protected]>
1 parent ee2f6cc commit b704882

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

arch/ia64/kernel/entry.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,7 @@ GLOBAL_ENTRY(prefetch_stack)
499499
END(prefetch_stack)
500500

501501
GLOBAL_ENTRY(kernel_execve)
502+
rum psr.ac
502503
mov r15=__NR_execve // put syscall number in place
503504
break __BREAK_SYSCALL
504505
br.ret.sptk.many rp

arch/ia64/kernel/head.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ start_ap:
260260
* Switch into virtual mode:
261261
*/
262262
movl r16=(IA64_PSR_IT|IA64_PSR_IC|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_DFH|IA64_PSR_BN \
263-
|IA64_PSR_DI)
263+
|IA64_PSR_DI|IA64_PSR_AC)
264264
;;
265265
mov cr.ipsr=r16
266266
movl r17=1f

0 commit comments

Comments
 (0)