git: 9f7588dd93e5 - main - amd64: -m32 support for machine/pcpu_aux.h

From: Brooks Davis <brooks_at_FreeBSD.org>
Date: Mon, 13 Jun 2022 17:36:11 UTC
The branch main has been updated by brooks:

URL: https://cgit.FreeBSD.org/src/commit/?id=9f7588dd93e55b7b361c949dd91da8aba9d99ac1

commit 9f7588dd93e55b7b361c949dd91da8aba9d99ac1
Author:     Brooks Davis <brooks@FreeBSD.org>
AuthorDate: 2022-06-13 17:35:40 +0000
Commit:     Brooks Davis <brooks@FreeBSD.org>
CommitDate: 2022-06-13 17:35:40 +0000

    amd64: -m32 support for machine/pcpu_aux.h
    
    Install the i386 pcpu_aux.h under /usr/include/i386 on amd64 and include
    when targeting i386.
    
    This is a kernel-only header that is required by procstat's ZFS support.
    
    Reviewed by:    jhb, imp
---
 include/i386/Makefile        | 3 ++-
 sys/amd64/include/pcpu_aux.h | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/include/i386/Makefile b/include/i386/Makefile
index 70d825bab9cf..de270655fb69 100644
--- a/include/i386/Makefile
+++ b/include/i386/Makefile
@@ -14,7 +14,8 @@ INCS=	\
 # These kernel-only headers are used by procstat's ZFS support.
 # This should be fixed.
 INCS+=	\
-	pcpu.h
+	pcpu.h \
+	pcpu_aux.h
 INCSDIR=	${INCLUDEDIR}/i386
 
 .include <bsd.prog.mk>
diff --git a/sys/amd64/include/pcpu_aux.h b/sys/amd64/include/pcpu_aux.h
index 50dfa30fbf5b..229952fb459b 100644
--- a/sys/amd64/include/pcpu_aux.h
+++ b/sys/amd64/include/pcpu_aux.h
@@ -30,6 +30,10 @@
  * $FreeBSD$
  */
 
+#ifdef __i386__
+#include <i386/pcpu_aux.h>
+#else /* !__i386__ */
+
 #ifndef _MACHINE_PCPU_AUX_H_
 #define	_MACHINE_PCPU_AUX_H_
 
@@ -60,3 +64,5 @@ __curthread(void)
 #define	curpcb			(&curthread->td_md.md_pcb)
 
 #endif	/* _MACHINE_PCPU_AUX_H_ */
+
+#endif /* __i386__ */