From: Joerg Roedel Date: Fri, 19 Jun 2015 15:17:47 +0000 (+0200) Subject: Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', ... X-Git-Tag: v4.14-rc1~5129^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ffde2f67181195d457b95df44b8f88e8d969d89;p=platform%2Fkernel%2Flinux-rpi.git Merge branches 'arm/rockchip', 'arm/exynos', 'arm/smmu', 'x86/vt-d', 'x86/amd', 'default-domains' and 'core' into next --- 5ffde2f67181195d457b95df44b8f88e8d969d89 diff --cc MAINTAINERS index 781e099,590304b,469d03b,d8afd29,eaf9996,af802b3,781e099..82a8de8 --- a/MAINTAINERS +++ b/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 + S: Maintained + F: arch/arm/mach-alpine/ + ARM/ATMEL AT91RM9200 AND AT91SAM ARM ARCHITECTURES - - -M: Andrew Victor M: Nicolas Ferre + + +M: Alexandre Belloni M: Jean-Christophe Plagniol-Villard 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 @@@@@@@@ -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 - M: Matt Porter M: Florian Fainelli + + +M: Ray Jui + + +M: Scott Branden 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 -- - -M: Jingoo Han ++ + +M: Jingoo Han +++ +++M: Pratyush Anand 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 +++ +++M: Pratyush Anand 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 + VIRTIO INPUT DRIVER + M: Gerd Hoffmann S: Maintained + F: drivers/virtio/virtio_input.c + F: include/uapi/linux/virtio_input.h + + VIA RHINE NETWORK DRIVER --- --M: Roger Luethi --- --S: Maintained +++ +++S: Orphan F: drivers/net/ethernet/via/via-rhine.c VIA SD/MMC CARD CONTROLLER DRIVER diff --cc drivers/iommu/amd_iommu.c index e43d489,e43d489,e43d489,e1c7e9e,31e90c4,e5b77d3,e43d489..c5677ed --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@@@@@@@ -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(®ion->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, diff --cc drivers/iommu/iommu.c index d4f527e,37a6aa8,d4f527e,d4f527e,72e683d,89dc50b9a,d4f527e..49e7542 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@@@@@@@ -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) diff --cc drivers/iommu/rockchip-iommu.c index 37f6a59,4015560,cab2145,cab2145,6a8b1ec,cab2145,4015560..ebf0adb --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@@@@@@@ -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;