forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/rknpu/rknpu_iommu.c
....@@ -18,6 +18,8 @@
1818
1919 shift = iova_shift(iovad);
2020 iova_len = size >> shift;
21
+
22
+#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
2123 /*
2224 * Freeing non-power-of-two-sized allocations back into the IOVA caches
2325 * will come back to bite us badly, so we have to waste a bit of space
....@@ -26,6 +28,7 @@
2628 */
2729 if (iova_len < (1 << (IOVA_RANGE_CACHE_MAX_SIZE - 1)))
2830 iova_len = roundup_pow_of_two(iova_len);
31
+#endif
2932
3033 #if (KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE)
3134 dma_limit = min_not_zero(dma_limit, dev->bus_dma_limit);