Exemple #1
0
void __init prom_prepare_cpus(unsigned int max_cpus)
{
	cnodeid_t	cnode;

	for_each_online_node(cnode)
		intr_clear_all(COMPACT_TO_NASID_NODEID(cnode));

	replicate_kernel_text();

	/*
	 * Assumption to be fixed: we're always booted on logical / physical
	 * processor 0.  While we're always running on logical processor 0
	 * this still means this is physical processor zero; it might for
	 * example be disabled in the firwware.
	 */
	alloc_cpupda(0, 0);
}
Exemple #2
0
void __init prom_prepare_cpus(unsigned int max_cpus)
{
	cnodeid_t	cnode;

	for (cnode = 0; cnode < numnodes; cnode++)
		intr_clear_all(COMPACT_TO_NASID_NODEID(cnode));

	/* Master has already done per_cpu_init() */
	install_ipi();

	replicate_kernel_text(numnodes);

	/*
	 * Assumption to be fixed: we're always booted on logical / physical
	 * processor 0.  While we're always running on logical processor 0
	 * this still means this is physical processor zero; it might for
	 * example be disabled in the firwware.
	 */
	alloc_cpupda(0, 0);
}
Exemple #3
0
static void __init ip27_smp_setup(void)
{
	cnodeid_t	cnode;

	for_each_online_node(cnode) {
		if (cnode == 0)
			continue;
		intr_clear_all(COMPACT_TO_NASID_NODEID(cnode));
	}

	replicate_kernel_text();

	/*
	 * Assumption to be fixed: we're always booted on logical / physical
	 * processor 0.  While we're always running on logical processor 0
	 * this still means this is physical processor zero; it might for
	 * example be disabled in the firmware.
	 */
	alloc_cpupda(0, 0);
}
Exemple #4
0
static int do_cpumask(cnodeid_t cnode, nasid_t nasid, int highest)
{
	static int tot_cpus_found = 0;
	lboard_t *brd;
	klcpu_t *acpu;
	int cpus_found = 0;
	cpuid_t cpuid;

	brd = find_lboard((lboard_t *)KL_CONFIG_INFO(nasid), KLTYPE_IP27);

	do {
		acpu = (klcpu_t *)find_first_component(brd, KLSTRUCT_CPU);
		while (acpu) {
			cpuid = acpu->cpu_info.virtid;
			/* cnode is not valid for completely disabled brds */
			if (get_actual_nasid(brd) == brd->brd_nasid)
				cpuid_to_compact_node[cpuid] = cnode;
			if (cpuid > highest)
				highest = cpuid;
			/* Only let it join in if it's marked enabled */
			if ((acpu->cpu_info.flags & KLINFO_ENABLE) &&
			    (tot_cpus_found != NR_CPUS)) {
				cpu_set(cpuid, phys_cpu_present_map);
				alloc_cpupda(cpuid, tot_cpus_found);
				cpus_found++;
				tot_cpus_found++;
			}
			acpu = (klcpu_t *)find_component(brd, (klinfo_t *)acpu,
								KLSTRUCT_CPU);
		}
		brd = KLCF_NEXT(brd);
		if (!brd)
			break;

		brd = find_lboard(brd, KLTYPE_IP27);
	} while (brd);

	return highest;
}