summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/fault_64.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-04 17:14:39 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-08-04 17:14:39 +0900
commitc7914834ef3b8a396b7e82ea34ac07cdcfe6f868 (patch)
tree59f6f76dfca96cd7ad330ae3c281cfa57e98f44e /arch/sh/mm/fault_64.c
parentc0fe478dbb14fd32e71d1383dbe302b54ce94134 (diff)
downloadop-kernel-dev-c7914834ef3b8a396b7e82ea34ac07cdcfe6f868.zip
op-kernel-dev-c7914834ef3b8a396b7e82ea34ac07cdcfe6f868.tar.gz
sh: Tidy up NEFF-based sign extension for SH-5.
This consolidates all of the NEFF-based sign extension for SH-5. In the future the other SH code will need to make use of this as well, so make it generic in preparation for more 32/64 consolidation. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/fault_64.c')
-rw-r--r--arch/sh/mm/fault_64.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/sh/mm/fault_64.c b/arch/sh/mm/fault_64.c
index bd63b96..2b356ce 100644
--- a/arch/sh/mm/fault_64.c
+++ b/arch/sh/mm/fault_64.c
@@ -56,16 +56,7 @@ inline void __do_tlb_refill(unsigned long address,
/*
* Set PTEH register
*/
- pteh = address & MMU_VPN_MASK;
-
- /* Sign extend based on neff. */
-#if (NEFF == 32)
- /* Faster sign extension */
- pteh = (unsigned long long)(signed long long)(signed long)pteh;
-#else
- /* General case */
- pteh = (pteh & NEFF_SIGN) ? (pteh | NEFF_MASK) : pteh;
-#endif
+ pteh = neff_sign_extend(address & MMU_VPN_MASK);
/* Set the ASID. */
pteh |= get_asid() << PTEH_ASID_SHIFT;
OpenPOWER on IntegriCloud