ia64/xen-unstable

changeset 4778:f6bcd68a03f6

bitkeeper revision 1.1389.5.20 (427a4dcf057tQfMOhrkAUtc9VOgOyw)

Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
fixmap.h:
Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
ioremap.c:
Change set_fixmap_ma call to set_fixmap call.
init.c:
Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
Change __set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro call
to __set_fixmap(,, PAGE_KERNEL_RO) call.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu May 05 16:46:07 2005 +0000 (2005-05-05)
parents 8bb373c7b438
children 49599761f3ce
files linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c	Thu May 05 16:13:43 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c	Thu May 05 16:46:07 2005 +0000
     1.3 @@ -361,7 +361,14 @@ void __set_fixmap (enum fixed_addresses 
     1.4  		printk("Invalid __set_fixmap\n");
     1.5  		return;
     1.6  	}
     1.7 -	set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
     1.8 +	switch (idx) {
     1.9 +	case VSYSCALL_FIRST_PAGE:
    1.10 +		set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
    1.11 +		break;
    1.12 +	default:
    1.13 +		set_pte_phys_ma(address, phys, prot);
    1.14 +		break;
    1.15 +	}
    1.16  }
    1.17  
    1.18  
    1.19 @@ -414,18 +421,6 @@ void __set_fixmap_user (enum fixed_addre
    1.20  
    1.21  }
    1.22  
    1.23 -
    1.24 -void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t prot)
    1.25 -{ 
    1.26 -	unsigned long address = __fix_to_virt(idx);
    1.27 -
    1.28 -	if (idx >= __end_of_fixed_addresses) {
    1.29 -		printk("Invalid __set_fixmap\n");
    1.30 -		return;
    1.31 -	}
    1.32 -	set_pte_phys_ma(address, phys, prot);
    1.33 -}
    1.34 -
    1.35  unsigned long __initdata table_start, table_end, tables_reserved; 
    1.36  
    1.37  #if 0
    1.38 @@ -632,8 +627,7 @@ void __init paging_init(void)
    1.39  		free_area_init(zones_size);
    1.40  	}
    1.41  
    1.42 -        __set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info, 
    1.43 -                        __pgprot(_KERNPG_TABLE));
    1.44 +        set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
    1.45          HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    1.46  
    1.47          memset(empty_zero_page, 0, sizeof(empty_zero_page));
    1.48 @@ -642,11 +636,11 @@ void __init paging_init(void)
    1.49          /* Setup mapping of lower 1st MB */
    1.50          for (i = 0; i < NR_FIX_ISAMAPS; i++)
    1.51                  if (xen_start_info.flags & SIF_PRIVILEGED)
    1.52 -                        __set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE,
    1.53 -                                __pgprot(_KERNPG_TABLE));
    1.54 +                        set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
    1.55                  else
    1.56 -                        set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i,
    1.57 -                                         virt_to_machine(empty_zero_page));
    1.58 +                        __set_fixmap(FIX_ISAMAP_BEGIN - i,
    1.59 +				     virt_to_machine(empty_zero_page),
    1.60 +				     PAGE_KERNEL_RO);
    1.61  #endif
    1.62  
    1.63  }
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c	Thu May 05 16:13:43 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c	Thu May 05 16:46:07 2005 +0000
     2.3 @@ -273,7 +273,7 @@ void __init *bt_ioremap(unsigned long ph
     2.4  	 */
     2.5  	idx = FIX_BTMAP_BEGIN;
     2.6  	while (nrpages > 0) {
     2.7 -		set_fixmap_ma(idx, phys_addr);
     2.8 +		set_fixmap(idx, phys_addr);
     2.9  		phys_addr += PAGE_SIZE;
    2.10  		--idx;
    2.11  		--nrpages;
     3.1 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h	Thu May 05 16:13:43 2005 +0000
     3.2 +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h	Thu May 05 16:46:07 2005 +0000
     3.3 @@ -60,22 +60,13 @@ enum fixed_addresses {
     3.4  extern void __set_fixmap (enum fixed_addresses idx,
     3.5  					unsigned long phys, pgprot_t flags);
     3.6  
     3.7 -extern void __set_fixmap_ma (enum fixed_addresses idx,
     3.8 -					unsigned long mach, pgprot_t flags);
     3.9 -
    3.10  #define set_fixmap(idx, phys) \
    3.11  		__set_fixmap(idx, phys, PAGE_KERNEL)
    3.12 -
    3.13 -#define set_fixmap_ma(idx, phys) \
    3.14 -		__set_fixmap_ma(idx, phys, PAGE_KERNEL)
    3.15 -#define set_fixmap_ma_ro(idx, phys) \
    3.16 -		__set_fixmap_ma(idx, phys, PAGE_KERNEL_RO)
    3.17 -
    3.18  /*
    3.19   * Some hardware wants to get fixmapped without caching.
    3.20   */
    3.21  #define set_fixmap_nocache(idx, phys) \
    3.22 -		__set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE)
    3.23 +		__set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
    3.24  
    3.25  #define clear_fixmap(idx) \
    3.26                  __set_fixmap(idx, 0, __pgprot(0))