Commit 8e8a69bc authored by Joerg Roedel's avatar Joerg Roedel
Browse files

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
parents 8e929cb5 7de7d354
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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;