[PATCH] iommu/arm-smmu-v3: Constify arm_smmu_mmu_notifier_ops

2021-12-04 Thread Rikard Falkeborn
The only usage of arm_smmu_mmu_notifier_ops is to assign its address to the ops field in the mmu_notifier struct, which is a pointer to const struct mmu_notifier_ops. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/iommu/arm/arm

Re: [PATCH 4/4] iommu/arm-smmu-v3: Remove cmpxchg() in arm_smmu_cmdq_issue_cmdlist()

2020-06-23 Thread Rikard Falkeborn
Den tis 23 juni 2020 12:21John Garry skrev: > On 23/06/2020 10:35, Rikard Falkeborn wrote: > > > > I'd say that GENMASK_INPUT_CHECK() should be able to handle a l=0 and > > h=unsigned value, so I doubt this warn. > > > > Using GENMASK((int)cmdq-&

Re: [PATCH 4/4] iommu/arm-smmu-v3: Remove cmpxchg() in arm_smmu_cmdq_issue_cmdlist()

2020-06-23 Thread Rikard Falkeborn
Hi Den tis 23 juni 2020 11:22John Garry skrev: > On 23/06/2020 02:07, kernel test robot wrote: > > + Rikard, as the GENMASK compile-time sanity checks were added recently > > > Hi John, > > > > I love your patch! Perhaps something to improve: > > > > [auto build test WARNING on iommu/next] > > [

[PATCH 1/2] iommu/hyper-v: Constify hyperv_ir_domain_ops

2020-05-25 Thread Rikard Falkeborn
filename 30441052112052161460 drivers/iommu/hyperv-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/hyperv-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c index a386b83e0e34

[PATCH 2/2] iommu/sun50i: Constify sun50i_iommu_ops

2020-05-25 Thread Rikard Falkeborn
filename 147262117 64 16907420b drivers/iommu/sun50i-iommu.o Signed-off-by: Rikard Falkeborn --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 1fa09ddcebd4

[PATCH 0/2] drivers/iommu: Constify structs

2020-05-25 Thread Rikard Falkeborn
Constify some structs with function pointers to allow the compiler to put them in read-only memory. There is not dependency between the patches. Rikard Falkeborn (2): iommu/hyper-v: Constify hyperv_ir_domain_ops iommu/sun50i: Constify sun50i_iommu_ops drivers/iommu/hyperv-iommu.c | 2