Skip to content

Commit 8e8a69b

Browse files
committed
Merge tag 'arm-smmu-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into fixes
Arm SMMU fixes for 6.12 - Clarify warning message when failing to disable the MMU-500 prefetcher - Fix undefined behaviour in calculation of L1 stream-table index when 32-bit StreamIDs are implemented - Replace a rogue comma with a semicolon
2 parents 8e929cb + 7de7d35 commit 8e8a69b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,7 @@ static int arm_smmu_alloc_cd_tables(struct arm_smmu_master *master)
14201420
cd_table->s1fmt = STRTAB_STE_0_S1FMT_LINEAR;
14211421
cd_table->linear.num_ents = max_contexts;
14221422

1423-
l1size = max_contexts * sizeof(struct arm_smmu_cd),
1423+
l1size = max_contexts * sizeof(struct arm_smmu_cd);
14241424
cd_table->linear.table = dma_alloc_coherent(smmu->dev, l1size,
14251425
&cd_table->cdtab_dma,
14261426
GFP_KERNEL);
@@ -3625,7 +3625,7 @@ static int arm_smmu_init_strtab_2lvl(struct arm_smmu_device *smmu)
36253625
u32 l1size;
36263626
struct arm_smmu_strtab_cfg *cfg = &smmu->strtab_cfg;
36273627
unsigned int last_sid_idx =
3628-
arm_smmu_strtab_l1_idx((1 << smmu->sid_bits) - 1);
3628+
arm_smmu_strtab_l1_idx((1ULL << smmu->sid_bits) - 1);
36293629

36303630
/* Calculate the L1 size, capped to the SIDSIZE. */
36313631
cfg->l2.num_l1_ents = min(last_sid_idx + 1, STRTAB_MAX_L1_ENTRIES);

drivers/iommu/arm/arm-smmu/arm-smmu-impl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ int arm_mmu500_reset(struct arm_smmu_device *smmu)
130130

131131
/*
132132
* Disable MMU-500's not-particularly-beneficial next-page
133-
* prefetcher for the sake of errata #841119 and #826419.
133+
* prefetcher for the sake of at least 5 known errata.
134134
*/
135135
for (i = 0; i < smmu->num_context_banks; ++i) {
136136
reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
137137
reg &= ~ARM_MMU500_ACTLR_CPRE;
138138
arm_smmu_cb_write(smmu, i, ARM_SMMU_CB_ACTLR, reg);
139139
reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
140140
if (reg & ARM_MMU500_ACTLR_CPRE)
141-
dev_warn_once(smmu->dev, "Failed to disable prefetcher [errata #841119 and #826419], check ACR.CACHE_LOCK\n");
141+
dev_warn_once(smmu->dev, "Failed to disable prefetcher for errata workarounds, check SACR.CACHE_LOCK\n");
142142
}
143143

144144
return 0;

0 commit comments

Comments
 (0)