[PATCH RFC v1 3/6] swiotlb: introduce swiotlb_get_type() to calculate swiotlb buffer type

2021-02-04 Thread Dongli Zhang
This patch introduces swiotlb_get_type() in order to calculate which swiotlb buffer the given DMA address is belong to. This is to prepare to enable 64-bit swiotlb. Cc: Joe Jin Signed-off-by: Dongli Zhang --- include/linux/swiotlb.h | 14 ++ kernel/dma/swiotlb.c| 2 ++ 2

[PATCH RFC v1 1/6] swiotlb: define new enumerated type

2021-02-04 Thread Dongli Zhang
This is just to define new enumerated type without functional change. The 'SWIOTLB_LO' is to index legacy 32-bit swiotlb buffer, while the 'SWIOTLB_HI' is to index the 64-bit buffer. This is to prepare to enable 64-bit swiotlb. Cc: Joe Jin Signed-off-by: Dongli Zhang --- include/linux

[PATCH RFC v1 2/6] swiotlb: convert variables to arrays

2021-02-04 Thread Dongli Zhang
- no_iotlb_memory There is no functional change and this is to prepare to enable 64-bit swiotlb. Cc: Joe Jin Signed-off-by: Dongli Zhang --- arch/powerpc/platforms/pseries/svm.c | 6 +- drivers/xen/swiotlb-xen.c| 4 +- include/linux/swiotlb.h | 5 +- kernel/dma/swiotlb.c

[PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-04 Thread Dongli Zhang
to enable 64-bit xen-swiotlb. Cc: Joe Jin Signed-off-by: Dongli Zhang --- drivers/xen/swiotlb-xen.c | 75 +-- 1 file changed, 40 insertions(+), 35 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 662638093542..e18cae693cdc 100644

[PATCH RFC v1 4/6] swiotlb: enable 64-bit swiotlb

2021-02-04 Thread Dongli Zhang
el will be able to allocate >4GB swiotlb buffer. This patch is only for swiotlb, not including xen-swiotlb. Cc: Joe Jin Signed-off-by: Dongli Zhang --- arch/mips/cavium-octeon/dma-octeon.c | 3 +- arch/powerpc/kernel/dma-swiotlb.c| 2 +- arch/powerpc/platforms/pseries/svm.

[PATCH RFC v1 0/6] swiotlb: 64-bit DMA buffer

2021-02-04 Thread Dongli Zhang
vm# cat /sys/kernel/debug/swiotlb/io_tlb_nslabs 65536 vm# cat /sys/kernel/debug/swiotlb/io_tlb_used 0 vm# cat /sys/kernel/debug/swiotlb/io_tlb_nslabs-highmem 1048576 vm# cat /sys/kernel/debug/swiotlb/io_tlb_used-highmem 64647 Please let me know if there is any feedback for this idea and RFC. Don

[PATCH RFC v1 6/6] xen-swiotlb: enable 64-bit xen-swiotlb

2021-02-04 Thread Dongli Zhang
This patch is to enable the 64-bit xen-swiotlb buffer. For Xen PVM DMA address, the 64-bit device will be able to allocate from 64-bit swiotlb buffer. Cc: Joe Jin Signed-off-by: Dongli Zhang --- drivers/xen/swiotlb-xen.c | 117 -- 1 file changed, 74

[PATCH 1/1] drm/i915: remove unused IO_TLB_SEGPAGES which should be defined by swiotlb

2019-05-20 Thread Dongli Zhang
e. Signed-off-by: Dongli Zhang --- drivers/gpu/drm/i915/i915_gem_internal.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_internal.c b/drivers/gpu/drm/i915/i915_gem_internal.c index ab627ed..2166217 100644 --- a/drivers/gpu/drm/i915/i915_gem_internal.c +++