diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2011-11-28 08:53:28 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-04-17 10:29:32 -0400 |
commit | 7fec1b57b8a925d83c194f995f83d9f8442fd48e (patch) | |
tree | 320c333459779e1388f5aae50ae50edb4482e82c /arch/arm/mm/context.c | |
parent | 3c5f7e7b4a0346de670b08f595bd15e7eec91f97 (diff) |
ARM: Remove __ARCH_WANT_INTERRUPTS_ON_CTXSW on ASID-capable CPUs
Since the ASIDs must be unique to an mm across all the CPUs in a system,
the __new_context() function needs to broadcast a context reset event to
all the CPUs during ASID allocation if a roll-over occurred. Such IPIs
cannot be issued with interrupts disabled and ARM had to define
__ARCH_WANT_INTERRUPTS_ON_CTXSW.
This patch changes the check_context() function to
check_and_switch_context() called from switch_mm(). In case of
ASID-capable CPUs (ARMv6 onwards), if a new ASID is needed and the
interrupts are disabled, it defers the __new_context() and
cpu_switch_mm() calls to the post-lock switch hook where the interrupts
are enabled. Setting the reserved TTBR0 was also moved to
check_and_switch_context() from cpu_v7_switch_mm().
Reviewed-by: Will Deacon <will.deacon@arm.com>
Tested-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Tested-by: Marc Zyngier <Marc.Zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mm/context.c')
-rw-r--r-- | arch/arm/mm/context.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mm/context.c b/arch/arm/mm/context.c index aaa291fc072e..06a2e7ce23c3 100644 --- a/arch/arm/mm/context.c +++ b/arch/arm/mm/context.c | |||
@@ -23,7 +23,7 @@ DEFINE_PER_CPU(struct mm_struct *, current_mm); | |||
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #ifdef CONFIG_ARM_LPAE | 25 | #ifdef CONFIG_ARM_LPAE |
26 | static void cpu_set_reserved_ttbr0(void) | 26 | void cpu_set_reserved_ttbr0(void) |
27 | { | 27 | { |
28 | unsigned long ttbl = __pa(swapper_pg_dir); | 28 | unsigned long ttbl = __pa(swapper_pg_dir); |
29 | unsigned long ttbh = 0; | 29 | unsigned long ttbh = 0; |
@@ -39,7 +39,7 @@ static void cpu_set_reserved_ttbr0(void) | |||
39 | isb(); | 39 | isb(); |
40 | } | 40 | } |
41 | #else | 41 | #else |
42 | static void cpu_set_reserved_ttbr0(void) | 42 | void cpu_set_reserved_ttbr0(void) |
43 | { | 43 | { |
44 | u32 ttb; | 44 | u32 ttb; |
45 | /* Copy TTBR1 into TTBR0 */ | 45 | /* Copy TTBR1 into TTBR0 */ |