1 #ifndef __I386_MMU_CONTEXT_H
2 #define __I386_MMU_CONTEXT_H
5 #include <asm/atomic.h>
8 * possibly do the LDT unload here?
10 #define destroy_context(mm) do { } while(0)
11 #define init_new_context(tsk,mm) do { } while (0)
13 static inline void switch_mm(struct mm_struct
*prev
, struct mm_struct
*next
, struct task_struct
*tsk
, unsigned cpu
)
18 * Re-load LDT if necessary
20 if (prev
->segments
!= next
->segments
)
23 /* Re-load page tables */
24 asm volatile("movl %0,%%cr3": :"r" (__pa(next
->pgd
)));
25 clear_bit(cpu
, &prev
->cpu_vm_mask
);
27 set_bit(cpu
, &next
->cpu_vm_mask
);
30 #define activate_mm(prev, next) \
31 switch_mm((prev),(next),NULL,smp_processor_id())