lkml.org 
[lkml]   [2008]   [Oct]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 16 Oct 2008 21:18:08 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [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


\
 
 \ /
  Last update: 2008-10-17 06:21    [from the cache]
©2003-2008