Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420387

[PATCH 3.2 23/46] s390/hugetlb: add hugepages_supported define

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.kernel
Subject [PATCH 3.2 23/46] s390/hugetlb: add hugepages_supported define
Date 2016-06-12 23:50 +0200
Message-ID <rJlqz-5ve-71@gated-at.bofh.it> (permalink)
References <rJlgS-5q8-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

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

From: Dominik Dingel <dingel@linux.vnet.ibm.com>

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 <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: Ben Hutchings <ben@decadent.org.uk>
---
 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);

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 3.2 00/46] 3.2.81-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2016-06-12 23:50 +0200
  [PATCH 3.2 05/46] crypto: gcm - fix rfc4543 to handle async  crypto correctly Ben Hutchings <ben@decadent.org.uk> - 2016-06-12 23:50 +0200
  [PATCH 3.2 17/46] usb: hcd: out of bounds access in  for_each_companion Ben Hutchings <ben@decadent.org.uk> - 2016-06-12 23:50 +0200
  [PATCH 3.2 15/46] usb: xhci: fix wild pointers in xhci_mem_cleanup Ben Hutchings <ben@decadent.org.uk> - 2016-06-12 23:50 +0200
  [PATCH 3.2 42/46] get_rock_ridge_filename(): handle malformed NM  entries Ben Hutchings <ben@decadent.org.uk> - 2016-06-12 23:50 +0200
  [PATCH 3.2 23/46] s390/hugetlb: add hugepages_supported define Ben Hutchings <ben@decadent.org.uk> - 2016-06-12 23:50 +0200
  Re: [PATCH 3.2 00/46] 3.2.81-rc1 review Guenter Roeck <linux@roeck-us.net> - 2016-06-13 01:20 +0200
    Re: [PATCH 3.2 00/46] 3.2.81-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2016-06-13 01:50 +0200
  Re: [PATCH 3.2 00/46] 3.2.81-rc1 review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-06-15 00:00 +0200
    Re: [PATCH 3.2 00/46] 3.2.81-rc1 review Ben Hutchings <ben@decadent.org.uk> - 2016-06-15 00:20 +0200
      Re: [PATCH 3.2 00/46] 3.2.81-rc1 review Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-06-15 00:40 +0200

csiph-web