From: Santosh Shilimkar <santosh.shilimkar@ti.com>
To: Colin Cross <ccross@android.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
catalin.marinas@arm.com, linux@arm.linux.org.uk,
linus.ml.walleij@gmail.com,
Russell King <rmk+kernel@arm.linux.org.uk>
Subject: RE: [PATCH 1/5] ARM: gic: Add hooks for architecture specific extensions
Date: Wed, 26 Jan 2011 12:52:19 +0530 [thread overview]
Message-ID: <d33cd73f8207d4b92d02eb4bd2629590@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=umZYcb2MozjjLhjjRD305t8iKw2jNr3Ke=9H7@mail.gmail.com>
> -----Original Message-----
> From: ccross@google.com [mailto:ccross@google.com] On Behalf Of
> Colin Cross
> Sent: Wednesday, January 26, 2011 2:25 AM
> To: Santosh Shilimkar
> Cc: linux-arm-kernel@lists.infradead.org; linux-
> omap@vger.kernel.org; catalin.marinas@arm.com;
> linux@arm.linux.org.uk; linus.ml.walleij@gmail.com; Russell King
> Subject: Re: [PATCH 1/5] ARM: gic: Add hooks for architecture
> specific extensions
>
> On Mon, Jan 24, 2011 at 7:03 PM, Colin Cross <ccross@android.com>
> wrote:
> > On Mon, Jan 24, 2011 at 12:51 AM, Santosh Shilimkar
> > <santosh.shilimkar@ti.com> wrote:
> >> Few architectures combine the GIC with an external interrupt
> controller.
> >> On such systems it may be necessary to update both the GIC
> registers
> >> and the external controller's registers to control IRQ behavior.
> >>
> >> This can be addressed in couple of possible methods.
> >> 1. Export common GIC routines along with 'struct irq_chip
> gic_chip'
> >> and allow architectures to have custom function by
> override.
> >>
> >> 2. Provide architecture specific function pointer hooks
> >> within GIC library and leave platforms to add the
> necessary
> >> code as part of these hooks.
> >>
> >> First one might be non-intrusive but have few shortcomings like
> arch needs
> >> to have there own custom gic library. Locks used should be common
> since it
> >> caters to same IRQs etc. Maintenance point of view also it leads
> to
> >> multiple file fixes.
> >>
> >> The second probably is cleaner and portable. It ensures that all
> the
> >> common GIC infrastructure is not touched and also provides archs
> to
> >> address their specific issue.
> >
> > This method would work for most of Tegra's needs, although we
> would
> > need gic_set_type and gic_ack_irq to have arch extensions as well.
> > However, it does not allow for irq_retrigger, which can be
> implemented
> > on Tegra.
>
> irq_retrigger does work with this method, the core IRQ code checks
> for
> a return value if the retrigger was successful. Tegra works with
> your
> patch along with these changes:
>
Great.
Can I fold below changes in my patch and add you ack and tested-by?
> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
> index 0b6c043..7993f07 100644
> --- a/arch/arm/common/gic.c
> +++ b/arch/arm/common/gic.c
> @@ -90,6 +90,8 @@ static inline unsigned int gic_irq(struct irq_data
> *d)
> static void gic_ack_irq(struct irq_data *d)
> {
> spin_lock(&irq_controller_lock);
> + if (gic_arch_extn.irq_ack)
> + gic_arch_extn.irq_ack(d);
> writel(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
> spin_unlock(&irq_controller_lock);
> }
> @@ -161,6 +163,14 @@ static int gic_set_type(struct irq_data *d,
> unsigned int type)
> return 0;
> }
>
> +static int gic_retrigger(struct irq_data *d)
> +{
> + if (gic_arch_extn.irq_retrigger)
> + return gic_arch_extn.irq_retrigger(d);
> +
> + return 0;
> +}
> +
> #ifdef CONFIG_SMP
> static int
> gic_set_cpu(struct irq_data *d, const struct cpumask *mask_val,
> bool force)
> @@ -234,6 +244,7 @@ static struct irq_chip gic_chip = {
> .irq_mask = gic_mask_irq,
> .irq_unmask = gic_unmask_irq,
> .irq_set_type = gic_set_type,
> + .irq_retrigger = gic_retrigger,
> #ifdef CONFIG_SMP
> .irq_set_affinity = gic_set_cpu,
> #endif
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] ARM: gic: Add hooks for architecture specific extensions
Date: Wed, 26 Jan 2011 12:52:19 +0530 [thread overview]
Message-ID: <d33cd73f8207d4b92d02eb4bd2629590@mail.gmail.com> (raw)
In-Reply-To: <AANLkTi=umZYcb2MozjjLhjjRD305t8iKw2jNr3Ke=9H7@mail.gmail.com>
> -----Original Message-----
> From: ccross at google.com [mailto:ccross at google.com] On Behalf Of
> Colin Cross
> Sent: Wednesday, January 26, 2011 2:25 AM
> To: Santosh Shilimkar
> Cc: linux-arm-kernel at lists.infradead.org; linux-
> omap at vger.kernel.org; catalin.marinas at arm.com;
> linux at arm.linux.org.uk; linus.ml.walleij at gmail.com; Russell King
> Subject: Re: [PATCH 1/5] ARM: gic: Add hooks for architecture
> specific extensions
>
> On Mon, Jan 24, 2011 at 7:03 PM, Colin Cross <ccross@android.com>
> wrote:
> > On Mon, Jan 24, 2011 at 12:51 AM, Santosh Shilimkar
> > <santosh.shilimkar@ti.com> wrote:
> >> Few architectures combine the GIC with an external interrupt
> controller.
> >> On such systems it may be necessary to update both the GIC
> registers
> >> and the external controller's registers to control IRQ behavior.
> >>
> >> This can be addressed in couple of possible methods.
> >> ?1. ? ? Export common GIC routines along with 'struct irq_chip
> gic_chip'
> >> ? ? ? ?and allow architectures to have custom function by
> override.
> >>
> >> ?2. ? ? Provide architecture specific function pointer hooks
> >> ? ? ? ?within GIC library and leave platforms to add the
> necessary
> >> ? ? ? ?code as part of these hooks.
> >>
> >> First one might be non-intrusive but have few shortcomings like
> arch needs
> >> to have there own custom gic library. Locks used should be common
> since it
> >> caters to same IRQs etc. Maintenance point of view also it leads
> to
> >> multiple file fixes.
> >>
> >> The second probably is cleaner and portable. It ensures that all
> the
> >> common GIC infrastructure is not touched and also provides archs
> to
> >> address their specific issue.
> >
> > This method would work for most of Tegra's needs, although we
> would
> > need gic_set_type and gic_ack_irq to have arch extensions as well.
> > However, it does not allow for irq_retrigger, which can be
> implemented
> > on Tegra.
>
> irq_retrigger does work with this method, the core IRQ code checks
> for
> a return value if the retrigger was successful. Tegra works with
> your
> patch along with these changes:
>
Great.
Can I fold below changes in my patch and add you ack and tested-by?
> diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
> index 0b6c043..7993f07 100644
> --- a/arch/arm/common/gic.c
> +++ b/arch/arm/common/gic.c
> @@ -90,6 +90,8 @@ static inline unsigned int gic_irq(struct irq_data
> *d)
> static void gic_ack_irq(struct irq_data *d)
> {
> spin_lock(&irq_controller_lock);
> + if (gic_arch_extn.irq_ack)
> + gic_arch_extn.irq_ack(d);
> writel(gic_irq(d), gic_cpu_base(d) + GIC_CPU_EOI);
> spin_unlock(&irq_controller_lock);
> }
> @@ -161,6 +163,14 @@ static int gic_set_type(struct irq_data *d,
> unsigned int type)
> return 0;
> }
>
> +static int gic_retrigger(struct irq_data *d)
> +{
> + if (gic_arch_extn.irq_retrigger)
> + return gic_arch_extn.irq_retrigger(d);
> +
> + return 0;
> +}
> +
> #ifdef CONFIG_SMP
> static int
> gic_set_cpu(struct irq_data *d, const struct cpumask *mask_val,
> bool force)
> @@ -234,6 +244,7 @@ static struct irq_chip gic_chip = {
> .irq_mask = gic_mask_irq,
> .irq_unmask = gic_unmask_irq,
> .irq_set_type = gic_set_type,
> + .irq_retrigger = gic_retrigger,
> #ifdef CONFIG_SMP
> .irq_set_affinity = gic_set_cpu,
> #endif
next prev parent reply other threads:[~2011-01-26 7:22 UTC|newest]
Thread overview: 132+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-24 8:51 [PATCH 0/5] ARM: Few patches for PM enablement Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-24 8:51 ` [PATCH 1/5] ARM: gic: Add hooks for architecture specific extensions Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-25 3:03 ` Colin Cross
2011-01-25 3:03 ` Colin Cross
2011-01-25 20:54 ` Colin Cross
2011-01-25 20:54 ` Colin Cross
2011-01-26 7:22 ` Santosh Shilimkar [this message]
2011-01-26 7:22 ` Santosh Shilimkar
2011-01-26 7:23 ` Colin Cross
2011-01-26 7:23 ` Colin Cross
2011-01-26 7:31 ` Santosh Shilimkar
2011-01-26 7:31 ` Santosh Shilimkar
2011-01-26 7:52 ` Colin Cross
2011-01-26 7:52 ` Colin Cross
2011-01-26 7:55 ` Santosh Shilimkar
2011-01-26 7:55 ` Santosh Shilimkar
2011-01-24 8:51 ` [PATCH 2/5] ARM: gic: Add distributor and interface enable/disable accessory api Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-03-01 5:58 ` Santosh Shilimkar
2011-03-01 5:58 ` Santosh Shilimkar
2011-01-24 8:51 ` [PATCH 3/5] ARM: twd: Add context save restore support Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-24 11:06 ` Russell King - ARM Linux
2011-01-24 11:06 ` Russell King - ARM Linux
2011-01-24 11:11 ` Russell King - ARM Linux
2011-01-24 11:11 ` Russell King - ARM Linux
2011-01-24 11:16 ` Santosh Shilimkar
2011-01-24 11:16 ` Santosh Shilimkar
2011-01-25 7:39 ` Colin Cross
2011-01-25 7:39 ` Colin Cross
2011-01-25 10:32 ` Russell King - ARM Linux
2011-01-25 10:32 ` Russell King - ARM Linux
2011-01-25 13:23 ` Thomas Gleixner
2011-01-25 13:23 ` Thomas Gleixner
2011-01-25 13:37 ` Russell King - ARM Linux
2011-01-25 13:37 ` Russell King - ARM Linux
2011-01-25 13:55 ` Santosh Shilimkar
2011-01-25 13:55 ` Santosh Shilimkar
2011-01-25 14:12 ` Thomas Gleixner
2011-01-25 14:12 ` Thomas Gleixner
2011-01-25 14:15 ` Russell King - ARM Linux
2011-01-25 14:15 ` Russell King - ARM Linux
2011-01-25 14:24 ` Thomas Gleixner
2011-01-25 14:24 ` Thomas Gleixner
2011-01-25 16:04 ` Santosh Shilimkar
2011-01-25 16:04 ` Santosh Shilimkar
2011-01-25 16:13 ` Russell King - ARM Linux
2011-01-25 16:13 ` Russell King - ARM Linux
2011-01-25 16:14 ` Santosh Shilimkar
2011-01-25 16:14 ` Santosh Shilimkar
2011-01-25 11:29 ` Russell King - ARM Linux
2011-01-25 11:29 ` Russell King - ARM Linux
2011-01-25 11:40 ` Santosh Shilimkar
2011-01-25 11:40 ` Santosh Shilimkar
2011-01-25 11:48 ` Russell King - ARM Linux
2011-01-25 11:48 ` Russell King - ARM Linux
2011-01-25 12:08 ` Santosh Shilimkar
2011-01-25 12:08 ` Santosh Shilimkar
2011-01-25 12:17 ` Russell King - ARM Linux
2011-01-25 12:17 ` Russell King - ARM Linux
2011-01-25 12:20 ` Santosh Shilimkar
2011-01-25 12:20 ` Santosh Shilimkar
2011-01-25 18:44 ` Colin Cross
2011-01-25 18:44 ` Colin Cross
2011-01-24 11:14 ` Santosh Shilimkar
2011-01-24 11:14 ` Santosh Shilimkar
2011-01-24 8:51 ` [PATCH 4/5] ARM: scu: Move register defines to header file Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-25 11:46 ` Russell King - ARM Linux
2011-01-25 11:46 ` Russell King - ARM Linux
2011-01-25 12:02 ` Santosh Shilimkar
2011-01-25 12:02 ` Santosh Shilimkar
2011-01-25 12:16 ` Russell King - ARM Linux
2011-01-25 12:16 ` Russell King - ARM Linux
2011-01-25 12:29 ` Russell King - ARM Linux
2011-01-25 12:29 ` Russell King - ARM Linux
2011-01-25 12:39 ` Santosh Shilimkar
2011-01-25 12:39 ` Santosh Shilimkar
2011-01-25 12:36 ` Santosh Shilimkar
2011-01-25 12:36 ` Santosh Shilimkar
2011-01-25 12:56 ` Russell King - ARM Linux
2011-01-25 12:56 ` Russell King - ARM Linux
2011-01-25 13:04 ` Russell King - ARM Linux
2011-01-25 13:04 ` Russell King - ARM Linux
2011-01-25 13:06 ` Russell King - ARM Linux
2011-01-25 13:06 ` Russell King - ARM Linux
2011-01-25 18:23 ` Santosh Shilimkar
2011-01-25 18:23 ` Santosh Shilimkar
2011-02-04 10:41 ` Russell King - ARM Linux
2011-02-04 10:41 ` Russell King - ARM Linux
2011-02-04 10:46 ` Santosh Shilimkar
2011-02-04 10:46 ` Santosh Shilimkar
2011-02-04 11:30 ` Russell King - ARM Linux
2011-02-04 11:30 ` Russell King - ARM Linux
2011-02-04 11:34 ` Santosh Shilimkar
2011-02-04 11:34 ` Santosh Shilimkar
2011-02-07 9:51 ` Santosh Shilimkar
2011-02-07 9:51 ` Santosh Shilimkar
2011-02-07 10:18 ` Russell King - ARM Linux
2011-02-07 10:18 ` Russell King - ARM Linux
2011-02-07 10:21 ` Santosh Shilimkar
2011-02-07 10:21 ` Santosh Shilimkar
2011-02-07 10:23 ` Russell King - ARM Linux
2011-02-07 10:23 ` Russell King - ARM Linux
2011-02-07 10:30 ` Santosh Shilimkar
2011-02-07 10:30 ` Santosh Shilimkar
2011-02-10 14:49 ` Santosh Shilimkar
2011-02-10 14:49 ` Santosh Shilimkar
2011-02-10 16:13 ` Russell King - ARM Linux
2011-02-10 16:13 ` Russell King - ARM Linux
2011-02-10 16:26 ` Santosh Shilimkar
2011-02-10 16:26 ` Santosh Shilimkar
2011-01-25 13:05 ` Santosh Shilimkar
2011-01-25 13:05 ` Santosh Shilimkar
2011-01-25 13:41 ` Russell King - ARM Linux
2011-01-25 13:41 ` Russell King - ARM Linux
2011-01-25 13:47 ` Santosh Shilimkar
2011-01-25 13:47 ` Santosh Shilimkar
2011-01-24 8:51 ` [PATCH 5/5] ARM: smp: Skip secondary cpu calibration to speed-up boot Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-24 10:30 ` Russell King - ARM Linux
2011-01-24 10:30 ` Russell King - ARM Linux
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-24 8:51 ` Santosh Shilimkar
2011-01-24 8:55 ` Santosh Shilimkar
2011-01-24 8:55 ` Santosh Shilimkar
2011-02-04 10:19 ` [PATCH 0/5] ARM: Few patches for PM enablement Santosh Shilimkar
2011-02-04 10:19 ` Santosh Shilimkar
2011-02-11 14:24 ` Santosh Shilimkar
2011-02-11 14:24 ` Santosh Shilimkar
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=d33cd73f8207d4b92d02eb4bd2629590@mail.gmail.com \
--to=santosh.shilimkar@ti.com \
--cc=catalin.marinas@arm.com \
--cc=ccross@android.com \
--cc=linus.ml.walleij@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=rmk+kernel@arm.linux.org.uk \
/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.