From: Magnus Damm <damm+renesas@xxxxxxxxxxxxx> Introduce a keepipmmu boot paramenter to let the user override. Not-Yet-Signed-off-by: Magnus Damm <damm+renesas@xxxxxxxxxxxxx> --- drivers/iommu/ipmmu-vmsa.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) --- 0004/drivers/iommu/ipmmu-vmsa.c +++ work/drivers/iommu/ipmmu-vmsa.c 2019-02-20 23:17:54.038850305 +0900 @@ -759,6 +759,17 @@ static int ipmmu_init_platform_device(st return 0; } + +static int keep_ipmmu; + +static int __init keepipmmu_setup(char *__unused) +{ + keep_ipmmu = 1; + return 1; +} + +__setup("keepipmmu", keepipmmu_setup); + static const struct soc_device_attribute soc_rcar_gen3[] = { { .soc_id = "r8a774a1", }, { .soc_id = "r8a774c0", }, @@ -802,7 +813,8 @@ static bool ipmmu_slave_whitelist(struct * then assume the IPMMU will not be needed for address expansion. */ if (memblock_end_of_DRAM() <= SZ_4G) - return false; + if (!keep_ipmmu) + return false; /* Check whether this slave device can work with the IPMMU */ for (i = 0; i < ARRAY_SIZE(rcar_gen3_slave_whitelist); i++) {