aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc.h
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 01:34:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:49 -0400
commitbc63d387e4f5dbbe4ea0c5ade862c38073fd7fa3 (patch)
treeebeb9a381224a935fc50697902fcc38b9df47d90 /drivers/misc/sgi-xp/xpc.h
parent78ce1bbe446e9b46dcd6c1e60a4768448a8ce355 (diff)
sgi-xp: support runtime selection of xp_max_npartitions
Support runtime selection of the max number of partitions based on the hardware being run on. Signed-off-by: Dean Nelson <dcn@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/sgi-xp/xpc.h')
-rw-r--r--drivers/misc/sgi-xp/xpc.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
index 11ac267ed68f..0f2affd01df1 100644
--- a/drivers/misc/sgi-xp/xpc.h
+++ b/drivers/misc/sgi-xp/xpc.h
@@ -210,7 +210,7 @@ xpc_disallow_hb(short partid, struct xpc_vars *vars)
210 * the XPC running on the remote partition). 210 * the XPC running on the remote partition).
211 */ 211 */
212#define XPC_NOTIFY_IRQ_AMOS 0 212#define XPC_NOTIFY_IRQ_AMOS 0
213#define XPC_ACTIVATE_IRQ_AMOS (XPC_NOTIFY_IRQ_AMOS + XP_MAX_PARTITIONS) 213#define XPC_ACTIVATE_IRQ_AMOS (XPC_NOTIFY_IRQ_AMOS + XP_MAX_NPARTITIONS_SN2)
214#define XPC_ENGAGED_PARTITIONS_AMO (XPC_ACTIVATE_IRQ_AMOS + XP_NASID_MASK_WORDS) 214#define XPC_ENGAGED_PARTITIONS_AMO (XPC_ACTIVATE_IRQ_AMOS + XP_NASID_MASK_WORDS)
215#define XPC_DISENGAGE_REQUEST_AMO (XPC_ENGAGED_PARTITIONS_AMO + 1) 215#define XPC_DISENGAGE_REQUEST_AMO (XPC_ENGAGED_PARTITIONS_AMO + 1)
216 216
@@ -285,7 +285,7 @@ struct xpc_gp {
285}; 285};
286 286
287#define XPC_GP_SIZE \ 287#define XPC_GP_SIZE \
288 L1_CACHE_ALIGN(sizeof(struct xpc_gp) * XPC_NCHANNELS) 288 L1_CACHE_ALIGN(sizeof(struct xpc_gp) * XPC_MAX_NCHANNELS)
289 289
290/* 290/*
291 * Define a structure that contains arguments associated with opening and 291 * Define a structure that contains arguments associated with opening and
@@ -300,7 +300,8 @@ struct xpc_openclose_args {
300}; 300};
301 301
302#define XPC_OPENCLOSE_ARGS_SIZE \ 302#define XPC_OPENCLOSE_ARGS_SIZE \
303 L1_CACHE_ALIGN(sizeof(struct xpc_openclose_args) * XPC_NCHANNELS) 303 L1_CACHE_ALIGN(sizeof(struct xpc_openclose_args) * \
304 XPC_MAX_NCHANNELS)
304 305
305/* struct xpc_msg flags */ 306/* struct xpc_msg flags */
306 307
@@ -637,7 +638,7 @@ extern int xpc_exiting;
637extern struct xpc_vars *xpc_vars; 638extern struct xpc_vars *xpc_vars;
638extern struct xpc_rsvd_page *xpc_rsvd_page; 639extern struct xpc_rsvd_page *xpc_rsvd_page;
639extern struct xpc_vars_part *xpc_vars_part; 640extern struct xpc_vars_part *xpc_vars_part;
640extern struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1]; 641extern struct xpc_partition *xpc_partitions;
641extern char *xpc_remote_copy_buffer; 642extern char *xpc_remote_copy_buffer;
642extern void *xpc_remote_copy_buffer_base; 643extern void *xpc_remote_copy_buffer_base;
643extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **); 644extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **);
@@ -1104,13 +1105,14 @@ xpc_IPI_send_local_msgrequest(struct xpc_channel *ch)
1104} 1105}
1105 1106
1106/* 1107/*
1108>>> this block comment needs to be moved and re-written.
1107 * Memory for XPC's AMO variables is allocated by the MSPEC driver. These 1109 * Memory for XPC's AMO variables is allocated by the MSPEC driver. These
1108 * pages are located in the lowest granule. The lowest granule uses 4k pages 1110 * pages are located in the lowest granule. The lowest granule uses 4k pages
1109 * for cached references and an alternate TLB handler to never provide a 1111 * for cached references and an alternate TLB handler to never provide a
1110 * cacheable mapping for the entire region. This will prevent speculative 1112 * cacheable mapping for the entire region. This will prevent speculative
1111 * reading of cached copies of our lines from being issued which will cause 1113 * reading of cached copies of our lines from being issued which will cause
1112 * a PI FSB Protocol error to be generated by the SHUB. For XPC, we need 64 1114 * a PI FSB Protocol error to be generated by the SHUB. For XPC, we need 64
1113 * AMO variables (based on XP_MAX_PARTITIONS) for message notification and an 1115 * AMO variables (based on xp_max_npartitions) for message notification and an
1114 * additional 128 AMO variables (based on XP_NASID_MASK_WORDS) for partition 1116 * additional 128 AMO variables (based on XP_NASID_MASK_WORDS) for partition
1115 * activation and 2 AMO variables for partition deactivation. 1117 * activation and 2 AMO variables for partition deactivation.
1116 */ 1118 */