public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] microblaze: avoid interrupt race conditions
Date: Thu, 23 Feb 2012 12:19:39 +0100	[thread overview]
Message-ID: <4F4620CB.6030009@monstr.eu> (raw)
In-Reply-To: <1329934363-6078-1-git-send-email-linz@li-pro.net>

Stephan Linz wrote:
> The interrupt acknowledge action have to run after the
> registered interrupt handler. So we have a chance to
> bear out the corresponding interrupt request in the
> corresponding controller hardware.
> 
> With this reordering, we optain a proper interrupt
> handling for level triggered interrupt sources -- for
> example the new axi_timer v1.02.a introduced in ISE 13.2.
> 
> Signed-off-by: Stephan Linz <linz@li-pro.net>
> Acked-by: Michal Simek <monstr@monstr.eu>
> ---
>  arch/microblaze/cpu/interrupts.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
> index 5a13211..e7ca859 100644
> --- a/arch/microblaze/cpu/interrupts.c
> +++ b/arch/microblaze/cpu/interrupts.c
> @@ -155,8 +155,6 @@ void interrupt_handler (void)
>  #endif
>  	struct irq_action *act = vecs + irqs;
>  
> -	intc->iar = mask << irqs;
> -
>  #ifdef DEBUG_INT
>  	printf
>  	    ("Jumping to interrupt handler rutine addr %x,count %x,arg %x\n",
> @@ -165,6 +163,8 @@ void interrupt_handler (void)
>  	act->handler (act->arg);
>  	act->count++;
>  
> +	intc->iar = mask << irqs;
> +
>  #ifdef DEBUG_INT
>  	printf ("Dump INTC reg, isr %x, ier %x, iar %x, mer %x\n", intc->isr,
>  		intc->ier, intc->iar, intc->mer);

Applied.

Thanks,
Michal


-- 
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian

  reply	other threads:[~2012-02-23 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-22 18:12 [U-Boot] [PATCH] microblaze: avoid interrupt race conditions Stephan Linz
2012-02-23 11:19 ` Michal Simek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-17 22:11 Stephan Linz
2012-02-22  8:06 ` Michal Simek

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=4F4620CB.6030009@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox