git: dc1514eda55c - main - x86: make machine/sysarch.h usable from assembler
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 25 Oct 2026 03:40:01 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=dc1514eda55c5a2439cb5b8fa5c08e78468b7d3b
commit dc1514eda55c5a2439cb5b8fa5c08e78468b7d3b
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-10-25 01:49:59 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-10-25 03:39:25 +0000
x86: make machine/sysarch.h usable from assembler
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
---
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 094995239043..fa38de0486ff 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;
@@ -167,6 +169,8 @@ int amd64_set_ldt(struct thread *, struct i386_ldt_args *,
int amd64_get_ioperm(struct thread *, struct i386_ioperm_args *);
int amd64_set_ioperm(struct thread *, struct i386_ioperm_args *);
int amd64_pkru_update(struct thread *, uintptr_t, size_t, u_int, int, bool);
-#endif
+#endif /* _KERNEL */
+
+#endif /* LOCORE */
#endif /* !_MACHINE_SYSARCH_H_ */