From nobody Sun Jul 23 18:27:19 2023 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 4R8BbW6CJKz4p6MP; Sun, 23 Jul 2023 18:27:19 +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 4R8BbW2c25z3hRw; Sun, 23 Jul 2023 18:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690136839; 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=EYlxF6EH9WlgH/g9KyJXNOdy3bBmA9Wpy/uIgq7E3mE=; b=EQVl2GiB4aeWPwQXaRuASx+Qx2X2CDi4FnBV1jkpqNR7f/OKQD1ujb1182DW/iDcgtIYIi BTq3tMaJpZKv99iWKCLHURhy+sNofvimVrhkoT8VhAxuSVyOslSe4MTpZlpteOpmPVtXI7 bLvpj8kkWjXkjMG1G1lyI+CWt3Bj0iOakdaOOU6zRcOgqQ/XRQ4aWa8h6YfjZaLANlyNZA NFGWXsgWHr0Hpl3tW5nYkK/nW2lc6VWKXJeM6mnHAzZcXW/RCaBxTV+bcC5cXba2WGE5/Q dpMElsTXrQrCOWXAQnHTyZdI4R80APLRrT6fxbtfyRsOMM4LN1ppHVhie0ME1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690136839; 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=EYlxF6EH9WlgH/g9KyJXNOdy3bBmA9Wpy/uIgq7E3mE=; b=obUmolUQOIqw0j7ZC/w+5ZgJRSLa3SGEg1TPAzd0+wO5bz/nAUbZrp2EiFJZvlYLGwHHgg loONE157UfxxatSwcxy+3wKc74ZtIt9XU5WdoCcI4O3re+HLiPAk22/UuSRTl6rV9ZxcwB R/YwX6rxfRj25yZAP0KnYK7wlMtMOV40fBXWInJ1qBPxGkbR6Tc5NLYUXA3YLoASg4Iztn hoifHcFxjRUSbF1+hepWNk/4Vb/fU9lVB4XbVn2PqierqdDdkScEecCUT/Q7DqKwugm/mC MMSuimB/pP+z0j+UiZrMD8bbg+Z5CLbKQ/L0EFSJ050jW/zAicBkUJND8Qr0aw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690136839; a=rsa-sha256; cv=none; b=Llh7VMzPS2SvS46zgn21HpZzFzNoSfl86DuGXYQPuO092blzivNU5b3HLgvtTIrEOa4M2C 7a4fcaZy9354JPuxEuIIezRXc0EFlPLGaPJ8VAWotUg3a4gsCr19UcaDofXADszCP19BrM HJ4FAMdS52AEMykdWU54b0POf9ihKJN9/kbuAJpql+xaxkSnYeLn5k66bzkDGscE2XTyVp xLFxEIUQuSv2uq9fKfoVdr+WEDTTpokw8d8lmlZXRHSrBwZQXqdmb6rSgVnyPdLJGZjqPY 9TLktb3IJ/D9x4ivmJW+g76oFdATuZI2sSgrEBKbnVRGIf3Nu0wc2kkpmHbG9w== 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 4R8BbW1YzXzmKr; Sun, 23 Jul 2023 18:27:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36NIRJSF058947; Sun, 23 Jul 2023 18:27:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36NIRJfw058946; Sun, 23 Jul 2023 18:27:19 GMT (envelope-from git) Date: Sun, 23 Jul 2023 18:27:19 GMT Message-Id: <202307231827.36NIRJfw058946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 3ea609f7d794 - stable/13 - Merge commit 2b0f5df7b4e0 from llvm-project (by Jessica Clarke): 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3ea609f7d794675ff74194a36125a1201dabc8fb Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=3ea609f7d794675ff74194a36125a1201dabc8fb commit 3ea609f7d794675ff74194a36125a1201dabc8fb Author: Dimitry Andric AuthorDate: 2023-07-23 11:01:42 +0000 Commit: Dimitry Andric CommitDate: 2023-07-23 17:38:13 +0000 Merge commit 2b0f5df7b4e0 from llvm-project (by Jessica Clarke): [builtins][Mips] Un-break FreeBSD build of __clear_cache Commit 674a17e9bbe8 ("MIPS/compiler_rt: use synci to flush icache on r6") completely removed the OS-specific guards under the guise of "For pre-r6, we can use cacheflush libc function, which is same on Linux and FreeBSD." However, the code in question had guards for Linux and OpenBSD, not Linux and FreeBSD, and FreeBSD does not have a cacheflush libc function as claimed, so this was neither the statement they intended to make nor was it sufficient justification for making the code completely unconditional. Whilst the upcoming FreeBSD 14 release has dropped support for MIPS, FreeBSD 13 has support for it. Fix this by only calling cacheflush on the OSes where it was previously called, and not on other OSes where it either definitely isn't available (FreeBSD) or is unknown (any other OS than the three mentioned in this commit). This is only needed for MFC'ing, as mips has been removed from 14-CURRENT. PR: 271047 MFC after: immediately (cherry picked from commit b8f1c9dd9b3dd9b91e6999b28ab941a2af142702) --- contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c b/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c index 8993761eb3d4..54cbda059315 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c @@ -110,10 +110,14 @@ void __clear_cache(void *start, void *end) { "jr.hb $at\n" "move $at, $0\n" ".set at"); -#else +#elif defined(__linux__) || defined(__OpenBSD__) // Pre-R6 may not be globalized. And some implementations may give strange // synci_step. So, let's use libc call for it. cacheflush(start, end_int - start_int, BCACHE); +#else + (void)start_int; + (void)end_int; + compilerrt_abort(); #endif } #elif defined(__aarch64__) && !defined(__APPLE__)