x86/irq changes for v2.6.35
Linus,
Please pull the latest x86-irq-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-irq-for-linus
out-of-topic modifications in x86-irq-for-linus:
------------------------------------------------
arch/ia64/kernel/acpi.c # 2c2df84: x86, acpi/irq: Introduce apci_isa
drivers/acpi/pci_irq.c # 414d344: x86, acpi/irq: pci device dev->ir
include/linux/acpi.h # 9a0a91b: x86, acpi/irq: Teach acpi_get_ove
# 2c2df84: x86, acpi/irq: Introduce apci_isaThanks,
Ingo
------------------>
Eric W. Biederman (16):
x86, acpi/irq: Introduce apci_isa_irq_to_gsi
x86, acpi/irq: Teach acpi_get_override_irq to take a gsi not an isa_irq x86, acpi/irq: pci device dev->irq is an isa irq not a gsi x86, acpi/irq: Fix acpi_sci_ioapic_setup so it has both bus_irq and gsi x86, acpi/irq: Generalize mp_config_acpi_legacy_irqs
x86, ioapic: Only export mp_find_ioapic and mp_find_ioapic_pin in io_apic.h x86, ioapic: Fix io_apic_redir_entries to return the number of entries. x86, ioapic: Fix the types of gsi values
x86, ioapic: Teach mp_register_ioapic to compute a global gsi_end x86, ioapic: In mpparse use mp_register_ioapic
x86, ioapic: Move nr_ioapic_registers calculation to mp_register_ioapic. x86, ioapic: Optimize pin_2_irq
x86, ioapic: Simplify probe_nr_irqs_gsi.
x86, acpi/irq: Handle isa irqs that are not identity mapped to gsi's. x86, irq: Kill io_apic_renumber_irq
x86, acpi/irq: Define gsi_end when X86_IO_APIC is undefined
arch/ia64/kernel/acpi.c | 8 ++ arch/x86/include/asm/io_apic.h | 13 ++-- arch/x86/include/asm/mpspec.h | 10 --- arch/x86/kernel/acpi/boot.c | 133 ++++++++++++++++++++++++-------------- arch/x86/kernel/apic/es7000_32.c | 19 ------ arch/x86/kernel/apic/io_apic.c | 99 +++++++++++++--------------- arch/x86/kernel/mpparse.c | 25 +------- arch/x86/kernel/sfi.c | 4 +- drivers/acpi/pci_irq.c | 8 ++- include/linux/acpi.h | 5 +- 10 files changed, 155 insertions(+), 169 deletions(-)
arch/ia64/kernel/acpi.c +8 -0
@@ -785,6 +785,14 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)return 0 ; } +int acpi_isa_irq_to_gsi (unsigned isa_irq,u32 *gsi) +{ +if (isa_irq >=16 ) +return -1 ; + *gsi = isa_irq; +return 0 ; +} +/* * ACPI based hotplug CPU support */
arch/x86/include/asm/io_apic.h +7 -6
@@ -159,7 +159,6 @@ struct io_apic_irq_attr;extern int io_apic_set_pci_routing (struct device *dev,int irq,struct io_apic_irq_attr *irq_attr);void setup_IO_APIC_irq_extra (u32 gsi); -extern int (*ioapic_renumber_irq)(int ioapic,int irq);extern void ioapic_init_mappings (void );extern void ioapic_insert_resources (void );
@@ -180,12 +179,13 @@ extern void ioapic_write_entry(int apic, int pin,extern void setup_ioapic_ids_from_mpc (void );struct mp_ioapic_gsi { -int gsi_base; -int gsi_end; +u32 gsi_base; +u32 gsi_end; };extern struct mp_ioapic_gsi mp_gsi_routing[]; -int mp_find_ioapic (int gsi); -int mp_find_ioapic_pin (int ioapic,int gsi); +extern u32 gsi_end; +int mp_find_ioapic (u32 gsi); +int mp_find_ioapic_pin (int ioapic,u32 gsi);void __init mp_register_ioapic (int id,u32 address,u32 gsi_base);extern void __init pre_init_apic_IRQ0 (void );
@@ -197,7 +197,8 @@ static const int timer_through_8259 = 0;static inline void ioapic_init_mappings (void ) { }static inline void ioapic_insert_resources (void ) { }static inline void probe_nr_irqs_gsi (void ) { } -static inline int mp_find_ioapic (int gsi) {return 0 ; } +#define gsi_end (NR_IRQS_LEGACY - 1) +static inline int mp_find_ioapic (u32 gsi) {return 0 ; }struct io_apic_irq_attr ; static inline int io_apic_set_pci_routing(struct device *dev, int irq,
arch/x86/include/asm/mpspec.h +0 -10
@@ -105,16 +105,6 @@ extern void mp_config_acpi_legacy_irqs(void);struct device ;extern int mp_register_gsi (struct device *dev,u32 gsi,int edge_level,int active_high_low); -extern int acpi_probe_gsi (void ); -#ifdef CONFIG_X86_IO_APIC -extern int mp_find_ioapic (int gsi); -extern int mp_find_ioapic_pin (int ioapic,int gsi); -#endif -#else /* !CONFIG_ACPI: */ -static inline int acpi_probe_gsi (void ) -{ -return 0 ; -}#endif /* CONFIG_ACPI */ #define PHYSID_ARRAY_SIZE BITS_TO_LONGS(MAX_APICS)
arch/x86/kernel/acpi/boot.c +85 -48
234 lines not on this page · raw message
arch/x86/kernel/apic/es7000_32.c +0 -19
@@ -131,24 +131,6 @@ int es7000_plat;static unsigned int base; -static int -es7000_rename_gsi (int ioapic,int gsi) -{ -if (es7000_plat ==ES7000_ZORRO ) -return gsi; - -if (!base) { -int i; -for (i =0 ; i < nr_ioapics; i++) - base += nr_ioapic_registers[i]; - } - -if (!ioapic && (gsi <16 )) - gsi += base; - -return gsi; -} -static int __cpuinit wakeup_secondary_cpu_via_mip (int cpu,unsigned long eip) {unsigned long vect =0 , psaival =0 ;
@@ -190,7 +172,6 @@ static void setup_unisys(void) es7000_plat =ES7000_ZORRO ; else es7000_plat =ES7000_CLASSIC ; - ioapic_renumber_irq = es7000_rename_gsi; }/*
arch/x86/kernel/apic/io_apic.c +45 -54
177 lines not on this page · raw message
arch/x86/kernel/mpparse.c +1 -24
@@ -115,21 +115,6 @@ static void __init MP_bus_info(struct mpc_bus *m)printk (KERN_WARNING "Unknown bustype %s - ignoring\n" , str); } -static int bad_ioapic (unsigned long address) -{ -if (nr_ioapics >=MAX_IO_APICS ) { -printk (KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded " -"(found %d)\n" ,MAX_IO_APICS , nr_ioapics); -panic ("Recompile kernel with bigger MAX_IO_APICS!\n" ); - } -if (!address) { -printk (KERN_ERR "WARNING: Bogus (zero) I/O APIC address" -" found in table, skipping!\n" ); -return 1 ; - } -return 0 ; -} -static void __init MP_ioapic_info (struct mpc_ioapic *m) {if (!(m->flags &MPC_APIC_USABLE ))
@@ -138,15 +123,7 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m)printk (KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n" , m->apicid, m->apicver, m->apicaddr); -if (bad_ioapic (m->apicaddr)) -return ; - - mp_ioapics[nr_ioapics].apicaddr = m->apicaddr; - mp_ioapics[nr_ioapics].apicid = m->apicid; - mp_ioapics[nr_ioapics].type = m->type; - mp_ioapics[nr_ioapics].apicver = m->apicver; - mp_ioapics[nr_ioapics].flags = m->flags; - nr_ioapics++; +mp_register_ioapic (m->apicid, m->apicaddr, gsi_end +1 ); }static void print_MP_intsrc_info (struct mpc_intsrc *m)
arch/x86/kernel/sfi.c +1 -3
@@ -81,7 +81,6 @@ static int __init sfi_parse_cpus(struct sfi_table_header *table)#endif /* CONFIG_X86_LOCAL_APIC */ #ifdef CONFIG_X86_IO_APIC -static u32 gsi_base;static int __init sfi_parse_ioapic (struct sfi_table_header *table) {
@@ -94,8 +93,7 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table) pentry = (struct sfi_apic_table_entry *)sb->pentry;for (i =0 ; i < num; i++) { -mp_register_ioapic (i, pentry->phys_addr, gsi_base); - gsi_base +=io_apic_get_redir_entries (i); +mp_register_ioapic (i, pentry->phys_addr, gsi_end +1 ); pentry++; }
drivers/acpi/pci_irq.c +5 -3
@@ -401,11 +401,13 @@ int acpi_pci_irq_enable(struct pci_dev *dev)* driver reported one, then use it. Exit in any case. */ if (gsi <0 ) { +u32 dev_gsi;dev_warn (&dev->dev,"PCI INT %c: no GSI" ,pin_name (pin));/* Interrupt Line values above 0xF are forbidden */ -if (dev->irq >0 && (dev->irq <=0xF )) { -printk (" - using IRQ %d\n" , dev->irq); -acpi_register_gsi (&dev->dev, dev->irq, +if (dev->irq >0 && (dev->irq <=0xF ) && + (acpi_isa_irq_to_gsi (dev->irq, &dev_gsi) ==0 )) { +printk (" - using ISA IRQ %d\n" , dev->irq); +acpi_register_gsi (&dev->dev, dev_gsi,ACPI_LEVEL_SENSITIVE ,ACPI_ACTIVE_LOW );return 0 ;
include/linux/acpi.h +3 -2
@@ -116,11 +116,12 @@ extern unsigned long acpi_realmode_flags;int acpi_register_gsi (struct device *dev,u32 gsi,int triggering,int polarity);int acpi_gsi_to_irq (u32 gsi,unsigned int *irq); +int acpi_isa_irq_to_gsi (unsigned isa_irq,u32 *gsi);#ifdef CONFIG_X86_IO_APIC -extern int acpi_get_override_irq (int bus_irq,int *trigger,int *polarity); +extern int acpi_get_override_irq (u32 gsi,int *trigger,int *polarity);#else -#define acpi_get_override_irq (bus, trigger, polarity) (-1) +#define acpi_get_override_irq (gsi, trigger, polarity) (-1)#endif /* * This function undoes the effect of one call to acpi_register_gsi().