From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Bosko Radivojevic <bosko.radivojevic@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Interrupt priorities and handling problems
Date: Sun, 25 May 2008 16:31:18 +0200 [thread overview]
Message-ID: <18489.30774.304777.148110@domain.hid> (raw)
In-Reply-To: <d6c8ef150805231056n3a9ea030jada65bd5a7c2a2c0@domain.hid>
[-- Attachment #1: message body and .signature --]
[-- Type: text/plain, Size: 1254 bytes --]
Bosko Radivojevic wrote:
> Hi all!
>
> Before I ask my questions, I'll remind about my environment:
> AT91SAM9260 based board (ARM), Xenomai 2.4.3, Kernel 2.6.24, I-Pipe
> 1.9-01. We have external interrupt source connected to PIO line (IRQ1
> line) which should 'wake up' our code every 1ms. For the sake of
> performances, we create interrupt handler in kernel space.
>
> 1. Two interrupts instead of one
>
> Somehow, ISR get called twice for every single interrupt, at the
> falling edge. I've tried to set interrupt source type (setting some
> registers directly on the microcontroller) but whatever I set, ISR
> call happens at the falling edge. The second comes right after the
> first one, but not together.
>
> When I tried to handle interrupt from the userspace, rt_intr_wait() returns
> 1, so it looks like "second" interrupt comes a little bit later. If I
> generate more (n) interrupts during handling one, the next
> rt_intr_wait() returns n*2+1. This +1 is the second interrupt that
> came right after the handled one.
>
> The quite weird thing is that sometimes (not so often, like every 1
> hour) ISR is called just once. Where should I start digging?
Does the following patch help ?
--
Gilles.
[-- Attachment #2: xeno-arm-use-mask-unmask-instead-of-enable-disable.diff --]
[-- Type: text/plain, Size: 949 bytes --]
Index: include/asm-arm/wrappers.h
===================================================================
--- include/asm-arm/wrappers.h (revision 3873)
+++ include/asm-arm/wrappers.h (working copy)
@@ -64,8 +64,8 @@ typedef irqreturn_t (*rthal_irq_host_han
extern void (*fp_init)(union fp_state *);
#else /* >= 2.6.19 */
#define rthal_irq_desc_lock(irq) (&rthal_irq_descp(irq)->lock)
-#define rthal_irq_chip_enable(irq) ({ rthal_irq_descp(irq)->chip->enable(irq); 0; })
-#define rthal_irq_chip_disable(irq) ({ rthal_irq_descp(irq)->chip->disable(irq); 0; })
+#define rthal_irq_chip_enable(irq) ({ rthal_irq_descp(irq)->chip->unmask(irq); 0; })
+#define rthal_irq_chip_disable(irq) ({ rthal_irq_descp(irq)->chip->mask(irq); 0; })
#define rthal_irq_chip_end(irq) ({ rthal_irq_descp(irq)->ipipe_end(irq, rthal_irq_descp(irq)); 0; })
typedef irq_handler_t rthal_irq_host_handler_t;
#define rthal_mark_irq_disabled(irq) do { \
next prev parent reply other threads:[~2008-05-25 14:31 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-23 17:56 [Xenomai-help] Interrupt priorities and handling problems Bosko Radivojevic
2008-05-23 19:08 ` Gilles Chanteperdrix
2008-05-23 19:34 ` Bosko Radivojevic
2008-05-23 19:42 ` Gilles Chanteperdrix
2008-05-23 19:48 ` Bosko Radivojevic
2008-05-23 19:49 ` Gilles Chanteperdrix
2008-05-23 19:51 ` Bosko Radivojevic
2008-05-25 14:31 ` Gilles Chanteperdrix [this message]
2008-05-26 13:26 ` Bosko Radivojevic
2008-05-26 16:29 ` Bosko Radivojevic
2008-05-26 16:47 ` Gilles Chanteperdrix
2008-05-26 16:59 ` Gilles Chanteperdrix
2008-05-26 17:04 ` Bosko Radivojevic
2008-05-26 17:14 ` Gilles Chanteperdrix
2008-05-26 17:16 ` Bosko Radivojevic
2008-05-26 17:21 ` Gilles Chanteperdrix
2008-05-26 17:47 ` Bosko Radivojevic
2008-05-27 11:31 ` Bosko Radivojevic
2008-05-27 12:11 ` Gilles Chanteperdrix
2008-05-27 13:08 ` Bosko Radivojevic
2008-05-28 9:16 ` Bosko Radivojevic
2008-05-28 10:14 ` Bosko Radivojevic
2008-05-28 12:27 ` Gilles Chanteperdrix
2008-05-26 16:59 ` Bosko Radivojevic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18489.30774.304777.148110@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=bosko.radivojevic@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.