git: 66da93680c97 - stable/15 - x86: make machine/sysarch.h usable from assembler
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 31 Oct 2026 03:18:53 UTC
The branch stable/15 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=66da93680c97645f23b1ce0232c6c3caa9c52824
commit 66da93680c97645f23b1ce0232c6c3caa9c52824
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-25 01:49:59 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-31 03:15:21 +0000
x86: make machine/sysarch.h usable from assembler
(cherry picked from commit dc1514eda55c5a2439cb5b8fa5c08e78468b7d3b)
---
sys/x86/include/sysarch.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/sys/x86/include/sysarch.h b/sys/x86/include/sysarch.h
index 8fda776a3b08..0b0dadfd006f 100644
--- a/sys/x86/include/sysarch.h
+++ b/sys/x86/include/sysarch.h
@@ -71,6 +71,8 @@
#define AMD64_PKRU_EXCL 0x0001
#define AMD64_PKRU_PERSIST 0x0002
+#ifndef LOCORE
+
struct i386_ioperm_args {
unsigned int start;
unsigned int length;
@@ -93,7 +95,7 @@ struct i386_get_xfpustate {
void *addr;
int len;
};
-#else
+#else /* __i386__ */
struct i386_ldt_args {
unsigned int start;
struct user_segment_descriptor *descs __packed;
@@ -116,7 +118,7 @@ struct amd64_get_xfpustate {
void *addr;
int len;
};
-#endif
+#endif /* __i386__ */
struct amd64_set_pkru {
void *addr;
@@ -153,7 +155,7 @@ int x86_pkru_protect_range(void *addr, unsigned long len, unsigned int keyidx,
int x86_pkru_unprotect_range(void *addr, unsigned long len);
int sysarch(int, void *);
__END_DECLS
-#else
+#else /* _KERNEL */
struct thread;
union descriptor;
@@ -166,6 +168,8 @@ int amd64_set_ldt(struct thread *, struct i386_ldt_args *,
struct user_segment_descriptor *);
int amd64_get_ioperm(struct thread *, struct i386_ioperm_args *);
int amd64_set_ioperm(struct thread *, struct i386_ioperm_args *);
-#endif
+#endif /* _KERNEL */
+
+#endif /* LOCORE */
#endif /* !_MACHINE_SYSARCH_H_ */