summaryrefslogtreecommitdiffstats
path: root/virt/lib
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@kernel.org>2024-10-09 22:41:31 +0200
committerRob Herring (Arm) <robh@kernel.org>2024-10-10 19:43:01 +0200
commit6e0391e48cf9fb8b1b5e27c0cbbaf2e4639f2c33 (patch)
treee402b0ed53f46ae4e3fed4e113a27ac4b27f20a5 /virt/lib
parentof: Fix unbalanced of node refcount and memory leaks (diff)
downloadlinux-6e0391e48cf9fb8b1b5e27c0cbbaf2e4639f2c33.tar.xz
linux-6e0391e48cf9fb8b1b5e27c0cbbaf2e4639f2c33.zip
of: Skip kunit tests when arm64+ACPI doesn't populate root node
A root node is required to apply DT overlays. A root node is usually present after commit 7b937cc243e5 ("of: Create of_root if no dtb provided by firmware"), except for on arm64 systems booted with ACPI tables. In that case, the root node is intentionally not populated because it would "allow DT devices to be instantiated atop an ACPI base system"[1]. Introduce an OF function that skips the kunit test if the root node isn't populated. Limit the test to when both CONFIG_ARM64 and CONFIG_ACPI are set, because otherwise the lack of a root node is a bug. Make the function private and take a kunit test parameter so that it can't be abused to test for the presence of the root node in non-test code. Use this function to skip tests that require the root node. Currently that's the DT tests and any tests that apply overlays. Reported-by: Guenter Roeck <linux@roeck-us.net> Closes: https://lore.kernel.org/r/6cd337fb-38f0-41cb-b942-5844b84433db@roeck-us.net Link: https://lore.kernel.org/r/Zd4dQpHO7em1ji67@FVFF77S0Q05N.cambridge.arm.com [1] Fixes: 893ecc6d2d61 ("of: Add KUnit test to confirm DTB is loaded") Signed-off-by: Stephen Boyd <sboyd@kernel.org> Tested-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Rutland <mark.rutland@arm.com> Link: https://lore.kernel.org/r/20241009204133.1169931-1-sboyd@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'virt/lib')
0 files changed, 0 insertions, 0 deletions