ia64/xen-unstable

changeset 1508:321dda020e93

bitkeeper revision 1.985 (40d54212AaOKN_5U41AzX44kVS3-7w)

Allow compilation of Xen with debug symbols.
author kaf24@scramble.cl.cam.ac.uk
date Sun Jun 20 07:51:46 2004 +0000 (2004-06-20)
parents b535339f6ed0
children 4fe70431c2d1
files xen/arch/x86/apic.c xen/arch/x86/mm.c xen/include/asm-x86/fixmap.h xen/include/asm-x86/io_apic.h
line diff
     1.1 --- a/xen/arch/x86/apic.c	Sat Jun 19 16:49:45 2004 +0000
     1.2 +++ b/xen/arch/x86/apic.c	Sun Jun 20 07:51:46 2004 +0000
     1.3 @@ -470,7 +470,7 @@ void __init init_apic_mappings(void)
     1.4                  ioapic_phys = mp_ioapics[i].mpc_apicaddr;
     1.5              set_fixmap_nocache(idx, ioapic_phys);
     1.6              Dprintk("mapped IOAPIC to %08lx (%08lx)\n",
     1.7 -                    __fix_to_virt(idx), ioapic_phys);
     1.8 +                    fix_to_virt(idx), ioapic_phys);
     1.9              idx++;
    1.10          }
    1.11      }
     2.1 --- a/xen/arch/x86/mm.c	Sat Jun 19 16:49:45 2004 +0000
     2.2 +++ b/xen/arch/x86/mm.c	Sun Jun 20 07:51:46 2004 +0000
     2.3 @@ -45,7 +45,7 @@ static inline void set_pte_phys(unsigned
     2.4  void __set_fixmap(enum fixed_addresses idx, 
     2.5                    l1_pgentry_t entry)
     2.6  {
     2.7 -    unsigned long address = __fix_to_virt(idx);
     2.8 +    unsigned long address = fix_to_virt(idx);
     2.9  
    2.10      if ( likely(idx < __end_of_fixed_addresses) )
    2.11          set_pte_phys(address, entry);
     3.1 --- a/xen/include/asm-x86/fixmap.h	Sat Jun 19 16:49:45 2004 +0000
     3.2 +++ b/xen/include/asm-x86/fixmap.h	Sun Jun 20 07:51:46 2004 +0000
     3.3 @@ -6,8 +6,7 @@
     3.4   * for more details.
     3.5   *
     3.6   * Copyright (C) 1998 Ingo Molnar
     3.7 - *
     3.8 - * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
     3.9 + * Modifications for Xen are copyright (c) 2002-2004, K A Fraser
    3.10   */
    3.11  
    3.12  #ifndef _ASM_FIXMAP_H
    3.13 @@ -22,91 +21,37 @@
    3.14   * Here we define all the compile-time 'special' virtual
    3.15   * addresses. The point is to have a constant address at
    3.16   * compile time, but to set the physical address only
    3.17 - * in the boot process. We allocate these special  addresses
    3.18 - * from the end of virtual memory (0xfffff000) backwards.
    3.19 - * Also this lets us do fail-safe vmalloc(), we
    3.20 - * can guarantee that these special addresses and
    3.21 - * vmalloc()-ed addresses never overlap.
    3.22 - *
    3.23 - * these 'compile-time allocated' memory buffers are
    3.24 - * fixed-size 4k pages. (or larger if used with an increment
    3.25 - * highger than 1) use fixmap_set(idx,phys) to associate
    3.26 - * physical memory with fixmap indices.
    3.27 - *
    3.28 - * TLB entries of such buffers will not be flushed across
    3.29 - * task switches.
    3.30 - */
    3.31 -
    3.32 -/*
    3.33 - * on UP currently we will have no trace of the fixmap mechanizm,
    3.34 - * no page table allocations, etc. This might change in the
    3.35 - * future, say framebuffers for the console driver(s) could be
    3.36 - * fix-mapped?
    3.37 + * in the boot process. We allocate these special addresses
    3.38 + * from the end of virtual memory backwards.
    3.39   */
    3.40  enum fixed_addresses {
    3.41  #ifdef CONFIG_X86_LOCAL_APIC
    3.42 -	FIX_APIC_BASE,	/* local (CPU) APIC) -- required for SMP or not */
    3.43 +    FIX_APIC_BASE,	/* local (CPU) APIC) -- required for SMP or not */
    3.44  #endif
    3.45  #ifdef CONFIG_X86_IO_APIC
    3.46 -	FIX_IO_APIC_BASE_0,
    3.47 -	FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
    3.48 -#endif
    3.49 -#ifdef CONFIG_HIGHMEM
    3.50 -	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
    3.51 -	FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
    3.52 +    FIX_IO_APIC_BASE_0,
    3.53 +    FIX_IO_APIC_BASE_END = FIX_IO_APIC_BASE_0 + MAX_IO_APICS-1,
    3.54  #endif
    3.55  #ifdef CONFIG_ACPI_BOOT
    3.56 -	FIX_ACPI_BEGIN,
    3.57 -	FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
    3.58 +    FIX_ACPI_BEGIN,
    3.59 +    FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1,
    3.60  #endif
    3.61 -	__end_of_fixed_addresses
    3.62 +    __end_of_fixed_addresses
    3.63  };
    3.64  
    3.65 -extern void __set_fixmap (enum fixed_addresses idx,
    3.66 -                          l1_pgentry_t entry);
    3.67 +#define FIXADDR_TOP   (0xffffe000UL)
    3.68 +#define FIXADDR_SIZE  (__end_of_fixed_addresses << PAGE_SHIFT)
    3.69 +#define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE)
    3.70 +
    3.71 +extern void __set_fixmap(enum fixed_addresses idx,
    3.72 +                         l1_pgentry_t entry);
    3.73  
    3.74  #define set_fixmap(idx, phys) \
    3.75 -		__set_fixmap(idx, mk_l1_pgentry(phys|PAGE_HYPERVISOR))
    3.76 -/*
    3.77 - * Some hardware wants to get fixmapped without caching.
    3.78 - */
    3.79 -#define set_fixmap_nocache(idx, phys) \
    3.80 -		__set_fixmap(idx, mk_l1_pgentry(phys|PAGE_HYPERVISOR_NOCACHE))
    3.81 -/*
    3.82 - * used by vmalloc.c.
    3.83 - *
    3.84 - * Leave one empty page between vmalloc'ed areas and
    3.85 - * the start of the fixmap, and leave one page empty
    3.86 - * at the top of mem..
    3.87 - */
    3.88 -#define FIXADDR_TOP	(0xffffe000UL)
    3.89 -#define FIXADDR_SIZE	(__end_of_fixed_addresses << PAGE_SHIFT)
    3.90 -#define FIXADDR_START	(FIXADDR_TOP - FIXADDR_SIZE)
    3.91 -
    3.92 -#define __fix_to_virt(x)	(FIXADDR_TOP - ((x) << PAGE_SHIFT))
    3.93 -
    3.94 -extern void __this_fixmap_does_not_exist(void);
    3.95 +    __set_fixmap(idx, mk_l1_pgentry(phys|PAGE_HYPERVISOR))
    3.96  
    3.97 -/*
    3.98 - * 'index to address' translation. If anyone tries to use the idx
    3.99 - * directly without tranlation, we catch the bug with a NULL-deference
   3.100 - * kernel oops. Illegal ranges of incoming indices are caught too.
   3.101 - */
   3.102 -static inline unsigned long fix_to_virt(const unsigned int idx)
   3.103 -{
   3.104 -	/*
   3.105 -	 * this branch gets completely eliminated after inlining,
   3.106 -	 * except when someone tries to use fixaddr indices in an
   3.107 -	 * illegal way. (such as mixing up address types or using
   3.108 -	 * out-of-range indices).
   3.109 -	 *
   3.110 -	 * If it doesn't get removed, the linker will complain
   3.111 -	 * loudly with a reasonably clear error message..
   3.112 -	 */
   3.113 -	if (idx >= __end_of_fixed_addresses)
   3.114 -		__this_fixmap_does_not_exist();
   3.115 +#define set_fixmap_nocache(idx, phys) \
   3.116 +    __set_fixmap(idx, mk_l1_pgentry(phys|PAGE_HYPERVISOR_NOCACHE))
   3.117  
   3.118 -        return __fix_to_virt(idx);
   3.119 -}
   3.120 +#define fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
   3.121  
   3.122  #endif
     4.1 --- a/xen/include/asm-x86/io_apic.h	Sat Jun 19 16:49:45 2004 +0000
     4.2 +++ b/xen/include/asm-x86/io_apic.h	Sun Jun 20 07:51:46 2004 +0000
     4.3 @@ -15,7 +15,7 @@
     4.4  #define APIC_MISMATCH_DEBUG
     4.5  
     4.6  #define IO_APIC_BASE(idx) \
     4.7 -		((volatile int *)(__fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
     4.8 +		((volatile int *)(fix_to_virt(FIX_IO_APIC_BASE_0 + idx) \
     4.9  		+ (mp_ioapics[idx].mpc_apicaddr & ~PAGE_MASK)))
    4.10  
    4.11  /*