summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/drmem.h
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@linux.vnet.ibm.com>2018-04-20 22:29:48 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2018-09-19 14:08:12 +0200
commit063b8b1251fd069f3740339fca56119d218f11ba (patch)
tree4a58f214d747e4be12e1a51f0f349b2848b04310 /arch/powerpc/include/asm/drmem.h
parentpowerpc: avoid -mno-sched-epilog on GCC 4.9 and newer (diff)
downloadlinux-063b8b1251fd069f3740339fca56119d218f11ba.tar.xz
linux-063b8b1251fd069f3740339fca56119d218f11ba.zip
powerpc/pseries/memory-hotplug: Only update DT once per memory DLPAR request
The updates to powerpc numa and memory hotplug code now use the in-kernel LMB array instead of the device tree. This change allows the pseries memory DLPAR code to only update the device tree once after successfully handling a DLPAR request. Prior to the in-kernel LMB array, the numa code looked up the affinity for memory being added in the device tree, the code now looks this up in the LMB array. This change means the memory hotplug code can just update the affinity for an LMB in the LMB array instead of updating the device tree. This also provides a savings in kernel memory. When updating the device tree old properties are never free'ed since there is no usecount on properties. This behavior leads to a new copy of the property being allocated every time a LMB is added or removed (i.e. a request to add 100 LMBs creates 100 new copies of the property). With this update only a single new property is created when a DLPAR request completes successfully. 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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/drmem.h b/arch/powerpc/include/asm/drmem.h
index ce242b9ea8c6..7c1d8e74b25d 100644
--- a/arch/powerpc/include/asm/drmem.h
+++ b/arch/powerpc/include/asm/drmem.h
@@ -99,4 +99,9 @@ void __init walk_drmem_lmbs_early(unsigned long node,
void (*func)(struct drmem_lmb *, const __be32 **));
#endif
+static inline void invalidate_lmb_associativity_index(struct drmem_lmb *lmb)
+{
+ lmb->aa_index = 0xffffffff;
+}
+
#endif /* _ASM_POWERPC_LMB_H */