[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] No side effects in BUG_ON statements in Xen.
# HG changeset patch # User kaf24@xxxxxxxxxxxxxxxxxxxx # Node ID 6d4caa5a2cdbda649f81a839aedc3cb9c3db47a6 # Parent c5cd971aa96c166d2780cb3e284267c07e36fb47 No side effects in BUG_ON statements in Xen. Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> diff -r c5cd971aa96c -r 6d4caa5a2cdb xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Thu Oct 27 16:47:53 2005 +++ b/xen/arch/x86/mm.c Thu Oct 27 17:21:57 2005 @@ -1164,6 +1164,7 @@ { l3_pgentry_t ol3e; unsigned long vaddr; + int okay; if ( unlikely(!is_guest_l3_slot(pgentry_ptr_to_slot(pl3e))) ) { @@ -1218,7 +1219,9 @@ return 0; } - BUG_ON(!create_pae_xen_mappings(pl3e)); + okay = create_pae_xen_mappings(pl3e); + BUG_ON(!okay); + put_page_from_l3e(ol3e, pfn); return 1; } diff -r c5cd971aa96c -r 6d4caa5a2cdb xen/arch/x86/time.c --- a/xen/arch/x86/time.c Thu Oct 27 16:47:53 2005 +++ b/xen/arch/x86/time.c Thu Oct 27 17:21:57 2005 @@ -323,7 +323,7 @@ return pit_counter64 + (u16)(pit_stamp - pit_read_counter()); } -static int init_pit(void) +static void init_pit(void) { read_platform_count = read_pit_count; @@ -333,8 +333,6 @@ printk("Platform timer is %s PIT\n", freq_string(CLOCK_TICK_RATE)); using_pit = 1; - - return 1; } /************************************************************ @@ -563,7 +561,7 @@ static void init_platform_timer(void) { if ( !init_cyclone() && !init_hpet() ) - BUG_ON(!init_pit()); + init_pit(); } diff -r c5cd971aa96c -r 6d4caa5a2cdb xen/common/schedule.c --- a/xen/common/schedule.c Thu Oct 27 16:47:53 2005 +++ b/xen/common/schedule.c Thu Oct 27 17:21:57 2005 @@ -514,7 +514,7 @@ /* Initialise the data structures. */ void __init scheduler_init(void) { - int i; + int i, rc; open_softirq(SCHEDULE_SOFTIRQ, __enter_scheduler); @@ -540,7 +540,9 @@ printk("Using scheduler: %s (%s)\n", ops.name, ops.opt_name); - BUG_ON(SCHED_OP(alloc_task, idle_task[0]) < 0); + rc = SCHED_OP(alloc_task, idle_task[0]); + BUG_ON(rc < 0); + sched_add_domain(idle_task[0]); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |