1 #ifndef ARCH_PIRQ_ROUTING_H
2 #define ARCH_PIRQ_ROUTING_H
4 #if CONFIG_GENERATE_PIRQ_TABLE==1
7 #define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
8 #define PIRQ_VERSION 0x0100
11 u8 bus, devfn; /* Bus, device and function */
13 u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
14 u16 bitmap; /* Available IRQs */
15 } __attribute__((packed)) irq[4];
16 u8 slot; /* Slot number, 0=onboard */
18 } __attribute__((packed));
20 #ifndef CONFIG_IRQ_SLOT_COUNT
21 #warning "IRQ_SLOT_COUNT is not defined in Kconfig. PIRQ won't work correctly."
24 struct irq_routing_table {
25 u32 signature; /* PIRQ_SIGNATURE should be here */
26 u16 version; /* PIRQ_VERSION */
27 u16 size; /* Table size in bytes */
28 u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
29 u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
30 u16 rtr_vendor, rtr_device;/* Vendor/device ID of interrupt router */
33 u8 checksum; /* Modulo 256 checksum must give zero */
34 struct irq_info slots[CONFIG_IRQ_SLOT_COUNT];
35 } __attribute__((packed));
37 extern const struct irq_routing_table intel_irq_routing_table;
39 unsigned long copy_pirq_routing_table(unsigned long start);
40 unsigned long write_pirq_routing_table(unsigned long start);
42 #if CONFIG_PIRQ_ROUTE==1
43 void pirq_routing_irqs(unsigned long start);
44 void pirq_assign_irqs(const unsigned char pIntAtoD[4]);
46 #define pirq_routing_irqs(start) {}
50 #define copy_pirq_routing_table(start) (start)
51 #define write_pirq_routing_table(start) (start)
54 #endif /* ARCH_PIRQ_ROUTING_H */