From nobody Wed Jun 22 11:41:12 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A36E1871FED; Wed, 22 Jun 2022 11:41:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LShKj2nndz4sKv; Wed, 22 Jun 2022 11:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKYmWtoLuW26leQLFsYkC7U2C5NyYLbWjcJQuIlrXfw=; b=OfJ8XO8tktJmCWsubmbJKaogNZsxPNgsp/ffXJyOAkqLweoiKE5W/I6J7oqZMFE36dyCwi hs72IghzmVhAjWPK4hYmu/43L18WX+isp8gPcRWHvh1ZlJ2nrzzqJh/eTEc4zCYniqh8ms 7ord7yAYfDYf5bh7fGkHKnOZudUokYV0XZWks1eqDh9e+TD6AHXq5Y2kyDLhZ4x8YF3YDt VI1hri+cP93ykjpZp91E3bsT4nRG6GIIN6A43XV0UqbHZ7sGcr7ReL3MdyKB4OwyGwYpCN WM8ktMKxsZ1KRm6Hv8YnemBabdO4mDWIEn3tgPqMVrXRzMqtvXo0s3eJEcrnmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 594062571F; Wed, 22 Jun 2022 11:41:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25MBfCin023938; Wed, 22 Jun 2022 11:41:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25MBfCfF023937; Wed, 22 Jun 2022 11:41:12 GMT (envelope-from git) Date: Wed, 22 Jun 2022 11:41:12 GMT Message-Id: <202206221141.25MBfCfF023937@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: d416ee86c73b - main - linux(4): To reuse MD linux.h hide kernel dependencies unde _KERNEL constraint List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d416ee86c73bef55ba29c25cd594156441f1daa9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655898073; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SKYmWtoLuW26leQLFsYkC7U2C5NyYLbWjcJQuIlrXfw=; b=O+bz7MPW/LaWr3TetazVJEmzgukgPiPE4synqmLAktyRUnE/ahZw99GUpe33PgUCvxnZBU Zk75j3UoLx6VGKKpvdqaNT7ENeGFXYXzGjxf2NbiLtmksLh3GWLrKiGnvvxnZ3oL1MbcAa JcNKGyBIySMIYLIEyH3Mmmxjj+pCrb2RIaIGbRrjUaJwUvzRvbA7jNH91brK/uAz+44NHl Lfa7SwbuD2li+XTNyWdq5RJEkg/+CFLLF8lzRgzrHxGn5D1SUklpdQB2lBFXiK6RA7mw9h RAOO3JycRASK4PLUhfMsiM/X8mAclo9f3YxCxr62zo6LLtUirWYO9m6qkeggLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655898073; a=rsa-sha256; cv=none; b=Zp0Ag/gtIE1CEViooqICpkiEdXEgXlX4nC9jzQO2ggSRwzIE+btr/4NxsMzbSoopMEK2p0 h2Al/NenUqE2ulkARQ+53jYSJYoAgwsYU1D951hAhSjVTQ+gHCPmAcZr/7M9mEWJiQPKC9 x5nFHwQ/SAGAVOzjzMaS+ZBitFfihK2zFtmZ1PYaFksQ5i3IKNF2QKD+2UhPkrw+HawBw8 STAEg2PAx2KgokRdxQaAiQwTMy3urK/BVUe7s5k0gfMgOnrh1AQT2bg9c5c6sgXotOOUno qR8Q5nodMR2k+ORxkiHkAd7xRvnvFtDpBYIL1mjf45ZuDvAUXy+qyVJHsJ4qFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d416ee86c73bef55ba29c25cd594156441f1daa9 commit d416ee86c73bef55ba29c25cd594156441f1daa9 Author: Dmitry Chagin AuthorDate: 2022-06-22 11:28:24 +0000 Commit: Dmitry Chagin 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_ */