X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-arm%2Fmmu_context.h;h=81c59facea3bead1184df5cf0359058eb9a2d366;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=a4cb79241a7319d3d71784e0944c5afb5fa45983;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index a4cb79241..81c59face 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h @@ -13,6 +13,8 @@ #ifndef __ASM_ARM_MMU_CONTEXT_H #define __ASM_ARM_MMU_CONTEXT_H +#include +#include #include #if __LINUX_ARM_ARCH__ >= 6 @@ -80,18 +82,18 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { + unsigned int cpu = smp_processor_id(); + if (prev != next) { + cpu_set(cpu, next->cpu_vm_mask); check_context(next); cpu_switch_mm(next->pgd, next); + if (cache_is_vivt()) + cpu_clear(cpu, prev->cpu_vm_mask); } } #define deactivate_mm(tsk,mm) do { } while (0) - -static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) -{ - check_context(next); - cpu_switch_mm(next->pgd, next); -} +#define activate_mm(prev,next) switch_mm(prev, next, NULL) #endif