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 Dec 11 2020, 8:01 PM
Parents
rG00492fb846a5: vnet.9: Use correct location of vnet.h.
Branches
Unknown
Tags
Unknown

Event Timeline