403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.189.230
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/src/linux-headers-5.15.0-142-generic/arch/xtensa/include/asm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/linux-headers-5.15.0-142-generic/arch/xtensa/include/asm/delay.h
/*
 * include/asm-xtensa/delay.h
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2001 - 2005 Tensilica Inc.
 *
 */

#ifndef _XTENSA_DELAY_H
#define _XTENSA_DELAY_H

#include <asm/timex.h>
#include <asm/param.h>

extern unsigned long loops_per_jiffy;

static inline void __delay(unsigned long loops)
{
	if (__builtin_constant_p(loops) && loops < 2)
		__asm__ __volatile__ ("nop");
	else if (loops >= 2)
		/* 2 cycles per loop. */
		__asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b"
				: "+r" (loops));
}

/* Undefined function to get compile-time error */
void __bad_udelay(void);
void __bad_ndelay(void);

#define __MAX_UDELAY 30000
#define __MAX_NDELAY 30000

static inline void __udelay(unsigned long usecs)
{
	unsigned long start = get_ccount();
	unsigned long cycles = (usecs * (ccount_freq >> 15)) >> 5;

	/* Note: all variables are unsigned (can wrap around)! */
	while (((unsigned long)get_ccount()) - start < cycles)
		cpu_relax();
}

static inline void udelay(unsigned long usec)
{
	if (__builtin_constant_p(usec) && usec >= __MAX_UDELAY)
		__bad_udelay();
	else
		__udelay(usec);
}

static inline void __ndelay(unsigned long nsec)
{
	/*
	 * Inner shift makes sure multiplication doesn't overflow
	 * for legitimate nsec values
	 */
	unsigned long cycles = (nsec * (ccount_freq >> 15)) >> 15;
	__delay(cycles);
}

#define ndelay(n) ndelay(n)

static inline void ndelay(unsigned long nsec)
{
	if (__builtin_constant_p(nsec) && nsec >= __MAX_NDELAY)
		__bad_ndelay();
	else
		__ndelay(nsec);
}

#endif

Youez - 2016 - github.com/yon3zu
LinuXploit