]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] complete the move of the LDT code into
authorManfred Spraul <manfred@colorfullife.com>
Sun, 3 Nov 2002 08:38:13 +0000 (00:38 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 3 Nov 2002 08:38:13 +0000 (00:38 -0800)
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.

arch/i386/kernel/ldt.c
include/asm-i386/mmu_context.h
include/asm-i386/processor.h
mm/mmap.c

index 3f6f49aeca0ba1e805556d9f2af17fd17e69965f..8388fed9f9c278bc5992fc028d5c94701a595226 100644 (file)
@@ -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
  */
-void release_segments(struct mm_struct *mm)
+void destroy_context(struct mm_struct *mm)
 {
        if (mm->context.size) {
                if (mm == current->active_mm)
index 2b64727e67bd0e7773c6470bada8d11f69e5ddc7..1bacef727bba8f52fc51e83c7798bb147897e230 100644 (file)
@@ -8,10 +8,10 @@
 #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);
+void destroy_context(struct mm_struct *mm);
 
 #ifdef CONFIG_SMP
 
index 60e2f452a0433f8a304df373c8c4d47f712b589b..360efe8de7684c1649a9dd1a809cb27d028e9efb 100644 (file)
@@ -434,9 +434,6 @@ extern void release_thread(struct task_struct *);
  */
 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);
 
 unsigned long get_wchan(struct task_struct *p);
index 205ba003d746f0a5f4add658a8ed5c3d48070b8d..ea28581a614861ac4d578b858c01b255e7de3067 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1283,8 +1283,6 @@ void exit_mmap(struct mm_struct * mm)
 
        profile_exit_mmap(mm);
  
-       release_segments(mm);
        spin_lock(&mm->page_table_lock);
 
        tlb = tlb_gather_mmu(mm, 1);