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.
/*
* 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)
#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
*/
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);
profile_exit_mmap(mm);
- release_segments(mm);
-
spin_lock(&mm->page_table_lock);
tlb = tlb_gather_mmu(mm, 1);