Commit f2057b42 authored by David Hildenbrand's avatar David Hildenbrand Committed by Heiko Carstens

s390/vmemmap: fallback to PTEs if mapping large PMD fails

Let's fallback to single pages if short on huge pages. No need to stop
memory hotplug.

Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarDavid Hildenbrand <david@redhat.com>
Message-Id: <20200722094558.9828-8-david@redhat.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent b9ff8100
......@@ -180,11 +180,11 @@ static int __ref modify_pmd_table(pud_t *pud, unsigned long addr,
*/
new_page = vmemmap_alloc_block(PMD_SIZE,
NUMA_NO_NODE);
if (!new_page)
goto out;
if (new_page) {
pmd_val(*pmd) = __pa(new_page) | prot;
continue;
}
}
pte = vmem_pte_alloc();
if (!pte)
goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment