From nobody Fri May 06 17:03:37 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 257061A825D0; Fri, 6 May 2022 17:03:38 +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 4KvxjP5BgWz4TG4; Fri, 6 May 2022 17:03:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651856617; 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=O/509kuoKA9hfFE8WE9BopEOzN4M7cK70BjZG124Rpw=; b=OdrNnEtTNB4og0eFtS/CmslXOdxhovfQGzlX0bw1ZcJMuxo+uX/ID9CQPW5kNMhQr5FDEQ 7qpzT8ShKAMzrDWgfVLOeKADmdAhckc5D//UEHCxzgcHf4Is6JxsV6OImj+Vd9W5ELLbxw M5PsqUNv05evEkduLpNbPZeBSlbeZzPlt9vNZ+hS5VOMVJi8JFRXPOdGdsXz4P+azNy1qf Jtt9s/3yHBKLS11qlrDEbB6/0LMLqL8KWRrT4+PFR2GX64yO9Ku64AR/q7lesl2MqE/QBE o1DYPl0CMvyTdJ6g8/3A7nGdNBlV4C+fj+CzwmeUDGlKwtlzP+FmAzA65pWPFg== 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 93A8E1FC25; Fri, 6 May 2022 17:03:37 +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 246H3bZu058922; Fri, 6 May 2022 17:03:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 246H3boC058921; Fri, 6 May 2022 17:03:37 GMT (envelope-from git) Date: Fri, 6 May 2022 17:03:37 GMT Message-Id: <202205061703.246H3boC058921@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: f48a68874bf4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: f48a68874bf4503a18c0c55887a028dab0a4600f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651856617; 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=O/509kuoKA9hfFE8WE9BopEOzN4M7cK70BjZG124Rpw=; b=YhpI6FHbFfS1RyDfVe1ojkejmZU7m/C0HgElHoZas7foBzSMLS3Op1Z2d2UVLmf86RcDDb IwCMB3i9BnTs/YWVrqPlkpgpaSHJ1kdiMXxiJ1gxLNMYfr4lemNeWnE7nFevJSczWTe9Ay 1cSq8X8HmCDcHECv0eLA+mn+/ZYNyQTVxkaJYx8TaQMvgcta2Dkw6dnQEy19Rfpsrm8293 P4fDXLBLd02SnELrGGbs5Kt0t4NM4MQKojf28Sl5ar+uCQEuRdw2pLNxQ0xXx172pcuX1h JXs99SilTzYJ3sl5RIEs2YlLB3t4OnsRlCu2ZvvbwekU9gMAAo97QftWqWeECg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651856617; a=rsa-sha256; cv=none; b=mZzXSfjKujl0dDRMk8CGtDwruqYPkia3RsYML9kO2Hqql4TAUYVT9v/RqOTaJ7dc1Outf9 zs8mnYHWjjvqss5L/Q7dFwhK7761pfGUIHi1DJehKppwKv17LGDyh3iofvGxDJbZvDWR+y /A+qr7f/7ul0fEbe68cIHL6eDjfMPdCYtE1nQj5+4lVdS0jtTDtZLDGsLQxmldSiDJ7GDQ mwnic87XnTxR5jIG0NohyPWWQhqYpjHWEKzdz+T+LahZywT2f5AHGrkTefyDwWGIQO64YN YI66P0v1Ta12pFtp0/q1nIOeEx+t/ACAtIvYJ5zKIdACslrlwPLKAcgYVgCL6Q== 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=f48a68874bf4503a18c0c55887a028dab0a4600f commit f48a68874bf4503a18c0c55887a028dab0a4600f Author: Dmitry Chagin AuthorDate: 2022-05-06 17:00:13 +0000 Commit: Dmitry Chagin CommitDate: 2022-05-06 17:00:13 +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 --- 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;