From owner-svn-src-head@freebsd.org Thu Aug 8 22:59:56 2019 Return-Path: Delivered-To: svn-src-head@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 ADD23B6054; Thu, 8 Aug 2019 22:59:56 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 464P302T49z3Hvs; Thu, 8 Aug 2019 22:59:55 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id x78MxlqC003472 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 8 Aug 2019 15:59:47 -0700 (PDT) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id x78MxlBx003471; Thu, 8 Aug 2019 15:59:47 -0700 (PDT) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@freebsd.org using -f Date: Thu, 8 Aug 2019 15:59:47 -0700 From: Gleb Smirnoff To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r350764 - head/sys/arm64/arm64 Message-ID: <20190808225947.GD1531@FreeBSD.org> References: <201908081748.x78Hm79V085760@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201908081748.x78Hm79V085760@repo.freebsd.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-Rspamd-Queue-Id: 464P302T49z3Hvs X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.951,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2019 22:59:56 -0000 Hi, why do we need COMPAT_43 for arm64 at all? I can't imagine an application that would require this compatibility. A more general question is how far in the future are we going to carry COMPAT_43 for i386/amd64? On Thu, Aug 08, 2019 at 05:48:07PM +0000, Warner Losh wrote: W> Author: imp W> Date: Thu Aug 8 17:48:07 2019 W> New Revision: 350764 W> URL: https://svnweb.freebsd.org/changeset/base/350764 W> W> Log: W> Make arm64 32-bit mode compile with COMPAT_43 W> W> The COMPAT_43 option isn't quite like the other compat options, and arm64 makes W> attempts to support it in 64-bit mode. In 32-bit compat mode, however, two W> syscall implementations that COMPAT_FREEBSD32 assumes will be there are W> missing. Provide implementations for these: ofreebsd32_sigreturn (which we'll W> never encounter, so implement it as nosys as is done in kern_sig.c) and W> ofreebsd32_getpagesize, where we'll always return 4096 since that's the only W> PAGE_SIZE we support, similar to how the ia32 implementation does things. W> W> Reviewed by: manu@ W> Differential Revision: https://reviews.freebsd.org/D21192 W> W> Modified: W> head/sys/arm64/arm64/freebsd32_machdep.c W> W> Modified: head/sys/arm64/arm64/freebsd32_machdep.c W> ============================================================================== W> --- head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:30:51 2019 (r350763) W> +++ head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:48:07 2019 (r350764) W> @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); W> #include W> #include W> #include W> +#include W> #include W> #ifdef VFP W> #include W> @@ -410,3 +411,30 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigs W> mtx_lock(&psp->ps_mtx); W> W> } W> + W> +#ifdef COMPAT_43 W> +/* W> + * COMPAT_FREEBSD32 assumes we have this system call when COMPAT_43 is defined. W> + * FreeBSD/arm provies a similar getpagesize() syscall. W> + */ W> +#define ARM32_PAGE_SIZE 4096 W> +int W> +ofreebsd32_getpagesize(struct thread *td, W> + struct ofreebsd32_getpagesize_args *uap) W> +{ W> + W> + td->td_retval[0] = ARM32_PAGE_SIZE; W> + return (0); W> +} W> + W> +/* W> + * Mirror the osigreturn definition in kern_sig.c for !i386 platforms. This W> + * mirrors what's connected to the FreeBSD/arm syscall. W> + */ W> +int W> +ofreebsd32_sigreturn(struct thread *td, struct ofreebsd32_sigreturn_args *uap) W> +{ W> + W> + return (nosys(td, (struct nosys_args *)uap)); W> +} W> +#endif W> _______________________________________________ W> svn-src-all@freebsd.org mailing list W> https://lists.freebsd.org/mailman/listinfo/svn-src-all W> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" -- Gleb Smirnoff