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
@@@@@@@@ -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
@@@@@@@@ -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,
@@@@@@@@ -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)
@@@@@@@@ -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;