diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 14:44:10 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-30 22:05:09 +0000 |
commit | 53ad5301be22ea949bdda2856f469d25c80336bd (patch) | |
tree | b0f60afa5cd6eb644f3bbb616e1c917a833efbd6 /core | |
parent | 6ed3315f0d00401e3d8f640278db0b606479906d (diff) | |
download | chrome-ec-53ad5301be22ea949bdda2856f469d25c80336bd.tar.gz |
core/minute-ia/irq_handler.h: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I1e322ce702445cb43355d6409907c8f5c9939e47
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729854
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/minute-ia/irq_handler.h | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/core/minute-ia/irq_handler.h b/core/minute-ia/irq_handler.h index 30106603d6..5640f8dbb4 100644 --- a/core/minute-ia/irq_handler.h +++ b/core/minute-ia/irq_handler.h @@ -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 */ |