[PATCH 0/6] [RFC] Sizing zones and holes in an architecture independent manner
Luck, Tony
tony.luck at intel.com
Thu Apr 13 01:54:29 EST 2006
> That seems to register memory about the 0-2G mark and 6-8G with some small
> holes here and there. Sounds like what you expected to happen. In case the
> 1:1 virt->phys mapping is not always true on IA64, I decided to use __pa()
> instead of PAGE_OFFSET like;
>
> add_active_range(node, __pa(start) >> PAGE_SHIFT, __pa(end) >> PAGE_SHIFT);
>
> Is this the correct thing to do or is "start - PAGE_OFFSET" safer?
> Optimistically assuming __pa() is ok, the following patch (which replaces
> Patch 5/6 again) should boot (passed compile testing here). If it doesn't,
> can you send the console log again please?
Almost all of "region 7" (0xE000000000000000-0xFFFFFFFFFFFFFFFF) of the kernel
address space is defined to have a 1:1 mapping with physical memory (the exception
being the top 64K (0xFFFFFFFFFFFF0000-0xFFFFFFFFFFFFFFFF) which is mapped as
a per-cpu area). So __pa(x) is simply defined as ((x) - PAGE_OFFSET). Using
__pa(start) is effectively identical to (start - PAGE_OFFSET), but __pa() is
a bit cleaner and easier to read.
-Tony
More information about the Linuxppc-dev
mailing list