summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm
diff options
context:
space:
mode:
authorAneesh Kumar K.V2019-07-01 16:33:38 +0200
committerMichael Ellerman2019-07-04 16:32:57 +0200
commitc0b1b23b9c87569d5f90d06e86f26b31b544fa1e (patch)
tree69f203569c64c4fbefa6b90a5677a66571d7d7bf /arch/powerpc/mm
parentpowerpc/mm: Consolidate numa_enable check and min_common_depth check (diff)
downloadkernel-qcow2-linux-c0b1b23b9c87569d5f90d06e86f26b31b544fa1e.tar.gz
kernel-qcow2-linux-c0b1b23b9c87569d5f90d06e86f26b31b544fa1e.tar.xz
kernel-qcow2-linux-c0b1b23b9c87569d5f90d06e86f26b31b544fa1e.zip
powerpc/mm/nvdimm: Add an informative message if we fail to allocate altmap block
Allocation from altmap area can fail based on vmemmap page size used. Add kernel info message to indicate the failure. That allows the user to identify whether they are really using persistent memory reserved space for per-page metadata. The message looks like: [ 136.587212] altmap block allocation failed, falling back to system memory Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm')
-rw-r--r--arch/powerpc/mm/init_64.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index 45b02fa11cd8..b219160a5b1a 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -199,8 +199,11 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
* fail due to alignment issues when using 16MB hugepages, so
* fall back to system memory if the altmap allocation fail.
*/
- if (altmap)
+ if (altmap) {
p = altmap_alloc_block_buf(page_size, altmap);
+ if (!p)
+ pr_debug("altmap block allocation failed, falling back to system memory");
+ }
if (!p)
p = vmemmap_alloc_block_buf(page_size, node);
if (!p)