From nobody Fri Jun 17 19:39:56 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 5C98585C85D; Fri, 17 Jun 2022 19:39:58 +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 4LPqBP0cDvz3h9N; Fri, 17 Jun 2022 19:39:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494797; 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=zFDAsiI6rwvLFJDBHbvxMJwPv+vGDVBBeM3OoF2yy7Q=; b=VTyKdNfNeHAohfkA/L4jT2BffOdcFC3/CjhlTcGv+Sf572b/ZBkmB30TgeCU4LR13IAFE/ 6jx2+xi15fAmty8IPup6LrPipcTwiEDLuUuPBnuXffRL45f4t7+CM4wERJ0Sm5P1CflET7 5NVBnUZsO8KQaHQk60P/CFdakSQ0ZYS7XjnEG6H/OcsoK/d2F+GP50EJDX5rqmRLYJxPfV a5eMr25+awe8kubbDD4B8yufAhbk3hfGfzFLz7jqRnEJBpPb+Oexykd/nBbEF55wShDV+w XJKzf/nL3zR2j0FFYgC3/C2a1/HPB0QWRi+xk06A6LZDLfwEF0ef2KcUhQl68g== 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 25AA825C9C; Fri, 17 Jun 2022 19:39:56 +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 25HJdugB016668; Fri, 17 Jun 2022 19:39:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25HJduEo016667; Fri, 17 Jun 2022 19:39:56 GMT (envelope-from git) Date: Fri, 17 Jun 2022 19:39:56 GMT Message-Id: <202206171939.25HJduEo016667@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: d5316587f0db - stable/13 - linux(4): Retire linux_semop implementation. 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/stable/13 X-Git-Reftype: branch X-Git-Commit: d5316587f0db6adf2ea1a1b47e68180b3d163d6a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655494797; 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=zFDAsiI6rwvLFJDBHbvxMJwPv+vGDVBBeM3OoF2yy7Q=; b=IhtUAUrh2jqCdOA8P3UA8MDdnX4g9zlFULpF9wB4jMggRcZ2UXzELYlJFUP49zMLuDtZff tzEOrDN46JmV4gFvqMQhFnsT6qbENsLfDUv1L1Yr+9bQKghONUCmoLTGG2quRYgANcwmyn GAeBOS7De43bgdi5LGwa82horzfjBGXRx7T6H346wVIsbpnl/IApab8a8JqirgKArRwXMv ajNdXtaFyL/CsThJzJbFyjLRnIj47qs/bk9KbQmFrWmTFxcCYjMRWhGa1QMpxi0uf+f7b7 qW+A1qB6gK6IK+cBMbtN74pQPff00CPHngTVn9JO6IpWcZI80M2lQhbwRm8i2Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655494797; a=rsa-sha256; cv=none; b=ML32qiOWUuCDeuzFtmMg6e2/8L8O3xQZsf2B3kv6BHIHD8dPMRD15ezglMu+9FVKOdvqNh qG1n53UE3/LcokvG9NxzLKuV7uy+TLqqc783fQUCCOimCGx+DpoJ0efqCjhErCwfoLsHDD DBQv3QHg6u8fCHvFBi08mE3Aeb9o1WAScWMt/Oz/FbsxfukJLOGxCGqwNkEdnRNbuK33dZ EwLgHa2x4XoI7HJJz8VQP1XgCYtYl1NWvK0VVQMliCZ76G52A8bIJegINz8W+Z06rfWtL1 1CIj/QDWVYimBBzyDNHzb42rn5aivdo72OVJ3+OnY+Q7wcA3yVb5EXzrcfs5wA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=d5316587f0db6adf2ea1a1b47e68180b3d163d6a commit d5316587f0db6adf2ea1a1b47e68180b3d163d6a Author: Dmitry Chagin AuthorDate: 2022-05-06 17:00:13 +0000 Commit: Dmitry Chagin CommitDate: 2022-06-17 19:34:47 +0000 linux(4): Retire linux_semop implementation. In i386 Linux semop called via ipc() multiplexor, so use kern_semop directly from multiplexor. MFC after: 2 weeks (cherry picked from commit f48a68874bf4503a18c0c55887a028dab0a4600f) --- sys/amd64/linux32/linux32_machdep.c | 7 ++----- sys/compat/linux/linux_ipc.c | 17 ----------------- sys/compat/linux/linux_ipc.h | 12 ------------ sys/i386/linux/linux_machdep.c | 7 ++----- 4 files changed, 4 insertions(+), 39 deletions(-) diff --git a/sys/amd64/linux32/linux32_machdep.c b/sys/amd64/linux32/linux32_machdep.c index 9dd988452a1c..baa567339689 100644 --- a/sys/amd64/linux32/linux32_machdep.c +++ b/sys/amd64/linux32/linux32_machdep.c @@ -255,12 +255,9 @@ linux_ipc(struct thread *td, struct linux_ipc_args *args) switch (args->what & 0xFFFF) { case LINUX_SEMOP: { - struct linux_semop_args a; - a.semid = args->arg1; - a.tsops = PTRIN(args->ptr); - a.nsops = args->arg2; - return (linux_semop(td, &a)); + return (kern_semop(td, args->arg1, PTRIN(args->ptr), + args->arg2, NULL)); } case LINUX_SEMGET: { struct linux_semget_args a; diff --git a/sys/compat/linux/linux_ipc.c b/sys/compat/linux/linux_ipc.c index 82fe54fae65e..3e810c303a2c 100644 --- a/sys/compat/linux/linux_ipc.c +++ b/sys/compat/linux/linux_ipc.c @@ -504,23 +504,6 @@ linux_shminfo_pushdown(l_int ver, struct l_shminfo64 *linux_shminfo64, } } -int -linux_semop(struct thread *td, struct linux_semop_args *args) -{ - struct semop_args /* { - int semid; - struct sembuf *sops; - int nsops; - } */ bsd_args; - - if (args->nsops < 1 || args->semid < 0) - return (EINVAL); - bsd_args.semid = args->semid; - bsd_args.sops = PTRIN(args->tsops); - bsd_args.nsops = args->nsops; - return (sys_semop(td, &bsd_args)); -} - int linux_semget(struct thread *td, struct linux_semget_args *args) { diff --git a/sys/compat/linux/linux_ipc.h b/sys/compat/linux/linux_ipc.h index b1bd3fffa4d6..beef18a09507 100644 --- a/sys/compat/linux/linux_ipc.h +++ b/sys/compat/linux/linux_ipc.h @@ -82,16 +82,4 @@ #define LINUX_IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger message sizes, etc. */ -#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32)) - -struct linux_semop_args -{ - l_int semid; - struct l_sembuf *tsops; - l_uint nsops; -}; - -int linux_semop(struct thread *, struct linux_semop_args *); -#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */ - #endif /* _LINUX_IPC_H_ */ diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c index dde11f22d4fe..09d4eb42c772 100644 --- a/sys/i386/linux/linux_machdep.c +++ b/sys/i386/linux/linux_machdep.c @@ -130,12 +130,9 @@ linux_ipc(struct thread *td, struct linux_ipc_args *args) switch (args->what & 0xFFFF) { case LINUX_SEMOP: { - struct linux_semop_args a; - a.semid = args->arg1; - a.tsops = PTRIN(args->ptr); - a.nsops = args->arg2; - return (linux_semop(td, &a)); + return (kern_semop(td, args->arg1, PTRIN(args->ptr), + args->arg2, NULL)); } case LINUX_SEMGET: { struct linux_semget_args a;