From nobody Thu Feb 9 07:56:39 2023 X-Original-To: dev-commits-src-branches@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 4PC8MX6590z3myB9; Thu, 9 Feb 2023 07:56:40 +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 4PC8MX0vsKz44lB; Thu, 9 Feb 2023 07:56:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675929400; 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=lYrw8DzXQ/1lnSu7OJb7AGGyIkJy0szRvcBqtwLhojA=; b=VBGdFRFdQ448DyognHhA6a+B7fCGrpLMmkTnnXPvQuqTGAVxP5kr/sLpytOVgrw/YnIcEA 9F99ceqdBJR3Ak1wr1iycZKPMGzV9LVGyCLIEs0xBL9T1jfaq3W92p8PfLb1QlWFhCZWfM X7AwlmrRbxQX/sTmxENvpbfvzgLiV1vyH0H8wWojLCdRSEkht54zd2XiTOMGm3uGJOWy23 R1Q4GPj3RlUTOrSbXEAvAlVLU1wrRlVe57lzRQ0wFuWcvxutz18kYRR0eOtsDttMWPMDJP hI6+61zJ9G91FMBpAZaW2Gk3tBOSPBpbgA1c+GMVQn3AstvuluLw2gHPalj72w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675929400; 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=lYrw8DzXQ/1lnSu7OJb7AGGyIkJy0szRvcBqtwLhojA=; b=DaRjIxx8q1WdRL/+pySBJSY67f8G7Zn9bAziS8x3O9EXrX861BkWns7BIwuJYPq+0pLv9d b/rgT3usPw3aF8v4qEKjTZMHxDg65BgniJv/FF0YAOY7axVa1NDLCKmWcfd0h0JT+wbdkj VaIBjCw56MkFDLd3eYOQgmIX+Y4SM1k6vc2rNBv01Tff8Ac5f9xPYaDOsRtz3EuV6yDVoc kTaWMeH6NvPVRULDZfHINEPgDXsGspYW2zXh2e/Oeg8wy9mKLujSivK4tM+5TkFnZH75tK 5pATeIFO5GrJ/JpInSBS06rD7TsTd5jzrJ6tiB6bLblWezO/PA7OwmjkNmbxVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675929400; a=rsa-sha256; cv=none; b=P0gLgfBSxDhuVNtJiAIiP1ARgClNGzMw3Dp+yF0Oe7IKZVSNQvQnSc61y0d7C7ZIVd7xrU 09xLY+CB67NBgaJLtd7pXQ+idtbTDECFRGAn7IIU0KeVhsoWEGgdKaJZr7gRRv8gSSuur+ hb0C3HAVnanYIxW7us6hX7+zVty6Mt6G6tOARIcGwhiZUn7oWqb0kWmIJj0zkIfHhu6WUj vATS7u0FwrsFUestZ22rJEaeEPPhqttdeDv+wqugOjYJkwMzGoRkX2lZ+81rz6mmfm4QQL g9q4+wgklrxdHtfQsLuFFfWkfWcRuFSYWqBawsSnTORMiNzL2s9RXBHOC2VUGA== 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 4PC8MW73ZkzVZQ; Thu, 9 Feb 2023 07:56:39 +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 3197udC6092821; Thu, 9 Feb 2023 07:56:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3197udV3092820; Thu, 9 Feb 2023 07:56:39 GMT (envelope-from git) Date: Thu, 9 Feb 2023 07:56:39 GMT Message-Id: <202302090756.3197udV3092820@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: e00cdc17345e - stable/13 - linux(4): Deduplicate MI futex structures. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: e00cdc17345e131c94a77cfe6c633b8b2e71ef95 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=e00cdc17345e131c94a77cfe6c633b8b2e71ef95 commit e00cdc17345e131c94a77cfe6c633b8b2e71ef95 Author: Dmitry Chagin AuthorDate: 2023-02-01 18:57:04 +0000 Commit: Dmitry Chagin CommitDate: 2023-02-09 07:54:16 +0000 linux(4): Deduplicate MI futex structures. MFC after: 1 week (cherry picked from commit 575e48f1c4eb05fe8df6aaeb5f55e17c63a02639) --- sys/amd64/linux/linux.h | 11 ----------- sys/amd64/linux32/linux.h | 11 ----------- sys/arm64/linux/linux.h | 11 ----------- sys/compat/linux/linux_futex.h | 11 +++++++++++ sys/i386/linux/linux.h | 11 ----------- sys/i386/linux/linux_copyout.c | 1 + 6 files changed, 12 insertions(+), 44 deletions(-) diff --git a/sys/amd64/linux/linux.h b/sys/amd64/linux/linux.h index c9e28f20ef94..b31b520cb573 100644 --- a/sys/amd64/linux/linux.h +++ b/sys/amd64/linux/linux.h @@ -277,17 +277,6 @@ struct l_ifconf { #define linux_copyout_rusage(r, u) copyout(r, u, sizeof(*r)) -/* robust futexes */ -struct linux_robust_list { - l_uintptr_t next; -}; - -struct linux_robust_list_head { - struct linux_robust_list list; - l_long futex_offset; - l_uintptr_t pending_list; -}; - /* This corresponds to 'struct user_regs_struct' in Linux. */ struct linux_pt_regset { l_ulong r15; diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 7909c9c2081b..c77897344506 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -442,17 +442,6 @@ int linux32_copyinuio(struct l_iovec32 *iovp, l_ulong iovcnt, int linux_copyout_rusage(struct rusage *ru, void *uaddr); #endif /* _KERNEL */ -/* robust futexes */ -struct linux_robust_list { - l_uintptr_t next; -}; - -struct linux_robust_list_head { - struct linux_robust_list list; - l_long futex_offset; - l_uintptr_t pending_list; -}; - /* This corresponds to 'struct user_regs_struct32' in Linux. */ struct linux_pt_regset32 { l_uint ebx; diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index fe9c9b23e552..8ecadff2e220 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -217,17 +217,6 @@ struct l_ifreq { #define linux_copyout_rusage(r, u) copyout(r, u, sizeof(*r)) -/* robust futexes */ -struct linux_robust_list { - l_uintptr_t next; -}; - -struct linux_robust_list_head { - struct linux_robust_list list; - l_long futex_offset; - l_uintptr_t pending_list; -}; - struct linux_pt_regset { l_ulong x[31]; l_ulong sp; diff --git a/sys/compat/linux/linux_futex.h b/sys/compat/linux/linux_futex.h index 189db4e17c4f..53fe1bfd0955 100644 --- a/sys/compat/linux/linux_futex.h +++ b/sys/compat/linux/linux_futex.h @@ -79,6 +79,17 @@ #define FUTEX_TID_MASK 0x3fffffff #define FUTEX_BITSET_MATCH_ANY 0xffffffff +/* robust futexes */ +struct linux_robust_list { + l_uintptr_t next; +}; + +struct linux_robust_list_head { + struct linux_robust_list list; + l_long futex_offset; + l_uintptr_t pending_list; +}; + int futex_xchgl(int oparg, uint32_t *uaddr, int *oldval); int futex_addl(int oparg, uint32_t *uaddr, int *oldval); int futex_orl(int oparg, uint32_t *uaddr, int *oldval); diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 86fca2976f83..c651da6b5857 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -395,15 +395,4 @@ struct l_desc_struct { #define linux_copyout_rusage(r, u) copyout(r, u, sizeof(*r)) -/* robust futexes */ -struct linux_robust_list { - struct linux_robust_list *next; -}; - -struct linux_robust_list_head { - struct linux_robust_list list; - l_long futex_offset; - struct linux_robust_list *pending_list; -}; - #endif /* !_I386_LINUX_H_ */ diff --git a/sys/i386/linux/linux_copyout.c b/sys/i386/linux/linux_copyout.c index 6dc98bc8bf5d..5672787d5df7 100644 --- a/sys/i386/linux/linux_copyout.c +++ b/sys/i386/linux/linux_copyout.c @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include