Skip to contentSkip to conversation

powerpc/powernv/ioda: Finish removing explicit max window size check

PATCH Applied Alexey Kardashevskiy 2 participants 2 messages Jan 18, 2018 – Jan 22, 2018 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/powernv/ioda: Finish removing explicit max window size check

9003a2498 removed checn from the DMA window pages allocator, however the VFIO driver tests limits before doing so by calling the get_table_size hook which was left behind; this fixes it.

Fixes 9003a2498 "powerpc/powernv/ioda: Remove explicit max window size check"

---

It is properly tested now. Only affected folks for now are DPDK guys with machines with non-power-of-two physical RAM amount.

---
 arch/powerpc/platforms/powernv/pci-ioda.c | 1 -
 1 file changed, 1 deletion(-)
arch/powerpc/platforms/powernv/pci-ioda.c +0 -1
index b9146d5..1069f9c 100644
@@ -2572,7 +2572,6 @@ static unsigned long pnv_pci_ioda2_get_table_size(__u32 page_shift,
 	unsigned long direct_table_size;
 
 	if (!levels || (levels > POWERNV_IOMMU_MAX_LEVELS) ||
-			(window_size > memory_hotplug_max()) ||
 			!is_power_of_2(window_size))
 		return 0;
 
Signature · 1 line
2.11.0
#1 lore raw
Quoted 6 lines · Alexey Kardashevskiy

9003a2498 removed checn from the DMA window pages allocator, however the VFIO driver tests limits before doing so by calling the get_table_size hook which was left behind; this fixes it.

Fixes 9003a2498 "powerpc/powernv/ioda: Remove explicit max window size check"

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/ae677ff02f2ddb0980953efd4afed1

cheers