Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/malta/malta_mp.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <sys/systm.h> | #include <sys/systm.h> | ||||
#include <machine/cpufunc.h> | #include <machine/cpufunc.h> | ||||
#include <machine/hwfunc.h> | #include <machine/hwfunc.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <machine/smp.h> | #include <machine/smp.h> | ||||
#define MALTA_MAXCPU 2 | |||||
#define VPECONF0_VPA (1 << 0) | #define VPECONF0_VPA (1 << 0) | ||||
#define MVPCONTROL_VPC (1 << 1) | #define MVPCONTROL_VPC (1 << 1) | ||||
#define MVPCONF0_PVPE_SHIFT 10 | |||||
#define MVPCONF0_PVPE (0xf << MVPCONF0_PVPE_SHIFT) | |||||
br: #define MVPCONF0_PVPE_MASK | |||||
#define TCSTATUS_A (1 << 13) | #define TCSTATUS_A (1 << 13) | ||||
unsigned malta_ap_boot = ~0; | unsigned malta_ap_boot = ~0; | ||||
#define C_SW0 (1 << 8) | #define C_SW0 (1 << 8) | ||||
#define C_SW1 (1 << 9) | #define C_SW1 (1 << 9) | ||||
#define C_IRQ0 (1 << 10) | #define C_IRQ0 (1 << 10) | ||||
#define C_IRQ1 (1 << 11) | #define C_IRQ1 (1 << 11) | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | platform_init_ap(int cpuid) | ||||
set_intr_mask(ipi_intr_mask | clock_int_mask); | set_intr_mask(ipi_intr_mask | clock_int_mask); | ||||
mips_wbflush(); | mips_wbflush(); | ||||
} | } | ||||
void | void | ||||
platform_cpu_mask(cpuset_t *mask) | platform_cpu_mask(cpuset_t *mask) | ||||
{ | { | ||||
uint32_t i, m; | uint32_t i, m, ncpus, reg; | ||||
reg = mftc0(0, 2); | |||||
ncpus = ((reg & MVPCONF0_PVPE) >> MVPCONF0_PVPE_SHIFT) + 1; | |||||
CPU_ZERO(mask); | CPU_ZERO(mask); | ||||
for (i = 0, m = 1 ; i < MALTA_MAXCPU; i++, m <<= 1) | for (i = 0, m = 1 ; i < ncpus; i++, m <<= 1) | ||||
brUnsubmitted Done Inline Actionswhat m is doing here? br: what m is doing here? | |||||
jrtc27AuthorUnsubmitted Done Inline ActionsNothing it would seem; it's been there and unused since the file was created in r305664. I'll remove it. jrtc27: Nothing it would seem; it's been there and unused since the file was created in r305664. I'll… | |||||
CPU_SET(i, mask); | CPU_SET(i, mask); | ||||
} | } | ||||
struct cpu_group * | struct cpu_group * | ||||
platform_smp_topo(void) | platform_smp_topo(void) | ||||
{ | { | ||||
return (smp_topo_none()); | return (smp_topo_none()); | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |
#define MVPCONF0_PVPE_MASK