root/include/linux/smp.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef __LINUX_SMP_H
   2 #define __LINUX_SMP_H
   3 
   4 /*
   5  *      Generic SMP support
   6  *              Alan Cox. <alan@cymru.net>
   7  */
   8 
   9 #ifdef __SMP__
  10 #include <asm/smp.h>
  11 
  12  
  13 extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
  14 extern void smp_boot_cpus(void);                /* Boot processor call to load the other CPU's */
  15 extern void smp_callin(void);                   /* Processor call in. Must hold processors until .. */
  16 extern void smp_commence(void);                 /* Multiprocessors may now schedule */
  17 extern int smp_num_cpus;
  18 extern int smp_threads_ready;                   /* True once the per process idle is forked */
  19 extern volatile unsigned long smp_spins;        /* Count of spins */
  20 
  21 extern volatile unsigned long smp_msg_data;
  22 extern volatile int smp_src_cpu;
  23 extern volatile int smp_msg_id;
  24 
  25 #define MSG_ALL_BUT_SELF        0x8000          /* Assume <32768 CPU's */
  26 #define MSG_ALL                 0x8001
  27 
  28 #define MSG_INVALIDATE_TLB      0x0001          /* Remote processor TLB invalidate */
  29 #define MSG_STOP_CPU            0x0002          /* Sent to shut down slave CPU's when rebooting */
  30 #define MSG_RESCHEDULE          0x0003          /* Reschedule request from master CPU */
  31 
  32 #else
  33 
  34 /*
  35  *      These macros fold the SMP functionality into a single CPU system
  36  */
  37  
  38 #define smp_num_cpus                    1
  39 #define smp_processor_id()              0
  40 #define smp_message_pass(t,m,d,w)       
  41 #define smp_threads_ready               1
  42 #endif
  43 #endif

/* [previous][next][first][last][top][bottom][index][help] */