X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Fasm-arm%2Fmmu_context.h;h=f8755c818b5462549e39ed8bd0102ae3b02ed0a0;hb=a989705c4cf6e6c1a339c95f9daf658b4ba88ca8;hp=9fadb01e030d15a4fd67dda4ac143ff52406be46;hpb=27d68a36c4f1ca2fc6be82620843493462c08c51;p=powerpc.git diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 9fadb01e03..f8755c818b 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h @@ -16,6 +16,9 @@ #include #include #include +#include + +void __check_kvm_seq(struct mm_struct *mm); #if __LINUX_ARM_ARCH__ >= 6 @@ -45,13 +48,21 @@ static inline void check_context(struct mm_struct *mm) { if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) __new_context(mm); + + if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) + __check_kvm_seq(mm); } #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) #else -#define check_context(mm) do { } while (0) +static inline void check_context(struct mm_struct *mm) +{ + if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) + __check_kvm_seq(mm); +} + #define init_new_context(tsk,mm) 0 #endif