The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v1 0/2] PCI: Include human-readable BAR and window sizes
@ 2026-08-08 17:23 Bjorn Helgaas
  2026-08-08 17:23 ` [PATCH v1 1/2] vsprintf: Add %pR human-readable size Bjorn Helgaas
  2026-08-08 17:23 ` [PATCH v1 2/2] PCI: Include human-readable sizes in resource assignment messages Bjorn Helgaas
  0 siblings, 2 replies; 7+ messages in thread
From: Bjorn Helgaas @ 2026-08-08 17:23 UTC (permalink / raw)
  To: Ilpo Järvinen, Andrew Morton, Petr Mladek, Steven Rostedt
  Cc: Andy Shevchenko, Rasmus Villemoes, Sergey Senozhatsky, linux-pci,
	linux-kernel, Bjorn Helgaas

PCI and other subsystems often use %pR to decode and print memory ranges.
The size of the range is useful to know but hard to read off at a glance,
e.g., 

  BAR 0 [mem 0xfea80000-0xfea9ffff]

Add more user-friendly size information to the %pR format, e.g.,

  BAR 0 [mem 0xfea80000-0xfea9ffff (128 KiB)]

%pR is also used to print I/O port, bus number, and DMA resources, where
the size is not as relevant, so this only applies to IORESOURCE_MEM
resources.

Bjorn Helgaas (2):
  vsprintf: Add %pR human-readable size
  PCI: Include human-readable sizes in resource assignment messages


vfio_pci_info_atomic_cap
 drivers/pci/setup-bus.c | 46 +++++++++++++++++++++++++++++------------
 drivers/pci/setup-res.c | 11 ++++++----
 lib/vsprintf.c          | 18 ++++++++++++----
 3 files changed, 54 insertions(+), 21 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-09  8:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-08 17:23 [PATCH v1 0/2] PCI: Include human-readable BAR and window sizes Bjorn Helgaas
2026-08-08 17:23 ` [PATCH v1 1/2] vsprintf: Add %pR human-readable size Bjorn Helgaas
2026-08-08 17:43   ` Andy Shevchenko
2026-08-08 23:45     ` Bjorn Helgaas
2026-08-09  8:25       ` Andy Shevchenko
2026-08-08 17:23 ` [PATCH v1 2/2] PCI: Include human-readable sizes in resource assignment messages Bjorn Helgaas
2026-08-08 17:48   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox