aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/ktlb.S
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2007-10-16 04:24:16 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:51 -0400
commit46644c2477c58906e95281636d04e9cc42b39352 (patch)
treefd02fa96c5f55fc94a2db71abc0c2c389a69a33e /arch/sparc64/kernel/ktlb.S
parentef229c5a5e7701ab08a6a06258f415b150348bcc (diff)
SPARC64: SPARSEMEM_VMEMMAP support
[apw@shadowen.org: style fixups] [apw@shadowen.org: vmemmap sparc64: convert to new config options] Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Mel Gorman <mel@csn.ul.ie> Acked-by: Christoph Lameter <clameter@sgi.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sparc64/kernel/ktlb.S')
-rw-r--r--arch/sparc64/kernel/ktlb.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index d4024ac0d619..964527d2ffa0 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -226,6 +226,15 @@ kvmap_dtlb_load:
226 ba,pt %xcc, sun4v_dtlb_load 226 ba,pt %xcc, sun4v_dtlb_load
227 mov %g5, %g3 227 mov %g5, %g3
228 228
229kvmap_vmemmap:
230 sub %g4, %g5, %g5
231 srlx %g5, 22, %g5
232 sethi %hi(vmemmap_table), %g1
233 sllx %g5, 3, %g5
234 or %g1, %lo(vmemmap_table), %g1
235 ba,pt %xcc, kvmap_dtlb_load
236 ldx [%g1 + %g5], %g5
237
229kvmap_dtlb_nonlinear: 238kvmap_dtlb_nonlinear:
230 /* Catch kernel NULL pointer derefs. */ 239 /* Catch kernel NULL pointer derefs. */
231 sethi %hi(PAGE_SIZE), %g5 240 sethi %hi(PAGE_SIZE), %g5
@@ -233,6 +242,13 @@ kvmap_dtlb_nonlinear:
233 bleu,pn %xcc, kvmap_dtlb_longpath 242 bleu,pn %xcc, kvmap_dtlb_longpath
234 nop 243 nop
235 244
245 /* Do not use the TSB for vmemmap. */
246 mov (VMEMMAP_BASE >> 24), %g5
247 sllx %g5, 24, %g5
248 cmp %g4,%g5
249 bgeu,pn %xcc, kvmap_vmemmap
250 nop
251
236 KERN_TSB_LOOKUP_TL1(%g4, %g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load) 252 KERN_TSB_LOOKUP_TL1(%g4, %g6, %g5, %g1, %g2, %g3, kvmap_dtlb_load)
237 253
238kvmap_dtlb_tsbmiss: 254kvmap_dtlb_tsbmiss: