[ewg] Re: [PATCH 2/14] nes: device structures and defines

Jeff Garzik jeff at garzik.org
Wed Aug 8 09:25:14 PDT 2007


Roland Dreier wrote:
>  > But there are indeed a few cases that look wrong.
> 
> yes...
> 
>  > arch/x86_64/kernel/pci-calgary.c:       writel(cpu_to_be32(val), target);
> 
> eg this almost certainly wants to be
> 
> 	writel(swab32(val), target);
> 
> or something equivalent like
> 
> 	__raw_writel(cpu_to_be32(val), target);
> 	/* plus some suffficent memory ordering */

Precisely.  Some of those cases are "we know the underlying writel() 
swaps... we want to swap in this case anyway"

	Jeff






More information about the ewg mailing list