Skip to content
  • Michal Orzel's avatar
    Fix Xen boot-time cpupools handling · 2f36345b
    Michal Orzel authored
    When retrieving a phandle for a CPU node using "fdtget -t x", the
    resulting hex number (in case the phandle exists) lacks the '0x' prefix.
    This value is subsequently used to construct the cpupool-cpus property.
    This results in an incorrect property generation that leads to Xen
    failure (example: cpupool-cpus < a> instead of < 0xa>). Address the
    issue by adding 0x prefix to the result from fdtget.
    
    Additionally, avoid unnecessary regeneration of the phandle if it already
    exists.
    
    Fixes: b687773b
    
     ("Add support for Xen boot-time cpupools")
    Signed-off-by: default avatarMichal Orzel <michal.orzel@amd.com>
    Reviewed-by: default avatarStefano Stabellini <sstabellini@kernel.org>
    2f36345b