ia64/xen-unstable

changeset 2241:d23ce975d922

bitkeeper revision 1.1159.1.63 (411e4c0fxwrDJ6u1QTe29_mzpEynrw)

Updated MP table parsing from 2.4.26.
author kaf24@scramble.cl.cam.ac.uk
date Sat Aug 14 17:29:51 2004 +0000 (2004-08-14)
parents 4f0616f9dffe
children caf120933dc8
files xen/arch/x86/mpparse.c
line diff
     1.1 --- a/xen/arch/x86/mpparse.c	Sat Aug 14 16:01:46 2004 +0000
     1.2 +++ b/xen/arch/x86/mpparse.c	Sat Aug 14 17:29:51 2004 +0000
     1.3 @@ -1120,7 +1120,7 @@ void __init mp_override_legacy_irq (
     1.4  	 *      erroneously sets the trigger to level, resulting in a HUGE 
     1.5  	 *      increase of timer interrupts!
     1.6  	 */
     1.7 -	if ((bus_irq == 0) && (global_irq == 2) && (trigger == 3))
     1.8 +	if ((bus_irq == 0) && (trigger == 3))
     1.9  		trigger = 1;
    1.10  
    1.11  	intsrc.mpc_type = MP_INTSRC;
    1.12 @@ -1141,7 +1141,7 @@ void __init mp_override_legacy_irq (
    1.13  	 * Otherwise create a new entry (e.g. global_irq == 2).
    1.14  	 */
    1.15  	for (i = 0; i < mp_irq_entries; i++) {
    1.16 -		if ((mp_irqs[i].mpc_dstapic == intsrc.mpc_dstapic) 
    1.17 +		if ((mp_irqs[i].mpc_srcbus == intsrc.mpc_srcbus) 
    1.18  			&& (mp_irqs[i].mpc_srcbusirq == intsrc.mpc_srcbusirq)) {
    1.19  			mp_irqs[i] = intsrc;
    1.20  			found = 1;
    1.21 @@ -1202,13 +1202,14 @@ void __init mp_config_acpi_legacy_irqs (
    1.22  	 */
    1.23  	for (i = 0; i < 16; i++) {
    1.24  
    1.25 -		if (i == 2) continue;			/* Don't connect IRQ2 */
    1.26 +		if (i == 2)
    1.27 +			continue;			/* Don't connect IRQ2 */
    1.28  
    1.29  		mp_irqs[mp_irq_entries].mpc_type = MP_INTSRC;
    1.30  		mp_irqs[mp_irq_entries].mpc_irqflag = 0;	/* Conforming */
    1.31  		mp_irqs[mp_irq_entries].mpc_srcbus = MP_ISA_BUS;
    1.32  		mp_irqs[mp_irq_entries].mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
    1.33 -		mp_irqs[mp_irq_entries].mpc_irqtype = i ? mp_INT : mp_ExtINT;   /* 8259A to #0 */
    1.34 +		mp_irqs[mp_irq_entries].mpc_irqtype = mp_INT;
    1.35  		mp_irqs[mp_irq_entries].mpc_srcbusirq = i;	   /* Identity mapped */
    1.36  		mp_irqs[mp_irq_entries].mpc_dstirq = i;
    1.37  
    1.38 @@ -1227,72 +1228,6 @@ void __init mp_config_acpi_legacy_irqs (
    1.39  	}
    1.40  }
    1.41  
    1.42 -/*extern FADT_DESCRIPTOR acpi_fadt;*/
    1.43 -
    1.44 -void __init mp_config_ioapic_for_sci(int irq)
    1.45 -{
    1.46 -	int ioapic;
    1.47 -	int ioapic_pin;
    1.48 -	struct acpi_table_madt* madt;
    1.49 -	struct acpi_table_int_src_ovr *entry = NULL;
    1.50 -	acpi_interrupt_flags flags;
    1.51 -	void *madt_end;
    1.52 -	acpi_status status;
    1.53 -
    1.54 -	/*
    1.55 -	 * Ensure that if there is an interrupt source override entry
    1.56 -	 * for the ACPI SCI, we leave it as is. Unfortunately this involves
    1.57 -	 * walking the MADT again.
    1.58 -	 */
    1.59 -	status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
    1.60 -		(struct acpi_table_header **) &madt);
    1.61 -	if (ACPI_SUCCESS(status)) {
    1.62 -		madt_end = (void *) (unsigned long)madt + madt->header.length;
    1.63 -
    1.64 -		entry = (struct acpi_table_int_src_ovr *)
    1.65 -                ((unsigned long) madt + sizeof(struct acpi_table_madt));
    1.66 -
    1.67 -		while ((void *) entry < madt_end) {
    1.68 -                	if (entry->header.type == ACPI_MADT_INT_SRC_OVR &&
    1.69 -			    acpi_fadt.sci_int == entry->bus_irq)
    1.70 -				goto found;
    1.71 -			
    1.72 -                	entry = (struct acpi_table_int_src_ovr *)
    1.73 -                	        ((unsigned long) entry + entry->header.length);
    1.74 -        	}
    1.75 -	}
    1.76 -	/*
    1.77 -	 * Although the ACPI spec says that the SCI should be level/low
    1.78 -	 * don't reprogram it unless there is an explicit MADT OVR entry
    1.79 -	 * instructing us to do so -- otherwise we break Tyan boards which
    1.80 -	 * have the SCI wired edge/high but no MADT OVR.
    1.81 -	 */
    1.82 -	return;
    1.83 -
    1.84 -found:
    1.85 -	/*
    1.86 -	 * See the note at the end of ACPI 2.0b section
    1.87 -	 * 5.2.10.8 for what this is about.
    1.88 -	 */
    1.89 -	flags = entry->flags;
    1.90 -	acpi_fadt.sci_int = entry->global_irq;
    1.91 -	irq = entry->global_irq;
    1.92 -	
    1.93 -	ioapic = mp_find_ioapic(irq);
    1.94 -
    1.95 -	ioapic_pin = irq - mp_ioapic_routing[ioapic].irq_start;
    1.96 -
    1.97 -	/*
    1.98 -	 * MPS INTI flags:
    1.99 -	 *  trigger: 0=default, 1=edge, 3=level
   1.100 -	 *  polarity: 0=default, 1=high, 3=low
   1.101 -	 * Per ACPI spec, default for SCI means level/low.
   1.102 -	 */
   1.103 -	io_apic_set_pci_routing(ioapic, ioapic_pin, irq, 
   1.104 -		(flags.trigger == 1 ? 0 : 1), (flags.polarity == 1 ? 0 : 1));
   1.105 -}
   1.106 -
   1.107 -
   1.108  #ifdef CONFIG_ACPI_PCI
   1.109  
   1.110  void __init mp_parse_prt (void)
   1.111 @@ -1351,7 +1286,7 @@ void __init mp_parse_prt (void)
   1.112  			continue;
   1.113  		}
   1.114  		if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
   1.115 -			printk(KERN_DEBUG "Pin %d-%d already programmed\n",
   1.116 +			Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
   1.117  				mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
   1.118  			entry->irq = irq;
   1.119  			continue;