ia64/xen-unstable

changeset 4842:1f84d0497a59

bitkeeper revision 1.1389.15.8 (4281bcbaUAXd-mXY9bU_xjLtHjFVJg)

Xen parses IOAPIC entries in the ACPI MADT.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed May 11 08:05:14 2005 +0000 (2005-05-11)
parents f71cef640151
children fd1fca8ffc95
files xen/arch/x86/acpi/boot.c
line diff
     1.1 --- a/xen/arch/x86/acpi/boot.c	Tue May 10 22:58:27 2005 +0000
     1.2 +++ b/xen/arch/x86/acpi/boot.c	Wed May 11 08:05:14 2005 +0000
     1.3 @@ -37,7 +37,9 @@
     1.4  #include <asm/irq.h>
     1.5  #include <asm/mpspec.h>
     1.6  
     1.7 -int sbf_port; /* XXX XEN */
     1.8 +int sbf_port;
     1.9 +#define end_pfn_map max_page
    1.10 +#define CONFIG_ACPI_PCI
    1.11  
    1.12  #ifdef	CONFIG_X86_64
    1.13  
    1.14 @@ -109,7 +111,7 @@ char *__acpi_map_table(unsigned long phy
    1.15  	if (!phys_addr || !size)
    1.16  	return NULL;
    1.17  
    1.18 -	if (phys_addr < (max_page << PAGE_SHIFT))
    1.19 +	if (phys_addr < (end_pfn_map << PAGE_SHIFT))
    1.20  		return __va(phys_addr);
    1.21  
    1.22  	return NULL;
    1.23 @@ -279,7 +281,7 @@ acpi_parse_lapic_nmi (
    1.24  
    1.25  #endif /*CONFIG_X86_LOCAL_APIC*/
    1.26  
    1.27 -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
    1.28 +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
    1.29  
    1.30  static int __init
    1.31  acpi_parse_ioapic (
    1.32 @@ -302,6 +304,7 @@ acpi_parse_ioapic (
    1.33  	return 0;
    1.34  }
    1.35  
    1.36 +#ifdef CONFIG_ACPI_INTERPRETER
    1.37  /*
    1.38   * Parse Interrupt Source Override for the ACPI SCI
    1.39   */
    1.40 @@ -335,6 +338,7 @@ acpi_sci_ioapic_setup(u32 gsi, u16 polar
    1.41  	acpi_sci_override_gsi = gsi;
    1.42  	return;
    1.43  }
    1.44 +#endif
    1.45  
    1.46  static int __init
    1.47  acpi_parse_int_src_ovr (
    1.48 @@ -349,11 +353,13 @@ acpi_parse_int_src_ovr (
    1.49  
    1.50  	acpi_table_print_madt_entry(header);
    1.51  
    1.52 +#ifdef CONFIG_ACPI_INTERPRETER
    1.53  	if (intsrc->bus_irq == acpi_fadt.sci_int) {
    1.54  		acpi_sci_ioapic_setup(intsrc->global_irq,
    1.55  			intsrc->flags.polarity, intsrc->flags.trigger);
    1.56  		return 0;
    1.57  	}
    1.58 +#endif
    1.59  
    1.60  	if (acpi_skip_timer_override &&
    1.61  		intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
    1.62 @@ -698,7 +704,7 @@ acpi_parse_madt_lapic_entries(void)
    1.63  }
    1.64  #endif /* CONFIG_X86_LOCAL_APIC */
    1.65  
    1.66 -#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_ACPI_INTERPRETER)
    1.67 +#if defined(CONFIG_X86_IO_APIC) /*&& defined(CONFIG_ACPI_INTERPRETER)*/
    1.68  /*
    1.69   * Parse IOAPIC related entries in MADT
    1.70   * returns 0 on success, < 0 on error
    1.71 @@ -744,12 +750,14 @@ acpi_parse_madt_ioapic_entries(void)
    1.72  		return count;
    1.73  	}
    1.74  
    1.75 +#ifdef CONFIG_ACPI_INTERPRETER
    1.76  	/*
    1.77  	 * If BIOS did not supply an INT_SRC_OVR for the SCI
    1.78  	 * pretend we got one so we can set the SCI flags.
    1.79  	 */
    1.80  	if (!acpi_sci_override_gsi)
    1.81  		acpi_sci_ioapic_setup(acpi_fadt.sci_int, 0, 0);
    1.82 +#endif
    1.83  
    1.84  	/* Fill in identity legacy mapings where no override */
    1.85  	mp_config_acpi_legacy_irqs();
    1.86 @@ -856,10 +864,6 @@ acpi_boot_table_init(void)
    1.87  		return error;
    1.88  	}
    1.89  
    1.90 -#if 0 /*def __i386__*/
    1.91 -	check_acpi_pci();
    1.92 -#endif
    1.93 -
    1.94  	acpi_table_parse(ACPI_BOOT, acpi_parse_sbf);
    1.95  
    1.96  	/*