Thread (18 messages) 18 messages, 7 authors, 2013-06-19

Re: [PATCH 3/5] tty/8250_dw: Add support for OCTEON UARTS.

From: Arnd Bergmann <arnd@arndb.de>
Date: 2013-06-19 18:52:32
Also in: linux-mips, lkml

On Wednesday 19 June 2013, David Daney wrote:
On 06/19/2013 03:01 AM, Arnd Bergmann wrote:
quoted
It's also wrong to use the
__raw_* variant, which is not guaranteed to be atomic and is not
endian-safe.
We do runtime probing and only use this function on platforms where it 
is appropriate, so atomicity is not an issue.  As for endianess, I used 
the __raw_ variant precisely because it is correct for both big and 
little endian kernels.
You don't know what the compiler turns a __raw_writeq into, it could
always to eight byte wise stores, that's why typically writeq is
an inline assembly while __raw_writeq is just a pointer dereference.

__raw_* never do endian swaps, so it will be wrong on either big-endian
CPUs or on little-endian CPUs, depending on what the MMIO register
needs.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help