-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IA64-SGI] - Eliminate SN pio_phys_xxx macros. Move to assembly
Rewrite the SN pio_phys_xxx macros in assembly language. This avoids issues with the Intel icc compiler. Function call overhead is not an issue - the functions reference PIOs and take 100's nsec to complete. In addition, the functions should likely be in assembly language anyway - they reference memory using physical addressing mode. One function executes with psr.ic disabled. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
- Loading branch information
Jack Steiner
authored and
Tony Luck
committed
Feb 7, 2006
1 parent
412e6a3
commit dcc1dd2
Showing
3 changed files
with
78 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* 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) 2000-2005 Silicon Graphics, Inc. All rights reserved. | ||
* | ||
* 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 1 or 2 MMRs with psr.ic=0 | ||
* Second MMR will be skipped if address is NULL | ||
* | ||
* Addresses passed to these routines should be uncached physical addresses | ||
* ie., 0x80000.... | ||
*/ | ||
|
||
|
||
|
||
#include <asm/asmmacro.h> | ||
#include <asm/page.h> | ||
|
||
GLOBAL_ENTRY(pio_phys_read_mmr) | ||
.prologue | ||
.regstk 1,0,0,0 | ||
.body | ||
mov r2=psr | ||
rsm psr.i | psr.dt | ||
;; | ||
srlz.d | ||
ld8.acq r8=[r32] | ||
;; | ||
mov psr.l=r2;; | ||
srlz.d | ||
br.ret.sptk.many rp | ||
END(pio_phys_read_mmr) | ||
|
||
GLOBAL_ENTRY(pio_phys_write_mmr) | ||
.prologue | ||
.regstk 2,0,0,0 | ||
.body | ||
mov r2=psr | ||
rsm psr.i | psr.dt | ||
;; | ||
srlz.d | ||
st8.rel [r32]=r33 | ||
;; | ||
mov psr.l=r2;; | ||
srlz.d | ||
br.ret.sptk.many rp | ||
END(pio_phys_write_mmr) | ||
|
||
GLOBAL_ENTRY(pio_atomic_phys_write_mmrs) | ||
.prologue | ||
.regstk 4,0,0,0 | ||
.body | ||
mov r2=psr | ||
cmp.ne p9,p0=r34,r0; | ||
rsm psr.i | psr.dt | psr.ic | ||
;; | ||
srlz.d | ||
st8.rel [r32]=r33 | ||
(p9) st8.rel [r34]=r35 | ||
;; | ||
mov psr.l=r2;; | ||
srlz.d | ||
br.ret.sptk.many rp | ||
END(pio_atomic_phys_write_mmrs) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters