From nobody Mon May 22 14:57:56 2023 X-Original-To: dev-commits-src-main@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 4QQ0tl5C88z4BYLF; Mon, 22 May 2023 14:58:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQ0tl4G0Zz3Gj7; Mon, 22 May 2023 14:58:07 +0000 (UTC) (envelope-from kevans@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684767487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hBrLIGVG3jTm9Irc4bD55Q7yhyibcHuvPcmW6eDosWM=; b=CmyREVPQVniTaX7b0ROiOhdiax+Hg8rzkpEVejhYx9Xq6Ukx3F8UIV9ASvghN6kbdqiZWe zHo340T8i7evnMWhdM8xbka7uaD3tpvtmK/N5IZUBfnPBipsQOU+ohTzK6WvjbdvPN8tuc W0bTWd/W8KqIbH97H1Pz132PANKhIwaz7ePVaLojLC/9icI84SbkpWt+EM+d/NlPdade7F 7zBhtWYpc+4Or1nixEEQLHopseUaR/T1UXN5jy8xDWCHp53Bx2UIP0D0/Mo/UYVE/SocOR cJVUTbqxIr+2hap6zwfqv77PzaMnNL4FiFPQqa+JAAmB8wJ4GR9fDzyB+hoNuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684767487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hBrLIGVG3jTm9Irc4bD55Q7yhyibcHuvPcmW6eDosWM=; b=ede4yoR3Q3L307D+jZI3wHw9+x8vHUMHlMB9KwLyB+TLfNN3A6e6vIx70qKL/pfBsBHyCa w0uRB26KA0jMuXl+JWM/NE6dvcOsb16F8RC3+Z4w/YzAQ2ov8fJo9F8E4987VP0jtFkMG7 d0kc73wd0YYDxpHBHLMUPcuTs3P1NQK2WOR0G3vxPC94Jd5gdd4TNZHDZp6A+Qe7rFqAFE z6U/zxkL/cdUD2OP9cBZOn/T2MB1q1CQWqizLVvjhtKhFR9qP986uDPYYeNsvivnGop+xT GjfzAQlkghdc/u+MAuh/A3oBngwIPoDC66hO99bBbEpAyPBfqUX1Jp0nlnrraQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684767487; a=rsa-sha256; cv=none; b=nKkyBQhvccIuoryTNs2cVwYdPbYZritiZkwx0Y4Hp5TSWKtNxbOw5HncJ4xZLb8TT+c2Wo wPqZTCHdO08jIGExK+wZ246MpMAtcRLFyoEVuU7U5YCEVgeNMIMCuA4peBhxelHybBEV7C svnuUNsb6wHXJRS6rAj6yr10Ig3IfIUmAzfcot5hN7I7pTT01aVkO5fIJaE9MLEQOz8bOe Ima3sKgKYrn2/D5C1J36BDlaE/xAxF86Et+dyvWoThoMxl+GKdpAQv6cJ1KiAFzoRP3sF7 Xb2Q0NCVL+xkOpmz5IBk0ofFRaw9qw9FPG1oBuV43Z0oSrfUuW3/4LaYyOt4dw== Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QQ0tl3BqPz15K8; Mon, 22 May 2023 14:58:07 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-62577da77d0so6393566d6.2; Mon, 22 May 2023 07:58:07 -0700 (PDT) X-Gm-Message-State: AC+VfDxDSZvGLSt48IfZss/NSDBqBhV4KdjyNlAaxPnj9TJ1/S9eLNr9 fR2ct+TGcvqUp/9I0j6pCOXI9UWCQLzkyNDDoCE= X-Google-Smtp-Source: ACHHUZ4RGCoCVvFjcIRigqQRVW2s+m00KgGqlJswCrm6FeZRE6xuzjea8ETKeSK3Bna3GWAltBlVH3Hn8Bqmo1QtDKI= X-Received: by 2002:a05:6214:f0a:b0:5fd:7701:88c5 with SMTP id gw10-20020a0562140f0a00b005fd770188c5mr22567052qvb.6.1684767487033; Mon, 22 May 2023 07:58:07 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202305151542.34FFgONF071780@gitrepo.freebsd.org> <663D9FB2-D1EF-4D51-9FB1-038AF6AA98C0@freebsd.org> In-Reply-To: <663D9FB2-D1EF-4D51-9FB1-038AF6AA98C0@freebsd.org> From: Kyle Evans Date: Mon, 22 May 2023 09:57:56 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: ccb59683b983 - main - arm64: add tests for swp/swpb emulation To: Jessica Clarke Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-ThisMailContainsUnwantedMimeParts: N On Mon, May 15, 2023 at 5:00=E2=80=AFPM Jessica Clarke = wrote: > > On 15 May 2023, at 16:42, Kyle Evans wrote: > > > > The branch main has been updated by kevans: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dccb59683b98360afaf5b5bb6= 41a68fea22c68d0b > > > > commit ccb59683b98360afaf5b5bb641a68fea22c68d0b > > Author: Kyle Evans > > AuthorDate: 2023-05-15 15:42:16 +0000 > > Commit: Kyle Evans > > CommitDate: 2023-05-15 15:42:16 +0000 > > > > arm64: add tests for swp/swpb emulation > > > > One test is suitable to be hooked up to the build, so I've done this > > here. The other test lives in tools/regression because failure is a > > bit more subjective -- generally, one runs it for some unbounded amo= unt > > of time and observe if it eventually exits because two threads acqui= red > > the same mutex. > > > > Reviewed by: imp, mmel > > Sponsored by: Stormshield > > Sponsored by: Klara, Inc. > > Differential Revision: https://reviews.freebsd.org/D39668 > > --- > > etc/mtree/BSD.tests.dist | 2 + > > tests/sys/Makefile | 1 + > > tests/sys/compat32/Makefile | 6 + > > tests/sys/compat32/Makefile.inc | 4 + > > tests/sys/compat32/aarch64/Makefile | 24 ++ > > tests/sys/compat32/aarch64/common.sh | 9 + > > tests/sys/compat32/aarch64/swp_cond_test.sh | 14 + > > tests/sys/compat32/aarch64/swp_cond_test_impl.S | 413 +++++++++++++++= +++++++ > > tests/sys/compat32/aarch64/swp_test.sh | 14 + > > tests/sys/compat32/aarch64/swp_test_impl.S | 216 +++++++++++ > > tools/regression/compat32/aarch64/Makefile | 4 + > > tools/regression/compat32/aarch64/swp_test_impl.S | 410 +++++++++++++++= ++++++ > > 12 files changed, 1117 insertions(+) > > > > ... > > diff --git a/tests/sys/compat32/aarch64/Makefile b/tests/sys/compat32/a= arch64/Makefile > > new file mode 100644 > > index 000000000000..716182b15d9c > > --- /dev/null > > +++ b/tests/sys/compat32/aarch64/Makefile > > @@ -0,0 +1,24 @@ > > +PACKAGE=3D tests > > +FILESGROUPS+=3D asmprogs > > + > > +ACFLAGS=3D -target armv7-unknown-freebsd${OS_REVISION} -nostdlib -Wl,-= e -Wl,main -static > > This won=E2=80=99t work with GCC, nor will it work with an LLVM built wit= h only > AArch64 enabled as a target (e.g. -DWITHOUT_LLVM_TARGET_ALL > -DWITHOUT_LLVM_TARGET_ARM; latter is needed since we do default to > enabling ARM if AArch64 is even for a cut-down toolchain so that -m32 > works). This is why the freebsd32 sigcode in arm64 kernels is written > as hex (with disassembly comments) rather than assembled from proper > source. > Hi, Just dropping a note that I have still been thinking about this one. It's half tempting to leave the build infrastructure for the impl binaries in place (+ fixed for GCC, just to be flexible), but disconnected with the expectation that the result gets committed rather than run as part of the build. That's a bit gross, but getting hex with disassembly comments somewhere in such a way that we can exec it properly as a 32-bit arm image is also a bit gross. Thanks, Kyle Evans