From: "tip-bot2 for Steven Price" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Steven Price <steven.price@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/core] irqchip/gic-v3-its: Rely on genpool alignment
Date: Wed, 02 Oct 2024 16:10:52 -0000 [thread overview]
Message-ID: <172788545248.1442.3411580477111504820.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241002141630.433502-3-steven.price@arm.com>
The following commit has been merged into the irq/core branch of tip:
Commit-ID: e36d4165f0796536b338521ef714551be0feb706
Gitweb: https://git.kernel.org/tip/e36d4165f0796536b338521ef714551be0feb706
Author: Steven Price <steven.price@arm.com>
AuthorDate: Wed, 02 Oct 2024 15:16:30 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 02 Oct 2024 18:00:41 +02:00
irqchip/gic-v3-its: Rely on genpool alignment
its_create_device() over-allocated by ITS_ITT_ALIGN - 1 bytes to ensure
that an aligned area was available within the allocation. The new genpool
allocator has its min_alloc_order set to get_order(ITS_ITT_ALIGN) so all
allocations from it should be appropriately aligned.
Remove the over-allocation from its_create_device() and alignment from
its_build_mapd_cmd().
Signed-off-by: Steven Price <steven.price@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Will Deacon <will@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/all/20241002141630.433502-3-steven.price@arm.com
---
drivers/irqchip/irq-gic-v3-its.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 6c1581b..be77f92 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -706,7 +706,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);
@@ -3488,7 +3487,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);
itt = itt_alloc_pool(its->numa_node, sz);
next prev parent reply other threads:[~2024-10-02 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 14:16 [PATCH v2 0/2] irqchip/gic-v3-its: Mark ITS tables as decrypted Steven Price
2024-10-02 14:16 ` [PATCH v2 1/2] irqchip/gic-v3-its: Share ITS tables with a non-trusted hypervisor Steven Price
2024-10-02 16:10 ` [tip: irq/core] " tip-bot2 for Steven Price
2024-10-03 9:41 ` [PATCH v2 1/2] " Catalin Marinas
2024-10-21 10:47 ` Steven Price
2024-10-21 13:53 ` [tip: irq/core] irqchip/gic-v3-its: Fix over allocation in itt_alloc_pool() tip-bot2 for Steven Price
2024-10-02 14:16 ` [PATCH v2 2/2] irqchip/gic-v3-its: Rely on genpool alignment Steven Price
2024-10-02 16:10 ` tip-bot2 for Steven Price [this message]
2024-10-03 9:42 ` Catalin Marinas
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=172788545248.1442.3411580477111504820.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maz@kernel.org \
--cc=steven.price@arm.com \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@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
all inboxes | Powered by JetHome®