]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: fix el2_setup check of CurrentEL
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 6 Jun 2014 13:16:21 +0000 (14:16 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 4 Jul 2014 15:16:52 +0000 (16:16 +0100)
commit6e0e9d7751f73b2d09e2f6d63994dcfdc7fc3e53
treec0e2539e84fe0b169ebd350368ca0b6da543ae53
parentf4fcbce809607eb806272a843751766b1a1709b7
arm64: fix el2_setup check of CurrentEL

The CurrentEL system register reports the Current Exception Level
of the CPU. It doesn't say anything about the stack handling, and
yet we compare it to PSR_MODE_EL2t and PSR_MODE_EL2h.

It works by chance because PSR_MODE_EL2t happens to match the right
bits, but that's otherwise a very bad idea. Just check for the EL
value instead.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
[catalin.marinas@arm.com: fixed arch/arm64/kernel/efi-entry.S]
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/ptrace.h
arch/arm64/kernel/efi-entry.S
arch/arm64/kernel/head.S