aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/include
diff options
context:
space:
mode:
authorJason A. Harmening <jah@FreeBSD.org>2021-03-10 04:43:01 +0000
committerJason A. Harmening <jah@FreeBSD.org>2021-03-21 02:23:59 +0000
commitd22883d715440f743ab427396f0a87b72e724d18 (patch)
tree9a28764dfa03707bb4f2a0beb9c036c806d6c46b /sys/arm/include
parentf9693bef8dc83284e7ac905adc346f7d866b5245 (diff)
downloadsrc-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/arm/include')
-rw-r--r--sys/arm/include/pcpu.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/arm/include/pcpu.h b/sys/arm/include/pcpu.h
index 4d609b10bf73..2353b1d06b17 100644
--- a/sys/arm/include/pcpu.h
+++ b/sys/arm/include/pcpu.h
@@ -136,7 +136,6 @@ set_tls(void *tls)
#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))