Thread (127 messages) 127 messages, 5 authors, 2016-06-14
STALE3673d REVIEWED: 1 (0M)

[PATCH 3.16 040/114] s390/hugetlb: add hugepages_supported define

From: Ben Hutchings <hidden>
Date: 2016-06-13 19:13:05
Also in: lkml

3.16.36-rc1 review patch.  If anyone has any objections, please let me know.

------------------

From: Dominik Dingel <redacted>

commit 7f9be77555bb2e52de84e9dddf7b4eb20cc6e171 upstream.

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 <redacted>
Acked-by: Martin Schwidefsky <redacted>
Cc: Heiko Carstens <redacted>
Cc: Christian Borntraeger <redacted>
Cc: Michael Holzheu <redacted>
Cc: Gerald Schaefer <redacted>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ben Hutchings <redacted>
---
 arch/s390/include/asm/hugetlb.h | 1 +
 1 file changed, 1 insertion(+)
--- 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);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help