diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2022-01-18 07:44:38 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2022-01-18 07:44:38 +0000 |
commit | d9dbedca495c57d86b76e4508a01ece7e1cd87ee (patch) | |
tree | 9d1793ddd93a737610bed5a6e3dbb261447d7c82 /sbin | |
parent | cb176dc9418838fa8dfd0d1e6cc476d0fe78e278 (diff) |
plic: Fix cpuid handling
Make `cpu' signed so that the possible return value -1 from
plic_get_cpuid() gets handled correctly in the (cpu < 0) condition.
This prevents plic_attach() from updating sc_contexts[] out of bounds.
When plic_get_cpuid() returns -1, ignore the entry and continue
processing. The error is not fatal. It is normal that secondary CPUs
are not found when running a non-MULTIPROCESSOR kernel on
a multiprocessor machine.
OK kettenis@
Diffstat (limited to 'sbin')
0 files changed, 0 insertions, 0 deletions