Re: [PATCH] Fix broken debug output reserve_region_with_split()
From: Benjamin Herrenschmidt
Date: Fri Oct 17 2008 - 01:01:00 EST
On Thu, 2008-10-16 at 21:18 -0700, Linus Torvalds wrote:
> 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.
Well, I was proposing that in the patch comments I think :-) We can do
some more specific formatting details in there based on the resource
flags, though we might also need some arch ifdef's in there.
It's better I think than having callers get it wrong in hundreds of
> 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've been going on/off about the flags and decided to leave them alone
for now unless somebody comes up with a nice way to handle them. But
that doesn't mean we can't -use- the flags as you suggested to adjust
the format of the output.
The only little nit here is that the amount of digits needed for PIO is
fairly arch specific. So I might just stick an few ifdef's for the 4
possible cases (4, 8 and 16 digits) and let arch maintainers fix them up
(I'll default to 16 for everybody except x86 -> 4 and ppc -> 8).
As for the 36 bits trick of sparc32, I'll let DaveM do another arch hack
in there for now until he sorts it out.
I'll do a patch in a minute...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/