On Wed, Oct 30, 2024 at 05:00:13PM +0530, Bibek Kumar Patro wrote: > On 10/29/2024 6:17 PM, Will Deacon wrote: > > On Fri, Oct 25, 2024 at 07:51:22PM +0530, Bibek Kumar Patro wrote: > > > On 10/24/2024 6:22 PM, Will Deacon wrote: > > > > On Tue, Oct 08, 2024 at 06:24:06PM +0530, Bibek Kumar Patro wrote: > > If you want to gate the errata workarounds on policy, then please follow > > what we do for the CPU: add a Kconfig option (e.g. > > ARM_SMMU_WORKAROUND_BROKEN_CPRE) which defaults to "on" (assuming that > > the relevant errata aren't all "rare") and update silicon-errata.rst > > accordingly. > > > > Then you can choose to disable them in your .config if you're happy to > > pick up the pieces. > > This seems to be a good idea to me . I am thinking of this approach based on > your suggestion, > i.e. we can bind the original workaround in > arm_mmu500_reset implementation within ARM_SMMU_WORKAROUND_BROKEN_CPRE > config (defualts to on, CPRE would be disabled) and in QCOM SoCs default it > to off > (when ARM_SMMU_QCOM=Y -> switch ARM_SMMU_WORKAROUND_BROKEN_CPRE=N). ARM_SMMU_QCOM is enabled by default, so please don't do that. People who want to disable errata workarounds based on a hunch can do that themselves. There's no need to try to do that automatically in Kconfig. > In silicon-errata.rst would updating ARM_SMMU_WORKAROUND_BROKEN_CPRE be okay > , as the config names are based on erratum number. In this case, the Kconfig option covers a variety of errata so how about we go with: ARM_SMMU_MMU_500_CPRE_ERRATA and then you can list all of the numbers in the "Erratum ID" column? Will