direct-io.hg

changeset 7512:6d4caa5a2cdb

No side effects in BUG_ON statements in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Oct 27 18:21:57 2005 +0100 (2005-10-27)
parents c5cd971aa96c
children f23b897930d1
files xen/arch/x86/mm.c xen/arch/x86/time.c xen/common/schedule.c
line diff
     1.1 --- a/xen/arch/x86/mm.c	Thu Oct 27 17:47:53 2005 +0100
     1.2 +++ b/xen/arch/x86/mm.c	Thu Oct 27 18:21:57 2005 +0100
     1.3 @@ -1164,6 +1164,7 @@ static int mod_l3_entry(l3_pgentry_t *pl
     1.4  {
     1.5      l3_pgentry_t ol3e;
     1.6      unsigned long vaddr;
     1.7 +    int okay;
     1.8  
     1.9      if ( unlikely(!is_guest_l3_slot(pgentry_ptr_to_slot(pl3e))) )
    1.10      {
    1.11 @@ -1218,7 +1219,9 @@ static int mod_l3_entry(l3_pgentry_t *pl
    1.12          return 0;
    1.13      }
    1.14  
    1.15 -    BUG_ON(!create_pae_xen_mappings(pl3e));
    1.16 +    okay = create_pae_xen_mappings(pl3e);
    1.17 +    BUG_ON(!okay);
    1.18 +
    1.19      put_page_from_l3e(ol3e, pfn);
    1.20      return 1;
    1.21  }
     2.1 --- a/xen/arch/x86/time.c	Thu Oct 27 17:47:53 2005 +0100
     2.2 +++ b/xen/arch/x86/time.c	Thu Oct 27 18:21:57 2005 +0100
     2.3 @@ -323,7 +323,7 @@ static u64 read_pit_count(void)
     2.4      return pit_counter64 + (u16)(pit_stamp - pit_read_counter());
     2.5  }
     2.6  
     2.7 -static int init_pit(void)
     2.8 +static void init_pit(void)
     2.9  {
    2.10      read_platform_count = read_pit_count;
    2.11  
    2.12 @@ -333,8 +333,6 @@ static int init_pit(void)
    2.13  
    2.14      printk("Platform timer is %s PIT\n", freq_string(CLOCK_TICK_RATE));
    2.15      using_pit = 1;
    2.16 -
    2.17 -    return 1;
    2.18  }
    2.19  
    2.20  /************************************************************
    2.21 @@ -563,7 +561,7 @@ static void platform_time_calibration(vo
    2.22  static void init_platform_timer(void)
    2.23  {
    2.24      if ( !init_cyclone() && !init_hpet() )
    2.25 -        BUG_ON(!init_pit());
    2.26 +        init_pit();
    2.27  }
    2.28  
    2.29  
     3.1 --- a/xen/common/schedule.c	Thu Oct 27 17:47:53 2005 +0100
     3.2 +++ b/xen/common/schedule.c	Thu Oct 27 18:21:57 2005 +0100
     3.3 @@ -514,7 +514,7 @@ static void dom_timer_fn(void *data)
     3.4  /* Initialise the data structures. */
     3.5  void __init scheduler_init(void)
     3.6  {
     3.7 -    int i;
     3.8 +    int i, rc;
     3.9  
    3.10      open_softirq(SCHEDULE_SOFTIRQ, __enter_scheduler);
    3.11  
    3.12 @@ -540,7 +540,9 @@ void __init scheduler_init(void)
    3.13  
    3.14      printk("Using scheduler: %s (%s)\n", ops.name, ops.opt_name);
    3.15  
    3.16 -    BUG_ON(SCHED_OP(alloc_task, idle_task[0]) < 0);
    3.17 +    rc = SCHED_OP(alloc_task, idle_task[0]);
    3.18 +    BUG_ON(rc < 0);
    3.19 +
    3.20      sched_add_domain(idle_task[0]);
    3.21  }
    3.22