403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.162.34
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-143/arch/mips/include/asm/mach-loongson64/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/src/linux-headers-5.15.0-143/arch/mips/include/asm/mach-loongson64/cpucfg-emul.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _ASM_MACH_LOONGSON64_CPUCFG_EMUL_H_
#define _ASM_MACH_LOONGSON64_CPUCFG_EMUL_H_

#include <asm/cpu-info.h>

#ifdef CONFIG_CPU_LOONGSON3_CPUCFG_EMULATION

#include <loongson_regs.h>

#define LOONGSON_FPREV_MASK 0x7

void loongson3_cpucfg_synthesize_data(struct cpuinfo_mips *c);

static inline bool loongson3_cpucfg_emulation_enabled(struct cpuinfo_mips *c)
{
	/* All supported cores have non-zero LOONGSON_CFG1 data. */
	return c->loongson3_cpucfg_data[0] != 0;
}

static inline u32 loongson3_cpucfg_read_synthesized(struct cpuinfo_mips *c,
	__u64 sel)
{
	switch (sel) {
	case LOONGSON_CFG0:
		return c->processor_id;
	case LOONGSON_CFG1:
	case LOONGSON_CFG2:
	case LOONGSON_CFG3:
		return c->loongson3_cpucfg_data[sel - 1];
	case LOONGSON_CFG4:
	case LOONGSON_CFG5:
		/* CPUCFG selects 4 and 5 are related to the input clock
		 * signal.
		 *
		 * Unimplemented for now.
		 */
		return 0;
	case LOONGSON_CFG6:
		/* CPUCFG select 6 is for the undocumented Safe Extension. */
		return 0;
	case LOONGSON_CFG7:
		/* CPUCFG select 7 is for the virtualization extension.
		 * We don't know if the two currently known features are
		 * supported on older cores according to the public
		 * documentation, so leave this at zero.
		 */
		return 0;
	}

	/*
	 * Return 0 for unrecognized CPUCFG selects, which is real hardware
	 * behavior observed on Loongson 3A R4.
	 */
	return 0;
}
#else
static inline void loongson3_cpucfg_synthesize_data(struct cpuinfo_mips *c)
{
}

static inline bool loongson3_cpucfg_emulation_enabled(struct cpuinfo_mips *c)
{
	return false;
}

static inline u32 loongson3_cpucfg_read_synthesized(struct cpuinfo_mips *c,
	__u64 sel)
{
	return 0;
}
#endif

#endif /* _ASM_MACH_LOONGSON64_CPUCFG_EMUL_H_ */

Youez - 2016 - github.com/yon3zu
LinuXploit