mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 12:43:55 +08:00
0402c91af9
modified: arch/score/include/asm/cacheflush.h modified: arch/score/include/asm/delay.h modified: arch/score/include/asm/errno.h modified: arch/score/include/asm/pgtable-bits.h modified: arch/score/include/asm/pgtable.h modified: arch/score/include/asm/ptrace.h modified: arch/score/include/asm/unistd.h modified: arch/score/kernel/entry.S modified: arch/score/kernel/process.c modified: arch/score/kernel/ptrace.c modified: arch/score/kernel/signal.c modified: arch/score/kernel/sys_score.c modified: arch/score/kernel/traps.c modified: arch/score/mm/cache.c Signed-off-by: Chen Liqin <liqin.chen@sunplusct.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
27 lines
496 B
C
27 lines
496 B
C
#ifndef _ASM_SCORE_DELAY_H
|
|
#define _ASM_SCORE_DELAY_H
|
|
|
|
static inline void __delay(unsigned long loops)
|
|
{
|
|
/* 3 cycles per loop. */
|
|
__asm__ __volatile__ (
|
|
"1:\tsubi\t%0, 3\n\t"
|
|
"cmpz.c\t%0\n\t"
|
|
"ble\t1b\n\t"
|
|
: "=r" (loops)
|
|
: "0" (loops));
|
|
}
|
|
|
|
static inline void __udelay(unsigned long usecs)
|
|
{
|
|
unsigned long loops_per_usec;
|
|
|
|
loops_per_usec = (loops_per_jiffy * HZ) / 1000000;
|
|
|
|
__delay(usecs * loops_per_usec);
|
|
}
|
|
|
|
#define udelay(usecs) __udelay(usecs)
|
|
|
|
#endif /* _ASM_SCORE_DELAY_H */
|