edbaa603eb
The sysdev.h file should not be needed by any in-kernel code, so remove the .h file from these random files that seem to still want to include it. The sysdev code will be going away soon, so this include needs to be removed no matter what. Cc: Jiandong Zheng <jdzheng@broadcom.com> Cc: Scott Branden <sbranden@broadcom.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Kukjin Kim <kgene.kim@samsung.com> Cc: David Brown <davidb@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: "Venkatesh Pallipadi Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Richard Purdie <rpurdie@rpsys.net> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
88 lines
2.1 KiB
C
88 lines
2.1 KiB
C
/*
|
|
* SMP support for iSeries machines.
|
|
*
|
|
* Dave Engebretsen, Peter Bergner, and
|
|
* Mike Corrigan {engebret|bergner|mikec}@us.ibm.com
|
|
*
|
|
* Plus various changes from other IBM teams...
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*/
|
|
|
|
#undef DEBUG
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/smp.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/kernel_stat.h>
|
|
#include <linux/delay.h>
|
|
#include <linux/init.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/cache.h>
|
|
#include <linux/err.h>
|
|
#include <linux/device.h>
|
|
#include <linux/cpu.h>
|
|
|
|
#include <asm/ptrace.h>
|
|
#include <linux/atomic.h>
|
|
#include <asm/irq.h>
|
|
#include <asm/page.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/io.h>
|
|
#include <asm/smp.h>
|
|
#include <asm/paca.h>
|
|
#include <asm/iseries/hv_call.h>
|
|
#include <asm/time.h>
|
|
#include <asm/machdep.h>
|
|
#include <asm/cputable.h>
|
|
#include <asm/system.h>
|
|
|
|
static void smp_iSeries_cause_ipi(int cpu, unsigned long data)
|
|
{
|
|
HvCall_sendIPI(&(paca[cpu]));
|
|
}
|
|
|
|
static int smp_iSeries_probe(void)
|
|
{
|
|
return cpumask_weight(cpu_possible_mask);
|
|
}
|
|
|
|
static int smp_iSeries_kick_cpu(int nr)
|
|
{
|
|
BUG_ON((nr < 0) || (nr >= NR_CPUS));
|
|
|
|
/* Verify that our partition has a processor nr */
|
|
if (lppaca_of(nr).dyn_proc_status >= 2)
|
|
return -ENOENT;
|
|
|
|
/* The processor is currently spinning, waiting
|
|
* for the cpu_start field to become non-zero
|
|
* After we set cpu_start, the processor will
|
|
* continue on to secondary_start in iSeries_head.S
|
|
*/
|
|
paca[nr].cpu_start = 1;
|
|
|
|
return 0;
|
|
}
|
|
|
|
static void __devinit smp_iSeries_setup_cpu(int nr)
|
|
{
|
|
}
|
|
|
|
static struct smp_ops_t iSeries_smp_ops = {
|
|
.message_pass = NULL, /* Use smp_muxed_ipi_message_pass */
|
|
.cause_ipi = smp_iSeries_cause_ipi,
|
|
.probe = smp_iSeries_probe,
|
|
.kick_cpu = smp_iSeries_kick_cpu,
|
|
.setup_cpu = smp_iSeries_setup_cpu,
|
|
};
|
|
|
|
/* This is called very early. */
|
|
void __init smp_init_iSeries(void)
|
|
{
|
|
smp_ops = &iSeries_smp_ops;
|
|
}
|