1. 10 9月, 2010 18 次提交
  2. 09 9月, 2010 13 次提交
  3. 08 9月, 2010 9 次提交
    • R
      ARM: Ensure PTE modifications via dma_alloc_coherent are visible · 2be23c47
      Russell King 提交于
      Dave Hylands reports:
      | We've observed a problem with dma_alloc_writecombine when the system
      | is under heavy load (heavy bus traffic).  We've managed to reduce the
      | problem to the following snippet, which is run from a kthread in a
      | continuous loop:
      |
      |   void *virtAddr;
      |   dma_addr_t physAddr;
      |   unsigned int numBytes = 256;
      |
      |   for (;;) {
      |       virtAddr = dma_alloc_writecombine(NULL,
      |             numBytes, &physAddr, GFP_KERNEL);
      |       if (virtAddr == NULL) {
      |          printk(KERN_ERR "Running out of memory\n");
      |          break;
      |       }
      |
      |       /* access DMA memory allocated */
      |       tmp = virtAddr;
      |       *tmp = 0x77;
      |
      |       /* free DMA memory */
      |       dma_free_writecombine(NULL,
      |             numBytes, virtAddr, physAddr);
      |
      |         ...sleep here...
      |     }
      |
      | By itself, the code will run forever with no issues. However, as we
      | increase our bus traffic (typically using DMA) then the *tmp = 0x77
      | line will eventually cause a page fault. If we add a small delay (a
      | few microseconds) before the *tmp = 0x77, then we don't see a page
      | fault, even under heavy load.
      
      A dsb() is required after modifying the PTE entries to ensure that they
      will always be visible.  Add this dsb().
      Reported-by: NDave Hylands <dhylands@gmail.com>
      Tested-by: NDave Hylands <dhylands@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2be23c47
    • T
      semaphore: Add DEFINE_SEMAPHORE · febc88c5
      Thomas Gleixner 提交于
      The full cleanup of init_MUTEX[_LOCKED] and DECLARE_MUTEX has not been
      done. Some of the users are real semaphores and we should name them as
      such instead of confusing everyone with "MUTEX".
      
      Provide the infrastructure to get finally rid of init_MUTEX[_LOCKED]
      and DECLARE_MUTEX.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      LKML-Reference: <20100907125054.795929962@linutronix.de>
      febc88c5
    • M
      ARM: 6359/1: ep93xx: move clock initialization earlier · a387f0f5
      Mika Westerberg 提交于
      Commit 7cfe2494 ("ARM: AMBA: Add pclk support to AMBA bus
      infrastructure") changed AMBA bus to handle the PCLK automatically.
      However, in EP93xx clock initialization is arch_initcall which is done
      later than AMBA device identification. This causes
      amba_get_enable_pclk() to fail resulting device where UARTs are not
      functional.
      
      So change ep93xx_clock_init() to be postcore_initcall.
      Signed-off-by: NMika Westerberg <mika.westerberg@iki.fi>
      Acked-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a387f0f5
    • R
      Revert "[ARM] pxa: remove now unnecessary dma_needs_bounce()" · 0485e18b
      Russell King 提交于
      This reverts commit 4fa5518c, which causes a compilation regression for
      IXP4xx platforms.
      Reported-by: NRichard Cochran <richardcochran@gmail.com>
      Acked-by: NEric Miao <eric.y.miao@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      0485e18b
    • M
      ocfs2: Fix orphan add in ocfs2_create_inode_in_orphan · 97b8f4a9
      Mark Fasheh 提交于
      ocfs2_create_inode_in_orphan() is used by reflink to create the newly
      reflinked inode simultaneously in the orphan dir. This allows us to easily
      handle partially-reflinked files during recovery cleanup.
      
      We have a problem though - the orphan dir stringifies inode # to determine
      a unique name under which the orphan entry dirent can be created. Since
      ocfs2_create_inode_in_orphan() needs the space allocated in the orphan dir
      before it can allocate the inode, we currently call into the orphan code:
      
             /*
              * We give the orphan dir the root blkno to fake an orphan name,
              * and allocate enough space for our insertion.
              */
             status = ocfs2_prepare_orphan_dir(osb, &orphan_dir,
                                               osb->root_blkno,
                                               orphan_name, &orphan_insert);
      
      Using osb->root_blkno might work fine on unindexed directories, but the
      orphan dir can have an index.  When it has that index, the above code fails
      to allocate the proper index entry.  Later, when we try to remove the file
      from the orphan dir (using the actual inode #), the reflink operation will
      fail.
      
      To fix this, I created a function ocfs2_alloc_orphaned_file() which uses the
      newly split out orphan and inode alloc code to figure out what the inode
      block number will be (once allocated) and then prepare the orphan dir from
      that data.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      97b8f4a9
    • M
      ocfs2: split out ocfs2_prepare_orphan_dir() into locking and prep functions · dd43bcde
      Mark Fasheh 提交于
      We do this because ocfs2_create_inode_in_orphan() wants to order locking of
      the orphan dir with respect to locking of the inode allocator *before*
      making any changes to the directory.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      dd43bcde
    • M
      ocfs2: allow return of new inode block location before allocation of the inode · e49e2767
      Mark Fasheh 提交于
      This allows code which needs to know the eventual block number of an inode
      but can't allocate it yet due to transaction or lock ordering. For example,
      ocfs2_create_inode_in_orphan() currently gives a junk blkno for preparation
      of the orphan dir because it can't yet know where the actual inode is placed
      - that code is actually in ocfs2_mknod_locked. This is a problem when the
      orphan dirs are indexed as the junk inode number will create an index entry
      which goes unused (and fails the later removal from the orphan dir).  Now
      with these interfaces, ocfs2_create_inode_in_orphan() can run the block
      group search (and get back the inode block number) *before* any actual
      allocation occurs.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      e49e2767
    • M
      ocfs2: use ocfs2_alloc_dinode_update_counts() instead of open coding · d5134982
      Mark Fasheh 提交于
      ocfs2_search_chain() makes the same updates as
      ocfs2_alloc_dinode_update_counts to the alloc inode. Instead of open coding
      the bitmap update, use our helper function.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      d5134982
    • M
      ocfs2: split out inode alloc code from ocfs2_mknod_locked · 021960ca
      Mark Fasheh 提交于
      Do this by splitting the bulk of the function away from the inode allocation
      code at the very tom of ocfs2_mknod_locked(). Existing callers don't need to
      change and won't see any difference. The new function created,
      __ocfs2_mknod_locked() will be used shortly.
      Signed-off-by: NMark Fasheh <mfasheh@suse.com>
      Signed-off-by: NTao Ma <tao.ma@oracle.com>
      021960ca
新手
引导
客服 返回
顶部