From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: WONG Sheng Chao <wong@isir.upmc.fr>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Compiling I-pipe patched kernel on beaglebone from Angstrom branch
Date: Wed, 28 Nov 2012 20:55:24 +0100 [thread overview]
Message-ID: <50B66C2C.7010208@xenomai.org> (raw)
In-Reply-To: <e2fc1139f60bc3e194a28bbd3d5fd6b3@isir.upmc.fr>
On 11/28/2012 08:34 PM, WONG Sheng Chao wrote:
> On Wed, 28 Nov 2012 19:57:50 +0100, Gilles Chanteperdrix wrote:
>> On 11/28/2012 07:49 PM, WONG Sheng Chao wrote:
>>
>>> On Wed, 28 Nov 2012 19:14:41 +0100, Gilles Chanteperdrix wrote:
>>>> On 11/28/2012 06:40 PM, WONG Sheng Chao wrote:
>>>>> On Wed, 28 Nov 2012 16:12:58 +0100, WONG Sheng Chao wrote:
>>>>>> On Tue, 27 Nov 2012 19:00:30 +0100, Gilles Chanteperdrix wrote:
>>>>>>> On 11/27/2012 05:40 PM, WONG Sheng Chao wrote:
>>>>>>>> Hi Gilles
>>>>>>>>
>>>>>>>> Following your advice i tracked down the include files which
>>>>>>>> need
>>>>>>>> to be
>>>>>>>> included to remove the error. The kernel now compiles without
>>>>>>>> errors. I
>>>>>>>> followed the instructions in
>>>>>>>>
>>>>>>>> http://www.xenomai.org/pipermail/xenomai/2012-July/000481.html
>>>>>>>>
>>>>>>>> to change the timer.c and also changing the .handle_irq with
>>>>>>>> ipipe_handle_multi_irq
>>>>>>>>
>>>>>>>> From the serial terminal i noticed that with CONFIG_IPIPE = ON
>>>>>>>> the
>>>>>>>> timer is used correctly as in the above post but it hangs at
>>>>>>>
>>>>>>> Are you sure the timer is running correctly?
>>>>>>>
>>>>>>>
>>>>>>>> Any advice on how to proceed to debug this problem? I attach
>>>>>>>> the
>>>>>>>> config files of two cases for your reference.
>>>>>>>
>>>>>>> I would put a printk in linux timer irq handler.
>>>>>>
>>>>>> How should i come about debugging the timer irq handler?
>>>>>
>>>>> Refering to this,
>>>>>
>>>>> http://www.xenomai.org/pipermail/xenomai/2012-May/025838.html
>>>>>
>>>>> I believe that i should be put a printk in the function
>>>>> ipipe_mach_acktimer, as it is called when the linux timer
>>>>> interrupt,
>>>>> but
>>>>> I after checking in these files, i still couldn't find it.
>>>>
>>>> ipipe_mach_acktimer disappeared, it is in the pre I-pipe core
>>>> patches.
>>>> The documentation for the I-pipe core patches on the ARM
>>>> architecture
>>>> is
>>>> here:
>>>> http://www.xenomai.org/index.php/I-pipe-core:ArmPorting
>>>>
>>>> The linux timer interrupt handler given as example in this
>>>> documentation
>>>> is "omap2_gp_timer_interrupt" function, and is probably the same
>>>> for
>>>> your omap3 derivative.
>>>
>>> Thanks for the information. So to proceed i looked at the function
>>>
>>> static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
>>> {
>>> struct clock_event_device *evt = &clockevent_gpt;
>>>
>>> if (!clockevent_ipipe_stolen(evt))
>>> omap2_gp_timer_ack();
>>>
>>> if (num_online_cpus() == 1)
>>> __ipipe_tsc_update();
>>>
>>> evt->event_handler(evt);
>>> return IRQ_HANDLED;
>>> }
>>>
>>> when clockevent_ipipe_stolen == 0
>>> the omap2_gp_timer_ack is called to acknowledge the linux timer
>>> interrupt (with CONFIG_XENOMAI = no)
>>>
>>> I put a printk in omap2_gp_timer_ack and i notice that in both cases
>>> of
>>> CONFIG_IPIPE = yes and CONFIG_IPIPE = no
>>>
>>> the omap2_gp_timer_ack function get called.
>>>
>>> But i am not sure how to interrupt this. I guess this means that the
>>> timer interrupt is being handled. But it still does not tell me why
>>> the
>>> kernel does not boot properly when CONFIG_IPIPE = yes.
>>
>>
>> Put a static counter in the timer_ack function to only emit a printk
>> every HZ ticks, and check whether the timer is ticking when you get
>> the
>> freeze in the at24c driver initialization.
>
> Yes the timer is still ticking after the freeze in the at24c driver
> initialization. Does this means that the ipipe_handle_multi_irq in
> omap_intc_handle_irq is not handling the multiple irq properly?
No. It simply means the problem is not the timer. Next usual suspect is
the clocksource. Did you get the message about clocksource switching to
ipipe_tsc and does ipipe_tsc_get return increasing values?
--
Gilles.
next prev parent reply other threads:[~2012-11-28 19:55 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 9:45 [Xenomai] Compiling I-pipe patched kernel on beaglebone from Angstrom branch WONG Sheng Chao
2012-11-23 9:58 ` Gilles Chanteperdrix
2012-11-23 12:35 ` WONG Sheng Chao
2012-11-23 16:29 ` Gilles Chanteperdrix
2012-11-23 17:22 ` WONG Sheng Chao
2012-11-23 17:45 ` Gilles Chanteperdrix
2012-11-27 16:40 ` WONG Sheng Chao
2012-11-27 16:52 ` WONG Sheng Chao
2012-11-27 18:00 ` Gilles Chanteperdrix
2012-11-28 15:12 ` WONG Sheng Chao
2012-11-28 17:40 ` WONG Sheng Chao
2012-11-28 18:14 ` Gilles Chanteperdrix
2012-11-28 18:49 ` WONG Sheng Chao
2012-11-28 18:57 ` Gilles Chanteperdrix
2012-11-28 19:34 ` WONG Sheng Chao
2012-11-28 19:55 ` Gilles Chanteperdrix [this message]
2012-11-28 20:22 ` WONG Sheng Chao
2012-11-29 12:10 ` WONG Sheng Chao
[not found] <mailman.2.1354034873.1423.xenomai@xenomai.org>
2012-11-27 18:42 ` Stephan Kappertz
2012-11-27 20:05 ` WONG Sheng Chao
[not found] <mailman.0.1354186801.18650.xenomai@xenomai.org>
2012-11-29 12:16 ` Stephan Kappertz
2012-11-30 8:54 ` WONG Sheng Chao
2012-11-30 11:45 ` Michael Haberler
2012-11-30 13:42 ` Gilles Chanteperdrix
2012-11-30 19:22 ` Michael Haberler
2012-12-02 13:53 ` WONG Sheng Chao
2012-12-02 14:45 ` Gilles Chanteperdrix
2012-12-02 15:15 ` WONG Sheng Chao
2012-12-02 16:14 ` Gilles Chanteperdrix
2012-12-03 14:31 ` WONG Sheng Chao
2012-12-03 18:30 ` WONG Sheng Chao
2012-12-03 19:57 ` Gilles Chanteperdrix
2012-12-04 9:26 ` WONG Sheng Chao
2012-12-04 9:45 ` WONG Sheng Chao
2012-12-04 19:29 ` Gilles Chanteperdrix
2012-12-10 18:08 ` WONG Sheng Chao
2012-12-10 19:07 ` Gilles Chanteperdrix
2012-12-10 20:23 ` WONG Sheng Chao
2012-12-10 20:32 ` Gilles Chanteperdrix
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=50B66C2C.7010208@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=wong@isir.upmc.fr \
--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.