lkml.org 
[lkml]   [2012]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug
On 07/09/2012 03:25 AM, Yasuaki Ishimatsu wrote:
> @@ -642,7 +642,7 @@ int __ref add_memory(int nid, u64 start,
> }
>
> /* create new memmap entry */
> - firmware_map_add_hotplug(start, start + size, "System RAM");
> + firmware_map_add_hotplug(start, start + size - 1, "System RAM");

I know the firmware_map_*() calls use inclusive end addresses
internally, but do we really need to expose them? Both of the callers
you mentioned do:

firmware_map_add_hotplug(start, start + size - 1, "System RAM");

or

firmware_map_add_early(entry->addr,
entry->addr + entry->size - 1,
e820_type_to_string(entry->type));

So it seems a _bit_ silly to keep all of the callers doing this size-1
thing. I also noted that the new caller that you added does the same
thing. Could we just change the external calling convention to be
exclusive?

BTW, this patch should probably be first in your series. It's a real
bugfix.



\
 
 \ /
  Last update: 2012-07-11 18:01    [W:0.209 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site