aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm/init.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-01-15 19:56:51 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-16 14:27:59 -0500
commitee408c79420b6a437332d6977fe33ab72c36dc97 (patch)
tree0b3c5dfb2a1e9b3f050ca62fa811b92c7c533498 /arch/x86_64/mm/init.c
parent142a64a650fa5786c2ecea3de5ae3d5a2de72312 (diff)
[PATCH] x86_64: Don't try to put kernel page tables beyond ZONE_DMA32.
For not fully explained reasons it broke mem=... on several setups. Also minor cleanup. Cc: axboe@suse.de Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm/init.c')
-rw-r--r--arch/x86_64/mm/init.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index eca60125efc3..ef84106c1509 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -262,19 +262,11 @@ static void __init find_early_table_space(unsigned long end)
262 tables = round_up(puds * sizeof(pud_t), PAGE_SIZE) + 262 tables = round_up(puds * sizeof(pud_t), PAGE_SIZE) +
263 round_up(pmds * sizeof(pmd_t), PAGE_SIZE); 263 round_up(pmds * sizeof(pmd_t), PAGE_SIZE);
264 264
265 /* Put page tables beyond the DMA zones if possible. 265 /* RED-PEN putting page tables only on node 0 could
266 RED-PEN might be better to spread them out more over 266 cause a hotspot and fill up ZONE_DMA. The page tables
267 memory to avoid hotspots */ 267 need roughly 0.5KB per GB. */
268 if (end > MAX_DMA32_PFN<<PAGE_SHIFT) 268 start = 0x8000;
269 start = MAX_DMA32_PFN << PAGE_SHIFT; 269 table_start = find_e820_area(start, end, tables);
270 else if (end > MAX_DMA_PFN << PAGE_SHIFT)
271 start = MAX_DMA_PFN << PAGE_SHIFT;
272 else
273 start = 0x8000;
274
275 table_start = find_e820_area(start, end, tables);
276 if (table_start == -1)
277 table_start = find_e820_area(0x8000, end, tables);
278 if (table_start == -1UL) 270 if (table_start == -1UL)
279 panic("Cannot find space for the kernel page tables"); 271 panic("Cannot find space for the kernel page tables");
280 272