mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
8239c25f47
Preparatory patch to make the idle thread allocation for secondary cpus generic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: James E.J. Bottomley <jejb@parisc-linux.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: David S. Miller <davem@davemloft.net> Cc: Chris Metcalf <cmetcalf@tilera.com> Cc: Richard Weinberger <richard@nod.at> Cc: x86@kernel.org Link: http://lkml.kernel.org/r/20120420124556.964170564@linutronix.de
65 lines
1.7 KiB
C
65 lines
1.7 KiB
C
/*
|
|
* Copyright IBM Corp. 1999,2012
|
|
* Author(s): Denis Joseph Barrow,
|
|
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
|
|
* Heiko Carstens <heiko.carstens@de.ibm.com>,
|
|
*/
|
|
#ifndef __ASM_SMP_H
|
|
#define __ASM_SMP_H
|
|
|
|
#ifdef CONFIG_SMP
|
|
|
|
#include <asm/lowcore.h>
|
|
|
|
#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
|
|
|
|
extern struct mutex smp_cpu_state_mutex;
|
|
extern struct save_area *zfcpdump_save_areas[NR_CPUS + 1];
|
|
|
|
extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
|
|
|
|
extern void arch_send_call_function_single_ipi(int cpu);
|
|
extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
|
|
|
|
extern void smp_call_online_cpu(void (*func)(void *), void *);
|
|
extern void smp_call_ipl_cpu(void (*func)(void *), void *);
|
|
|
|
extern int smp_find_processor_id(u16 address);
|
|
extern int smp_store_status(int cpu);
|
|
extern int smp_vcpu_scheduled(int cpu);
|
|
extern void smp_yield_cpu(int cpu);
|
|
extern void smp_yield(void);
|
|
extern void smp_stop_cpu(void);
|
|
|
|
#else /* CONFIG_SMP */
|
|
|
|
static inline void smp_call_ipl_cpu(void (*func)(void *), void *data)
|
|
{
|
|
func(data);
|
|
}
|
|
|
|
static inline void smp_call_online_cpu(void (*func)(void *), void *data)
|
|
{
|
|
func(data);
|
|
}
|
|
|
|
static inline int smp_find_processor_id(int address) { return 0; }
|
|
static inline int smp_vcpu_scheduled(int cpu) { return 1; }
|
|
static inline void smp_yield_cpu(int cpu) { }
|
|
static inline void smp_yield(void) { }
|
|
static inline void smp_stop_cpu(void) { }
|
|
|
|
#endif /* CONFIG_SMP */
|
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
extern int smp_rescan_cpus(void);
|
|
extern void __noreturn cpu_die(void);
|
|
extern void __cpu_die(unsigned int cpu);
|
|
extern int __cpu_disable(void);
|
|
#else
|
|
static inline int smp_rescan_cpus(void) { return 0; }
|
|
static inline void cpu_die(void) { }
|
|
#endif
|
|
|
|
#endif /* __ASM_SMP_H */
|