diff options
author | Dean Nelson <dcn@sgi.com> | 2008-04-22 15:46:56 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-04-22 18:08:17 -0400 |
commit | 45d9ca492e4bd1522d1b5bd125c2908f1cee3d4a (patch) | |
tree | dfbe831a5f71159855c3a252856664411ca53f8a /drivers/misc/sgi-xp/xp_nofault.S | |
parent | 9010eff0eadfe4eb60c3f0c71573f0fc505c31e3 (diff) |
[IA64] move XP and XPC to drivers/misc/sgi-xp
Move XPC and XPNET from arch/ia64/sn/kernel to drivers/misc/sgi-xp.
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/misc/sgi-xp/xp_nofault.S')
-rw-r--r-- | drivers/misc/sgi-xp/xp_nofault.S | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/misc/sgi-xp/xp_nofault.S b/drivers/misc/sgi-xp/xp_nofault.S new file mode 100644 index 00000000000..c13a709c4db --- /dev/null +++ b/drivers/misc/sgi-xp/xp_nofault.S | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
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 | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (c) 2004-2008 Silicon Graphics, Inc. All Rights Reserved. | ||
7 | */ | ||
8 | |||
9 | |||
10 | /* | ||
11 | * The xp_nofault_PIOR function takes a pointer to a remote PIO register | ||
12 | * and attempts to load and consume a value from it. This function | ||
13 | * will be registered as a nofault code block. In the event that the | ||
14 | * PIO read fails, the MCA handler will force the error to look | ||
15 | * corrected and vector to the xp_error_PIOR which will return an error. | ||
16 | * | ||
17 | * The definition of "consumption" and the time it takes for an MCA | ||
18 | * to surface is processor implementation specific. This code | ||
19 | * is sufficient on Itanium through the Montvale processor family. | ||
20 | * It may need to be adjusted for future processor implementations. | ||
21 | * | ||
22 | * extern int xp_nofault_PIOR(void *remote_register); | ||
23 | */ | ||
24 | |||
25 | .global xp_nofault_PIOR | ||
26 | xp_nofault_PIOR: | ||
27 | mov r8=r0 // Stage a success return value | ||
28 | ld8.acq r9=[r32];; // PIO Read the specified register | ||
29 | adds r9=1,r9;; // Add to force consumption | ||
30 | srlz.i;; // Allow time for MCA to surface | ||
31 | br.ret.sptk.many b0;; // Return success | ||
32 | |||
33 | .global xp_error_PIOR | ||
34 | xp_error_PIOR: | ||
35 | mov r8=1 // Return value of 1 | ||
36 | br.ret.sptk.many b0;; // Return failure | ||