bitkeeper revision 1.1236.1.186 (424d5359kAhRjA4t3oq3aye_393FaQ)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2005-04-01 13:57:45 +00:00
commit 015a5c5ccd
2 files changed
+22 -19

No files matched your search

@@ -445,22 +445,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas
physdev_op_t iopl_op, iobmp_op;
multicall_entry_t _mcl[8], *mcl = _mcl;
/*
* Save away %fs and %gs. No need to save %es and %ds, as
* those are always kernel segments while inside the kernel.
*/
asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
/*
* We clobber FS and GS here so that we avoid a GPF when restoring
* previous task's FS/GS values in Xen when the LDT is switched.
*/
__asm__ __volatile__ (
"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs" : : :
"eax" );
/* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
/* XEN NOTE: FS/GS saved in switch_mm(), not here. */
/*
* This is basically '__unlazy_fpu', except that we queue a
@@ -16,13 +16,31 @@ void destroy_context(struct mm_struct *mm);
static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
{
#ifdef CONFIG_SMP
#if 0 /* XEN */
unsigned cpu = smp_processor_id();
if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_LAZY;
#endif
}
#define prepare_arch_switch(rq,next) __prepare_arch_switch()
#define finish_arch_switch(rq, next) spin_unlock_irq(&(rq)->lock)
#define task_running(rq, p) ((rq)->curr == (p))
static inline void __prepare_arch_switch(void)
{
/*
* Save away %fs and %gs. No need to save %es and %ds, as those
* are always kernel segments while inside the kernel. Must
* happen before reload of cr3/ldt (i.e., not in __switch_to).
*/
__asm__ __volatile__ ( "movl %%fs,%0 ; movl %%gs,%1"
: "=m" (*(int *)&current->thread.fs),
"=m" (*(int *)&current->thread.gs));
__asm__ __volatile__ ( "movl %0,%%fs ; movl %0,%%gs"
: : "r" (0) );
}
static inline void switch_mm(struct mm_struct *prev,
struct mm_struct *next,
struct task_struct *tsk)
@@ -32,7 +50,7 @@ static inline void switch_mm(struct mm_struct *prev,
if (likely(prev != next)) {
/* stop flush ipis for the previous mm */
cpu_clear(cpu, prev->cpu_vm_mask);
#ifdef CONFIG_SMP
#if 0 /* XEN */
per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
per_cpu(cpu_tlbstate, cpu).active_mm = next;
#endif
@@ -47,7 +65,7 @@ static inline void switch_mm(struct mm_struct *prev,
if (unlikely(prev->context.ldt != next->context.ldt))
load_LDT_nolock(&next->context, cpu);
}
#ifdef CONFIG_SMP
#if 0 /* XEN */
else {
per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
BUG_ON(per_cpu(cpu_tlbstate, cpu).active_mm != next);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.