1abc22418SVincenzo Frascino /* SPDX-License-Identifier: GPL-2.0-only */ 2abc22418SVincenzo Frascino /* 3abc22418SVincenzo Frascino * Copyright (C) 2020 ARM Ltd. 4abc22418SVincenzo Frascino */ 5abc22418SVincenzo Frascino #ifndef __ASM_VDSO_PROCESSOR_H 6abc22418SVincenzo Frascino #define __ASM_VDSO_PROCESSOR_H 7abc22418SVincenzo Frascino 8abc22418SVincenzo Frascino #ifndef __ASSEMBLY__ 9abc22418SVincenzo Frascino 10abc22418SVincenzo Frascino /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ rep_nop(void)11abc22418SVincenzo Frascinostatic __always_inline void rep_nop(void) 12abc22418SVincenzo Frascino { 13abc22418SVincenzo Frascino asm volatile("rep; nop" ::: "memory"); 14abc22418SVincenzo Frascino } 15abc22418SVincenzo Frascino cpu_relax(void)16abc22418SVincenzo Frascinostatic __always_inline void cpu_relax(void) 17abc22418SVincenzo Frascino { 18abc22418SVincenzo Frascino rep_nop(); 19abc22418SVincenzo Frascino } 20abc22418SVincenzo Frascino 21*dac0da42SBorislav Petkov (AMD) struct getcpu_cache; 22*dac0da42SBorislav Petkov (AMD) 23*dac0da42SBorislav Petkov (AMD) notrace long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused); 24*dac0da42SBorislav Petkov (AMD) 25abc22418SVincenzo Frascino #endif /* __ASSEMBLY__ */ 26abc22418SVincenzo Frascino 27abc22418SVincenzo Frascino #endif /* __ASM_VDSO_PROCESSOR_H */ 28