Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755352AbbGCMq5 (ORCPT ); Fri, 3 Jul 2015 08:46:57 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:35107 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755091AbbGCMqV (ORCPT ); Fri, 3 Jul 2015 08:46:21 -0400 X-Helo: d06dlp02.portsmouth.uk.ibm.com X-MailFrom: dingel@linux.vnet.ibm.com X-RcptTo: linux-s390@vger.kernel.org From: Dominik Dingel To: Andrew Morton , linux-kernel@vger.kernel.org Cc: Martin Schwidefsky , Heiko Carstens , linux390@de.ibm.com, Dominik Dingel , Christian Borntraeger , Michael Holzheu , linux-s390@vger.kernel.org, linux-mm@kvack.org, Gerald Schaefer Subject: [PATCH 4/4] s390/hugetlb: add hugepages_supported define Date: Fri, 3 Jul 2015 14:46:09 +0200 Message-Id: <1435927569-41132-5-git-send-email-dingel@linux.vnet.ibm.com> X-Mailer: git-send-email 2.3.8 In-Reply-To: <1435927569-41132-1-git-send-email-dingel@linux.vnet.ibm.com> References: <1435927569-41132-1-git-send-email-dingel@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15070312-0041-0000-0000-000004CFB967 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1232 Lines: 33 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 --- arch/s390/include/asm/hugetlb.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/s390/include/asm/hugetlb.h b/arch/s390/include/asm/hugetlb.h index 0130d03..d9be7c0 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); -- 2.3.8 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/