From: Catalin Marinas <catalin.marinas@arm.com>
To: Steven Price <steven.price@arm.com>
Cc: Marc Zyngier <maz@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>
Subject: Re: [PATCH 2/2] irqchip/gic-v3-its: Rely on genpool alignment
Date: Fri, 6 Sep 2024 17:46:24 +0100 [thread overview]
Message-ID: <Ztsx4ER5tLTFGGUM@arm.com> (raw)
In-Reply-To: <20240905091738.28544-3-steven.price@arm.com>
On Thu, Sep 05, 2024 at 10:17:38AM +0100, Steven Price wrote:
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 557214c774c3..49aacf96ade2 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -700,7 +700,6 @@ static struct its_collection *its_build_mapd_cmd(struct its_node *its,
> u8 size = ilog2(desc->its_mapd_cmd.dev->nr_ites);
>
> itt_addr = virt_to_phys(desc->its_mapd_cmd.dev->itt);
> - itt_addr = ALIGN(itt_addr, ITS_ITT_ALIGN);
>
> its_encode_cmd(cmd, GITS_CMD_MAPD);
> its_encode_devid(cmd, desc->its_mapd_cmd.dev->device_id);
> @@ -3495,7 +3494,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
> */
> nr_ites = max(2, nvecs);
> sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
> - sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
> + sz = max(sz, ITS_ITT_ALIGN);
Even without the gen_pool patch, I think the only problem was the slob
allocator which we got rid of.
> itt = itt_alloc_pool(its->numa_node, sz);
With gen_pool created with a min order of get_order(ITS_ITT_ALIGN), I
don't think we even need the sz = max(...) above. It's harmless though.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
prev parent reply other threads:[~2024-09-06 16:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 9:17 [PATCH 0/2] irqchip/gic-v3-its: Mark ITS tables as decrypted Steven Price
2024-09-05 9:17 ` [PATCH 1/2] irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor Steven Price
2024-09-06 16:36 ` Catalin Marinas
2024-09-09 3:47 ` Michael Kelley
2024-10-02 13:43 ` Thomas Gleixner
2024-10-02 13:59 ` Steven Price
2024-09-05 9:17 ` [PATCH 2/2] irqchip/gic-v3-its: Rely on genpool alignment Steven Price
2024-09-06 16:46 ` Catalin Marinas [this message]
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=Ztsx4ER5tLTFGGUM@arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=steven.price@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.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).