Revert r222363, as bde@ pointed out the initial solution was far more
correct.
This commit is contained in:
parent
e370959707
commit
1de471dfee
@ -107,7 +107,7 @@ kgdb_thr_init(void)
|
|||||||
addr = kgdb_lookup("stopped_cpus");
|
addr = kgdb_lookup("stopped_cpus");
|
||||||
CPU_ZERO(&stopped_cpus);
|
CPU_ZERO(&stopped_cpus);
|
||||||
cpusetsize = sysconf(_SC_CPUSET_SIZE);
|
cpusetsize = sysconf(_SC_CPUSET_SIZE);
|
||||||
if (cpusetsize != -1 && (size_t)cpusetsize <= sizeof(cpuset_t) &&
|
if (cpusetsize != -1 && (u_long)cpusetsize <= sizeof(cpuset_t) &&
|
||||||
addr != 0)
|
addr != 0)
|
||||||
kvm_read(kvm, addr, &stopped_cpus, cpusetsize);
|
kvm_read(kvm, addr, &stopped_cpus, cpusetsize);
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ kvm_getpcpu(kvm_t *kd, int cpu)
|
|||||||
}
|
}
|
||||||
|
|
||||||
kcpusetsize = sysconf(_SC_CPUSET_SIZE);
|
kcpusetsize = sysconf(_SC_CPUSET_SIZE);
|
||||||
if (kcpusetsize == -1 || (size_t)kcpusetsize > sizeof(cpuset_t))
|
if (kcpusetsize == -1 || (u_long)kcpusetsize > sizeof(cpuset_t))
|
||||||
return ((void *)-1);
|
return ((void *)-1);
|
||||||
|
|
||||||
if (maxcpu == 0)
|
if (maxcpu == 0)
|
||||||
|
@ -341,7 +341,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
cpusetsize = sysconf(_SC_CPUSET_SIZE);
|
cpusetsize = sysconf(_SC_CPUSET_SIZE);
|
||||||
if (cpusetsize == -1 || (size_t)cpusetsize > sizeof(cpuset_t)) {
|
if (cpusetsize == -1 || (u_long)cpusetsize > sizeof(cpuset_t)) {
|
||||||
list->mtl_error = MEMSTAT_ERROR_KVM_NOSYMBOL;
|
list->mtl_error = MEMSTAT_ERROR_KVM_NOSYMBOL;
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
@ -148,7 +148,7 @@ pmcc_do_enable_disable(struct pmcc_op_list *op_list)
|
|||||||
|
|
||||||
/* Determine the set of active CPUs. */
|
/* Determine the set of active CPUs. */
|
||||||
cpusetsize = sysconf(_SC_CPUSET_SIZE);
|
cpusetsize = sysconf(_SC_CPUSET_SIZE);
|
||||||
if (cpusetsize == -1 || (size_t)cpusetsize > sizeof(cpuset_t)) {
|
if (cpusetsize == -1 || (u_long)cpusetsize > sizeof(cpuset_t)) {
|
||||||
err(EX_OSERR, "ERROR: Cannot determine which CPUs are "
|
err(EX_OSERR, "ERROR: Cannot determine which CPUs are "
|
||||||
"halted");
|
"halted");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user