Hi Dmitry,

some news from the testing front: It works fairly well - and it doesn't
crash =:). We set up a quite demanding test scenario which consists of
two Sick Laser scanners feeding two UART ports at 500 Kbit/s. The UARTs
are on a special PC104 card, sharing the same edge-triggered IRQ line.
We were able to get data from both devices running at the same time. But
we noticed some overruns of MAX_EDGEIRQ_COUNTER (a few per second). The
next step on Monday will be to generate a back-trace with the
ipipe-tracer to see if the system is "just" overloaded or if we are
still facing problems with the driver and/or IRQ layer. Will be very
interesting to see on that radar what's happing.

I attached two patches. One enables xeno_16550A to use the new features,
and the other improves the /proc output of your patch slightly.

Furthermore, we noticed that virtual IRQs (namely the printk forwarder)
get displayed under /proc/xenomai/irq too. Is this useful? We wondered
what IRQ 34 might be until code analysis of Xenomai and Ipipe revealed
it (__ipipe_printk_virq). If it is considered useful, we should at least
mark those irqs virtual in the output or even give them names as well.

Then I stumbled over the xnintr structure. Why do you keep a copy of the
device name? A "const char *" should be enough, we just have to demand
that it will remain valid as long as the xnintr structure itself (i.e.
during the IRQ being attached). Saves a few bytes. :)

Index: ksrc/drivers/16550A/16550A.c
--- ksrc/drivers/16550A/16550A.c        (revision 556)
+++ ksrc/drivers/16550A/16550A.c        (working copy)
@@ -238,7 +238,7 @@
     int                     rbytes = 0;
     int                     events = 0;
     int                     modem;
-    int                     ret = RTDM_IRQ_PROPAGATE;
+    int                     ret = RTDM_IRQ_PROPAGATE | RTDM_IRQ_NOINT;
     ctx = rtdm_irq_get_arg(irq_context, struct rt_16550_context);
@@ -446,7 +446,8 @@
     ctx = (struct rt_16550_context *)context->dev_private;
     ret = rtdm_irq_request(&ctx->irq_handle, irq[dev_id], rt_16550_interrupt,
-                           0, context->device->proc_name, ctx);
+                           RTDM_IRQTYPE_SHARED|RTDM_IRQTYPE_EDGE,
+                           context->device->proc_name, ctx);
     if (ret < 0)
         return ret;
--- xenomai/ksrc/nucleus/pod.c.orig     2006-02-10 14:30:32.000000000 +0100
+++ xenomai/ksrc/nucleus/pod.c  2006-02-10 14:30:49.000000000 +0100
@@ -3071,7 +3071,7 @@ unlock_and_exit:
        source will be attached directly by the arch-dependent layer
        (xnarch_start_timer). */
-    xnintr_init(&nkclock,NULL,XNARCH_TIMER_IRQ,tickhandler,NULL,0);
+    xnintr_init(&nkclock,"[timer]",XNARCH_TIMER_IRQ,tickhandler,NULL,0);

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to