36
37
#include <asm/mipsregs.h>
37
38
#include <asm/mipsmtregs.h>
38
39
#include <asm/mips_mt.h>
41
* Crude manipulation of the CPU masks to control which
42
* which CPU's are brought online during initialisation
44
* Beware... this needs to be called after CPU discovery
45
* but before CPU bringup
47
static int __init allowcpus(char *str)
49
cpumask_t cpu_allow_map;
53
cpus_clear(cpu_allow_map);
54
if (cpulist_parse(str, &cpu_allow_map) == 0) {
55
cpu_set(0, cpu_allow_map);
56
cpus_and(cpu_possible_map, cpu_possible_map, cpu_allow_map);
57
len = cpulist_scnprintf(buf, sizeof(buf)-1, &cpu_possible_map);
59
pr_debug("Allowable CPUs: %s\n", buf);
64
__setup("allowcpus=", allowcpus);
66
43
static void ipi_call_function(unsigned int cpu)
68
unsigned int action = 0;
70
45
pr_debug("CPU%d: %s cpu %d status %08x\n",
71
46
smp_processor_id(), __func__, cpu, read_c0_status());
75
action = GIC_IPI_EXT_INTR_CALLFNC_VPE0;
78
action = GIC_IPI_EXT_INTR_CALLFNC_VPE1;
81
action = GIC_IPI_EXT_INTR_CALLFNC_VPE2;
84
action = GIC_IPI_EXT_INTR_CALLFNC_VPE3;
48
gic_send_ipi(plat_ipi_call_int_xlate(cpu));
91
52
static void ipi_resched(unsigned int cpu)
93
unsigned int action = 0;
95
54
pr_debug("CPU%d: %s cpu %d status %08x\n",
96
55
smp_processor_id(), __func__, cpu, read_c0_status());
100
action = GIC_IPI_EXT_INTR_RESCHED_VPE0;
103
action = GIC_IPI_EXT_INTR_RESCHED_VPE1;
106
action = GIC_IPI_EXT_INTR_RESCHED_VPE2;
109
action = GIC_IPI_EXT_INTR_RESCHED_VPE3;
112
gic_send_ipi(action);
57
gic_send_ipi(plat_ipi_resched_int_xlate(cpu));
205
150
(unsigned long)(gp + sizeof(struct thread_info)));
208
amon_cpu_start(cpu, pc, sp, gp, a0);
153
amon_cpu_start(cpu, pc, sp, (unsigned long)gp, a0);