From nobody Wed May 22 09:08:46 2024 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 4Vklpk4VHHz5LHR4; Wed, 22 May 2024 09:08:46 +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 4Vklpk3tvlz4qPQ; Wed, 22 May 2024 09:08:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716368926; 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=rvez3tj17B7FaJO3nWhQdZ6pCoNYGiA3ZjI1svDuRYs=; b=K2seFYQlBfeYffUIpbb2jOB4h11D9TM1ChooE7gMSXg13RclAUDaY45iDdtJ/umq+DeFG0 Talc20Rb+IrcITutLzRZFhvjabHXS0gK06y/ZuQzljkkqmY1mTcUMuB5tL7Sq3q+TXQMRB m12EeB2QIrPsxLws1C++4vK+MB/hMEXpHa/RV+rgzCWsmMsWAFrS+xlDgjABIcoTRyI3xX AtY74Ogp25Frq8MmsW0PWGlae37X+62F9RnSorBuTAfKfbPA1W8ly4H3pZPCkU8mzHXH0A W3qHbn01V/4MwJ3g6Ja7yaf92Amlf+wD0BIaQMrZAGm8BIPwyP4KFkRIAAeeuA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716368926; a=rsa-sha256; cv=none; b=KX/rhTAn0WzLqUolV9ic3qJy3MAPSYvIj5krK2tlEnC2wJ1bfzTh8gS4LtN3uWDsdhHFF+ nFb/S0qbQEbkRYWa8r9XrMSm6wYzPgL8ZXn71FBtzfagom5CbIRuzPbB4QYp+G5xLULwz0 fy5KlHb6lqZGjS0U/8DkkO7/G+dkj9fIibceGUfznIP50ldPFvOJFccRQoX/vTmhwPn7/V wUsYn8Qh0vE6TBOwJoY8Fc8aXdCLv2SgMMqWOfeeLkTGFJ3Scf0M4e5P1H5Raa5aTUwe6c isbVPfDeaYW+l3ecmvIaOb0JPzVjJeskcMaKntiymI4i7y+twhzBKZjQhtQ4hA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716368926; 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=rvez3tj17B7FaJO3nWhQdZ6pCoNYGiA3ZjI1svDuRYs=; b=tqmBWAqSffftj91Xm+FB7RuEuIwnKGsayD1QXt1W4urQZoTYV9pawxOkGmm7R+vhKn8YJA cdY2u1+6H+m6IBs8L6MSjKHpmvFnE1vSUUaorDg5GNhStoKwuyUb9MhuyE267+qwa9WgvY deAbWmaFMmuXYWaF6kn7IxyY0H8/Kxw1gfTDDUsXsisNOo9CCKPtqZpncrw6bh8/KiFaxQ b/x3cQplgjmLIYVnCz5hVMdO8ZRcHkFkQ216H87GjSH9rj6OQ7hnDWcGzmSk4b7+SQBKXh AlTJZSE6pAeCCyOgO6RUwd3OOqGuJEuo0CHHRiwdLIsbukdCwJojXfvfROhCBA== 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 4Vklpk33fWz101J; Wed, 22 May 2024 09:08:46 +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 44M98kIr062350; Wed, 22 May 2024 09:08:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44M98kar062347; Wed, 22 May 2024 09:08:46 GMT (envelope-from git) Date: Wed, 22 May 2024 09:08:46 GMT Message-Id: <202405220908.44M98kar062347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Salychev Subject: git: ac4ddc467bfe - main - arm64: Fixed IOMMU compilation errors 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dsl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d Auto-Submitted: auto-generated The branch main has been updated by dsl: URL: https://cgit.FreeBSD.org/src/commit/?id=ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d commit ac4ddc467bfe895e965ed18e8b7bbbb4d7bf964d Author: Dmitry Salychev AuthorDate: 2024-05-21 20:25:59 +0000 Commit: Dmitry Salychev CommitDate: 2024-05-22 09:08:00 +0000 arm64: Fixed IOMMU compilation errors These are missing changes after 1228b93b410a when ref_count was removed from bus_dma_tag_common and 1e3f42b6bad5, when the address arguments were switched to pointers. Reviewed by: jhb MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D45289 --- sys/arm64/conf/NOTES | 4 +++- sys/arm64/iommu/iommu.c | 1 - sys/arm64/iommu/iommu_pmap.c | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/arm64/conf/NOTES b/sys/arm64/conf/NOTES index 3e8499c872b9..cc713db86538 100644 --- a/sys/arm64/conf/NOTES +++ b/sys/arm64/conf/NOTES @@ -240,6 +240,8 @@ nooptions COMPAT_FREEBSD10 # arm64 supports 32-bit FreeBSD/arm binaries (armv[67] ABIs) options COMPAT_FREEBSD32 # Compatible with FreeBSD/arm +options IOMMU # ARM64 SMMU/IOMMU + ##################################################################### # ZFS support @@ -250,4 +252,4 @@ options ZFS # device iichid # HID-over-I2C support options IICHID_DEBUG # Enable HID-over-I2C debug messages -options IICHID_SAMPLING # Workaround missing GPIO INTR support +options IICHID_SAMPLING # Workaround missing GPIO INTR support \ No newline at end of file diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index cb2b86c9dc41..b765763e3a60 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -172,7 +172,6 @@ iommu_tag_init(struct iommu_domain *iodom, struct bus_dma_tag_iommu *t) maxaddr = MIN(iodom->end, BUS_SPACE_MAXADDR); - t->common.ref_count = 0; t->common.impl = &bus_dma_iommu_impl; t->common.alignment = 1; t->common.boundary = 0; diff --git a/sys/arm64/iommu/iommu_pmap.c b/sys/arm64/iommu/iommu_pmap.c index d356a92c4d66..8a0ea641e231 100644 --- a/sys/arm64/iommu/iommu_pmap.c +++ b/sys/arm64/iommu/iommu_pmap.c @@ -632,8 +632,8 @@ retry: l1p = smmu_pmap_l1(pmap, va); l2p = smmu_pmap_l2(pmap, va); - cpu_dcache_wb_range((vm_offset_t)l1p, sizeof(pd_entry_t)); - cpu_dcache_wb_range((vm_offset_t)l2p, sizeof(pd_entry_t)); + cpu_dcache_wb_range(l1p, sizeof(pd_entry_t)); + cpu_dcache_wb_range(l2p, sizeof(pd_entry_t)); goto retry; } @@ -644,7 +644,7 @@ retry: /* New mapping */ smmu_pmap_store(l3, new_l3); - cpu_dcache_wb_range((vm_offset_t)l3, sizeof(pt_entry_t)); + cpu_dcache_wb_range(l3, sizeof(pt_entry_t)); smmu_pmap_resident_count_inc(pmap, 1); dsb(ishst); @@ -681,7 +681,7 @@ pmap_gpu_remove(struct smmu_pmap *pmap, vm_offset_t va) smmu_pmap_resident_count_dec(pmap, 1); smmu_pmap_clear(pte); - cpu_dcache_wb_range((vm_offset_t)pte, sizeof(pt_entry_t)); + cpu_dcache_wb_range(pte, sizeof(pt_entry_t)); rc = KERN_SUCCESS; out: