[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    ARM: 7066/1: proc-v7: disable SCTLR.TE when disabling MMU
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2011-08-30 23:12:08
Message-ID: 201108302312.p7UNC8vI028255 () hera ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/linus/0f81bb6b051ad760686b5b0fef8c731282c16ef5
Commit:     0f81bb6b051ad760686b5b0fef8c731282c16ef5
Parent:     552e0c8da8ff7099e6fe060cd7ec36ae11f5465b
Author:     Will Deacon <will.deacon@arm.com>
AuthorDate: Fri Aug 26 16:34:51 2011 +0100
Committer:  Russell King <rmk+kernel@arm.linux.org.uk>
CommitDate: Sun Aug 28 10:39:53 2011 +0100

    ARM: 7066/1: proc-v7: disable SCTLR.TE when disabling MMU
    
    cpu_v7_reset disables the MMU and then branches to the provided address.
    On Thumb-2 kernels, we should take care to clear the Thumb Exception
    enable bit in the System Control Register, otherwise this may wreak
    havok in the code to which we are branching (for example, an ARM kernel
    image via kexec).
    
    Reviewed-by: Dave Martin <dave.martin@linaro.org>
    Signed-off-by: Will Deacon <will.deacon@arm.com>
    Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mm/proc-v7.S |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index a30e785..dec72ee 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -66,6 +66,7 @@ ENDPROC(cpu_v7_proc_fin)
 ENTRY(cpu_v7_reset)
 	mrc	p15, 0, r1, c1, c0, 0		@ ctrl register
 	bic	r1, r1, #0x1			@ ...............m
+ THUMB(	bic	r1, r1, #1 << 30 )		@ SCTLR.TE (Thumb exceptions)
 	mcr	p15, 0, r1, c1, c0, 0		@ disable MMU
 	isb
 	mov	pc, r0
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic