aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/smp.h
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-03-23 09:48:06 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-03-23 09:48:06 +0000
commit2a5f90e8e88330b026e79c1a3c38a711f545c167 (patch)
treecaa5435c339291cc581777a52e4981c75b77260d /xen/include/xen/smp.h
parentc2929ecdf6cba5d5e5fd09c52e465e5f4a22fb83 (diff)
downloadxen-2a5f90e8e88330b026e79c1a3c38a711f545c167.tar.gz
xen-2a5f90e8e88330b026e79c1a3c38a711f545c167.tar.bz2
xen-2a5f90e8e88330b026e79c1a3c38a711f545c167.zip
bitkeeper revision 1.821 (406007d6uu0vZYDxa9P1ZfNO9kF_Cg)
Many files: xeno -> xen renames. ide-xen.c: Rename: xen/drivers/ide/ide-xeno.c -> xen/drivers/ide/ide-xen.c xen.lds: Rename: xen/arch/i386/xeno.lds -> xen/arch/i386/xen.lds Many files: mvdir
Diffstat (limited to 'xen/include/xen/smp.h')
-rw-r--r--xen/include/xen/smp.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/xen/include/xen/smp.h b/xen/include/xen/smp.h
new file mode 100644
index 0000000000..2cb88183a9
--- /dev/null
+++ b/xen/include/xen/smp.h
@@ -0,0 +1,88 @@
+#ifndef __LINUX_SMP_H
+#define __LINUX_SMP_H
+
+/*
+ * Generic SMP support
+ * Alan Cox. <alan@redhat.com>
+ */
+
+#include <xen/config.h>
+
+#ifdef CONFIG_SMP
+
+#include <asm/smp.h>
+
+/*
+ * main cross-CPU interfaces, handles INIT, TLB flush, STOP, etc.
+ * (defined in asm header):
+ */
+
+/*
+ * stops all CPUs but the current one:
+ */
+extern void smp_send_stop(void);
+
+extern void FASTCALL(smp_send_event_check_mask(unsigned long cpu_mask));
+#define smp_send_event_check_cpu(_cpu) smp_send_event_check_mask(1<<(_cpu))
+
+
+/*
+ * Boot processor call to load the other CPU's
+ */
+extern void smp_boot_cpus(void);
+
+/*
+ * Processor call in. Must hold processors until ..
+ */
+extern void smp_callin(void);
+
+/*
+ * Multiprocessors may now schedule
+ */
+extern void smp_commence(void);
+
+/*
+ * Call a function on all other processors
+ */
+extern int smp_call_function (void (*func) (void *info), void *info,
+ int retry, int wait);
+
+/*
+ * True once the per process idle is forked
+ */
+extern int smp_threads_ready;
+
+extern int smp_num_cpus;
+
+extern volatile unsigned long smp_msg_data;
+extern volatile int smp_src_cpu;
+extern volatile int smp_msg_id;
+
+#define MSG_ALL_BUT_SELF 0x8000 /* Assume <32768 CPU's */
+#define MSG_ALL 0x8001
+
+#define MSG_INVALIDATE_TLB 0x0001 /* Remote processor TLB invalidate */
+#define MSG_STOP_CPU 0x0002 /* Sent to shut down slave CPU's
+ * when rebooting
+ */
+#define MSG_RESCHEDULE 0x0003 /* Reschedule request from master CPU*/
+#define MSG_CALL_FUNCTION 0x0004 /* Call function on all other CPUs */
+
+#else
+
+/*
+ * These macros fold the SMP functionality into a single CPU system
+ */
+
+#define smp_num_cpus 1
+#define smp_processor_id() 0
+#define hard_smp_processor_id() 0
+#define smp_threads_ready 1
+#define kernel_lock()
+#define cpu_logical_map(cpu) 0
+#define cpu_number_map(cpu) 0
+#define smp_call_function(func,info,retry,wait) ({ 0; })
+#define cpu_online_map 1
+
+#endif
+#endif