|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] xen/dt: Remove loop in dt_read_number()
Hi Michal, On 18/06/2025 08:06, Orzel, Michal wrote: On 17/06/2025 19:13, Alejandro Vallejo wrote:
A lot of the use seems to be related to PCI. Below an example from [1]:
pcie {
#address-cells = <3>;
#size-cells = <2>;
pcie@0 {
device_type = "pci";
reg = <0x0 0x0 0x0 0x0 0x0>;
#address-cells = <3>;
#size-cells = <2>;
ranges;
wifi@0 {
compatible = "pci17cb,1109";
reg = <0x0 0x0 0x0 0x0 0x0>;
qcom,calibration-variant = "RDP433_1";
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
wifi1_wsi_tx: endpoint {
remote-endpoint = <&wifi2_wsi_rx>;
};
};
port@1 {
reg = <1>;
wifi1_wsi_rx: endpoint {
remote-endpoint = <&wifi3_wsi_tx>;
};
};
};
};
};
"reg" has effectively 5 cells (3 for address and 2 for size).
From a very brief look, I couldn't find how this is interpreted. But I
don't see how dt_read_number() can be used in this case. So I think it
makes sense to restrict. The question though is whether it is a good
idea to cap the value and behave differently from Linux.
Speaking of which there are another fun different behavior between Linux and Xen in DT. The default size of the root #address is 2 in Xen (see DT_ROOT_NODE_ADDR_CELLS_DEFAULT) which is spec compliant. But Linux will use 1 (see OF_ROOT_NODE_ADDR_CELLS_DEFAULT). I haven't seen any issue so far, but only notice recently when working on a separate project recently. I am still undecided for this one whether Xen should change because technically a Device-Tree should nowadays always provide #address-cells and #size-cells. Cheers, [1] devicetree/bindings/net/wireless/qcom,ath12k-wsi.yaml -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |