[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0810162109570.3438@nehalem.linux-foundation.org>
Date: Thu, 16 Oct 2008 21:18:08 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Miller <davem@...emloft.net>
cc: benh@...nel.crashing.org, rdreier@...co.com,
Geert.Uytterhoeven@...ycom.com, hpa@...or.com,
linux-kernel@...r.kernel.org, mingo@...e.hu, yhlu.kernel@...il.com,
akpm@...ux-foundation.org
Subject: Re: [PATCH] Fix broken debug output reserve_region_with_split()
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?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists