[Top] [All Lists]

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

To: Florian Fainelli <>
Subject: Re: [PATCH 2/2] MIPS: add readl/write_be
From: Thomas Bogendoerfer <>
Date: Sat, 12 Dec 2009 20:31:14 +0100
Cc:, Maxime Bizon <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.18 (2008-05-17)
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.


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

<Prev in Thread] Current Thread [Next in Thread>