2005-04-17 05:20:36 +07:00
|
|
|
/*
|
|
|
|
* include/asm-s390/smp.h
|
|
|
|
*
|
|
|
|
* S390 version
|
|
|
|
* Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
|
|
|
|
* Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
|
|
|
|
* Martin Schwidefsky (schwidefsky@de.ibm.com)
|
|
|
|
* Heiko Carstens (heiko.carstens@de.ibm.com)
|
|
|
|
*/
|
|
|
|
#ifndef __ASM_SMP_H
|
|
|
|
#define __ASM_SMP_H
|
|
|
|
|
|
|
|
#include <linux/threads.h>
|
|
|
|
#include <linux/cpumask.h>
|
|
|
|
#include <linux/bitops.h>
|
|
|
|
|
|
|
|
#if defined(__KERNEL__) && defined(CONFIG_SMP) && !defined(__ASSEMBLY__)
|
|
|
|
|
|
|
|
#include <asm/lowcore.h>
|
|
|
|
#include <asm/sigp.h>
|
2006-12-04 21:40:33 +07:00
|
|
|
#include <asm/ptrace.h>
|
2008-04-30 18:38:45 +07:00
|
|
|
#include <asm/system.h>
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
/*
|
|
|
|
s390 specific smp.c headers
|
|
|
|
*/
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int intresting;
|
|
|
|
sigp_ccode ccode;
|
|
|
|
__u32 status;
|
|
|
|
__u16 cpu;
|
|
|
|
} sigp_info;
|
|
|
|
|
2007-02-06 03:16:47 +07:00
|
|
|
extern void machine_restart_smp(char *);
|
|
|
|
extern void machine_halt_smp(void);
|
|
|
|
extern void machine_power_off_smp(void);
|
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#define NO_PROC_ID 0xFF /* No processor magic marker */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This magic constant controls our willingness to transfer
|
|
|
|
* a process across CPUs. Such a transfer incurs misses on the L1
|
|
|
|
* cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
|
|
|
|
* gut feeling is this will vary by board in value. For a board
|
|
|
|
* with separate L2 cache it probably depends also on the RSS, and
|
|
|
|
* for a board with shared L2 cache it ought to decay fast as other
|
|
|
|
* processes are run.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
|
|
|
|
|
2009-03-26 21:24:42 +07:00
|
|
|
#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
|
2009-09-11 15:29:05 +07:00
|
|
|
#define cpu_logical_map(cpu) (cpu)
|
2005-04-17 05:20:36 +07:00
|
|
|
|
|
|
|
extern int __cpu_disable (void);
|
|
|
|
extern void __cpu_die (unsigned int cpu);
|
|
|
|
extern void cpu_die (void) __attribute__ ((noreturn));
|
|
|
|
extern int __cpu_up (unsigned int cpu);
|
|
|
|
|
2008-04-17 12:46:12 +07:00
|
|
|
extern struct mutex smp_cpu_state_mutex;
|
2008-04-17 12:46:13 +07:00
|
|
|
extern int smp_cpu_polarization[];
|
2008-04-17 12:46:12 +07:00
|
|
|
|
2008-12-25 19:38:39 +07:00
|
|
|
extern void arch_send_call_function_single_ipi(int cpu);
|
2009-09-24 22:34:45 +07:00
|
|
|
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
2008-12-25 19:38:39 +07:00
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|
|
|
|
|
2008-04-30 18:38:37 +07:00
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
|
|
extern int smp_rescan_cpus(void);
|
|
|
|
#else
|
|
|
|
static inline int smp_rescan_cpus(void) { return 0; }
|
|
|
|
#endif
|
|
|
|
|
2007-04-27 21:01:49 +07:00
|
|
|
extern union save_area *zfcpdump_save_areas[NR_CPUS + 1];
|
2005-04-17 05:20:36 +07:00
|
|
|
#endif
|