Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: vdso: Enable mips to use common headers

Enable mips to use only the common headers in the implementation of
the vDSO library.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul Burton <paulburton@kernel.org>
Link: https://lkml.kernel.org/r/20200320145351.32292-23-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Thomas Gleixner
c135fc87 5340e873

+28 -19
+1 -15
arch/mips/include/asm/processor.h
··· 22 22 #include <asm/dsemul.h> 23 23 #include <asm/mipsregs.h> 24 24 #include <asm/prefetch.h> 25 + #include <asm/vdso/processor.h> 25 26 26 27 /* 27 28 * System setup and hardware flags.. ··· 385 384 #define KSTK_EIP(tsk) (task_pt_regs(tsk)->cp0_epc) 386 385 #define KSTK_ESP(tsk) (task_pt_regs(tsk)->regs[29]) 387 386 #define KSTK_STATUS(tsk) (task_pt_regs(tsk)->cp0_status) 388 - 389 - #ifdef CONFIG_CPU_LOONGSON64 390 - /* 391 - * Loongson-3's SFB (Store-Fill-Buffer) may buffer writes indefinitely when a 392 - * tight read loop is executed, because reads take priority over writes & the 393 - * hardware (incorrectly) doesn't ensure that writes will eventually occur. 394 - * 395 - * Since spin loops of any kind should have a cpu_relax() in them, force an SFB 396 - * flush from cpu_relax() such that any pending writes will become visible as 397 - * expected. 398 - */ 399 - #define cpu_relax() smp_mb() 400 - #else 401 - #define cpu_relax() barrier() 402 - #endif 403 387 404 388 /* 405 389 * Return_address is a replacement for __builtin_return_address(count)
-4
arch/mips/include/asm/vdso/gettimeofday.h
··· 13 13 14 14 #ifndef __ASSEMBLY__ 15 15 16 - #include <linux/compiler.h> 17 - #include <linux/time.h> 18 - 19 16 #include <asm/vdso/vdso.h> 20 17 #include <asm/clocksource.h> 21 - #include <asm/io.h> 22 18 #include <asm/unistd.h> 23 19 #include <asm/vdso.h> 24 20
+27
arch/mips/include/asm/vdso/processor.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Copyright (C) 2020 ARM Ltd. 4 + */ 5 + #ifndef __ASM_VDSO_PROCESSOR_H 6 + #define __ASM_VDSO_PROCESSOR_H 7 + 8 + #ifndef __ASSEMBLY__ 9 + 10 + #ifdef CONFIG_CPU_LOONGSON64 11 + /* 12 + * Loongson-3's SFB (Store-Fill-Buffer) may buffer writes indefinitely when a 13 + * tight read loop is executed, because reads take priority over writes & the 14 + * hardware (incorrectly) doesn't ensure that writes will eventually occur. 15 + * 16 + * Since spin loops of any kind should have a cpu_relax() in them, force an SFB 17 + * flush from cpu_relax() such that any pending writes will become visible as 18 + * expected. 19 + */ 20 + #define cpu_relax() smp_mb() 21 + #else 22 + #define cpu_relax() barrier() 23 + #endif 24 + 25 + #endif /* __ASSEMBLY__ */ 26 + 27 + #endif /* __ASM_VDSO_PROCESSOR_H */