~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/platforms/chrp/smp.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-tz023xykf0i6eosh
Tags: upstream-3.2.0
ImportĀ upstreamĀ versionĀ 3.2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Smp support for CHRP machines.
 
3
 *
 
4
 * Written by Cort Dougan (cort@cs.nmt.edu) borrowing a great
 
5
 * deal of code from the sparc and intel versions.
 
6
 *
 
7
 * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu>
 
8
 *
 
9
 */
 
10
 
 
11
#include <linux/kernel.h>
 
12
#include <linux/sched.h>
 
13
#include <linux/smp.h>
 
14
#include <linux/interrupt.h>
 
15
#include <linux/kernel_stat.h>
 
16
#include <linux/delay.h>
 
17
#include <linux/init.h>
 
18
#include <linux/spinlock.h>
 
19
 
 
20
#include <asm/ptrace.h>
 
21
#include <linux/atomic.h>
 
22
#include <asm/irq.h>
 
23
#include <asm/page.h>
 
24
#include <asm/pgtable.h>
 
25
#include <asm/sections.h>
 
26
#include <asm/io.h>
 
27
#include <asm/prom.h>
 
28
#include <asm/smp.h>
 
29
#include <asm/machdep.h>
 
30
#include <asm/mpic.h>
 
31
#include <asm/rtas.h>
 
32
 
 
33
static int __devinit smp_chrp_kick_cpu(int nr)
 
34
{
 
35
        *(unsigned long *)KERNELBASE = nr;
 
36
        asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory");
 
37
 
 
38
        return 0;
 
39
}
 
40
 
 
41
static void __devinit smp_chrp_setup_cpu(int cpu_nr)
 
42
{
 
43
        mpic_setup_this_cpu();
 
44
}
 
45
 
 
46
/* CHRP with openpic */
 
47
struct smp_ops_t chrp_smp_ops = {
 
48
        .message_pass = smp_mpic_message_pass,
 
49
        .probe = smp_mpic_probe,
 
50
        .kick_cpu = smp_chrp_kick_cpu,
 
51
        .setup_cpu = smp_chrp_setup_cpu,
 
52
        .give_timebase = rtas_give_timebase,
 
53
        .take_timebase = rtas_take_timebase,
 
54
};