projects/linux·blob master · refs

25 lines · 521 B

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 __ASSEMBLER__
9
10/* PAUSE is a good thing to insert into busy-wait loops. */
11static __always_inline void native_pause(void)
12{
13 asm volatile("pause" ::: "memory");
14}
15
16static __always_inline void cpu_relax(void)
17{
18 native_pause();
19}
20
21notrace long __vdso_getcpu(unsigned *cpu, unsigned *node, void *unused);
22
23#endif /* __ASSEMBLER__ */
24
25#endif /* __ASM_VDSO_PROCESSOR_H */