1. 21 12月, 2012 5 次提交
    • S
      lib: atomic64: Initialize locks statically to fix early users · fcc16882
      Stephen Boyd 提交于
      The atomic64 library uses a handful of static spin locks to implement
      atomic 64-bit operations on architectures without support for atomic
      64-bit instructions.
      
      Unfortunately, the spinlocks are initialized in a pure initcall and that
      is too late for the vfs namespace code which wants to use atomic64
      operations before the initcall is run.
      
      This became a problem as of commit 8823c079: "vfs: Add setns support
      for the mount namespace".
      
      This leads to BUG messages such as:
      
        BUG: spinlock bad magic on CPU#0, swapper/0/0
         lock: atomic64_lock+0x240/0x400, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
          do_raw_spin_lock+0x158/0x198
          _raw_spin_lock_irqsave+0x4c/0x58
          atomic64_add_return+0x30/0x5c
          alloc_mnt_ns.clone.14+0x44/0xac
          create_mnt_ns+0xc/0x54
          mnt_init+0x120/0x1d4
          vfs_caches_init+0xe0/0x10c
          start_kernel+0x29c/0x300
      
      coming out early on during boot when spinlock debugging is enabled.
      
      Fix this by initializing the spinlocks statically at compile time.
      Reported-and-tested-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Tested-by: NTony Lindgren <tony@atomide.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fcc16882
    • L
      Merge tag 'iommu-updates-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 787314c3
      Linus Torvalds 提交于
      Pull IOMMU updates from Joerg Roedel:
       "A few new features this merge-window.  The most important one is
        probably, that dma-debug now warns if a dma-handle is not checked with
        dma_mapping_error by the device driver.  This requires minor changes
        to some architectures which make use of dma-debug.  Most of these
        changes have the respective Acks by the Arch-Maintainers.
      
        Besides that there are updates to the AMD IOMMU driver for refactor
        the IOMMU-Groups support and to make sure it does not trigger a
        hardware erratum.
      
        The OMAP changes (for which I pulled in a branch from Tony Lindgren's
        tree) have a conflict in linux-next with the arm-soc tree.  The
        conflict is in the file arch/arm/mach-omap2/clock44xx_data.c which is
        deleted in the arm-soc tree.  It is safe to delete the file too so
        solve the conflict.  Similar changes are done in the arm-soc tree in
        the common clock framework migration.  A missing hunk from the patch
        in the IOMMU tree will be submitted as a seperate patch when the
        merge-window is closed."
      
      * tag 'iommu-updates-v3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (29 commits)
        ARM: dma-mapping: support debug_dma_mapping_error
        ARM: OMAP4: hwmod data: ipu and dsp to use parent clocks instead of leaf clocks
        iommu/omap: Adapt to runtime pm
        iommu/omap: Migrate to hwmod framework
        iommu/omap: Keep mmu enabled when requested
        iommu/omap: Remove redundant clock handling on ISR
        iommu/amd: Remove obsolete comment
        iommu/amd: Don't use 512GB pages
        iommu/tegra: smmu: Move bus_set_iommu after probe for multi arch
        iommu/tegra: gart: Move bus_set_iommu after probe for multi arch
        iommu/tegra: smmu: Remove unnecessary PTC/TLB flush all
        tile: dma_debug: add debug_dma_mapping_error support
        sh: dma_debug: add debug_dma_mapping_error support
        powerpc: dma_debug: add debug_dma_mapping_error support
        mips: dma_debug: add debug_dma_mapping_error support
        microblaze: dma-mapping: support debug_dma_mapping_error
        ia64: dma_debug: add debug_dma_mapping_error support
        c6x: dma_debug: add debug_dma_mapping_error support
        ARM64: dma_debug: add debug_dma_mapping_error support
        intel-iommu: Prevent devices with RMRRs from being placed into SI Domain
        ...
      787314c3
    • W
      intel-iommu: Free old page tables before creating superpage · 6491d4d0
      Woodhouse, David 提交于
      The dma_pte_free_pagetable() function will only free a page table page
      if it is asked to free the *entire* 2MiB range that it covers. So if a
      page table page was used for one or more small mappings, it's likely to
      end up still present in the page tables... but with no valid PTEs.
      
      This was fine when we'd only be repopulating it with 4KiB PTEs anyway
      but the same virtual address range can end up being reused for a
      *large-page* mapping. And in that case were were trying to insert the
      large page into the second-level page table, and getting a complaint
      from the sanity check in __domain_mapping() because there was already a
      corresponding entry. This was *relatively* harmless; it led to a memory
      leak of the old page table page, but no other ill-effects.
      
      Fix it by calling dma_pte_clear_range (hopefully redundant) and
      dma_pte_free_pagetable() before setting up the new large page.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Tested-by: NRavi Murty <Ravi.Murty@intel.com>
      Tested-by: NSudeep Dutt <sudeep.dutt@intel.com>
      Cc: stable@kernel.org [3.0+]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6491d4d0
    • V
      ARM: OMAP: Fix build breakage due to missing include in i2c.c · 18000985
      Vaibhav Bedia 提交于
      Merge commit 752451f0 ("Merge branch 'i2c-embedded/for-next' of
      git://git.pengutronix.de/git/wsa/linux") resulted in a build breakage
      for OMAP
      
        arch/arm/mach-omap2/i2c.c: In function 'omap_pm_set_max_mpu_wakeup_lat_compat':
        arch/arm/mach-omap2/i2c.c:130:2: error: implicit declaration of function 'omap_pm_set_max_mpu_wakeup_lat'
        make[1]: *** [arch/arm/mach-omap2/i2c.o] Error 1
      
      Fix this by including the appropriate header file with the function
      prototype.
      Reported-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NVaibhav Bedia <vaibhav.bedia@ti.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      18000985
    • L
      Merge tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux · b7dfde95
      Linus Torvalds 提交于
      Pull virtio update from Rusty Russell:
       "Some nice cleanups, and even a patch my wife did as a "live" demo for
        Latinoware 2012.
      
        There's a slightly non-trivial merge in virtio-net, as we cleaned up
        the virtio add_buf interface while DaveM accepted the mq virtio-net
        patches."
      
      * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (27 commits)
        virtio_console: Add support for remoteproc serial
        virtio_console: Merge struct buffer_token into struct port_buffer
        virtio: add drv_to_virtio to make code clearly
        virtio: use dev_to_virtio wrapper in virtio
        virtio-mmio: Fix irq parsing in command line parameter
        virtio_console: Free buffers from out-queue upon close
        virtio: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
        virtio_console: Use kmalloc instead of kzalloc
        virtio_console: Free buffer if splice fails
        virtio: tools: make it clear that virtqueue_add_buf() no longer returns > 0
        virtio: scsi: make it clear that virtqueue_add_buf() no longer returns > 0
        virtio: rpmsg: make it clear that virtqueue_add_buf() no longer returns > 0
        virtio: net: make it clear that virtqueue_add_buf() no longer returns > 0
        virtio: console: make it clear that virtqueue_add_buf() no longer returns > 0
        virtio: make virtqueue_add_buf() returning 0 on success, not capacity.
        virtio: console: don't rely on virtqueue_add_buf() returning capacity.
        virtio_net: don't rely on virtqueue_add_buf() returning capacity.
        virtio-net: remove unused skb_vnet_hdr->num_sg field
        virtio-net: correct capacity math on ring full
        virtio: move queue_index and num_free fields into core struct virtqueue.
        ...
      b7dfde95
  2. 20 12月, 2012 35 次提交