ia64/xen-unstable

changeset 3711:045b1c9e9f1b

bitkeeper revision 1.1159.248.1 (42081fedCWYqmUmFHfXFmy6z8jqp3w)


Some cleanups:

- Use ENTRIES_PER_L1_PAGETABLE instead of ENTRIES_PER_L2_PAGETABLE
- Use PAGE_SHIFT instead of L1_PAGETABLE_SHIFT

Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: ian@xensource.com
author iap10@labyrinth.cl.cam.ac.uk
date Tue Feb 08 02:11:57 2005 +0000 (2005-02-08)
parents 9e80fc0dcac5
children 0703289cadc8
files xen/arch/x86/domain.c
line diff
     1.1 --- a/xen/arch/x86/domain.c	Tue Feb 08 01:04:49 2005 +0000
     1.2 +++ b/xen/arch/x86/domain.c	Tue Feb 08 02:11:57 2005 +0000
     1.3 @@ -312,14 +312,14 @@ static void monitor_mk_pagetable(struct 
     1.4      ASSERT( mpfn_info ); 
     1.5  
     1.6      mpfn = (unsigned long) (mpfn_info - frame_table);
     1.7 -    mpl2e = (l2_pgentry_t *) map_domain_mem(mpfn << L1_PAGETABLE_SHIFT);
     1.8 +    mpl2e = (l2_pgentry_t *) map_domain_mem(mpfn << PAGE_SHIFT);
     1.9      memset(mpl2e, 0, PAGE_SIZE);
    1.10  
    1.11      memcpy(&mpl2e[DOMAIN_ENTRIES_PER_L2_PAGETABLE], 
    1.12             &idle_pg_table[DOMAIN_ENTRIES_PER_L2_PAGETABLE],
    1.13             HYPERVISOR_ENTRIES_PER_L2_PAGETABLE * sizeof(l2_pgentry_t));
    1.14  
    1.15 -    ed->arch.monitor_table = mk_pagetable(mpfn << L1_PAGETABLE_SHIFT);
    1.16 +    ed->arch.monitor_table = mk_pagetable(mpfn << PAGE_SHIFT);
    1.17      d->arch.shadow_mode = SHM_full_32;
    1.18  
    1.19      mpl2e[PERDOMAIN_VIRT_START >> L2_PAGETABLE_SHIFT] =
    1.20 @@ -329,7 +329,7 @@ static void monitor_mk_pagetable(struct 
    1.21      phys_table = (l2_pgentry_t *) map_domain_mem(pagetable_val(
    1.22                                          ed->arch.phys_table));
    1.23      memcpy(d->arch.mm_perdomain_pt, phys_table,
    1.24 -           ENTRIES_PER_L2_PAGETABLE * sizeof(l2_pgentry_t));
    1.25 +           ENTRIES_PER_L1_PAGETABLE * sizeof(l1_pgentry_t));
    1.26  
    1.27      unmap_domain_mem(phys_table);
    1.28      unmap_domain_mem(mpl2e);