From owner-svn-src-stable-12@freebsd.org Sun Aug 23 21:46:49 2020 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D747E3CC4B1; Sun, 23 Aug 2020 21:46:49 +0000 (UTC) (envelope-from trasz@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTNn4skQz4Zx1; Sun, 23 Aug 2020 21:46:49 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 700F3E0A4; Sun, 23 Aug 2020 21:46:49 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NLkniW073357; Sun, 23 Aug 2020 21:46:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NLkmJN073354; Sun, 23 Aug 2020 21:46:48 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <202008232146.07NLkmJN073354@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Sun, 23 Aug 2020 21:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364555 - stable/12/sys/compat/linux X-SVN-Group: stable-12 X-SVN-Commit-Author: trasz X-SVN-Commit-Paths: stable/12/sys/compat/linux X-SVN-Commit-Revision: 364555 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2020 21:46:49 -0000 Author: trasz Date: Sun Aug 23 21:46:48 2020 New Revision: 364555 URL: https://svnweb.freebsd.org/changeset/base/364555 Log: MFC r353724 by yuripv: linux: provide just one instance of futex_list Move futex_list definition to linux.c which is included once in linux.ko (i386) and in linux_common.ko (amd64 and aarch64) allowing 32/64 bit linux programs to access the same futexes in the latter case. PR: 240989 Modified: stable/12/sys/compat/linux/linux.c stable/12/sys/compat/linux/linux.h stable/12/sys/compat/linux/linux_futex.c stable/12/sys/compat/linux/linux_futex.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/compat/linux/linux.c ============================================================================== --- stable/12/sys/compat/linux/linux.c Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux.c Sun Aug 23 21:46:48 2020 (r364555) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include +struct futex_list futex_list; + CTASSERT(LINUX_IFNAMSIZ == IFNAMSIZ); static int bsd_to_linux_sigtbl[LINUX_SIGTBLSZ] = { Modified: stable/12/sys/compat/linux/linux.h ============================================================================== --- stable/12/sys/compat/linux/linux.h Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux.h Sun Aug 23 21:46:48 2020 (r364555) @@ -129,4 +129,6 @@ void bsd_to_linux_sigset(sigset_t *, l_sigset_t *); int linux_to_bsd_signal(int sig); int bsd_to_linux_signal(int sig); +extern LIST_HEAD(futex_list, futex) futex_list; + #endif /* _LINUX_MI_H_ */ Modified: stable/12/sys/compat/linux/linux_futex.c ============================================================================== --- stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux_futex.c Sun Aug 23 21:46:48 2020 (r364555) @@ -207,8 +207,6 @@ struct futex { TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; }; -struct futex_list futex_list; - #define FUTEX_LOCK(f) mtx_lock(&(f)->f_lck) #define FUTEX_LOCKED(f) mtx_owned(&(f)->f_lck) #define FUTEX_UNLOCK(f) mtx_unlock(&(f)->f_lck) Modified: stable/12/sys/compat/linux/linux_futex.h ============================================================================== --- stable/12/sys/compat/linux/linux_futex.h Sun Aug 23 21:44:05 2020 (r364554) +++ stable/12/sys/compat/linux/linux_futex.h Sun Aug 23 21:46:48 2020 (r364555) @@ -38,7 +38,6 @@ #ifndef _LINUX_FUTEX_H #define _LINUX_FUTEX_H -extern LIST_HEAD(futex_list, futex) futex_list; extern struct mtx futex_mtx; #define LINUX_FUTEX_WAIT 0