xref: /kernel/linux/linux-6.6/drivers/misc/sgi-xp/xp.h (revision 62306a36)
162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
362306a36Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
462306a36Sopenharmony_ci * for more details.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * (C) Copyright 2020 Hewlett Packard Enterprise Development LP
762306a36Sopenharmony_ci * Copyright (C) 2004-2008 Silicon Graphics, Inc. All rights reserved.
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci/*
1162306a36Sopenharmony_ci * External Cross Partition (XP) structures and defines.
1262306a36Sopenharmony_ci */
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#ifndef _DRIVERS_MISC_SGIXP_XP_H
1562306a36Sopenharmony_ci#define _DRIVERS_MISC_SGIXP_XP_H
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#include <linux/mutex.h>
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#if defined CONFIG_X86_UV || defined CONFIG_IA64_SGI_UV
2062306a36Sopenharmony_ci#include <asm/uv/uv.h>
2162306a36Sopenharmony_ci#endif
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#ifdef USE_DBUG_ON
2462306a36Sopenharmony_ci#define DBUG_ON(condition)	BUG_ON(condition)
2562306a36Sopenharmony_ci#else
2662306a36Sopenharmony_ci#define DBUG_ON(condition)
2762306a36Sopenharmony_ci#endif
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci/*
3062306a36Sopenharmony_ci * Define the maximum number of partitions the system can possibly support.
3162306a36Sopenharmony_ci * It is based on the maximum number of hardware partitionable regions. The
3262306a36Sopenharmony_ci * term 'region' in this context refers to the minimum number of nodes that
3362306a36Sopenharmony_ci * can comprise an access protection grouping. The access protection is in
3462306a36Sopenharmony_ci * regards to memory, IPI and IOI.
3562306a36Sopenharmony_ci *
3662306a36Sopenharmony_ci * The maximum number of hardware partitionable regions is equal to the
3762306a36Sopenharmony_ci * maximum number of nodes in the entire system divided by the minimum number
3862306a36Sopenharmony_ci * of nodes that comprise an access protection grouping.
3962306a36Sopenharmony_ci */
4062306a36Sopenharmony_ci#define XP_MAX_NPARTITIONS_SN2	64
4162306a36Sopenharmony_ci#define XP_MAX_NPARTITIONS_UV	256
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci/*
4462306a36Sopenharmony_ci * XPC establishes channel connections between the local partition and any
4562306a36Sopenharmony_ci * other partition that is currently up. Over these channels, kernel-level
4662306a36Sopenharmony_ci * `users' can communicate with their counterparts on the other partitions.
4762306a36Sopenharmony_ci *
4862306a36Sopenharmony_ci * If the need for additional channels arises, one can simply increase
4962306a36Sopenharmony_ci * XPC_MAX_NCHANNELS accordingly. If the day should come where that number
5062306a36Sopenharmony_ci * exceeds the absolute MAXIMUM number of channels possible (eight), then one
5162306a36Sopenharmony_ci * will need to make changes to the XPC code to accommodate for this.
5262306a36Sopenharmony_ci *
5362306a36Sopenharmony_ci * The absolute maximum number of channels possible is limited to eight for
5462306a36Sopenharmony_ci * performance reasons on sn2 hardware. The internal cross partition structures
5562306a36Sopenharmony_ci * require sixteen bytes per channel, and eight allows all of this
5662306a36Sopenharmony_ci * interface-shared info to fit in one 128-byte cacheline.
5762306a36Sopenharmony_ci */
5862306a36Sopenharmony_ci#define XPC_MEM_CHANNEL		0	/* memory channel number */
5962306a36Sopenharmony_ci#define	XPC_NET_CHANNEL		1	/* network channel number */
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci#define XPC_MAX_NCHANNELS	2	/* max #of channels allowed */
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci#if XPC_MAX_NCHANNELS > 8
6462306a36Sopenharmony_ci#error	XPC_MAX_NCHANNELS exceeds absolute MAXIMUM possible.
6562306a36Sopenharmony_ci#endif
6662306a36Sopenharmony_ci
6762306a36Sopenharmony_ci/*
6862306a36Sopenharmony_ci * Define macro, XPC_MSG_SIZE(), is provided for the user
6962306a36Sopenharmony_ci * that wants to fit as many msg entries as possible in a given memory size
7062306a36Sopenharmony_ci * (e.g. a memory page).
7162306a36Sopenharmony_ci */
7262306a36Sopenharmony_ci#define XPC_MSG_MAX_SIZE	128
7362306a36Sopenharmony_ci#define XPC_MSG_HDR_MAX_SIZE	16
7462306a36Sopenharmony_ci#define XPC_MSG_PAYLOAD_MAX_SIZE (XPC_MSG_MAX_SIZE - XPC_MSG_HDR_MAX_SIZE)
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci#define XPC_MSG_SIZE(_payload_size) \
7762306a36Sopenharmony_ci				ALIGN(XPC_MSG_HDR_MAX_SIZE + (_payload_size), \
7862306a36Sopenharmony_ci				      is_uv_system() ? 64 : 128)
7962306a36Sopenharmony_ci
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci/*
8262306a36Sopenharmony_ci * Define the return values and values passed to user's callout functions.
8362306a36Sopenharmony_ci * (It is important to add new value codes at the end just preceding
8462306a36Sopenharmony_ci * xpUnknownReason, which must have the highest numerical value.)
8562306a36Sopenharmony_ci */
8662306a36Sopenharmony_cienum xp_retval {
8762306a36Sopenharmony_ci	xpSuccess = 0,
8862306a36Sopenharmony_ci
8962306a36Sopenharmony_ci	xpNotConnected,		/*  1: channel is not connected */
9062306a36Sopenharmony_ci	xpConnected,		/*  2: channel connected (opened) */
9162306a36Sopenharmony_ci	xpRETIRED1,		/*  3: (formerly xpDisconnected) */
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci	xpMsgReceived,		/*  4: message received */
9462306a36Sopenharmony_ci	xpMsgDelivered,		/*  5: message delivered and acknowledged */
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci	xpRETIRED2,		/*  6: (formerly xpTransferFailed) */
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci	xpNoWait,		/*  7: operation would require wait */
9962306a36Sopenharmony_ci	xpRetry,		/*  8: retry operation */
10062306a36Sopenharmony_ci	xpTimeout,		/*  9: timeout in xpc_allocate_msg_wait() */
10162306a36Sopenharmony_ci	xpInterrupted,		/* 10: interrupted wait */
10262306a36Sopenharmony_ci
10362306a36Sopenharmony_ci	xpUnequalMsgSizes,	/* 11: message size disparity between sides */
10462306a36Sopenharmony_ci	xpInvalidAddress,	/* 12: invalid address */
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci	xpNoMemory,		/* 13: no memory available for XPC structures */
10762306a36Sopenharmony_ci	xpLackOfResources,	/* 14: insufficient resources for operation */
10862306a36Sopenharmony_ci	xpUnregistered,		/* 15: channel is not registered */
10962306a36Sopenharmony_ci	xpAlreadyRegistered,	/* 16: channel is already registered */
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci	xpPartitionDown,	/* 17: remote partition is down */
11262306a36Sopenharmony_ci	xpNotLoaded,		/* 18: XPC module is not loaded */
11362306a36Sopenharmony_ci	xpUnloading,		/* 19: this side is unloading XPC module */
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci	xpBadMagic,		/* 20: XPC MAGIC string not found */
11662306a36Sopenharmony_ci
11762306a36Sopenharmony_ci	xpReactivating,		/* 21: remote partition was reactivated */
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci	xpUnregistering,	/* 22: this side is unregistering channel */
12062306a36Sopenharmony_ci	xpOtherUnregistering,	/* 23: other side is unregistering channel */
12162306a36Sopenharmony_ci
12262306a36Sopenharmony_ci	xpCloneKThread,		/* 24: cloning kernel thread */
12362306a36Sopenharmony_ci	xpCloneKThreadFailed,	/* 25: cloning kernel thread failed */
12462306a36Sopenharmony_ci
12562306a36Sopenharmony_ci	xpNoHeartbeat,		/* 26: remote partition has no heartbeat */
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ci	xpPioReadError,		/* 27: PIO read error */
12862306a36Sopenharmony_ci	xpPhysAddrRegFailed,	/* 28: registration of phys addr range failed */
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ci	xpRETIRED3,		/* 29: (formerly xpBteDirectoryError) */
13162306a36Sopenharmony_ci	xpRETIRED4,		/* 30: (formerly xpBtePoisonError) */
13262306a36Sopenharmony_ci	xpRETIRED5,		/* 31: (formerly xpBteWriteError) */
13362306a36Sopenharmony_ci	xpRETIRED6,		/* 32: (formerly xpBteAccessError) */
13462306a36Sopenharmony_ci	xpRETIRED7,		/* 33: (formerly xpBtePWriteError) */
13562306a36Sopenharmony_ci	xpRETIRED8,		/* 34: (formerly xpBtePReadError) */
13662306a36Sopenharmony_ci	xpRETIRED9,		/* 35: (formerly xpBteTimeOutError) */
13762306a36Sopenharmony_ci	xpRETIRED10,		/* 36: (formerly xpBteXtalkError) */
13862306a36Sopenharmony_ci	xpRETIRED11,		/* 37: (formerly xpBteNotAvailable) */
13962306a36Sopenharmony_ci	xpRETIRED12,		/* 38: (formerly xpBteUnmappedError) */
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci	xpBadVersion,		/* 39: bad version number */
14262306a36Sopenharmony_ci	xpVarsNotSet,		/* 40: the XPC variables are not set up */
14362306a36Sopenharmony_ci	xpNoRsvdPageAddr,	/* 41: unable to get rsvd page's phys addr */
14462306a36Sopenharmony_ci	xpInvalidPartid,	/* 42: invalid partition ID */
14562306a36Sopenharmony_ci	xpLocalPartid,		/* 43: local partition ID */
14662306a36Sopenharmony_ci
14762306a36Sopenharmony_ci	xpOtherGoingDown,	/* 44: other side going down, reason unknown */
14862306a36Sopenharmony_ci	xpSystemGoingDown,	/* 45: system is going down, reason unknown */
14962306a36Sopenharmony_ci	xpSystemHalt,		/* 46: system is being halted */
15062306a36Sopenharmony_ci	xpSystemReboot,		/* 47: system is being rebooted */
15162306a36Sopenharmony_ci	xpSystemPoweroff,	/* 48: system is being powered off */
15262306a36Sopenharmony_ci
15362306a36Sopenharmony_ci	xpDisconnecting,	/* 49: channel disconnecting (closing) */
15462306a36Sopenharmony_ci
15562306a36Sopenharmony_ci	xpOpenCloseError,	/* 50: channel open/close protocol error */
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ci	xpDisconnected,		/* 51: channel disconnected (closed) */
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci	xpBteCopyError,		/* 52: bte_copy() returned error */
16062306a36Sopenharmony_ci	xpSalError,		/* 53: sn SAL error */
16162306a36Sopenharmony_ci	xpRsvdPageNotSet,	/* 54: the reserved page is not set up */
16262306a36Sopenharmony_ci	xpPayloadTooBig,	/* 55: payload too large for message slot */
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_ci	xpUnsupported,		/* 56: unsupported functionality or resource */
16562306a36Sopenharmony_ci	xpNeedMoreInfo,		/* 57: more info is needed by SAL */
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ci	xpGruCopyError,		/* 58: gru_copy_gru() returned error */
16862306a36Sopenharmony_ci	xpGruSendMqError,	/* 59: gru send message queue related error */
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ci	xpBadChannelNumber,	/* 60: invalid channel number */
17162306a36Sopenharmony_ci	xpBadMsgType,		/* 61: invalid message type */
17262306a36Sopenharmony_ci	xpBiosError,		/* 62: BIOS error */
17362306a36Sopenharmony_ci
17462306a36Sopenharmony_ci	xpUnknownReason		/* 63: unknown reason - must be last in enum */
17562306a36Sopenharmony_ci};
17662306a36Sopenharmony_ci
17762306a36Sopenharmony_ci/*
17862306a36Sopenharmony_ci * Define the callout function type used by XPC to update the user on
17962306a36Sopenharmony_ci * connection activity and state changes via the user function registered
18062306a36Sopenharmony_ci * by xpc_connect().
18162306a36Sopenharmony_ci *
18262306a36Sopenharmony_ci * Arguments:
18362306a36Sopenharmony_ci *
18462306a36Sopenharmony_ci *	reason - reason code.
18562306a36Sopenharmony_ci *	partid - partition ID associated with condition.
18662306a36Sopenharmony_ci *	ch_number - channel # associated with condition.
18762306a36Sopenharmony_ci *	data - pointer to optional data.
18862306a36Sopenharmony_ci *	key - pointer to optional user-defined value provided as the "key"
18962306a36Sopenharmony_ci *	      argument to xpc_connect().
19062306a36Sopenharmony_ci *
19162306a36Sopenharmony_ci * A reason code of xpConnected indicates that a connection has been
19262306a36Sopenharmony_ci * established to the specified partition on the specified channel. The data
19362306a36Sopenharmony_ci * argument indicates the max number of entries allowed in the message queue.
19462306a36Sopenharmony_ci *
19562306a36Sopenharmony_ci * A reason code of xpMsgReceived indicates that a XPC message arrived from
19662306a36Sopenharmony_ci * the specified partition on the specified channel. The data argument
19762306a36Sopenharmony_ci * specifies the address of the message's payload. The user must call
19862306a36Sopenharmony_ci * xpc_received() when finished with the payload.
19962306a36Sopenharmony_ci *
20062306a36Sopenharmony_ci * All other reason codes indicate failure. The data argmument is NULL.
20162306a36Sopenharmony_ci * When a failure reason code is received, one can assume that the channel
20262306a36Sopenharmony_ci * is not connected.
20362306a36Sopenharmony_ci */
20462306a36Sopenharmony_citypedef void (*xpc_channel_func) (enum xp_retval reason, short partid,
20562306a36Sopenharmony_ci				  int ch_number, void *data, void *key);
20662306a36Sopenharmony_ci
20762306a36Sopenharmony_ci/*
20862306a36Sopenharmony_ci * Define the callout function type used by XPC to notify the user of
20962306a36Sopenharmony_ci * messages received and delivered via the user function registered by
21062306a36Sopenharmony_ci * xpc_send_notify().
21162306a36Sopenharmony_ci *
21262306a36Sopenharmony_ci * Arguments:
21362306a36Sopenharmony_ci *
21462306a36Sopenharmony_ci *	reason - reason code.
21562306a36Sopenharmony_ci *	partid - partition ID associated with condition.
21662306a36Sopenharmony_ci *	ch_number - channel # associated with condition.
21762306a36Sopenharmony_ci *	key - pointer to optional user-defined value provided as the "key"
21862306a36Sopenharmony_ci *	      argument to xpc_send_notify().
21962306a36Sopenharmony_ci *
22062306a36Sopenharmony_ci * A reason code of xpMsgDelivered indicates that the message was delivered
22162306a36Sopenharmony_ci * to the intended recipient and that they have acknowledged its receipt by
22262306a36Sopenharmony_ci * calling xpc_received().
22362306a36Sopenharmony_ci *
22462306a36Sopenharmony_ci * All other reason codes indicate failure.
22562306a36Sopenharmony_ci *
22662306a36Sopenharmony_ci * NOTE: The user defined function must be callable by an interrupt handler
22762306a36Sopenharmony_ci *       and thus cannot block.
22862306a36Sopenharmony_ci */
22962306a36Sopenharmony_citypedef void (*xpc_notify_func) (enum xp_retval reason, short partid,
23062306a36Sopenharmony_ci				 int ch_number, void *key);
23162306a36Sopenharmony_ci
23262306a36Sopenharmony_ci/*
23362306a36Sopenharmony_ci * The following is a registration entry. There is a global array of these,
23462306a36Sopenharmony_ci * one per channel. It is used to record the connection registration made
23562306a36Sopenharmony_ci * by the users of XPC. As long as a registration entry exists, for any
23662306a36Sopenharmony_ci * partition that comes up, XPC will attempt to establish a connection on
23762306a36Sopenharmony_ci * that channel. Notification that a connection has been made will occur via
23862306a36Sopenharmony_ci * the xpc_channel_func function.
23962306a36Sopenharmony_ci *
24062306a36Sopenharmony_ci * The 'func' field points to the function to call when aynchronous
24162306a36Sopenharmony_ci * notification is required for such events as: a connection established/lost,
24262306a36Sopenharmony_ci * or an incoming message received, or an error condition encountered. A
24362306a36Sopenharmony_ci * non-NULL 'func' field indicates that there is an active registration for
24462306a36Sopenharmony_ci * the channel.
24562306a36Sopenharmony_ci */
24662306a36Sopenharmony_cistruct xpc_registration {
24762306a36Sopenharmony_ci	struct mutex mutex;
24862306a36Sopenharmony_ci	xpc_channel_func func;	/* function to call */
24962306a36Sopenharmony_ci	void *key;		/* pointer to user's key */
25062306a36Sopenharmony_ci	u16 nentries;		/* #of msg entries in local msg queue */
25162306a36Sopenharmony_ci	u16 entry_size;		/* message queue's message entry size */
25262306a36Sopenharmony_ci	u32 assigned_limit;	/* limit on #of assigned kthreads */
25362306a36Sopenharmony_ci	u32 idle_limit;		/* limit on #of idle kthreads */
25462306a36Sopenharmony_ci} ____cacheline_aligned;
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ci#define XPC_CHANNEL_REGISTERED(_c)	(xpc_registrations[_c].func != NULL)
25762306a36Sopenharmony_ci
25862306a36Sopenharmony_ci/* the following are valid xpc_send() or xpc_send_notify() flags */
25962306a36Sopenharmony_ci#define XPC_WAIT	0	/* wait flag */
26062306a36Sopenharmony_ci#define XPC_NOWAIT	1	/* no wait flag */
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_cistruct xpc_interface {
26362306a36Sopenharmony_ci	void (*connect) (int);
26462306a36Sopenharmony_ci	void (*disconnect) (int);
26562306a36Sopenharmony_ci	enum xp_retval (*send) (short, int, u32, void *, u16);
26662306a36Sopenharmony_ci	enum xp_retval (*send_notify) (short, int, u32, void *, u16,
26762306a36Sopenharmony_ci					xpc_notify_func, void *);
26862306a36Sopenharmony_ci	void (*received) (short, int, void *);
26962306a36Sopenharmony_ci	enum xp_retval (*partid_to_nasids) (short, void *);
27062306a36Sopenharmony_ci};
27162306a36Sopenharmony_ci
27262306a36Sopenharmony_ciextern struct xpc_interface xpc_interface;
27362306a36Sopenharmony_ci
27462306a36Sopenharmony_ciextern void xpc_set_interface(void (*)(int),
27562306a36Sopenharmony_ci			      void (*)(int),
27662306a36Sopenharmony_ci			      enum xp_retval (*)(short, int, u32, void *, u16),
27762306a36Sopenharmony_ci			      enum xp_retval (*)(short, int, u32, void *, u16,
27862306a36Sopenharmony_ci						 xpc_notify_func, void *),
27962306a36Sopenharmony_ci			      void (*)(short, int, void *),
28062306a36Sopenharmony_ci			      enum xp_retval (*)(short, void *));
28162306a36Sopenharmony_ciextern void xpc_clear_interface(void);
28262306a36Sopenharmony_ci
28362306a36Sopenharmony_ciextern enum xp_retval xpc_connect(int, xpc_channel_func, void *, u16,
28462306a36Sopenharmony_ci				   u16, u32, u32);
28562306a36Sopenharmony_ciextern void xpc_disconnect(int);
28662306a36Sopenharmony_ci
28762306a36Sopenharmony_cistatic inline enum xp_retval
28862306a36Sopenharmony_cixpc_send(short partid, int ch_number, u32 flags, void *payload,
28962306a36Sopenharmony_ci	 u16 payload_size)
29062306a36Sopenharmony_ci{
29162306a36Sopenharmony_ci	if (!xpc_interface.send)
29262306a36Sopenharmony_ci		return xpNotLoaded;
29362306a36Sopenharmony_ci
29462306a36Sopenharmony_ci	return xpc_interface.send(partid, ch_number, flags, payload,
29562306a36Sopenharmony_ci				  payload_size);
29662306a36Sopenharmony_ci}
29762306a36Sopenharmony_ci
29862306a36Sopenharmony_cistatic inline enum xp_retval
29962306a36Sopenharmony_cixpc_send_notify(short partid, int ch_number, u32 flags, void *payload,
30062306a36Sopenharmony_ci		u16 payload_size, xpc_notify_func func, void *key)
30162306a36Sopenharmony_ci{
30262306a36Sopenharmony_ci	if (!xpc_interface.send_notify)
30362306a36Sopenharmony_ci		return xpNotLoaded;
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_ci	return xpc_interface.send_notify(partid, ch_number, flags, payload,
30662306a36Sopenharmony_ci					 payload_size, func, key);
30762306a36Sopenharmony_ci}
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_cistatic inline void
31062306a36Sopenharmony_cixpc_received(short partid, int ch_number, void *payload)
31162306a36Sopenharmony_ci{
31262306a36Sopenharmony_ci	if (xpc_interface.received)
31362306a36Sopenharmony_ci		xpc_interface.received(partid, ch_number, payload);
31462306a36Sopenharmony_ci}
31562306a36Sopenharmony_ci
31662306a36Sopenharmony_cistatic inline enum xp_retval
31762306a36Sopenharmony_cixpc_partid_to_nasids(short partid, void *nasids)
31862306a36Sopenharmony_ci{
31962306a36Sopenharmony_ci	if (!xpc_interface.partid_to_nasids)
32062306a36Sopenharmony_ci		return xpNotLoaded;
32162306a36Sopenharmony_ci
32262306a36Sopenharmony_ci	return xpc_interface.partid_to_nasids(partid, nasids);
32362306a36Sopenharmony_ci}
32462306a36Sopenharmony_ci
32562306a36Sopenharmony_ciextern short xp_max_npartitions;
32662306a36Sopenharmony_ciextern short xp_partition_id;
32762306a36Sopenharmony_ciextern u8 xp_region_size;
32862306a36Sopenharmony_ci
32962306a36Sopenharmony_ciextern unsigned long (*xp_pa) (void *);
33062306a36Sopenharmony_ciextern unsigned long (*xp_socket_pa) (unsigned long);
33162306a36Sopenharmony_ciextern enum xp_retval (*xp_remote_memcpy) (unsigned long, const unsigned long,
33262306a36Sopenharmony_ci		       size_t);
33362306a36Sopenharmony_ciextern int (*xp_cpu_to_nasid) (int);
33462306a36Sopenharmony_ciextern enum xp_retval (*xp_expand_memprotect) (unsigned long, unsigned long);
33562306a36Sopenharmony_ciextern enum xp_retval (*xp_restrict_memprotect) (unsigned long, unsigned long);
33662306a36Sopenharmony_ci
33762306a36Sopenharmony_ciextern struct device *xp;
33862306a36Sopenharmony_ciextern enum xp_retval xp_init_uv(void);
33962306a36Sopenharmony_ciextern void xp_exit_uv(void);
34062306a36Sopenharmony_ci
34162306a36Sopenharmony_ci#endif /* _DRIVERS_MISC_SGIXP_XP_H */
342