* [Xenomai-core] [PATCH] hal/arm : rthal_irq_enable/disable/end corrections
@ 2006-03-01 8:09 Dmitry Adamushko
2006-03-01 9:12 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Adamushko @ 2006-03-01 8:09 UTC (permalink / raw)
To: xenomai
[-- Attachment #1.1: Type: text/plain, Size: 325 bytes --]
Hello,
Linux'es enable/disable_irq() should not be called from the primary domain.
In short, they use a normal linux spinlock + irq are off only for the Linux
domain;
the precise description is available here :
https://mail.gna.org/public/xenomai-core/2006-02/msg00213.html
--
Best regards,
Dmitry Adamushko
[-- Attachment #1.2: Type: text/html, Size: 441 bytes --]
[-- Attachment #2: arm-hal.c.patch --]
[-- Type: application/octet-stream, Size: 1016 bytes --]
--- hal.c-CVS 2006-03-01 08:57:40.000000000 +0100
+++ hal.c 2006-03-01 08:59:40.000000000 +0100
@@ -161,7 +161,11 @@ int rthal_irq_enable (unsigned irq)
if (irq >= IPIPE_NR_XIRQS)
return -EINVAL;
- enable_irq(irq);
+ if (rthal_irq_descp(irq)->handler == NULL ||
+ rthal_irq_descp(irq)->handler->enable == NULL)
+ return -ENODEV;
+
+ rthal_irq_descp(irq)->handler->enable(irq);
return 0;
}
@@ -171,19 +175,18 @@ int rthal_irq_disable (unsigned irq)
if (irq >= IPIPE_NR_XIRQS)
return -EINVAL;
- disable_irq(irq);
+ if (rthal_irq_descp(irq)->handler == NULL ||
+ rthal_irq_descp(irq)->handler->disable == NULL)
+ return -ENODEV;
+
+ rthal_irq_descp(irq)->handler->disable(irq);
return 0;
}
int rthal_irq_end (unsigned irq)
{
- if (irq >= IPIPE_NR_XIRQS)
- return -EINVAL;
-
- enable_irq(irq);
-
- return 0;
+ return rthal_irq_enable(irq);
}
static inline int do_exception_event (unsigned event, unsigned domid, void *data)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai-core] [PATCH] hal/arm : rthal_irq_enable/disable/end corrections
2006-03-01 8:09 [Xenomai-core] [PATCH] hal/arm : rthal_irq_enable/disable/end corrections Dmitry Adamushko
@ 2006-03-01 9:12 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2006-03-01 9:12 UTC (permalink / raw)
To: Dmitry Adamushko; +Cc: xenomai
Dmitry Adamushko wrote:
>
> Hello,
>
> Linux'es enable/disable_irq() should not be called from the primary domain.
Applied, thanks.
>
> In short, they use a normal linux spinlock + irq are off only for the
> Linux domain;
> the precise description is available here :
> https://mail.gna.org/public/xenomai-core/2006-02/msg00213.html
>
>
> --
> Best regards,
> Dmitry Adamushko
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-01 9:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-01 8:09 [Xenomai-core] [PATCH] hal/arm : rthal_irq_enable/disable/end corrections Dmitry Adamushko
2006-03-01 9:12 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.