summaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-05-19 20:02:50 +0000
committerDavid S. Miller <davem@davemloft.net>2012-05-19 23:27:39 -0700
commit3d5f7d37c8b4cdd564741704d8bb22afd80402ef (patch)
tree15c1f4bff5d8410b6e0071db80cf9461d5e9f73e /arch/sparc/mm
parentaccf032cfa582ed95da130b06241637659210edb (diff)
downloadop-kernel-dev-3d5f7d37c8b4cdd564741704d8bb22afd80402ef.zip
op-kernel-dev-3d5f7d37c8b4cdd564741704d8bb22afd80402ef.tar.gz
sparc32: drop unused functions in pgtsrmmu.h
One function was only used by leon - move it to a leon specific file. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/leon_mm.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/sparc/mm/leon_mm.c b/arch/sparc/mm/leon_mm.c
index 7e2bed7..4c67ae6 100644
--- a/arch/sparc/mm/leon_mm.c
+++ b/arch/sparc/mm/leon_mm.c
@@ -20,6 +20,18 @@
int leon_flush_during_switch = 1;
int srmmu_swprobe_trace;
+static inline unsigned long leon_get_ctable_ptr(void)
+{
+ unsigned int retval;
+
+ __asm__ __volatile__("lda [%1] %2, %0\n\t" :
+ "=r" (retval) :
+ "r" (SRMMU_CTXTBL_PTR),
+ "i" (ASI_LEON_MMUREGS));
+ return (retval & SRMMU_CTX_PMASK) << 4;
+}
+
+
unsigned long srmmu_swprobe(unsigned long vaddr, unsigned long *paddr)
{
@@ -35,10 +47,10 @@ unsigned long srmmu_swprobe(unsigned long vaddr, unsigned long *paddr)
if (srmmu_swprobe_trace)
printk(KERN_INFO "swprobe: trace on\n");
- ctxtbl = srmmu_get_ctable_ptr();
+ ctxtbl = leon_get_ctable_ptr();
if (!(ctxtbl)) {
if (srmmu_swprobe_trace)
- printk(KERN_INFO "swprobe: srmmu_get_ctable_ptr returned 0=>0\n");
+ printk(KERN_INFO "swprobe: leon_get_ctable_ptr returned 0=>0\n");
return 0;
}
if (!_pfn_valid(PFN(ctxtbl))) {
OpenPOWER on IntegriCloud