cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

delay.h (582B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/*
      3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
      4 */
      5#ifndef _ASM_DELAY_H
      6#define _ASM_DELAY_H
      7
      8#include <linux/param.h>
      9
     10extern void __delay(unsigned long cycles);
     11extern void __ndelay(unsigned long ns);
     12extern void __udelay(unsigned long us);
     13
     14#define ndelay(ns) __ndelay(ns)
     15#define udelay(us) __udelay(us)
     16
     17/* make sure "usecs *= ..." in udelay do not overflow. */
     18#if HZ >= 1000
     19#define MAX_UDELAY_MS	1
     20#elif HZ <= 200
     21#define MAX_UDELAY_MS	5
     22#else
     23#define MAX_UDELAY_MS	(1000 / HZ)
     24#endif
     25
     26#endif /* _ASM_DELAY_H */