diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2019-04-26 14:40:09 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-01 01:50:28 -0700 |
commit | 289bbc2855f38aaffd3fc763f62afee07ab9a666 (patch) | |
tree | 6646e48cfa96be3c2d5c82f8698d426b2eed65c3 /core/minute-ia/irq_handler.h | |
parent | a24c74c759ba98df67935a344e31dfe494605237 (diff) | |
download | chrome-ec-289bbc2855f38aaffd3fc763f62afee07ab9a666.tar.gz |
ish: move REG32 macros for interrupt control into header files
This is a good portion of the fixes needed for b:130573158, but we
still have the HECI registers to deal with. I have those in a separate
CL as they were giving me a significant amount of trouble.
BUG=b:130573158
BRANCH=none
TEST=arcada_ish is functioning as normal after changes
Change-Id: I9c209a329d61f7f55c260006cdffbfc705521195
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1586458
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'core/minute-ia/irq_handler.h')
-rw-r--r-- | core/minute-ia/irq_handler.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/core/minute-ia/irq_handler.h b/core/minute-ia/irq_handler.h index 1d44a577bd..3b33fbb073 100644 --- a/core/minute-ia/irq_handler.h +++ b/core/minute-ia/irq_handler.h @@ -35,24 +35,24 @@ struct irq_data { * 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) \ - void __keep routine(void); \ - void IRQ_HANDLER(irq)(void); \ - __asm__ (".section .rodata.irqs\n"); \ - const struct irq_data __keep CONCAT4(__irq_, irq, _, routine) \ - __attribute__((section(".rodata.irqs"))) = { routine, \ - IRQ_HANDLER(irq), \ - 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) "\n" \ - "movl $0x00, " STRINGIFY(LAPIC_EOI_REG) "\n" \ - ASM_LOCK_PREFIX "subl $1, __in_isr\n" \ - "popa\n" \ - "iret\n" \ +#define DECLARE_IRQ_(irq, routine, vector) \ + void __keep routine(void); \ + void IRQ_HANDLER(irq)(void); \ + __asm__ (".section .rodata.irqs\n"); \ + const struct irq_data __keep CONCAT4(__irq_, irq, _, routine) \ + __attribute__((section(".rodata.irqs"))) = { routine, \ + IRQ_HANDLER(irq), \ + 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 */ |