ia64/xen-unstable

changeset 7108:07cc64b3bf86

Merged.
author emellor@ewan
date Wed Sep 28 15:03:00 2005 +0100 (2005-09-28)
parents af12cff417fd
children 1d74fff611c8
files linux-2.6-xen-sparse/arch/xen/configs/xen_defconfig_x86_32 linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c
line diff
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c	Wed Sep 28 15:02:42 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/fault.c	Wed Sep 28 15:03:00 2005 +0100
     2.3 @@ -209,7 +209,10 @@ static void dump_fault_path(unsigned lon
     2.4  {
     2.5  	unsigned long *p, page;
     2.6  
     2.7 -        page = __pa(per_cpu(cur_pgd, smp_processor_id()));
     2.8 +	preempt_disable();
     2.9 +	page = __pa(per_cpu(cur_pgd, smp_processor_id()));
    2.10 +	preempt_enable();
    2.11 +
    2.12  	p  = (unsigned long *)__va(page);
    2.13  	p += (address >> 30) * 2;
    2.14  	printk(KERN_ALERT "%08lx -> *pde = %08lx:%08lx\n", page, p[1], p[0]);
    2.15 @@ -237,8 +240,13 @@ static void dump_fault_path(unsigned lon
    2.16  {
    2.17  	unsigned long page;
    2.18  
    2.19 +	preempt_disable();
    2.20  	page = ((unsigned long *) per_cpu(cur_pgd, smp_processor_id()))
    2.21  	    [address >> 22];
    2.22 +	preempt_enable();
    2.23 +
    2.24 +	page = ((unsigned long *) per_cpu(cur_pgd, get_cpu()))
    2.25 +	    [address >> 22];
    2.26  	printk(KERN_ALERT "*pde = ma %08lx pa %08lx\n", page,
    2.27  	       machine_to_phys(page));
    2.28  	/*
    2.29 @@ -567,7 +575,9 @@ vmalloc_fault:
    2.30  		pmd_t *pmd, *pmd_k;
    2.31  		pte_t *pte_k;
    2.32  
    2.33 +		preempt_disable();
    2.34  		pgd = index + per_cpu(cur_pgd, smp_processor_id());
    2.35 +		preempt_enable();
    2.36  		pgd_k = init_mm.pgd + index;
    2.37  
    2.38  		if (!pgd_present(*pgd_k))
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c	Wed Sep 28 15:02:42 2005 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/fault.c	Wed Sep 28 15:03:00 2005 +0100
     3.3 @@ -149,7 +149,9 @@ void dump_pagetable(unsigned long addres
     3.4  	pmd_t *pmd;
     3.5  	pte_t *pte;
     3.6  
     3.7 +	preempt_disable();
     3.8  	pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id());
     3.9 +	preempt_enable();
    3.10  	pgd += pgd_index(address);
    3.11  
    3.12  	printk("PGD %lx ", pgd_val(*pgd));
    3.13 @@ -252,7 +254,9 @@ static int vmalloc_fault(unsigned long a
    3.14  
    3.15  	/* On Xen the line below does not always work. Needs investigating! */
    3.16  	/*pgd = pgd_offset(current->mm ?: &init_mm, address);*/
    3.17 +	preempt_disable();
    3.18  	pgd = (pgd_t *)per_cpu(cur_pgd, smp_processor_id());
    3.19 +	preempt_enable();
    3.20  	pgd += pgd_index(address);
    3.21  
    3.22  	pgd_ref = pgd_offset_k(address);