lkml.org 
[lkml]   [2011]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2011-07-14 22:13    [from the cache]
©2003-2011 Jasper Spaans