Merge branches 'x86/vt-d', 'x86/amd', 'arm/omap', 'ppc/pamu', 'arm/smmu', 'arm/exynos...
authorJoerg Roedel <jroedel@suse.de>
Thu, 31 Jul 2014 18:29:02 +0000 (20:29 +0200)
committerJoerg Roedel <jroedel@suse.de>
Thu, 31 Jul 2014 18:29:02 +0000 (20:29 +0200)
1  2  3  4  5  6  7 
drivers/iommu/Kconfig
drivers/iommu/Makefile
drivers/iommu/amd_iommu_types.h
drivers/iommu/arm-smmu.c
drivers/iommu/fsl_pamu.c
drivers/iommu/fsl_pamu_domain.c
drivers/iommu/omap-iommu.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index fd5e9146aee6489a3ed5e2da95d740bd0cba4168,93072ba44b1d179dff9a486cd728cf16ea645691,93072ba44b1d179dff9a486cd728cf16ea645691,8f42e8ec4d763f2a57e1b3d511e2dd136e21957a,93072ba44b1d179dff9a486cd728cf16ea645691,af47648301a9eda024b842341e451469eada4c1c,fd5e9146aee6489a3ed5e2da95d740bd0cba4168..61d1dafa242d7d01bfff167f610774aff547b1eb
@@@@@@@@ -952,8 -956,68 -956,68 -956,68 -956,68 -951,68 -952,8 +947,8 @@@@@@@@ static struct iommu_group *get_pci_devi
        pci_endpt_partioning = check_pci_ctl_endpt_part(pci_ctl);
        /* We can partition PCIe devices so assign device group to the device */
        if (pci_endpt_partioning) {
 -----          bridge = pci_find_upstream_pcie_bridge(pdev);
 -----          if (bridge) {
 -----                  if (pci_is_pcie(bridge))
 -----                          dma_pdev = pci_get_domain_bus_and_slot(
 -----                                          pci_domain_nr(pdev->bus),
 -----                                          bridge->subordinate->number, 0);
 -----                  if (!dma_pdev)
 -----                          dma_pdev = pci_dev_get(bridge);
 -----          } else
 -----                  dma_pdev = pci_dev_get(pdev);
 ----- 
 -----          /* Account for quirked devices */
 -----          swap_pci_ref(&dma_pdev, pci_get_dma_source(dma_pdev));
 ----- 
 -----          /*
 -----           * If it's a multifunction device that does not support our
 -----           * required ACS flags, add to the same group as lowest numbered
 -----           * function that also does not suport the required ACS flags.
 -----           */
 -----          if (dma_pdev->multifunction &&
 -----              !pci_acs_enabled(dma_pdev, REQ_ACS_FLAGS)) {
 -----                  u8 i, slot = PCI_SLOT(dma_pdev->devfn);
 ----- 
 -----                  for (i = 0; i < 8; i++) {
 -----                          struct pci_dev *tmp;
 ----- 
 -----                          tmp = pci_get_slot(dma_pdev->bus, PCI_DEVFN(slot, i));
 -----                          if (!tmp)
 -----                                  continue;
 ----- 
 -----                          if (!pci_acs_enabled(tmp, REQ_ACS_FLAGS)) {
 -----                                  swap_pci_ref(&dma_pdev, tmp);
 -----                                  break;
 -----                          }
 -----                          pci_dev_put(tmp);
     -                  }
     -          }
     - 
     -          /*
     -           * Devices on the root bus go through the iommu.  If that's not us,
     -           * find the next upstream device and test ACS up to the root bus.
     -           * Finding the next device may require skipping virtual buses.
     -           */
     -          while (!pci_is_root_bus(dma_pdev->bus)) {
     -                  struct pci_bus *bus = dma_pdev->bus;
     - 
     -                  while (!bus->self) {
     -                          if (!pci_is_root_bus(bus))
     -                                  bus = bus->parent;
     -                          else
     -                                  goto root_bus;
 -----                  }
     - 
     -                  if (pci_acs_path_enabled(bus->self, NULL, REQ_ACS_FLAGS))
     -                          break;
     - 
     -                  swap_pci_ref(&dma_pdev, pci_dev_get(bus->self));
 -----          }
 +++++          group = iommu_group_get_for_dev(&pdev->dev);
       
 ----           /*
 ----            * Devices on the root bus go through the iommu.  If that's not us,
 ----            * find the next upstream device and test ACS up to the root bus.
 ----            * Finding the next device may require skipping virtual buses.
 ----            */
 ----           while (!pci_is_root_bus(dma_pdev->bus)) {
 ----                   struct pci_bus *bus = dma_pdev->bus;
 ----  
 ----                   while (!bus->self) {
 ----                           if (!pci_is_root_bus(bus))
 ----                                   bus = bus->parent;
 ----                           else
 ----                                   goto root_bus;
 ----                   }
 ----  
 ----                   if (pci_acs_path_enabled(bus->self, NULL, REQ_ACS_FLAGS))
 ----                           break;
 ----  
 ----                   swap_pci_ref(&dma_pdev, pci_dev_get(bus->self));
 ----           }
 ----  
 ----- root_bus:
 -----          group = get_device_iommu_group(&dma_pdev->dev);
 -----          pci_dev_put(dma_pdev);
                /*
                 * PCIe controller is not a paritionable entity
                 * free the controller device iommu_group.
Simple merge