Commit cc1741c0 authored by Manfred Spraul's avatar Manfred Spraul Committed by Linus Torvalds

[PATCH] complete the move of the LDT code into

The i386 LDT code had it's own set of arch hooks (??_segments), I've
replaced most of them with the mmu context hooks in a previous patch.
The attached patch completes that change: replace release_segments with
destroy_context.

The patch is part of the -ac kernels in 2.4.  The patch breaks x86-64,
Andi Kleen promised to send you the corresponding
s/release_segments/destroy_context/ patch.
parent 0605bb23
...@@ -104,7 +104,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm) ...@@ -104,7 +104,7 @@ int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
/* /*
* No need to lock the MM as we are the last user * No need to lock the MM as we are the last user
*/ */
void release_segments(struct mm_struct *mm) void destroy_context(struct mm_struct *mm)
{ {
if (mm->context.size) { if (mm->context.size) {
if (mm == current->active_mm) if (mm == current->active_mm)
......
...@@ -8,10 +8,10 @@ ...@@ -8,10 +8,10 @@
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
/* /*
* possibly do the LDT unload here? * Used for LDT copy/destruction.
*/ */
#define destroy_context(mm) do { } while(0)
int init_new_context(struct task_struct *tsk, struct mm_struct *mm); int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
void destroy_context(struct mm_struct *mm);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -434,9 +434,6 @@ extern void release_thread(struct task_struct *); ...@@ -434,9 +434,6 @@ extern void release_thread(struct task_struct *);
*/ */
extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
/* Release all segment info associated with a VM */
extern void release_segments(struct mm_struct * mm);
extern unsigned long thread_saved_pc(struct task_struct *tsk); extern unsigned long thread_saved_pc(struct task_struct *tsk);
unsigned long get_wchan(struct task_struct *p); unsigned long get_wchan(struct task_struct *p);
......
...@@ -1283,8 +1283,6 @@ void exit_mmap(struct mm_struct * mm) ...@@ -1283,8 +1283,6 @@ void exit_mmap(struct mm_struct * mm)
profile_exit_mmap(mm); profile_exit_mmap(mm);
release_segments(mm);
spin_lock(&mm->page_table_lock); spin_lock(&mm->page_table_lock);
tlb = tlb_gather_mmu(mm, 1); tlb = tlb_gather_mmu(mm, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment