MIPS: Calculate proper ebase value for 64-bit kernels
authorDavid Daney <ddaney@caviumnetworks.com>
Tue, 6 Apr 2010 20:29:50 +0000 (13:29 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 12 Apr 2010 16:26:22 +0000 (17:26 +0100)
commitf6be75d03c8870be91e6e2a195648ece04b6bb16
treeeba85c44498f040ac07915d82467aa08bb426860
parentd8000beef2cd10c16dc5f66af715f692f5992652
MIPS: Calculate proper ebase value for 64-bit kernels

The ebase is relative to CKSEG0 not CAC_BASE.  On a 32-bit kernel they
are the same thing, for a 64-bit kernel they are not.

It happens to kind of work on a 64-bit kernel as they both reference
the same physical memory.  However since the CPU uses the CKSEG0 base,
determining if a J instruction will reach always gives the wrong result
unless we use the same number the CPU uses.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1093/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/traps.c