>> /* By default isa irqs are identity mapped to gsis */ >> unsigned int isa_irq_to_gsi[16] = { >> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 >> }; >> >> unsigned int gsi_to_irq(unsigned int gsi) >> { >> unsigned int irq = gsi + 16; >> unsigned int i; >> for (i = 0; i < 16; i++) { >> if (isa_irq_to_gsi[i] == gsi) >> irq = i; >> } >> return irq; >> } I just realized that we already have this function in arch/x86/kernel/acpi/boot.c and arch/ia64/kernel/acpi.c it is called: acpi_gsi_to_irq() We still need this implementation but it will get really confusing if we have two functions with the same name trying to do the same job. I am relieved to see this because this should mean we shouldn't have many hard fixed assumptions that irq == gsi. This does mean though that your patch has a real bug in it because you have not updated acpi_gsi_to_irq. Eric >> unsigned int irq_to_gsi(unsigned int irq) >> { >> unsigned int gsi; >> if (irq < 16) { >> gsi = isa_irq_to_gsi[irq]; >> } else { >> gsi = irq - 16; >> } >> return gsi; >> } -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |