From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753709AbbGFIFg (ORCPT ); Mon, 6 Jul 2015 04:05:36 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:56790 "EHLO e06smtp15.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753608AbbGFIFb (ORCPT ); Mon, 6 Jul 2015 04:05:31 -0400 X-Helo: d06dlp02.portsmouth.uk.ibm.com X-MailFrom: schwidefsky@de.ibm.com X-RcptTo: linux-s390@vger.kernel.org Date: Mon, 6 Jul 2015 10:05:24 +0200 From: Martin Schwidefsky To: Dominik Dingel Cc: Andrew Morton , linux-kernel@vger.kernel.org, Heiko Carstens , linux390@de.ibm.com, Christian Borntraeger , Michael Holzheu , linux-s390@vger.kernel.org, linux-mm@kvack.org, Gerald Schaefer Subject: Re: [PATCH 0/4] s390/mm: Fixup hugepage sw-emulated code removal Message-ID: <20150706100524.3698c9f8@mschwide> 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-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15070608-0021-0000-0000-00000480C8BF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 3 Jul 2015 14:46:05 +0200 Dominik Dingel wrote: > Heiko noticed that the current check for hugepage support on s390 is a little bit to > harsh as systems which do not support will crash. > The reason is that pageblock_order can now get negative when we set HPAGE_SHIFT to 0. > To avoid all this and to avoid opening another can of worms with enabling > HUGETLB_PAGE_SIZE_VARIABLE I think it would be best to simply allow architectures to > define their own hugepages_supported(). > > Thanks > Dominik > > Dominik Dingel (4): > Revert "s390/mm: change HPAGE_SHIFT type to int" > Revert "s390/mm: make hugepages_supported a boot time decision" > mm: hugetlb: allow hugepages_supported to be architecture specific > s390/hugetlb: add hugepages_supported define > > arch/s390/include/asm/hugetlb.h | 1 + > arch/s390/include/asm/page.h | 8 ++++---- > arch/s390/kernel/setup.c | 2 -- > arch/s390/mm/pgtable.c | 2 -- > include/linux/hugetlb.h | 17 ++++++++--------- > 5 files changed, 13 insertions(+), 17 deletions(-) To have an architecture override for hugepages_supported is imho the cleaner approach compared to the HPAGE_SHIFT tricks. I would have preferred to use a __weak function but the #ifndef solution is fine with me as well. Acked-by: Martin Schwidefsky -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.