From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Ashish Kalra <ashish.kalra@amd.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
David Woodhouse <dwmw@amazon.co.uk>,
Denis Mukhin <dmukhin@ford.com>
Subject: [PATCH v1 1/6] x86/boot: Convert early_serial_base to unsigned long
Date: Fri, 2 May 2025 15:29:37 +0300 [thread overview]
Message-ID: <20250502123145.4066635-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20250502123145.4066635-1-andriy.shevchenko@linux.intel.com>
As a preparatory of adding flexible serial I/O accessors, convert
early_serial_base to unsigned long to cover all possible bus addresses
on the system.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/boot/boot.h | 2 +-
arch/x86/boot/compressed/early_serial_console.c | 2 +-
arch/x86/boot/compressed/misc.h | 4 ++--
arch/x86/boot/early_serial_console.c | 6 +++---
arch/x86/boot/tty.c | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index 38f17a1e1e36..753f429b28cb 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -274,7 +274,7 @@ int check_knl_erratum(void);
int validate_cpu(void);
/* early_serial_console.c */
-extern int early_serial_base;
+extern unsigned long early_serial_base;
void console_init(void);
/* edd.c */
diff --git a/arch/x86/boot/compressed/early_serial_console.c b/arch/x86/boot/compressed/early_serial_console.c
index 70a8d1706d0f..5b8db03f40ad 100644
--- a/arch/x86/boot/compressed/early_serial_console.c
+++ b/arch/x86/boot/compressed/early_serial_console.c
@@ -1,6 +1,6 @@
#include "misc.h"
/* This might be accessed before .bss is cleared, so use .data instead. */
-int early_serial_base __section(".data");
+unsigned long early_serial_base __section(".data");
#include "../early_serial_console.c"
diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h
index dd8d1a85f671..f083360c84c1 100644
--- a/arch/x86/boot/compressed/misc.h
+++ b/arch/x86/boot/compressed/misc.h
@@ -127,10 +127,10 @@ extern unsigned char _pgtable[];
#ifdef CONFIG_EARLY_PRINTK
/* early_serial_console.c */
-extern int early_serial_base;
+extern unsigned long early_serial_base;
void console_init(void);
#else
-static const int early_serial_base;
+static const unsigned long early_serial_base;
static inline void console_init(void)
{ }
#endif
diff --git a/arch/x86/boot/early_serial_console.c b/arch/x86/boot/early_serial_console.c
index 023bf1c3de8b..7a7766fa16e5 100644
--- a/arch/x86/boot/early_serial_console.c
+++ b/arch/x86/boot/early_serial_console.c
@@ -23,7 +23,7 @@
#define DEFAULT_BAUD 9600
-static void early_serial_init(int port, int baud)
+static void early_serial_init(unsigned long port, int baud)
{
unsigned char c;
unsigned divisor;
@@ -46,9 +46,9 @@ static void early_serial_init(int port, int baud)
static void parse_earlyprintk(void)
{
int baud = DEFAULT_BAUD;
+ unsigned long port = 0;
char arg[32];
int pos = 0;
- int port = 0;
if (cmdline_find_option("earlyprintk", arg, sizeof(arg)) > 0) {
char *e;
@@ -118,7 +118,7 @@ static void parse_console_uart8250(void)
{
char optstr[64], *options;
int baud = DEFAULT_BAUD;
- int port = 0;
+ unsigned long port = 0;
/*
* console=uart8250,io,0x3f8,115200n8
diff --git a/arch/x86/boot/tty.c b/arch/x86/boot/tty.c
index f7eb976b0a4b..e2ab8b8076ef 100644
--- a/arch/x86/boot/tty.c
+++ b/arch/x86/boot/tty.c
@@ -13,7 +13,7 @@
#include "boot.h"
-int early_serial_base;
+unsigned long early_serial_base;
#define XMTRDY 0x20
--
2.47.2
next prev parent reply other threads:[~2025-05-02 12:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 12:29 [PATCH v1 0/6] x86/boot: Enable earlyprintk on MMIO (8-bit) Andy Shevchenko
2025-05-02 12:29 ` Andy Shevchenko [this message]
2025-05-02 12:29 ` [PATCH v1 2/6] x86/boot: Introduce helpers for serial I/O Andy Shevchenko
2025-05-02 12:29 ` [PATCH v1 3/6] x86/boot: Split out parse_serial_port() helper for earlyprintk Andy Shevchenko
2025-05-02 12:29 ` [PATCH v1 4/6] x86/boot: Allow longer parameter list " Andy Shevchenko
2025-05-02 12:29 ` [PATCH v1 5/6] x86/boot: Also share MMIO accessors Andy Shevchenko
2025-05-02 12:29 ` [PATCH v1 6/6] x86/boot: Introduce MMIO accessors and their support in earlyprintk Andy Shevchenko
2025-05-02 17:33 ` [PATCH v1 0/6] x86/boot: Enable earlyprintk on MMIO (8-bit) David Woodhouse
2025-05-05 14:05 ` Andy Shevchenko
2025-05-05 14:35 ` David Woodhouse
2025-05-05 14:59 ` Andy Shevchenko
2025-05-05 15:01 ` Andy Shevchenko
2025-05-05 23:32 ` David Woodhouse
2025-05-06 3:19 ` David Woodhouse
2025-05-06 19:38 ` David Woodhouse
2025-05-07 13:54 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2018-01-14 14:32 [PATCH v1 1/6] x86/boot: Convert early_serial_base to unsigned long Andy Shevchenko
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=20250502123145.4066635-2-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=ashish.kalra@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dmukhin@ford.com \
--cc=dwmw@amazon.co.uk \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox