[PATCH 09/32] x86/boot/e820: Call the PCI gap a 'gap' in the boot log printout

Ingo Molnar posted 32 patches 7 months ago
[PATCH 09/32] x86/boot/e820: Call the PCI gap a 'gap' in the boot log printout
Posted by Ingo Molnar 7 months ago
It is a bit weird and inconsistent that the PCI gap is
advertised during bootup as 'mem'ory:

  [mem 0xc0000000-0xfed1bfff] available for PCI devices
   ^^^

It's not really memory, it's a gap that PCI devices can decode
and use and they often do not map it to any memory themselves.

So advertise it for what it is, a gap:

  [gap 0xc0000000-0xfed1bfff] available for PCI devices

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
---
 arch/x86/kernel/e820.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 0a324d0db60e..d85623c9ee1b 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -741,7 +741,7 @@ __init void e820__setup_pci_gap(void)
 	 */
 	pci_mem_start = gapstart;
 
-	pr_info("[mem %#010lx-%#010lx] available for PCI devices\n",
+	pr_info("[gap %#010lx-%#010lx] available for PCI devices\n",
 		gapstart, gapstart + gapsize - 1);
 }
 
-- 
2.45.2
Re: [PATCH 09/32] x86/boot/e820: Call the PCI gap a 'gap' in the boot log printout
Posted by Andy Shevchenko 7 months ago
On Thu, May 15, 2025 at 02:05:25PM +0200, Ingo Molnar wrote:
> It is a bit weird and inconsistent that the PCI gap is
> advertised during bootup as 'mem'ory:
> 
>   [mem 0xc0000000-0xfed1bfff] available for PCI devices
>    ^^^
> 
> It's not really memory, it's a gap that PCI devices can decode
> and use and they often do not map it to any memory themselves.
> 
> So advertise it for what it is, a gap:
> 
>   [gap 0xc0000000-0xfed1bfff] available for PCI devices

Why not use word 'range' instead of the 'gap'? This will allow to switch to
%pra without modifying the output.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH 09/32] x86/boot/e820: Call the PCI gap a 'gap' in the boot log printout
Posted by Ingo Molnar 6 months, 2 weeks ago
* Andy Shevchenko <andy@kernel.org> wrote:

> On Thu, May 15, 2025 at 02:05:25PM +0200, Ingo Molnar wrote:
> > It is a bit weird and inconsistent that the PCI gap is
> > advertised during bootup as 'mem'ory:
> > 
> >   [mem 0xc0000000-0xfed1bfff] available for PCI devices
> >    ^^^
> > 
> > It's not really memory, it's a gap that PCI devices can decode
> > and use and they often do not map it to any memory themselves.
> > 
> > So advertise it for what it is, a gap:
> > 
> >   [gap 0xc0000000-0xfed1bfff] available for PCI devices
> 
> Why not use word 'range' instead of the 'gap'? This will allow to switch to
> %pra without modifying the output.

Well, it's not a range, it's a gap in the memory map. Why does %pra 
dictate details of the output in such a fashion?

Thanks,

	Ingo
[tip: x86/boot] x86/boot/e820: Call the PCI gap a 'gap' in the boot log printout
Posted by tip-bot2 for Ingo Molnar 2 days, 18 hours ago
The following commit has been merged into the x86/boot branch of tip:

Commit-ID:     1d7bc219e2b6176eac361ed2eb11c7a70387644c
Gitweb:        https://git.kernel.org/tip/1d7bc219e2b6176eac361ed2eb11c7a70387644c
Author:        Ingo Molnar <mingo@kernel.org>
AuthorDate:    Thu, 15 May 2025 14:05:25 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Sun, 14 Dec 2025 09:19:38 +01:00

x86/boot/e820: Call the PCI gap a 'gap' in the boot log printout

It is a bit weird and inconsistent that the PCI gap is
advertised during bootup as 'mem'ory:

  [mem 0xc0000000-0xfed1bfff] available for PCI devices
   ^^^

It's not really memory, it's a gap that PCI devices can decode
and use and they often do not map it to any memory themselves.

So advertise it for what it is, a gap:

  [gap 0xc0000000-0xfed1bfff] available for PCI devices

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Arnd Bergmann <arnd@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: "H . Peter Anvin" <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Link: https://patch.msgid.link/20250515120549.2820541-10-mingo@kernel.org
---
 arch/x86/kernel/e820.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index b0efa4b..96840fa 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -699,7 +699,7 @@ __init void e820__setup_pci_gap(void)
 	 */
 	pci_mem_start = gapstart;
 
-	pr_info("[mem %#010lx-%#010lx] available for PCI devices\n",
+	pr_info("[gap %#010lx-%#010lx] available for PCI devices\n",
 		gapstart, gapstart + gapsize - 1);
 }