summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorDominik Dingel <dingel@linux.vnet.ibm.com>2015-07-17 16:23:39 -0700
committerSasha Levin <sasha.levin@oracle.com>2016-05-10 12:20:19 -0400
commitbaa806a8577e0d8b1d5a0ccbf735ceedb3a6bcfe (patch)
tree0c133175d2d26c0be69fafc88453c79ca3cdb5f1 /arch/s390
parente583da6d2b7a035f1c8a526da37b1b8b3bb59166 (diff)
downloadlinux-rt-baa806a8577e0d8b1d5a0ccbf735ceedb3a6bcfe.tar.gz
s390/hugetlb: add hugepages_supported define
[ Upstream commit 7f9be77555bb2e52de84e9dddf7b4eb20cc6e171 ] On s390 we only can enable hugepages if the underlying hardware/hypervisor also does support this. Common code now would assume this to be signaled by setting HPAGE_SHIFT to 0. But on s390, where we only support one hugepage size, there is a link between HPAGE_SHIFT and pageblock_order. So instead of setting HPAGE_SHIFT to 0, we will implement the check for the hardware capability. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com> Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/hugetlb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h
index 11eae5f55b70..9787b61e0758 100644
--- a/arch/s390/include/asm/hugetlb.h
+++ b/arch/s390/include/asm/hugetlb.h
@@ -14,6 +14,7 @@
#define is_hugepage_only_range(mm, addr, len) 0
#define hugetlb_free_pgd_range free_pgd_range
+#define hugepages_supported() (MACHINE_HAS_HPAGE)
void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte);