public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v10 01/11] irq: gic: support hip04 gic
Date: Fri, 18 Jul 2014 10:20:47 +0100	[thread overview]
Message-ID: <20140718092046.GD25180@leverpostej> (raw)
In-Reply-To: <1404957850-13340-2-git-send-email-haojian.zhuang@linaro.org>

On Thu, Jul 10, 2014 at 03:04:00AM +0100, Haojian Zhuang wrote:
> There's a little difference between ARM GIC and HiP04 GIC.

Given that we can't target interrupts correctly without this patch, and
that the GIC in a HiP04 system can't claim compatibility with any other
GIC, I'd call this a major difference.

>
> * HiP04 GIC could support 16 cores at most, and ARM GIC could support
> 8 cores at most. So the difination on GIC_DIST_TARGET registers are
> different since CPU interfaces are increased from 8-bit to 16-bit.
>
> * HiP04 GIC could support 510 interrupts at most, and ARM GIC could
> support 1020 interrupts at most.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
> ---
>  Documentation/devicetree/bindings/arm/gic.txt |   1 +
>  drivers/irqchip/irq-gic.c                     | 141 +++++++++++++++++++-------
>  2 files changed, 108 insertions(+), 34 deletions(-)

[...]

> +static bool gic_is_standard(struct gic_chip_data *gic_data)
> +{
> +       return (gic_data->nr_cpu_if == 8);
> +}
> +
> +static u32 irqs_per_target_reg(struct gic_chip_data *gic_data)
> +{
> +       return (32 / gic_data->nr_cpu_if);
> +}
> +
> +static u32 irq_to_target_reg(struct gic_chip_data *gic_data, u32 irq)
> +{
> +       if (!gic_is_standard(gic_data))
> +               irq *= 2;

If the function is called gic_is_standard, then the only thing we should
know here is whether the GIC follows the GIC standard, not how it
differs from the standard.

Please rename this function to something like gicd_has_16_bit_targets or
anything else that clearly defines what you're ttrying to derive from
it.

Thanks,
Mark.

  reply	other threads:[~2014-07-18  9:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-10  2:03 [PATCH v10 00/11] enable HiP04 SoC Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 01/11] irq: gic: support hip04 gic Haojian Zhuang
2014-07-18  9:20   ` Mark Rutland [this message]
2014-07-18 12:05   ` Jason Cooper
2014-07-18 12:44     ` Mark Rutland
2014-07-10  2:04 ` [PATCH v10 02/11] ARM: mcpm: support 4 clusters Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 03/11] ARM: hisi: enable MCPM implementation Haojian Zhuang
2014-07-12 21:31   ` Nicolas Pitre
2014-07-14  2:37     ` Haojian Zhuang
2014-07-14  9:41       ` Nicolas Pitre
2014-07-10  2:04 ` [PATCH v10 04/11] ARM: hisi: enable HiP04 Haojian Zhuang
2014-07-28 11:08   ` Arnd Bergmann
2014-07-28 11:41     ` Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 05/11] document: dt: add the binding on HiP04 Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 06/11] document: dt: add the binding on HiP04 clock Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 07/11] ARM: dts: append hip04 dts Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 08/11] ARM: config: append lpae configuration Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 09/11] ARM: config: append hip04_defconfig Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 10/11] ARM: hisi: enable erratum 798181 of A15 on HiP04 Haojian Zhuang
2014-07-10  2:04 ` [PATCH v10 11/11] virt: arm: support hip04 gic Haojian Zhuang

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=20140718092046.GD25180@leverpostej \
    --to=mark.rutland@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