ia64/xen-unstable

changeset 2972:3c505be01ff1

bitkeeper revision 1.1159.170.20 (4196453bO-PrYERhRRpFAeXiVJP1Sw)

Remove redundant code and fix small bug in entry.S
author kaf24@freefall.cl.cam.ac.uk
date Sat Nov 13 17:32:43 2004 +0000 (2004-11-13)
parents 4d94e2b30873
children d0353c3d3ebd b902d48320c4
files xen/arch/x86/x86_32/entry.S xen/arch/x86/x86_32/mm.c xen/common/schedule.c
line diff
     1.1 --- a/xen/arch/x86/x86_32/entry.S	Sat Nov 13 17:17:59 2004 +0000
     1.2 +++ b/xen/arch/x86/x86_32/entry.S	Sat Nov 13 17:32:43 2004 +0000
     1.3 @@ -63,7 +63,7 @@
     1.4  #include <public/xen.h>
     1.5  
     1.6  #define GET_CURRENT(reg)   \
     1.7 -        movl $4096-4, reg; \
     1.8 +        movl $8192-4, reg; \
     1.9          orl  %esp, reg;    \
    1.10          andl $~3,reg;      \
    1.11          movl (reg),reg;
     2.1 --- a/xen/arch/x86/x86_32/mm.c	Sat Nov 13 17:17:59 2004 +0000
     2.2 +++ b/xen/arch/x86/x86_32/mm.c	Sat Nov 13 17:32:43 2004 +0000
     2.3 @@ -54,32 +54,8 @@ void __set_fixmap(enum fixed_addresses i
     2.4  }
     2.5  
     2.6  
     2.7 -static void __init fixrange_init(unsigned long start, 
     2.8 -                                 unsigned long end, 
     2.9 -                                 l2_pgentry_t *pg_base)
    2.10 -{
    2.11 -    l2_pgentry_t *l2e;
    2.12 -    int i;
    2.13 -    unsigned long vaddr, page;
    2.14 -
    2.15 -    vaddr = start;
    2.16 -    i = l2_table_offset(vaddr);
    2.17 -    l2e = pg_base + i;
    2.18 -
    2.19 -    for ( ; (i < ENTRIES_PER_L2_PAGETABLE) && (vaddr != end); l2e++, i++ ) 
    2.20 -    {
    2.21 -        if ( l2_pgentry_val(*l2e) != 0 )
    2.22 -            continue;
    2.23 -        page = (unsigned long)alloc_xenheap_page();
    2.24 -        clear_page(page);
    2.25 -        *l2e = mk_l2_pgentry(__pa(page) | __PAGE_HYPERVISOR);
    2.26 -        vaddr += 1 << L2_PAGETABLE_SHIFT;
    2.27 -    }
    2.28 -}
    2.29 -
    2.30  void __init paging_init(void)
    2.31  {
    2.32 -    unsigned long addr;
    2.33      void *ioremap_pt;
    2.34      int i;
    2.35  
    2.36 @@ -89,13 +65,6 @@ void __init paging_init(void)
    2.37              mk_l2_pgentry((i << L2_PAGETABLE_SHIFT) | 
    2.38                            __PAGE_HYPERVISOR | _PAGE_PSE);
    2.39  
    2.40 -    /*
    2.41 -     * Fixed mappings, only the page table structure has to be
    2.42 -     * created - mappings will be set by set_fixmap():
    2.43 -     */
    2.44 -    addr = FIXADDR_START & ~((1<<L2_PAGETABLE_SHIFT)-1);
    2.45 -    fixrange_init(addr, 0, idle_pg_table);
    2.46 -
    2.47      /* Create page table for ioremap(). */
    2.48      ioremap_pt = (void *)alloc_xenheap_page();
    2.49      clear_page(ioremap_pt);
     3.1 --- a/xen/common/schedule.c	Sat Nov 13 17:17:59 2004 +0000
     3.2 +++ b/xen/common/schedule.c	Sat Nov 13 17:32:43 2004 +0000
     3.3 @@ -56,13 +56,11 @@
     3.4  #define TRC_SCHED_S_TIMER_FN          0x0001000A
     3.5  #define TRC_SCHED_T_TIMER_FN          0x0001000B
     3.6  #define TRC_SCHED_DOM_TIMER_FN        0x0001000C
     3.7 -#define TRC_SCHED_FALLBACK_TIMER_FN   0x0001000D
     3.8  
     3.9  /* Various timer handlers. */
    3.10  static void s_timer_fn(unsigned long unused);
    3.11  static void t_timer_fn(unsigned long unused);
    3.12  static void dom_timer_fn(unsigned long data);
    3.13 -static void fallback_timer_fn(unsigned long unused);
    3.14  
    3.15  /* This is global for now so that private implementations can reach it */
    3.16  schedule_data_t schedule_data[NR_CPUS];
    3.17 @@ -87,12 +85,6 @@ static struct scheduler ops;
    3.18  /* Per-CPU periodic timer sends an event to the currently-executing domain. */
    3.19  static struct ac_timer t_timer[NR_CPUS]; 
    3.20  
    3.21 -/*
    3.22 - * Per-CPU timer which ensures that even guests with very long quantums get
    3.23 - * their time-of-day state updated often enough to avoid wrapping.
    3.24 - */
    3.25 -static struct ac_timer fallback_timer[NR_CPUS];
    3.26 -
    3.27  extern xmem_cache_t *domain_struct_cachep;
    3.28  
    3.29  void free_domain_struct(struct domain *d)
    3.30 @@ -428,7 +420,6 @@ int idle_cpu(int cpu)
    3.31   * - s_timer: per CPU timer for preemption and scheduling decisions
    3.32   * - t_timer: per CPU periodic timer to send timer interrupt to current dom
    3.33   * - dom_timer: per domain timer to specifiy timeout values
    3.34 - * - fallback_timer: safeguard to ensure time is up to date
    3.35   ****************************************************************************/
    3.36  
    3.37  /* The scheduler timer: force a run through the scheduler*/
    3.38 @@ -442,41 +433,27 @@ static void s_timer_fn(unsigned long unu
    3.39  /* Periodic tick timer: send timer event to current domain*/
    3.40  static void t_timer_fn(unsigned long unused)
    3.41  {
    3.42 -    struct domain *p = current;
    3.43 +    struct domain *d = current;
    3.44  
    3.45      TRACE_0D(TRC_SCHED_T_TIMER_FN);
    3.46  
    3.47 -    if ( !is_idle_task(p) ) {
    3.48 -        update_dom_time(p->shared_info);
    3.49 -        send_guest_virq(p, VIRQ_TIMER);
    3.50 +    if ( !is_idle_task(d) )
    3.51 +    {
    3.52 +        update_dom_time(d->shared_info);
    3.53 +        send_guest_virq(d, VIRQ_TIMER);
    3.54      }
    3.55  
    3.56 -    t_timer[p->processor].expires = NOW() + MILLISECS(10);
    3.57 -    add_ac_timer(&t_timer[p->processor]);
    3.58 +    t_timer[d->processor].expires = NOW() + MILLISECS(10);
    3.59 +    add_ac_timer(&t_timer[d->processor]);
    3.60  }
    3.61  
    3.62  /* Domain timer function, sends a virtual timer interrupt to domain */
    3.63  static void dom_timer_fn(unsigned long data)
    3.64  {
    3.65 -    struct domain *p = (struct domain *)data;
    3.66 +    struct domain *d = (struct domain *)data;
    3.67      TRACE_0D(TRC_SCHED_DOM_TIMER_FN);
    3.68 -    update_dom_time(p->shared_info);
    3.69 -    send_guest_virq(p, VIRQ_TIMER);
    3.70 -}
    3.71 -
    3.72 -
    3.73 -/* Fallback timer to ensure guests get time updated 'often enough'. */
    3.74 -static void fallback_timer_fn(unsigned long unused)
    3.75 -{
    3.76 -    struct domain *p = current;
    3.77 -
    3.78 -    TRACE_0D(TRC_SCHED_FALLBACK_TIMER_FN);
    3.79 -
    3.80 -    if ( !is_idle_task(p) )
    3.81 -        update_dom_time(p->shared_info);
    3.82 -
    3.83 -    fallback_timer[p->processor].expires = NOW() + MILLISECS(500);
    3.84 -    add_ac_timer(&fallback_timer[p->processor]);
    3.85 +    update_dom_time(d->shared_info);
    3.86 +    send_guest_virq(d, VIRQ_TIMER);
    3.87  }
    3.88  
    3.89  /* Initialise the data structures. */
    3.90 @@ -500,11 +477,6 @@ void __init scheduler_init(void)
    3.91          t_timer[i].cpu      = i;
    3.92          t_timer[i].data     = 3;
    3.93          t_timer[i].function = &t_timer_fn;
    3.94 -
    3.95 -        init_ac_timer(&fallback_timer[i]);
    3.96 -        fallback_timer[i].cpu      = i;
    3.97 -        fallback_timer[i].data     = 4;
    3.98 -        fallback_timer[i].function = &fallback_timer_fn;
    3.99      }
   3.100  
   3.101      schedule_data[0].idle = &idle0_task;
   3.102 @@ -538,9 +510,6 @@ void schedulers_start(void)
   3.103  
   3.104      t_timer_fn(0);
   3.105      smp_call_function((void *)t_timer_fn, NULL, 1, 1);
   3.106 -
   3.107 -    fallback_timer_fn(0);
   3.108 -    smp_call_function((void *)fallback_timer_fn, NULL, 1, 1);
   3.109  }
   3.110  
   3.111