Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', ...
authorJoerg Roedel <jroedel@suse.de>
Fri, 19 Jun 2015 15:17:47 +0000 (17:17 +0200)
committerJoerg Roedel <jroedel@suse.de>
Fri, 19 Jun 2015 15:17:47 +0000 (17:17 +0200)
1  2  3  4  5  6  7 
MAINTAINERS
drivers/iommu/amd_iommu.c
drivers/iommu/iommu.c
drivers/iommu/rockchip-iommu.c

diff --cc MAINTAINERS
index 781e099495d35b5d4c245455b7bc07fc80fd831f,590304b96b0324da9935e360a95ee4fbb005789c,469d03b06b1f3589f9a89d1b8f41ecd7db024baa,d8afd29536786b0907c795afeb8cd5aa3ff2d3b6,eaf999638a65d453e4982707942ed531cd5702fd,af802b357b6a888773138c0f0d2de52c1f3d7fdd,781e099495d35b5d4c245455b7bc07fc80fd831f..82a8de8d618c7da2e49df55ffcf6b7fae18ff300
@@@@@@@@ -886,17 -886,16 -886,16 -886,16 -881,12 -886,16 -886,17 +886,16 @@@@@@@@ S:    Maintaine
       F:       drivers/media/rc/meson-ir.c
       N:       meson[x68]
       
    +  ARM/Annapurna Labs ALPINE ARCHITECTURE
    +  M:       Tsahee Zidenberg <tsahee@annapurnalabs.com>
    +  S:       Maintained
    +  F:       arch/arm/mach-alpine/
    +  
       ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES
-   - -M:       Andrew Victor <linux@maxim.org.za>
       M:       Nicolas Ferre <nicolas.ferre@atmel.com>
+   + +M:       Alexandre Belloni <alexandre.belloni@free-electrons.com>
       M:       Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
       L:       linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
-   - -W:       http://maxim.org.za/at91_26.html
       W:       http://www.linux4sam.org
       S:       Supported
       F:       arch/arm/mach-at91/
@@@@@@@@ -1196,7 -1201,7 -1201,10 -1201,10 -1176,7 -1201,10 -1196,7 +1201,10 @@@@@@@@ M:        Sebastian Hesselbarth <sebastian.hes
       L:       linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
       S:       Maintained
       F:       arch/arm/mach-mvebu/
    -  F:       drivers/rtc/armada38x-rtc
    +  F:       drivers/rtc/rtc-armada38x.c
++  + +F:       arch/arm/boot/dts/armada*
++  + +F:       arch/arm/boot/dts/kirkwood*
++  + +
       
       ARM/Marvell Berlin SoC support
       M:       Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
@@@@@@@@ -2116,8 -2122,9 -2132,9 -2131,9 -2106,9 -2131,9 -2116,8 +2132,9 @@@@@@@@ S:    Supporte
       F:       drivers/net/ethernet/broadcom/bnx2x/
       
       BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
-   - -M:       Christian Daudt <bcm@fixthebug.org>
    -  M:       Matt Porter <mporter@linaro.org>
       M:       Florian Fainelli <f.fainelli@gmail.com>
+   + +M:       Ray Jui <rjui@broadcom.com>
+   + +M:       Scott Branden <sbranden@broadcom.com>
       L:       bcm-kernel-feedback-list@broadcom.com
       T:       git git://github.com/broadcom/mach-bcm
       S:       Maintained
@@@@@@@@ -5048,7 -5054,7 -5064,7 -5062,7 -4988,7 -5062,7 -5048,7 +5063,7 @@@@@@@@ M:    Hal Rosenstock <hal.rosenstock@gmail
       L:       linux-rdma@vger.kernel.org
       W:       http://www.openfabrics.org/
       Q:       http://patchwork.kernel.org/project/linux-rdma/list/
-   - -T:       git git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband.git
 -     T:       git git://github.com/dledford/linux.git
++  + +T:       git git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git
       S:       Supported
       F:       Documentation/infiniband/
       F:       drivers/infiniband/
@@@@@@@@ -7546,7 -7555,7 -7576,7 -7574,8 -7469,8 -7574,7 -7546,7 +7575,8 @@@@@@@@ S:    Maintaine
       F:       drivers/pci/host/pci-exynos.c
       
       PCI DRIVER FOR SYNOPSIS DESIGNWARE
    -  M:       Mohit Kumar <mohit.kumar@st.com>
--  - -M:       Jingoo Han <jg1.han@samsung.com>
++  + +M:       Jingoo Han <jingoohan1@gmail.com>
+++ +++M:       Pratyush Anand <pratyush.anand@gmail.com>
       L:       linux-pci@vger.kernel.org
       S:       Maintained
       F:       drivers/pci/host/*designware*
@@@@@@@@ -7560,8 -7569,8 -7590,8 -7589,9 -7484,9 -7588,8 -7560,8 +7590,9 @@@@@@@@ F:    Documentation/devicetree/bindings/pc
       F:       drivers/pci/host/pci-host-generic.c
       
       PCIE DRIVER FOR ST SPEAR13XX
    -  M:       Mohit Kumar <mohit.kumar@st.com>
+++ +++M:       Pratyush Anand <pratyush.anand@gmail.com>
       L:       linux-pci@vger.kernel.org
---  --S:       Orphan
+++  ++S:       Maintained
       F:       drivers/pci/host/*spear*
       
       PCMCIA SUBSYSTEM
@@@@@@@@ -10549,15 -10558,15 -10582,15 -10582,14 -10416,9 -10580,15 -10549,15 +10583,14 @@@@@@@@ S:     Maintaine
       F:       drivers/vhost/
       F:       include/uapi/linux/vhost.h
       
    -  VIA RHINE NETWORK DRIVER
    -  M:       Roger Luethi <rl@hellgate.ch>
    +  VIRTIO INPUT DRIVER
    +  M:       Gerd Hoffmann <kraxel@redhat.com>
       S:       Maintained
---  --M:       Roger Luethi <rl@hellgate.ch>
---  --S:       Maintained
    +  F:       drivers/virtio/virtio_input.c
    +  F:       include/uapi/linux/virtio_input.h
    +  
    +  VIA RHINE NETWORK DRIVER
+++ +++S:       Orphan
       F:       drivers/net/ethernet/via/via-rhine.c
       
       VIA SD/MMC CARD CONTROLLER DRIVER
index e43d48956dea239fe6816bdb23f0174754c623ee,e43d48956dea239fe6816bdb23f0174754c623ee,e43d48956dea239fe6816bdb23f0174754c623ee,e1c7e9e51045165db5312f540dfc8875e7b1f0b6,31e90c472c76d762922c9c9afea68edeef85a3bc,e5b77d398e9b0dff406f8b810fa865a40caf1fb5,e43d48956dea239fe6816bdb23f0174754c623ee..c5677ed2cd891d530ab02806f4c21782e4db226f
@@@@@@@@ -3235,45 -3235,45 -3235,45 -3236,45 -3238,42 -2945,61 -3235,45 +2954,61 @@@@@@@@ static int alloc_passthrough_domain(voi
       
        return 0;
       }
    -  static int amd_iommu_domain_init(struct iommu_domain *dom)
    -  {
    -   struct protection_domain *domain;
    -  
    -   domain = protection_domain_alloc();
    -   if (!domain)
    -           goto out_free;
       
    -   domain->mode    = PAGE_MODE_3_LEVEL;
    -   domain->pt_root = (void *)get_zeroed_page(GFP_KERNEL);
    -   if (!domain->pt_root)
    -           goto out_free;
    +  static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
    +  {
    +   struct protection_domain *pdomain;
+++++ + struct dma_ops_domain *dma_domain;
       
----  - /* We only support unmanaged domains for now */
----  - if (type != IOMMU_DOMAIN_UNMANAGED)
----  -         return NULL;
----  -
----  - pdomain = protection_domain_alloc();
----  - if (!pdomain)
----  -         goto out_free;
    -   domain->iommu_domain = dom;
+++++ + switch (type) {
+++++ + case IOMMU_DOMAIN_UNMANAGED:
+++++ +         pdomain = protection_domain_alloc();
+++++ +         if (!pdomain)
+++++ +                 return NULL;
       
----  - pdomain->mode    = PAGE_MODE_3_LEVEL;
----  - pdomain->pt_root = (void *)get_zeroed_page(GFP_KERNEL);
----  - if (!pdomain->pt_root)
----  -         goto out_free;
    -   dom->priv = domain;
+++++ +         pdomain->mode    = PAGE_MODE_3_LEVEL;
+++++ +         pdomain->pt_root = (void *)get_zeroed_page(GFP_KERNEL);
+++++ +         if (!pdomain->pt_root) {
+++++ +                 protection_domain_free(pdomain);
+++++ +                 return NULL;
+++++ +         }
       
----  - pdomain->domain.geometry.aperture_start = 0;
----  - pdomain->domain.geometry.aperture_end   = ~0ULL;
----  - pdomain->domain.geometry.force_aperture = true;
    -   dom->geometry.aperture_start = 0;
    -   dom->geometry.aperture_end   = ~0ULL;
    -   dom->geometry.force_aperture = true;
+++++ +         pdomain->domain.geometry.aperture_start = 0;
+++++ +         pdomain->domain.geometry.aperture_end   = ~0ULL;
+++++ +         pdomain->domain.geometry.force_aperture = true;
       
----  - return &pdomain->domain;
    -   return 0;
+++++ +         break;
+++++ + case IOMMU_DOMAIN_DMA:
+++++ +         dma_domain = dma_ops_domain_alloc();
+++++ +         if (!dma_domain) {
+++++ +                 pr_err("AMD-Vi: Failed to allocate\n");
+++++ +                 return NULL;
+++++ +         }
+++++ +         pdomain = &dma_domain->domain;
+++++ +         break;
+++++ + case IOMMU_DOMAIN_IDENTITY:
+++++ +         pdomain = protection_domain_alloc();
+++++ +         if (!pdomain)
+++++ +                 return NULL;
       
----- -out_free:
----  - protection_domain_free(pdomain);
    -   protection_domain_free(domain);
+++++ +         pdomain->mode = PAGE_MODE_NONE;
+++++ +         break;
+++++ + default:
+++++ +         return NULL;
+++++ + }
       
----  - return NULL;
    -   return -ENOMEM;
+++++ + return &pdomain->domain;
       }
       
    -  static void amd_iommu_domain_destroy(struct iommu_domain *dom)
    +  static void amd_iommu_domain_free(struct iommu_domain *dom)
       {
    -   struct protection_domain *domain = dom->priv;
    +   struct protection_domain *domain;
       
    -   if (!domain)
    +   if (!dom)
                return;
       
    +   domain = to_pdomain(dom);
    +  
        if (domain->dev_cnt > 0)
                cleanup_domain(domain);
       
@@@@@@@@ -3412,10 -3412,10 -3412,10 -3413,10 -3414,10 -3138,51 -3412,10 +3147,51 @@@@@@@@ static bool amd_iommu_capable(enum iomm
        return false;
       }
       
+++++ +static void amd_iommu_get_dm_regions(struct device *dev,
+++++ +                              struct list_head *head)
+++++ +{
+++++ + struct unity_map_entry *entry;
+++++ + u16 devid;
+++++ +
+++++ + devid = get_device_id(dev);
+++++ +
+++++ + list_for_each_entry(entry, &amd_iommu_unity_map, list) {
+++++ +         struct iommu_dm_region *region;
+++++ +
+++++ +         if (devid < entry->devid_start || devid > entry->devid_end)
+++++ +                 continue;
+++++ +
+++++ +         region = kzalloc(sizeof(*region), GFP_KERNEL);
+++++ +         if (!region) {
+++++ +                 pr_err("Out of memory allocating dm-regions for %s\n",
+++++ +                         dev_name(dev));
+++++ +                 return;
+++++ +         }
+++++ +
+++++ +         region->start = entry->address_start;
+++++ +         region->length = entry->address_end - entry->address_start;
+++++ +         if (entry->prot & IOMMU_PROT_IR)
+++++ +                 region->prot |= IOMMU_READ;
+++++ +         if (entry->prot & IOMMU_PROT_IW)
+++++ +                 region->prot |= IOMMU_WRITE;
+++++ +
+++++ +         list_add_tail(&region->list, head);
+++++ + }
+++++ +}
+++++ +
+++++ +static void amd_iommu_put_dm_regions(struct device *dev,
+++++ +                              struct list_head *head)
+++++ +{
+++++ + struct iommu_dm_region *entry, *next;
+++++ +
+++++ + list_for_each_entry_safe(entry, next, head, list)
+++++ +         kfree(entry);
+++++ +}
+++++ +
       static const struct iommu_ops amd_iommu_ops = {
        .capable = amd_iommu_capable,
    -   .domain_init = amd_iommu_domain_init,
    -   .domain_destroy = amd_iommu_domain_destroy,
    +   .domain_alloc = amd_iommu_domain_alloc,
    +   .domain_free  = amd_iommu_domain_free,
        .attach_dev = amd_iommu_attach_device,
        .detach_dev = amd_iommu_detach_device,
        .map = amd_iommu_map,
index d4f527e5667936454bfb49e01db931703b180e73,37a6aa8f318b0d6e92c14a2f35d92dda46298c4e,d4f527e5667936454bfb49e01db931703b180e73,d4f527e5667936454bfb49e01db931703b180e73,72e683df0731727bd46d17c8bb21a2d53554804f,89dc50b9acdc07f21e4ec384151a3e8e72139156,d4f527e5667936454bfb49e01db931703b180e73..49e7542510d15caac5622cdb01fdcf8b77bb80e8
@@@@@@@@ -898,22 -898,22 -898,22 -898,22 -898,31 -1025,28 -898,22 +1025,28 @@@@@@@@ void iommu_set_fault_handler(struct iom
       }
       EXPORT_SYMBOL_GPL(iommu_set_fault_handler);
       
----- -struct iommu_domain *iommu_domain_alloc(struct bus_type *bus)
+++++ +static struct iommu_domain *__iommu_domain_alloc(struct bus_type *bus,
+++++ +                                          unsigned type)
       {
        struct iommu_domain *domain;
    -   int ret;
       
        if (bus == NULL || bus->iommu_ops == NULL)
                return NULL;
       
----  - domain = bus->iommu_ops->domain_alloc(IOMMU_DOMAIN_UNMANAGED);
    -   domain = kzalloc(sizeof(*domain), GFP_KERNEL);
+++++ + domain = bus->iommu_ops->domain_alloc(type);
        if (!domain)
                return NULL;
       
    -   domain->ops = bus->iommu_ops;
    -  
    -   ret = domain->ops->domain_init(domain);
    -   if (ret)
    -           goto out_free;
    +   domain->ops  = bus->iommu_ops;
----  - domain->type = IOMMU_DOMAIN_UNMANAGED;
+++++ + domain->type = type;
       
        return domain;
    -  out_free:
    -   kfree(domain);
    -  
    -   return NULL;
    +  }
++++  +
+++++ +struct iommu_domain *iommu_domain_alloc(struct bus_type *bus)
+++++ +{
+++++ + return __iommu_domain_alloc(bus, IOMMU_DOMAIN_UNMANAGED);
++++  +}
       EXPORT_SYMBOL_GPL(iommu_domain_alloc);
       
       void iommu_domain_free(struct iommu_domain *domain)
index 37f6a594c1c85c3f649a319a7c14c6bc95ad57a3,4015560bf486db22e82f1652799731b90277b864,cab214544237cf6f89754c3878f0e57f66ba360d,cab214544237cf6f89754c3878f0e57f66ba360d,6a8b1ec4a48a1f1100bc0f9f301fc658758a35ca,cab214544237cf6f89754c3878f0e57f66ba360d,4015560bf486db22e82f1652799731b90277b864..ebf0adb8e7ea729f5cab436de29a8e18afd8d78c
@@@@@@@@ -819,10 -808,10 -808,10 -808,10 -801,10 -808,10 -808,10 +819,10 @@@@@@@@ static void rk_iommu_detach_device(stru
       
        iommu->domain = NULL;
       
 ------ dev_info(dev, "Detached from iommu domain\n");
 ++++++ dev_dbg(dev, "Detached from iommu domain\n");
       }
       
    -  static int rk_iommu_domain_init(struct iommu_domain *domain)
    +  static struct iommu_domain *rk_iommu_domain_alloc(unsigned type)
       {
        struct rk_iommu_domain *rk_domain;