patch-2.4.21 linux-2.4.21/include/asm-ia64/sn/sn_cpuid.h

Next file: linux-2.4.21/include/asm-ia64/sn/sn_fru.h
Previous file: linux-2.4.21/include/asm-ia64/sn/sn2/sn_private.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/include/asm-ia64/sn/sn_cpuid.h linux-2.4.21/include/asm-ia64/sn/sn_cpuid.h
@@ -121,13 +121,19 @@
 #endif
 
 /*
- * NOTE: id & eid refer to Intels definitions of the LID register
- *	(id = NASID, eid = slice)
+ * NOTE: id & eid refer to Intel's definitions of the LID register
+ * 
  * NOTE: on non-MP systems, only cpuid 0 exists
  */
-#define id_eid_to_cpu_physical_id(id,eid)       (((id)<<8) | (eid))
-#define id_eid_to_cpuid(id,eid)         	(cpu_logical_id(id_eid_to_cpu_physical_id((id),(eid))))
+#define id_eid_to_cpu_physical_id(id,eid)	 	(((id)<<8) | (eid))
 
+#define nasid_slice_to_cpuid(nasid,slice)		(cpu_logical_id(nasid_slice_to_cpu_physical_id((nasid),(slice))))
+
+#ifdef CONFIG_IA64_SGI_SN1
+#define nasid_slice_to_cpu_physical_id(nasid, slice)	(((nasid)<<8) | (slice))
+#else
+#define nasid_slice_to_cpu_physical_id(nasid, slice)	(((slice)<<12) | (nasid))
+#endif
 
 /*
  * The following table/struct  is used for managing PTC coherency domains.
@@ -196,7 +202,8 @@
 /*
  * cnode_slice_to_cpuid - convert a codeid & slice to a cpuid
  */
-#define cnode_slice_to_cpuid(cnodeid,slice) (id_eid_to_cpuid(cnodeid_to_nasid(cnodeid),(slice)))
+
+#define cnode_slice_to_cpuid(cnodeid,slice) (nasid_slice_to_cpuid(cnodeid_to_nasid(cnodeid),(slice)))
  
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)