From nobody Tue Apr 5 00:33:33 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 5B2401A83FF5; Tue, 5 Apr 2022 00:33:33 +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 4KXTCK25hvz3jl0; Tue, 5 Apr 2022 00:33:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649118813; 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=rV1M+wM7rO07O9XCx5n796N5AhqxXJj3M+yghjBGcgA=; b=gDhOd+x4A6WsUhe2EMcJr3jxdBH0jJRfN9acO2nje4xRApmkS0rm1zSBRJ20TzMjdMWBQ2 rGV0916b240lBaVW8sNM9QaYK6jg6hLHoKY3Iq8mIfA684fBf/m+wT/lCdo/FUuSYyrd+e 1nKTRFK10XZQDCQoP+FtVBFOh1g3I65nepAAkQqXUN11MoObVdFfE6Z7HtLWxxbClS3s2M lMsQFSmhVxMVOr4YNBUQIpYFKylJkGJ5zzoXZxqxmMuHpbi/Q91IYa+aJrctpCGFlM1nxE ea6gDKBVayfntjzEuO9IHPOMrgqRJCkoXUYtsdEJGKlh/uYXZKlD+RiALCf27w== 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 269801C80A; Tue, 5 Apr 2022 00:33:33 +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 2350XXh7084258; Tue, 5 Apr 2022 00:33:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2350XX8Q084257; Tue, 5 Apr 2022 00:33:33 GMT (envelope-from git) Date: Tue, 5 Apr 2022 00:33:33 GMT Message-Id: <202204050033.2350XX8Q084257@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: 16c3f5d03e98 - stable/13 - powerpc: implement __clear_cache 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: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16c3f5d03e984a6039a888eec5bcc58735a7d965 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649118813; 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=rV1M+wM7rO07O9XCx5n796N5AhqxXJj3M+yghjBGcgA=; b=wTNtJtXmJlysm6eLhgYjgkF1u2X+bJC0A4gNfWFFb6IRjS+IhrAmYqi/p21/DTPIs2HycF 4KCr+U4XYA8gdcg6C9IOs/giqVqbTp4aVRFrABhlFpjeR8m/bNT9MXlZ8Rs52JU1Uelv/g dwj88pACEYLgXGfXHT0ThmK+MkXKx6UW/C2SEsgy0vxD27hADNpHC/ebBWF/MaGZEPckcT G69f9xnRYXGwizCMU080Gf1rT5NAq6cSUUeXbGLbY+Cp6z0XYQh15hYYDYFKdoF9PbuTUP XJP61mnbSx9oq8BSHjW4WfPbXR4wOG5Sg9UgG3aHyYE+xXW3fCOUihlM00HFOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649118813; a=rsa-sha256; cv=none; b=KCO+LDAWuce3+tSFYDY9RtdAwWS+SKALWRvU7VC4LUAaaT1inVEUjNpVZrjeLqLhCwDkXD E73tkeyn/IYZ3IIeobOSEb8APFIfax+Zk6AzWgpdweFYXSQJHzFOUBhBmWTzOO7d7fFgVm 9aeO3124da5/jVq3kfFBUwirS34ANDKoxuBorfGCUwnvXdFgzp2Tanf6zt+zHIWnstZp2m SUo8rBMOd/erqm7xDoL3LDWOop2PYtoAjNIpZWi7BN+fJsObbLg97jV5rY5QOXTnbbXU2y mv4Q89Tw8ATb5Judy9fZRHysHzZ3NYR/X8q6ErmUunVkP/kx3OoFJD4ERft54A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=16c3f5d03e984a6039a888eec5bcc58735a7d965 commit 16c3f5d03e984a6039a888eec5bcc58735a7d965 Author: Piotr Kubaj AuthorDate: 2022-04-01 19:13:13 +0000 Commit: Piotr Kubaj CommitDate: 2022-04-05 00:33:22 +0000 powerpc: implement __clear_cache Merge LLVM commit 81f5c6270cdfcdf80e6296df216b696a7a37c8b5. This fixes runtime of most notably pcre libraries (currently patched in ports), and probably also other ports since currently __clear_cache() just calls SIGABRT on powerpc. Reviewed by: dim Differential Revision: https://reviews.freebsd.org/D34736 (cherry picked from commit 57b6ac48a96c99e684ab4dc85b8a87097797dc9f) --- contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c | 5 ++++- 1 file changed, 4 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 da0715914b41..1f1efbff3ab2 100644 --- a/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c +++ b/contrib/llvm-project/compiler-rt/lib/builtins/clear_cache.c @@ -130,7 +130,10 @@ void __clear_cache(void *start, void *end) { __asm __volatile("dsb ish"); } __asm __volatile("isb sy"); -#elif defined(__powerpc64__) +#elif defined(__powerpc__) + // Newer CPUs have a bigger line size made of multiple blocks, so the + // following value is a minimal common denominator for what used to be + // a single block cache line and is therefore inneficient. const size_t line_size = 32; const size_t len = (uintptr_t)end - (uintptr_t)start;