]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge tag 'iommu-updates-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 20:24:14 +0000 (12:24 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 15 Dec 2016 20:24:14 +0000 (12:24 -0800)
Pull IOMMU updates from Joerg Roedel:
 "These changes include:

   - support for the ACPI IORT table on ARM systems and patches to make
     the ARM-SMMU driver make use of it

   - conversion of the Exynos IOMMU driver to device dependency links
     and implementation of runtime pm support based on that conversion

   - update the Mediatek IOMMU driver to use the new struct
     device->iommu_fwspec member

   - implementation of dma_map/unmap_resource in the generic ARM
     dma-iommu layer

   - a number of smaller fixes and improvements all over the place"

* tag 'iommu-updates-v4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (44 commits)
  ACPI/IORT: Make dma masks set-up IORT specific
  iommu/amd: Missing error code in amd_iommu_init_device()
  iommu/s390: Drop duplicate header pci.h
  ACPI/IORT: Introduce iort_iommu_configure
  ACPI/IORT: Add single mapping function
  ACPI/IORT: Replace rid map type with type mask
  iommu/arm-smmu: Add IORT configuration
  iommu/arm-smmu: Split probe functions into DT/generic portions
  iommu/arm-smmu-v3: Add IORT configuration
  iommu/arm-smmu-v3: Split probe functions into DT/generic portions
  ACPI/IORT: Add support for ARM SMMU platform devices creation
  ACPI/IORT: Add node match function
  ACPI: Implement acpi_dma_configure
  iommu/arm-smmu-v3: Convert struct device of_node to fwnode usage
  iommu/arm-smmu: Convert struct device of_node to fwnode usage
  iommu: Make of_iommu_set/get_ops() DT agnostic
  ACPI/IORT: Add support for IOMMU fwnode registration
  ACPI/IORT: Introduce linker section for IORT entries probing
  ACPI: Add FWNODE_ACPI_STATIC fwnode type
  iommu/arm-smmu: Set SMTNMB_TLBEN in ACR to enable caching of bypass entries
  ...

1  2 
arch/arm64/mm/dma-mapping.c
include/linux/acpi.h

index aa6c8f834d9e43927683a17f16f4bd9d53e167ec,5cd0a383b14bae5f49973d794e2e741c47f30889..290a84f3351f706bd026e00364c2d433a4852aed
@@@ -796,6 -796,8 +796,8 @@@ static struct dma_map_ops iommu_dma_op
        .sync_single_for_device = __iommu_sync_single_for_device,
        .sync_sg_for_cpu = __iommu_sync_sg_for_cpu,
        .sync_sg_for_device = __iommu_sync_sg_for_device,
+       .map_resource = iommu_dma_map_resource,
+       .unmap_resource = iommu_dma_unmap_resource,
        .dma_supported = iommu_dma_supported,
        .mapping_error = iommu_dma_mapping_error,
  };
@@@ -938,6 -940,11 +940,6 @@@ static void __iommu_setup_dma_ops(struc
  
  void arch_teardown_dma_ops(struct device *dev)
  {
 -      struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
 -
 -      if (WARN_ON(domain))
 -              iommu_detach_device(domain, dev);
 -
        dev->archdata.dma_ops = NULL;
  }
  
diff --combined include/linux/acpi.h
index 43b28f04a1f5b30146375d801a350e6771987afb,8d15fc59719f21a107b4b423ea4ee2b8259385ec..d5f017448a89a1ff8e2c66ea1aad6125ff07ac31
@@@ -56,6 -56,27 +56,27 @@@ static inline acpi_handle acpi_device_h
        acpi_fwnode_handle(adev) : NULL)
  #define ACPI_HANDLE(dev)              acpi_device_handle(ACPI_COMPANION(dev))
  
+ static inline struct fwnode_handle *acpi_alloc_fwnode_static(void)
+ {
+       struct fwnode_handle *fwnode;
+       fwnode = kzalloc(sizeof(struct fwnode_handle), GFP_KERNEL);
+       if (!fwnode)
+               return NULL;
+       fwnode->type = FWNODE_ACPI_STATIC;
+       return fwnode;
+ }
+ static inline void acpi_free_fwnode_static(struct fwnode_handle *fwnode)
+ {
+       if (WARN_ON(!fwnode || fwnode->type != FWNODE_ACPI_STATIC))
+               return;
+       kfree(fwnode);
+ }
  /**
   * ACPI_DEVICE_CLASS - macro used to describe an ACPI device with
   * the PCI-defined class-code information
@@@ -220,6 -241,10 +241,6 @@@ int __init acpi_table_parse_entries(cha
                              int entry_id,
                              acpi_tbl_entry_handler handler,
                              unsigned int max_entries);
 -int __init acpi_table_parse_entries(char *id, unsigned long table_size,
 -                            int entry_id,
 -                            acpi_tbl_entry_handler handler,
 -                            unsigned int max_entries);
  int __init acpi_table_parse_entries_array(char *id, unsigned long table_size,
                              struct acpi_subtable_proc *proc, int proc_num,
                              unsigned int max_entries);
@@@ -465,7 -490,6 +486,7 @@@ acpi_status acpi_run_osc(acpi_handle ha
  #define OSC_SB_CPCV2_SUPPORT                  0x00000040
  #define OSC_SB_PCLPI_SUPPORT                  0x00000080
  #define OSC_SB_OSLPI_SUPPORT                  0x00000100
 +#define OSC_SB_CPC_DIVERSE_HIGH_SUPPORT               0x00001000
  
  extern bool osc_sb_apei_support_acked;
  extern bool osc_pc_lpi_support_confirmed;
@@@ -741,6 -765,11 +762,11 @@@ static inline enum dev_dma_attr acpi_ge
        return DEV_DMA_NOT_SUPPORTED;
  }
  
+ static inline void acpi_dma_configure(struct device *dev,
+                                     enum dev_dma_attr attr) { }
+ static inline void acpi_dma_deconfigure(struct device *dev) { }
  #define ACPI_PTR(_ptr)        (NULL)
  
  static inline void acpi_device_set_enumerated(struct acpi_device *adev)