Re: [PATCH 2/2] MIPS: add readl/write_be

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 12, 2009 at 05:57:56PM +0100, Florian Fainelli wrote:
> +#define readl_be(addr)			__raw_readl((__force unsigned *)addr)
> +#define writel_be(val, addr)		__raw_writel(val, (__force unsigned *)addr)

looks broken for little endian machines. __raw_XXX doesn't do any swapping,
so IMHO the correct thing would be to use be32_to_cpu/cpu_to_be32.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux