diff options
Diffstat (limited to 'package/kernel/mac80211/patches/build/130-iommu_backport.patch')
| -rw-r--r-- | package/kernel/mac80211/patches/build/130-iommu_backport.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/build/130-iommu_backport.patch b/package/kernel/mac80211/patches/build/130-iommu_backport.patch new file mode 100644 index 00000000000..2d3ef88d645 --- /dev/null +++ b/package/kernel/mac80211/patches/build/130-iommu_backport.patch @@ -0,0 +1,26 @@ +--- /dev/null ++++ b/backport-include/linux/iommu.h +@@ -0,0 +1,23 @@ ++#ifndef __BACKPORT_LINUX_IOMMU_H ++#define __BACKPORT_LINUX_IOMMU_H ++ ++#include_next <linux/iommu.h> ++#include <linux/version.h> ++ ++#if LINUX_VERSION_IS_LESS(6,3,0) ++ ++static inline int LINUX_BACKPORT(iommu_map)(struct iommu_domain *domain, ++ unsigned long iova, ++ phys_addr_t paddr, size_t size, ++ int prot, gfp_t gfp) ++{ ++ if (gfp == GFP_ATOMIC) ++ return iommu_map_atomic(domain, iova, paddr, size, prot); ++ ++ return iommu_map(domain, iova, paddr, size, prot); ++} ++#define iommu_map LINUX_BACKPORT(iommu_map) ++ ++#endif /* < 6.3 */ ++ ++#endif |
