From nobody Tue Apr 05 14:51:34 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 44A571A92F2A; Tue, 5 Apr 2022 14:51:35 +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 4KXrFM1TcXz4hPW; Tue, 5 Apr 2022 14:51:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649170295; 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=v5hKKamAxYk/zIB079ZbbX8heDreOVmU9ddR71aYlww=; b=Vr5JJ4AXQ92lwsXSspdBWeb04ZBXYceU+aSbub2E5O97CG1IVL6Vm3DU1EPpzCoZBAiFQU DX5GhRpQtM3QSXi0PykhZl9LiRv5I0ieBFDTuA75ITSwm0Hz15QdHMyqFPbWpYQ86imdhH gadXFQYobzGarPXhNbvFh6XmuQ4LvV80uYKPoSwIc0cGIPU4On9D95OI5Qt4g/4FkykI02 +aL6oKXiMOza5/1TKlS4jCtlmEo5uKZeIeNj/D7OoZ+TpwBRXlSnyVmOmiR+1sjFUqcA6M AijUmiJcIYU1+S6bVurVWZPldeP9qCp+TDZxcnLprDL7mWnxGHXrVQOdJsj1MQ== 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 131C88AA; Tue, 5 Apr 2022 14:51:35 +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 235EpYdL045577; Tue, 5 Apr 2022 14:51:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 235EpY1T045576; Tue, 5 Apr 2022 14:51:34 GMT (envelope-from git) Date: Tue, 5 Apr 2022 14:51:34 GMT Message-Id: <202204051451.235EpY1T045576@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: f17fa892de18 - releng/13.1 - 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/releng/13.1 X-Git-Reftype: branch X-Git-Commit: f17fa892de185a1031d6eaf3b813d0503527f3d1 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649170295; 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=v5hKKamAxYk/zIB079ZbbX8heDreOVmU9ddR71aYlww=; b=CVhhMX4X45Y8oT3ZNYSasbf4LnksIgIp6WU6uhKVwctJRjxy2DkiJ7u7SNkv8tF6uQGNZZ HqyirfJsUN33JtDAj/Ub6XFDG30JjZN5sqavjLZFxCBQ8HnS6Yb9pOeepstRVu1XiHX5qm lgBR0PcHIa/2EpRfypMOX15VkFBVi5HoeJZ2hxe4/Nhk2Xv61HMMsvkOkQb8OkwUAj6OpE iGIVjE9LbGFp5S4JcOCnBOiICnCAStZH5o1yL765LrWkAl2W8Vat8KDaBGp/r6RQiDJuSI PU0X6ZxWOw80lYEEVlgh/mKj7rfUXH2876Iu/RR+CrLDS6rR8jRdYQi60hrXFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649170295; a=rsa-sha256; cv=none; b=aVtQqx/emAxRhaI85Ww5wcwdTGLtYrjsKLr0dPSqt2TGSLzRKekDYeMW9K8gh7JxJk5Xez FrZtdXADMLos0shm7TznMVqRwY5dJ1JfCRlLQGZa8n2C7IxQZ7FG21pdVMeNx3ipfmNVEZ JyHp5GTR7QF3KfYf4RQosreIVGXeyYK9UzjTTqKjyry7vo5ymeXbTivNogUQtaX0sfs/vx M2a9hiuIVYpu+hLq+J8Akq+4BP0/tUNEKcKjZpMb3OqY+E5p7weP7VtHVm1KHh1hUafXf7 Bwi7VG0qR3A57n5TOHnX3hX/2mxKPJcA14rLbGjP7o6lmcPpfteSJT9G5ja7Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch releng/13.1 has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=f17fa892de185a1031d6eaf3b813d0503527f3d1 commit f17fa892de185a1031d6eaf3b813d0503527f3d1 Author: Piotr Kubaj AuthorDate: 2022-04-01 19:13:13 +0000 Commit: Piotr Kubaj CommitDate: 2022-04-05 14:51:27 +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 Approved by: re (gjb) (cherry picked from commit 57b6ac48a96c99e684ab4dc85b8a87097797dc9f) (cherry picked from commit 16c3f5d03e984a6039a888eec5bcc58735a7d965) --- 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;