[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <603e60d8-b2a5-74a4-6d32-8277aa0e39c1@huawei.com>
Date: Thu, 31 Oct 2019 14:33:23 +0800
From: Zenghui Yu <yuzenghui@...wei.com>
To: Marc Zyngier <maz@...nel.org>, <kvmarm@...ts.cs.columbia.edu>,
<linux-kernel@...r.kernel.org>
CC: Eric Auger <eric.auger@...hat.com>,
James Morse <james.morse@....com>,
Julien Thierry <julien.thierry.kdev@...il.com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
"Andrew Murray" <Andrew.Murray@....com>,
Jayachandran C <jnair@...vell.com>,
"Robert Richter" <rrichter@...vell.com>
Subject: Re: [PATCH v2 06/36] irqchip/gic-v3-its: Kill its->device_ids and use
TYPER copy instead
Hi Marc,
On 2019/10/27 22:42, Marc Zyngier wrote:
> Now that we have a copy of TYPER in the ITS structure, rely on this
> to provide the same service as its->device_ids, which gets axed.
> Errata workarounds are now updating the cached fields instead of
> requiring a separate field in the ITS structure.
>
> Signed-off-by: Marc Zyngier <maz@...nel.org>
Reviewed-by: Zenghui Yu <yuzenghui@...wei.com>
> ---
> drivers/irqchip/irq-gic-v3-its.c | 24 +++++++++++++-----------
> include/linux/irqchip/arm-gic-v3.h | 2 +-
> 2 files changed, 14 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 3b046181ddfc..6c91c7feadf3 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -109,7 +109,6 @@ struct its_node {
> struct list_head its_device_list;
> u64 flags;
> unsigned long list_nr;
> - u32 device_ids;
> int numa_node;
> unsigned int msi_domain_flags;
> u32 pre_its_base; /* for Socionext Synquacer */
> @@ -117,6 +116,7 @@ struct its_node {
> };
>
> #define is_v4(its) (!!((its)->typer & GITS_TYPER_VLPIS))
> +#define device_ids(its) (FIELD_GET(GITS_TYPER_DEVBITS, (its)->typer) + 1)
>
> #define ITS_ITT_ALIGN SZ_256
>
> @@ -1938,9 +1938,9 @@ static bool its_parse_indirect_baser(struct its_node *its,
> if (new_order >= MAX_ORDER) {
> new_order = MAX_ORDER - 1;
> ids = ilog2(PAGE_ORDER_TO_SIZE(new_order) / (int)esz);
> - pr_warn("ITS@%pa: %s Table too large, reduce ids %u->%u\n",
> + pr_warn("ITS@%pa: %s Table too large, reduce ids %llu->%u\n",
> &its->phys_base, its_base_type_string[type],
> - its->device_ids, ids);
> + device_ids(its), ids);
But this pr_warn() looks a bit odd. The table type is chosen from
its_base_type_string[], but ids is always Devbits (+1)?
Thanks,
Zenghui
Powered by blists - more mailing lists