diff options
author | Jason A. Harmening <jah@FreeBSD.org> | 2021-03-10 04:43:01 +0000 |
---|---|---|
committer | Jason A. Harmening <jah@FreeBSD.org> | 2021-03-21 02:23:59 +0000 |
commit | d22883d715440f743ab427396f0a87b72e724d18 (patch) | |
tree | 9a28764dfa03707bb4f2a0beb9c036c806d6c46b /sys/riscv/include | |
parent | f9693bef8dc83284e7ac905adc346f7d866b5245 (diff) | |
download | src-d22883d715440f743ab427396f0a87b72e724d18.tar.gz src-d22883d715440f743ab427396f0a87b72e724d18.zip |
Remove PCPU_INC
e4b8deb22227 removed the last in-tree uses of PCPU_INC(). Its
potential benefit is also practically nonexistent. Non-x86
platforms already implement it as PCPU_ADD(..., 1), and according
to [0] there are no recent x86 processors for which the 'inc'
instruction provides a performance benefit over the equivalent
memory-operand form of the 'add' instruction. The only remaining
benefit of 'inc' is smaller instruction size, which in this case
is inconsequential given the limited number of per-CPU data consumers.
[0]: https://www.agner.org/optimize/instruction_tables.pdf
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D29308
Diffstat (limited to 'sys/riscv/include')
-rw-r--r-- | sys/riscv/include/pcpu.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/riscv/include/pcpu.h b/sys/riscv/include/pcpu.h index 5068596462fc..af5eb6fd5c41 100644 --- a/sys/riscv/include/pcpu.h +++ b/sys/riscv/include/pcpu.h @@ -79,7 +79,6 @@ get_curthread(void) #define PCPU_GET(member) (get_pcpu()->pc_ ## member) #define PCPU_ADD(member, value) (get_pcpu()->pc_ ## member += (value)) -#define PCPU_INC(member) PCPU_ADD(member, 1) #define PCPU_PTR(member) (&get_pcpu()->pc_ ## member) #define PCPU_SET(member,value) (get_pcpu()->pc_ ## member = (value)) |