diff options
Diffstat (limited to 'drivers/misc/sgi-xp/xpc.h')
-rw-r--r-- | drivers/misc/sgi-xp/xpc.h | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h index 60388bed7701..94b52bb8151e 100644 --- a/drivers/misc/sgi-xp/xpc.h +++ b/drivers/misc/sgi-xp/xpc.h | |||
@@ -71,11 +71,11 @@ | |||
71 | * | 71 | * |
72 | * reserved page header | 72 | * reserved page header |
73 | * | 73 | * |
74 | * The first cacheline of the reserved page contains the header | 74 | * The first two 64-byte cachelines of the reserved page contain the |
75 | * (struct xpc_rsvd_page). Before SAL initialization has completed, | 75 | * header (struct xpc_rsvd_page). Before SAL initialization has completed, |
76 | * SAL has set up the following fields of the reserved page header: | 76 | * SAL has set up the following fields of the reserved page header: |
77 | * SAL_signature, SAL_version, partid, and nasids_size. The other | 77 | * SAL_signature, SAL_version, SAL_partid, and SAL_nasids_size. The |
78 | * fields are set up by XPC. (xpc_rsvd_page points to the local | 78 | * other fields are set up by XPC. (xpc_rsvd_page points to the local |
79 | * partition's reserved page.) | 79 | * partition's reserved page.) |
80 | * | 80 | * |
81 | * part_nasids mask | 81 | * part_nasids mask |
@@ -89,11 +89,11 @@ | |||
89 | * nasids. The part_nasids mask is located starting at the first cacheline | 89 | * nasids. The part_nasids mask is located starting at the first cacheline |
90 | * following the reserved page header. The mach_nasids mask follows right | 90 | * following the reserved page header. The mach_nasids mask follows right |
91 | * after the part_nasids mask. The size in bytes of each mask is reflected | 91 | * after the part_nasids mask. The size in bytes of each mask is reflected |
92 | * by the reserved page header field 'nasids_size'. (Local partition's | 92 | * by the reserved page header field 'SAL_nasids_size'. (Local partition's |
93 | * mask pointers are xpc_part_nasids and xpc_mach_nasids.) | 93 | * mask pointers are xpc_part_nasids and xpc_mach_nasids.) |
94 | * | 94 | * |
95 | * vars | 95 | * vars (ia64-sn2 only) |
96 | * vars part | 96 | * vars part (ia64-sn2 only) |
97 | * | 97 | * |
98 | * Immediately following the mach_nasids mask are the XPC variables | 98 | * Immediately following the mach_nasids mask are the XPC variables |
99 | * required by other partitions. First are those that are generic to all | 99 | * required by other partitions. First are those that are generic to all |
@@ -101,25 +101,31 @@ | |||
101 | * which are partition specific (vars part). These are setup by XPC. | 101 | * which are partition specific (vars part). These are setup by XPC. |
102 | * (Local partition's vars pointers are xpc_vars and xpc_vars_part.) | 102 | * (Local partition's vars pointers are xpc_vars and xpc_vars_part.) |
103 | * | 103 | * |
104 | * Note: Until vars_pa is set, the partition XPC code has not been initialized. | 104 | * Note: Until 'stamp' is set non-zero, the partition XPC code has not been |
105 | * initialized. | ||
105 | */ | 106 | */ |
106 | struct xpc_rsvd_page { | 107 | struct xpc_rsvd_page { |
107 | u64 SAL_signature; /* SAL: unique signature */ | 108 | u64 SAL_signature; /* SAL: unique signature */ |
108 | u64 SAL_version; /* SAL: version */ | 109 | u64 SAL_version; /* SAL: version */ |
109 | u8 partid; /* SAL: partition ID */ | 110 | short SAL_partid; /* SAL: partition ID */ |
111 | short max_npartitions; /* value of XPC_MAX_PARTITIONS */ | ||
110 | u8 version; | 112 | u8 version; |
111 | u8 pad1[6]; /* align to next u64 in cacheline */ | 113 | u8 pad1[3]; /* align to next u64 in 1st 64-byte cacheline */ |
112 | u64 vars_pa; /* physical address of struct xpc_vars */ | 114 | union { |
115 | u64 vars_pa; /* physical address of struct xpc_vars */ | ||
116 | u64 activate_mq_gpa; /* global phys address of activate_mq */ | ||
117 | } sn; | ||
113 | struct timespec stamp; /* time when reserved page was setup by XPC */ | 118 | struct timespec stamp; /* time when reserved page was setup by XPC */ |
114 | u64 pad2[9]; /* align to last u64 in cacheline */ | 119 | u64 pad2[9]; /* align to last u64 in 2nd 64-byte cacheline */ |
115 | u64 nasids_size; /* SAL: size of each nasid mask in bytes */ | 120 | u64 SAL_nasids_size; /* SAL: size of each nasid mask in bytes */ |
116 | }; | 121 | }; |
117 | 122 | ||
118 | #define XPC_RP_VERSION _XPC_VERSION(1, 1) /* version 1.1 of the reserved page */ | 123 | #define XPC_RP_VERSION _XPC_VERSION(2, 0) /* version 2.0 of the reserved page */ |
119 | 124 | ||
120 | #define XPC_SUPPORTS_RP_STAMP(_version) \ | 125 | #define XPC_SUPPORTS_RP_STAMP(_version) \ |
121 | (_version >= _XPC_VERSION(1, 1)) | 126 | (_version >= _XPC_VERSION(1, 1)) |
122 | 127 | ||
128 | #define ZERO_STAMP ((struct timespec){0, 0}) | ||
123 | /* | 129 | /* |
124 | * compare stamps - the return value is: | 130 | * compare stamps - the return value is: |
125 | * | 131 | * |
@@ -218,10 +224,10 @@ xpc_disallow_hb(short partid, struct xpc_vars *vars) | |||
218 | * | 224 | * |
219 | * An array of these structures, one per partition, will be defined. As a | 225 | * An array of these structures, one per partition, will be defined. As a |
220 | * partition becomes active XPC will copy the array entry corresponding to | 226 | * partition becomes active XPC will copy the array entry corresponding to |
221 | * itself from that partition. It is desirable that the size of this | 227 | * itself from that partition. It is desirable that the size of this structure |
222 | * structure evenly divide into a cacheline, such that none of the entries | 228 | * evenly divides into a 128-byte cacheline, such that none of the entries in |
223 | * in this array crosses a cacheline boundary. As it is now, each entry | 229 | * this array crosses a 128-byte cacheline boundary. As it is now, each entry |
224 | * occupies half a cacheline. | 230 | * occupies a 64-byte cacheline. |
225 | */ | 231 | */ |
226 | struct xpc_vars_part { | 232 | struct xpc_vars_part { |
227 | u64 magic; | 233 | u64 magic; |
@@ -632,16 +638,25 @@ extern void xpc_activate_kthreads(struct xpc_channel *, int); | |||
632 | extern void xpc_create_kthreads(struct xpc_channel *, int, int); | 638 | extern void xpc_create_kthreads(struct xpc_channel *, int, int); |
633 | extern void xpc_disconnect_wait(int); | 639 | extern void xpc_disconnect_wait(int); |
634 | 640 | ||
641 | extern enum xp_retval (*xpc_rsvd_page_init) (struct xpc_rsvd_page *); | ||
642 | |||
643 | /* found in xpc_sn2.c */ | ||
644 | extern void xpc_init_sn2(void); | ||
645 | extern struct xpc_vars *xpc_vars; /*>>> eliminate from here */ | ||
646 | extern struct xpc_vars_part *xpc_vars_part; /*>>> eliminate from here */ | ||
647 | |||
648 | /* found in xpc_uv.c */ | ||
649 | extern void xpc_init_uv(void); | ||
650 | |||
635 | /* found in xpc_partition.c */ | 651 | /* found in xpc_partition.c */ |
636 | extern int xpc_exiting; | 652 | extern int xpc_exiting; |
637 | extern struct xpc_vars *xpc_vars; | 653 | extern int xp_nasid_mask_words; |
638 | extern struct xpc_rsvd_page *xpc_rsvd_page; | 654 | extern struct xpc_rsvd_page *xpc_rsvd_page; |
639 | extern struct xpc_vars_part *xpc_vars_part; | ||
640 | extern struct xpc_partition *xpc_partitions; | 655 | extern struct xpc_partition *xpc_partitions; |
641 | extern char *xpc_remote_copy_buffer; | 656 | extern char *xpc_remote_copy_buffer; |
642 | extern void *xpc_remote_copy_buffer_base; | 657 | extern void *xpc_remote_copy_buffer_base; |
643 | extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **); | 658 | extern void *xpc_kmalloc_cacheline_aligned(size_t, gfp_t, void **); |
644 | extern struct xpc_rsvd_page *xpc_rsvd_page_init(void); | 659 | extern struct xpc_rsvd_page *xpc_setup_rsvd_page(void); |
645 | extern void xpc_allow_IPI_ops(void); | 660 | extern void xpc_allow_IPI_ops(void); |
646 | extern void xpc_restrict_IPI_ops(void); | 661 | extern void xpc_restrict_IPI_ops(void); |
647 | extern int xpc_identify_act_IRQ_sender(void); | 662 | extern int xpc_identify_act_IRQ_sender(void); |