From patchwork Fri Jul 28 15:33:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Ogness X-Patchwork-Id: 794952 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xJtdS3jzTz9s0g for ; Sat, 29 Jul 2017 01:52:12 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3xJtdS2tQFzDrTp for ; Sat, 29 Jul 2017 01:52:12 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org X-Greylist: delayed 1047 seconds by postgrey-1.36 at bilbo; Sat, 29 Jul 2017 01:51:07 AEST Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a01:7a0:2:106d:700::1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3xJtcC1mLNzDrS0 for ; Sat, 29 Jul 2017 01:51:07 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=vostro.local) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1db7GE-0006hr-Nd; Fri, 28 Jul 2017 17:33:06 +0200 From: John Ogness To: mpe@ellerman.id.au Subject: [PATCH] powerpc: Avoid reserving hugepages twice on PPC32 Date: Fri, 28 Jul 2017 17:33:32 +0200 Message-ID: <87d18klgoj.fsf@linutronix.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" On PPC32, reserve_hugetlb_gpages() is already called in MMU_init(). Signed-off-by: John Ogness --- arch/powerpc/kernel/setup-common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 94a9482..1d5d2de 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -920,8 +920,11 @@ void __init setup_arch(char **cmdline_p) * Reserve any gigantic pages requested on the command line. * memblock needs to have been initialized by the time this is * called since this will reserve memory. + * (PPC32 did this already in MMU_init()) */ +#ifdef CONFIG_PPC64 reserve_hugetlb_gpages(); +#endif klp_init_thread_info(&init_thread_info);