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)
12 #include <linux/config.h>
13 #include <linux/threads.h>
14 #include <linux/cpumask.h>
15 #include <linux/bitops.h>
17 #if defined(__KERNEL__) && defined(CONFIG_SMP) && !defined(__ASSEMBLY__)
19 #include <asm/lowcore.h>
22 s390 specific smp.c headers
32 extern int smp_call_function_on(void (*func) (void *info), void *info,
33 int nonatomic, int wait, int cpu);
35 extern cpumask_t cpu_online_map;
36 extern cpumask_t cpu_possible_map;
38 #define NO_PROC_ID 0xFF /* No processor magic marker */
41 * This magic constant controls our willingness to transfer
42 * a process across CPUs. Such a transfer incurs misses on the L1
43 * cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
44 * gut feeling is this will vary by board in value. For a board
45 * with separate L2 cache it probably depends also on the RSS, and
46 * for a board with shared L2 cache it ought to decay fast as other
50 #define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
52 #define smp_processor_id() (S390_lowcore.cpu_data.cpu_nr)
54 #define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
56 extern __inline__ __u16 hard_smp_processor_id(void)
60 __asm__ ("stap %0\n" : "=m" (cpu_address));
64 #define cpu_logical_map(cpu) (cpu)
69 #define smp_call_function_on(func,info,nonatomic,wait,cpu) ({ 0; })