Index: kernel/arch/ia64/include/cpu.h
===================================================================
--- kernel/arch/ia64/include/cpu.h	(revision b3f8fb771f871e7f2bb35ce9339717639e8f86d6)
+++ kernel/arch/ia64/include/cpu.h	(revision aa8d0f724e941934ba8a46d05e4ec1c71954987a)
@@ -39,4 +39,5 @@
 #include <arch/register.h>
 #include <arch/asm.h>
+#include <arch/bootinfo.h>
 
 #define FAMILY_ITANIUM	0x7
@@ -64,4 +65,31 @@
 }
 
+
+#define CR64_ID_SHIFT 24
+#define CR64_ID_MASK 0xff000000
+#define CR64_EID_SHIFT 16
+#define CR64_EID_MASK 0xff0000
+
+static inline int ia64_get_cpu_id(void)
+{
+	uint64_t cr64=cr64_read();
+	return ((CR64_ID_MASK)&cr64)>>CR64_ID_SHIFT;
+}
+
+static inline int ia64_get_cpu_eid(void)
+{
+	uint64_t cr64=cr64_read();
+	return ((CR64_EID_MASK)&cr64)>>CR64_EID_SHIFT;
+}
+
+
+
+static inline void ipi_send_ipi(int id,int eid,int intno)
+{
+	(bootinfo->sapic)[2*(id*256+eid)]=intno;
+}
+
+
+
 #endif
 
