ia64/xen-unstable
changeset 4358:6966b0183ab8
bitkeeper revision 1.1236.1.145 (4248741cj7gwt6K7xFCPEyMPzfvSoQ)
Merge firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
Merge firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-2.0-testing.bk
into firebug.cl.cam.ac.uk:/local/scratch/kaf24/xen-unstable.bk
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Mon Mar 28 21:16:12 2005 +0000 (2005-03-28) |
parents | cc2c40950d59 f620c41a1fef |
children | 1ce17c2d32c5 |
files | xen/arch/x86/mm.c xen/arch/x86/setup.c xen/arch/x86/smp.c xen/arch/x86/smpboot.c xen/common/schedule.c xen/include/asm-x86/processor.h |
line diff
1.1 --- a/xen/arch/x86/mm.c Mon Mar 28 17:52:25 2005 +0000 1.2 +++ b/xen/arch/x86/mm.c Mon Mar 28 21:16:12 2005 +0000 1.3 @@ -1196,10 +1196,7 @@ int get_page_type(struct pfn_info *page, 1.4 { 1.5 /* Someone else is updating validation of this page. Wait... */ 1.6 while ( (y = page->u.inuse.type_info) == x ) 1.7 - { 1.8 - rep_nop(); 1.9 - barrier(); 1.10 - } 1.11 + cpu_relax(); 1.12 goto again; 1.13 } 1.14 }
2.1 --- a/xen/arch/x86/setup.c Mon Mar 28 17:52:25 2005 +0000 2.2 +++ b/xen/arch/x86/setup.c Mon Mar 28 21:16:12 2005 +0000 2.3 @@ -441,10 +441,7 @@ static void __init start_of_day(void) 2.4 smp_threads_ready = 1; 2.5 smp_commence(); /* Tell other CPUs that state of the world is stable. */ 2.6 while ( wait_init_idle != 0 ) 2.7 - { 2.8 cpu_relax(); 2.9 - barrier(); 2.10 - } 2.11 #endif 2.12 2.13 watchdog_on = 1;
3.1 --- a/xen/arch/x86/smp.c Mon Mar 28 17:52:25 2005 +0000 3.2 +++ b/xen/arch/x86/smp.c Mon Mar 28 21:16:12 2005 +0000 3.3 @@ -239,10 +239,7 @@ void flush_tlb_mask(unsigned long mask) 3.4 flush_cpumask = mask; 3.5 send_IPI_mask(mask, INVALIDATE_TLB_VECTOR); 3.6 while ( flush_cpumask != 0 ) 3.7 - { 3.8 - rep_nop(); 3.9 - barrier(); 3.10 - } 3.11 + cpu_relax(); 3.12 3.13 spin_unlock(&flush_lock); 3.14 } 3.15 @@ -260,10 +257,7 @@ void new_tlbflush_clock_period(void) 3.16 flush_cpumask = ((1 << smp_num_cpus) - 1) & ~(1 << smp_processor_id()); 3.17 send_IPI_allbutself(INVALIDATE_TLB_VECTOR); 3.18 while ( flush_cpumask != 0 ) 3.19 - { 3.20 - rep_nop(); 3.21 - barrier(); 3.22 - } 3.23 + cpu_relax(); 3.24 spin_unlock(&flush_lock); 3.25 } 3.26
4.1 --- a/xen/arch/x86/smpboot.c Mon Mar 28 17:52:25 2005 +0000 4.2 +++ b/xen/arch/x86/smpboot.c Mon Mar 28 21:16:12 2005 +0000 4.3 @@ -407,7 +407,7 @@ void __init start_secondary(void) 4.4 smp_callin(); 4.5 4.6 while (!atomic_read(&smp_commenced)) 4.7 - rep_nop(); 4.8 + cpu_relax(); 4.9 4.10 #ifdef __i386__ 4.11 /*
5.1 --- a/xen/common/schedule.c Mon Mar 28 17:52:25 2005 +0000 5.2 +++ b/xen/common/schedule.c Mon Mar 28 21:16:12 2005 +0000 5.3 @@ -217,10 +217,7 @@ void domain_sleep(struct exec_domain *d) 5.4 5.5 /* Synchronous. */ 5.6 while ( test_bit(EDF_RUNNING, &d->ed_flags) && !domain_runnable(d) ) 5.7 - { 5.8 - smp_mb(); 5.9 cpu_relax(); 5.10 - } 5.11 } 5.12 5.13 void domain_wake(struct exec_domain *ed)
6.1 --- a/xen/include/asm-x86/processor.h Mon Mar 28 17:52:25 2005 +0000 6.2 +++ b/xen/include/asm-x86/processor.h Mon Mar 28 21:16:12 2005 +0000 6.3 @@ -463,10 +463,10 @@ struct extended_sigtable { 6.4 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ 6.5 static inline void rep_nop(void) 6.6 { 6.7 - __asm__ __volatile__("rep;nop"); 6.8 + __asm__ __volatile__ ( "rep;nop" : : : "memory" ); 6.9 } 6.10 6.11 -#define cpu_relax() rep_nop() 6.12 +#define cpu_relax() rep_nop() 6.13 6.14 /* Prefetch instructions for Pentium III and AMD Athlon */ 6.15 #ifdef CONFIG_MPENTIUMIII