Thread (14 messages) flat view 14 messages, 5 authors, 2011-02-18

[PATCH V3 3/4] ARM: Xilinx: base header files and assembly macros

From: Russell King - ARM Linux <hidden>
Date: 2011-02-17 15:12:46
Also in: lkml

On Thu, Feb 17, 2011 at 03:41:11PM +0100, Arnd Bergmann wrote:
On Thursday 17 February 2011, John Linn wrote:
quoted
quoted
quoted
+
+#define UART_FIFO_WRITE(base, value) \
+   (*(volatile unsigned int *)((base) + UART_FIFO_OFFSET) =
(value))
quoted
quoted
+
+#define UART_STATUS(base) \
+   (*(volatile unsigned int *)((base) + UART_SR_OFFSET))
You could probably make these static inline functions in the header
and
quoted
use __raw_{readl,writel}() to make this a little cleaner.
I had considered that, but it wasn't clear to me at the time what the
compressor could use or not.

I'll give it a try as I agree that's cleaner.
Actually, for correctness you should use the regular readl/writel, not
the __raw_ versions, which can result in reordered or partial accesses
on the bus.
Not in the decompressor.  readl/writel are unsupported there - the
decompressor doesn't have the L2 cache support code and so the barriers
necessary for readl/writel cause link errors.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help