diff options
Diffstat (limited to 'core/minute-ia/irq_handler.h')
-rw-r--r-- | core/minute-ia/irq_handler.h | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/core/minute-ia/irq_handler.h b/core/minute-ia/irq_handler.h index 30106603d6..deb8048e12 100644 --- a/core/minute-ia/irq_handler.h +++ b/core/minute-ia/irq_handler.h @@ -1,4 +1,4 @@ -/* Copyright 2016 The Chromium OS Authors. All rights reserved. +/* Copyright 2016 The ChromiumOS Authors * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -12,7 +12,7 @@ #include "task.h" #include "task_defs.h" -asm (".include \"core/minute-ia/irq_handler_common.S\""); +asm(".include \"core/minute-ia/irq_handler_common.S\""); /* Helper macros to build the IRQ handler and priority struct names */ #define IRQ_HANDLER(irqname) CONCAT3(_irq_, irqname, _handler) @@ -30,26 +30,24 @@ asm (".include \"core/minute-ia/irq_handler_common.S\""); * Each irq has a irq_data structure placed in .rodata.irqs section, * to be used for dynamically setting up interrupt gates */ -#define DECLARE_IRQ_(irq_, routine_, vector) \ - static void __keep routine_(void); \ - void IRQ_HANDLER(irq_)(void); \ - __asm__ (".section .rodata.irqs\n"); \ - const struct irq_def __keep CONCAT4(__irq_, irq_, _, routine_) \ - __attribute__((section(".rodata.irqs"))) = { \ - .irq = irq_, \ - .routine = routine_, \ - .handler = IRQ_HANDLER(irq_) \ - }; \ - __asm__ ( \ - ".section .text._irq_" #irq_ "_handler\n" \ - "_irq_" #irq_ "_handler:\n" \ - "pusha\n" \ - ASM_LOCK_PREFIX "addl $1, __in_isr\n" \ - "irq_handler_common $0 $0 $" #irq_ "\n" \ - "movl $"#vector ", " STRINGIFY(IOAPIC_EOI_REG_ADDR) "\n" \ - "movl $0x00, " STRINGIFY(LAPIC_EOI_REG_ADDR) "\n" \ - ASM_LOCK_PREFIX "subl $1, __in_isr\n" \ - "popa\n" \ - "iret\n" \ - ) -#endif /* __CROS_EC_IRQ_HANDLER_H */ +#define DECLARE_IRQ_(irq_, routine_, vector) \ + static void __keep routine_(void); \ + void IRQ_HANDLER(irq_)(void); \ + __asm__(".section .rodata.irqs\n"); \ + const struct irq_def __keep CONCAT4(__irq_, irq_, _, routine_) \ + __attribute__((section( \ + ".rodata.irqs"))) = { .irq = irq_, \ + .routine = routine_, \ + .handler = IRQ_HANDLER(irq_) }; \ + __asm__(".section .text._irq_" #irq_ "_handler\n" \ + "_irq_" #irq_ "_handler:\n" \ + "pusha\n" ASM_LOCK_PREFIX "addl $1, __in_isr\n" \ + "irq_handler_common $0 $0 $" #irq_ "\n" \ + "movl $" #vector ", " STRINGIFY( \ + IOAPIC_EOI_REG_ADDR) "\n" \ + "movl $0x00, " STRINGIFY( \ + LAPIC_EOI_REG_ADDR) "\n" ASM_LOCK_PREFIX \ + "subl $1, __in_isr\n" \ + "popa\n" \ + "iret\n") +#endif /* __CROS_EC_IRQ_HANDLER_H */ |