FreeBSD/sys/x86/acpica/srat.c
/*
 * Setup per-CPU domain IDs.
 */
Setup per-CPU domain IDs.
Setup per - CPU domain IDs .
static void
srat_set_cpus(void *dummy)
{
	struct cpu_info *cpu;
	struct pcpu *pc;
	u_int i;
	if (srat_physaddr == 0)
		return;
	for (i = 0; i < MAXCPU; i++) {
		if (CPU_ABSENT(i))
			continue;
		pc = pcpu_find(i);
		KASSERT(pc != NULL, ("no pcpu data for CPU %u", i));
		cpu = &cpus[pc->pc_apic_id];
		if (!cpu->enabled)
			panic("SRAT: CPU with APIC ID %u is not known",
			    pc->pc_apic_id);
		pc->pc_domain = cpu->domain;
		CPU_SET(i, &cpuset_domain[cpu->domain]);
		if (bootverbose)
			printf("SRAT: CPU %u has memory domain %d\n", i,
			    cpu->domain);
	}
}
static void srat_set_cpus ( void * dummy ) { struct cpu_info * cpu ; struct pcpu * pc ; u_int i ; if ( srat_physaddr == 0 ) return ; for ( i = 0 ; i < MAXCPU ; i ++ ) { if ( CPU_ABSENT ( i ) ) continue ; pc = pcpu_find ( i ) ; KASSERT ( pc != NULL , ( " " , i ) ) ; cpu = & cpus [ pc -> pc_apic_id ] ; if ( ! cpu -> enabled ) panic ( " " , pc -> pc_apic_id ) ; pc -> pc_domain = cpu -> domain ; CPU_SET ( i , & cpuset_domain [ cpu -> domain ] ) ; if ( bootverbose ) printf ( " \n " , i , cpu -> domain ) ; } }
Setup per-CPU domain IDs.
Setup per - CPU domain IDs .