aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/sgi-xp/xpc.h')
-rw-r--r--drivers/misc/sgi-xp/xpc.h39
1 files changed, 9 insertions, 30 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
index defd0888118..2111723553b 100644
--- a/drivers/misc/sgi-xp/xpc.h
+++ b/drivers/misc/sgi-xp/xpc.h
@@ -151,26 +151,6 @@ struct xpc_vars_sn2 {
151#define XPC_V_VERSION _XPC_VERSION(3, 1) /* version 3.1 of the cross vars */ 151#define XPC_V_VERSION _XPC_VERSION(3, 1) /* version 3.1 of the cross vars */
152 152
153/* 153/*
154 * The following pertains to ia64-sn2 only.
155 *
156 * Memory for XPC's amo variables is allocated by the MSPEC driver. These
157 * pages are located in the lowest granule. The lowest granule uses 4k pages
158 * for cached references and an alternate TLB handler to never provide a
159 * cacheable mapping for the entire region. This will prevent speculative
160 * reading of cached copies of our lines from being issued which will cause
161 * a PI FSB Protocol error to be generated by the SHUB. For XPC, we need 64
162 * amo variables (based on XP_MAX_NPARTITIONS_SN2) to identify the senders of
163 * NOTIFY IRQs, 128 amo variables (based on XP_NASID_MASK_WORDS) to identify
164 * the senders of ACTIVATE IRQs, 1 amo variable to identify which remote
165 * partitions (i.e., XPCs) consider themselves currently engaged with the
166 * local XPC and 1 amo variable to request partition deactivation.
167 */
168#define XPC_NOTIFY_IRQ_AMOS 0
169#define XPC_ACTIVATE_IRQ_AMOS (XPC_NOTIFY_IRQ_AMOS + XP_MAX_NPARTITIONS_SN2)
170#define XPC_ENGAGED_PARTITIONS_AMO (XPC_ACTIVATE_IRQ_AMOS + XP_NASID_MASK_WORDS)
171#define XPC_DEACTIVATE_REQUEST_AMO (XPC_ENGAGED_PARTITIONS_AMO + 1)
172
173/*
174 * The following structure describes the per partition specific variables. 154 * The following structure describes the per partition specific variables.
175 * 155 *
176 * An array of these structures, one per partition, will be defined. As a 156 * An array of these structures, one per partition, will be defined. As a
@@ -214,9 +194,10 @@ struct xpc_vars_part_sn2 {
214#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars_sn2)) 194#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars_sn2))
215 195
216#define XPC_RP_PART_NASIDS(_rp) ((u64 *)((u8 *)(_rp) + XPC_RP_HEADER_SIZE)) 196#define XPC_RP_PART_NASIDS(_rp) ((u64 *)((u8 *)(_rp) + XPC_RP_HEADER_SIZE))
217#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + xp_nasid_mask_words) 197#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + xpc_nasid_mask_words)
218#define XPC_RP_VARS(_rp) ((struct xpc_vars_sn2 *)(XPC_RP_MACH_NASIDS(_rp) + \ 198#define XPC_RP_VARS(_rp) ((struct xpc_vars_sn2 *) \
219 xp_nasid_mask_words)) 199 (XPC_RP_MACH_NASIDS(_rp) + \
200 xpc_nasid_mask_words))
220 201
221/* 202/*
222 * Functions registered by add_timer() or called by kernel_thread() only 203 * Functions registered by add_timer() or called by kernel_thread() only
@@ -225,11 +206,11 @@ struct xpc_vars_part_sn2 {
225 * the passed argument. 206 * the passed argument.
226 */ 207 */
227#define XPC_PACK_ARGS(_arg1, _arg2) \ 208#define XPC_PACK_ARGS(_arg1, _arg2) \
228 ((((u64) _arg1) & 0xffffffff) | \ 209 ((((u64)_arg1) & 0xffffffff) | \
229 ((((u64) _arg2) & 0xffffffff) << 32)) 210 ((((u64)_arg2) & 0xffffffff) << 32))
230 211
231#define XPC_UNPACK_ARG1(_args) (((u64) _args) & 0xffffffff) 212#define XPC_UNPACK_ARG1(_args) (((u64)_args) & 0xffffffff)
232#define XPC_UNPACK_ARG2(_args) ((((u64) _args) >> 32) & 0xffffffff) 213#define XPC_UNPACK_ARG2(_args) ((((u64)_args) >> 32) & 0xffffffff)
233 214
234/* 215/*
235 * Define a Get/Put value pair (pointers) used with a message queue. 216 * Define a Get/Put value pair (pointers) used with a message queue.
@@ -710,12 +691,10 @@ extern void xpc_exit_uv(void);
710 691
711/* found in xpc_partition.c */ 692/* found in xpc_partition.c */
712extern int xpc_exiting; 693extern int xpc_exiting;
713extern int xp_nasid_mask_words; 694extern int xpc_nasid_mask_words;
714extern struct xpc_rsvd_page *xpc_rsvd_page; 695extern struct xpc_rsvd_page *xpc_rsvd_page;
715extern u64 *xpc_mach_nasids; 696extern u64 *xpc_mach_nasids;
716extern struct xpc_partition *xpc_partitions; 697extern struct xpc_partition *xpc_partitions;
717extern char *xpc_remote_copy_buffer;
718extern void *xpc_remote_copy_buffer_base;
719extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **); 698extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **);
720extern struct xpc_rsvd_page *xpc_setup_rsvd_page(void); 699extern struct xpc_rsvd_page *xpc_setup_rsvd_page(void);
721extern int xpc_identify_activate_IRQ_sender(void); 700extern int xpc_identify_activate_IRQ_sender(void);