Remove assertion that a CPU be present before returning a PCPU for it. It

is up to the caller to check for a NULL return value. The assert was meant
to catch buggy code that did not check the return value. Some code, however,
was smart and used the return value to see if a CPU existed, which this
broke.

Requested by:	jhb@
This commit is contained in:
nwhitehorn 2017-11-28 05:39:48 +00:00
parent 8b5b436329
commit 9e2f8a9afd

View File

@ -279,8 +279,6 @@ pcpu_destroy(struct pcpu *pcpu)
struct pcpu *
pcpu_find(u_int cpuid)
{
KASSERT(cpuid_to_pcpu[cpuid] != NULL,
("Getting uninitialized PCPU %d", cpuid));
return (cpuid_to_pcpu[cpuid]);
}