Skip to content

Commit

Permalink
s390/vmem: align segment and region tables to 16k
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jun 13, 2016
1 parent 4ccccc5 commit 2e9996f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion arch/s390/mm/vmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2e9996f

Please sign in to comment.