From c5be0e1ed1fa17b9f9abb49e80db014e067523e4 Mon Sep 17 00:00:00 2001 From: Xiang W Date: Tue, 11 Jun 2024 19:19:28 +0800 Subject: [PATCH] lib: utils/ipi: Skip initialize ipi when dt is not enabled When the dt node has a status property and the value is not ok or okay, skip initializing ipi. Signed-off-by: Xiang W Reviewed-by: Anup Patel --- lib/utils/ipi/fdt_ipi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/utils/ipi/fdt_ipi.c b/lib/utils/ipi/fdt_ipi.c index 7762aba..0b75093 100644 --- a/lib/utils/ipi/fdt_ipi.c +++ b/lib/utils/ipi/fdt_ipi.c @@ -44,6 +44,9 @@ static int fdt_ipi_cold_init(void) noff = -1; while ((noff = fdt_find_match(fdt, noff, drv->match_table, &match)) >= 0) { + if (!fdt_node_is_enabled(fdt, noff)) + continue; + /* drv->cold_init must not be NULL */ if (drv->cold_init == NULL) return SBI_EFAIL; -- 2.34.1