linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 02/19] arm64: initial support for GICv3
Date: Tue, 25 Mar 2014 19:29:21 +0000	[thread overview]
Message-ID: <5331D911.6070903@arm.com> (raw)
In-Reply-To: <CABg9mcsWrjsBaDbk0fdJPJdzhQ6jmgZOkDNG0_r7ZbWzcCdb0A@mail.gmail.com>

On 25/03/14 18:36, Z Lim wrote:
> 
> 
> 
> On Tue, Mar 25, 2014 at 3:13 AM, Marc Zyngier <marc.zyngier@arm.com
> <mailto:marc.zyngier@arm.com>> wrote:
> 
>     On Tue, Mar 25 2014 at  6:35:18 am GMT, Z Lim <zlim.lnx@gmail.com
>     <mailto:zlim.lnx@gmail.com>> wrote:
> 
>     Hi Zi,
> 
>     > I see this warning :(
>     > You can trigger it when a device's INT# falls within [gic_irqs-16,
>     gic_irqs),
>     > which lines up with the -16 above.
>     >
>     >     irq_create_of_mapping  // SPI# from DT
>     >
>     >         domain->ops->xlate (gic_irq_domain_xlate)  // SPI# + 32 =
>     INT# = hwirq
>     >
>     >         irq_create_mapping  // uses hwirq = INT#
>     >
>     >             irq_domain_associate  // uses hwirq = INT#
>     >
>     >                 if (WARN(hwirq >= domain->hwirq_max, "error: hwirq
>     0x%x is too
>     >                 large for %s\n", (int)hwirq, domain->name))  //
>     hwirq_max was
>     >                 set to (MAX_INT# - 16) above, uh oh...
> 
>     I'm about to push out the following fix. Can you give it a go and let me
>     know if that works for you?
> 
>     Thanks,
> 
>             M.
> 
>     diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
>     index 60ef92d..b90ea2c 100644
>     --- a/drivers/irqchip/irq-gic-v3.c
>     +++ b/drivers/irqchip/irq-gic-v3.c
>     @@ -552,6 +552,8 @@ static struct irq_chip gic_chip = {
>      static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
>                                     irq_hw_number_t hw)
>      {
>     +       if (hw < 16)            /* SGIs are private to the core
>     kernel */
>     +               return -EPERM;
>             if (hw < 32) {
>                     irq_set_percpu_devid(irq);
>                     irq_set_chip_and_handler(irq, &gic_chip,
>     @@ -642,7 +644,7 @@ static int __init gic_of_init(struct device_node
>     *node, struct device_node *pare
>                     gic_irqs = 1020;
>             gic_data.irq_nr = gic_irqs;
> 
>     -       gic_data.domain = irq_domain_add_linear(node, gic_irqs - 16,
>     +       gic_data.domain = irq_domain_add_linear(node, gic_irqs,
>                                                     &gic_irq_domain_ops,
>     &gic_data);
>             gic_data.rdist.rdist =
>     alloc_percpu(typeof(*gic_data.rdist.rdist));
> 
> 
> 
> LGTM. Also tested on model.
> 
> Reviewed-by: Zi Shen Lim <zlim at broadcom.com <mailto:zlim@broadcom.com>>

Excellent. Thanks for testing!

	M.
-- 
Jazz is not dead. It just smells funny...

  parent reply	other threads:[~2014-03-25 19:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 11:52 [PATCH v2 00/19] arm64: GICv3 support Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 01/19] ARM: GIC: move some bits of GICv2 to a library-type file Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 02/19] arm64: initial support for GICv3 Marc Zyngier
     [not found]   ` <CAMDttNew0S7xVVKge7AAR3W6bdQzKdvN9Z7cHPDUCq=jZ98q1A@mail.gmail.com>
2014-03-24 11:10     ` Marc Zyngier
     [not found]       ` <CABg9mcucJ_UouRbJ_Urirz6ita5uUvYuQkmeA1-Df00KSjFcnA@mail.gmail.com>
2014-03-25  7:33         ` Marc Zyngier
2014-03-25 10:13         ` Marc Zyngier
     [not found]           ` <CABg9mcsWrjsBaDbk0fdJPJdzhQ6jmgZOkDNG0_r7ZbWzcCdb0A@mail.gmail.com>
2014-03-25 19:29             ` Marc Zyngier [this message]
2014-03-24 19:03   ` Sudeep Holla
2014-03-24 19:07     ` Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 03/19] arm64: GICv3 device tree binding documentation Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 04/19] arm64: boot protocol documentation update for GICv3 Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 05/19] KVM: arm/arm64: vgic: move GICv2 registers to their own structure Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 06/19] KVM: ARM: vgic: introduce vgic_ops and LR manipulation primitives Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 07/19] KVM: ARM: vgic: abstract access to the ELRSR bitmap Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 08/19] KVM: ARM: vgic: abstract EISR bitmap access Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 09/19] KVM: ARM: vgic: abstract MISR decoding Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 10/19] KVM: ARM: vgic: move underflow handling to vgic_ops Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 11/19] KVM: ARM: vgic: abstract VMCR access Marc Zyngier
2014-03-20 11:52 ` [PATCH v2 12/19] KVM: ARM: vgic: introduce vgic_enable Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 13/19] KVM: ARM: introduce vgic_params structure Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 14/19] KVM: ARM: vgic: split GICv2 backend from the main vgic code Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 15/19] arm64: KVM: remove __kvm_hyp_code_{start, end} from hyp.S Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 16/19] arm64: KVM: split GICv2 world switch from hyp code Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 17/19] arm64: KVM: move hcr_el2 setting into vgic-v2-switch.S Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 18/19] KVM: ARM: vgic: add the GICv3 backend Marc Zyngier
2014-03-20 11:53 ` [PATCH v2 19/19] arm64: KVM: vgic: add GICv3 world switch Marc Zyngier

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=5331D911.6070903@arm.com \
    --to=marc.zyngier@arm.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).