Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Improve device tree directory sorting
@ 2015-11-25  2:17 Curt Brune
  0 siblings, 0 replies; only message in thread
From: Curt Brune @ 2015-11-25  2:17 UTC (permalink / raw)
  To: kexec

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@ffe00000)

  #address-cells
  #size-cells
  .
  ..
  bus-frequency
  compatible
  device_type
  i2c@3000
  i2c@3100
  mdio@24520
  msi@41600
  mdio@26520
  serial@4600
  ethernet@26000
  global-utilities@e0000
  memory-controller@2000
  l2-cache-controller@20000
  name
  pic@40000
  ranges
  sdhci@2e000
  serial@4500

Ideally 'serial@4500' would come before 'serial@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@26000
  global-utilities@e0000
  i2c@3000
  i2c@3100
  l2-cache-controller@20000
  mdio@24520
  mdio@26520
  memory-controller@2000
  msi@41600
  name
  pic@40000
  ranges
  sdhci@2e000
  serial@4500
  serial@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


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-25  2:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25  2:17 [PATCH 0/1] Improve device tree directory sorting Curt Brune

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox