Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / include / asm-ia64 / sn / sn2 / sn_hwperf.h
index b0c4d6d..e61ebac 100644 (file)
@@ -43,9 +43,14 @@ struct sn_hwperf_object_info {
 
 /* macros for object classification */
 #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_ROUTER(x)         ((x) && strstr((x)->name, "Router"))
 #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)         (SN_HWPERF_IS_NL3ROUTER(x) ||           \
+                                               SN_HWPERF_IS_NL4ROUTER(x) ||    \
+                                               SN_HWPERF_IS_OLDROUTER(x))
 #define SN_HWPERF_FOREIGN(x)           ((x) && !(x)->sn_hwp_this_part && !(x)->sn_hwp_is_shared)
 #define SN_HWPERF_SAME_OBJTYPE(x,y)    ((SN_HWPERF_IS_NODE(x) && SN_HWPERF_IS_NODE(y)) ||\
                                        (SN_HWPERF_IS_IONODE(x) && SN_HWPERF_IS_IONODE(y)) ||\
@@ -214,6 +219,15 @@ struct sn_hwperf_ioctl_args {
  */
 #define SN_HWPERF_GET_NODE_NASID       (102|SN_HWPERF_OP_MEM_COPYOUT)
 
+/*
+ * Given a node id, determine the id of the nearest node with CPUs
+ * and the id of the nearest node that has memory. The argument
+ * node would normally be a "headless" node, e.g. an "IO node".
+ * Return 0 on success.
+ */
+extern int sn_hwperf_get_nearest_node(cnodeid_t node,
+       cnodeid_t *near_mem, cnodeid_t *near_cpu);
+
 /* return codes */
 #define SN_HWPERF_OP_OK                        0
 #define SN_HWPERF_OP_NOMEM             1
@@ -223,4 +237,6 @@ struct sn_hwperf_ioctl_args {
 #define SN_HWPERF_OP_RECONFIGURE       253
 #define SN_HWPERF_OP_INVAL             254
 
+int sn_topology_open(struct inode *inode, struct file *file);
+int sn_topology_release(struct inode *inode, struct file *file);
 #endif                         /* SN_HWPERF_H */