2 * include/asm-s390/smp.h
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 * Heiko Carstens (heiko.carstens@de.ibm.com)
13 #include <linux/config.h>
14 #include <linux/threads.h>
15 #include <linux/cpumask.h>
16 #include <linux/bitops.h>
18 #if defined(__KERNEL__) && defined(CONFIG_SMP) && !defined(__ASSEMBLY__)
20 #include <asm/lowcore.h>
23 s390 specific smp.c headers
33 extern int smp_call_function_on(void (*func) (void *info), void *info,
34 int nonatomic, int wait, int cpu);
35 #define NO_PROC_ID 0xFF /* No processor magic marker */
38 * This magic constant controls our willingness to transfer
39 * a process across CPUs. Such a transfer incurs misses on the L1
40 * cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
41 * gut feeling is this will vary by board in value. For a board
42 * with separate L2 cache it probably depends also on the RSS, and
43 * for a board with shared L2 cache it ought to decay fast as other
47 #define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
49 #define smp_processor_id() (S390_lowcore.cpu_data.cpu_nr)
51 extern int smp_get_cpu(cpumask_t cpu_map);
52 extern void smp_put_cpu(int cpu);
54 extern __inline__ __u16 hard_smp_processor_id(void)
58 __asm__ ("stap %0\n" : "=m" (cpu_address));
62 #define cpu_logical_map(cpu) (cpu)
64 extern int __cpu_disable (void);
65 extern void __cpu_die (unsigned int cpu);
66 extern void cpu_die (void) __attribute__ ((noreturn));
67 extern int __cpu_up (unsigned int cpu);
73 smp_call_function_on(void (*func) (void *info), void *info,
74 int nonatomic, int wait, int cpu)
79 #define smp_get_cpu(cpu) ({ 0; })
80 #define smp_put_cpu(cpu) ({ 0; })