git: d416ee86c73b - main - linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 22 Jun 2022 11:41:12 UTC
The branch main has been updated by dchagin:
URL: https://cgit.FreeBSD.org/src/commit/?id=d416ee86c73bef55ba29c25cd594156441f1daa9
commit d416ee86c73bef55ba29c25cd594156441f1daa9
Author: Dmitry Chagin <dchagin@FreeBSD.org>
AuthorDate: 2022-06-22 11:28:24 +0000
Commit: Dmitry Chagin <dchagin@FreeBSD.org>
CommitDate: 2022-06-22 11:28:24 +0000
linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint
MFC after: 2 weeks
---
sys/amd64/linux/linux.h | 2 ++
sys/amd64/linux32/linux.h | 4 ++++
sys/arm64/linux/linux.h | 2 ++
3 files changed, 8 insertions(+)
diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h
index 6f91e86255e2..c9e28f20ef94 100644
--- a/sys/amd64/linux/linux.h
+++ b/sys/amd64/linux/linux.h
@@ -319,6 +319,7 @@ struct linux_pt_regset {
l_ulong gs;
};
+#ifdef _KERNEL
struct reg;
struct syscall_info;
@@ -330,5 +331,6 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg,
struct syscall_info *si);
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
struct linux_pt_regset *l_regset);
+#endif /* _KERNEL */
#endif /* !_AMD64_LINUX_H_ */
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h
index f8b72e060de4..7909c9c2081b 100644
--- a/sys/amd64/linux32/linux.h
+++ b/sys/amd64/linux32/linux.h
@@ -426,6 +426,7 @@ struct l_user_desc {
#define LINUX_GET_USEABLE(desc) \
(((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1)
+#ifdef _KERNEL
struct iovec;
struct uio;
@@ -439,6 +440,7 @@ int linux32_copyiniov(struct l_iovec32 *iovp32, l_ulong iovcnt,
int linux32_copyinuio(struct l_iovec32 *iovp, l_ulong iovcnt,
struct uio **uiop);
int linux_copyout_rusage(struct rusage *ru, void *uaddr);
+#endif /* _KERNEL */
/* robust futexes */
struct linux_robust_list {
@@ -472,11 +474,13 @@ struct linux_pt_regset32 {
l_uint ss;
};
+#ifdef _KERNEL
struct reg32;
void bsd_to_linux_regset32(const struct reg32 *b_reg,
struct linux_pt_regset32 *l_regset);
extern bool linux32_emulate_i386;
+#endif /* _KERNEL */
#endif /* !_AMD64_LINUX_H_ */
diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h
index 9b78ac59f9dc..fe9c9b23e552 100644
--- a/sys/arm64/linux/linux.h
+++ b/sys/arm64/linux/linux.h
@@ -235,6 +235,7 @@ struct linux_pt_regset {
l_ulong cpsr;
};
+#ifdef _KERNEL
struct reg;
struct syscall_info;
@@ -246,5 +247,6 @@ void linux_ptrace_get_syscall_info_machdep(const struct reg *reg,
struct syscall_info *si);
int linux_ptrace_getregs_machdep(struct thread *td, pid_t pid,
struct linux_pt_regset *l_regset);
+#endif /* _KERNEL */
#endif /* _ARM64_LINUX_H_ */