All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: adeos-main@gna.org
Subject: Re: [Adeos-main] [PATCH] ipipe i.MXL freeze's boot
Date: Wed, 25 Feb 2009 16:14:11 +0100	[thread overview]
Message-ID: <49A56043.7000009@domain.hid> (raw)
In-Reply-To: <1aedae1f462bc98ca512e1e6f0f18a43@domain.hid>

Gwenhaël wrote:
> On Wed, 25 Feb 2009 14:06:14 +0100, Gilles Chanteperdrix
> <gilles.chanteperdrix@xenomai.org> wrote:
>> Gwenhaël wrote:
>>> With i.MXL processor, kernel patched with
>>> adeos-2.6.27-ipipe-1.12-00.patch wait indefinitly for timer
>>> calibration.
>>> Tick event never appear. This patch modify acktimer() in
>>> arch/arm/mach-imx/time.c.
>>>
>>> I need to know if this modification is good (without adding
>>> new errors).
>> ipipe_mach_update_tsc should be called from imx_timer_interrupt, so,
>> there is no need to call it from acktimer (and in fact, avoiding the
>> call to update_tsc in acktimer reduces the timer interrupt latency). So,
>> maybe what is needed and is missing is simply to read
>> IMX_TSTAT(TIMER_BASE) ?
> 
> I've made modifications on patch thanks to your assumption. 
> The new patch work fine.
> 
> Thank you very much
> 
> Gwenhael
> 
> Signed-off-by: gwenhael.goavec-merou@domain.hid
> 
> 
> diff -ru a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c
> --- a/arch/arm/mach-imx/irq.c    2009-02-17 11:32:52.000000000 +0100
> +++ b/arch/arm/mach-imx/irq.c       2009-02-23 14:12:43.000000000 +0100
> @@ -35,7 +35,7 @@
>  #include <asm/io.h>
>  
>  #include <asm/mach/irq.h>
> -#include <asm/arch/imx-regs.h>
> +#include <mach/imx-regs.h>
>  
>  
>  /* Used for IMX INTERRUPT priority: Still Experimental */ 
> diff -ru a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
> --- a/arch/arm/mach-imx/time.c	2009-02-25 15:10:01.000000000 +0100
> +++ b/arch/arm/mach-imx/time.c	2009-02-25 15:10:49.000000000 +0100
> @@ -89,25 +89,23 @@
>  imx_timer_interrupt(int irq, void *dev_id)
>  {
>  	struct clock_event_device *evt = &clockevent_imx;
> -#ifndef CONFIG_IPIPE
>  	uint32_t tstat;
>  	irqreturn_t ret = IRQ_NONE;
>  
>  	/* clear the interrupt */
>  	tstat = IMX_TSTAT(TIMER_BASE);
> +#ifndef CONFIG_IPIPE
>  	IMX_TSTAT(TIMER_BASE) = 0;
> +#endif
>  	if (tstat & TSTAT_COMP) {
> +#ifdef CONFIG_IPIPE
>  		ipipe_mach_update_tsc();
> +#endif
>  		evt->event_handler(evt);
>  		ret = IRQ_HANDLED;
>  	}
>  
>  	return ret;
> -#else /* CONFIG_IPIPE */
> -	ipipe_mach_update_tsc();
> -	evt->event_handler(evt);
> -	return  IRQ_HANDLED;
> -#endif /* CONFIG_IPIPE */
>  }
>  
>  static struct irqaction imx_timer_irq = {

No, that is still wrong. You should read IMX_TSTAT(TIMER_BASE) in
acktimer not in linux timer interrupt. When running with xenomai, the
linux timer interrupt is a virtual interrupt and should not touch hardware.

-- 
                                                 Gilles.



  reply	other threads:[~2009-02-25 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25 11:05 [Adeos-main] [PATCH] ipipe i.MXL freeze's boot Gwenhaël
2009-02-25 13:06 ` Gilles Chanteperdrix
2009-02-25 15:09   ` Gwenhaël
2009-02-25 15:14     ` Gilles Chanteperdrix [this message]
2009-02-26 16:33       ` Gilles Chanteperdrix
2009-02-27 21:23         ` gwenhael.goavec

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=49A56043.7000009@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=adeos-main@gna.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.