Messages in this thread | | | Subject | Re: [PATCH] Fix broken debug output reserve_region_with_split() | From | Benjamin Herrenschmidt <> | Date | Fri, 17 Oct 2008 14:46:32 +1100 |
| |
> > > > +static char *resource_string(char *buf, char *end, struct resource *res, int field_width, int precision, int flags) > > +{ > > + /* room for the actual numbers, the two "0x", -, [, ] and the final zero */ > > + char sym[4*sizeof(resource_size_t) + 8]; > > + char *p = sym, *pend = sym + sizeof(sym); > > + > > + *p++ = '['; > > + p = number(p, pend, res->start, 16, -1, -1, SPECIAL | SMALL); > > + *p++ = '-'; > > + p = number(p, pend, res->end, 16, -1, -1, SPECIAL | SMALL); > > + *p++ = ']'; > > + *p = 0; > > + > > + return string(buf, end, sym, field_width, precision, flags); > > so x64 64bit,io ports will be print out 8 digital?
With that patch, it will use just as many digits as necessary to display a given number. The question I'm asking in the comments is whether we want to instead use fixed digits with zero padding, and in that case, do we want a hook or something for archs to decide how many digits for IO vs. memory.
But at least with that in, we can start converting callers. I have a patch converting PCI that I'll post once that goes in and I'll start scrubbing arch/powerpc soon.
Cheers, Ben.
| |