Commit 160aef79 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by David Mosberger

[PATCH] ia64: iosapic: simplify ISA IRQ init

Simplify ISA IRQ init by taking advantage of iosapic_override_isa_irq(),
which already does what we need.
parent d4ef410b
......@@ -611,7 +611,7 @@ iosapic_system_init (int system_pcat_compat)
void __devinit
iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
{
int num_rte, vector;
int num_rte;
unsigned int isa_irq, ver;
char *addr;
......@@ -634,26 +634,15 @@ iosapic_init (unsigned long phys_addr, unsigned int gsi_base)
(ver & 0xf0) >> 4, (ver & 0x0f), phys_addr, gsi_base, gsi_base + num_rte - 1);
if ((gsi_base == 0) && pcat_compat) {
unsigned int dest = (ia64_get_lid() >> 16) & 0xffff;
/*
* Map the legacy ISA devices into the IOSAPIC data. Some of these may
* get reprogrammed later on with data from the ACPI Interrupt Source
* Override table.
*/
for (isa_irq = 0; isa_irq < 16; ++isa_irq) {
vector = isa_irq_to_vector(isa_irq);
register_intr(isa_irq, vector, IOSAPIC_LOWEST_PRIORITY,
/* IOSAPIC_POL_HIGH, IOSAPIC_EDGE */
1, 1);
DBG("ISA: IRQ %u -> GSI 0x%x (high,edge) -> CPU 0x%04x vector %d\n",
isa_irq, isa_irq, dest, vector);
/* program the IOSAPIC routing table: */
set_rte(vector, dest);
}
for (isa_irq = 0; isa_irq < 16; ++isa_irq)
/* IOSAPIC_POL_HIGH, IOSAPIC_EDGE */
iosapic_override_isa_irq(isa_irq, isa_irq, 1, 1);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment