direct-io.hg

changeset 7986:cd6a8d73f529

Clean up use of get_pfn_from_mfn().

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Nov 23 13:54:40 2005 +0100 (2005-11-23)
parents 944cf29d126d
children 17b98e15bf78
files xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_32/traps.c
line diff
     1.1 --- a/xen/arch/x86/x86_32/mm.c	Wed Nov 23 13:50:14 2005 +0100
     1.2 +++ b/xen/arch/x86/x86_32/mm.c	Wed Nov 23 13:54:40 2005 +0100
     1.3 @@ -107,7 +107,8 @@ void __init paging_init(void)
     1.4              l2e_from_page(pg, (__PAGE_HYPERVISOR | _PAGE_PSE) & ~_PAGE_RW);
     1.5      }
     1.6  
     1.7 -    for ( i = 0; i < max_page; i++)
     1.8 +    /* Fill with an obvious debug pattern. */
     1.9 +    for ( i = 0; i < (mpt_size / BYTES_PER_LONG); i++)
    1.10          set_pfn_from_mfn(i, 0x55555555);
    1.11  
    1.12      /* Create page tables for ioremap(). */
     2.1 --- a/xen/arch/x86/x86_32/traps.c	Wed Nov 23 13:50:14 2005 +0100
     2.2 +++ b/xen/arch/x86/x86_32/traps.c	Wed Nov 23 13:54:40 2005 +0100
     2.3 @@ -93,7 +93,7 @@ void show_page_walk(unsigned long addr)
     2.4  #ifdef CONFIG_X86_PAE
     2.5      ptab = map_domain_page(mfn);
     2.6      ent  = ptab[l3_table_offset(addr)];
     2.7 -    pfn  = machine_to_phys_mapping[(u32)(ent >> PAGE_SHIFT)]; 
     2.8 +    pfn  = get_pfn_from_mfn((u32)(ent >> PAGE_SHIFT)); 
     2.9      printk(" L3 = %"PRIpte" %08lx\n", ent, pfn);
    2.10      unmap_domain_page(ptab);
    2.11      if ( !(ent & _PAGE_PRESENT) )
    2.12 @@ -103,7 +103,7 @@ void show_page_walk(unsigned long addr)
    2.13  
    2.14      ptab = map_domain_page(mfn);
    2.15      ent  = ptab[l2_table_offset(addr)];
    2.16 -    pfn  = get_pfn_from_mfn(ent >> PAGE_SHIFT);
    2.17 +    pfn  = get_pfn_from_mfn((u32)(ent >> PAGE_SHIFT));
    2.18      printk("  L2 = %"PRIpte" %08lx %s\n", ent, pfn, 
    2.19             (ent & _PAGE_PSE) ? "(PSE)" : "");
    2.20      unmap_domain_page(ptab);
    2.21 @@ -113,7 +113,7 @@ void show_page_walk(unsigned long addr)
    2.22  
    2.23      ptab = map_domain_page(ent >> PAGE_SHIFT);
    2.24      ent  = ptab[l1_table_offset(addr)];
    2.25 -    pfn  = get_pfn_from_mfn(ent >> PAGE_SHIFT);
    2.26 +    pfn  = get_pfn_from_mfn((u32)(ent >> PAGE_SHIFT));
    2.27      printk("   L1 = %"PRIpte" %08lx\n", ent, pfn);
    2.28      unmap_domain_page(ptab);
    2.29  }