⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rw_mmr.h

📁 linux-2.4.29操作系统的源码
💻 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) 2002-2003 Silicon Graphics, Inc.  All Rights Reserved. */#ifndef _ASM_IA64_SN_RW_MMR_H#define _ASM_IA64_SN_RW_MMR_H/* * This file contains macros used to access MMR registers via * uncached physical addresses. * 	pio_phys_read_mmr  - read an MMR * 	pio_phys_write_mmr - write an MMR * 	pio_atomic_phys_write_mmrs - atomically write 2 MMRs with psr.ic=0 * 		(interrupt collection) * * Addresses passed to these routines should be uncached physical addresses * ie., 0x80000.... */extern inline longpio_phys_read_mmr(volatile long *mmr) {	long val;        asm volatile            ("mov r2=psr;;"             "rsm psr.i | psr.dt;;"             "srlz.i;;"             "ld8.acq %0=[%1];;"             "mov psr.l=r2;;"             "srlz.i;;"             : "=r"(val)             : "r"(mmr)	     : "r2");        return val;}extern inline voidpio_phys_write_mmr(volatile long *mmr, long val) {        asm volatile            ("mov r2=psr;;"             "rsm psr.i | psr.dt;;"             "srlz.i;;"             "st8.rel [%0]=%1;;"             "mov psr.l=r2;;"             "srlz.i;;"	     :: "r"(mmr), "r"(val)             : "r2", "memory");}            extern inline voidpio_atomic_phys_write_mmrs(volatile long *mmr1, long val1, volatile long *mmr2, long val2) {        asm volatile            ("mov r2=psr;;"             "rsm psr.i | psr.dt | psr.ic;;"             "srlz.i;;"             "st8.rel [%0]=%1;"             "st8.rel [%2]=%3;;"             "mov psr.l=r2;;"             "srlz.i;;"	     :: "r"(mmr1), "r"(val1), "r"(mmr2), "r"(val2)             : "r2", "memory");}            #endif /* _ASM_IA64_SN_RW_MMR_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -