Commit 19ca214a authored by Philippe Gerum's avatar Philippe Gerum
Browse files

irq_pipeline: genirq: fix order of hard+virtual irq disable sequence

The way local_irq_disable_full() works may cause interrupt events to
lag in the interrupt log inadvertently if the code path does not
synchronize such log afterwards. As a result, some interrupts may not
get played when they should, causing breakage.

Since calling inband_irq_disable() with hard irqs off is deemed ok
(unlike with inband_irq_enable()), invert the two operations so that
hard irqs are disabled before the in-band stage is stalled, preventing
any interrupt to be logged in between.

See https://xenomai.org/pipermail/xenomai/2021-June/045476.html.

This fixes this issue:
https://xenomai.org/pipermail/xenomai/2021-May/045071.html

Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarPhilippe Gerum <rpm@xenomai.org>
Reported-by: default avatarFlorian Bezdeka <florian.bezdeka@siemens.com>
parent 8994faca
...@@ -254,14 +254,14 @@ extern void warn_bogus_irq_restore(void); ...@@ -254,14 +254,14 @@ extern void warn_bogus_irq_restore(void);
#define local_irq_disable_full() \ #define local_irq_disable_full() \
do { \ do { \
local_irq_disable(); \
hard_local_irq_disable(); \ hard_local_irq_disable(); \
local_irq_disable(); \
} while (0) } while (0)
#define local_irq_save_full(__flags) \ #define local_irq_save_full(__flags) \
do { \ do { \
local_irq_save(__flags); \
hard_local_irq_disable(); \ hard_local_irq_disable(); \
local_irq_save(__flags); \
} while (0) } while (0)
#define local_irq_restore_full(__flags) \ #define local_irq_restore_full(__flags) \
......
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