All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wayne Warren <wwarren@emacinc.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Adeos I-Pipe patch problem on vendor-specific kernel
Date: Tue, 23 Oct 2012 10:32:24 -0500	[thread overview]
Message-ID: <1351006344.2975.60.camel@ENG-09-LX.emacinc.com> (raw)
In-Reply-To: <5085B6BC.8060906@xenomai.org>

Yeah, this is actually an OMAP3 processor, except the kernel tree you
are using (if it is the Adeos I-Pipe one) I think was branched from the
vanilla kernel whereas the one we are using is branched from a TI kernel
released specifically for the AM3517 (previously known as OMAP3517, I
think? still confused about that).

The current problem is in __ipipe_stall_root(). After analyzing the
GDB-disassembled function, I can see that there are three "ldr" and one
"str" instructions that might be the cause of the Data Abort exception
that leads into the kernel panic. These instructions all load or store
values related to the __ipipe_percpu_darray variable. Specifically, they
deal with the first entry in this array, clear the status member (ldr,
bic) and write it back (str), check the value of irqpend_himap (ldr,
cmp) to determine if __ipipe_sync_stage should be called (the answer is
no), then try to re-enable interrupts using "cpsie"

The Data Abort exception actually occurs on the "cpsie" instruction, but
according to the ARMv7-A/ARMv7-R architecture reference manual, the
"CPS" type instructions do not generate any exceptions. However, the
manual also indicates that in Debug mode the behavior of the processor
when this instruction is called can be unpredictable.

Anyway, I am somewhat at a loss. The "ldr" and "str" instructions used
perform the operations as expected according to printouts of
__ipipe_cpu_darray.

Wayne

On Mon, 2012-10-22 at 23:12 +0200, Gilles Chanteperdrix wrote:
> On 10/22/2012 09:34 PM, Wayne Warren wrote:
> 
> > 
> >>
> >> Chances are you are calling into Adeos code too early. Normally, the
> >> first call to local_irq_enable() happens in init/main.c, after the call
> >> to __ipipe_init() (you should see both in function start_kernel). I
> >> suspect you can not call services such as __set_irq_handler too early in
> >> the boot process.
> > 
> > In the code I am looking at, local_irq_enable() is called after
> > ipipe_init().
> > 
> > Are you saying that the __set_irq_handler() service should not be called
> > before ipipe_init() also? Cause it is called after ipipe_init_early()
> > but before ipipe_init().
> 
> 
> The same order happens on OMAP3 for the primary interrupt controller.
> So, that should work.
> 



  reply	other threads:[~2012-10-23 15:32 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-02 21:08 [Xenomai] Adeos I-Pipe patch problem on vendor-specific kernel Wayne Warren
2012-10-02 21:32 ` Gilles Chanteperdrix
2012-10-02 21:35   ` Gilles Chanteperdrix
2012-10-04 16:57     ` Wayne Warren
2012-10-04 17:09       ` Gilles Chanteperdrix
2012-10-04 18:02         ` Gilles Chanteperdrix
2012-10-05  8:06         ` Gilles Chanteperdrix
2012-10-05 18:47           ` Wayne Warren
2012-10-05 20:16             ` Gilles Chanteperdrix
2012-10-05 21:47               ` Wayne Warren
2012-10-05 22:43                 ` Gilles Chanteperdrix
2012-10-06  4:29                   ` Wayne Warren
2012-10-06  9:46                     ` Gilles Chanteperdrix
2012-10-09 20:55                       ` Wayne Warren
2012-10-09 21:12                         ` Gilles Chanteperdrix
2012-10-19 21:22                           ` Wayne Warren
2012-10-20  1:33                             ` Gilles Chanteperdrix
2012-10-22 19:22                               ` Wayne Warren
2012-10-22 19:25                                 ` Gilles Chanteperdrix
2012-10-22 19:34                                   ` Wayne Warren
2012-10-22 21:12                                     ` Gilles Chanteperdrix
2012-10-23 15:32                                       ` Wayne Warren [this message]
2012-10-23 20:12                                         ` Gilles Chanteperdrix
2012-10-24 17:32                                           ` Wayne Warren
2012-10-24 17:38                                             ` Gilles Chanteperdrix
2012-10-24 17:55                                               ` Wayne Warren
2012-10-24 18:05                                                 ` Gilles Chanteperdrix
2012-10-24 18:26                                                   ` Wayne Warren
2012-10-24 18:36                                                     ` Gilles Chanteperdrix
2012-10-24 17:36                                           ` Wayne Warren
2012-10-24 17:57                                             ` Gilles Chanteperdrix
2012-10-20  8:24                             ` Gilles Chanteperdrix
2012-10-19 21:32                           ` Wayne Warren
2012-10-20  1:36                             ` 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=1351006344.2975.60.camel@ENG-09-LX.emacinc.com \
    --to=wwarren@emacinc.com \
    --cc=gilles.chanteperdrix@xenomai.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.