git: dc08d52d1ed9 - main - smmu: fix FDT and !FDT builds.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Dec 2022 15:54:09 UTC
The branch main has been updated by br:
URL: https://cgit.FreeBSD.org/src/commit/?id=dc08d52d1ed98593fbfe769a42e18de6a578d1f7
commit dc08d52d1ed98593fbfe769a42e18de6a578d1f7
Author: Ruslan Bukin <br@FreeBSD.org>
AuthorDate: 2022-12-21 15:45:13 +0000
Commit: Ruslan Bukin <br@FreeBSD.org>
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 <sys/types.h>
#include <sys/taskqueue.h>
#include <sys/bus.h>
@@ -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);