Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1475129pxu; Thu, 8 Oct 2020 12:22:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrwu8ZCki7nqqo97cdkaMw0NEmXQrPm5Qo4ZikhLPijyELExN5AEIUKNZwQ8cMokagS4lF X-Received: by 2002:a05:6402:209:: with SMTP id t9mr11100267edv.208.1602184977494; Thu, 08 Oct 2020 12:22:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602184977; cv=none; d=google.com; s=arc-20160816; b=s5Cb/MK5OUjp3mpYnX5OT6tgdSNQ5dCKbshGBONKuYrkINf8B8GFQ63VtV5smGxHRJ 4nE05AjGDVmOXH73VMZPOAuJrL/EjRsf36n80U6UcibmsPnMmHAWY8pMu2Ztavz6t40c dH+pWK66SVgCjSOokQWKgQC4JYjnedkn43Gtg4ff9ieaHrjQ2ZwWIROJRMq5iG0U5YEq krbwhq1ymR4gdJQik/x0/1ijIl9qpKOyqr2v3lK25xmazbO62/tE9WbcdsHkjXiIayB6 EeTQZG1gEZGUx+LukX6wxPLnFliex3ymVg2Y5fxJOC0rY8qWHity3GGosjcXbsnGAXcU 8cjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=tPUlXaemfFQZxdNtJjVKojJMHjYSg70DaRLU1Lc5Ye8=; b=LuB4Ll5VsrRMBSvaEWxxExzWvFp7uyHLjd9xzHaLqU0mpvPoIvH6u1nIYrlOwXLGWe CM8+LZchFVi1edgyJAE79HEkEneSilCUb0gm8p2wwVy0qza9zizT9xYLt26ZTNu66r1m KNR+wKpKUuVoGEexGLX8Zk1mqZFgBMO2pj7d1dTZzjCOb74QrXRmvwuKYlpBs825dLsQ tqew+clB7KbCMKZZdVxGo1m16OCATUMI8QJ4Sw22Y2dmbSAuv4IeF7NJern2MoVJMdYx sp6kE2LKr3aQArA6SprnXjP4yVi5xms/9AMYklakBE6Qfj7+2vPxonvHs0s9R3BLxb3M pb4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p34si4202719edd.53.2020.10.08.12.22.34; Thu, 08 Oct 2020 12:22:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728605AbgJHTQc (ORCPT + 99 others); Thu, 8 Oct 2020 15:16:32 -0400 Received: from mail-qt1-f193.google.com ([209.85.160.193]:37657 "EHLO mail-qt1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729783AbgJHTQ2 (ORCPT ); Thu, 8 Oct 2020 15:16:28 -0400 Received: by mail-qt1-f193.google.com with SMTP id s47so6070503qth.4 for ; Thu, 08 Oct 2020 12:16:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tPUlXaemfFQZxdNtJjVKojJMHjYSg70DaRLU1Lc5Ye8=; b=EKBeoPyQ3QskTCgpokj3uVEQ3cYKkKp77AgZBWl+WNHjsNbxSDKeIaDUs+Pn0HqMjb Km9wVoCEzVsITJXovnBwMYGYdQkbqvQGCxE5GD0JiCaPJEcDmfnvbSIgG2G/PdE3U2hc TSQPIq6QXZex8bapURXm8TaWk9dSOcvrA7JZtUsKtlqIVCWz1b5Us6b4fEnSJRRQ1j2l 3Xg34iNIWgpMjlOOiHQelHeuOBPAvdKuSMuhOoBCbD9BYeMTSFeplQ1XKK763HMOc8M8 4scn6zXz77PZQc8QcSYOCLlKt2ORafVU6x47AkmRgFXguQkzpJreLdSb0hv7pMnNn/D2 txsw== X-Gm-Message-State: AOAM531tjQbXR6F1hnyo1UDyJW9qQhdV9y8eD5nnBf+4xPmq99Du8YfA UI1pMX2T0IIOGkBUbylkc3s= X-Received: by 2002:ac8:1289:: with SMTP id y9mr7989547qti.330.1602184587132; Thu, 08 Oct 2020 12:16:27 -0700 (PDT) Received: from rani.riverdale.lan ([2001:470:1f07:5f3::b55f]) by smtp.gmail.com with ESMTPSA id z37sm4726759qtz.67.2020.10.08.12.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Oct 2020 12:16:26 -0700 (PDT) From: Arvind Sankar To: x86@kernel.org, Joerg Roedel , Borislav Petkov Cc: linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] x86/boot: Split out command-line related declarations Date: Thu, 8 Oct 2020 15:16:20 -0400 Message-Id: <20201008191623.2881677-3-nivedita@alum.mit.edu> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201008191623.2881677-1-nivedita@alum.mit.edu> References: <20201008191623.2881677-1-nivedita@alum.mit.edu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move prototypes for command-line related functions into a new header file to split it out from misc.h. Signed-off-by: Arvind Sankar --- arch/x86/boot/compressed/acpi.c | 1 + arch/x86/boot/compressed/cmdline.c | 1 + arch/x86/boot/compressed/cmdline.h | 13 +++++++++++++ arch/x86/boot/compressed/early_serial_console.c | 1 + arch/x86/boot/compressed/kaslr.c | 7 +------ arch/x86/boot/compressed/misc.h | 4 ---- arch/x86/boot/compressed/pgtable_64.c | 2 +- 7 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 arch/x86/boot/compressed/cmdline.h diff --git a/arch/x86/boot/compressed/acpi.c b/arch/x86/boot/compressed/acpi.c index 8bcbcee54aa1..9097108c37e1 100644 --- a/arch/x86/boot/compressed/acpi.c +++ b/arch/x86/boot/compressed/acpi.c @@ -3,6 +3,7 @@ #include "misc.h" #include "error.h" #include "../string.h" +#include "cmdline.h" #include #include diff --git a/arch/x86/boot/compressed/cmdline.c b/arch/x86/boot/compressed/cmdline.c index f1add5d85da9..20f2e6d8b891 100644 --- a/arch/x86/boot/compressed/cmdline.c +++ b/arch/x86/boot/compressed/cmdline.c @@ -1,5 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 #include "misc.h" +#include "cmdline.h" static unsigned long fs; static inline void set_fs(unsigned long seg) diff --git a/arch/x86/boot/compressed/cmdline.h b/arch/x86/boot/compressed/cmdline.h new file mode 100644 index 000000000000..72800770bd60 --- /dev/null +++ b/arch/x86/boot/compressed/cmdline.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef BOOT_COMPRESSED_CMDLINE_H +#define BOOT_COMPRESSED_CMDLINE_H + +#define _SETUP +#include /* For COMMAND_LINE_SIZE */ +#undef _SETUP + +unsigned long get_cmd_line_ptr(void); +int cmdline_find_option(const char *option, char *buffer, int bufsize); +int cmdline_find_option_bool(const char *option); + +#endif /* BOOT_COMPRESSED_CMDLINE_H */ diff --git a/arch/x86/boot/compressed/early_serial_console.c b/arch/x86/boot/compressed/early_serial_console.c index 261e81fb9582..64a1f557e122 100644 --- a/arch/x86/boot/compressed/early_serial_console.c +++ b/arch/x86/boot/compressed/early_serial_console.c @@ -1,4 +1,5 @@ #include "misc.h" +#include "cmdline.h" int early_serial_base; diff --git a/arch/x86/boot/compressed/kaslr.c b/arch/x86/boot/compressed/kaslr.c index b59547ce5b19..489fabc051d7 100644 --- a/arch/x86/boot/compressed/kaslr.c +++ b/arch/x86/boot/compressed/kaslr.c @@ -22,6 +22,7 @@ #include "misc.h" #include "error.h" #include "../string.h" +#include "cmdline.h" #include #include @@ -36,12 +37,6 @@ #define STATIC #include -#define _SETUP -#include /* For COMMAND_LINE_SIZE */ -#undef _SETUP - -extern unsigned long get_cmd_line_ptr(void); - /* Simplified build-specific string for starting entropy. */ static const char build_str[] = UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION; diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 6d31f1b4c4d1..e3e2f312c025 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -69,10 +69,6 @@ static inline void debug_puthex(unsigned long value) #endif -/* cmdline.c */ -int cmdline_find_option(const char *option, char *buffer, int bufsize); -int cmdline_find_option_bool(const char *option); - struct mem_vector { u64 start; u64 size; diff --git a/arch/x86/boot/compressed/pgtable_64.c b/arch/x86/boot/compressed/pgtable_64.c index 0fb948c0c8b4..46d761f7faa6 100644 --- a/arch/x86/boot/compressed/pgtable_64.c +++ b/arch/x86/boot/compressed/pgtable_64.c @@ -4,6 +4,7 @@ #include #include "pgtable.h" #include "../string.h" +#include "cmdline.h" #define BIOS_START_MIN 0x20000U /* 128K, less than this is insane */ #define BIOS_START_MAX 0x9f000U /* 640K, absolute maximum */ @@ -26,7 +27,6 @@ static char trampoline_save[TRAMPOLINE_32BIT_SIZE]; unsigned long *trampoline_32bit __section(.data); extern struct boot_params *boot_params; -int cmdline_find_option_bool(const char *option); static unsigned long find_trampoline_placement(void) { -- 2.26.2