Skip to content

Commit 91ed28d

Browse files
author
Charles Mirabile
committed
irqchip/gic-v3-its: Rely on genpool alignment
JIRA: https://issues.redhat.com/browse/RHEL-62922 commit e36d416 Author: Steven Price <steven.price@arm.com> Date: Wed, 2 Oct 2024 15:16:30 +0100 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 Signed-off-by: Charles Mirabile <cmirabil@redhat.com>
1 parent f8f0ff4 commit 91ed28d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,6 @@ static struct its_collection *its_build_mapd_cmd(struct its_node *its,
705705
u8 size = ilog2(desc->its_mapd_cmd.dev->nr_ites);
706706

707707
itt_addr = virt_to_phys(desc->its_mapd_cmd.dev->itt);
708-
itt_addr = ALIGN(itt_addr, ITS_ITT_ALIGN);
709708

710709
its_encode_cmd(cmd, GITS_CMD_MAPD);
711710
its_encode_devid(cmd, desc->its_mapd_cmd.dev->device_id);
@@ -3487,7 +3486,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id,
34873486
*/
34883487
nr_ites = max(2, nvecs);
34893488
sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1);
3490-
sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1;
3489+
sz = max(sz, ITS_ITT_ALIGN);
34913490

34923491
itt = itt_alloc_pool(its->numa_node, sz);
34933492

0 commit comments

Comments
 (0)