aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-xp/xpc.h
diff options
context:
space:
mode:
authorDean Nelson <dcn@sgi.com>2008-07-30 01:34:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-30 12:41:49 -0400
commite17d416b1bc947df68499863f13b401fb42b48f6 (patch)
treed0c766c93dce9acb27948022b1613347981fd9b3 /drivers/misc/sgi-xp/xpc.h
parent94bd2708d4a95d7da5a1c7c28a063eccd127fb69 (diff)
sgi-xp: isolate xpc_vars_part structure to sn2 only
Isolate the xpc_vars_part structure of XPC's reserved page to sn2 only. 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.h26
1 files changed, 9 insertions, 17 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
index 94b52bb8151e..e8c2a1629606 100644
--- a/drivers/misc/sgi-xp/xpc.h
+++ b/drivers/misc/sgi-xp/xpc.h
@@ -227,9 +227,9 @@ xpc_disallow_hb(short partid, struct xpc_vars *vars)
227 * itself from that partition. It is desirable that the size of this structure 227 * itself from that partition. It is desirable that the size of this structure
228 * evenly divides into a 128-byte cacheline, such that none of the entries in 228 * evenly divides into a 128-byte cacheline, such that none of the entries in
229 * this array crosses a 128-byte cacheline boundary. As it is now, each entry 229 * this array crosses a 128-byte cacheline boundary. As it is now, each entry
230 * occupies a 64-byte cacheline. 230 * occupies 64-bytes.
231 */ 231 */
232struct xpc_vars_part { 232struct xpc_vars_part_sn2 {
233 u64 magic; 233 u64 magic;
234 234
235 u64 openclose_args_pa; /* physical address of open and close args */ 235 u64 openclose_args_pa; /* physical address of open and close args */
@@ -265,8 +265,6 @@ struct xpc_vars_part {
265#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + xp_nasid_mask_words) 265#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + xp_nasid_mask_words)
266#define XPC_RP_VARS(_rp) ((struct xpc_vars *)(XPC_RP_MACH_NASIDS(_rp) + \ 266#define XPC_RP_VARS(_rp) ((struct xpc_vars *)(XPC_RP_MACH_NASIDS(_rp) + \
267 xp_nasid_mask_words)) 267 xp_nasid_mask_words))
268#define XPC_RP_VARS_PART(_rp) ((struct xpc_vars_part *) \
269 ((u8 *)XPC_RP_VARS(_rp) + XPC_RP_VARS_SIZE))
270 268
271/* 269/*
272 * Functions registered by add_timer() or called by kernel_thread() only 270 * Functions registered by add_timer() or called by kernel_thread() only
@@ -541,13 +539,6 @@ struct xpc_partition {
541 wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */ 539 wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */
542 atomic_t references; /* #of references to infrastructure */ 540 atomic_t references; /* #of references to infrastructure */
543 541
544 /*
545 * NONE OF THE PRECEDING FIELDS OF THIS STRUCTURE WILL BE CLEARED WHEN
546 * XPC SETS UP THE NECESSARY INFRASTRUCTURE TO SUPPORT CROSS PARTITION
547 * COMMUNICATION. ALL OF THE FOLLOWING FIELDS WILL BE CLEARED. (THE
548 * 'nchannels' FIELD MUST BE THE FIRST OF THE FIELDS TO BE CLEARED.)
549 */
550
551 u8 nchannels; /* #of defined channels supported */ 542 u8 nchannels; /* #of defined channels supported */
552 atomic_t nchannels_active; /* #of channels that are not DISCONNECTED */ 543 atomic_t nchannels_active; /* #of channels that are not DISCONNECTED */
553 atomic_t nchannels_engaged; /* #of channels engaged with remote part */ 544 atomic_t nchannels_engaged; /* #of channels engaged with remote part */
@@ -613,7 +604,7 @@ struct xpc_partition {
613 * dropped IPIs. These occur whenever an IPI amo write doesn't complete until 604 * dropped IPIs. These occur whenever an IPI amo write doesn't complete until
614 * after the IPI was received. 605 * after the IPI was received.
615 */ 606 */
616#define XPC_P_DROPPED_IPI_WAIT (0.25 * HZ) 607#define XPC_P_DROPPED_IPI_WAIT_INTERVAL (0.25 * HZ)
617 608
618/* number of seconds to wait for other partitions to disengage */ 609/* number of seconds to wait for other partitions to disengage */
619#define XPC_DISENGAGE_REQUEST_DEFAULT_TIMELIMIT 90 610#define XPC_DISENGAGE_REQUEST_DEFAULT_TIMELIMIT 90
@@ -637,13 +628,16 @@ extern void xpc_activate_partition(struct xpc_partition *);
637extern void xpc_activate_kthreads(struct xpc_channel *, int); 628extern void xpc_activate_kthreads(struct xpc_channel *, int);
638extern void xpc_create_kthreads(struct xpc_channel *, int, int); 629extern void xpc_create_kthreads(struct xpc_channel *, int, int);
639extern void xpc_disconnect_wait(int); 630extern void xpc_disconnect_wait(int);
640
641extern enum xp_retval (*xpc_rsvd_page_init) (struct xpc_rsvd_page *); 631extern enum xp_retval (*xpc_rsvd_page_init) (struct xpc_rsvd_page *);
632extern enum xp_retval (*xpc_make_first_contact) (struct xpc_partition *);
633extern u64 (*xpc_get_IPI_flags) (struct xpc_partition *);
634extern struct xpc_msg *(*xpc_get_deliverable_msg) (struct xpc_channel *);
635extern enum xp_retval (*xpc_setup_infrastructure) (struct xpc_partition *);
636extern void (*xpc_teardown_infrastructure) (struct xpc_partition *);
642 637
643/* found in xpc_sn2.c */ 638/* found in xpc_sn2.c */
644extern void xpc_init_sn2(void); 639extern void xpc_init_sn2(void);
645extern struct xpc_vars *xpc_vars; /*>>> eliminate from here */ 640extern struct xpc_vars *xpc_vars; /*>>> eliminate from here */
646extern struct xpc_vars_part *xpc_vars_part; /*>>> eliminate from here */
647 641
648/* found in xpc_uv.c */ 642/* found in xpc_uv.c */
649extern void xpc_init_uv(void); 643extern void xpc_init_uv(void);
@@ -670,6 +664,7 @@ extern void xpc_deactivate_partition(const int, struct xpc_partition *,
670extern enum xp_retval xpc_initiate_partid_to_nasids(short, void *); 664extern enum xp_retval xpc_initiate_partid_to_nasids(short, void *);
671 665
672/* found in xpc_channel.c */ 666/* found in xpc_channel.c */
667extern void *xpc_kzalloc_cacheline_aligned(size_t, gfp_t, void **);
673extern void xpc_initiate_connect(int); 668extern void xpc_initiate_connect(int);
674extern void xpc_initiate_disconnect(int); 669extern void xpc_initiate_disconnect(int);
675extern enum xp_retval xpc_initiate_allocate(short, int, u32, void **); 670extern enum xp_retval xpc_initiate_allocate(short, int, u32, void **);
@@ -677,8 +672,6 @@ extern enum xp_retval xpc_initiate_send(short, int, void *);
677extern enum xp_retval xpc_initiate_send_notify(short, int, void *, 672extern enum xp_retval xpc_initiate_send_notify(short, int, void *,
678 xpc_notify_func, void *); 673 xpc_notify_func, void *);
679extern void xpc_initiate_received(short, int, void *); 674extern void xpc_initiate_received(short, int, void *);
680extern enum xp_retval xpc_setup_infrastructure(struct xpc_partition *);
681extern enum xp_retval xpc_pull_remote_vars_part(struct xpc_partition *);
682extern void xpc_process_channel_activity(struct xpc_partition *); 675extern void xpc_process_channel_activity(struct xpc_partition *);
683extern void xpc_connected_callout(struct xpc_channel *); 676extern void xpc_connected_callout(struct xpc_channel *);
684extern void xpc_deliver_msg(struct xpc_channel *); 677extern void xpc_deliver_msg(struct xpc_channel *);
@@ -686,7 +679,6 @@ extern void xpc_disconnect_channel(const int, struct xpc_channel *,
686 enum xp_retval, unsigned long *); 679 enum xp_retval, unsigned long *);
687extern void xpc_disconnect_callout(struct xpc_channel *, enum xp_retval); 680extern void xpc_disconnect_callout(struct xpc_channel *, enum xp_retval);
688extern void xpc_partition_going_down(struct xpc_partition *, enum xp_retval); 681extern void xpc_partition_going_down(struct xpc_partition *, enum xp_retval);
689extern void xpc_teardown_infrastructure(struct xpc_partition *);
690 682
691static inline void 683static inline void
692xpc_wakeup_channel_mgr(struct xpc_partition *part) 684xpc_wakeup_channel_mgr(struct xpc_partition *part)