aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm/init_64.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-09-27 00:58:33 -0400
committerDavid S. Miller <davem@davemloft.net>2014-10-05 19:53:39 -0400
commit4397bed080598001e88f612deb8b080bb1cc2322 (patch)
treec649278e09119997cb28176bb5b090b8b881fc5c /arch/sparc/mm/init_64.c
parentac55c768143aa34cc3789c4820cbb0809a76fd9c (diff)
sparc64: Define VA hole at run time, rather than at compile time.
Now that we use 4-level page tables, we can provide up to 53-bits of virtual address space to the user. Adjust the VA hole based upon the capabilities of the cpu type probed. Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Bob Picco <bob.picco@oracle.com>
Diffstat (limited to 'arch/sparc/mm/init_64.c')
-rw-r--r--arch/sparc/mm/init_64.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 091f846e6192..c241c5723373 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -1630,25 +1630,46 @@ static void __init page_offset_shift_patch(unsigned long phys_bits)
1630 } 1630 }
1631} 1631}
1632 1632
1633unsigned long sparc64_va_hole_top = 0xfffff80000000000UL;
1634unsigned long sparc64_va_hole_bottom = 0x0000080000000000UL;
1635
1633static void __init setup_page_offset(void) 1636static void __init setup_page_offset(void)
1634{ 1637{
1635 unsigned long max_phys_bits = 40; 1638 unsigned long max_phys_bits = 40;
1636 1639
1637 if (tlb_type == cheetah || tlb_type == cheetah_plus) { 1640 if (tlb_type == cheetah || tlb_type == cheetah_plus) {
1641 /* Cheetah/Panther support a full 64-bit virtual
1642 * address, so we can use all that our page tables
1643 * support.
1644 */
1645 sparc64_va_hole_top = 0xfff0000000000000UL;
1646 sparc64_va_hole_bottom = 0x0010000000000000UL;
1647
1638 max_phys_bits = 42; 1648 max_phys_bits = 42;
1639 } else if (tlb_type == hypervisor) { 1649 } else if (tlb_type == hypervisor) {
1640 switch (sun4v_chip_type) { 1650 switch (sun4v_chip_type) {
1641 case SUN4V_CHIP_NIAGARA1: 1651 case SUN4V_CHIP_NIAGARA1:
1642 case SUN4V_CHIP_NIAGARA2: 1652 case SUN4V_CHIP_NIAGARA2:
1653 /* T1 and T2 support 48-bit virtual addresses. */
1654 sparc64_va_hole_top = 0xffff800000000000UL;
1655 sparc64_va_hole_bottom = 0x0000800000000000UL;
1656
1643 max_phys_bits = 39; 1657 max_phys_bits = 39;
1644 break; 1658 break;
1645 case SUN4V_CHIP_NIAGARA3: 1659 case SUN4V_CHIP_NIAGARA3:
1660 /* T3 supports 48-bit virtual addresses. */
1661 sparc64_va_hole_top = 0xffff800000000000UL;
1662 sparc64_va_hole_bottom = 0x0000800000000000UL;
1663
1646 max_phys_bits = 43; 1664 max_phys_bits = 43;
1647 break; 1665 break;
1648 case SUN4V_CHIP_NIAGARA4: 1666 case SUN4V_CHIP_NIAGARA4:
1649 case SUN4V_CHIP_NIAGARA5: 1667 case SUN4V_CHIP_NIAGARA5:
1650 case SUN4V_CHIP_SPARC64X: 1668 case SUN4V_CHIP_SPARC64X:
1651 default: 1669 default:
1670 /* T4 and later support 52-bit virtual addresses. */
1671 sparc64_va_hole_top = 0xfff8000000000000UL;
1672 sparc64_va_hole_bottom = 0x0008000000000000UL;
1652 max_phys_bits = 47; 1673 max_phys_bits = 47;
1653 break; 1674 break;
1654 } 1675 }