sh: Obliterate the P1 area macros

Replace the use of PHYSADDR() with __pa(). PHYSADDR() is based on the
idea that all addresses in P1SEG are untranslated, so we can access an
address's physical page as an offset from P1SEG. This doesn't work for
CONFIG_PMB/CONFIG_PMB_FIXED because pages in P1SEG and P2SEG are used
for PMB mappings and so can be translated to any physical address.

Likewise, replace a P1SEGADDR() use with virt_to_phys().

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Matt Fleming
2009-10-06 21:22:24 +00:00
committed by Paul Mundt
parent 067784f623
commit 8bd642b17b
5 changed files with 4 additions and 7 deletions

View File

@ -49,7 +49,7 @@ int machine_kexec_prepare(struct kimage *image)
/* older versions of kexec-tools are passing
* the zImage entry point as a virtual address.
*/
if (image->start != PHYSADDR(image->start))
if (image->start != __pa(image->start))
return -EINVAL; /* upgrade your kexec-tools */
return 0;