1 #ifndef ARCH_PIRQ_ROUTING_H
2 #define ARCH_PIRQ_ROUTING_H
6 #define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
7 #define PIRQ_VERSION 0x0100
10 u8 bus, devfn; /* Bus, device and function */
12 u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
13 u16 bitmap; /* Available IRQs */
14 } __attribute__((packed)) irq[4];
15 u8 slot; /* Slot number, 0=onboard */
17 } __attribute__((packed));
19 #if defined(CONFIG_IRQ_SLOT_COUNT)
20 #define IRQ_SLOTS_COUNT CONFIG_IRQ_SLOT_COUNT
22 #define IRQ_SLOTS_COUNT 1
24 #define IRQ_SLOTS_COUNT
27 struct irq_routing_table {
28 u32 signature; /* PIRQ_SIGNATURE should be here */
29 u16 version; /* PIRQ_VERSION */
30 u16 size; /* Table size in bytes */
31 u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
32 u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
33 u16 rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
34 u32 miniport_data; /* Crap */
36 u8 checksum; /* Modulo 256 checksum must give zero */
37 struct irq_info slots[IRQ_SLOTS_COUNT];
38 } __attribute__((packed));
40 extern const struct irq_routing_table intel_irq_routing_table;
42 #if defined(CONFIG_DEBUG) && defined(CONFIG_GENERATE_PIRQ_TABLE)
43 void check_pirq_routing_table(void);
45 #define check_pirq_routing_table() do {} while(0)
48 #if defined(CONFIG_GENERATE_PIRQ_TABLE)
49 unsigned long copy_pirq_routing_table(unsigned long start);
51 #define copy_pirq_routing_table(start) (start)
54 #endif /* ARCH_PIRQ_ROUTING_H */