Re: [Patch] Change interface of add/remove_memory() from paddr topfn

From: Dave Hansen
Date: Fri Apr 07 2006 - 10:42:57 EST


On Tue, 2006-04-04 at 14:06 +0900, Yasunori Goto wrote:
> This patch is to change interfaces of add/remove_memory()
> from physicall address to pfn.
> Current add_memory() of each architecture changes paddr to pfn,
> and __add_pages() are called by pfn after all.
> So, it is not for un-alignment memory.
> Using pfn is a bit better to avoid misunderstanding to use add_memory().
>
> In addition, this patch reduces a few lines of kernel.
> (Unfortunately, x86-64 and powerpc look using paddr for some
> reasons.)

Sorry for the horribly late response. I've been without email since
shortly before you sent this.

I don't have a horribly serious problem with this patch, but I would
prefer that it not go in.

I really wanted to have a uniform, easily understood interface for each
of the firmware drivers which will do memory hotplug. As far as I have
seen, they almost exclusively deal in physical addresses.

I just think that keeping the interfaces at u64 is a _clearer_
interface, although it does cost a few shifts in each implementation. I
would have less of a problem with something like
__add_memory_pfn_range() that sits under add_memory() where and the
architectures only implement *it*.

-- Dave

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/