From nobody Thu Oct 27 16:11: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 4MyrK322S3z4gPXl; Thu, 27 Oct 2022 16:11: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 4MyrK30623z3lVH; Thu, 27 Oct 2022 16:11:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666887095; 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=mGwvV1ZGONgLz3+nIexcirF3Ri7/rbrUBrYsTxDb0cU=; b=oreTxuQV5TgqqKW2pAXk+NUNHP8MyHlPsllALgETzUiRAO2pWhfOgAtJy9ru6678Jzmkac NdvgmDLbeHE2Tm3LOaJLFVLbczxRDytgYipabA2GxU59xV5gntmdsFHhiXqfLXXC2HMNU/ 8R+BDQelQSsRJwcBaDreqvfmQu/AL+eNertigXeOJbxBwtuIBY9uasEhCmwIB26kJCMj9o ZJ8e7O7p+9gkIvxFjo4GWei1j6SzRybidnIIofSbVDpidBRaG/4/DOQ4fh47kGJVd0mAQy h6gWXqXXTGsHH5T3Oo0joasmngwyWjNwPHtZGUkZaCUF11XzYNcPeble1E7CMQ== 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 4MyrK26Js4z13P9; Thu, 27 Oct 2022 16:11:34 +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 29RGBYIS075983; Thu, 27 Oct 2022 16:11:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29RGBYWs075982; Thu, 27 Oct 2022 16:11:34 GMT (envelope-from git) Date: Thu, 27 Oct 2022 16:11:34 GMT Message-Id: <202210271611.29RGBYWs075982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 7ddba690f8ae - main - Remove an unneeded cpu_dcache_wb_range from arm64 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7ddba690f8aea5cc0bd496cd7c8fabaf6ee9f4ef Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666887095; 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=mGwvV1ZGONgLz3+nIexcirF3Ri7/rbrUBrYsTxDb0cU=; b=ObAEjWbTUIDzyqwSd+Ywk1B5EFeZMxkoRZSajkCwsX8qNh+Z9VdM2bbvNSyVu9zKdcW48O Ikrwc3ghssF+yv3SKm0gwx5MTPIcYd3GH7Mj5vIESPjSyfG6ofWQjfXFpMk/iNhapvmFRw 10hAueYwK3MNB3xeDduFrf51/xmIit5GDdUq6bIpmq5LR33TI069RnQ/WK+EWcthgScSb1 HEAHvwq672uR+njgMlGdPkL2sISHhMK4Zm3MuHEVqMKRV3hiMfsukKqOL3pLD4UFPnRO6R Ld5ZK2SJtm5n4luGw6XJjjYzwa1c8jmxoN9d4+4VvdXjUH75NfBC3ULX2zqHRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666887095; a=rsa-sha256; cv=none; b=Efa8kXcbEfpkW3DKRPkSmQSNneR9SX1WNwuPm1cZL4WrhdItK9+B7g6UTf2kLtAl+GV/7d 8qCZXh2WTofiX7/0n/0AIZU6kGkwYpXkM0zLYg88+z6/MQjqBvT3B5z+cVMtSh1Z1icxsg D+fwRgZj/hLFhQHCUBgqFk+vks0bW+DR+2G/vFsM/9rAlvvxtcric4cMr5pkYKhrRDQDjX Ukqrreko4w3jeI56310S+TVn+05iGIMJ5oFdAp1AYzfeG91tVDIaKSqUuo9kjv6UfQadwi zlX/QU3iuB/c9nRS5nqX99WKBURqz0cT4BV6VW6vyXXOyRlP3tSedOQt3h+8iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=7ddba690f8aea5cc0bd496cd7c8fabaf6ee9f4ef commit 7ddba690f8aea5cc0bd496cd7c8fabaf6ee9f4ef Author: Andrew Turner AuthorDate: 2022-10-18 16:37:43 +0000 Commit: Andrew Turner CommitDate: 2022-10-27 16:05:46 +0000 Remove an unneeded cpu_dcache_wb_range from arm64 The cpu_dcache_wb_range function is an expensive function that is unneeded in ddb. It is used when the cache needs to be written to RAM, e.g. when working with a non-cache coherent device. Remove it as cpu_icache_sync_range already has the needed d-cache handling to ensure any changed memory is visible to the i-cache. Reviewed by: imp Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37037 --- sys/arm64/arm64/db_interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/arm64/arm64/db_interface.c b/sys/arm64/arm64/db_interface.c index dc0fa8ac5e1e..59f8132645ef 100644 --- a/sys/arm64/arm64/db_interface.c +++ b/sys/arm64/arm64/db_interface.c @@ -167,8 +167,10 @@ db_write_bytes(vm_offset_t addr, size_t size, char *data) *dst++ = *data++; dsb(ish); - /* Clean D-cache and invalidate I-cache */ - cpu_dcache_wb_range(addr, (vm_size_t)size); + /* + * Ensure the I & D cache are in sync if we wrote + * to executable memory. + */ cpu_icache_sync_range(addr, (vm_size_t)size); } }