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.h34
1 files changed, 15 insertions, 19 deletions
diff --git a/drivers/misc/sgi-xp/xpc.h b/drivers/misc/sgi-xp/xpc.h
index e194d3140f68..96408fcf5a1e 100644
--- a/drivers/misc/sgi-xp/xpc.h
+++ b/drivers/misc/sgi-xp/xpc.h
@@ -13,17 +13,10 @@
13#ifndef _DRIVERS_MISC_SGIXP_XPC_H 13#ifndef _DRIVERS_MISC_SGIXP_XPC_H
14#define _DRIVERS_MISC_SGIXP_XPC_H 14#define _DRIVERS_MISC_SGIXP_XPC_H
15 15
16#include <linux/interrupt.h> 16#include <linux/wait.h>
17#include <linux/sysctl.h>
18#include <linux/device.h>
19#include <linux/mutex.h>
20#include <linux/completion.h> 17#include <linux/completion.h>
21#include <asm/pgtable.h> 18#include <linux/timer.h>
22#include <asm/processor.h> 19#include <linux/sched.h>
23#include <asm/sn/clksupport.h>
24#include <asm/sn/addrs.h>
25#include <asm/sn/mspec.h>
26#include <asm/sn/shub_mmr.h>
27#include "xp.h" 20#include "xp.h"
28 21
29/* 22/*
@@ -179,7 +172,8 @@ struct xpc_vars_part_sn2 {
179#define XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page)) 172#define XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page))
180#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars_sn2)) 173#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars_sn2))
181 174
182#define XPC_RP_PART_NASIDS(_rp) ((u64 *)((u8 *)(_rp) + XPC_RP_HEADER_SIZE)) 175#define XPC_RP_PART_NASIDS(_rp) ((unsigned long *)((u8 *)(_rp) + \
176 XPC_RP_HEADER_SIZE))
183#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + \ 177#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + \
184 xpc_nasid_mask_nlongs) 178 xpc_nasid_mask_nlongs)
185#define XPC_RP_VARS(_rp) ((struct xpc_vars_sn2 *) \ 179#define XPC_RP_VARS(_rp) ((struct xpc_vars_sn2 *) \
@@ -202,13 +196,13 @@ struct xpc_vars_part_sn2 {
202/* 196/*
203 * Define a Get/Put value pair (pointers) used with a message queue. 197 * Define a Get/Put value pair (pointers) used with a message queue.
204 */ 198 */
205struct xpc_gp { 199struct xpc_gp_sn2 {
206 s64 get; /* Get value */ 200 s64 get; /* Get value */
207 s64 put; /* Put value */ 201 s64 put; /* Put value */
208}; 202};
209 203
210#define XPC_GP_SIZE \ 204#define XPC_GP_SIZE \
211 L1_CACHE_ALIGN(sizeof(struct xpc_gp) * XPC_MAX_NCHANNELS) 205 L1_CACHE_ALIGN(sizeof(struct xpc_gp_sn2) * XPC_MAX_NCHANNELS)
212 206
213/* 207/*
214 * Define a structure that contains arguments associated with opening and 208 * Define a structure that contains arguments associated with opening and
@@ -340,10 +334,10 @@ struct xpc_channel_sn2 {
340 334
341 /* various flavors of local and remote Get/Put values */ 335 /* various flavors of local and remote Get/Put values */
342 336
343 struct xpc_gp *local_GP; /* local Get/Put values */ 337 struct xpc_gp_sn2 *local_GP; /* local Get/Put values */
344 struct xpc_gp remote_GP; /* remote Get/Put values */ 338 struct xpc_gp_sn2 remote_GP; /* remote Get/Put values */
345 struct xpc_gp w_local_GP; /* working local Get/Put values */ 339 struct xpc_gp_sn2 w_local_GP; /* working local Get/Put values */
346 struct xpc_gp w_remote_GP; /* working remote Get/Put values */ 340 struct xpc_gp_sn2 w_remote_GP; /* working remote Get/Put values */
347 s64 next_msg_to_pull; /* Put value of next msg to pull */ 341 s64 next_msg_to_pull; /* Put value of next msg to pull */
348 342
349 struct mutex msg_to_pull_mutex; /* next msg to pull serialization */ 343 struct mutex msg_to_pull_mutex; /* next msg to pull serialization */
@@ -506,9 +500,9 @@ struct xpc_partition_sn2 {
506 u8 remote_vars_version; /* version# of partition's vars */ 500 u8 remote_vars_version; /* version# of partition's vars */
507 501
508 void *local_GPs_base; /* base address of kmalloc'd space */ 502 void *local_GPs_base; /* base address of kmalloc'd space */
509 struct xpc_gp *local_GPs; /* local Get/Put values */ 503 struct xpc_gp_sn2 *local_GPs; /* local Get/Put values */
510 void *remote_GPs_base; /* base address of kmalloc'd space */ 504 void *remote_GPs_base; /* base address of kmalloc'd space */
511 struct xpc_gp *remote_GPs; /* copy of remote partition's local */ 505 struct xpc_gp_sn2 *remote_GPs; /* copy of remote partition's local */
512 /* Get/Put values */ 506 /* Get/Put values */
513 u64 remote_GPs_pa; /* phys address of remote partition's local */ 507 u64 remote_GPs_pa; /* phys address of remote partition's local */
514 /* Get/Put values */ 508 /* Get/Put values */
@@ -629,6 +623,8 @@ extern void xpc_activate_partition(struct xpc_partition *);
629extern void xpc_activate_kthreads(struct xpc_channel *, int); 623extern void xpc_activate_kthreads(struct xpc_channel *, int);
630extern void xpc_create_kthreads(struct xpc_channel *, int, int); 624extern void xpc_create_kthreads(struct xpc_channel *, int, int);
631extern void xpc_disconnect_wait(int); 625extern void xpc_disconnect_wait(int);
626extern enum xp_retval (*xpc_get_partition_rsvd_page_pa) (u64, u64 *, u64 *,
627 size_t *);
632extern enum xp_retval (*xpc_rsvd_page_init) (struct xpc_rsvd_page *); 628extern enum xp_retval (*xpc_rsvd_page_init) (struct xpc_rsvd_page *);
633extern void (*xpc_heartbeat_init) (void); 629extern void (*xpc_heartbeat_init) (void);
634extern void (*xpc_heartbeat_exit) (void); 630extern void (*xpc_heartbeat_exit) (void);