[lkml]   [2008]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Fix broken debug output reserve_region_with_split()
    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
    different ways.

    > 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...


     \ /
      Last update: 2008-10-17 07:03    [W:0.020 / U:55.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site