1
linux/arch/ppc64/mm
Michael Ellerman e88bcd1b29 [PATCH] ppc64: Remove redundant abs_to_phys() macro
abs_to_phys() is a macro that turns out to do nothing, and also has the
unfortunate property that it's not the inverse of phys_to_abs() on iSeries.

The following is for my benefit as much as everyone else.

With CONFIG_MSCHUNKS enabled, the lmb code is changed such that it keeps
a physbase variable for each lmb region. This is used to take the possibly
discontiguous lmb regions and present them as a contiguous address space
beginning from zero.

In this context each lmb region's base address is its "absolute" base
address, and its physbase is it's "physical" address (from Linux's point of
view). The abs_to_phys() macro does the mapping from "absolute" to "physical".

Note: This is not related to the iSeries mapping of physical to absolute
(ie. Hypervisor) addresses which is maintained with the msChunks structure.
And the msChunks structure is not controlled via CONFIG_MSCHUNKS.

Once upon a time you could compile for non-iSeries with CONFIG_MSCHUNKS
enabled. But these days CONFIG_MSCHUNKS depends on CONFIG_PPC_ISERIES, so
for non-iSeries code abs_to_phys() is a no-op.

On iSeries we always have one lmb region which spans from 0 to
systemcfg->physicalMemorySize (arch/ppc64/kernel/iSeries_setup.c line 383).
This region has a base (ie. absolute) address of 0, and a physbase address
of 0 (as calculated in lmb_analyze() (arch/ppc64/kernel/lmb.c line 144)).

On iSeries, abs_to_phys(aa) is defined as lmb_abs_to_phys(aa), which finds
the lmb region containing aa (and there's only one, ie. 0), and then does:

 return lmb.memory.region[0].physbase + (aa - lmb.memory.region[0].base)

physbase == base == 0, so you're left with "return aa".

So remove abs_to_phys(), and lmb_abs_to_phys() which is the implementation
of abs_to_phys() for iSeries.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-08-29 10:53:37 +10:00
..
fault.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hash_low.S [PATCH] ppc64: kill bitfields in ppc64 hash code 2005-07-13 11:25:25 -07:00
hash_native.c [PATCH] ppc64: Remove redundant uses of physRpn_to_absRpn 2005-08-29 10:53:36 +10:00
hash_utils.c [PATCH] Four level pagetables for ppc64 2005-08-29 10:53:31 +10:00
hugetlbpage.c [PATCH] Four level pagetables for ppc64 2005-08-29 10:53:31 +10:00
imalloc.c [PATCH] Four level pagetables for ppc64 2005-08-29 10:53:31 +10:00
init.c [PATCH] ppc64: Remove redundant abs_to_phys() macro 2005-08-29 10:53:37 +10:00
Makefile [PATCH] ppc64: sparsemem memory model 2005-06-23 09:45:06 -07:00
mmap.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
numa.c [PATCH] ppc64: POWER 4 fails to boot with NUMA 2005-08-01 21:38:01 -07:00
slb_low.S [PATCH] Four level pagetables for ppc64 2005-08-29 10:53:31 +10:00
slb.c [PATCH] ppc64: remove unused argument to create_slbe 2005-05-01 08:58:44 -07:00
stab.c [PATCH] ppc64: dynamically allocate segment tables 2005-07-27 16:25:58 -07:00
tlb.c [PATCH] Four level pagetables for ppc64 2005-08-29 10:53:31 +10:00