Commit bd2cfb77 authored by Anton Blanchard's avatar Anton Blanchard Committed by Simon Horman
Browse files

kexec/fs2dt: Fix sorting of device tree



Commit b02d735b ('ppc64 kdump device_tree sort') added code to
sort device tree properties, but it had a few issues.

A compare routine needs to return -1 and 1. The special case for
sorting properties with unit addresses only returned 1 and ignored
the opposite case, which screwed up the sorting.

We were missing a few more things:

- Need to check both basenames are the same length
- Need to check both basenames match

I noticed this when looking at the NUMA topology after a kexec, and
it had shifted.

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
parent fc231094
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment