Re: [PATCH] Fix broken debug output reserve_region_with_split()

From: Linus Torvalds
Date: Fri Oct 17 2008 - 00:18:27 EST

On Thu, 16 Oct 2008, David Miller wrote:
> These modifiers are interesting, but wouldn't it be even nicer to just
> pick one output style and use it consistently in kernel messages for
> resources?

Sure, but I don't think we agree on what it would be. And quite frankly,
it might depend on the resource.

For example, in traditional PCI, PIO resources would easily want to use
%04x, which MMIO would use %08x. Sure, Linux _allows_ for bigger resources
(ie you can have even PIO resources with the full 64-bit data), but it's
not what you'd expect for any traditional stuff, and so it makes sense to
make PIO resources show as %04x to get the old-fashioned resources shown
in an expected manner.

We can do it inside the %pR code itself (just look at IORESOURCE_IO vs
IORESOURCE_MEM), and maybe that's even the right approach. Maybe we want
to even add flag bits, and show things like "IORESOURCE_PREFETCH" as a
small marking automatically. But maybe people want to make it explicit.

I dunno. I'd certainly be perfectly happy with having the flags and
field_width be specified by the resource flags. eg

flags = ZEROPAD | SMALL;
fieldwidth = (res->flags & IORESOURCE_IO) ? 4 : 8;

or something like that. But would it be acceptable to everybody?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at