ia64/xen-unstable

changeset 4782:09a27a50ad98

bitkeeper revision 1.1389.5.24 (427b3e32MTKLAKufH_gNCYPoIbG71g)

Xen can parse the ACPI tables to get IOAPIC information -- we can rely
on domain0 to fill in information we miss because Xen lacks an ACPI
interpreter.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri May 06 09:51:46 2005 +0000 (2005-05-06)
parents ea463ddea885
children f1d19fea460b
files xen/arch/x86/acpi.c xen/arch/x86/mpparse.c
line diff
     1.1 --- a/xen/arch/x86/acpi.c	Fri May 06 09:49:56 2005 +0000
     1.2 +++ b/xen/arch/x86/acpi.c	Fri May 06 09:51:46 2005 +0000
     1.3 @@ -189,7 +189,7 @@ acpi_parse_lapic_nmi (
     1.4  
     1.5  #endif /*CONFIG_X86_LOCAL_APIC*/
     1.6  
     1.7 -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
     1.8 +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
     1.9  
    1.10  static int __init
    1.11  acpi_parse_ioapic (
    1.12 @@ -211,6 +211,7 @@ acpi_parse_ioapic (
    1.13  	return 0;
    1.14  }
    1.15  
    1.16 +#ifdef CONFIG_ACPI_INTERPRETER
    1.17  /*
    1.18   * Parse Interrupt Source Override for the ACPI SCI
    1.19   */
    1.20 @@ -244,6 +245,7 @@ acpi_sci_ioapic_setup(u32 gsi, u16 polar
    1.21  	acpi_sci_override_gsi = gsi;
    1.22  	return;
    1.23  }
    1.24 +#endif
    1.25  
    1.26  static int __init
    1.27  acpi_parse_fadt(unsigned long phys, unsigned long size)
    1.28 @@ -277,11 +279,13 @@ acpi_parse_int_src_ovr (
    1.29  
    1.30  	acpi_table_print_madt_entry(header);
    1.31  
    1.32 +#ifdef CONFIG_ACPI_INTERPRETER
    1.33  	if (intsrc->bus_irq == acpi_fadt.sci_int) {
    1.34  		acpi_sci_ioapic_setup(intsrc->global_irq,
    1.35  			intsrc->flags.polarity, intsrc->flags.trigger);
    1.36  		return 0;
    1.37  	}
    1.38 +#endif
    1.39  
    1.40  	mp_override_legacy_irq (
    1.41  		intsrc->bus_irq,
    1.42 @@ -460,13 +464,14 @@ acpi_boot_init (void)
    1.43  
    1.44  #endif /*CONFIG_X86_LOCAL_APIC*/
    1.45  
    1.46 -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
    1.47 +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
    1.48  
    1.49  	/* 
    1.50  	 * I/O APIC 
    1.51  	 * --------
    1.52  	 */
    1.53  
    1.54 +#if 0
    1.55  	/*
    1.56  	 * ACPI interpreter is required to complete interrupt setup,
    1.57  	 * so if it is off, don't enumerate the io-apics with ACPI.
    1.58 @@ -476,6 +481,7 @@ acpi_boot_init (void)
    1.59  	if (acpi_disabled || acpi_noirq) {
    1.60  		return 1;
    1.61  	}
    1.62 +#endif
    1.63  
    1.64  	/*
    1.65  	 * if "noapic" boot option, don't look for IO-APICs
    1.66 @@ -510,12 +516,14 @@ acpi_boot_init (void)
    1.67  		return result;
    1.68  	}
    1.69  
    1.70 +#ifdef CONFIG_ACPI_INTERPRETER
    1.71  	/*
    1.72  	 * If BIOS did not supply an INT_SRC_OVR for the SCI
    1.73  	 * pretend we got one so we can set the SCI flags.
    1.74  	 */
    1.75  	if (!acpi_sci_override_gsi)
    1.76  		acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
    1.77 +#endif
    1.78  
    1.79  	result = acpi_table_parse_madt(ACPI_MADT_NMI_SRC, acpi_parse_nmi_src);
    1.80  	if (result < 0) {
     2.1 --- a/xen/arch/x86/mpparse.c	Fri May 06 09:49:56 2005 +0000
     2.2 +++ b/xen/arch/x86/mpparse.c	Fri May 06 09:51:46 2005 +0000
     2.3 @@ -1017,7 +1017,7 @@ void __init mp_register_lapic (
     2.4  	MP_processor_info(&processor);
     2.5  }
     2.6  
     2.7 -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
     2.8 +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
     2.9  
    2.10  #define MP_ISA_BUS		0
    2.11  #define MP_MAX_IOAPIC_PIN	127
    2.12 @@ -1085,7 +1085,7 @@ void __init mp_register_ioapic (
    2.13  	mp_ioapic_routing[idx].irq_end = irq_base + 
    2.14  		io_apic_get_redir_entries(idx);
    2.15  
    2.16 -	printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%lx, "
    2.17 +	printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
    2.18  		"IRQ %d-%d\n", idx, mp_ioapics[idx].mpc_apicid, 
    2.19  		mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
    2.20  		mp_ioapic_routing[idx].irq_start,