diff mbox series

[PATCH/RFC,02/09] iommu/ipmmu-vmsa: Display system memory informationn during boot

Message ID 155067456846.15971.8286792793335627019.sendpatchset@octo (mailing list archive)
State Under Review
Delegated to: Geert Uytterhoeven
Headers show
Series IPMMU address translation enablement prototype | expand

Commit Message

Magnus Damm Feb. 20, 2019, 2:56 p.m. UTC
From: Magnus Damm <damm+renesas@opensource.se>

Clarify runtime memory bank detection in the IPMMU driver.

Not-Yet-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---

 drivers/iommu/ipmmu-vmsa.c |    8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

--- 0002/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c	2019-02-20 23:09:46.212274343 +0900
@@ -1095,6 +1095,14 @@  static int ipmmu_probe(struct platform_d
 			dev_info(&pdev->dev, "IPMMU context 0 is reserved\n");
 			set_bit(0, mmu->ctx);
 		}
+
+		if (memblock_end_of_DRAM() <= SZ_4G) {
+			dev_info(&pdev->dev, "All system memory located within 32 bits of physical address space.\n");
+			dev_info(&pdev->dev, "IPMMU address translation not needed.\n");
+		} else {
+			dev_info(&pdev->dev, "System memory detected outside 32 bits of physical address space.\n");
+			dev_info(&pdev->dev, "IPMMU address translation may be required.\n");
+		}		
 	}
 
 	/*