Commit fd578f9c authored by Pekka Enberg's avatar Pekka Enberg Committed by Ingo Molnar

x86: use roundup() instead of PAGE_ALIGN() in find_early_table_space()

Impact: cleanup

This patch changes find_early_table_space() to use roundup() for rounding up
tables to page size to unify the common parts of the 32-bit and 64-bit
implementations.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
LKML-Reference: <1236077705.2675.6.camel@penberg-laptop>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 2b688dfd
...@@ -845,10 +845,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse) ...@@ -845,10 +845,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse)
unsigned long puds, pmds, ptes, tables, start; unsigned long puds, pmds, ptes, tables, start;
puds = (end + PUD_SIZE - 1) >> PUD_SHIFT; puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
tables = PAGE_ALIGN(puds * sizeof(pud_t)); tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT; pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
tables += PAGE_ALIGN(pmds * sizeof(pmd_t)); tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
if (use_pse) { if (use_pse) {
unsigned long extra; unsigned long extra;
...@@ -859,10 +859,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse) ...@@ -859,10 +859,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse)
} else } else
ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT; ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
tables += PAGE_ALIGN(ptes * sizeof(pte_t)); tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE);
/* for fixmap */ /* for fixmap */
tables += PAGE_ALIGN(__end_of_fixed_addresses * sizeof(pte_t)); tables += roundup(__end_of_fixed_addresses * sizeof(pte_t), PAGE_SIZE);
/* /*
* RED-PEN putting page tables only on node 0 could * RED-PEN putting page tables only on node 0 could
......
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