~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/asm-s390/smp.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  *  include/asm-s390/smp.h
  3  *
  4  *  S390 version
  5  *    Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
  6  *    Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
  7  *               Martin Schwidefsky (schwidefsky@de.ibm.com)
  8  */
  9 #ifndef __ASM_SMP_H
 10 #define __ASM_SMP_H
 11 #include <linux/config.h>
 12 #ifdef CONFIG_SMP
 13 #ifndef __ASSEMBLY__
 14 
 15 #include <asm/lowcore.h>
 16 #include <linux/tasks.h>    // FOR NR_CPUS definition only.
 17 #include <linux/kernel.h>   // FOR FASTCALL definition
 18 
 19 #define smp_processor_id() (current->processor)
 20 #define NO_PROC_ID              0xFF            /* No processor magic marker */
 21 
 22 /*
 23  *      This magic constant controls our willingness to transfer
 24  *      a process across CPUs. Such a transfer incurs misses on the L1
 25  *      cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
 26  *      gut feeling is this will vary by board in value. For a board
 27  *      with separate L2 cache it probably depends also on the RSS, and
 28  *      for a board with shared L2 cache it ought to decay fast as other
 29  *      processes are run.
 30  */
 31  
 32 #define PROC_CHANGE_PENALTY     20              /* Schedule penalty */
 33 
 34 extern unsigned long ipi_count;
 35 extern void count_cpus(void);
 36 
 37 extern __inline__ int cpu_logical_map(int cpu)
 38 {
 39         return cpu;
 40 }
 41 
 42 extern __inline__ int cpu_number_map(int cpu)
 43 {
 44         return cpu;
 45 }
 46 
 47 extern __inline__ __u16 hard_smp_processor_id(void)
 48 {
 49         __u16 cpu_address;
 50  
 51         __asm__ ("stap %0\n" : "=m" (cpu_address));
 52         return cpu_address;
 53 }
 54 
 55 #define cpu_logical_map(cpu) (cpu)
 56 
 57 void smp_local_timer_interrupt(struct pt_regs * regs);
 58 
 59 /*
 60   s390 specific smp.c headers
 61  */
 62 typedef struct
 63 {
 64         int        intresting;
 65         sigp_ccode ccode; 
 66         __u32      status;
 67         __u16      cpu;
 68 } sigp_info;
 69 
 70 sigp_ccode smp_ext_call_sync(int cpu, ec_cmd_sig cmd,void *parms);
 71 sigp_ccode smp_ext_call_async(int cpu, ec_bit_sig sig);
 72 void smp_ext_call_sync_others(ec_cmd_sig cmd, void *parms);
 73 void smp_ext_call_async_others(ec_bit_sig sig);
 74 
 75 int smp_signal_others(sigp_order_code order_code,__u32 parameter,
 76                       int spin,sigp_info *info);
 77 #endif
 78 #endif
 79 #endif
 80 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.