Commit f413f685 authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/mm: use CRST_ALLOC_ORDER instead of number

Use CRST_ALLOC_ORDER to make it more obvious what the order means,
and also to be consistent with other code, e.g. the vmemmap code.
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 303fd988
...@@ -53,17 +53,17 @@ __initcall(page_table_register_sysctl); ...@@ -53,17 +53,17 @@ __initcall(page_table_register_sysctl);
unsigned long *crst_table_alloc(struct mm_struct *mm) unsigned long *crst_table_alloc(struct mm_struct *mm)
{ {
struct page *page = alloc_pages(GFP_KERNEL, 2); struct page *page = alloc_pages(GFP_KERNEL, CRST_ALLOC_ORDER);
if (!page) if (!page)
return NULL; return NULL;
arch_set_page_dat(page, 2); arch_set_page_dat(page, CRST_ALLOC_ORDER);
return (unsigned long *) page_to_virt(page); return (unsigned long *) page_to_virt(page);
} }
void crst_table_free(struct mm_struct *mm, unsigned long *table) void crst_table_free(struct mm_struct *mm, unsigned long *table)
{ {
free_pages((unsigned long) table, 2); free_pages((unsigned long)table, CRST_ALLOC_ORDER);
} }
static void __crst_table_upgrade(void *arg) static void __crst_table_upgrade(void *arg)
...@@ -403,7 +403,7 @@ void __tlb_remove_table(void *_table) ...@@ -403,7 +403,7 @@ void __tlb_remove_table(void *_table)
switch (half) { switch (half) {
case 0x00U: /* pmd, pud, or p4d */ case 0x00U: /* pmd, pud, or p4d */
free_pages((unsigned long) table, 2); free_pages((unsigned long)table, CRST_ALLOC_ORDER);
return; return;
case 0x01U: /* lower 2K of a 4K page table */ case 0x01U: /* lower 2K of a 4K page table */
case 0x02U: /* higher 2K of a 4K page table */ case 0x02U: /* higher 2K of a 4K page table */
......
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