06 Apr, 2012

2 commits

  • Merge batch of fixes from Andrew Morton:
    "The simple_open() cleanup was held back while I wanted for laggards to
    merge things.

    I still need to send a few checkpoint/restore patches. I've been
    wobbly about merging them because I'm wobbly about the overall
    prospects for success of the project. But after speaking with Pavel
    at the LSF conference, it sounds like they're further toward
    completion than I feared - apparently davem is at the "has stopped
    complaining" stage regarding the net changes. So I need to go back
    and re-review those patchs and their (lengthy) discussion."

    * emailed from Andrew Morton : (16 patches)
    memcg swap: use mem_cgroup_uncharge_swap fix
    backlight: add driver for DA9052/53 PMIC v1
    C6X: use set_current_blocked() and block_sigmask()
    MAINTAINERS: add entry for sparse checker
    MAINTAINERS: fix REMOTEPROC F: typo
    alpha: use set_current_blocked() and block_sigmask()
    simple_open: automatically convert to simple_open()
    scripts/coccinelle/api/simple_open.cocci: semantic patch for simple_open()
    libfs: add simple_open()
    hugetlbfs: remove unregister_filesystem() when initializing module
    drivers/rtc/rtc-88pm860x.c: fix rtc irq enable callback
    fs/xattr.c:setxattr(): improve handling of allocation failures
    fs/xattr.c:listxattr(): fall back to vmalloc() if kmalloc() failed
    fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()
    sysrq: use SEND_SIG_FORCED instead of force_sig()
    proc: fix mount -t proc -o AAA

    Linus Torvalds
     
  • Many users of debugfs copy the implementation of default_open() when
    they want to support a custom read/write function op. This leads to a
    proliferation of the default_open() implementation across the entire
    tree.

    Now that the common implementation has been consolidated into libfs we
    can replace all the users of this function with simple_open().

    This replacement was done with the following semantic patch:

    @ open @
    identifier open_f != simple_open;
    identifier i, f;
    @@
    -int open_f(struct inode *i, struct file *f)
    -{
    (
    -if (i->i_private)
    -f->private_data = i->i_private;
    |
    -f->private_data = i->i_private;
    )
    -return 0;
    -}

    @ has_open depends on open @
    identifier fops;
    identifier open.open_f;
    @@
    struct file_operations fops = {
    ...
    -.open = open_f,
    +.open = simple_open,
    ...
    };

    [akpm@linux-foundation.org: checkpatch fixes]
    Signed-off-by: Stephen Boyd
    Cc: Greg Kroah-Hartman
    Cc: Al Viro
    Cc: Julia Lawall
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Boyd
     

05 Apr, 2012

1 commit

  • Pull DMA mapping branch from Marek Szyprowski:
    "Short summary for the whole series:

    A few limitations have been identified in the current dma-mapping
    design and its implementations for various architectures. There exist
    more than one function for allocating and freeing the buffers:
    currently these 3 are used dma_{alloc, free}_coherent,
    dma_{alloc,free}_writecombine, dma_{alloc,free}_noncoherent.

    For most of the systems these calls are almost equivalent and can be
    interchanged. For others, especially the truly non-coherent ones
    (like ARM), the difference can be easily noticed in overall driver
    performance. Sadly not all architectures provide implementations for
    all of them, so the drivers might need to be adapted and cannot be
    easily shared between different architectures. The provided patches
    unify all these functions and hide the differences under the already
    existing dma attributes concept. The thread with more references is
    available here:

    http://www.spinics.net/lists/linux-sh/msg09777.html

    These patches are also a prerequisite for unifying DMA-mapping
    implementation on ARM architecture with the common one provided by
    dma_map_ops structure and extending it with IOMMU support. More
    information is available in the following thread:

    http://thread.gmane.org/gmane.linux.kernel.cross-arch/12819

    More works on dma-mapping framework are planned, especially in the
    area of buffer sharing and managing the shared mappings (together with
    the recently introduced dma_buf interface: commit d15bd7ee445d
    "dma-buf: Introduce dma buffer sharing mechanism").

    The patches in the current set introduce a new alloc/free methods
    (with support for memory attributes) in dma_map_ops structure, which
    will later replace dma_alloc_coherent and dma_alloc_writecombine
    functions."

    People finally started piping up with support for merging this, so I'm
    merging it as the last of the pending stuff from the merge window.
    Looks like pohmelfs is going to wait for 3.5 and more external support
    for merging.

    * 'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
    common: DMA-mapping: add NON-CONSISTENT attribute
    common: DMA-mapping: add WRITE_COMBINE attribute
    common: dma-mapping: introduce mmap method
    common: dma-mapping: remove old alloc_coherent and free_coherent methods
    Hexagon: adapt for dma_map_ops changes
    Unicore32: adapt for dma_map_ops changes
    Microblaze: adapt for dma_map_ops changes
    SH: adapt for dma_map_ops changes
    Alpha: adapt for dma_map_ops changes
    SPARC: adapt for dma_map_ops changes
    PowerPC: adapt for dma_map_ops changes
    MIPS: adapt for dma_map_ops changes
    X86 & IA64: adapt for dma_map_ops changes
    common: dma-mapping: introduce generic alloc() and free() methods

    Linus Torvalds
     

28 Mar, 2012

1 commit

  • Adapt core x86 and IA64 architecture code for dma_map_ops changes: replace
    alloc/free_coherent with generic alloc/free methods.

    Signed-off-by: Andrzej Pietrasiewicz
    Acked-by: Kyungmin Park
    [removed swiotlb related changes and replaced it with wrappers,
    merged with IA64 patch to avoid inter-patch dependences in intel-iommu code]
    Signed-off-by: Marek Szyprowski
    Reviewed-by: Arnd Bergmann
    Acked-by: Tony Luck

    Andrzej Pietrasiewicz
     

24 Mar, 2012

1 commit

  • Pull IOMMU updates from Joerg Roedel:
    "The IOMMU updates for this round are not very large patch-wise. But
    they contain two new IOMMU drivers for the ARM Tegra 2 and 3
    platforms. Besides that there are also a few patches for the AMD
    IOMMU which prepare the driver for adding intr-remapping support and a
    couple of fixes."

    * tag 'iommu-updates-v3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    iommu/amd: Fix section mismatch
    iommu/amd: Move interrupt setup code into seperate function
    iommu/amd: Make sure IOMMU interrupts are re-enabled on resume
    iommu/amd: Fix section warning for prealloc_protection_domains
    iommu/amd: Don't initialize IOMMUv2 resources when not required
    iommu/amd: Update git-tree in MAINTAINERS
    iommu/tegra-gart: fix spin_unlock in map failure path
    iommu/amd: Fix double free of mem-region in error-path
    iommu/amd: Split amd_iommu_init function
    ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver
    ARM: IOMMU: Tegra20: Add iommu_ops for GART driver

    Linus Torvalds
     

23 Mar, 2012

3 commits


21 Mar, 2012

1 commit

  • Pull trivial tree from Jiri Kosina:
    "It's indeed trivial -- mostly documentation updates and a bunch of
    typo fixes from Masanari.

    There are also several linux/version.h include removals from Jesper."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (101 commits)
    kcore: fix spelling in read_kcore() comment
    constify struct pci_dev * in obvious cases
    Revert "char: Fix typo in viotape.c"
    init: fix wording error in mm_init comment
    usb: gadget: Kconfig: fix typo for 'different'
    Revert "power, max8998: Include linux/module.h just once in drivers/power/max8998_charger.c"
    writeback: fix fn name in writeback_inodes_sb_nr_if_idle() comment header
    writeback: fix typo in the writeback_control comment
    Documentation: Fix multiple typo in Documentation
    tpm_tis: fix tis_lock with respect to RCU
    Revert "media: Fix typo in mixer_drv.c and hdmi_drv.c"
    Doc: Update numastat.txt
    qla4xxx: Add missing spaces to error messages
    compiler.h: Fix typo
    security: struct security_operations kerneldoc fix
    Documentation: broken URL in libata.tmpl
    Documentation: broken URL in filesystems.tmpl
    mtd: simplify return logic in do_map_probe()
    mm: fix comment typo of truncate_inode_pages_range
    power: bq27x00: Fix typos in comment
    ...

    Linus Torvalds
     

20 Mar, 2012

1 commit


19 Mar, 2012

1 commit

  • Fix the following section warnings :

    WARNING: vmlinux.o(.text+0x49dbc): Section mismatch in reference
    from the function acpi_map_cpu2node() to the variable
    .cpuinit.data:__apicid_to_node The function acpi_map_cpu2node()
    references the variable __cpuinitdata __apicid_to_node. This is
    often because acpi_map_cpu2node lacks a __cpuinitdata
    annotation or the annotation of __apicid_to_node is wrong.

    WARNING: vmlinux.o(.text+0x49dc1): Section mismatch in reference
    from the function acpi_map_cpu2node() to the function
    .cpuinit.text:numa_set_node() The function acpi_map_cpu2node()
    references the function __cpuinit numa_set_node(). This is often
    because acpi_map_cpu2node lacks a __cpuinit annotation or the
    annotation of numa_set_node is wrong.

    WARNING: vmlinux.o(.text+0x526e77): Section mismatch in
    reference from the function prealloc_protection_domains() to the
    function .init.text:alloc_passthrough_domain() The function
    prealloc_protection_domains() references the function __init
    alloc_passthrough_domain(). This is often because
    prealloc_protection_domains lacks a __init annotation or the annotation of alloc_passthrough_domain is wrong.

    Signed-off-by: Steffen Persvold
    Link: http://lkml.kernel.org/r/1331810188-24785-1-git-send-email-sp@numascale.com
    Signed-off-by: Ingo Molnar

    Steffen Persvold
     

15 Mar, 2012

4 commits


13 Mar, 2012

1 commit


09 Mar, 2012

1 commit


08 Mar, 2012

1 commit


06 Mar, 2012

2 commits

  • The number of IOMMUs supported should be the same as the number
    of IO APICS. This limit comes into play when the IOMMUs are
    identity mapped, thus the number of possible IOMMUs in the
    "static identity" (si) domain should be this same number.

    Signed-off-by: Mike Travis
    Signed-off-by: Jack Steiner
    Cc: Jack Steiner
    Cc: David Woodhouse
    Cc: Chris Wright
    Cc: Daniel Rahn
    Cc: Jesse Barnes
    Cc: Joerg Roedel
    [ Fixed printk format string, cleaned up the code ]
    Signed-off-by: Andrew Morton
    Link: http://lkml.kernel.org/n/tip-ixcmp0hfp0a3b2lfv3uo0p0x@git.kernel.org
    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • With SandyBridge, Intel has changed these Socket PCI devices to
    have a class type of "System Peripheral" & "Performance
    counter", rather than "HostBridge".

    So instead of using a "special" case to detect which devices will
    not be doing DMA, use the fact that a device that is not associated
    with an IOMMU, will not need an identity map.

    Signed-off-by: Mike Travis
    Signed-off-by: Mike Habeck
    Cc: Jack Steiner
    Cc: David Woodhouse
    Cc: Chris Wright
    Cc: Daniel Rahn
    Cc: Jesse Barnes
    Cc: Joerg Roedel
    Signed-off-by: Andrew Morton
    Link: http://lkml.kernel.org/n/tip-018fywmjs3lmzfyzjlktg8dx@git.kernel.org
    Signed-off-by: Ingo Molnar

    Mike Travis
     

01 Mar, 2012

1 commit

  • The hardware-initializtion part of the AMD IOMMU driver is
    split out into a seperate function. This function can now be
    called either from amd_iommu_init() itself or any other
    place if the hardware needs to be ready earlier. This will
    be used to implement interrupt remapping for AMD.

    Signed-off-by: Joerg Roedel

    Joerg Roedel
     

27 Feb, 2012

1 commit

  • omap3isp depends on omap's iommu and will fail to probe if
    initialized before it (which always happen if they are builtin).

    Make omap's iommu subsys_initcall as an interim solution until
    the probe deferral mechanism is merged.

    Reported-by: James
    Debugged-by: Laurent Pinchart
    Signed-off-by: Ohad Ben-Cohen
    Cc: stable
    Cc: Tony Lindgren
    Cc: Hiroshi Doyu
    Cc: Joerg Roedel
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     

24 Feb, 2012

2 commits

  • Fix this:

    root@omap4430-panda:~# cat /debug/iommu/ducati/mem
    [ 62.725708] Unable to handle kernel NULL pointer dereference at virtual addre
    ss 0000001c
    [ 62.725708] pgd = e6240000
    [ 62.737091] [0000001c] *pgd=a7168831, *pte=00000000, *ppte=00000000
    [ 62.743682] Internal error: Oops: 17 [#1] SMP
    [ 62.743682] Modules linked in: omap_iommu_debug omap_iovmm virtio_rpmsg_bus o
    map_remoteproc remoteproc virtio_ring virtio mailbox_mach mailbox
    [ 62.743682] CPU: 0 Not tainted (3.3.0-rc1-00265-g382f84e-dirty #682)
    [ 62.743682] PC is at debug_read_mem+0x5c/0xac [omap_iommu_debug]
    [ 62.743682] LR is at 0x1004
    [ 62.777832] pc : [] lr : [] psr: 60000013
    [ 62.777832] sp : e72c7f40 ip : c0763c00 fp : 00000001
    [ 62.777832] r10: 00000000 r9 : 00000000 r8 : e72c7f80
    [ 62.777832] r7 : e6ffdc08 r6 : bed1ac78 r5 : 00001000 r4 : e7276000
    [ 62.777832] r3 : e60f3460 r2 : 00000000 r1 : e60f38c0 r0 : 00000000
    [ 62.777832] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    [ 62.816375] Control: 10c53c7d Table: a624004a DAC: 00000015
    [ 62.816375] Process cat (pid: 1176, stack limit = 0xe72c62f8)
    [ 62.828369] Stack: (0xe72c7f40 to 0xe72c8000)
    ...
    [ 62.884185] [] (debug_read_mem+0x5c/0xac [omap_iommu_debug]) from [] (vfs_read+0xac/0x130)
    [ 62.884185] [] (vfs_read+0xac/0x130) from [] (sys_read+0x40/0x70)
    [ 62.884185] [] (sys_read+0x40/0x70) from [] (ret_fast_syscall+0x0/0x3c)

    Fix also its 'echo bla > /debug/iommu/ducati/mem' Oops sibling, too.

    Signed-off-by: Ohad Ben-Cohen
    Cc: Tony Lindgren
    Cc: Hiroshi Doyu
    Cc: Laurent Pinchart
    Cc: Russell King
    Cc: Joerg Roedel
    Cc: stable@vger.kernel.org
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     
  • Adapt omap-iommu-debug to the latest omap-iommu API changes, which
    were introduced by commit fabdbca "iommu/omap: eliminate the public
    omap_find_iommu_device() method".

    In a nutshell, iommu users are not expected to provide the omap_iommu
    handle anymore - instead, iommus are attached using their user's device
    handle.

    omap-iommu-debug is a hybrid beast though: it invokes both public and
    private omap iommu API, so fix it as necessary (otherwise a crash
    is imminent).

    Note: omap-iommu-debug is a bit disturbing, as it fiddles with internal
    omap iommu data and requires exposing API which is otherwise not needed.
    It should better be more tightly coupled with omap-iommu, to prevent
    further bit rot and avoid exposing redundant API. Naturally that's out
    of scope for the -rc cycle, so for now just fix the obvious.

    Reported-by: Russell King
    Signed-off-by: Ohad Ben-Cohen
    Cc: Tony Lindgren
    Cc: Hiroshi Doyu
    Cc: Laurent Pinchart
    Cc: Joerg Roedel
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     

06 Feb, 2012

1 commit


30 Jan, 2012

1 commit

  • Error handling in msm_iommu_unmap() is broken. On some error
    conditions retval is set to a non-zero value which causes
    the function to return 'len' at the end. This hides the
    error from the user. Zero should be returned in those error
    cases.

    Cc: David Brown
    Cc: Stepan Moskovchenko
    Cc: stable@vger.kernel.org # >= 3.1
    Signed-off-by: Joerg Roedel
    Acked-by: David Brown

    Joerg Roedel
     

26 Jan, 2012

2 commits

  • Tegra 30 IOMMU H/W, SMMU (System Memory Management Unit). This patch
    implements struct iommu_ops for SMMU for the upper IOMMU API.

    This H/W module supports multiple virtual address spaces(domain x4),
    and manages 2 level H/W translation pagetable.

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

    Hiroshi DOYU
     
  • Tegra 20 IOMMU H/W, GART (Graphics Address Relocation Table). This
    patch implements struct iommu_ops for GART for the upper IOMMU API.

    This H/W module supports only single virtual address space(domain),
    and manages a single level 1-to-1 mapping H/W translation page table.

    [With small fixes by Joerg Roedel]

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

    Hiroshi DOYU
     

23 Jan, 2012

1 commit

  • On some systems the IVRS table does not contain all PCI
    devices present in the system. In case a device not present
    in the IVRS table is translated by the IOMMU no DMA is
    possible from that device by default.
    This patch fixes this by removing the DTE entry for every
    PCI device present in the system and not covered by IVRS.

    Cc: stable@vger.kernel.org # >= 3.0
    Signed-off-by: Joerg Roedel

    Joerg Roedel
     

11 Jan, 2012

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (53 commits)
    iommu/amd: Set IOTLB invalidation timeout
    iommu/amd: Init stats for iommu=pt
    iommu/amd: Remove unnecessary cache flushes in amd_iommu_resume
    iommu/amd: Add invalidate-context call-back
    iommu/amd: Add amd_iommu_device_info() function
    iommu/amd: Adapt IOMMU driver to PCI register name changes
    iommu/amd: Add invalid_ppr callback
    iommu/amd: Implement notifiers for IOMMUv2
    iommu/amd: Implement IO page-fault handler
    iommu/amd: Add routines to bind/unbind a pasid
    iommu/amd: Implement device aquisition code for IOMMUv2
    iommu/amd: Add driver stub for AMD IOMMUv2 support
    iommu/amd: Add stat counter for IOMMUv2 events
    iommu/amd: Add device errata handling
    iommu/amd: Add function to get IOMMUv2 domain for pdev
    iommu/amd: Implement function to send PPR completions
    iommu/amd: Implement functions to manage GCR3 table
    iommu/amd: Implement IOMMUv2 TLB flushing routines
    iommu/amd: Add support for IOMMUv2 domain mode
    iommu/amd: Add amd_iommu_domain_direct_map function
    ...

    Linus Torvalds
     

09 Jan, 2012

2 commits


06 Jan, 2012

1 commit

  • * 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (52 commits)
    memblock: Reimplement memblock allocation using reverse free area iterator
    memblock: Kill early_node_map[]
    score: Use HAVE_MEMBLOCK_NODE_MAP
    s390: Use HAVE_MEMBLOCK_NODE_MAP
    mips: Use HAVE_MEMBLOCK_NODE_MAP
    ia64: Use HAVE_MEMBLOCK_NODE_MAP
    SuperH: Use HAVE_MEMBLOCK_NODE_MAP
    sparc: Use HAVE_MEMBLOCK_NODE_MAP
    powerpc: Use HAVE_MEMBLOCK_NODE_MAP
    memblock: Implement memblock_add_node()
    memblock: s/memblock_analyze()/memblock_allow_resize()/ and update users
    memblock: Track total size of regions automatically
    powerpc: Cleanup memblock usage
    memblock: Reimplement memblock_enforce_memory_limit() using __memblock_remove()
    memblock: Make memblock functions handle overflowing range @size
    memblock: Reimplement __memblock_remove() using memblock_isolate_range()
    memblock: Separate out memblock_isolate_range() from memblock_set_node()
    memblock: Kill memblock_init()
    memblock: Kill sentinel entries at the end of static region arrays
    memblock: Add __memblock_dump_all()
    ...

    Linus Torvalds
     

30 Dec, 2011

1 commit


22 Dec, 2011

3 commits


20 Dec, 2011

1 commit


17 Dec, 2011

2 commits

  • * 'drm-intel-fixes' of git://people.freedesktop.org/~keithp/linux:
    drm/i915/dp: Dither down to 6bpc if it makes the mode fit
    drm/i915: enable semaphores on per-device defaults
    drm/i915: don't set unpin_work if vblank_get fails
    drm/i915: By default, enable RC6 on IVB and SNB when reasonable
    iommu: Export intel_iommu_enabled to signal when iommu is in use
    drm/i915/sdvo: Include LVDS panels for the IS_DIGITAL check
    drm/i915: prevent division by zero when asking for chipset power
    drm/i915: add PCH info to i915_capabilities
    drm/i915: set the right SDVO transcoder for CPT
    drm/i915: no-lvds quirk for ASUS AT5NM10T-I
    drm/i915: Treat pre-gen4 backlight duty cycle value consistently
    drm/i915: Hook up Ivybridge eDP
    drm/i915: add multi-threaded forcewake support

    Linus Torvalds
     
  • In i915 driver, we do not enable either rc6 or semaphores on SNB when dmar
    is enabled. The new 'intel_iommu_enabled' variable signals when the
    iommu code is in operation.

    Cc: Ted Phelps
    Cc: Peter
    Cc: Lukas Hejtmanek
    Cc: Andrew Lutomirski
    CC: Daniel Vetter
    Cc: Eugeni Dodonov
    Signed-off-by: Keith Packard

    Eugeni Dodonov