lkml.org 
[lkml]   [2014]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ARM: armv7 no need update SCTLR for alignment
Date
In Armv7, cr_alignment and cr_no_alignment are always same, in alignment_init both 
cr_alignment and cr_no_alignment will be updated by clearing A bit. So there is no
meaning to update SCTLR if interrupt and exception disturbs the user-space.

Signed-off-by: Wuqixuan <wuqixuan@huawei.com>
---
diff -git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -323,12 +323,6 @@
A710( bne .Larm710bug )

#endif
-#if defined(CONFIG_ALIGNMENT_TRAP)
+#if defined(CONFIG_ALIGNMENT_TRAP) && !(__LINUX_ARM_ARCH__ >= 7)
ldr ip, __cr_alignment
ldr ip, [ip]
mcr p15, 0, ip, c1, c0 @ update control register
#endif
enable_irq

get_thread_info tsk
@@ -393,11 +387,6 @@
b ret_slow_syscall

.align 5
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && !(__LINUX_ARM_ARCH__ >= 7)
.type __cr_alignment, #object
__cr_alignment:
.word cr_alignment
#endif
.ltorg

/*
diff -git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -44,11 +44,6 @@
.endm

.macro alignment_trap, rtemp
-#ifdef CONFIG_ALIGNMENT_TRAP
+#if defined(CONFIG_ALIGNMENT_TRAP) && !(__LINUX_ARM_ARCH__ >= 7)
ldr \rtemp, .LCcralign
ldr \rtemp, [\rtemp]
mcr p15, 0, \rtemp, c1, c0
#endif
.endm

@
\
 
 \ /
  Last update: 2014-04-18 15:01    [W:0.023 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site