aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/ktlb.S
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-09-24 21:20:14 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-10-30 09:38:27 -0700
commit29070cdcc7533872cb5a16949603557cde43eb84 (patch)
tree2acb96ac015b59471a6d3272772ffddde39df3c5 /arch/sparc/kernel/ktlb.S
parenteccd108dbb4b150f3554ddd5a87c05d0627ec65d (diff)
sparc64: Use kernel page tables for vmemmap.
[ Upstream commit c06240c7f5c39c83dfd7849c0770775562441b96 ] For sparse memory configurations, the vmemmap array behaves terribly and it takes up an inordinate amount of space in the BSS section of the kernel image unconditionally. Just build huge PMDs and look them up just like we do for TLB misses in the vmalloc area. Kernel BSS shrinks by about 2MB. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Bob Picco <bob.picco@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/sparc/kernel/ktlb.S')
-rw-r--r--arch/sparc/kernel/ktlb.S9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/sparc/kernel/ktlb.S b/arch/sparc/kernel/ktlb.S
index 94a1e6648bd0..2627a7fa33d9 100644
--- a/arch/sparc/kernel/ktlb.S
+++ b/arch/sparc/kernel/ktlb.S
@@ -186,13 +186,8 @@ kvmap_dtlb_load:
#ifdef CONFIG_SPARSEMEM_VMEMMAP
kvmap_vmemmap:
- sub %g4, %g5, %g5
- srlx %g5, ILOG2_4MB, %g5
- sethi %hi(vmemmap_table), %g1
- sllx %g5, 3, %g5
- or %g1, %lo(vmemmap_table), %g1
- ba,pt %xcc, kvmap_dtlb_load
- ldx [%g1 + %g5], %g5
+ KERN_PGTABLE_WALK(%g4, %g5, %g2, kvmap_dtlb_longpath)
+ ba,a,pt %xcc, kvmap_dtlb_load
#endif
kvmap_dtlb_nonlinear: