Download raw body.
SMMUv3 tests
Hi,
I'd like to get some more testing done on the initial SMMUv3 support
that's in the tree. I've mostly been testing on the Rockchip RK3588
but I think this should also affect e.g. Ampere Altra-based systems?
Please give this diff a go on newer Arm-based machines and check if a
new smmu device pops up in dmesg, and if it does, if your I/O devices
still perform the same (or better or worse).
On Apple devices this diff won't make a difference, on those we have
apldart(4).
On QC machines this diff might make the driver try to attach in ACPI
mode; and possibly panic. Reports on booting this diff in ACPI mode
would be highly appreciated. In FDT mode this should not attach.
On Ampere Altra I'm expecting it to attach -- and hopefully work fine.
Cheers,
Patrick
diff --git a/sys/arch/arm64/dev/smmu.c b/sys/arch/arm64/dev/smmu.c
index f57796fdb97..fafbe3189b5 100644
--- a/sys/arch/arm64/dev/smmu.c
+++ b/sys/arch/arm64/dev/smmu.c
@@ -575,7 +575,6 @@ smmu_device_map(void *cookie, uint32_t sid, bus_dma_tag_t dmat)
dom->sd_dmat->_dmamap_load_uio = smmu_dmamap_load_uio;
dom->sd_dmat->_dmamap_load_raw = smmu_dmamap_load_raw;
dom->sd_dmat->_dmamap_unload = smmu_dmamap_unload;
- dom->sd_dmat->_flags |= BUS_DMA_COHERENT;
}
return dom->sd_dmat;
diff --git a/sys/arch/arm64/dev/smmu_acpi.c b/sys/arch/arm64/dev/smmu_acpi.c
index 7d9206d5afb..718c13b04b0 100644
--- a/sys/arch/arm64/dev/smmu_acpi.c
+++ b/sys/arch/arm64/dev/smmu_acpi.c
@@ -66,7 +66,8 @@ smmu_acpi_match(struct device *parent, void *match, void *aux)
struct acpiiort_attach_args *aia = aux;
struct acpi_iort_node *node = aia->aia_node;
- if (node->type != ACPI_IORT_SMMU)
+ if (node->type != ACPI_IORT_SMMU &&
+ node->type != ACPI_IORT_SMMU_V3)
return 0;
return 1;
diff --git a/sys/arch/arm64/dev/smmu_fdt.c b/sys/arch/arm64/dev/smmu_fdt.c
index ee915e7f0dd..77bc7132055 100644
--- a/sys/arch/arm64/dev/smmu_fdt.c
+++ b/sys/arch/arm64/dev/smmu_fdt.c
@@ -69,8 +69,9 @@ smmu_fdt_match(struct device *parent, void *match, void *aux)
{
struct fdt_attach_args *faa = aux;
- return (OF_is_compatible(faa->fa_node, "arm,smmu-v2") ||
- OF_is_compatible(faa->fa_node, "arm,mmu-500"));
+ return (OF_is_compatible(faa->fa_node, "arm,mmu-500") ||
+ OF_is_compatible(faa->fa_node, "arm,smmu-v2") ||
+ OF_is_compatible(faa->fa_node, "arm,smmu-v3"));
}
void
SMMUv3 tests