diff options
author | Dean Nelson <dcn@sgi.com> | 2008-04-22 23:48:01 +0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2008-04-23 02:08:29 +0400 |
commit | 4a3ad2ddc0b920cd3ead84b0c67599be02d689ca (patch) | |
tree | 244e6cc7fefcf5c8c5d8245c5ac9923835a7e366 /drivers/misc/sgi-xp/xp.h | |
parent | 45d9ca492e4bd1522d1b5bd125c2908f1cee3d4a (diff) | |
download | linux-4a3ad2ddc0b920cd3ead84b0c67599be02d689ca.tar.xz |
[IA64] run some drivers/misc/sgi-xp through scripts/Lindent
Ran patches through scripts/Lindent (part 1).
Signed-off-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/misc/sgi-xp/xp.h')
-rw-r--r-- | drivers/misc/sgi-xp/xp.h | 80 |
1 files changed, 29 insertions, 51 deletions
diff --git a/drivers/misc/sgi-xp/xp.h b/drivers/misc/sgi-xp/xp.h index fb65981754c3..87171682664d 100644 --- a/drivers/misc/sgi-xp/xp.h +++ b/drivers/misc/sgi-xp/xp.h @@ -6,30 +6,25 @@ * Copyright (C) 2004-2008 Silicon Graphics, Inc. All rights reserved. */ - /* * External Cross Partition (XP) structures and defines. */ - #ifndef _DRIVERS_MISC_SGIXP_XP_H #define _DRIVERS_MISC_SGIXP_XP_H - #include <linux/cache.h> #include <linux/hardirq.h> #include <linux/mutex.h> #include <asm/sn/types.h> #include <asm/sn/bte.h> - #ifdef USE_DBUG_ON #define DBUG_ON(condition) BUG_ON(condition) #else #define DBUG_ON(condition) #endif - /* * Define the maximum number of logically defined partitions the system * can support. It is constrained by the maximum number of hardware @@ -43,7 +38,6 @@ */ #define XP_MAX_PARTITIONS 64 - /* * Define the number of u64s required to represent all the C-brick nasids * as a bitmap. The cross-partition kernel modules deal only with @@ -54,7 +48,6 @@ #define XP_NASID_MASK_BYTES ((XP_MAX_PHYSNODE_ID + 7) / 8) #define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64) - /* * Wrapper for bte_copy() that should it return a failure status will retry * the bte_copy() once in the hope that the failure was due to a temporary @@ -74,7 +67,6 @@ xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification) bte_result_t ret; u64 pdst = ia64_tpa(vdst); - /* * Ensure that the physically mapped memory is contiguous. * @@ -96,7 +88,6 @@ xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification) return ret; } - /* * XPC establishes channel connections between the local partition and any * other partition that is currently up. Over these channels, kernel-level @@ -122,7 +113,6 @@ xp_bte_copy(u64 src, u64 vdst, u64 len, u64 mode, void *notification) #error XPC_NCHANNELS exceeds MAXIMUM allowed. #endif - /* * The format of an XPC message is as follows: * @@ -160,12 +150,10 @@ struct xpc_msg { u64 payload; /* user defined portion of message */ }; - #define XPC_MSG_PAYLOAD_OFFSET (u64) (&((struct xpc_msg *)0)->payload) #define XPC_MSG_SIZE(_payload_size) \ L1_CACHE_ALIGN(XPC_MSG_PAYLOAD_OFFSET + (_payload_size)) - /* * Define the return values and values passed to user's callout functions. * (It is important to add new value codes at the end just preceding @@ -270,7 +258,6 @@ enum xpc_retval { xpcUnknownReason /* 116: unknown reason -- must be last in list */ }; - /* * Define the callout function types used by XPC to update the user on * connection activity and state changes (via the user function registered by @@ -375,12 +362,11 @@ enum xpc_retval { * =====================+================================+===================== */ -typedef void (*xpc_channel_func)(enum xpc_retval reason, partid_t partid, - int ch_number, void *data, void *key); - -typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid, - int ch_number, void *key); +typedef void (*xpc_channel_func) (enum xpc_retval reason, partid_t partid, + int ch_number, void *data, void *key); +typedef void (*xpc_notify_func) (enum xpc_retval reason, partid_t partid, + int ch_number, void *key); /* * The following is a registration entry. There is a global array of these, @@ -398,50 +384,45 @@ typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid, */ struct xpc_registration { struct mutex mutex; - xpc_channel_func func; /* function to call */ - void *key; /* pointer to user's key */ - u16 nentries; /* #of msg entries in local msg queue */ - u16 msg_size; /* message queue's message size */ - u32 assigned_limit; /* limit on #of assigned kthreads */ - u32 idle_limit; /* limit on #of idle kthreads */ + xpc_channel_func func; /* function to call */ + void *key; /* pointer to user's key */ + u16 nentries; /* #of msg entries in local msg queue */ + u16 msg_size; /* message queue's message size */ + u32 assigned_limit; /* limit on #of assigned kthreads */ + u32 idle_limit; /* limit on #of idle kthreads */ } ____cacheline_aligned; - #define XPC_CHANNEL_REGISTERED(_c) (xpc_registrations[_c].func != NULL) - /* the following are valid xpc_allocate() flags */ -#define XPC_WAIT 0 /* wait flag */ -#define XPC_NOWAIT 1 /* no wait flag */ - +#define XPC_WAIT 0 /* wait flag */ +#define XPC_NOWAIT 1 /* no wait flag */ struct xpc_interface { - void (*connect)(int); - void (*disconnect)(int); - enum xpc_retval (*allocate)(partid_t, int, u32, void **); - enum xpc_retval (*send)(partid_t, int, void *); - enum xpc_retval (*send_notify)(partid_t, int, void *, - xpc_notify_func, void *); - void (*received)(partid_t, int, void *); - enum xpc_retval (*partid_to_nasids)(partid_t, void *); + void (*connect) (int); + void (*disconnect) (int); + enum xpc_retval (*allocate) (partid_t, int, u32, void **); + enum xpc_retval (*send) (partid_t, int, void *); + enum xpc_retval (*send_notify) (partid_t, int, void *, + xpc_notify_func, void *); + void (*received) (partid_t, int, void *); + enum xpc_retval (*partid_to_nasids) (partid_t, void *); }; - extern struct xpc_interface xpc_interface; extern void xpc_set_interface(void (*)(int), - void (*)(int), - enum xpc_retval (*)(partid_t, int, u32, void **), - enum xpc_retval (*)(partid_t, int, void *), - enum xpc_retval (*)(partid_t, int, void *, xpc_notify_func, - void *), - void (*)(partid_t, int, void *), - enum xpc_retval (*)(partid_t, void *)); + void (*)(int), + enum xpc_retval (*)(partid_t, int, u32, void **), + enum xpc_retval (*)(partid_t, int, void *), + enum xpc_retval (*)(partid_t, int, void *, + xpc_notify_func, void *), + void (*)(partid_t, int, void *), + enum xpc_retval (*)(partid_t, void *)); extern void xpc_clear_interface(void); - extern enum xpc_retval xpc_connect(int, xpc_channel_func, void *, u16, - u16, u32, u32); + u16, u32, u32); extern void xpc_disconnect(int); static inline enum xpc_retval @@ -458,7 +439,7 @@ xpc_send(partid_t partid, int ch_number, void *payload) static inline enum xpc_retval xpc_send_notify(partid_t partid, int ch_number, void *payload, - xpc_notify_func func, void *key) + xpc_notify_func func, void *key) { return xpc_interface.send_notify(partid, ch_number, payload, func, key); } @@ -475,11 +456,8 @@ xpc_partid_to_nasids(partid_t partid, void *nasids) return xpc_interface.partid_to_nasids(partid, nasids); } - extern u64 xp_nofault_PIOR_target; extern int xp_nofault_PIOR(void *); extern int xp_error_PIOR(void); - #endif /* _DRIVERS_MISC_SGIXP_XP_H */ - |