ia64/xen-unstable

changeset 4777:8bb373c7b438

bitkeeper revision 1.1389.5.19 (427a4637g44Zsgumd50KMgMbI7bt2g)

Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
fixmap.h, pgtable.c:
Remove __set_fixmap_ma and handle difference in installing machine-address
and pseudo-physical-address fixmap entries inside __set_fixmap.
reboot.c, gnttab.c, ioremap.c:
Change set_fixmap_ma call to set_fixmap call.
init.c:
Change set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro call to
__set_fixmap(,, PAGE_KERNEL_RO) call.
boot.c:
Change __set_fixmap_ma calls to set_fixmap calls.
Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk[cl349]
date Thu May 05 16:13:43 2005 +0000 (2005-05-05)
parents 1fb7681bfe10
children f6bcd68a03f6
files linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h
line diff
     1.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c	Thu May 05 14:33:55 2005 +0000
     1.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c	Thu May 05 16:13:43 2005 +0000
     1.3 @@ -113,9 +113,8 @@ char *__acpi_map_table(unsigned long phy
     1.4  
     1.5  	j = PAGE_ALIGN(size) >> PAGE_SHIFT;
     1.6  	for (i = 0; (i < FIX_ACPI_PAGES) && j ; i++, j--) {
     1.7 -		__set_fixmap_ma(FIX_ACPI_END - i,
     1.8 -				(phys_addr & PAGE_MASK) + (i << PAGE_SHIFT),
     1.9 -				PAGE_KERNEL);
    1.10 +		set_fixmap(FIX_ACPI_END - i,
    1.11 +			   (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT));
    1.12  	}
    1.13  
    1.14  	return (char *) __fix_to_virt(FIX_ACPI_END) + (phys_addr & ~PAGE_MASK);
    1.15 @@ -658,7 +657,7 @@ acpi_find_rsdp (void)
    1.16  	if (!rsdp_phys)
    1.17  		rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
    1.18  
    1.19 -	__set_fixmap_ma(FIX_ACPI_RSDP_PAGE, rsdp_phys, PAGE_KERNEL);
    1.20 +	set_fixmap(FIX_ACPI_RSDP_PAGE, rsdp_phys);
    1.21  
    1.22  	return rsdp_phys;
    1.23  }
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c	Thu May 05 14:33:55 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c	Thu May 05 16:13:43 2005 +0000
     2.3 @@ -562,7 +562,7 @@ void __init paging_init(void)
     2.4  	zone_sizes_init();
     2.5  
     2.6  	/* Switch to the real shared_info page, and clear the dummy page. */
     2.7 -	set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
     2.8 +	set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
     2.9  	HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    2.10  	memset(empty_zero_page, 0, sizeof(empty_zero_page));
    2.11  
    2.12 @@ -570,10 +570,11 @@ void __init paging_init(void)
    2.13  	/* Setup mapping of lower 1st MB */
    2.14  	for (i = 0; i < NR_FIX_ISAMAPS; i++)
    2.15  		if (xen_start_info.flags & SIF_PRIVILEGED)
    2.16 -			set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
    2.17 +			set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
    2.18  		else
    2.19 -			set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i,
    2.20 -					 virt_to_machine(empty_zero_page));
    2.21 +			__set_fixmap(FIX_ISAMAP_BEGIN - i,
    2.22 +				     virt_to_machine(empty_zero_page),
    2.23 +				     PAGE_KERNEL_RO);
    2.24  #endif
    2.25  }
    2.26  
     3.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c	Thu May 05 14:33:55 2005 +0000
     3.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c	Thu May 05 16:13:43 2005 +0000
     3.3 @@ -256,7 +256,7 @@ void __init *bt_ioremap(unsigned long ph
     3.4  	 */
     3.5  	idx = FIX_BTMAP_BEGIN;
     3.6  	while (nrpages > 0) {
     3.7 -		set_fixmap_ma(idx, phys_addr);
     3.8 +		set_fixmap(idx, phys_addr);
     3.9  		phys_addr += PAGE_SIZE;
    3.10  		--idx;
    3.11  		--nrpages;
     4.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c	Thu May 05 14:33:55 2005 +0000
     4.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c	Thu May 05 16:13:43 2005 +0000
     4.3 @@ -176,18 +176,18 @@ void __set_fixmap (enum fixed_addresses 
     4.4  		BUG();
     4.5  		return;
     4.6  	}
     4.7 -	set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
     4.8 -}
     4.9 -
    4.10 -void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t flags)
    4.11 -{
    4.12 -	unsigned long address = __fix_to_virt(idx);
    4.13 -
    4.14 -	if (idx >= __end_of_fixed_addresses) {
    4.15 -		BUG();
    4.16 -		return;
    4.17 +	switch (idx) {
    4.18 +	case FIX_WP_TEST:
    4.19 +	case FIX_VSYSCALL:
    4.20 +#ifdef CONFIG_X86_F00F_BUG
    4.21 +	case FIX_F00F_IDT:
    4.22 +#endif
    4.23 +		set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
    4.24 +		break;
    4.25 +	default:
    4.26 +		set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
    4.27 +		break;
    4.28  	}
    4.29 -	set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
    4.30  }
    4.31  
    4.32  pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
     5.1 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c	Thu May 05 14:33:55 2005 +0000
     5.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c	Thu May 05 16:13:43 2005 +0000
     5.3 @@ -20,10 +20,6 @@
     5.4  #include <asm-xen/linux-public/privcmd.h>
     5.5  #include <asm-xen/gnttab.h>
     5.6  
     5.7 -#ifndef set_fixmap_ma
     5.8 -#define set_fixmap_ma set_fixmap
     5.9 -#endif
    5.10 -
    5.11  #if 1
    5.12  #define ASSERT(_p) \
    5.13      if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
    5.14 @@ -339,7 +335,7 @@ int gnttab_resume(void)
    5.15      BUG_ON(setup.status != 0);
    5.16  
    5.17      for ( i = 0; i < NR_GRANT_FRAMES; i++ )
    5.18 -        set_fixmap_ma(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
    5.19 +        set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
    5.20  
    5.21      return 0;
    5.22  }
     6.1 --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c	Thu May 05 14:33:55 2005 +0000
     6.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c	Thu May 05 16:13:43 2005 +0000
     6.3 @@ -129,11 +129,7 @@ static void __do_suspend(void)
     6.4      memcpy(&xen_start_info, &suspend_record->resume_info,
     6.5             sizeof(xen_start_info));
     6.6  
     6.7 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
     6.8 -    set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
     6.9 -#else
    6.10      set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
    6.11 -#endif
    6.12  
    6.13      HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
    6.14  
     7.1 --- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h	Thu May 05 14:33:55 2005 +0000
     7.2 +++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h	Thu May 05 16:13:43 2005 +0000
     7.3 @@ -104,20 +104,14 @@ enum fixed_addresses {
     7.4  
     7.5  extern void __set_fixmap (enum fixed_addresses idx,
     7.6  					unsigned long phys, pgprot_t flags);
     7.7 -extern void __set_fixmap_ma (enum fixed_addresses idx,
     7.8 -					unsigned long mach, pgprot_t flags);
     7.9  
    7.10  #define set_fixmap(idx, phys) \
    7.11  		__set_fixmap(idx, phys, PAGE_KERNEL)
    7.12 -#define set_fixmap_ma(idx, phys) \
    7.13 -		__set_fixmap_ma(idx, phys, PAGE_KERNEL)
    7.14 -#define set_fixmap_ma_ro(idx, phys) \
    7.15 -		__set_fixmap_ma(idx, phys, PAGE_KERNEL_RO)
    7.16  /*
    7.17   * Some hardware wants to get fixmapped without caching.
    7.18   */
    7.19  #define set_fixmap_nocache(idx, phys) \
    7.20 -		__set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE)
    7.21 +		__set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
    7.22  
    7.23  #define clear_fixmap(idx) \
    7.24  		__set_fixmap(idx, 0, __pgprot(0))