ia64/xen-unstable

changeset 7774:5aa93e3c2a22

Fix page-table dump on PAE with >4GB MFNs.

Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Thu Nov 10 19:32:09 2005 +0100 (2005-11-10)
parents 476d02c1346c
children b9e8654c3f10
files linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c	Thu Nov 10 18:25:27 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c	Thu Nov 10 19:32:09 2005 +0100
     1.3 @@ -208,6 +208,7 @@ fastcall void do_invalid_op(struct pt_re
     1.4  static void dump_fault_path(unsigned long address)
     1.5  {
     1.6  	unsigned long *p, page;
     1.7 +        unsigned long mfn; 
     1.8  
     1.9  	preempt_disable();
    1.10  	page = __pa(per_cpu(cur_pgd, smp_processor_id()));
    1.11 @@ -217,20 +218,22 @@ static void dump_fault_path(unsigned lon
    1.12  	p += (address >> 30) * 2;
    1.13  	printk(KERN_ALERT "%08lx -> *pde = %08lx:%08lx\n", page, p[1], p[0]);
    1.14  	if (p[0] & 1) {
    1.15 -		page = p[0] & PAGE_MASK;
    1.16 +                mfn  = (p[0] >> PAGE_SHIFT) | ((p[1] & 0x7) << 20); 
    1.17 +		page = mfn_to_pfn(mfn) << PAGE_SHIFT; 
    1.18 +		p  = (unsigned long *)__va(page);
    1.19  		address &= 0x3fffffff;
    1.20 -		page = machine_to_phys(page);
    1.21 -		p  = (unsigned long *)__va(page);
    1.22  		p += (address >> 21) * 2;
    1.23 -		printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n", page, p[1], p[0]);
    1.24 +		printk(KERN_ALERT "%08lx -> *pme = %08lx:%08lx\n", 
    1.25 +                       page, p[1], p[0]);
    1.26  #ifndef CONFIG_HIGHPTE
    1.27  		if (p[0] & 1) {
    1.28 -			page = p[0] & PAGE_MASK;
    1.29 -			address &= 0x001fffff;
    1.30 -			page = machine_to_phys(page);
    1.31 -			p  = (unsigned long *) __va(page);
    1.32 -			p += (address >> 12) * 2;
    1.33 -			printk(KERN_ALERT "%08lx -> *pte = %08lx:%08lx\n", page, p[1], p[0]);
    1.34 +                        mfn  = (p[0] >> PAGE_SHIFT) | ((p[1] & 0x7) << 20); 
    1.35 +                        page = mfn_to_pfn(mfn) << PAGE_SHIFT; 
    1.36 +                        p  = (unsigned long *) __va(page);
    1.37 +                        address &= 0x001fffff;
    1.38 +                        p += (address >> 12) * 2;
    1.39 +			printk(KERN_ALERT "%08lx -> *pte = %08lx:%08lx\n", 
    1.40 +                               page, p[1], p[0]);
    1.41  		}
    1.42  #endif
    1.43  	}