[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E1F4D2C.3000507@zytor.com>
Date: Thu, 14 Jul 2011 13:10:20 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Tejun Heo <tj@...nel.org>
CC: mingo@...hat.com, tglx@...utronix.de, benh@...nel.crashing.org,
yinghai@...nel.org, davem@...emloft.net,
linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
x86@...nel.org
Subject: Re: [PATCH 13/13] memblock, x86: Replace memblock_x86_reserve/free_range()
with generic ones
On 07/12/2011 02:16 AM, Tejun Heo wrote:
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -449,6 +449,9 @@ long __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size)
>
> long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
> {
> + memblock_dbg(" memblock_free: [%#016llx-%#016llx] %pF\n",
> + base, base + size, (void *)_RET_IP_);
> +
> return __memblock_remove(&memblock.reserved, base, size);
> }
>
> @@ -456,6 +459,8 @@ long __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size)
> {
> struct memblock_type *_rgn = &memblock.reserved;
>
> + memblock_dbg("memblock_reserve: [%#016llx-%#016llx] %pF\n",
> + base, base + size, (void *)_RET_IP_);
> BUG_ON(0 == size);
>
> return memblock_add_region(_rgn, base, size);
This assumes phys_addr_t == unsigned long long, which is just plain
wrong. I will fix it up, but please take more care with that in the
future. This triggers a warning when building for i386 non-PAE, which
is a good thing because it is a real error.
Also, don't we usually display resources as an *inclusive* range,
meaning that the last one should be base + size - 1?
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists