summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/drmem.h
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@linux.vnet.ibm.com>2017-12-01 10:47:53 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2018-01-16 23:26:29 +1100
commit2b31e3aec1dbaae5f0a6f0e485fcb1ff1aceb6cf (patch)
tree21a93764fcecb9ac46a1fe5d7449ec54555b4692 /arch/powerpc/include/asm/drmem.h
parent2c77721552e565e900705f4499067f8d37be3976 (diff)
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>
Diffstat (limited to 'arch/powerpc/include/asm/drmem.h')
-rw-r--r--arch/powerpc/include/asm/drmem.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/drmem.h b/arch/powerpc/include/asm/drmem.h
index 54241456420e..ce242b9ea8c6 100644
--- a/arch/powerpc/include/asm/drmem.h
+++ b/arch/powerpc/include/asm/drmem.h
@@ -50,6 +50,19 @@ struct of_drconf_cell_v1 {
__be32 flags;
};
+/*
+ * Version 2 of the ibm,dynamic-memory property is defined as a
+ * 32-bit value specifying the number of LMB sets followed by an
+ * array of of_drconf_cell_v2 entries, one per LMB set.
+ */
+struct of_drconf_cell_v2 {
+ u32 seq_lmbs;
+ u64 base_addr;
+ u32 drc_index;
+ u32 aa_index;
+ u32 flags;
+} __packed;
+
#define DRCONF_MEM_ASSIGNED 0x00000008
#define DRCONF_MEM_AI_INVALID 0x00000040
#define DRCONF_MEM_RESERVED 0x00000080