s390/vmem: align segment and region tables to 16k
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 13 May 2016 09:10:09 +0000 (11:10 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 13 Jun 2016 13:58:13 +0000 (15:58 +0200)
Usually segment and region tables are 16k aligned due to the way the
buddy allocator works.  This is not true for the vmem code which only
asks for a 4k alignment. In order to be consistent enforce a 16k
alignment here as well.

This alignment will be assumed and therefore is required by the
pageattr code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/vmem.c

index d48cf25cfe99b164be1e1f55b13c88c9c37044fa..a64b91a8e5ac7a8096eee7614d00ffd6bb4a5429 100644 (file)
@@ -29,9 +29,11 @@ static LIST_HEAD(mem_segs);
 
 static void __ref *vmem_alloc_pages(unsigned int order)
 {
+       unsigned long size = PAGE_SIZE << order;
+
        if (slab_is_available())
                return (void *)__get_free_pages(GFP_KERNEL, order);
-       return alloc_bootmem_pages((1 << order) * PAGE_SIZE);
+       return alloc_bootmem_align(size, size);
 }
 
 static inline pud_t *vmem_pud_alloc(void)
This page took 0.025802 seconds and 5 git commands to generate.