Skip to contentSkip to conversation

of: unittest: 64 bit dma address test requires arch support

PATCH Applied [email protected] 2 participants 2 messages Dec 12, 2021 – Dec 15, 2021 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: unittest: 64 bit dma address test requires arch support

From: Frank Rowand <[email protected]>

If an architecture does not support 64 bit dma addresses then testing for an expected dma address >= 0x100000000 will fail.

Fixes e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset")
---
 drivers/of/unittest.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/of/unittest.c +3 -2
index 481ba8682ebf..126020e9838a 100644
@@ -934,8 +934,9 @@ static void __init of_unittest_parse_dma_ranges(void)
 {
 	of_unittest_dma_ranges_one("/testcase-data/address-tests/device@70000000",
 		0x0, 0x20000000);
-	of_unittest_dma_ranges_one("/testcase-data/address-tests/bus@80000000/device@1000",
-		0x100000000, 0x20000000);
+	if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT))
+		of_unittest_dma_ranges_one("/testcase-data/address-tests/bus@80000000/device@1000",
+			0x100000000, 0x20000000);
 	of_unittest_dma_ranges_one("/testcase-data/address-tests/pci@90000000",
 		0x80000000, 0x20000000);
 }
Signature · 1 line
Frank Rowand <[email protected]>
maintainer Applied
#1 lore raw
Quoted 11 lines · On Sun, 12 Dec 2021 16:18:52 -0600, [email protected] wrote:

From: Frank Rowand <[email protected]>

If an architecture does not support 64 bit dma addresses then testing for an expected dma address >= 0x100000000 will fail.

Fixes e0d072782c73 ("dma-mapping: introduce DMA range map, supplanting dma_pfn_offset")
---
 drivers/of/unittest.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Applied, thanks!