aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2022-06-13 17:35:40 +0000
committerBrooks Davis <brooks@FreeBSD.org>2022-06-13 17:35:40 +0000
commit8dc3fdfe69d588851237cc9e2e8cdc90a4a6aa0f (patch)
treeef11927af724fc6d9fa5c4a02f107da24197fb02
parent9f7588dd93e55b7b361c949dd91da8aba9d99ac1 (diff)
amd64: -m32 support for machine/counter.h
Install the i386 counter.h under /usr/include/i386 on amd64 and include when targeting i386. This is a kernel-only header required by procstat's ZFS support. Reviewed by: jhb, imp
-rw-r--r--include/i386/Makefile1
-rw-r--r--sys/amd64/include/counter.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/i386/Makefile b/include/i386/Makefile
index de270655fb69..58c619f4dbdf 100644
--- a/include/i386/Makefile
+++ b/include/i386/Makefile
@@ -14,6 +14,7 @@ INCS= \
# These kernel-only headers are used by procstat's ZFS support.
# This should be fixed.
INCS+= \
+ counter.h \
pcpu.h \
pcpu_aux.h
INCSDIR= ${INCLUDEDIR}/i386
diff --git a/sys/amd64/include/counter.h b/sys/amd64/include/counter.h
index e7eb19e058cd..1d641a365e3f 100644
--- a/sys/amd64/include/counter.h
+++ b/sys/amd64/include/counter.h
@@ -28,6 +28,10 @@
* $FreeBSD$
*/
+#ifdef __i386__
+#include <i386/counter.h>
+#else /* !__i386__ */
+
#ifndef __MACHINE_COUNTER_H__
#define __MACHINE_COUNTER_H__
@@ -90,3 +94,5 @@ counter_u64_add(counter_u64_t c, int64_t inc)
}
#endif /* ! __MACHINE_COUNTER_H__ */
+
+#endif /* __i386__ */