* [merged] memblock-dont-adjust-size-in-memblock_find_base.patch removed from -mm tree
@ 2011-02-14 20:19 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2011-02-14 20:19 UTC (permalink / raw)
To: yinghai, airlied, benh, davem, hpa, mingo, mm-commits
The patch titled
memblock: don't adjust size in memblock_find_base()
has been removed from the -mm tree. Its filename was
memblock-dont-adjust-size-in-memblock_find_base.patch
This patch was dropped because it was merged into mainline or a subsystem tree
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: memblock: don't adjust size in memblock_find_base()
From: Yinghai Lu <yinghai@kernel.org>
While applying patch to use memblock to find aperture for 64bit x86.
Ingo found system with 1g + force_iommu
> No AGP bridge found
> Node 0: aperture @ 38000000 size 32 MB
> Aperture pointing to e820 RAM. Ignoring.
> Your BIOS doesn't leave a aperture memory hole
> Please enable the IOMMU option in the BIOS setup
> This costs you 64 MB of RAM
> Cannot allocate aperture memory hole (0,65536K)
the corresponding code:
addr = memblock_find_in_range(0, 1ULL<<32, aper_size, 512ULL<<20);
if (addr == MEMBLOCK_ERROR || addr + aper_size > 0xffffffff) {
printk(KERN_ERR
"Cannot allocate aperture memory hole (%lx,%uK)\n",
addr, aper_size>>10);
return 0;
}
memblock_x86_reserve_range(addr, addr + aper_size, "aperture64")
it fails because memblock core code align the size with 512M. that could make
size way too big.
So don't align the size in that case.
actually __memblock_alloc_base, the another caller already align that before calling that function.
BTW. x86 does not use __memblock_alloc_base...
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: David Miller <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Dave Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memblock.c | 2 --
1 file changed, 2 deletions(-)
diff -puN mm/memblock.c~memblock-dont-adjust-size-in-memblock_find_base mm/memblock.c
--- a/mm/memblock.c~memblock-dont-adjust-size-in-memblock_find_base
+++ a/mm/memblock.c
@@ -137,8 +137,6 @@ static phys_addr_t __init_memblock membl
BUG_ON(0 == size);
- size = memblock_align_up(size, align);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-14 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 20:19 [merged] memblock-dont-adjust-size-in-memblock_find_base.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.