2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * Copyright (C) 2002-2004 Silicon Graphics, Inc. All Rights Reserved.
8 #ifndef _ASM_IA64_SN_RW_MMR_H
9 #define _ASM_IA64_SN_RW_MMR_H
13 * This file contains macros used to access MMR registers via
14 * uncached physical addresses.
15 * pio_phys_read_mmr - read an MMR
16 * pio_phys_write_mmr - write an MMR
17 * pio_atomic_phys_write_mmrs - atomically write 1 or 2 MMRs with psr.ic=0
18 * Second MMR will be skipped if address is NULL
20 * Addresses passed to these routines should be uncached physical addresses
26 pio_phys_read_mmr(volatile long *mmr
)
31 "rsm psr.i | psr.dt;;"
45 pio_phys_write_mmr(volatile long *mmr
, long val
)
49 "rsm psr.i | psr.dt;;"
59 pio_atomic_phys_write_mmrs(volatile long *mmr1
, long val1
, volatile long *mmr2
, long val2
)
63 "rsm psr.i | psr.dt | psr.ic;;"
67 "(p9) st8.rel [%2]=%3;;"
70 :: "r"(mmr1
), "r"(val1
), "r"(mmr2
), "r"(val2
)
71 : "p9", "r2", "memory");
74 #endif /* _ASM_IA64_SN_RW_MMR_H */