1

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
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCgAuFiEEPxTL6PPUbjXGY88ct6xw3ITBYzQFAmcGZiAQHHdpbGxAa2Vy
 bmVsLm9yZwAKCRC3rHDchMFjNFzpB/45ANAP3CW6UhJU6hRTH2trlcXtqVOp7Yvb
 0zh6HnYiBXP5qncg1FZhbl5xiWKYdcu1zoY3MFggAh1P19Q6wWeZEEo0/NIluvvW
 QCHkgyfllgEYZcUKVqRJwClp4bKqvldHiYYUKQQ5L3BGutx7kDrM8i68gpuNBBC+
 D6u4eTmjlHPp+3ltD66vGhDLIEVszwewUUc+W/R//1eVHpTyD0hkX3jYg3c+8r5N
 pyyIqznishu8Sz4Ddqkl+JRELkzB6JE1Gdyzm30y43mnTy0HdRrS1lkERqVa1RBp
 eYi8QqYkcaZwXrXd0Q9c8ZMytSN7KYqncVBH3v688+wRALA70fpC
 =n91J
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Joerg Roedel 2024-10-15 10:16:22 +02:00
commit 8e8a69bc77
2 changed files with 4 additions and 4 deletions

View File

@ -1420,7 +1420,7 @@ static int arm_smmu_alloc_cd_tables(struct arm_smmu_master *master)
cd_table->s1fmt = STRTAB_STE_0_S1FMT_LINEAR;
cd_table->linear.num_ents = max_contexts;
l1size = max_contexts * sizeof(struct arm_smmu_cd),
l1size = max_contexts * sizeof(struct arm_smmu_cd);
cd_table->linear.table = dma_alloc_coherent(smmu->dev, l1size,
&cd_table->cdtab_dma,
GFP_KERNEL);
@ -3625,7 +3625,7 @@ static int arm_smmu_init_strtab_2lvl(struct arm_smmu_device *smmu)
u32 l1size;
struct arm_smmu_strtab_cfg *cfg = &smmu->strtab_cfg;
unsigned int last_sid_idx =
arm_smmu_strtab_l1_idx((1 << smmu->sid_bits) - 1);
arm_smmu_strtab_l1_idx((1ULL << smmu->sid_bits) - 1);
/* Calculate the L1 size, capped to the SIDSIZE. */
cfg->l2.num_l1_ents = min(last_sid_idx + 1, STRTAB_MAX_L1_ENTRIES);

View File

@ -130,7 +130,7 @@ int arm_mmu500_reset(struct arm_smmu_device *smmu)
/*
* Disable MMU-500's not-particularly-beneficial next-page
* prefetcher for the sake of errata #841119 and #826419.
* prefetcher for the sake of at least 5 known errata.
*/
for (i = 0; i < smmu->num_context_banks; ++i) {
reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
@ -138,7 +138,7 @@ int arm_mmu500_reset(struct arm_smmu_device *smmu)
arm_smmu_cb_write(smmu, i, ARM_SMMU_CB_ACTLR, reg);
reg = arm_smmu_cb_read(smmu, i, ARM_SMMU_CB_ACTLR);
if (reg & ARM_MMU500_ACTLR_CPRE)
dev_warn_once(smmu->dev, "Failed to disable prefetcher [errata #841119 and #826419], check ACR.CACHE_LOCK\n");
dev_warn_once(smmu->dev, "Failed to disable prefetcher for errata workarounds, check SACR.CACHE_LOCK\n");
}
return 0;