[PATCH] iommu/dma: Remove unused variable

2019-01-23 Thread Shaokun Zhang
end_pfn is never used after commit ('iommu/iova: Make dma 32bit pfn implicit'), cleanup it. Cc: Joerg Roedel Cc: Robin Murphy Cc: Zhen Lei Signed-off-by: Shaokun Zhang --- drivers/iommu/dma-iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers

[PATCH] iommu/vt-d, trivial: Remove unused variable

2018-03-22 Thread Shaokun Zhang
Unused after commit <42e8c186b595> ("iommu/vt-d: Simplify io/tlb flushing in intel_iommu_unmap"), cleanup it. Cc: David Woodhouse Cc: Joerg Roedel Signed-off-by: Shaokun Zhang --- drivers/iommu/intel-iommu.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH] iommu/iova: Separate atomic variables to improve performance

2019-04-03 Thread Shaokun Zhang
From: Jinyu Qi In struct iova_domain, there are three atomic variables, the former two are about TLB flush counters which use atomic_add operation, anoter is used to flush timer that use cmpxhg operation. These variables are in the same cache line, so it will cause some performance loss under th

[PATCH] iommu/iova: Replace cmpxchg with xchg in queue_iova

2020-08-27 Thread Shaokun Zhang
rom 1 to 1. Cc: Joerg Roedel Signed-off-by: Yuqi Jin Signed-off-by: Shaokun Zhang --- drivers/iommu/iova.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/iova.c b/drivers/iommu/iova.c index 45a251da5453..30d969a4c5fd 100644 --- a/drivers/iommu/iova.c +++ b/dr

[PATCH] iommu/amd: Remove duplicate check of devid

2021-04-08 Thread Shaokun Zhang
'devid' has been checked in function check_device, no need to double check and clean up this. Cc: Joerg Roedel Cc: Will Deacon Signed-off-by: Shaokun Zhang --- drivers/iommu/amd/iommu.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers

Re: [PATCH] iommu/amd: Remove duplicate check of devid

2021-04-08 Thread Shaokun Zhang
Apologies for my mistake: devid = get_device_id(dev) is need, only the check is unnecessary. Thanks, Shaokun On 2021/4/9 9:31, Shaokun Zhang wrote: > 'devid' has been checked in function check_device, no need to double > check and clean up this. > > Cc: Joerg Roe

[PATCH RESEND] iommu/amd: Remove duplicate check of devid

2021-04-08 Thread Shaokun Zhang
'devid' has been checked in function check_device, no need to double check and clean up this. Cc: Joerg Roedel Cc: Will Deacon Signed-off-by: Shaokun Zhang --- drivers/iommu/amd/iommu.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/iommu/amd

[PATCH] iommu/amd: Remove redundant assignment of err

2021-05-18 Thread Shaokun Zhang
'err' will be initialized and cleanup the redundant initialization. Cc: Joerg Roedel Signed-off-by: Shaokun Zhang --- drivers/iommu/amd/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 80

[PATCH] iommu/arm-smmu-v3: sync the OVACKFLG to PRIQ consumer register

2018-07-23 Thread Shaokun Zhang
From: Miao Zhong When PRI queue occurs overflow, driver should update the OVACKFLG to the PRIQ consumer register, otherwise subsequent PRI requests will not be processed. Cc: Will Deacon Cc: Robin Murphy Signed-off-by: Miao Zhong --- drivers/iommu/arm-smmu-v3.c | 1 + 1 file changed, 1 inse