Path: blob/master/arch/powerpc/platforms/chrp/smp.c
10820 views
/*1* Smp support for CHRP machines.2*3* Written by Cort Dougan ([email protected]) borrowing a great4* deal of code from the sparc and intel versions.5*6* Copyright (C) 1999 Cort Dougan <[email protected]>7*8*/910#include <linux/kernel.h>11#include <linux/sched.h>12#include <linux/smp.h>13#include <linux/interrupt.h>14#include <linux/kernel_stat.h>15#include <linux/delay.h>16#include <linux/init.h>17#include <linux/spinlock.h>1819#include <asm/ptrace.h>20#include <asm/atomic.h>21#include <asm/irq.h>22#include <asm/page.h>23#include <asm/pgtable.h>24#include <asm/sections.h>25#include <asm/io.h>26#include <asm/prom.h>27#include <asm/smp.h>28#include <asm/machdep.h>29#include <asm/mpic.h>30#include <asm/rtas.h>3132static int __devinit smp_chrp_kick_cpu(int nr)33{34*(unsigned long *)KERNELBASE = nr;35asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory");3637return 0;38}3940static void __devinit smp_chrp_setup_cpu(int cpu_nr)41{42mpic_setup_this_cpu();43}4445/* CHRP with openpic */46struct smp_ops_t chrp_smp_ops = {47.message_pass = smp_mpic_message_pass,48.probe = smp_mpic_probe,49.kick_cpu = smp_chrp_kick_cpu,50.setup_cpu = smp_chrp_setup_cpu,51.give_timebase = rtas_give_timebase,52.take_timebase = rtas_take_timebase,53};545556