forked from Minki/linux
IOMMU Fixes for Linux v3.12-rc3
A couple of fixes from the IOMMU side: * Some small fixes for the new ARM-SMMU driver * A register offset correction for VT-d * Adding MAINTAINERS entry for drivers/iommu Overall no really big or intrusive changes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJSTtOsAAoJECvwRC2XARrjD9cQAOGijCeHW3fZr5iVNCPQQVUq NNvGZpqjFwtV/8QvBy/HZ6Jt2j/4c24od1xewQflwBuvhxokTPUVs30LYVMGqE// tfWM5x/kL7Iz2JBAu0vT9Ihq/elIy4zGE8w7a6hio5K0UQVmvsQ73SWYrxut0jcR F9e9BaNt7LI27v20Ph48ejVHNTIQT07GDZJXRtYiBI9VmI8O6aTpu8OOeS5Grrv+ tyIpt3DYnqbsTdsnF5YlIVn23d/MYR8be2wnpaGh/vShZlwPsU8ay9/29cJhqyGD 5GWuRK+4OKaXXWhzpcwMc+iYwCIp1IKkCc5dax1xVMedlOzRxtQpZXEZEjlv9/aS sINp2kBnkJssGO781OWr7HL9G/OxdKHokG8AiizFSS18VDy76AVI3sWLCJwuFPPW X+SAYQiph7liVkUKEFwITTu4CJ5TClwcy0ovFGqpnhGLIKp3woEO8K1RznBdYZgH 22ZSm3GpTi6XG53cP2INBQ0cKXg6nbJPhczyUiaSLDVGlFS+VMGZavCsjn4ceq7u /k1M9uwhE8JqS6T2dTROy/ZuTOoMTFm4yGTIpec/S9RtRvPjwVMEUQN+y419AV7k PzAuxefsCOqEcviVt0pMz/aFjdPw6slNJNAG1zWckvw6DrMmKrFGbyH8KMRSchzY uo0xEoMIft8Mmfvu1IVe =a8UE -----END PGP SIGNATURE----- Merge tag 'iommu-fixes-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: "A couple of fixes from the IOMMU side: - some small fixes for the new ARM-SMMU driver - a register offset correction for VT-d - add MAINTAINERS entry for drivers/iommu Overall no really big or intrusive changes" * tag 'iommu-fixes-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: x86/iommu: correct ICS register offset MAINTAINERS: add overall IOMMU section iommu/arm-smmu: don't enable SMMU device until probing has completed iommu/arm-smmu: fix iommu_present() test in init iommu/arm-smmu: fix a signedness bug
This commit is contained in:
commit
8e1a254099
@ -4476,6 +4476,13 @@ L: linux-serial@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/tty/serial/ioc3_serial.c
|
||||
|
||||
IOMMU DRIVERS
|
||||
M: Joerg Roedel <joro@8bytes.org>
|
||||
L: iommu@lists.linux-foundation.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
|
||||
S: Maintained
|
||||
F: drivers/iommu/
|
||||
|
||||
IP MASQUERADING
|
||||
M: Juanjo Ciarlante <jjciarla@raiz.uncu.edu.ar>
|
||||
S: Maintained
|
||||
|
@ -377,6 +377,7 @@ struct arm_smmu_cfg {
|
||||
u32 cbar;
|
||||
pgd_t *pgd;
|
||||
};
|
||||
#define INVALID_IRPTNDX 0xff
|
||||
|
||||
#define ARM_SMMU_CB_ASID(cfg) ((cfg)->cbndx)
|
||||
#define ARM_SMMU_CB_VMID(cfg) ((cfg)->cbndx + 1)
|
||||
@ -840,7 +841,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
|
||||
if (IS_ERR_VALUE(ret)) {
|
||||
dev_err(smmu->dev, "failed to request context IRQ %d (%u)\n",
|
||||
root_cfg->irptndx, irq);
|
||||
root_cfg->irptndx = -1;
|
||||
root_cfg->irptndx = INVALID_IRPTNDX;
|
||||
goto out_free_context;
|
||||
}
|
||||
|
||||
@ -869,7 +870,7 @@ static void arm_smmu_destroy_domain_context(struct iommu_domain *domain)
|
||||
writel_relaxed(0, cb_base + ARM_SMMU_CB_SCTLR);
|
||||
arm_smmu_tlb_inv_context(root_cfg);
|
||||
|
||||
if (root_cfg->irptndx != -1) {
|
||||
if (root_cfg->irptndx != INVALID_IRPTNDX) {
|
||||
irq = smmu->irqs[smmu->num_global_irqs + root_cfg->irptndx];
|
||||
free_irq(irq, domain);
|
||||
}
|
||||
@ -1857,8 +1858,6 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev)
|
||||
goto out_put_parent;
|
||||
}
|
||||
|
||||
arm_smmu_device_reset(smmu);
|
||||
|
||||
for (i = 0; i < smmu->num_global_irqs; ++i) {
|
||||
err = request_irq(smmu->irqs[i],
|
||||
arm_smmu_global_fault,
|
||||
@ -1876,6 +1875,8 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev)
|
||||
spin_lock(&arm_smmu_devices_lock);
|
||||
list_add(&smmu->list, &arm_smmu_devices);
|
||||
spin_unlock(&arm_smmu_devices_lock);
|
||||
|
||||
arm_smmu_device_reset(smmu);
|
||||
return 0;
|
||||
|
||||
out_free_irqs:
|
||||
@ -1966,10 +1967,10 @@ static int __init arm_smmu_init(void)
|
||||
return ret;
|
||||
|
||||
/* Oh, for a proper bus abstraction */
|
||||
if (!iommu_present(&platform_bus_type));
|
||||
if (!iommu_present(&platform_bus_type))
|
||||
bus_set_iommu(&platform_bus_type, &arm_smmu_ops);
|
||||
|
||||
if (!iommu_present(&amba_bustype));
|
||||
if (!iommu_present(&amba_bustype))
|
||||
bus_set_iommu(&amba_bustype, &arm_smmu_ops);
|
||||
|
||||
return 0;
|
||||
|
@ -55,7 +55,7 @@
|
||||
#define DMAR_IQT_REG 0x88 /* Invalidation queue tail register */
|
||||
#define DMAR_IQ_SHIFT 4 /* Invalidation queue head/tail shift */
|
||||
#define DMAR_IQA_REG 0x90 /* Invalidation queue addr register */
|
||||
#define DMAR_ICS_REG 0x98 /* Invalidation complete status register */
|
||||
#define DMAR_ICS_REG 0x9c /* Invalidation complete status register */
|
||||
#define DMAR_IRTA_REG 0xb8 /* Interrupt remapping table addr register */
|
||||
|
||||
#define OFFSET_STRIDE (9)
|
||||
|
Loading…
Reference in New Issue
Block a user