Skip to content

Commit 1542588

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-10/-/merge_requests/66 JIRA: https://issues.redhat.com/browse/RHEL-67995 Upstream Status: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git This is a small change to fix an issue in the tegra virtual command queue support that was added to kernel-5.14.0-523.el9. Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com> All submissions to CentOS Stream must reference a ticket in [Red Hat Jira](https://issues.redhat.com/). <details><summary>Click for formatting instructions</summary> Please follow the CentOS Stream [contribution documentation](https://docs.centos.org/en-US/stream-contrib/quickstart/) for how to file this ticket and have it approved. List tickets each on their own line of this description using the format "Resolves: RHEL-1234", "Related: RHEL-2345" or "Reverts: RHEL-3456", as appropriate. </details> Approved-by: Myron Stowe <mstowe@redhat.com> Approved-by: Donald Dutile <ddutile@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Jan Stancek <jstancek@redhat.com>
2 parents 716fcda + bf202a9 commit 1542588

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)