From: Xiang W Date: Tue, 10 May 2022 14:08:58 +0800 Subject: [PATCH v2 3/3] platform: generic: check if CPU node is enabled In-Reply-To: References: Message-ID: <413fe183d445ac64ff3422d857705a7c7a7f4616.camel@126.com> List-Id: To: opensbi@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ? 2022-05-09???? 15:56 +0200?Jan Reme???? > Ignore CPU nodes in FDT which are not enabled. > > Signed-off-by: Jan Remes Look good to me Reviewed-by: Xiang W > --- > ?platform/generic/platform.c | 3 +++ > ?1 file changed, 3 insertions(+) > > diff --git a/platform/generic/platform.c b/platform/generic/platform.c > index 8a4fb70..86db960 100644 > --- a/platform/generic/platform.c > +++ b/platform/generic/platform.c > @@ -107,6 +107,9 @@ unsigned long fw_platform_init(unsigned long arg0, > unsigned long arg1, > ???????? if (SBI_HARTMASK_MAX_BITS <= hartid) > ???????????? continue; > > +??????? if (!fdt_node_is_enabled(fdt, cpu_offset)) > +??????????? continue; > + > ???????? generic_hart_index2id[hart_count++] = hartid; > ???? } > > -- > 2.35.1 >