All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Jason Huang <jason.huang@domain.hid>
Cc: adeos-main@gna.org
Subject: Re: [Adeos-main] When to do __adeos_takeover() on ARM
Date: Sat, 26 Feb 2005 10:25:00 +0100	[thread overview]
Message-ID: <4220406C.2090206@domain.hid> (raw)
In-Reply-To: <20050225175748.cc8e079ba0c14aba9ddfca21e6d650b2.in@domain.hid>

Jason Huang wrote:
> I am trying to port 2.6.8.1 onto ARM9TDMI, TI's Innovator board.
> 
> I found the reason that it crashes when compiling into kernel is that: when
> compiled in kernel, adp_pipelined is not checked; __adeos_handle_irq calls
> handlers when adeos has not yet been completely initialized.
> 

Which is your Adeos patch of reference for porting to 2.6?

> I forced adp_pipelined is checked even when adeos is compiled into kernel. Now
> that the crashing is gone, I encountered another problem: still in
> __adeos_handle_irq, somewhere down in __adeos_sync_stage, just before invoking
> irq handler,
> 	if (adp == adp_root)
> 		adeos_hw_sti();
> This, adeos_hw_sti, causes a new interrupt comes in; and this repeats
> (__irq_svc->__adeos_handle_irq->__adeos_sync_stage->__irq_svc,...).
> 

Removing it is not the right way to fix this; you need to re-enable hw 
IRQs before calling root IRQ handlers since the latter might perform 
lengthy operations like, e.g. PIO. They need to be preemptable by higher 
domain handers, or the latency will skyrocket. A safer solution is to 
make sure that __adeos_sync_stage() is not called from 
__adeos_walk_pipeline() when returning from a domain switch if some 
inner __adeos_sync_stage() from the current domain has been preempted. 
But doing so won't still allow driving high-rate interrupts on too slow 
of a machine though.

> I got stuck here for two days.
> 

Still better than /me being stuck on Adeos for three years though.

> Best regards.
> 
> Jason Huang
> Wescon Technology
> 408-727-8818 x108 
> 
> 
> 
>>-----Original Message-----
>>From: Philippe Gerum [mailto:rpm@xenomai.org]
>>Sent: Thursday, February 24, 2005 12:10 AM
>>To: Jason Huang
>>Cc: adeos-main@gna.org
>>Subject: Re: [Adeos-main] When to do __adeos_takeover() on ARM
>>
>>Jason Huang wrote:
>>
>>>Dear list members,
>>>
>>>If __adeos_takeover is called in init(), the timer interrupt kicks in way
>>
>>before
>>
>>>adp->irqs[] have been initialized and hence adeos_switch_domain is not
>>
>>called
>>
>>>and the interrupt is not handled.
>>>
>>
>>If the takeover has not taken place, then the standard IRQ vectors
>>should be in place after the interrupt layer has been initialized,
>>therefore further interrupts should be handled by the regular Linux
>>handlers as they would if Adeos was absent. Additionally,
>>__adeos_switch_domain() is only called when more than a single domain
>>exists, which sounds unlikely during the boot phase.
>>
>>
>>>Has anybody seen the problem? How/where do I place __adeos_takeover?
>>
>>Which architecture are you working on?
>>
>>
>>>Thanks in advance.
>>>
>>>Jason Huang
>>>Wescon Technology
>>>408-727-8818 x108
>>>
>>>
> 
> 
> 
> _______________________________________________
> Adeos-main mailing list
> Adeos-main@domain.hid
> https://mail.gna.org/listinfo/adeos-main


-- 

Philippe.


  reply	other threads:[~2005-02-26  9:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050205014301.6569.13097.Mailman@domain.hid>
2005-02-24  3:03 ` [Adeos-main] When to do __adeos_takeover() on ARM Jason Huang
2005-02-24  8:10   ` Philippe Gerum
2005-02-26  2:18     ` Jason Huang
2005-02-26  9:25       ` Philippe Gerum [this message]
2005-03-04 21:37     ` [Adeos-main] 'Badness in local_bh_enable at kernel/softirq.c:136' on 2.6.8.1 ARM Jason Huang

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=4220406C.2090206@domain.hid \
    --to=rpm@xenomai.org \
    --cc=adeos-main@gna.org \
    --cc=jason.huang@domain.hid \
    /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.