All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Lowell Gilbert <kludge@be-well.ilk.org>, xenomai@xenomai.org
Subject: Re: [Xenomai] interrupt service
Date: Wed, 25 Feb 2015 19:35:12 +0100	[thread overview]
Message-ID: <54EE15E0.10302@xenomai.org> (raw)
In-Reply-To: <54EE07A9.4040702@xenomai.org>

On 02/25/2015 06:34 PM, Philippe Gerum wrote:
> On 02/25/2015 05:22 PM, Lowell Gilbert wrote:
>> Thanks for the help, even if I'm not making much progress yet.
>>
>> Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> writes:
>>
>>> On Tue, Feb 24, 2015 at 06:01:18PM -0500, Lowell Gilbert wrote:
>>
>>> To have a real basic configuration, you should use Xenomai 2.6.4 and
>>> with the latest I-pipe patch for Linux 3.14. Unmodified.
>>
>> I went ahead and did that, just to be sure. Results were the same.
>>
>>>> put the i-pipe TSC code back into smp_twd.c
>>>> to get a high-resolution clock.
>>>
>>> The TSC code in smp_twd.c conflicts with Linux global timer driver.
>>> Simply enable the global timer driver if you want to use the global
>>> timer as tsc.
>>
>> Got it. Thanks.
>>
>>
>> Philippe Gerum <rpm@xenomai.org> writes:
>>
>>> -	return 0;
>>> +	return RTDM_IRQ_HANDLED;
>>
>> Yes, that bug crept in when I was building the simplified test case.
>> My original driver used the correct return values.
>>
>>
>> I'm still confused by the fact that the thread wakes up fine if it's
>> signalled (or unblocked, etc.) from a driver operation. But if the ISR
>> tries to do the same, it fails. In fact, if I use rtdm_task_unblock(), I
>> get an error (0) returned to the ISR.
>>
>>
> 
> We need to know what happens in the kernel from the ISR then all along
> the IRQ exit path. To this end, please enable CONFIG_IPIPE_TRACE in the
> kernel configuration. Assuming you run Xenomai 2.6.4, you will need to
> patch this snippet into the Xenomai kernel code:
> 
> diff --git a/ksrc/nucleus/intr.c b/ksrc/nucleus/intr.c
> index ef36036..08ee192 100644
> --- a/ksrc/nucleus/intr.c
> +++ b/ksrc/nucleus/intr.c
> @@ -433,6 +433,9 @@ static inline int xnintr_irq_detach(xnintr_t *intr)
> 
>  #endif /* !CONFIG_XENO_OPT_SHIRQ */
> 
> +int debug_event_signal;
> +EXPORT_SYMBOL(debug_event_signal);
> +
>  /*
>   * Low-level interrupt handler dispatching non-shared ISRs -- Called with
>   * interrupts off.
> @@ -504,6 +507,9 @@ static void xnintr_irq_handler(unsigned irq, void
> *cookie)
>  	}
> 
>  	trace_mark(xn_nucleus, irq_exit, "irq %u", irq);
> +
> +	if (debug_event_signal)
> +		ipipe_trace_freeze(0xfefefefe);
>  }
> 
>  int __init xnintr_mount(void)
> 

This patch assumes that CONFIG_XENO_OPT_SHIRQ is _disabled_ in your
Kconfig, which is the default setup.

-- 
Philippe.


  reply	other threads:[~2015-02-25 18:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-18 22:03 [Xenomai] interrupt service Lowell Gilbert
2015-02-18 22:08 ` Gilles Chanteperdrix
2015-02-19  4:44   ` Lowell Gilbert
2015-02-19 21:06     ` Lowell Gilbert
2015-02-20 19:38     ` Lowell Gilbert
2015-02-20 22:57       ` Gilles Chanteperdrix
2015-02-24 23:01         ` Lowell Gilbert
2015-02-24 23:34           ` Gilles Chanteperdrix
2015-02-25 16:22             ` Lowell Gilbert
2015-02-25 17:34               ` Philippe Gerum
2015-02-25 18:35                 ` Philippe Gerum [this message]
2015-02-25 20:41                 ` Lowell Gilbert
2015-02-25 21:02                   ` Lowell Gilbert
2015-02-26 11:19                     ` Philippe Gerum
2015-02-26 16:38                       ` Lowell Gilbert
2015-02-26 17:26                         ` Gilles Chanteperdrix
2015-02-26 17:56                         ` Philippe Gerum
2015-02-26 19:25                           ` Lowell Gilbert
2015-02-26 20:11                             ` Gilles Chanteperdrix
2015-02-26 21:58                               ` Lowell Gilbert
2015-02-26 22:37                                 ` Gilles Chanteperdrix
2015-02-26 23:12                                   ` Lowell Gilbert
2015-02-26 23:09                               ` Philippe Gerum
2015-03-06 22:57                               ` Lowell Gilbert
2015-03-06 22:58                               ` Lowell Gilbert
2015-03-08 15:52                                 ` Gilles Chanteperdrix
2015-03-09 13:28                                   ` Lowell Gilbert
2015-02-26 20:24                             ` Philippe Gerum
2015-02-26 22:55                               ` Lowell Gilbert
2015-02-26 23:17                                 ` Daniele Nicolodi
2015-02-26 23:21                                 ` Philippe Gerum
2015-02-27  7:15                                 ` Tom Evans
2015-02-25  8:30           ` Philippe Gerum
2015-02-25  9:36             ` Philippe Gerum

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=54EE15E0.10302@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=kludge@be-well.ilk.org \
    --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.