diff options
author | Nitin Gupta <nitin.m.gupta@oracle.com> | 2017-03-09 23:22:23 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-28 06:20:23 +0200 |
commit | 85b1da7c47052330af9485a5f5c7e54ede882e65 (patch) | |
tree | fb40f96203e4881d07fe8da71a0a723cf6344616 /arch/sparc/mm/hugetlbpage.c | |
parent | sparc64: Fix size check in huge_pte_alloc (diff) | |
download | linux-85b1da7c47052330af9485a5f5c7e54ede882e65.tar.xz linux-85b1da7c47052330af9485a5f5c7e54ede882e65.zip |
sparc64: Add support for 2G hugepages
Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm/hugetlbpage.c')
-rw-r--r-- | arch/sparc/mm/hugetlbpage.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc/mm/hugetlbpage.c b/arch/sparc/mm/hugetlbpage.c index 30168500603e..ee5273ad918d 100644 --- a/arch/sparc/mm/hugetlbpage.c +++ b/arch/sparc/mm/hugetlbpage.c @@ -143,6 +143,10 @@ static pte_t sun4v_hugepage_shift_to_tte(pte_t entry, unsigned int shift) pte_val(entry) = pte_val(entry) & ~_PAGE_SZALL_4V; switch (shift) { + case HPAGE_2GB_SHIFT: + hugepage_size = _PAGE_SZ2GB_4V; + pte_val(entry) |= _PAGE_PMD_HUGE; + break; case HPAGE_256MB_SHIFT: hugepage_size = _PAGE_SZ256MB_4V; pte_val(entry) |= _PAGE_PMD_HUGE; @@ -183,6 +187,9 @@ static unsigned int sun4v_huge_tte_to_shift(pte_t entry) unsigned int shift; switch (tte_szbits) { + case _PAGE_SZ2GB_4V: + shift = HPAGE_2GB_SHIFT; + break; case _PAGE_SZ256MB_4V: shift = HPAGE_256MB_SHIFT; break; |