[PATCH 0/1] Improve device tree directory sorting
Curt Brune
curt at cumulusnetworks.com
Tue Nov 24 18:17:09 PST 2015
This patch improves the device tree directory sorting.
Previously the sorting algorithm would result in the following ordering for a
Freescale P2020 SoC device (Rooted under: /proc/device-tree/soc at ffe00000)
#address-cells
#size-cells
.
..
bus-frequency
compatible
device_type
i2c at 3000
i2c at 3100
mdio at 24520
msi at 41600
mdio at 26520
serial at 4600
ethernet at 26000
global-utilities at e0000
memory-controller at 2000
l2-cache-controller at 20000
name
pic at 40000
ranges
sdhci at 2e000
serial at 4500
Ideally 'serial at 4500' would come before 'serial at 4600'. This would
cause the new kexec-ed kernel to have the serial consoles detected in
the wrong order, i.e. ttyS0 and ttyS1 are swapped.
Using the attached patch the same directory is ordered as:
#address-cells
#size-cells
.
..
bus-frequency
compatible
device_type
ethernet at 26000
global-utilities at e0000
i2c at 3000
i2c at 3100
l2-cache-controller at 20000
mdio at 24520
mdio at 26520
memory-controller at 2000
msi at 41600
name
pic at 40000
ranges
sdhci at 2e000
serial at 4500
serial at 4600
Curt Brune (1):
Improve device tree directory sorting
kexec/arch/ppc/fs2dt.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
--
1.9.1
More information about the kexec
mailing list