mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1159.53.27 (4134d3b2RKqSKYYMoQoESXU2EtGiiQ)
Build fixes and move set_current() earlier in boot (Charles Coffing).
This commit is contained in:
1 parent
2e9844c42c
commit
8a1d582d65
3 files changed
+9
-14
No files matched your search
@@ -1042,7 +1042,7 @@ static int do_extended_command(unsigned long ptr, unsigned long val)
|
||||
if ( unlikely(e->tot_pages == e->max_pages) ||
|
||||
unlikely(!gnttab_prepare_for_transfer(e, d, gntref)) )
|
||||
{
|
||||
MEM_LOG("Transferee has no reservation headroom (%ld,%ld), or "
|
||||
MEM_LOG("Transferee has no reservation headroom (%d,%d), or "
|
||||
"provided a bad grant ref.\n", e->tot_pages, e->max_pages);
|
||||
spin_unlock(&e->page_alloc_lock);
|
||||
put_domain(e);
|
||||
@@ -1731,7 +1731,7 @@ static void ptwr_init_backpointers(void)
|
||||
page = &frame_table[pde >> PAGE_SHIFT];
|
||||
/* assert that page is an l1_page_table XXXcl maybe l2? */
|
||||
if ( (page->u.inuse.type_info & PGT_type_mask) != PGT_l1_page_table ) {
|
||||
MEM_LOG("ptwr: Inconsistent pagetable: pde %x is not an l1 page\n",
|
||||
MEM_LOG("ptwr: Inconsistent pagetable: pde %lx not an l1 page\n",
|
||||
pde >> PAGE_SHIFT);
|
||||
domain_crash();
|
||||
}
|
||||
|
||||
+7
-10
@@ -183,6 +183,9 @@ void cmain(multiboot_info_t *mbi)
|
||||
}
|
||||
}
|
||||
|
||||
/* Must do this early -- e.g., spinlocks rely on get_current(). */
|
||||
set_current(&idle0_task);
|
||||
|
||||
/* We initialise the serial devices very early so we can get debugging. */
|
||||
serial_init_stage1();
|
||||
|
||||
@@ -218,8 +221,6 @@ void cmain(multiboot_info_t *mbi)
|
||||
for ( ; ; ) ;
|
||||
}
|
||||
|
||||
set_current(&idle0_task);
|
||||
|
||||
xenheap_phys_end = opt_xenheap_megabytes << 20;
|
||||
|
||||
max_mem = max_page = (mbi->mem_upper+1024) >> (PAGE_SHIFT - 10);
|
||||
@@ -401,20 +402,14 @@ static int crit_count[NR_CPUS], crit_checking_disabled[NR_CPUS];
|
||||
void disable_criticalregion_checking(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
ASSERT(crit_checking_disabled[cpu] >= 0);
|
||||
crit_checking_disabled[cpu]++;
|
||||
}
|
||||
|
||||
void enable_criticalregion_checking(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
crit_checking_disabled[cpu]--;
|
||||
ASSERT(crit_checking_disabled[cpu] >= 0);
|
||||
}
|
||||
|
||||
void criticalregion_enter(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
if ( crit_checking_disabled[cpu] )
|
||||
return;
|
||||
ASSERT(crit_count[cpu] >= 0);
|
||||
crit_count[cpu]++;
|
||||
}
|
||||
@@ -422,6 +417,8 @@ void criticalregion_enter(void)
|
||||
void criticalregion_exit(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
if ( crit_checking_disabled[cpu] )
|
||||
return;
|
||||
crit_count[cpu]--;
|
||||
ASSERT(crit_count[cpu] >= 0);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,6 @@ extern void criticalregion_enter(void);
|
||||
extern void criticalregion_exit(void);
|
||||
extern void ASSERT_no_criticalregion(void);
|
||||
extern void disable_criticalregion_checking(void);
|
||||
extern void enable_criticalregion_checking(void);
|
||||
|
||||
#define spin_lock(_lock) \
|
||||
do { criticalregion_enter(); _raw_spin_lock(_lock); } while (0)
|
||||
@@ -112,7 +111,6 @@ static inline int spin_trylock(spinlock_t *lock)
|
||||
|
||||
#define ASSERT_no_criticalregion() ((void)0)
|
||||
#define disable_criticalregion_checking() ((void)0)
|
||||
#define enable_criticalregion_checking() ((void)0)
|
||||
|
||||
#define spin_lock(_lock) _raw_spin_lock(_lock)
|
||||
#define spin_trylock(_lock) _raw_spin_trylock(_lock)
|
||||
|
||||