cpuref
struct cpuref cpuref;
for (rv = platform_smp_first_cpu(&cpuref); rv == 0;
rv = platform_smp_next_cpu(&cpuref)) {
if (cpuref.cr_hwref == servers[i]) {
pcpu_find(cpuref.cr_cpuid);
struct cpuref cpuref;
cpuref.cr_hwref = 0;
cpuref.cr_cpuid = 0;
freq = platform_timebase_freq(&cpuref);
static u_long bare_timebase_freq(platform_t, struct cpuref *cpuref);
bare_timebase_freq(platform_t plat, struct cpuref *cpuref)
u_long platform_timebase_freq(struct cpuref *);
int platform_smp_first_cpu(struct cpuref *);
int platform_smp_next_cpu(struct cpuref *);
int platform_smp_get_bsp(struct cpuref *);
static int mpc85xx_smp_next_cpu(platform_t, struct cpuref *cpuref);
static int mpc85xx_smp_get_bsp(platform_t, struct cpuref *cpuref);
mpc85xx_timebase_freq(platform_t plat, struct cpuref *cpuref)
mpc85xx_smp_first_cpu(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = cpu;
cpuref->cr_hwref = cpuref->cr_cpuid;
printf("powerpc_smp_first_cpu: cpuid %d\n", cpuref->cr_cpuid);
mpc85xx_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = cpu++;
for (i = 0, node = OF_child(node); i < cpuref->cr_cpuid;
cpuref->cr_hwref = reg;
cpuref->cr_hwref = cpuref->cr_cpuid;
cpuref->cr_cpuid, (int)cpuref->cr_hwref);
mpc85xx_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = mfspr(SPR_PIR);
cpuref->cr_hwref = cpuref->cr_cpuid;
static u_long mpc85xx_timebase_freq(platform_t, struct cpuref *cpuref);
static int mpc85xx_smp_first_cpu(platform_t, struct cpuref *cpuref);
powermac_timebase_freq(platform_t plat, struct cpuref *cpuref)
phandle = cpuref->cr_hwref;
powermac_smp_fill_cpuref(struct cpuref *cpuref, phandle_t cpu)
cpuref->cr_hwref = cpu;
cpuref->cr_cpuid = cpuid & 0xff;
powermac_smp_first_cpu(platform_t plat, struct cpuref *cpuref)
return (powermac_smp_fill_cpuref(cpuref, cpu));
powermac_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
cpu = OF_peer(cpuref->cr_hwref);
return (powermac_smp_fill_cpuref(cpuref, cpu));
powermac_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
return (powermac_smp_fill_cpuref(cpuref, bsp));
static u_long powermac_timebase_freq(platform_t, struct cpuref *cpuref);
static int powermac_smp_first_cpu(platform_t, struct cpuref *cpuref);
static int powermac_smp_next_cpu(platform_t, struct cpuref *cpuref);
static int powermac_smp_get_bsp(platform_t, struct cpuref *cpuref);
static struct cpuref platform_cpuref[MAXCPU];
powernv_timebase_freq(platform_t plat, struct cpuref *cpuref)
static struct cpuref tmp_cpuref[MAXCPU];
powernv_smp_first_cpu(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = 0;
cpuref->cr_hwref = platform_cpuref[0].cr_hwref;
cpuref->cr_domain = platform_cpuref[0].cr_domain;
powernv_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
id = cpuref->cr_cpuid + 1;
cpuref->cr_cpuid = platform_cpuref[id].cr_cpuid;
cpuref->cr_hwref = platform_cpuref[id].cr_hwref;
cpuref->cr_domain = platform_cpuref[id].cr_domain;
powernv_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = platform_cpuref[0].cr_cpuid;
cpuref->cr_hwref = platform_cpuref[0].cr_hwref;
cpuref->cr_domain = platform_cpuref[0].cr_domain;
static u_long powernv_timebase_freq(platform_t, struct cpuref *cpuref);
static int powernv_smp_first_cpu(platform_t, struct cpuref *cpuref);
static int powernv_smp_next_cpu(platform_t, struct cpuref *cpuref);
static int powernv_smp_get_bsp(platform_t, struct cpuref *cpuref);
struct cpuref cpu;
struct cpuref bsp;
struct cpuref cpuref;
error = platform_smp_first_cpu(&cpuref);
mp_maxid = max(cpuref.cr_cpuid, mp_maxid);
error = platform_smp_next_cpu(&cpuref);
struct cpuref bsp, cpu;
platform_timebase_freq(struct cpuref *cpu)
platform_smp_first_cpu(struct cpuref *cpu)
platform_smp_next_cpu(struct cpuref *cpu)
platform_smp_get_bsp(struct cpuref *cpu)
ps3_timebase_freq(platform_t plat, struct cpuref *cpuref)
ps3_smp_first_cpu(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = 0;
cpuref->cr_hwref = ps3_boot_pir;
ps3_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
if (cpuref->cr_cpuid >= 1)
cpuref->cr_cpuid++;
cpuref->cr_hwref = !ps3_boot_pir;
ps3_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = 0;
cpuref->cr_hwref = ps3_boot_pir;
static u_long ps3_timebase_freq(platform_t, struct cpuref *cpuref);
static int ps3_smp_first_cpu(platform_t, struct cpuref *cpuref);
static int ps3_smp_next_cpu(platform_t, struct cpuref *cpuref);
static int ps3_smp_get_bsp(platform_t, struct cpuref *cpuref);
chrp_timebase_freq(platform_t plat, struct cpuref *cpuref)
chrp_smp_first_cpu(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = 0;
cpuref->cr_hwref = platform_cpuref[0].cr_hwref;
chrp_smp_next_cpu(platform_t plat, struct cpuref *cpuref)
id = cpuref->cr_cpuid + 1;
cpuref->cr_cpuid = platform_cpuref[id].cr_cpuid;
cpuref->cr_hwref = platform_cpuref[id].cr_hwref;
chrp_smp_get_bsp(platform_t plat, struct cpuref *cpuref)
cpuref->cr_cpuid = platform_cpuref[0].cr_cpuid;
cpuref->cr_hwref = platform_cpuref[0].cr_hwref;
static struct cpuref tmp_cpuref[MAXCPU];
static u_long chrp_timebase_freq(platform_t, struct cpuref *cpuref);
static int chrp_smp_first_cpu(platform_t, struct cpuref *cpuref);
static int chrp_smp_next_cpu(platform_t, struct cpuref *cpuref);
static int chrp_smp_get_bsp(platform_t, struct cpuref *cpuref);
static struct cpuref platform_cpuref[MAXCPU];