On 2002.05.01 00:01 Michel Dänzer wrote: > On Wed, 2002-05-01 at 00:43, José Fonseca wrote: > > > > I attached a complete diff that should do the right thing. I believe > this > > is the only way to do this in a portable fashion, even if results in > some > > redundant work being done on bigendian machines. > > Don't worry about that, as I said, at least PPC has special instructions > to handle this. > > > I also avoided to increment the pointer inside the macros, just in case > the > > le32_to_cpu macro reuses it's argument. > > Certainly can't hurt... > > > > +#define MACH64_WRITE(reg,val) writel(val, MACH64_ADDR(reg)) > ^^^ > ...neither can braces here... >
Ok. Added in my local tree for later CVS submission. > > > ... > > This looks overly complicated though. I'd just do this: > > @@ -544,7 +545,8 @@ > > --fifo; > /* data is already > little-endian */ > - MACH64_DEREF(reg) = > *p++; > + MACH64_WRITE(reg, > le32_to_cpu(*p)); > + p++; > used--; > > reg += 4; > > (sorry, my mailer probably wraps some lines) > The above complication was just to avoid use statements as macro arguments, but if you think that will never cause any problem, then this is just fine by me too. Peter, you do not need to bother with these details thought, as they are mostly comestic. Simply apply the previous patch and check if it works. Afterwards I'll commit the final result of all this discussion to CVS. José Fonseca _______________________________________________________________ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel