Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (C) 2020 ARM Ltd.
0004  */
0005 #ifndef __ASM_VDSO_PROCESSOR_H
0006 #define __ASM_VDSO_PROCESSOR_H
0007 
0008 #ifndef __ASSEMBLY__
0009 
0010 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
0011 static __always_inline void rep_nop(void)
0012 {
0013     asm volatile("rep; nop" ::: "memory");
0014 }
0015 
0016 static __always_inline void cpu_relax(void)
0017 {
0018     rep_nop();
0019 }
0020 
0021 #endif /* __ASSEMBLY__ */
0022 
0023 #endif /* __ASM_VDSO_PROCESSOR_H */