Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sn_hwperf.h File Reference

Go to the source code of this file.

Data Structures

struct  sn_hwperf_object_info
 
struct  sn_hwperf_port_info
 
struct  sn_hwperf_data
 
struct  sn_hwperf_ioctl_args
 

Macros

#define SN_HWPERF_MAXSTRING   128
 
#define sn_hwp_this_part   f.fields.this_part
 
#define sn_hwp_is_shared   f.fields.is_shared
 
#define sn_hwp_flags   f.b.flags
 
#define SN_HWPERF_IS_NODE(x)   ((x) && strstr((x)->name, "SHub"))
 
#define SN_HWPERF_IS_NODE_SHUB2(x)   ((x) && strstr((x)->name, "SHub 2."))
 
#define SN_HWPERF_IS_IONODE(x)   ((x) && strstr((x)->name, "TIO"))
 
#define SN_HWPERF_IS_NL3ROUTER(x)   ((x) && strstr((x)->name, "NL3Router"))
 
#define SN_HWPERF_IS_NL4ROUTER(x)   ((x) && strstr((x)->name, "NL4Router"))
 
#define SN_HWPERF_IS_OLDROUTER(x)   ((x) && strstr((x)->name, "Router"))
 
#define SN_HWPERF_IS_ROUTER(x)
 
#define SN_HWPERF_FOREIGN(x)   ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared)
 
#define SN_HWPERF_SAME_OBJTYPE(x, y)
 
#define SN_HWPERF_ARG_ANY_CPU   0x7fffffffUL
 
#define SN_HWPERF_ARG_CPU_MASK   0x7fffffff00000000ULL
 
#define SN_HWPERF_ARG_USE_IPI_MASK   0x8000000000000000ULL
 
#define SN_HWPERF_ARG_OBJID_MASK   0x00000000ffffffffULL
 
#define SN_HWPERF_OP_MEM_COPYIN   0x1000
 
#define SN_HWPERF_OP_MEM_COPYOUT   0x2000
 
#define SN_HWPERF_OP_MASK   0x0fff
 
#define SN_HWPERF_GET_HEAPSIZE   1
 
#define SN_HWPERF_INSTALL_HEAP   2
 
#define SN_HWPERF_OBJECT_COUNT   (10|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_OBJECT_DISTANCE   (11|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_ENUM_OBJECTS   (12|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_ENUM_PORTS   (13|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_SET_MMRS   (14|SN_HWPERF_OP_MEM_COPYIN)
 
#define SN_HWPERF_GET_MMRS
 
#define SN_HWPERF_ACQUIRE   16
 
#define SN_HWPERF_RELEASE   17
 
#define SN_HWPERF_FORCE_RELEASE   18
 
#define SN_HWPERF_GET_CPU_INFO   (100|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_GET_OBJ_NODE   (101|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_GET_NODE_NASID   (102|SN_HWPERF_OP_MEM_COPYOUT)
 
#define SN_HWPERF_OP_OK   0
 
#define SN_HWPERF_OP_NOMEM   1
 
#define SN_HWPERF_OP_NO_PERM   2
 
#define SN_HWPERF_OP_IO_ERROR   3
 
#define SN_HWPERF_OP_BUSY   4
 
#define SN_HWPERF_OP_RECONFIGURE   253
 
#define SN_HWPERF_OP_INVAL   254
 

Functions

int sn_hwperf_get_nearest_node (cnodeid_t node, cnodeid_t *near_mem, cnodeid_t *near_cpu)
 
int sn_topology_open (struct inode *inode, struct file *file)
 
int sn_topology_release (struct inode *inode, struct file *file)
 

Macro Definition Documentation

#define sn_hwp_flags   f.b.flags

Definition at line 42 of file sn_hwperf.h.

#define sn_hwp_is_shared   f.fields.is_shared

Definition at line 41 of file sn_hwperf.h.

#define sn_hwp_this_part   f.fields.this_part

Definition at line 40 of file sn_hwperf.h.

#define SN_HWPERF_ACQUIRE   16

Definition at line 172 of file sn_hwperf.h.

#define SN_HWPERF_ARG_ANY_CPU   0x7fffffffUL

Definition at line 87 of file sn_hwperf.h.

#define SN_HWPERF_ARG_CPU_MASK   0x7fffffff00000000ULL

Definition at line 88 of file sn_hwperf.h.

#define SN_HWPERF_ARG_OBJID_MASK   0x00000000ffffffffULL

Definition at line 90 of file sn_hwperf.h.

#define SN_HWPERF_ARG_USE_IPI_MASK   0x8000000000000000ULL

Definition at line 89 of file sn_hwperf.h.

#define SN_HWPERF_ENUM_OBJECTS   (12|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 142 of file sn_hwperf.h.

#define SN_HWPERF_ENUM_PORTS   (13|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 151 of file sn_hwperf.h.

#define SN_HWPERF_FORCE_RELEASE   18

Definition at line 188 of file sn_hwperf.h.

#define SN_HWPERF_FOREIGN (   x)    ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared)

Definition at line 54 of file sn_hwperf.h.

#define SN_HWPERF_GET_CPU_INFO   (100|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 204 of file sn_hwperf.h.

#define SN_HWPERF_GET_HEAPSIZE   1

Definition at line 105 of file sn_hwperf.h.

#define SN_HWPERF_GET_MMRS
Value:
SN_HWPERF_OP_MEM_COPYIN)

Definition at line 164 of file sn_hwperf.h.

#define SN_HWPERF_GET_NODE_NASID   (102|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 220 of file sn_hwperf.h.

#define SN_HWPERF_GET_OBJ_NODE   (101|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 212 of file sn_hwperf.h.

#define SN_HWPERF_INSTALL_HEAP   2

Definition at line 113 of file sn_hwperf.h.

#define SN_HWPERF_IS_IONODE (   x)    ((x) && strstr((x)->name, "TIO"))

Definition at line 47 of file sn_hwperf.h.

#define SN_HWPERF_IS_NL3ROUTER (   x)    ((x) && strstr((x)->name, "NL3Router"))

Definition at line 48 of file sn_hwperf.h.

#define SN_HWPERF_IS_NL4ROUTER (   x)    ((x) && strstr((x)->name, "NL4Router"))

Definition at line 49 of file sn_hwperf.h.

#define SN_HWPERF_IS_NODE (   x)    ((x) && strstr((x)->name, "SHub"))

Definition at line 45 of file sn_hwperf.h.

#define SN_HWPERF_IS_NODE_SHUB2 (   x)    ((x) && strstr((x)->name, "SHub 2."))

Definition at line 46 of file sn_hwperf.h.

#define SN_HWPERF_IS_OLDROUTER (   x)    ((x) && strstr((x)->name, "Router"))

Definition at line 50 of file sn_hwperf.h.

#define SN_HWPERF_IS_ROUTER (   x)
Value:
SN_HWPERF_IS_NL4ROUTER(x) || \
SN_HWPERF_IS_OLDROUTER(x))

Definition at line 51 of file sn_hwperf.h.

#define SN_HWPERF_MAXSTRING   128

Definition at line 22 of file sn_hwperf.h.

#define SN_HWPERF_OBJECT_COUNT   (10|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 121 of file sn_hwperf.h.

#define SN_HWPERF_OBJECT_DISTANCE   (11|SN_HWPERF_OP_MEM_COPYOUT)

Definition at line 133 of file sn_hwperf.h.

#define SN_HWPERF_OP_BUSY   4

Definition at line 236 of file sn_hwperf.h.

#define SN_HWPERF_OP_INVAL   254

Definition at line 238 of file sn_hwperf.h.

#define SN_HWPERF_OP_IO_ERROR   3

Definition at line 235 of file sn_hwperf.h.

#define SN_HWPERF_OP_MASK   0x0fff

Definition at line 97 of file sn_hwperf.h.

#define SN_HWPERF_OP_MEM_COPYIN   0x1000

Definition at line 95 of file sn_hwperf.h.

#define SN_HWPERF_OP_MEM_COPYOUT   0x2000

Definition at line 96 of file sn_hwperf.h.

#define SN_HWPERF_OP_NO_PERM   2

Definition at line 234 of file sn_hwperf.h.

#define SN_HWPERF_OP_NOMEM   1

Definition at line 233 of file sn_hwperf.h.

#define SN_HWPERF_OP_OK   0

Definition at line 232 of file sn_hwperf.h.

#define SN_HWPERF_OP_RECONFIGURE   253

Definition at line 237 of file sn_hwperf.h.

#define SN_HWPERF_RELEASE   17

Definition at line 180 of file sn_hwperf.h.

#define SN_HWPERF_SAME_OBJTYPE (   x,
  y 
)
#define SN_HWPERF_SET_MMRS   (14|SN_HWPERF_OP_MEM_COPYIN)

Definition at line 163 of file sn_hwperf.h.

Function Documentation

int sn_hwperf_get_nearest_node ( cnodeid_t  node,
cnodeid_t near_mem,
cnodeid_t near_cpu 
)

Definition at line 964 of file sn_hwperf.c.

int sn_topology_open ( struct inode inode,
struct file file 
)

Definition at line 940 of file sn_hwperf.c.

int sn_topology_release ( struct inode inode,
struct file file 
)

Definition at line 956 of file sn_hwperf.c.