| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [PATCH v5 4/6] xen/cpupool: Create different cpupools at boot time
 
To: Luca Fancellu <Luca.Fancellu@xxxxxxx>From: Julien Grall <julien@xxxxxxx>Date: Thu, 7 Apr 2022 15:36:18 +0100Cc: Xen developer discussion <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>Delivery-date: Thu, 07 Apr 2022 14:36:30 +0000List-id: Xen developer discussion <xen-devel.lists.xenproject.org> 
 
Hi Luca,
On 07/04/2022 10:52, Luca Fancellu wrote:
 
+void __init btcpupools_dtb_parse(void)
+{
+    const struct dt_device_node *chosen, *node;
+
+    chosen = dt_find_node_by_path("/chosen");
+    if ( !chosen )
+        return;
 
Aside when using ACPI, the chosen node should always be there. So I think we 
should throw/print an error if chosen is not present.
 
When you say error, do you mean like a panic or just a printk XENLOG_ERR and 
return?
 
You seem to use panic() below. So I would also use panic() here as this 
shouldn't be expected. 
Cheers,
--
Julien Grall
 
 |