diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-09-11 09:34:52 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-09-11 17:08:18 +0200 |
commit | 6e8f580d1fcc18e290713984c379cb97131c015a (patch) | |
tree | f4dc7a3e4310c64cacacae02d8c20476bc6f4c37 /arch/arm/xen | |
parent | ARM: domains: thread_info.h no longer needs asm/domains.h (diff) | |
download | linux-6e8f580d1fcc18e290713984c379cb97131c015a.tar.xz linux-6e8f580d1fcc18e290713984c379cb97131c015a.zip |
ARM: domains: add memory dependencies to get_domain/set_domain
We need to have memory dependencies on get_domain/set_domain to avoid
the compiler over-optimising these inline assembly instructions.
Loads/stores must not be reordered across a set_domain(), so introduce
a compiler barrier for that assembly.
The value of get_domain() must not be cached across a set_domain(), but
we still want to allow the compiler to optimise it away. Introduce a
dependency on current_thread_info()->cpu_domain to avoid this; the new
memory clobber in set_domain() should therefore cause the compiler to
re-load this. The other advantage of using this is we should have its
address in the register set already, or very soon after at most call
sites.
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/xen')
0 files changed, 0 insertions, 0 deletions