Messages in this thread | | | Date | Mon, 17 May 2004 19:18:47 -0400 | From | Jeff Garzik <> | Subject | Re: [PATCH] HPET driver |
| |
Andrew Morton wrote: > +static inline u64 readq(void *addr) > +{ > + return readl(addr) | (((u64)readl(addr + 4)) << 32); > +} > + > +static inline void writeq(u64 v, void *addr) > +{ > + writel(v & 0xffffffff, addr); > + writel(v >> 32, addr + 4); > +}
Seems sane, though I wonder about two things:
* better home is probably asm-generic
* It seems to me that a poorly-written writel() macro might prefer some guarantee that it's argument is pre-cast to u32. I dunno if this is just paranoia or not.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |