]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[IA64] Rationalize kernel mode alignment checking
authorTony Luck <tony.luck@intel.com>
Thu, 20 Nov 2008 21:27:12 +0000 (13:27 -0800)
committerTony Luck <tony.luck@intel.com>
Thu, 20 Nov 2008 21:27:12 +0000 (13:27 -0800)
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 <tony.luck@intel.com>
arch/ia64/kernel/entry.S
arch/ia64/kernel/head.S

index 7ef0c594f5ed9a7e618101770d6b9a5469936d69..d435f4a7a96c0f83203a3e4be44b099694b26311 100644 (file)
@@ -499,6 +499,7 @@ GLOBAL_ENTRY(prefetch_stack)
 END(prefetch_stack)
 
 GLOBAL_ENTRY(kernel_execve)
+       rum psr.ac
        mov r15=__NR_execve                     // put syscall number in place
        break __BREAK_SYSCALL
        br.ret.sptk.many rp
index 66e491d8baac3130a4dd68581662395b94a951b4..59301c4728009ecb410516fb0e737107eda42d67 100644 (file)
@@ -260,7 +260,7 @@ start_ap:
         * Switch into virtual mode:
         */
        movl r16=(IA64_PSR_IT|IA64_PSR_IC|IA64_PSR_DT|IA64_PSR_RT|IA64_PSR_DFH|IA64_PSR_BN \
-                 |IA64_PSR_DI)
+                 |IA64_PSR_DI|IA64_PSR_AC)
        ;;
        mov cr.ipsr=r16
        movl r17=1f