Messages in this thread Patch in this message | | | Date | Sat, 21 Mar 2020 14:33:24 -0000 | From | "tip-bot2 for Vincenzo Frascino" <> | Subject | [tip: timers/core] x86/vdso: Enable x86 to use common headers |
| |
The following commit has been merged into the timers/core branch of tip:
Commit-ID: abc22418db02b986fc5623c035507b6357e191ed Gitweb: https://git.kernel.org/tip/abc22418db02b986fc5623c035507b6357e191ed Author: Vincenzo Frascino <vincenzo.frascino@arm.com> AuthorDate: Fri, 20 Mar 2020 14:53:48 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Sat, 21 Mar 2020 15:24:02 +01:00
x86/vdso: Enable x86 to use common headers
Enable x86 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> Link: https://lkml.kernel.org/r/20200320145351.32292-24-vincenzo.frascino@arm.com
--- arch/x86/include/asm/processor.h | 12 +----------- arch/x86/include/asm/vdso/processor.h | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-) create mode 100644 arch/x86/include/asm/vdso/processor.h
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 09705cc..94789db 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h @@ -26,6 +26,7 @@ struct vm86; #include <asm/fpu/types.h> #include <asm/unwind_hints.h> #include <asm/vmxfeatures.h> +#include <asm/vdso/processor.h> #include <linux/personality.h> #include <linux/cache.h> @@ -677,17 +678,6 @@ static inline unsigned int cpuid_edx(unsigned int op) return edx; } -/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ -static __always_inline void rep_nop(void) -{ - asm volatile("rep; nop" ::: "memory"); -} - -static __always_inline void cpu_relax(void) -{ - rep_nop(); -} - /* * This function forces the icache and prefetched instruction stream to * catch up with reality in two very specific cases: diff --git a/arch/x86/include/asm/vdso/processor.h b/arch/x86/include/asm/vdso/processor.h new file mode 100644 index 0000000..57b1a70 --- /dev/null +++ b/arch/x86/include/asm/vdso/processor.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (C) 2020 ARM Ltd. + */ +#ifndef __ASM_VDSO_PROCESSOR_H +#define __ASM_VDSO_PROCESSOR_H + +#ifndef __ASSEMBLY__ + +/* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ +static __always_inline void rep_nop(void) +{ + asm volatile("rep; nop" ::: "memory"); +} + +static __always_inline void cpu_relax(void) +{ + rep_nop(); +} + +#endif /* __ASSEMBLY__ */ + +#endif /* __ASM_VDSO_PROCESSOR_H */
| |