powerpc/drmem: Add support for ibm, dynamic-memory-v2 property
authorNathan Fontenot <nfont@linux.vnet.ibm.com>
Fri, 1 Dec 2017 16:47:53 +0000 (10:47 -0600)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 16 Jan 2018 12:26:29 +0000 (23:26 +1100)
commit2b31e3aec1dbaae5f0a6f0e485fcb1ff1aceb6cf
tree21a93764fcecb9ac46a1fe5d7449ec54555b4692
parent2c77721552e565e900705f4499067f8d37be3976
powerpc/drmem: Add support for ibm, dynamic-memory-v2 property

The Power Hypervisor has introduced a new device tree format for
the property describing the dynamic reconfiguration LMBs for a system,
ibm,dynamic-memory-v2. This new format condenses the size of the
property, especially on large memory systems, by reporting sets
of LMBs that have the same properties (flags and associativity array
index).

This patch updates the powerpc/mm/drmem.c code to provide routines
that can parse the new device tree format during the walk_drmem_lmb*
routines used during boot, the creation of the LMB array, and updating
the device tree to create a new property in the proper format for
ibm,dynamic-memory-v2.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/drmem.h
arch/powerpc/mm/drmem.c