aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sgi-xp/xp.h')
-rw-r--r--drivers/misc/sgi-xp/xp.h43
1 files changed, 2 insertions, 41 deletions
diff --git a/drivers/misc/sgi-xp/xp.h b/drivers/misc/sgi-xp/xp.h
index 51087e111887..c42196a1a6b7 100644
--- a/drivers/misc/sgi-xp/xp.h
+++ b/drivers/misc/sgi-xp/xp.h
@@ -17,7 +17,6 @@
17#include <linux/hardirq.h> 17#include <linux/hardirq.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19#include <asm/sn/types.h> 19#include <asm/sn/types.h>
20#include <asm/sn/bte.h>
21#ifdef CONFIG_IA64 20#ifdef CONFIG_IA64
22#include <asm/sn/arch.h> 21#include <asm/sn/arch.h>
23#endif 22#endif
@@ -72,46 +71,6 @@
72#define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64) 71#define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64)
73 72
74/* 73/*
75 * Wrapper for bte_copy() that should it return a failure status will retry
76 * the bte_copy() once in the hope that the failure was due to a temporary
77 * aberration (i.e., the link going down temporarily).
78 *
79 * src - physical address of the source of the transfer.
80 * vdst - virtual address of the destination of the transfer.
81 * len - number of bytes to transfer from source to destination.
82 * mode - see bte_copy() for definition.
83 * notification - see bte_copy() for definition.
84 *
85 * Note: xp_bte_copy() should never be called while holding a spinlock.
86 */
87static inline bte_result_t
88xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification)
89{
90 bte_result_t ret;
91 u64 pdst = ia64_tpa(vdst);
92
93 /*
94 * Ensure that the physically mapped memory is contiguous.
95 *
96 * We do this by ensuring that the memory is from region 7 only.
97 * If the need should arise to use memory from one of the other
98 * regions, then modify the BUG_ON() statement to ensure that the
99 * memory from that region is always physically contiguous.
100 */
101 BUG_ON(REGION_NUMBER(vdst) != RGN_KERNEL);
102
103 ret = bte_copy(src, pdst, len, mode, notification);
104 if ((ret != BTE_SUCCESS) && BTE_ERROR_RETRY(ret)) {
105 if (!in_interrupt())
106 cond_resched();
107
108 ret = bte_copy(src, pdst, len, mode, notification);
109 }
110
111 return ret;
112}
113
114/*
115 * XPC establishes channel connections between the local partition and any 74 * XPC establishes channel connections between the local partition and any
116 * other partition that is currently up. Over these channels, kernel-level 75 * other partition that is currently up. Over these channels, kernel-level
117 * `users' can communicate with their counterparts on the other partitions. 76 * `users' can communicate with their counterparts on the other partitions.
@@ -408,6 +367,8 @@ xpc_partid_to_nasids(short partid, void *nasids)
408 367
409extern short xp_max_npartitions; 368extern short xp_max_npartitions;
410 369
370extern enum xp_retval (*xp_remote_memcpy) (void *, const void *, size_t);
371
411extern u64 xp_nofault_PIOR_target; 372extern u64 xp_nofault_PIOR_target;
412extern int xp_nofault_PIOR(void *); 373extern int xp_nofault_PIOR(void *);
413extern int xp_error_PIOR(void); 374extern int xp_error_PIOR(void);