Skip to content

Commit a101f29

Browse files
committed
Merge: iommu/tegra241-cmdqv: Fix alignment failure at max_n_shift
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5834 # Merge Request Required Information JIRA: https://issues.redhat.com/browse/RHEL-67994 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git branch: arm/smmu ## Summary of Changes A fix for an alignment issue in the recent virtual command queue support for Tegra. ## Approved Development Ticket(s) Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> Approved-by: Mark Langsdorf <mlangsdo@redhat.com> Approved-by: Desnes Nunes <desnesn@redhat.com> Approved-by: Donald Dutile <ddutile@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents 1e18f53 + a91b8fa commit a101f29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/iommu/arm/arm-smmu-v3/tegra241-cmdqv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,8 @@ static int tegra241_vcmdq_alloc_smmu_cmdq(struct tegra241_vcmdq *vcmdq)
509509

510510
snprintf(name, 16, "vcmdq%u", vcmdq->idx);
511511

512-
q->llq.max_n_shift = VCMDQ_LOG2SIZE_MAX;
512+
/* Queue size, capped to ensure natural alignment */
513+
q->llq.max_n_shift = min_t(u32, CMDQ_MAX_SZ_SHIFT, VCMDQ_LOG2SIZE_MAX);
513514

514515
/* Use the common helper to init the VCMDQ, and then... */
515516
ret = arm_smmu_init_one_queue(smmu, q, vcmdq->page0,

0 commit comments

Comments
 (0)