diff options
author | Dave Martin <Dave.Martin@arm.com> | 2017-08-03 18:23:21 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2017-08-04 16:00:52 +0200 |
commit | 504641859e5c616210c0894149e09fb6928e398f (patch) | |
tree | b16e8da2e6d0fa028ff6c2c95b51702d26d77828 /arch/arm64/kernel | |
parent | arm64: neon: Add missing header guard in <asm/neon.h> (diff) | |
download | linux-504641859e5c616210c0894149e09fb6928e398f.tar.xz linux-504641859e5c616210c0894149e09fb6928e398f.zip |
arm64: fpsimd: Consistently use __this_cpu_ ops where appropriate
__this_cpu_ ops are not used consistently with regard to this_cpu_
ops in a couple of places in fpsimd.c.
Since preemption is explicitly disabled in
fpsimd_restore_current_state() and fpsimd_update_current_state(),
this patch converts this_cpu_ ops in those functions to __this_cpu_
ops. This doesn't save cost on arm64, but benefits from additional
assertions in the core code.
Signed-off-by: Dave Martin <Dave.Martin@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/fpsimd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 06da8ea16bbe..d7e5f8a2d4f5 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -194,7 +194,7 @@ void fpsimd_restore_current_state(void) struct fpsimd_state *st = ¤t->thread.fpsimd_state; fpsimd_load_state(st); - this_cpu_write(fpsimd_last_state, st); + __this_cpu_write(fpsimd_last_state, st); st->cpu = smp_processor_id(); } preempt_enable(); @@ -214,7 +214,7 @@ void fpsimd_update_current_state(struct fpsimd_state *state) if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) { struct fpsimd_state *st = ¤t->thread.fpsimd_state; - this_cpu_write(fpsimd_last_state, st); + __this_cpu_write(fpsimd_last_state, st); st->cpu = smp_processor_id(); } preempt_enable(); |