From: jamie@jamieiles.com (Jamie Iles)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 08/10] ARM: u300: convert to MULTI_IRQ_HANDLER
Date: Wed, 28 Sep 2011 13:03:40 +0100 [thread overview]
Message-ID: <20110928120340.GH17204@pulham.picochip.com> (raw)
In-Reply-To: <CACRpkdYOdWA2vg2zq+nhOPSvPN7zdy9NVsOcqfZ7i9W5Sq5cpw@mail.gmail.com>
Hi Linus,
On Wed, Sep 28, 2011 at 01:03:34PM +0200, Linus Walleij wrote:
> Hold your horses:
>
> On Wed, Sep 28, 2011 at 12:41 PM, Jamie Iles <jamie@jamieiles.com> wrote:
>
> > diff --git a/arch/arm/mach-u300/include/mach/entry-macro.S b/arch/arm/mach-u300/include/mach/entry-macro.S
> > index 20731ae..7181d6a 100644
> > --- a/arch/arm/mach-u300/include/mach/entry-macro.S
> > +++ b/arch/arm/mach-u300/include/mach/entry-macro.S
> > @@ -8,33 +8,9 @@
> > ?* Low-level IRQ helper macros for ST-Ericsson U300
> > ?* Author: Linus Walleij <linus.walleij@stericsson.com>
> > ?*/
> > -#include <mach/hardware.h>
> > -#include <asm/hardware/vic.h>
> >
> > ? ? ? ?.macro ?disable_fiq
> > ? ? ? ?.endm
> >
> > - ? ? ? .macro ?get_irqnr_preamble, base, tmp
> > - ? ? ? .endm
> > -
> > ? ? ? ?.macro ?arch_ret_to_user, tmp1, tmp2
> > ? ? ? ?.endm
> > -
> > - ? ? ? .macro ?get_irqnr_and_base, irqnr, irqstat, base, tmp
> > - ? ? ? ldr ? ? \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON0_BASE
> > - ? ? ? ldr ? ? \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
> > - ? ? ? mov ? ? \irqnr, #0
> > - ? ? ? teq ? ? \irqstat, #0
> > - ? ? ? bne ? ? 1002f
> > -1001: ?ldr ? ? \base, = U300_AHB_PER_VIRT_BASE-U300_AHB_PER_PHYS_BASE+U300_INTCON1_BASE
> > - ? ? ? ldr ? ? \irqstat, [\base, #VIC_IRQ_STATUS] @ get masked status
> > - ? ? ? mov ? ? \irqnr, #32
> > - ? ? ? teq ? ? \irqstat, #0
> > - ? ? ? beq ? ? 1003f
> > -1002: ?tst ? ? \irqstat, #1
> > - ? ? ? bne ? ? 1003f
> > - ? ? ? add ? ? \irqnr, \irqnr, #1
> > - ? ? ? movs ? ?\irqstat, \irqstat, lsr #1
> > - ? ? ? bne ? ? 1002b
> > -1003: ? ? ? ? ?/* EQ will be set if no irqs pending */
> > - ? ? ? .endm
>
> When I inspect patch 2 in this series I get the feeling that it assumes that
> there is one and only one VIC bank with 32 interrupts involved. This is
> not the case in the U300, it has 64 possible IRQ sources by OR:in the
> output IRQ signal from two VIC:s and feeding the resulting IRQ line
> into the CPU.
No, it will handle more than one vic, and it will check them in the
order the vic_init() is called. I've tested this on picoxcell that has
2 vic's in the same configuration as this.
> So in the code above we first check the 32 bits at the first VIC instance,
> and if that is zero we go on to check the other 32 bits.
>
> vic_single_handle_irq() needs to be modified to handle several
> ranges or atleast two.
The platform IRQ handler is actually vic_handle_irq() that internally
calls vic_single_handle_irq() for each registered vic (in the order of
registration).
> Note that in mach-u300/core.c we initialize each VIC like this:
> vic_init((void __iomem *) U300_INTCON0_VBASE, 0, mask[0], mask[0]);
> vic_init((void __iomem *) U300_INTCON1_VBASE, 32, mask[1], mask[1]);
>
> So I think the easiest may be to let vic_init() add registered VIC
> ranges to a list or array, and increas some num_vics variable
> to that vic_single_handle_irq() can traverse both ranges in
> order.
Jamie
next prev parent reply other threads:[~2011-09-28 12:03 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 10:41 [PATCHv2 00/10] VIC DT binding and MULTI_IRQ_HANDLER Jamie Iles
2011-09-28 10:41 ` [PATCHv2 01/10] ARM: vic: device tree binding Jamie Iles
2011-09-28 20:11 ` Grant Likely
2011-09-29 4:00 ` Rob Herring
2011-09-28 10:41 ` [PATCHv2 02/10] ARM: vic: MULTI_IRQ_HANDLER handler Jamie Iles
2011-09-28 11:09 ` Linus Walleij
2011-09-28 12:08 ` Jamie Iles
2011-09-28 20:39 ` Grant Likely
2011-09-29 6:55 ` Linus Walleij
2011-09-29 9:30 ` Jamie Iles
2011-09-29 16:55 ` Grant Likely
2011-11-02 13:40 ` Russell King - ARM Linux
2011-11-02 14:08 ` Jamie Iles
2011-11-03 12:29 ` Linus Walleij
2011-11-03 12:51 ` Russell King - ARM Linux
2011-11-03 13:00 ` Linus Walleij
2011-11-03 13:04 ` Jamie Iles
2011-11-03 13:31 ` Russell King - ARM Linux
2011-11-03 15:03 ` Jamie Iles
2011-11-03 15:11 ` Russell King - ARM Linux
2011-11-03 13:49 ` Nicolas Pitre
2011-09-29 15:03 ` Zoltan Devai
2011-09-29 15:13 ` Jamie Iles
2011-09-28 10:41 ` [PATCHv2 03/10] ARM: ep93xx: convert to MULTI_IRQ_HANDLER Jamie Iles
2011-09-28 11:15 ` Linus Walleij
2011-09-28 10:41 ` [PATCHv2 04/10] ARM: netx: " Jamie Iles
2011-09-28 10:41 ` [PATCHv2 05/10] ARM: nomadik: " Jamie Iles
2011-09-28 11:12 ` Linus Walleij
2011-09-28 10:41 ` [PATCHv2 06/10] ARM: s3c64xx: " Jamie Iles
2011-09-28 10:41 ` [PATCHv2 07/10] ARM: spear: " Jamie Iles
2011-09-28 10:41 ` [PATCHv2 08/10] ARM: u300: " Jamie Iles
2011-09-28 11:03 ` Linus Walleij
2011-09-28 12:03 ` Jamie Iles [this message]
2011-09-28 12:18 ` Linus Walleij
2011-09-28 12:29 ` Jamie Iles
2011-09-28 10:41 ` [PATCHv2 09/10] ARM: versatile: " Jamie Iles
2011-09-28 10:41 ` [PATCHv2 10/10] ARM: samsung: " Jamie Iles
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=20110928120340.GH17204@pulham.picochip.com \
--to=jamie@jamieiles.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).