All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arvind Sankar <nivedita@alum.mit.edu>
To: x86@kernel.org, Joerg Roedel <jroedel@suse.de>,
	Borislav Petkov <bp@alien8.de>
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	[thread overview]
Message-ID: <20201008191623.2881677-3-nivedita@alum.mit.edu> (raw)
In-Reply-To: <20201008191623.2881677-1-nivedita@alum.mit.edu>

Move prototypes for command-line related functions into a new header
file to split it out from misc.h.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
---
 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 <linux/numa.h>
 #include <linux/efi.h>
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 <asm/setup.h>	/* 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 <generated/compile.h>
 #include <linux/module.h>
@@ -36,12 +37,6 @@
 #define STATIC
 #include <linux/decompress/mm.h>
 
-#define _SETUP
-#include <asm/setup.h>	/* 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 <asm/efi.h>
 #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


  parent reply	other threads:[~2020-10-08 19:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08 19:16 [PATCH v2 0/5] Couple of bugfixes to sev-es series Arvind Sankar
2020-10-08 19:16 ` [PATCH v2 1/5] x86/boot: Initialize boot_params in startup code Arvind Sankar
2020-10-08 19:16 ` Arvind Sankar [this message]
2020-10-08 19:16 ` [PATCH v2 3/5] x86/boot/64: Show original faulting address in case of error Arvind Sankar
2020-10-09 14:42   ` Joerg Roedel
2020-10-08 19:16 ` [PATCH v2 4/5] x86/boot/64: Explicitly map boot_params and command line Arvind Sankar
2020-10-09 14:49   ` Joerg Roedel
2020-10-16 16:27   ` Borislav Petkov
2020-10-16 16:47     ` Arvind Sankar
2020-10-16 17:07       ` Borislav Petkov
2020-10-16 17:20         ` Arvind Sankar
2020-10-16 17:32           ` Borislav Petkov
2020-10-16 20:04             ` [PATCH v3 1/4] " Arvind Sankar
2020-10-16 20:04               ` [PATCH v3 2/4] x86/boot: Initialize boot_params in startup code Arvind Sankar
2020-10-16 20:04               ` [PATCH v3 3/4] x86/boot: Split out command-line related declarations Arvind Sankar
2020-10-16 20:04               ` [PATCH v3 4/4] x86/boot/64: Show original faulting address in case of error Arvind Sankar
2020-10-19 14:51               ` [PATCH v3 1/4] x86/boot/64: Explicitly map boot_params and command line Borislav Petkov
2020-10-19 17:12                 ` Arvind Sankar
2020-10-19 17:31                   ` Borislav Petkov
2020-10-19 19:44               ` [tip: x86/seves] " tip-bot2 for Arvind Sankar
2020-10-16 21:18             ` [PATCH v2 4/5] " Arvind Sankar
2020-10-16 21:23               ` Borislav Petkov
2020-10-08 19:16 ` [PATCH v2 5/5] x86/head/64: Disable stack protection for head$(BITS).o Arvind Sankar
2020-10-09 14:49   ` Joerg Roedel
2020-10-16 11:17   ` Borislav Petkov
2020-10-16 12:43     ` Arvind Sankar
2020-10-16 13:15       ` Borislav Petkov
2020-10-16 14:16         ` Arvind Sankar
2020-10-19 19:44   ` [tip: x86/seves] " tip-bot2 for Arvind Sankar
2020-10-10 19:11 ` [PATCH] x86/boot/64: Initialize 5-level paging variables earlier Arvind Sankar
2020-10-10 19:26   ` Arvind Sankar
2020-10-12 14:08     ` Kirill A. Shutemov
2020-10-12 15:35       ` Arvind Sankar
2020-10-13  8:11         ` Borislav Petkov
2020-10-13  8:20           ` Kirill A. Shutemov
2020-10-13  8:33             ` Borislav Petkov
2020-10-13  9:12               ` Kirill A. Shutemov
2020-10-13  9:46                 ` Borislav Petkov
2020-10-15 13:52               ` Kirill A. Shutemov
2020-10-16 10:21                 ` Borislav Petkov
2020-10-13  8:59   ` Joerg Roedel
2020-10-19 19:44   ` [tip: x86/seves] " tip-bot2 for Arvind Sankar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201008191623.2881677-3-nivedita@alum.mit.edu \
    --to=nivedita@alum.mit.edu \
    --cc=bp@alien8.de \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.