diff options
author | Richard Braun <rbraun@sceen.net> | 2018-01-10 21:36:04 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-01-10 22:41:24 +0100 |
commit | ff6e71d868942f1951e1d3e2a36b73de9f29858f (patch) | |
tree | 29655af9fe043b27c0cc2af5d87054600884fd8b /arch/x86/machine | |
parent | 65f71c221037e468caa5921d23a86da34f3bd0a5 (diff) |
x86/cpu: optimize cpu-local accessors
There is no point for the volatile keyword in those inline assembly
statements.
Diffstat (limited to 'arch/x86/machine')
-rw-r--r-- | arch/x86/machine/cpu.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/machine/cpu.h b/arch/x86/machine/cpu.h index 39f17f8..c471112 100644 --- a/arch/x86/machine/cpu.h +++ b/arch/x86/machine/cpu.h @@ -434,7 +434,7 @@ extern void *cpu_local_area; MACRO_BEGIN \ typeof(var) *___ptr = &(var); \ \ - asm volatile("add %%fs:%1, %0" \ + asm("add %%fs:%1, %0" \ : "+r" (___ptr) \ : "m" (cpu_local_area)); \ \ @@ -446,14 +446,14 @@ MACRO_END /* Interrupt-safe percpu accessors for basic types */ #define cpu_local_assign(var, val) \ - asm volatile("mov %0, %%fs:%1" \ + asm("mov %0, %%fs:%1" \ : : "r" (val), "m" (var)); #define cpu_local_read(var) \ MACRO_BEGIN \ typeof(var) ___val; \ \ - asm volatile("mov %%fs:%1, %0" \ + asm("mov %%fs:%1, %0" \ : "=r" (___val) \ : "m" (var)); \ \ |