Commit 0799e432 authored by Yinghai Lu's avatar Yinghai Lu Committed by Ingo Molnar

x86: use nr_irqs

also add first_free_entry and pin_map_size, which were NR_IRQS derived
constants.
Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 85c0f909
...@@ -70,6 +70,7 @@ int timer_through_8259 __initdata; ...@@ -70,6 +70,7 @@ int timer_through_8259 __initdata;
*/ */
int sis_apic_bug = -1; int sis_apic_bug = -1;
int first_free_entry = NR_IRQS;
/* /*
* # of IRQ routing registers * # of IRQ routing registers
*/ */
...@@ -100,6 +101,8 @@ static int disable_timer_pin_1 __initdata; ...@@ -100,6 +101,8 @@ static int disable_timer_pin_1 __initdata;
#define MAX_PLUS_SHARED_IRQS NR_IRQS #define MAX_PLUS_SHARED_IRQS NR_IRQS
#define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS) #define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS)
int pin_map_size = PIN_MAP_SIZE;
/* /*
* This is performance-critical, we want to do it O(1) * This is performance-critical, we want to do it O(1)
* *
...@@ -213,7 +216,6 @@ static void ioapic_mask_entry(int apic, int pin) ...@@ -213,7 +216,6 @@ static void ioapic_mask_entry(int apic, int pin)
*/ */
static void add_pin_to_irq(unsigned int irq, int apic, int pin) static void add_pin_to_irq(unsigned int irq, int apic, int pin)
{ {
static int first_free_entry = NR_IRQS;
struct irq_pin_list *entry = irq_2_pin + irq; struct irq_pin_list *entry = irq_2_pin + irq;
while (entry->next) while (entry->next)
...@@ -222,7 +224,7 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin) ...@@ -222,7 +224,7 @@ static void add_pin_to_irq(unsigned int irq, int apic, int pin)
if (entry->pin != -1) { if (entry->pin != -1) {
entry->next = first_free_entry; entry->next = first_free_entry;
entry = irq_2_pin + entry->next; entry = irq_2_pin + entry->next;
if (++first_free_entry >= PIN_MAP_SIZE) if (++first_free_entry >= pin_map_size)
panic("io_apic.c: whoops"); panic("io_apic.c: whoops");
} }
entry->apic = apic; entry->apic = apic;
...@@ -457,7 +459,7 @@ static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold) ...@@ -457,7 +459,7 @@ static inline void rotate_irqs_among_cpus(unsigned long useful_load_threshold)
int i, j; int i, j;
for_each_online_cpu(i) { for_each_online_cpu(i) {
for (j = 0; j < NR_IRQS; j++) { for (j = 0; j < nr_irqs; j++) {
if (!irq_desc[j].action) if (!irq_desc[j].action)
continue; continue;
/* Is it a significant load ? */ /* Is it a significant load ? */
...@@ -492,7 +494,7 @@ static void do_irq_balance(void) ...@@ -492,7 +494,7 @@ static void do_irq_balance(void)
if (!cpu_online(i)) if (!cpu_online(i))
continue; continue;
package_index = CPU_TO_PACKAGEINDEX(i); package_index = CPU_TO_PACKAGEINDEX(i);
for (j = 0; j < NR_IRQS; j++) { for (j = 0; j < nr_irqs; j++) {
unsigned long value_now, delta; unsigned long value_now, delta;
/* Is this an active IRQ or balancing disabled ? */ /* Is this an active IRQ or balancing disabled ? */
if (!irq_desc[j].action || irq_balancing_disabled(j)) if (!irq_desc[j].action || irq_balancing_disabled(j))
...@@ -587,7 +589,7 @@ tryanotherirq: ...@@ -587,7 +589,7 @@ tryanotherirq:
*/ */
move_this_load = 0; move_this_load = 0;
selected_irq = -1; selected_irq = -1;
for (j = 0; j < NR_IRQS; j++) { for (j = 0; j < nr_irqs; j++) {
/* Is this an active IRQ? */ /* Is this an active IRQ? */
if (!irq_desc[j].action) if (!irq_desc[j].action)
continue; continue;
...@@ -664,7 +666,7 @@ static int balanced_irq(void *unused) ...@@ -664,7 +666,7 @@ static int balanced_irq(void *unused)
long time_remaining = balanced_irq_interval; long time_remaining = balanced_irq_interval;
/* push everything to CPU 0 to give us a starting point. */ /* push everything to CPU 0 to give us a starting point. */
for (i = 0 ; i < NR_IRQS ; i++) { for (i = 0 ; i < nr_irqs ; i++) {
irq_desc[i].pending_mask = cpumask_of_cpu(0); irq_desc[i].pending_mask = cpumask_of_cpu(0);
set_pending_irq(i, cpumask_of_cpu(0)); set_pending_irq(i, cpumask_of_cpu(0));
} }
...@@ -712,8 +714,8 @@ static int __init balanced_irq_init(void) ...@@ -712,8 +714,8 @@ static int __init balanced_irq_init(void)
physical_balance = 1; physical_balance = 1;
for_each_online_cpu(i) { for_each_online_cpu(i) {
irq_cpu_data[i].irq_delta = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); irq_cpu_data[i].irq_delta = kzalloc(sizeof(unsigned long) * nr_irqs, GFP_KERNEL);
irq_cpu_data[i].last_irq = kzalloc(sizeof(unsigned long) * NR_IRQS, GFP_KERNEL); irq_cpu_data[i].last_irq = kzalloc(sizeof(unsigned long) * nr_irqs, GFP_KERNEL);
if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) { if (irq_cpu_data[i].irq_delta == NULL || irq_cpu_data[i].last_irq == NULL) {
printk(KERN_ERR "balanced_irq_init: out of memory"); printk(KERN_ERR "balanced_irq_init: out of memory");
goto failed; goto failed;
...@@ -1441,7 +1443,7 @@ __apicdebuginit(void) print_IO_APIC(void) ...@@ -1441,7 +1443,7 @@ __apicdebuginit(void) print_IO_APIC(void)
} }
} }
printk(KERN_DEBUG "IRQ to pin mappings:\n"); printk(KERN_DEBUG "IRQ to pin mappings:\n");
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < nr_irqs; i++) {
struct irq_pin_list *entry = irq_2_pin + i; struct irq_pin_list *entry = irq_2_pin + i;
if (entry->pin < 0) if (entry->pin < 0)
continue; continue;
...@@ -1621,7 +1623,7 @@ static void __init enable_IO_APIC(void) ...@@ -1621,7 +1623,7 @@ static void __init enable_IO_APIC(void)
int i, apic; int i, apic;
unsigned long flags; unsigned long flags;
for (i = 0; i < PIN_MAP_SIZE; i++) { for (i = 0; i < pin_map_size; i++) {
irq_2_pin[i].pin = -1; irq_2_pin[i].pin = -1;
irq_2_pin[i].next = 0; irq_2_pin[i].next = 0;
} }
...@@ -2005,7 +2007,7 @@ static inline void init_IO_APIC_traps(void) ...@@ -2005,7 +2007,7 @@ static inline void init_IO_APIC_traps(void)
* Also, we've got to be careful not to trash gate * Also, we've got to be careful not to trash gate
* 0x80, because int 0x80 is hm, kind of importantish. ;) * 0x80, because int 0x80 is hm, kind of importantish. ;)
*/ */
for (irq = 0; irq < NR_IRQS ; irq++) { for (irq = 0; irq < nr_irqs ; irq++) {
if (IO_APIC_IRQ(irq) && !irq_vector[irq]) { if (IO_APIC_IRQ(irq) && !irq_vector[irq]) {
/* /*
* Hmm.. We don't have an entry for this, * Hmm.. We don't have an entry for this,
...@@ -2449,7 +2451,7 @@ int create_irq(void) ...@@ -2449,7 +2451,7 @@ int create_irq(void)
irq = -ENOSPC; irq = -ENOSPC;
spin_lock_irqsave(&vector_lock, flags); spin_lock_irqsave(&vector_lock, flags);
for (new = (NR_IRQS - 1); new >= 0; new--) { for (new = (nr_irqs - 1); new >= 0; new--) {
if (platform_legacy_irq(new)) if (platform_legacy_irq(new))
continue; continue;
if (irq_vector[new] != 0) if (irq_vector[new] != 0)
......
...@@ -132,6 +132,7 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); ...@@ -132,6 +132,7 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES);
#define MAX_PLUS_SHARED_IRQS NR_IRQS #define MAX_PLUS_SHARED_IRQS NR_IRQS
#define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS) #define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + NR_IRQS)
int pin_map_size = PIN_MAP_SIZE;
/* /*
* This is performance-critical, we want to do it O(1) * This is performance-critical, we want to do it O(1)
* *
...@@ -224,7 +225,7 @@ static inline void io_apic_sync(unsigned int apic) ...@@ -224,7 +225,7 @@ static inline void io_apic_sync(unsigned int apic)
int pin; \ int pin; \
struct irq_pin_list *entry = irq_2_pin + irq; \ struct irq_pin_list *entry = irq_2_pin + irq; \
\ \
BUG_ON(irq >= NR_IRQS); \ BUG_ON(irq >= nr_irqs); \
for (;;) { \ for (;;) { \
unsigned int reg; \ unsigned int reg; \
pin = entry->pin; \ pin = entry->pin; \
...@@ -301,7 +302,7 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector) ...@@ -301,7 +302,7 @@ static void __target_IO_APIC_irq(unsigned int irq, unsigned int dest, u8 vector)
int apic, pin; int apic, pin;
struct irq_pin_list *entry = irq_2_pin + irq; struct irq_pin_list *entry = irq_2_pin + irq;
BUG_ON(irq >= NR_IRQS); BUG_ON(irq >= nr_irqs);
for (;;) { for (;;) {
unsigned int reg; unsigned int reg;
apic = entry->apic; apic = entry->apic;
...@@ -358,19 +359,19 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask) ...@@ -358,19 +359,19 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
* shared ISA-space IRQs, so we have to support them. We are super * shared ISA-space IRQs, so we have to support them. We are super
* fast in the common case, and fast for shared ISA-space IRQs. * fast in the common case, and fast for shared ISA-space IRQs.
*/ */
int first_free_entry = NR_IRQS;
static void add_pin_to_irq(unsigned int irq, int apic, int pin) static void add_pin_to_irq(unsigned int irq, int apic, int pin)
{ {
static int first_free_entry = NR_IRQS;
struct irq_pin_list *entry = irq_2_pin + irq; struct irq_pin_list *entry = irq_2_pin + irq;
BUG_ON(irq >= NR_IRQS); BUG_ON(irq >= nr_irqs);
while (entry->next) while (entry->next)
entry = irq_2_pin + entry->next; entry = irq_2_pin + entry->next;
if (entry->pin != -1) { if (entry->pin != -1) {
entry->next = first_free_entry; entry->next = first_free_entry;
entry = irq_2_pin + entry->next; entry = irq_2_pin + entry->next;
if (++first_free_entry >= PIN_MAP_SIZE) if (++first_free_entry >= pin_map_size)
panic("io_apic.c: ran out of irq_2_pin entries!"); panic("io_apic.c: ran out of irq_2_pin entries!");
} }
entry->apic = apic; entry->apic = apic;
...@@ -634,7 +635,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) ...@@ -634,7 +635,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin)
best_guess = irq; best_guess = irq;
} }
} }
BUG_ON(best_guess >= NR_IRQS); BUG_ON(best_guess >= nr_irqs);
return best_guess; return best_guess;
} }
...@@ -766,7 +767,7 @@ static int pin_2_irq(int idx, int apic, int pin) ...@@ -766,7 +767,7 @@ static int pin_2_irq(int idx, int apic, int pin)
irq += nr_ioapic_registers[i++]; irq += nr_ioapic_registers[i++];
irq += pin; irq += pin;
} }
BUG_ON(irq >= NR_IRQS); BUG_ON(irq >= nr_irqs);
return irq; return irq;
} }
...@@ -801,7 +802,7 @@ static int __assign_irq_vector(int irq, cpumask_t mask) ...@@ -801,7 +802,7 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
int cpu; int cpu;
struct irq_cfg *cfg; struct irq_cfg *cfg;
BUG_ON((unsigned)irq >= NR_IRQS); BUG_ON((unsigned)irq >= nr_irqs);
cfg = &irq_cfg[irq]; cfg = &irq_cfg[irq];
/* Only try and allocate irqs on cpus that are present */ /* Only try and allocate irqs on cpus that are present */
...@@ -875,7 +876,7 @@ static void __clear_irq_vector(int irq) ...@@ -875,7 +876,7 @@ static void __clear_irq_vector(int irq)
cpumask_t mask; cpumask_t mask;
int cpu, vector; int cpu, vector;
BUG_ON((unsigned)irq >= NR_IRQS); BUG_ON((unsigned)irq >= nr_irqs);
cfg = &irq_cfg[irq]; cfg = &irq_cfg[irq];
BUG_ON(!cfg->vector); BUG_ON(!cfg->vector);
...@@ -895,7 +896,7 @@ void __setup_vector_irq(int cpu) ...@@ -895,7 +896,7 @@ void __setup_vector_irq(int cpu)
int irq, vector; int irq, vector;
/* Mark the inuse vectors */ /* Mark the inuse vectors */
for (irq = 0; irq < NR_IRQS; ++irq) { for (irq = 0; irq < nr_irqs; ++irq) {
if (!cpu_isset(cpu, irq_cfg[irq].domain)) if (!cpu_isset(cpu, irq_cfg[irq].domain))
continue; continue;
vector = irq_cfg[irq].vector; vector = irq_cfg[irq].vector;
...@@ -1193,7 +1194,7 @@ __apicdebuginit(void) print_IO_APIC(void) ...@@ -1193,7 +1194,7 @@ __apicdebuginit(void) print_IO_APIC(void)
} }
} }
printk(KERN_DEBUG "IRQ to pin mappings:\n"); printk(KERN_DEBUG "IRQ to pin mappings:\n");
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < nr_irqs; i++) {
struct irq_pin_list *entry = irq_2_pin + i; struct irq_pin_list *entry = irq_2_pin + i;
if (entry->pin < 0) if (entry->pin < 0)
continue; continue;
...@@ -1366,7 +1367,7 @@ void __init enable_IO_APIC(void) ...@@ -1366,7 +1367,7 @@ void __init enable_IO_APIC(void)
int i, apic; int i, apic;
unsigned long flags; unsigned long flags;
for (i = 0; i < PIN_MAP_SIZE; i++) { for (i = 0; i < pin_map_size; i++) {
irq_2_pin[i].pin = -1; irq_2_pin[i].pin = -1;
irq_2_pin[i].next = 0; irq_2_pin[i].next = 0;
} }
...@@ -1658,7 +1659,7 @@ static void ir_irq_migration(struct work_struct *work) ...@@ -1658,7 +1659,7 @@ static void ir_irq_migration(struct work_struct *work)
{ {
int irq; int irq;
for (irq = 0; irq < NR_IRQS; irq++) { for (irq = 0; irq < nr_irqs; irq++) {
struct irq_desc *desc = irq_desc + irq; struct irq_desc *desc = irq_desc + irq;
if (desc->status & IRQ_MOVE_PENDING) { if (desc->status & IRQ_MOVE_PENDING) {
unsigned long flags; unsigned long flags;
...@@ -1707,7 +1708,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) ...@@ -1707,7 +1708,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void)
struct irq_desc *desc; struct irq_desc *desc;
struct irq_cfg *cfg; struct irq_cfg *cfg;
irq = __get_cpu_var(vector_irq)[vector]; irq = __get_cpu_var(vector_irq)[vector];
if (irq >= NR_IRQS) if (irq >= nr_irqs)
continue; continue;
desc = irq_desc + irq; desc = irq_desc + irq;
...@@ -1865,7 +1866,7 @@ static inline void init_IO_APIC_traps(void) ...@@ -1865,7 +1866,7 @@ static inline void init_IO_APIC_traps(void)
* Also, we've got to be careful not to trash gate * Also, we've got to be careful not to trash gate
* 0x80, because int 0x80 is hm, kind of importantish. ;) * 0x80, because int 0x80 is hm, kind of importantish. ;)
*/ */
for (irq = 0; irq < NR_IRQS ; irq++) { for (irq = 0; irq < nr_irqs ; irq++) {
if (IO_APIC_IRQ(irq) && !irq_cfg[irq].vector) { if (IO_APIC_IRQ(irq) && !irq_cfg[irq].vector) {
/* /*
* Hmm.. We don't have an entry for this, * Hmm.. We don't have an entry for this,
...@@ -2279,7 +2280,7 @@ int create_irq(void) ...@@ -2279,7 +2280,7 @@ int create_irq(void)
irq = -ENOSPC; irq = -ENOSPC;
spin_lock_irqsave(&vector_lock, flags); spin_lock_irqsave(&vector_lock, flags);
for (new = (NR_IRQS - 1); new >= 0; new--) { for (new = (nr_irqs - 1); new >= 0; new--) {
if (platform_legacy_irq(new)) if (platform_legacy_irq(new))
continue; continue;
if (irq_cfg[new].vector != 0) if (irq_cfg[new].vector != 0)
......
...@@ -226,7 +226,7 @@ unsigned int do_IRQ(struct pt_regs *regs) ...@@ -226,7 +226,7 @@ unsigned int do_IRQ(struct pt_regs *regs)
int overflow, irq = ~regs->orig_ax; int overflow, irq = ~regs->orig_ax;
struct irq_desc *desc = irq_desc + irq; struct irq_desc *desc = irq_desc + irq;
if (unlikely((unsigned)irq >= NR_IRQS)) { if (unlikely((unsigned)irq >= nr_irqs)) {
printk(KERN_EMERG "%s: cannot handle IRQ %d\n", printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
__func__, irq); __func__, irq);
BUG(); BUG();
...@@ -271,7 +271,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -271,7 +271,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
} }
if (i < NR_IRQS) { if (i < nr_irqs) {
unsigned any_count = 0; unsigned any_count = 0;
spin_lock_irqsave(&irq_desc[i].lock, flags); spin_lock_irqsave(&irq_desc[i].lock, flags);
...@@ -303,7 +303,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -303,7 +303,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == nr_irqs) {
seq_printf(p, "NMI: "); seq_printf(p, "NMI: ");
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "%10u ", nmi_count(j)); seq_printf(p, "%10u ", nmi_count(j));
...@@ -396,7 +396,7 @@ void fixup_irqs(cpumask_t map) ...@@ -396,7 +396,7 @@ void fixup_irqs(cpumask_t map)
unsigned int irq; unsigned int irq;
static int warned; static int warned;
for (irq = 0; irq < NR_IRQS; irq++) { for (irq = 0; irq < nr_irqs; irq++) {
cpumask_t mask; cpumask_t mask;
if (irq == 2) if (irq == 2)
continue; continue;
......
...@@ -81,7 +81,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -81,7 +81,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
} }
if (i < NR_IRQS) { if (i < nr_irqs) {
unsigned any_count = 0; unsigned any_count = 0;
spin_lock_irqsave(&irq_desc[i].lock, flags); spin_lock_irqsave(&irq_desc[i].lock, flags);
...@@ -112,7 +112,7 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -112,7 +112,7 @@ int show_interrupts(struct seq_file *p, void *v)
seq_putc(p, '\n'); seq_putc(p, '\n');
skip: skip:
spin_unlock_irqrestore(&irq_desc[i].lock, flags); spin_unlock_irqrestore(&irq_desc[i].lock, flags);
} else if (i == NR_IRQS) { } else if (i == nr_irqs) {
seq_printf(p, "NMI: "); seq_printf(p, "NMI: ");
for_each_online_cpu(j) for_each_online_cpu(j)
seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count); seq_printf(p, "%10u ", cpu_pda(j)->__nmi_count);
...@@ -201,7 +201,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs) ...@@ -201,7 +201,7 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
stack_overflow_check(regs); stack_overflow_check(regs);
#endif #endif
if (likely(irq < NR_IRQS)) if (likely(irq < nr_irqs))
generic_handle_irq(irq); generic_handle_irq(irq);
else { else {
if (!disable_apic) if (!disable_apic)
...@@ -224,7 +224,7 @@ void fixup_irqs(cpumask_t map) ...@@ -224,7 +224,7 @@ void fixup_irqs(cpumask_t map)
unsigned int irq; unsigned int irq;
static int warned; static int warned;
for (irq = 0; irq < NR_IRQS; irq++) { for (irq = 0; irq < nr_irqs; irq++) {
cpumask_t mask; cpumask_t mask;
int break_affinity = 0; int break_affinity = 0;
int set_affinity = 1; int set_affinity = 1;
......
...@@ -100,7 +100,7 @@ void __init native_init_IRQ(void) ...@@ -100,7 +100,7 @@ void __init native_init_IRQ(void)
*/ */
for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) { for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
int vector = FIRST_EXTERNAL_VECTOR + i; int vector = FIRST_EXTERNAL_VECTOR + i;
if (i >= NR_IRQS) if (i >= nr_irqs)
break; break;
/* SYSCALL_VECTOR was reserved in trap_init. */ /* SYSCALL_VECTOR was reserved in trap_init. */
if (!test_bit(vector, used_vectors)) if (!test_bit(vector, used_vectors))
......
...@@ -142,7 +142,7 @@ void __init init_ISA_irqs(void) ...@@ -142,7 +142,7 @@ void __init init_ISA_irqs(void)
init_bsp_APIC(); init_bsp_APIC();
init_8259A(0); init_8259A(0);
for (i = 0; i < NR_IRQS; i++) { for (i = 0; i < nr_irqs; i++) {
irq_desc[i].status = IRQ_DISABLED; irq_desc[i].status = IRQ_DISABLED;
irq_desc[i].action = NULL; irq_desc[i].action = NULL;
irq_desc[i].depth = 1; irq_desc[i].depth = 1;
......
...@@ -10,6 +10,9 @@ ...@@ -10,6 +10,9 @@
#include <asm/apicdef.h> #include <asm/apicdef.h>
#include <asm/irq_vectors.h> #include <asm/irq_vectors.h>
extern int pin_map_size;
extern int first_free_entry;
static inline int irq_canonicalize(int irq) static inline int irq_canonicalize(int irq)
{ {
return ((irq == 2) ? 9 : irq); return ((irq == 2) ? 9 : irq);
......
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