ia64/xen-unstable

changeset 4822:036c7e34fdd8

bitkeeper revision 1.1389.1.38 (4280a91emqMbeh-MI6rgIPKcDwkBRA)

Merge firebug.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into firebug.cl.cam.ac.uk:/local/scratch/cl349/xen-unstable.bk
author cl349@firebug.cl.cam.ac.uk[cl349]
date Tue May 10 12:29:18 2005 +0000 (2005-05-10)
parents 754aa05abf61 bf186cdb8693
children 6d36a84988c8
files .rootkeys xen/arch/x86/io_apic.c xen/arch/x86/mpparse.c xen/arch/x86/mtrr/main.c xen/arch/x86/setup.c xen/arch/x86/traps.c xen/arch/x86/x86_32/asm-offsets.c xen/arch/x86/x86_32/mm.c xen/arch/x86/x86_64/mm.c xen/include/asm-x86/fixmap.h xen/include/asm-x86/pci.h xen/include/xen/pci.h
line diff
     1.1 --- a/.rootkeys	Tue May 10 10:20:50 2005 +0000
     1.2 +++ b/.rootkeys	Tue May 10 12:29:18 2005 +0000
     1.3 @@ -1378,7 +1378,6 @@ 3ddb79c2wa0dA_LGigxOelSGbJ284Q xen/inclu
     1.4  41aaf567Mi3OishhvrCtET1y-mxQBg xen/include/asm-x86/mtrr.h
     1.5  41a61536MFhNalgbVmYGXAhQsPTZNw xen/include/asm-x86/multicall.h
     1.6  3ddb79c3xjYnrv5t3VqYlR4tNEOl4Q xen/include/asm-x86/page.h
     1.7 -3ddb79c3ysKUbxZuwKBRK3WXU2TlEg xen/include/asm-x86/pci.h
     1.8  42422fb0FVX-TJkSvAXnbfwMf19XFA xen/include/asm-x86/physdev.h
     1.9  3ddb79c2QF5-pZGzuX4QukPCDAl59A xen/include/asm-x86/processor.h
    1.10  40cf1596bim9F9DNdV75klgRSZ6Y2A xen/include/asm-x86/regs.h
     2.1 --- a/xen/arch/x86/io_apic.c	Tue May 10 10:20:50 2005 +0000
     2.2 +++ b/xen/arch/x86/io_apic.c	Tue May 10 12:29:18 2005 +0000
     2.3 @@ -1233,7 +1233,6 @@ static inline void UNEXPECTED_IO_APIC(vo
     2.4  
     2.5  void __init print_IO_APIC(void)
     2.6  {
     2.7 -#ifndef NDEBUG
     2.8  	int apic, i;
     2.9  	union IO_APIC_reg_00 reg_00;
    2.10  	union IO_APIC_reg_01 reg_01;
    2.11 @@ -1377,7 +1376,7 @@ void __init print_IO_APIC(void)
    2.12  	}
    2.13  
    2.14  	printk(KERN_INFO ".................................... done.\n");
    2.15 -#endif /* !NDEBUG */
    2.16 +
    2.17  	return;
    2.18  }
    2.19  
    2.20 @@ -1830,26 +1829,6 @@ static struct hw_interrupt_type lapic_ir
    2.21  	.end 		= end_lapic_irq
    2.22  };
    2.23  
    2.24 -#if 0
    2.25 -static void setup_nmi (void)
    2.26 -{
    2.27 -	/*
    2.28 - 	 * Dirty trick to enable the NMI watchdog ...
    2.29 -	 * We put the 8259A master into AEOI mode and
    2.30 -	 * unmask on all local APICs LVT0 as NMI.
    2.31 -	 *
    2.32 -	 * The idea to use the 8259A in AEOI mode ('8259A Virtual Wire')
    2.33 -	 * is from Maciej W. Rozycki - so we do not have to EOI from
    2.34 -	 * the NMI handler or the timer interrupt.
    2.35 -	 */ 
    2.36 -	apic_printk(APIC_VERBOSE, KERN_INFO "activating NMI Watchdog ...");
    2.37 -
    2.38 -	on_each_cpu(enable_NMI_through_LVT0, NULL, 1, 1);
    2.39 -
    2.40 -	apic_printk(APIC_VERBOSE, " done.\n");
    2.41 -}
    2.42 -#endif
    2.43 -
    2.44  /*
    2.45   * This looks a bit hackish but it's about the only one way of sending
    2.46   * a few INTA cycles to 8259As and any associated glue logic.  ICR does
    2.47 @@ -1953,14 +1932,6 @@ static inline void check_timer(void)
    2.48  		 */
    2.49  		unmask_IO_APIC_irq(0);
    2.50  		if (timer_irq_works()) {
    2.51 -#if 0
    2.52 -			if (nmi_watchdog == NMI_IO_APIC) {
    2.53 -				disable_8259A_irq(0);
    2.54 -				setup_nmi();
    2.55 -				enable_8259A_irq(0);
    2.56 -				check_nmi_watchdog();
    2.57 -			}
    2.58 -#endif
    2.59  			return;
    2.60  		}
    2.61  		clear_IO_APIC_pin(0, pin1);
    2.62 @@ -1980,12 +1951,6 @@ static inline void check_timer(void)
    2.63  				replace_pin_at_irq(0, 0, pin1, 0, pin2);
    2.64  			else
    2.65  				add_pin_to_irq(0, 0, pin2);
    2.66 -#if 0
    2.67 -			if (nmi_watchdog == NMI_IO_APIC) {
    2.68 -				setup_nmi();
    2.69 -				check_nmi_watchdog();
    2.70 -			}
    2.71 -#endif
    2.72  			return;
    2.73  		}
    2.74  		/*
     3.1 --- a/xen/arch/x86/mpparse.c	Tue May 10 10:20:50 2005 +0000
     3.2 +++ b/xen/arch/x86/mpparse.c	Tue May 10 12:29:18 2005 +0000
     3.3 @@ -725,7 +725,7 @@ void __init get_smp_config (void)
     3.4  
     3.5  static int __init smp_scan_config (unsigned long base, unsigned long length)
     3.6  {
     3.7 -	unsigned long *bp = phys_to_virt(base);
     3.8 +	unsigned int *bp = phys_to_virt(base);
     3.9  	struct intel_mp_floating *mpf;
    3.10  
    3.11  	Dprintk("Scan SMP from %p for %ld bytes.\n", bp,length);
     4.1 --- a/xen/arch/x86/mtrr/main.c	Tue May 10 10:20:50 2005 +0000
     4.2 +++ b/xen/arch/x86/mtrr/main.c	Tue May 10 12:29:18 2005 +0000
     4.3 @@ -34,6 +34,7 @@
     4.4  #include <xen/config.h>
     4.5  #include <xen/init.h>
     4.6  #include <xen/pci.h>
     4.7 +#include <xen/slab.h>
     4.8  #include <xen/smp.h>
     4.9  #include <xen/spinlock.h>
    4.10  #include <asm/mtrr.h>
     5.1 --- a/xen/arch/x86/setup.c	Tue May 10 10:20:50 2005 +0000
     5.2 +++ b/xen/arch/x86/setup.c	Tue May 10 12:29:18 2005 +0000
     5.3 @@ -77,12 +77,7 @@ unsigned long wait_init_idle;
     5.4  
     5.5  struct exec_domain *idle_task[NR_CPUS] = { &idle0_exec_domain };
     5.6  
     5.7 -#ifdef CONFIG_ACPI_INTERPRETER
     5.8 -int acpi_disabled = 0;
     5.9 -#else
    5.10 -int acpi_disabled = 1;
    5.11 -#endif
    5.12 -EXPORT_SYMBOL(acpi_disabled);
    5.13 +int acpi_disabled;
    5.14  
    5.15  int phys_proc_id[NR_CPUS];
    5.16  int logical_proc_id[NR_CPUS];
    5.17 @@ -341,12 +336,8 @@ static void __init do_initcalls(void)
    5.18          (*call)();
    5.19  }
    5.20  
    5.21 -unsigned long pci_mem_start = 0x10000000;
    5.22 -
    5.23  static void __init start_of_day(void)
    5.24  {
    5.25 -    unsigned long low_mem_size;
    5.26 -    
    5.27  #ifdef MEMORY_GUARD
    5.28      /* Unmap the first page of CPU0's stack. */
    5.29      extern unsigned long cpu0_stack[];
    5.30 @@ -362,10 +353,6 @@ static void __init start_of_day(void)
    5.31  
    5.32      arch_do_createdomain(current);
    5.33  
    5.34 -    /* Tell the PCI layer not to allocate too close to the RAM area.. */
    5.35 -    low_mem_size = ((max_page << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
    5.36 -    if ( low_mem_size > pci_mem_start ) pci_mem_start = low_mem_size;
    5.37 -    
    5.38      identify_cpu(&boot_cpu_data); /* get CPU type info */
    5.39      if ( cpu_has_fxsr ) set_in_cr4(X86_CR4_OSFXSR);
    5.40      if ( cpu_has_xmm )  set_in_cr4(X86_CR4_OSXMMEXCPT);
    5.41 @@ -383,7 +370,10 @@ static void __init start_of_day(void)
    5.42  #endif
    5.43      paging_init();                /* not much here now, but sets up fixmap */
    5.44      if ( !opt_noacpi )
    5.45 +    {
    5.46 +        acpi_boot_table_init();
    5.47          acpi_boot_init();
    5.48 +    }
    5.49  #ifdef CONFIG_SMP
    5.50      if ( smp_found_config ) 
    5.51          get_smp_config();
     6.1 --- a/xen/arch/x86/traps.c	Tue May 10 10:20:50 2005 +0000
     6.2 +++ b/xen/arch/x86/traps.c	Tue May 10 12:29:18 2005 +0000
     6.3 @@ -115,7 +115,8 @@ asmlinkage void fatal_trap(int trapnr, s
     6.4      if ( trapnr == TRAP_page_fault )
     6.5      {
     6.6          __asm__ __volatile__ ("mov %%cr2,%0" : "=r" (cr2) : );
     6.7 -        printk("Faulting linear address might be %p\n", _p(cr2));
     6.8 +        printk("Faulting linear address: %p\n", _p(cr2));
     6.9 +        show_page_walk(cr2);
    6.10      }
    6.11  
    6.12      printk("************************************\n");
    6.13 @@ -349,7 +350,7 @@ asmlinkage int do_page_fault(struct cpu_
    6.14      show_page_walk(addr);
    6.15      panic("CPU%d FATAL PAGE FAULT\n"
    6.16            "[error_code=%04x]\n"
    6.17 -          "Faulting linear address might be %p\n",
    6.18 +          "Faulting linear address: %p\n",
    6.19            smp_processor_id(), regs->error_code, addr);
    6.20      return 0;
    6.21  }
     7.1 --- a/xen/arch/x86/x86_32/asm-offsets.c	Tue May 10 10:20:50 2005 +0000
     7.2 +++ b/xen/arch/x86/x86_32/asm-offsets.c	Tue May 10 12:29:18 2005 +0000
     7.3 @@ -90,7 +90,7 @@ void __dummy__(void)
     7.4      OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
     7.5      BLANK();
     7.6  
     7.7 -    DEFINE(FIXMAP_apic_base, __fix_to_virt(FIX_APIC_BASE));
     7.8 +    DEFINE(FIXMAP_apic_base, fix_to_virt(FIX_APIC_BASE));
     7.9      BLANK();
    7.10  
    7.11      DEFINE(IRQSTAT_shift, LOG_2(sizeof(irq_cpustat_t)));
     8.1 --- a/xen/arch/x86/x86_32/mm.c	Tue May 10 10:20:50 2005 +0000
     8.2 +++ b/xen/arch/x86/x86_32/mm.c	Tue May 10 12:29:18 2005 +0000
     8.3 @@ -83,7 +83,7 @@ void __set_fixmap(
     8.4  {
     8.5      if ( unlikely(idx >= __end_of_fixed_addresses) )
     8.6          BUG();
     8.7 -    map_pages(idle_pg_table, __fix_to_virt(idx), p, PAGE_SIZE, flags);
     8.8 +    map_pages(idle_pg_table, fix_to_virt(idx), p, PAGE_SIZE, flags);
     8.9  }
    8.10  
    8.11  
     9.1 --- a/xen/arch/x86/x86_64/mm.c	Tue May 10 10:20:50 2005 +0000
     9.2 +++ b/xen/arch/x86/x86_64/mm.c	Tue May 10 12:29:18 2005 +0000
     9.3 @@ -125,7 +125,7 @@ void __set_fixmap(
     9.4  {
     9.5      if ( unlikely(idx >= __end_of_fixed_addresses) )
     9.6          BUG();
     9.7 -    map_pages(idle_pg_table, __fix_to_virt(idx), p, PAGE_SIZE, flags);
     9.8 +    map_pages(idle_pg_table, fix_to_virt(idx), p, PAGE_SIZE, flags);
     9.9  }
    9.10  
    9.11  
    10.1 --- a/xen/include/asm-x86/fixmap.h	Tue May 10 10:20:50 2005 +0000
    10.2 +++ b/xen/include/asm-x86/fixmap.h	Tue May 10 12:29:18 2005 +0000
    10.3 @@ -56,28 +56,7 @@ extern void __set_fixmap(
    10.4  #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
    10.5  #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
    10.6  
    10.7 -extern void __this_fixmap_does_not_exist(void);
    10.8 -
    10.9 -/*
   10.10 - * 'index to address' translation. If anyone tries to use the idx
   10.11 - * directly without translation, we catch the bug with a NULL-deference
   10.12 - * kernel oops. Illegal ranges of incoming indices are caught too.
   10.13 - */
   10.14 -static always_inline unsigned long fix_to_virt(const unsigned int idx)
   10.15 -{
   10.16 -    /*
   10.17 -     * This branch gets completely eliminated after inlining, except when 
   10.18 -     * someone tries to use fixaddr indices in an illegal way (such as mixing 
   10.19 -     * up address types or using out-of-range indices).
   10.20 -     *
   10.21 -     * If it doesn't get removed, the linker will complain loudly with a 
   10.22 -     * reasonably clear error message.
   10.23 -     */
   10.24 -    if (idx >= __end_of_fixed_addresses)
   10.25 -        __this_fixmap_does_not_exist();
   10.26 -
   10.27 -    return __fix_to_virt(idx);
   10.28 -}
   10.29 +#define fix_to_virt(x)   (__fix_to_virt(x))
   10.30  
   10.31  static inline unsigned long virt_to_fix(const unsigned long vaddr)
   10.32  {
    11.1 --- a/xen/include/asm-x86/pci.h	Tue May 10 10:20:50 2005 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,35 +0,0 @@
    11.4 -#ifndef __X86_PCI_H
    11.5 -#define __X86_PCI_H
    11.6 -
    11.7 -#include <xen/config.h>
    11.8 -
    11.9 -/* Can be used to override the logic in pci_scan_bus for skipping
   11.10 -   already-configured bus numbers - to be used for buggy BIOSes
   11.11 -   or architectures with incomplete PCI setup by the loader */
   11.12 -
   11.13 -#ifdef CONFIG_PCI
   11.14 -extern unsigned int pcibios_assign_all_busses(void);
   11.15 -#else
   11.16 -#define pcibios_assign_all_busses()	0
   11.17 -#endif
   11.18 -#define pcibios_scan_all_fns(a,b)	0
   11.19 -
   11.20 -extern unsigned long pci_mem_start;
   11.21 -#define PCIBIOS_MIN_IO		0x1000
   11.22 -#define PCIBIOS_MIN_MEM		(pci_mem_start)
   11.23 -
   11.24 -void pcibios_config_init(void);
   11.25 -struct pci_bus * pcibios_scan_root(int bus);
   11.26 -extern int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int len, u32 *value);
   11.27 -extern int (*pci_config_write)(int seg, int bus, int dev, int fn, int reg, int len, u32 value);
   11.28 -
   11.29 -void pcibios_set_master(struct pci_dev *dev);
   11.30 -void pcibios_penalize_isa_irq(int irq);
   11.31 -struct irq_routing_table *pcibios_get_irq_routing_table(void);
   11.32 -int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
   11.33 -
   11.34 -#include <xen/types.h>
   11.35 -#include <xen/slab.h>
   11.36 -#include <asm/io.h>
   11.37 -
   11.38 -#endif /* __X86_PCI_H */
    12.1 --- a/xen/include/xen/pci.h	Tue May 10 10:20:50 2005 +0000
    12.2 +++ b/xen/include/xen/pci.h	Tue May 10 12:29:18 2005 +0000
    12.3 @@ -678,10 +678,6 @@ void pci_pool_free (struct pci_pool *poo
    12.4  
    12.5  #endif /* CONFIG_PCI */
    12.6  
    12.7 -/* Include architecture-dependent settings and functions */
    12.8 -
    12.9 -#include <asm/pci.h>
   12.10 -
   12.11  /*
   12.12   *  If the system does not have PCI, clearly these return errors.  Define
   12.13   *  these as simple inline functions to avoid hair in drivers.