parisc: fix ldcw inline assembler
commitb556f93a508bfda0a25c8beb06f400ce813df59d
authorHelge Deller <deller@gmx.de>
Thu, 30 Apr 2009 21:39:45 +0000 (30 21:39 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 30 Jul 2009 21:40:07 +0000 (30 14:40 -0700)
tree7486dce6bf8663de4ebf780f7dea5ecf6700620d
parentbe61510387ff29c49603545a6db006932af97b2a
parisc: fix ldcw inline assembler

commit 7d17e2763129ea307702fcdc91f6e9d114b65c2d upstream.

There are two reasons to expose the memory *a in the asm:

1) To prevent the compiler from discarding a preceeding write to *a, and
2) to prevent it from caching *a in a register over the asm.

The change has had a few days testing with a SMP build of 2.6.22.19
running on a rp3440.

This patch is about the correctness of the __ldcw() macro itself.
The use of the macro should be confined to small inline functions
to try to limit the effect of clobbering memory on GCC's optimization
of loads and stores.

Signed-off-by: Dave Anglin <dave.anglin@nrc-cnrc.gc.ca>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/parisc/include/asm/system.h