From nobody Wed Dec 21 15:54:09 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 4NcdKZ1pQ8z1G33l; Wed, 21 Dec 2022 15:54:10 +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 4NcdKZ17FDz3LRG; Wed, 21 Dec 2022 15:54:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671638050; 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=YgZssmomXCmIGUGyuEIIozjNT2sjWORPH4no8KxZPpk=; b=BTc7jKAEmKLQQrqWo4zmdkMpDICYcF9mCoAQ30zXJm1uJG4r0kgjijjy/avfRo525VW3VF ZCPldoa5+U2cdlYVOrn5sNxq7ZL7PeiKAtn1JdHAuqifWA5FcqydorsMszlzKySM76atZT Cfgq3De1ivdSfr0TdRfxc8b8vN0MApQ974qGbDgtm/dcKgzmF+WpUqnkqVZIDlCntEP5Oo ZBfXyy/vyXz/Y4w9S/qo6fe2NzGNqzrwP2iZ8Sy2VTTLEudtlyJraUERULQ4N8okpWA2nN c/e/sjvmRcrElzYtm12GtBOtVmYqL4VN6qrd131YWHNQDML4n30K3eM8MTVAnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671638050; 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=YgZssmomXCmIGUGyuEIIozjNT2sjWORPH4no8KxZPpk=; b=bcl3QJGVZrMUU6X4U62iakXC9aw5PEyaidW2rMU0oCvE3gZpoMl93+pLfkVxzVkBfIx7Gi sGrbzMXvHS/cCHl4Niu4pe6WRs1vaBjRJNbXgqjsR+Vo9AJAcTQXedLoiYsIknMD8MZFW3 MQVws30s+Idf+tb/ZyQizlJdcq1ZUCp0kMD+n9ljmvtwHYWU9CCePhdjV53XKExDGBGzwY YTpwYGHCO5t/2t4HaKOHMWVWTQU2rR9bV1f/daO7yzudsqvS8NPwGJC+NJiPLONiiVeIxx ikUcnQgBaNxLErpPYLuI/nG74zLicm4HcjyIMXXlPeKjULbjnJcq52aynYgESw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671638050; a=rsa-sha256; cv=none; b=SKxJXVifl5lBiDcz1SJmm1lxHU4jdYpii/hCm/+EIRJUEJhkpq2S9qje8wcvxflb7sty3i Wiox2WGGEKbaYKV++ocDydRlFSQWxkZcp1HVSIEM9RQcu1dmmEOGrQCuXVGEe8qQ4DyMoh VE+KPWncqSxDhvLQ3Kt/jG98fHvh3GrwEGScRHMd/0iW5How7k1j684KJc6HHoawElvUKu YATQcTnoaLVvv9fx8OowY/hS464w1ER01jyLDVpMUAFZ43OzcmeWLTZJQs7Cihi5NU/nHL kSs7n9L9yYgT2h0U3eDTIBMdcbJiUfgJVZa0Fa1HC/ws2MpH1kMVWHK7cTHLag== 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 4NcdKZ0CW8zLCb; Wed, 21 Dec 2022 15:54:10 +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 2BLFs9S7040047; Wed, 21 Dec 2022 15:54:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BLFs91W040046; Wed, 21 Dec 2022 15:54:09 GMT (envelope-from git) Date: Wed, 21 Dec 2022 15:54:09 GMT Message-Id: <202212211554.2BLFs91W040046@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ruslan Bukin Subject: git: dc08d52d1ed9 - main - smmu: fix FDT and !FDT builds. 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: br X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc08d52d1ed98593fbfe769a42e18de6a578d1f7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by br: URL: https://cgit.FreeBSD.org/src/commit/?id=dc08d52d1ed98593fbfe769a42e18de6a578d1f7 commit dc08d52d1ed98593fbfe769a42e18de6a578d1f7 Author: Ruslan Bukin AuthorDate: 2022-12-21 15:45:13 +0000 Commit: Ruslan Bukin CommitDate: 2022-12-21 15:53:09 +0000 smmu: fix FDT and !FDT builds. Reviewed by: andrew Sponsored by: UKRI Differential Revision: https://reviews.freebsd.org/D37762 --- sys/arm64/iommu/iommu.c | 2 ++ sys/arm64/iommu/iommu_if.m | 4 ++++ sys/arm64/iommu/smmu_fdt.c | 6 ++---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/sys/arm64/iommu/iommu.c b/sys/arm64/iommu/iommu.c index 3451a002bef6..c786d50a43e1 100644 --- a/sys/arm64/iommu/iommu.c +++ b/sys/arm64/iommu/iommu.c @@ -248,6 +248,7 @@ iommu_lookup(device_t dev) return (NULL); } +#ifdef FDT struct iommu_ctx * iommu_get_ctx_ofw(device_t dev, int channel) { @@ -333,6 +334,7 @@ iommu_get_ctx_ofw(device_t dev, int channel) return (ioctx); } +#endif struct iommu_ctx * iommu_get_ctx(struct iommu_unit *iommu, device_t requester, diff --git a/sys/arm64/iommu/iommu_if.m b/sys/arm64/iommu/iommu_if.m index 6d4f963c5ff1..a3aa8001d00c 100644 --- a/sys/arm64/iommu/iommu_if.m +++ b/sys/arm64/iommu/iommu_if.m @@ -32,6 +32,8 @@ # $FreeBSD$ # +#include "opt_platform.h" + #include #include #include @@ -138,6 +140,7 @@ METHOD void ctx_free { struct iommu_ctx *ioctx; }; +#ifdef FDT # # Notify controller we have machine-dependent data. # @@ -147,3 +150,4 @@ METHOD int ofw_md_data { pcell_t *cells; int ncells; }; +#endif diff --git a/sys/arm64/iommu/smmu_fdt.c b/sys/arm64/iommu/smmu_fdt.c index e5541b50058f..b33f30e9166a 100644 --- a/sys/arm64/iommu/smmu_fdt.c +++ b/sys/arm64/iommu/smmu_fdt.c @@ -202,7 +202,5 @@ static device_method_t smmu_fdt_methods[] = { DEFINE_CLASS_1(smmu, smmu_fdt_driver, smmu_fdt_methods, sizeof(struct smmu_softc), smmu_driver); -static devclass_t smmu_fdt_devclass; - -EARLY_DRIVER_MODULE(smmu, simplebus, smmu_fdt_driver, smmu_fdt_devclass, - 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); +EARLY_DRIVER_MODULE(smmu, simplebus, smmu_fdt_driver, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE);