X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Fx86%2Flib%2Finterrupts.c;h=d3ae6d9694aaf0d0e074a1fef74568f6a78a507b;hb=45410da714a1857c9e06573159877cff98fa4129;hp=146ad11fb5373f3223d4ece682af0cf4ce4f8f83;hpb=307367eaffc8638e10ba1784fc66bfe623ae79e2;p=oweals%2Fu-boot.git diff --git a/arch/x86/lib/interrupts.c b/arch/x86/lib/interrupts.c index 146ad11fb5..d3ae6d9694 100644 --- a/arch/x86/lib/interrupts.c +++ b/arch/x86/lib/interrupts.c @@ -33,13 +33,15 @@ #include #include +#if !CONFIG_IS_ENABLED(X86_64) + struct irq_action { interrupt_handler_t *handler; void *arg; unsigned int count; }; -static struct irq_action irq_handlers[CONFIG_SYS_NUM_IRQS] = { {0} }; +static struct irq_action irq_handlers[SYS_NUM_IRQS] = { {0} }; static int spurious_irq_cnt; static int spurious_irq; @@ -47,7 +49,7 @@ void irq_install_handler(int irq, interrupt_handler_t *handler, void *arg) { int status; - if (irq < 0 || irq >= CONFIG_SYS_NUM_IRQS) { + if (irq < 0 || irq >= SYS_NUM_IRQS) { printf("irq_install_handler: bad irq number %d\n", irq); return; } @@ -75,7 +77,7 @@ void irq_free_handler(int irq) { int status; - if (irq < 0 || irq >= CONFIG_SYS_NUM_IRQS) { + if (irq < 0 || irq >= SYS_NUM_IRQS) { printf("irq_free_handler: bad irq number %d\n", irq); return; } @@ -97,7 +99,7 @@ void do_irq(int hw_irq) { int irq = hw_irq - 0x20; - if (irq < 0 || irq >= CONFIG_SYS_NUM_IRQS) { + if (irq < 0 || irq >= SYS_NUM_IRQS) { printf("do_irq: bad irq number %d\n", irq); return; } @@ -118,10 +120,12 @@ void do_irq(int hw_irq) } } } +#endif #if defined(CONFIG_CMD_IRQ) int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { +#if !CONFIG_IS_ENABLED(X86_64) int irq; printf("Spurious IRQ: %u, last unknown IRQ: %d\n", @@ -130,7 +134,7 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) printf("Interrupt-Information:\n"); printf("Nr Routine Arg Count\n"); - for (irq = 0; irq < CONFIG_SYS_NUM_IRQS; irq++) { + for (irq = 0; irq < SYS_NUM_IRQS; irq++) { if (irq_handlers[irq].handler != NULL) { printf("%02d %08lx %08lx %d\n", irq, @@ -139,6 +143,7 @@ int do_irqinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) irq_handlers[irq].count); } } +#endif return 0; }