diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-04 03:21:18 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-04 03:21:18 +0000 |
commit | 9fd51e9b0ad33a89a83fdbbb66bd20d85f7893fb (patch) | |
tree | 8845b79f170028cb4380045c50277bbf075b5b7d /pfinet/linux-src/include/linux/smp.h |
Import of Linux 2.2.12 subset (ipv4 stack and related)
Diffstat (limited to 'pfinet/linux-src/include/linux/smp.h')
-rw-r--r-- | pfinet/linux-src/include/linux/smp.h | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/pfinet/linux-src/include/linux/smp.h b/pfinet/linux-src/include/linux/smp.h new file mode 100644 index 00000000..eae12907 --- /dev/null +++ b/pfinet/linux-src/include/linux/smp.h @@ -0,0 +1,86 @@ +#ifndef __LINUX_SMP_H +#define __LINUX_SMP_H + +/* + * Generic SMP support + * Alan Cox. <alan@redhat.com> + */ + +#ifdef __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); + +/* + * sends a 'reschedule' event to another CPU: + */ +extern void FASTCALL(smp_send_reschedule(int 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 smp_call_function(func,info,retry,wait) + +#endif +#endif |