[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] hook-functions: Add IOMMU modules when MODULES=most and MODULES=deps



Linux v5.6 will enable modular Arm SMMU drivers. Since the SMMU manages
DMA accesses from peripherals, on some systems the disk and network
devices won't start until the SMMU module is loaded. For example without
this change, when building the SMMU as a module, the PCIe SATA
controller doesn't start and the root file system is unavailable on my
test server. Add modules from kernel/drivers/iommu/ when MODULES=most,
and iterate over /sys/class/iommu/ when MODULES=deps.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>

diff --git a/hook-functions b/hook-functions
index fa1fe59..09076d8 100644
--- a/hook-functions
+++ b/hook-functions
@@ -449,7 +449,7 @@ dep_add_modules()
 	fi
 
 	# sys walk some important device classes
-	for class in backlight extcon gpio phy pwm regulator rtc; do
+	for class in backlight extcon gpio iommu phy pwm regulator rtc; do
 		for device in "/sys/class/$class"/*; do
 			device="$(readlink -f "$device")" \
 				&& sys_walk_mod_add "$device"
@@ -595,6 +595,7 @@ auto_add_modules()
 			copy_modules_dir kernel/drivers/gpio
 			copy_modules_dir kernel/drivers/i2c/busses
 			copy_modules_dir kernel/drivers/i2c/muxes
+			copy_modules_dir kernel/drivers/iommu
 			copy_modules_dir kernel/drivers/mfd
 			copy_modules_dir kernel/drivers/phy
 			copy_modules_dir kernel/drivers/pinctrl
-- 
2.20.1


Reply to: