OSDN Git Service

arm64: Make PMR part of task context
authorJulien Thierry <julien.thierry@arm.com>
Thu, 31 Jan 2019 14:58:46 +0000 (14:58 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 6 Feb 2019 10:05:18 +0000 (10:05 +0000)
commit133d05186325ce04494ea6488a6b86e50a446c12
tree3d9b43fc48c46a1d94978aa6e20dfaae32920cdc
parentcdbc81ddef43c8fdcbd3a26e1a7530c70b629cfc
arm64: Make PMR part of task context

In order to replace PSR.I interrupt disabling/enabling with ICC_PMR_EL1
interrupt masking, ICC_PMR_EL1 needs to be saved/restored when
taking/returning from an exception. This mimics the way hardware saves
and restores PSR.I bit in spsr_el1 for exceptions and ERET.

Add PMR to the registers to save in the pt_regs struct upon kernel entry,
and restore it before ERET. Also, initialize it to a sane value when
creating new tasks.

Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Dave Martin <Dave.Martin@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/processor.h
arch/arm64/include/asm/ptrace.h
arch/arm64/kernel/asm-offsets.c
arch/arm64/kernel/entry.S
arch/arm64/kernel/process.c