summaryrefslogtreecommitdiffstats
path: root/arch/mips64/kernel/smp.c
blob: 7888fa01d2afa410e4db463642bbb49012affd96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/threads.h>
#include <linux/time.h>
#include <linux/timex.h>
#include <linux/sched.h>

#include <asm/atomic.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <asm/hardirq.h>

/* The 'big kernel lock' */
spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;

int smp_threads_ready = 0;

static void smp_tune_scheduling (void)
{
}

void __init smp_boot_cpus(void)
{
	global_irq_holder = 0;
	current->processor = 0;
	init_idle();
	smp_tune_scheduling();
}

static atomic_t smp_commenced = ATOMIC_INIT(0);

struct cpuinfo_mips cpu_data[NR_CPUS];

int smp_num_cpus = 1;		/* Number that came online.  */

void __init smp_commence(void)
{
	wmb();
	atomic_set(&smp_commenced,1);
}

static void stop_this_cpu(void *dummy)
{
	/*
	 * Remove this CPU
	 */
	for (;;);
}

void smp_send_stop(void)
{
	smp_call_function(stop_this_cpu, NULL, 1, 0);
	smp_num_cpus = 1;
}

/*
 * this function sends a 'reschedule' IPI to another CPU.
 * it goes straight through and wastes no time serializing
 * anything. Worst case is that we lose a reschedule ...
 */
void smp_send_reschedule(int cpu)
{
}

int __cpu_number_map[NR_CPUS];
int __cpu_logical_map[NR_CPUS];

cycles_t cacheflush_time;

/* Not really SMP stuff ... */
int setup_profiling_timer(unsigned int multiplier)
{
}

/*
 * Run a function on all other CPUs.
 *  <func>      The function to run. This must be fast and non-blocking.
 *  <info>      An arbitrary pointer to pass to the function.
 *  <retry>     If true, keep retrying until ready.
 *  <wait>      If true, wait until function has completed on other CPUs.
 *  [RETURNS]   0 on success, else a negative status code.
 *
 * Does not return until remote CPUs are nearly ready to execute <func>
 * or are or have executed.
 */
int
smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
{
	/* XXX - kinda important ;-)  */
}