aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/init_32.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/init_32.c')
-rw-r--r--arch/x86/mm/init_32.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
index 5b06a2f5deae..1dd6b6334dc8 100644
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -845,10 +845,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse)
845 unsigned long puds, pmds, ptes, tables, start; 845 unsigned long puds, pmds, ptes, tables, start;
846 846
847 puds = (end + PUD_SIZE - 1) >> PUD_SHIFT; 847 puds = (end + PUD_SIZE - 1) >> PUD_SHIFT;
848 tables = PAGE_ALIGN(puds * sizeof(pud_t)); 848 tables = roundup(puds * sizeof(pud_t), PAGE_SIZE);
849 849
850 pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT; 850 pmds = (end + PMD_SIZE - 1) >> PMD_SHIFT;
851 tables += PAGE_ALIGN(pmds * sizeof(pmd_t)); 851 tables += roundup(pmds * sizeof(pmd_t), PAGE_SIZE);
852 852
853 if (use_pse) { 853 if (use_pse) {
854 unsigned long extra; 854 unsigned long extra;
@@ -859,10 +859,10 @@ static void __init find_early_table_space(unsigned long end, int use_pse)
859 } else 859 } else
860 ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT; 860 ptes = (end + PAGE_SIZE - 1) >> PAGE_SHIFT;
861 861
862 tables += PAGE_ALIGN(ptes * sizeof(pte_t)); 862 tables += roundup(ptes * sizeof(pte_t), PAGE_SIZE);
863 863
864 /* for fixmap */ 864 /* for fixmap */
865 tables += PAGE_ALIGN(__end_of_fixed_addresses * sizeof(pte_t)); 865 tables += roundup(__end_of_fixed_addresses * sizeof(pte_t), PAGE_SIZE);
866 866
867 /* 867 /*
868 * RED-PEN putting page tables only on node 0 could 868 * RED-PEN putting page tables only on node 0 could