10 Aug, 2012

2 commits

  • The check in the for-loop is broken. Fix it and the
    boot-crash it causes in AMD IOMMUv2 systems.

    Signed-off-by: Joerg Roedel

    Joerg Roedel
     
  • The ACPI tables in the Macbook Air 5,1 define a single IOAPIC with id 2,
    but the only remapping unit described in the DMAR table matches id 0.
    Interrupt remapping fails as a result, and the kernel panics with the
    message "timer doesn't work through Interrupt-remapped IO-APIC."

    To fix this, check each IOAPIC for a corresponding IOMMU. If an IOMMU is
    not found, do not allow IRQ remapping to be enabled.

    v2: Move check to parse_ioapics_under_ir(), raise log level to KERN_ERR,
    and add FW_BUG to the log message
    v3: Skip check if IOMMU doesn't support interrupt remapping and remove
    existing check that the IOMMU count equals the IOAPIC count

    Acked-by: Suresh Siddha
    Signed-off-by: Seth Forshee
    Acked-by: Yinghai Lu
    Signed-off-by: Joerg Roedel

    Seth Forshee
     

07 Aug, 2012

3 commits


03 Aug, 2012

5 commits

  • Fixes the following build error introduced by commit 3177bb76a8
    ("iommu/exynos: Implement DOMAIN_ATTR_GEOMETRY attribute"):

    drivers/iommu/exynos-iommu.c: In function ‘exynos_iommu_domain_init’:
    drivers/iommu/exynos-iommu.c:735:2: error: ‘dom’ undeclared
    (first use in this function)

    Signed-off-by: Sachin Kamat
    Acked-by: Kukjin Kim
    Signed-off-by: Joerg Roedel

    Sachin Kamat
     
  • err initial value should be -EAGAIN. Otherwise 2nd iteration always
    fails in the case as[0] is occupied.

    Signed-off-by: Hiroshi Doyu
    Signed-off-by: Joerg Roedel

    Hiroshi Doyu
     
  • Small clean up with lesser nest for readability.

    Signed-off-by: Hiroshi Doyu
    Signed-off-by: Joerg Roedel

    Hiroshi Doyu
     
  • Add missing free_domain_mem on failure path after alloc_domain.

    A simplified version of the semantic match that finds this
    problem is as follows: (http://coccinelle.lip6.fr/)

    //
    @km exists@
    local idexpression e;
    expression e1,e2,e3;
    type T,T1;
    identifier f;
    @@

    * e = alloc_domain(...)
    ... when any
    when != e = e1
    when != e1 = (T)e
    when != e1(...,(T)e,...)
    when != &e->f
    if(...) { ... when != e2(...,(T1)e,...)
    when != e3 = e
    when forall
    (
    return ;
    |
    * return ...;
    ) }
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Joerg Roedel

    Julia Lawall
     
  • If list_for_each_entry, etc complete a traversal of the
    list, the iterator variable ends up pointing to an address
    at an offset from the list head, and not a meaningful
    structure. Thus this value should not be used after the end
    of the iterator. Replace c->dev by dev, which is the value
    that c->dev has been compared to.

    This problem was found using Coccinelle (http://coccinelle.lip6.fr/).

    Signed-off-by: Julia Lawall
    Acked-by: Stephen Warren
    Acked-by: Hiroshi DOYU
    Signed-off-by: Joerg Roedel

    Julia Lawall
     

25 Jul, 2012

3 commits

  • Pull IOMMU updates from Joerg Roedel:
    "The most important part of these updates is the IOMMU groups code
    enhancement written by Alex Williamson. It abstracts the problem that
    a given hardware IOMMU can't isolate any given device from any other
    device (e.g. 32 bit PCI devices can't usually be isolated). Devices
    that can't be isolated are grouped together. This code is required
    for the upcoming VFIO framework.

    Another IOMMU-API change written by me is the introduction of domain
    attributes. This makes it easier to handle GART-like IOMMUs with the
    IOMMU-API because now the start-address and the size of the domain
    address space can be queried.

    Besides that there are a few cleanups and fixes for the NVidia Tegra
    IOMMU drivers and the reworked init-code for the AMD IOMMU. The
    latter is from my patch-set to support interrupt remapping. The rest
    of this patch-set requires x86 changes which are not mergabe yet. So
    full support for interrupt remapping with AMD IOMMUs will come in a
    future merge window."

    * tag 'iommu-updates-v3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (33 commits)
    iommu/amd: Fix hotplug with iommu=pt
    iommu/amd: Add missing spin_lock initialization
    iommu/amd: Convert iommu initialization to state machine
    iommu/amd: Introduce amd_iommu_init_dma routine
    iommu/amd: Move unmap_flush message to amd_iommu_init_dma_ops()
    iommu/amd: Split enable_iommus() routine
    iommu/amd: Introduce early_amd_iommu_init routine
    iommu/amd: Move informational prinks out of iommu_enable
    iommu/amd: Split out PCI related parts of IOMMU initialization
    iommu/amd: Use acpi_get_table instead of acpi_table_parse
    iommu/amd: Fix sparse warnings
    iommu/tegra: Don't call alloc_pdir with as->lock
    iommu/tegra: smmu: Fix unsleepable memory allocation at alloc_pdir()
    iommu/tegra: smmu: Remove unnecessary sanity check at alloc_pdir()
    iommu/exynos: Implement DOMAIN_ATTR_GEOMETRY attribute
    iommu/tegra: Implement DOMAIN_ATTR_GEOMETRY attribute
    iommu/msm: Implement DOMAIN_ATTR_GEOMETRY attribute
    iommu/omap: Implement DOMAIN_ATTR_GEOMETRY attribute
    iommu/vt-d: Implement DOMAIN_ATTR_GEOMETRY attribute
    iommu/amd: Implement DOMAIN_ATTR_GEOMETRY attribute
    ...

    Linus Torvalds
     
  • Pull PCI changes from Bjorn Helgaas:
    "Host bridge hotplug:
    - Add MMCONFIG support for hot-added host bridges (Jiang Liu)
    Device hotplug:
    - Move fixups from __init to __devinit (Sebastian Andrzej Siewior)
    - Call FINAL fixups for hot-added devices, too (Myron Stowe)
    - Factor out generic code for P2P bridge hot-add (Yinghai Lu)
    - Remove all functions in a slot, not just those with _EJx (Amos
    Kong)
    Dynamic resource management:
    - Track bus number allocation (struct resource tree per domain)
    (Yinghai Lu)
    - Make P2P bridge 1K I/O windows work with resource reassignment
    (Bjorn Helgaas, Yinghai Lu)
    - Disable decoding while updating 64-bit BARs (Bjorn Helgaas)
    Power management:
    - Add PCIe runtime D3cold support (Huang Ying)
    Virtualization:
    - Add VFIO infrastructure (ACS, DMA source ID quirks) (Alex
    Williamson)
    - Add quirks for devices with broken INTx masking (Jan Kiszka)
    Miscellaneous:
    - Fix some PCI Express capability version issues (Myron Stowe)
    - Factor out some arch code with a weak, generic, pcibios_setup()
    (Myron Stowe)"

    * tag 'for-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (122 commits)
    PCI: hotplug: ensure a consistent return value in error case
    PCI: fix undefined reference to 'pci_fixup_final_inited'
    PCI: build resource code for M68K architecture
    PCI: pciehp: remove unused pciehp_get_max_lnk_width(), pciehp_get_cur_lnk_width()
    PCI: reorder __pci_assign_resource() (no change)
    PCI: fix truncation of resource size to 32 bits
    PCI: acpiphp: merge acpiphp_debug and debug
    PCI: acpiphp: remove unused res_lock
    sparc/PCI: replace pci_cfg_fake_ranges() with pci_read_bridge_bases()
    PCI: call final fixups hot-added devices
    PCI: move final fixups from __init to __devinit
    x86/PCI: move final fixups from __init to __devinit
    MIPS/PCI: move final fixups from __init to __devinit
    PCI: support sizing P2P bridge I/O windows with 1K granularity
    PCI: reimplement P2P bridge 1K I/O windows (Intel P64H2)
    PCI: disable MEM decoding while updating 64-bit MEM BARs
    PCI: leave MEM and IO decoding disabled during 64-bit BAR sizing, too
    PCI: never discard enable/suspend/resume_early/resume fixups
    PCI: release temporary reference in __nv_msi_ht_cap_quirk()
    PCI: restructure 'pci_do_fixups()'
    ...

    Linus Torvalds
     
  • Pull trivial tree from Jiri Kosina:
    "Trivial updates all over the place as usual."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (29 commits)
    Fix typo in include/linux/clk.h .
    pci: hotplug: Fix typo in pci
    iommu: Fix typo in iommu
    video: Fix typo in drivers/video
    Documentation: Add newline at end-of-file to files lacking one
    arm,unicore32: Remove obsolete "select MISC_DEVICES"
    module.c: spelling s/postition/position/g
    cpufreq: Fix typo in cpufreq driver
    trivial: typo in comment in mksysmap
    mach-omap2: Fix typo in debug message and comment
    scsi: aha152x: Fix sparse warning and make printing pointer address more portable.
    Change email address for Steve Glendinning
    Btrfs: fix typo in convert_extent_bit
    via: Remove bogus if check
    netprio_cgroup.c: fix comment typo
    backlight: fix memory leak on obscure error path
    Documentation: asus-laptop.txt references an obsolete Kconfig item
    Documentation: ManagementStyle: fixed typo
    mm/vmscan: cleanup comment error in balance_pgdat
    mm: cleanup on the comments of zone_reclaim_stat
    ...

    Linus Torvalds
     

24 Jul, 2012

1 commit


23 Jul, 2012

3 commits

  • Conflicts:
    drivers/iommu/iommu.c
    include/linux/iommu.h

    Joerg Roedel
     
  • Pull x86 platform changes from Ingo Molnar:
    "This tree mostly involves various APIC driver cleanups/robustization,
    and vSMP motivated platform callback improvements/cleanups"

    Fix up trivial conflict due to printk cleanup right next to return value
    change.

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (29 commits)
    Revert "x86/early_printk: Replace obsolete simple_strtoul() usage with kstrtoint()"
    x86/apic/x2apic: Use multiple cluster members for the irq destination only with the explicit affinity
    x86/apic/x2apic: Limit the vector reservation to the user specified mask
    x86/apic: Optimize cpu traversal in __assign_irq_vector() using domain membership
    x86/vsmp: Fix vector_allocation_domain's return value
    irq/apic: Use config_enabled(CONFIG_SMP) checks to clean up irq_set_affinity() for UP
    x86/vsmp: Fix linker error when CONFIG_PROC_FS is not set
    x86/apic/es7000: Make apicid of a cluster (not CPU) from a cpumask
    x86/apic/es7000+summit: Always make valid apicid from a cpumask
    x86/apic/es7000+summit: Fix compile warning in cpu_mask_to_apicid()
    x86/apic: Fix ugly casting and branching in cpu_mask_to_apicid_and()
    x86/apic: Eliminate cpu_mask_to_apicid() operation
    x86/x2apic/cluster: Vector_allocation_domain() should return a value
    x86/apic/irq_remap: Silence a bogus pr_err()
    x86/vsmp: Ignore IOAPIC IRQ affinity if possible
    x86/apic: Make cpu_mask_to_apicid() operations check cpu_online_mask
    x86/apic: Make cpu_mask_to_apicid() operations return error code
    x86/apic: Avoid useless scanning thru a cpumask in assign_irq_vector()
    x86/apic: Try to spread IRQ vectors to different priority levels
    x86/apic: Factor out default vector_allocation_domain() operation
    ...

    Linus Torvalds
     
  • Pull core/iommu changes from Ingo Molnar.

    * 'core-iommu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    iommu/dmar: Use pr_format() instead of PREFIX to tidy up pr_*() calls
    iommu/dmar: Reserve mmio space used by the IOMMU, if the BIOS forgets to
    iommu/dmar: Replace printks with appropriate pr_*()

    Linus Torvalds
     

19 Jul, 2012

2 commits


17 Jul, 2012

13 commits


11 Jul, 2012

7 commits


02 Jul, 2012

1 commit

  • write_file_bool() modifies 32 bits of data, so "amd_iommu_unmap_flush"
    needs to be 32 bits as well or we'll corrupt memory. Fortunately it
    looks like the data is aligned with a gap after the declaration so this
    is harmless in production.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Joerg Roedel

    Dan Carpenter