diff options
author | Mark Brown <broonie@kernel.org> | 2018-07-25 17:35:56 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-07-25 17:35:56 +0100 |
commit | 67b16c801606b467d11ca33838f305a6b4180f3b (patch) | |
tree | 4e8f4e1b58d8c2066b5910e01f2a392741e772cd /arch/x86/include/asm/mmu.h | |
parent | a8f8523d853f8705cd3b7e74f0497860d5381991 (diff) | |
parent | 606b3effb9ce2ab6f67eeecace381c701d411ecf (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rtlsk-v4.4-18.07-rt
Diffstat (limited to 'arch/x86/include/asm/mmu.h')
-rw-r--r-- | arch/x86/include/asm/mmu.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/x86/include/asm/mmu.h b/arch/x86/include/asm/mmu.h index 7680b76adafc..3359dfedc7ee 100644 --- a/arch/x86/include/asm/mmu.h +++ b/arch/x86/include/asm/mmu.h @@ -3,12 +3,18 @@ #include <linux/spinlock.h> #include <linux/mutex.h> +#include <linux/atomic.h> /* - * The x86 doesn't have a mmu context, but - * we put the segment information here. + * x86 has arch-specific MMU state beyond what lives in mm_struct. */ typedef struct { + /* + * ctx_id uniquely identifies this mm_struct. A ctx_id will never + * be reused, and zero is not a valid ctx_id. + */ + u64 ctx_id; + #ifdef CONFIG_MODIFY_LDT_SYSCALL struct ldt_struct *ldt; #endif @@ -24,6 +30,11 @@ typedef struct { atomic_t perf_rdpmc_allowed; /* nonzero if rdpmc is allowed */ } mm_context_t; +#define INIT_MM_CONTEXT(mm) \ + .context = { \ + .ctx_id = 1, \ + } + void leave_mm(int cpu); #endif /* _ASM_X86_MMU_H */ |