projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86/mm: Factor out LDT init from context init
[cascardo/linux.git]
/
arch
/
x86
/
include
/
asm
/
mmu_context.h
diff --git
a/arch/x86/include/asm/mmu_context.h
b/arch/x86/include/asm/mmu_context.h
index
6572b94
..
8428002
100644
(file)
--- a/
arch/x86/include/asm/mmu_context.h
+++ b/
arch/x86/include/asm/mmu_context.h
@@
-52,15
+52,15
@@
struct ldt_struct {
/*
* Used for LDT copy/destruction.
*/
/*
* Used for LDT copy/destruction.
*/
-int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
-void destroy_context(struct mm_struct *mm);
+int init_new_context
_ldt
(struct task_struct *tsk, struct mm_struct *mm);
+void destroy_context
_ldt
(struct mm_struct *mm);
#else /* CONFIG_MODIFY_LDT_SYSCALL */
#else /* CONFIG_MODIFY_LDT_SYSCALL */
-static inline int init_new_context(struct task_struct *tsk,
- struct mm_struct *mm)
+static inline int init_new_context
_ldt
(struct task_struct *tsk,
+
struct mm_struct *mm)
{
return 0;
}
{
return 0;
}
-static inline void destroy_context(struct mm_struct *mm) {}
+static inline void destroy_context
_ldt
(struct mm_struct *mm) {}
#endif
static inline void load_mm_ldt(struct mm_struct *mm)
#endif
static inline void load_mm_ldt(struct mm_struct *mm)
@@
-104,6
+104,17
@@
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
#endif
}
#endif
}
+static inline int init_new_context(struct task_struct *tsk,
+ struct mm_struct *mm)
+{
+ init_new_context_ldt(tsk, mm);
+ return 0;
+}
+static inline void destroy_context(struct mm_struct *mm)
+{
+ destroy_context_ldt(mm);
+}
+
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk)
{