direct-io.hg
changeset 2393:486e3a27b1da
bitkeeper revision 1.1159.53.27 (4134d3b2RKqSKYYMoQoESXU2EtGiiQ)
Build fixes and move set_current() earlier in boot (Charles Coffing).
Build fixes and move set_current() earlier in boot (Charles Coffing).
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Tue Aug 31 19:38:26 2004 +0000 (2004-08-31) |
parents | 8faec11c4d99 |
children | 631de0f7529b 8771bd7cd7bb |
files | xen/arch/x86/memory.c xen/common/kernel.c xen/include/xen/spinlock.h |
line diff
1.1 --- a/xen/arch/x86/memory.c Tue Aug 31 16:16:02 2004 +0000 1.2 +++ b/xen/arch/x86/memory.c Tue Aug 31 19:38:26 2004 +0000 1.3 @@ -1042,7 +1042,7 @@ static int do_extended_command(unsigned 1.4 if ( unlikely(e->tot_pages == e->max_pages) || 1.5 unlikely(!gnttab_prepare_for_transfer(e, d, gntref)) ) 1.6 { 1.7 - MEM_LOG("Transferee has no reservation headroom (%ld,%ld), or " 1.8 + MEM_LOG("Transferee has no reservation headroom (%d,%d), or " 1.9 "provided a bad grant ref.\n", e->tot_pages, e->max_pages); 1.10 spin_unlock(&e->page_alloc_lock); 1.11 put_domain(e); 1.12 @@ -1731,7 +1731,7 @@ static void ptwr_init_backpointers(void) 1.13 page = &frame_table[pde >> PAGE_SHIFT]; 1.14 /* assert that page is an l1_page_table XXXcl maybe l2? */ 1.15 if ( (page->u.inuse.type_info & PGT_type_mask) != PGT_l1_page_table ) { 1.16 - MEM_LOG("ptwr: Inconsistent pagetable: pde %x is not an l1 page\n", 1.17 + MEM_LOG("ptwr: Inconsistent pagetable: pde %lx not an l1 page\n", 1.18 pde >> PAGE_SHIFT); 1.19 domain_crash(); 1.20 }
2.1 --- a/xen/common/kernel.c Tue Aug 31 16:16:02 2004 +0000 2.2 +++ b/xen/common/kernel.c Tue Aug 31 19:38:26 2004 +0000 2.3 @@ -183,6 +183,9 @@ void cmain(multiboot_info_t *mbi) 2.4 } 2.5 } 2.6 2.7 + /* Must do this early -- e.g., spinlocks rely on get_current(). */ 2.8 + set_current(&idle0_task); 2.9 + 2.10 /* We initialise the serial devices very early so we can get debugging. */ 2.11 serial_init_stage1(); 2.12 2.13 @@ -218,8 +221,6 @@ void cmain(multiboot_info_t *mbi) 2.14 for ( ; ; ) ; 2.15 } 2.16 2.17 - set_current(&idle0_task); 2.18 - 2.19 xenheap_phys_end = opt_xenheap_megabytes << 20; 2.20 2.21 max_mem = max_page = (mbi->mem_upper+1024) >> (PAGE_SHIFT - 10); 2.22 @@ -401,20 +402,14 @@ static int crit_count[NR_CPUS], crit_che 2.23 void disable_criticalregion_checking(void) 2.24 { 2.25 int cpu = smp_processor_id(); 2.26 - ASSERT(crit_checking_disabled[cpu] >= 0); 2.27 crit_checking_disabled[cpu]++; 2.28 } 2.29 2.30 -void enable_criticalregion_checking(void) 2.31 -{ 2.32 - int cpu = smp_processor_id(); 2.33 - crit_checking_disabled[cpu]--; 2.34 - ASSERT(crit_checking_disabled[cpu] >= 0); 2.35 -} 2.36 - 2.37 void criticalregion_enter(void) 2.38 { 2.39 int cpu = smp_processor_id(); 2.40 + if ( crit_checking_disabled[cpu] ) 2.41 + return; 2.42 ASSERT(crit_count[cpu] >= 0); 2.43 crit_count[cpu]++; 2.44 } 2.45 @@ -422,6 +417,8 @@ void criticalregion_enter(void) 2.46 void criticalregion_exit(void) 2.47 { 2.48 int cpu = smp_processor_id(); 2.49 + if ( crit_checking_disabled[cpu] ) 2.50 + return; 2.51 crit_count[cpu]--; 2.52 ASSERT(crit_count[cpu] >= 0); 2.53 }
3.1 --- a/xen/include/xen/spinlock.h Tue Aug 31 16:16:02 2004 +0000 3.2 +++ b/xen/include/xen/spinlock.h Tue Aug 31 19:38:26 2004 +0000 3.3 @@ -78,7 +78,6 @@ extern void criticalregion_enter(void); 3.4 extern void criticalregion_exit(void); 3.5 extern void ASSERT_no_criticalregion(void); 3.6 extern void disable_criticalregion_checking(void); 3.7 -extern void enable_criticalregion_checking(void); 3.8 3.9 #define spin_lock(_lock) \ 3.10 do { criticalregion_enter(); _raw_spin_lock(_lock); } while (0) 3.11 @@ -112,7 +111,6 @@ static inline int spin_trylock(spinlock_ 3.12 3.13 #define ASSERT_no_criticalregion() ((void)0) 3.14 #define disable_criticalregion_checking() ((void)0) 3.15 -#define enable_criticalregion_checking() ((void)0) 3.16 3.17 #define spin_lock(_lock) _raw_spin_lock(_lock) 3.18 #define spin_trylock(_lock) _raw_spin_trylock(_lock)