From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753736AbbCEBfM (ORCPT ); Wed, 4 Mar 2015 20:35:12 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:42941 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbbCEBfL (ORCPT ); Wed, 4 Mar 2015 20:35:11 -0500 From: "Luis R. Rodriguez" To: gregkh@linuxfoundation.org, akpm@linux-foundation.org, tony@atomide.com, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, jgross@suse.com, luto@amacapital.net, toshi.kani@hp.com, dave.hansen@linux.intel.com, JBeulich@suse.com, pavel@ucw.cz, qiuxishi@huawei.com, david.vrabel@citrix.com, bp@suse.de, vbabka@suse.cz, iamjoonsoo.kim@lge.com, decui@microsoft.com Cc: linux-kernel@vger.kernel.org, x86@kernel.org, julia.lawall@lip6.fr, "Luis R. Rodriguez" Subject: [RFC v1 4/4] x86: mm: use early_param_on_off() for direct_gbpages Date: Wed, 4 Mar 2015 17:24:14 -0800 Message-Id: <1425518654-3403-5-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1425518654-3403-1-git-send-email-mcgrof@do-not-panic.com> References: <1425518654-3403-1-git-send-email-mcgrof@do-not-panic.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Luis R. Rodriguez" The enabler / disabler is pretty simple, just use the provided wrappers, this lets us easily relate the variable to the associated Kconfig entry. Cc: Greg Kroah-Hartman Cc: Tony Lindgren Cc: linux-kernel@vger.kernel.org Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: x86@kernel.org Cc: Juergen Gross Cc: Andy Lutomirski Cc: Toshi Kani Cc: Dave Hansen Cc: Jan Beulich Cc: Pavel Machek Cc: Xishi Qiu Cc: Andrew Morton Cc: David Vrabel Cc: Borislav Petkov Cc: Vlastimil Babka Cc: Joonsoo Kim Cc: Dexuan Cui Signed-off-by: Luis R. Rodriguez --- arch/x86/mm/init.c | 3 ++- arch/x86/mm/init_64.c | 14 -------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 8d375ba..ce5db80 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -133,7 +133,8 @@ int after_bootmem; static int page_size_mask; -int direct_gbpages = IS_ENABLED(CONFIG_DIRECT_GBPAGES); +early_param_on_off("gbpages", "nogbpages", + direct_gbpages, CONFIG_DIRECT_GBPAGES); static void __init init_gbpages(void) { diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 30eb05a..3fba623 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -130,20 +130,6 @@ int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page, return 0; } -static int __init parse_direct_gbpages_off(char *arg) -{ - direct_gbpages = 0; - return 0; -} -early_param("nogbpages", parse_direct_gbpages_off); - -static int __init parse_direct_gbpages_on(char *arg) -{ - direct_gbpages = 1; - return 0; -} -early_param("gbpages", parse_direct_gbpages_on); - /* * NOTE: pagetable_init alloc all the fixmap pagetables contiguous on the * physical space so we can cache the place of the first one and move -- 2.2.2