Skip to content

Commit 6855d1b

Browse files
committed
Merge tag 'arm-smmu-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux into arm/smmu
Arm SMMU updates for 5.6 - Support for building, and {un,}loading the SMMU drivers as modules - Minor cleanups - SMMUv3: * Non-critical fix to encoding of TLBI_NH_VA invalidation command * Fix broken sanity check on size of MMIO resource during probe * Support for Substream IDs which will soon be provided by PCI PASIDs - io-pgtable: * Finish off the TTBR1 preparation work partially merged last cycle * Ensure correct memory attributes for non-cacheable mappings - SMMU: * Namespace public #defines to avoid collisions with arch/arm64/ * Avoid using valid SMR register when probing mask size
2 parents 1ea27ee + 5a4549f commit 6855d1b

File tree

17 files changed

+810
-412
lines changed

17 files changed

+810
-412
lines changed

Documentation/devicetree/bindings/iommu/iommu.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ have a means to turn off translation. But it is invalid in such cases to
8686
disable the IOMMU's device tree node in the first place because it would
8787
prevent any driver from properly setting up the translations.
8888

89+
Optional properties:
90+
--------------------
91+
- pasid-num-bits: Some masters support multiple address spaces for DMA, by
92+
tagging DMA transactions with an address space identifier. By default,
93+
this is 0, which means that the device only has one address space.
94+
8995

9096
Notes:
9197
======

drivers/acpi/arm64/iort.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#define pr_fmt(fmt) "ACPI: IORT: " fmt
1212

1313
#include <linux/acpi_iort.h>
14+
#include <linux/bitfield.h>
1415
#include <linux/iommu.h>
1516
#include <linux/kernel.h>
1617
#include <linux/list.h>
@@ -924,6 +925,20 @@ static int iort_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data)
924925
return iort_iommu_xlate(info->dev, parent, streamid);
925926
}
926927

928+
static void iort_named_component_init(struct device *dev,
929+
struct acpi_iort_node *node)
930+
{
931+
struct acpi_iort_named_component *nc;
932+
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
933+
934+
if (!fwspec)
935+
return;
936+
937+
nc = (struct acpi_iort_named_component *)node->node_data;
938+
fwspec->num_pasid_bits = FIELD_GET(ACPI_IORT_NC_PASID_BITS,
939+
nc->node_flags);
940+
}
941+
927942
/**
928943
* iort_iommu_configure - Set-up IOMMU configuration for a device.
929944
*
@@ -978,6 +993,9 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev)
978993
if (parent)
979994
err = iort_iommu_xlate(dev, parent, streamid);
980995
} while (parent && !err);
996+
997+
if (!err)
998+
iort_named_component_init(dev, node);
981999
}
9821000

9831001
/*

drivers/iommu/arm-smmu-impl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ int arm_mmu500_reset(struct arm_smmu_device *smmu)
119119
* Secure has also cleared SACR.CACHE_LOCK for this to take effect...
120120
*/
121121
reg = arm_smmu_gr0_read(smmu, ARM_SMMU_GR0_ID7);
122-
major = FIELD_GET(ID7_MAJOR, reg);
122+
major = FIELD_GET(ARM_SMMU_ID7_MAJOR, reg);
123123
reg = arm_smmu_gr0_read(smmu, ARM_SMMU_GR0_sACR);
124124
if (major >= 2)
125125
reg &= ~ARM_MMU500_ACR_CACHE_LOCK;

0 commit comments

Comments
 (0)