[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <945ff87c765a461d46f0033fbef422e97f9aede0.1712642324.git.baruch@tkos.co.il>
Date: Tue, 9 Apr 2024 09:17:56 +0300
From: Baruch Siach <baruch@...s.co.il>
To: Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Rob Herring <robh@...nel.org>,
Saravana Kannan <saravanak@...gle.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>
Cc: Baruch Siach <baruch@...s.co.il>,
Robin Murphy <robin.murphy@....com>,
iommu@...ts.linux.dev,
devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org,
linux-s390@...r.kernel.org,
Petr Tesařík <petr@...arici.cz>,
Ramon Fried <ramon@...reality.ai>,
Elad Nachman <enachman@...vell.com>
Subject: [PATCH RFC v2 3/5] of: unittest: add test for of_dma_get_cpu_limits() 'min' param
Verify that of_dma_get_cpu_limits() sets this new parameter to the
expected result.
Signed-off-by: Baruch Siach <baruch@...s.co.il>
---
drivers/of/unittest.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 2d632d4ec5b1..8fabb445a62a 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -924,7 +924,7 @@ static void __init of_unittest_changeset(void)
static void __init of_unittest_dma_get_cpu_limits(void)
{
struct device_node *np;
- phys_addr_t cpu_addr;
+ phys_addr_t cpu_addr_max, cpu_addr_min;
if (!IS_ENABLED(CONFIG_OF_ADDRESS))
return;
@@ -935,10 +935,13 @@ static void __init of_unittest_dma_get_cpu_limits(void)
return;
}
- of_dma_get_cpu_limits(np, &cpu_addr, NULL);
- unittest(cpu_addr == 0x4fffffff,
- "of_dma_get_cpu_limits: wrong CPU addr %pad (expecting %x)\n",
- &cpu_addr, 0x4fffffff);
+ of_dma_get_cpu_limits(np, &cpu_addr_max, &cpu_addr_min);
+ unittest(cpu_addr_max == 0x4fffffff,
+ "of_dma_get_cpu_limits: wrong CPU max addr %pad (expecting %x)\n",
+ &cpu_addr_max, 0x4fffffff);
+ unittest(cpu_addr_min == 0x40000000,
+ "of_dma_get_cpu_limits: wrong CPU min addr %pad (expecting %x)\n",
+ &cpu_addr_min, 0x40000000);
}
static void __init of_unittest_dma_ranges_one(const char *path,
--
2.43.0
Powered by blists - more mailing lists