Module: xenomai-3
Branch: stable-3.0.x
Commit: 9980b96df1f6a038b0f08d31c8f0d4582d49e166
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=9980b96df1f6a038b0f08d31c8f0d4582d49e166

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Tue Dec  1 08:11:09 2015 +0100

cobalt/intr: Fix unhandled interrupt detection

Only account an interrupt as unhandled if no handler reported
XN_IRQ_HANDLED. That specifically prevents in shared interrupt scenarios
that a single XN_IRQ_NONE report marks the line as unhandled even if
another handler reported it as handled.

This is a regression of aefaab5d03.

Reported-by: Алексей Герасёв <alexey.gera...@gmail.com>
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 kernel/cobalt/intr.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/intr.c b/kernel/cobalt/intr.c
index 50ff595..14dc0b3 100644
--- a/kernel/cobalt/intr.c
+++ b/kernel/cobalt/intr.c
@@ -337,7 +337,7 @@ static void xnintr_vec_handler(unsigned int irq, void 
*cookie)
 
        xnlock_put(&vec->lock);
 
-       if (unlikely(s & XN_IRQ_NONE)) {
+       if (unlikely(!(s & XN_IRQ_HANDLED))) {
                if (++vec->unhandled == XNINTR_MAX_UNHANDLED) {
                        printk(XENO_ERR "%s: IRQ%d not handled. Disabling IRQ 
line\n",
                               __FUNCTION__, irq);
@@ -423,7 +423,7 @@ static void xnintr_edge_vec_handler(unsigned int irq, void 
*cookie)
                printk(XENO_ERR "%s: failed to get the IRQ%d line free\n",
                       __FUNCTION__, irq);
 
-       if (unlikely(s & XN_IRQ_NONE)) {
+       if (unlikely(!(s & XN_IRQ_HANDLED))) {
                if (++vec->unhandled == XNINTR_MAX_UNHANDLED) {
                        printk(XENO_ERR "%s: IRQ%d not handled. Disabling IRQ 
line\n",
                               __FUNCTION__, irq);
@@ -612,7 +612,7 @@ static void xnintr_irq_handler(unsigned int irq, void 
*cookie)
 
        s = intr->isr(intr);
        XENO_WARN_ON_ONCE(USER, (s & XN_IRQ_STATMASK) == 0);
-       if (unlikely(s & XN_IRQ_NONE)) {
+       if (unlikely(!(s & XN_IRQ_HANDLED))) {
                if (++intr->unhandled == XNINTR_MAX_UNHANDLED) {
                        printk(XENO_ERR "%s: IRQ%d not handled. Disabling IRQ 
line\n",
                               __FUNCTION__, irq);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to