android_kernel_samsung_msm8976/arch/ppc64
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
..
boot [PATCH] ppc64: make arch/ppc64/boot standalone 2005-08-29 10:53:31 +10:00
configs [PATCH] ppc64: update defconfigs 2005-08-08 11:46:24 -07:00
kernel [PATCH] ppc64: Remove redundant abs_to_phys() macro 2005-08-29 10:53:37 +10:00
lib [PATCH] ppc64 iSeries: allow build with no PCI 2005-06-21 18:46:31 -07:00
mm [PATCH] ppc64: Remove redundant abs_to_phys() macro 2005-08-29 10:53:37 +10:00
oprofile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
xmon [PATCH] Xmon bug fix for soft-reset 2005-08-02 22:16:45 -07:00
defconfig [PATCH] ppc64: update defconfigs 2005-08-08 11:46:24 -07:00
Kconfig [PATCH] ppc64: change duplicate Kconfig menu "General setup" to "Bus Options" 2005-08-29 10:53:32 +10:00
Kconfig.debug [PATCH] ppc64: add missing Kconfig help text 2005-05-05 16:36:32 -07:00
Makefile [PATCH] ppc64: add BPA platform type 2005-06-23 09:43:37 +10:00