Module: xenomai-head
Branch: master
Commit: b65609a24b9097b59323bf33d6d792230e147b76
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=b65609a24b9097b59323bf33d6d792230e147b76

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Wed Apr 22 18:44:23 2009 +0200

nucleus: Move xnarch_set_irq_affinity out of intrlock

There is no need to hold intrlock while setting the affinity of the
to-be-registered IRQ. Additionally, we have troubles with MSI code that
can use Linux locks from within this service. So move the affinity
adjustment out of the critical section.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 ksrc/nucleus/intr.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ksrc/nucleus/intr.c b/ksrc/nucleus/intr.c
index 870efb1..dba3b26 100644
--- a/ksrc/nucleus/intr.c
+++ b/ksrc/nucleus/intr.c
@@ -721,11 +721,12 @@ int xnintr_attach(xnintr_t *intr, void *cookie)
        intr->cookie = cookie;
        memset(&intr->stat, 0, sizeof(intr->stat));
 
-       xnlock_get_irqsave(&intrlock, s);
-
 #ifdef CONFIG_SMP
        xnarch_set_irq_affinity(intr->irq, nkaffinity);
 #endif /* CONFIG_SMP */
+
+       xnlock_get_irqsave(&intrlock, s);
+
        err = xnintr_irq_attach(intr);
 
        if (!err)


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to