[MIPS] RTLX: Harden against compiler reordering and optimization.
commit61dcc6f4d9ed5db71f4f0be9026bdd09f1a7dc06
authorRalf Baechle <ralf@linux-mips.org>
Thu, 15 Mar 2007 17:10:16 +0000 (15 17:10 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Sat, 17 Mar 2007 01:03:27 +0000 (17 01:03 +0000)
treeeb28cb6fe958e7f527ac03d58b7a6e80afe425f2
parent9e34682026572f07328208f7d2b2c611d2001844
[MIPS] RTLX: Harden against compiler reordering and optimization.

RTLX communication is based on lock-free shared memory buffers.  It
happened to be working by luck so far but relies on the optimizer doing
certain optimizations but no reordering.

Fixed by inserting proper barriers in rtlx_read and rtlx_write, and careful
pointer dereferencing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/rtlx.c