Thread (5 messages) 5 messages, 3 authors, 2011-05-16

Re: [PATCH] input: Add Nintendo extension controller driver

From: Grant Likely <hidden>
Date: 2011-05-16 23:04:25
Also in: lkml

On Mon, May 16, 2011 at 4:43 PM, Dmitry Torokhov
[off-list ref] wrote:
On Mon, May 16, 2011 at 10:51:10PM +0100, Ben Dooks wrote:
quoted
On Mon, May 16, 2011 at 03:46:08PM -0600, Grant Likely wrote:
quoted
+
+   /*
+    * DMA buffer, with padding to give it its own cache line so that
+    * the DMA streaming works on non-coherent architectures.
+    * Question: Is this the proper pattern, and is this really necessary?
+    */
+   uint8_t pad1[L1_CACHE_BYTES];
+   uint8_t buf[6];
+   uint8_t pad2[L1_CACHE_BYTES];
+};
I think there's an attribute to do this, starting with an __ defined
in the kernel.
Yes, it is called "____cacheline_aligned".
Fixed and tested, thanks.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help