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

Configure Feed

Select the types of activity you want to include in your feed.

arm64: Introduce asm/vdso/processor.h

The vDSO library should only include the necessary headers required for
a userspace library (UAPI and a minimal set of kernel headers). To make
this possible it is necessary to isolate from the kernel headers the
common parts that are strictly necessary to build the library.

Introduce asm/vdso/processor.h to contain all the arm64 specific
functions that are suitable for vDSO inclusion.

Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lkml.kernel.org/r/20200320145351.32292-20-vincenzo.frascino@arm.com

authored by

Vincenzo Frascino and committed by
Thomas Gleixner
f511e079 94d0f5be

+19 -5
+2 -5
arch/arm64/include/asm/processor.h
··· 28 28 #include <linux/string.h> 29 29 #include <linux/thread_info.h> 30 30 31 + #include <vdso/processor.h> 32 + 31 33 #include <asm/alternative.h> 32 34 #include <asm/cpufeature.h> 33 35 #include <asm/hw_breakpoint.h> ··· 257 255 extern void release_thread(struct task_struct *); 258 256 259 257 unsigned long get_wchan(struct task_struct *p); 260 - 261 - static inline void cpu_relax(void) 262 - { 263 - asm volatile("yield" ::: "memory"); 264 - } 265 258 266 259 /* Thread switching */ 267 260 extern struct task_struct *cpu_switch_to(struct task_struct *prev,
+17
arch/arm64/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 + static inline void cpu_relax(void) 11 + { 12 + asm volatile("yield" ::: "memory"); 13 + } 14 + 15 + #endif /* __ASSEMBLY__ */ 16 + 17 + #endif /* __ASM_VDSO_PROCESSOR_H */