HomeFreeBSD

riscv: small counter(9) improvements

Description

riscv: small counter(9) improvements

Prefer atomics to critical section. This reduces the cost of the
increment operation and removes the possibility of it being interrupted
by counter_u64_zero().

Use CPU_FOREACH() macro to skip absent CPUs.

Replace hand-rolled address calculation with zpcpu_get().

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D27536

Details

Provenance
mhorneAuthored on
Reviewer
markj
Differential Revision
D27536: riscv: small counter(9) improvements
Parents
rS368557: vnet.9: Use correct location of vnet.h.
Branches
Unknown
Tags
Unknown