All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 6/8] powerpc 8xx: cascade eoi will be performed by generic_handle_irq handler
Date: Thu, 26 May 2011 06:19:34 -0500	[thread overview]
Message-ID: <reply-ben-8xx-cascade@mdm.bga.com> (raw)
In-Reply-To: <1306380753.7481.350.camel@pasglop>

On Thu, 26 May 2011 about 13:32:33 +1000, Benjamin Herrenschmidt wrote:
> > On Wed, 2011-05-25 at 01:34 -0500, Milton Miller wrote:
> > > The 8xx cpm_cascade was calling irq_eoi for the cascaded irq,
> > > but that will already have been called by the handle_fasteoi_irq
> > > that generic_handle_irq will call.  The handler is set in
> > > arch/powerpc/sysdev/cpm1.c by the host map routine.
> > 
> > No it won't unless I'm missing something. The flow handler
> > (handle_fasteoi_irq) is going to be replaced by the chained handler when
> > mpc8xx_pics_init() calls irq_set_chained_handle(irq, cpm_cascade) no ?
> > 
> > Cheers,
> > Ben.

No.   We set the chained handler on the top level irq (on the irq
to the primary irq controller).  The handler is set to this 8xx_cascade
function.  We don't change the handler on the subordnate irq that
is invoked via generic_handle_irq in this function.

Or that is how I understand things to work, and this makes the 8xx
code match the current 8xxx cpm1 cascade handler.

Of course, it would be good for someone with hardware to confirm
that it works with the patch (or even put a printk or counter in the
handler if that would not cause printk recursion -- don't do it on
your console).

milton

> > 
> > > Signed-off-by: Milton Miller <miltonm@bga.com>
> > > 
> > > Index: work.git/arch/powerpc/platforms/8xx/m8xx_setup.c
> > > ===================================================================
> > > --- work.git.orig/arch/powerpc/platforms/8xx/m8xx_setup.c	2011-05-18 22:50:38.983498572 -0500
> > > +++ work.git/arch/powerpc/platforms/8xx/m8xx_setup.c	2011-05-18 22:52:48.920532258 -0500
> > > @@ -221,15 +221,9 @@ static void cpm_cascade(unsigned int irq
> > >  	struct irq_chip *chip;
> > >  	int cascade_irq;
> > >  
> > > -	if ((cascade_irq = cpm_get_irq()) >= 0) {
> > > -		struct irq_desc *cdesc = irq_to_desc(cascade_irq);
> > > -
> > > +	if ((cascade_irq = cpm_get_irq()) >= 0)
> > >  		generic_handle_irq(cascade_irq);
> > >  
> > > -		chip = irq_desc_get_chip(cdesc);
> > > -		chip->irq_eoi(&cdesc->irq_data);
> > > -	}
> > > -
> > >  	chip = irq_desc_get_chip(desc);
> > >  	chip->irq_eoi(&desc->irq_data);
> > >  }
> > 
> > 

  reply	other threads:[~2011-05-26 11:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-25  6:34 [PATCH 0/8] ipi and irq cleanups and fixes Milton Miller
2011-05-25  6:34 ` [PATCH 6/8] powerpc 8xx: cascade eoi will be performed by generic_handle_irq handler Milton Miller
2011-05-26  3:32   ` Benjamin Herrenschmidt
2011-05-26 11:19     ` Milton Miller [this message]
2011-05-25  6:34 ` [PATCH 4/8] powerpc irq: always free duplicate IRQ_LEGACY hosts Milton Miller
2011-05-25  6:34 ` [PATCH 7/8] powerpc irq: protect irq_radix_revmap_lookup against irq_free_virt Milton Miller
2011-05-25 21:31   ` Paul E. McKenney
2011-05-25  6:34 ` [PATCH 5/8] powerpc: check desc in handle_one_irq and expand generic_handle_irq Milton Miller
2011-05-25  6:34 ` [PATCH 2/8] powerpc cell: rename ipi functions to match current abstractions Milton Miller
2011-05-25  6:34 ` [PATCH 8/8] powerpc: fix irq_free_virt by adjusting bounds before loop Milton Miller
2011-05-25  6:34 ` [PATCH 3/8] powerpc irq: remove stale and misleading comment Milton Miller

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=reply-ben-8xx-cascade@mdm.bga.com \
    --to=miltonm@bga.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.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.