10 Sep, 2010

14 commits

  • Kexec tools has been moved to http://kernel.org/pub/linux/utils/kernel/kexec/
    as user-space code shouldn't be in /pub/linux/kernel

    Signed-off-by: Simon Horman
    Acked-by: "Eric W. Biederman"
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Simon Horman
     
  • commit c2c6ca4 (direct-io: do not merge logically non-contiguous requests)
    introduced a bug whereby all O_DIRECT I/Os were submitted a page at a time
    to the block layer. The problem is that the code expected
    dio->block_in_file to correspond to the current page in the dio. In fact,
    it corresponds to the previous page submitted via submit_page_section.
    This was purely an oversight, as the dio->cur_page_fs_offset field was
    introduced for just this purpose. This patch simply uses the correct
    variable when calculating whether there is a mismatch between contiguous
    logical blocks and contiguous physical blocks (as described in the
    comments).

    I also switched the if conditional following this check to an else if, to
    ensure that we never call dio_bio_submit twice for the same dio (in
    theory, this should not happen, anyway).

    I've tested this by running blktrace and verifying that a 64KB I/O was
    submitted as a single I/O. I also ran the patched kernel through
    xfstests' aio tests using xfs, ext4 (with 1k and 4k block sizes) and btrfs
    and verified that there were no regressions as compared to an unpatched
    kernel.

    Signed-off-by: Jeff Moyer
    Acked-by: Josef Bacik
    Cc: Christoph Hellwig
    Cc: Chris Mason
    Cc: [2.6.35.x]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Moyer
     
  • Added missing axis-mapping for HP ProBook 532x and HP Mini 5102.

    Signed-off-by: Takashi Iwai
    Cc: Eric Piel
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Takashi Iwai
     
  • bob.picco@hp.com doesn't work any more and Bob says that he's unlikely to
    work on hpet.c in the future.

    Signed-off-by: Jiri Slaby
    Acked-by: Bob Picco
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Much (but not all) of the RTC state is kept in the RTC peripheral which
    has its own power domain. Periodically (1 HZ), that state is synced from
    one power domain to the other (peripheral->core). When we are resuming,
    we need to wait for the sync to occur so that we don't get a mismatch of
    reading undefined state in the rest of the driver.

    Further, once the externally maintained bits have been synced back into
    the core, we then need to restore the bits maintained in the core. In our
    particular case, that is just the write completion interrupt bit.

    If we don't do any of this, working with the RTC causes ~5 second delays
    from time to time after waking up due to the write completion interrupt
    never firing.

    Reported-by: Michael Dean
    Reported-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • The int_clear helper takes a bitmask of interrupts to keep, not to
    disable. When suspending without wakeup enabled, we want to disable
    all interrupts, so use 0 (keep none) instead of -1 (keep all).

    Signed-off-by: Mike Frysinger
    Acked-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Frysinger
     
  • Some macro parameter references inside typeof() operator are not enclosed
    with parenthesis. It should be safer to add them.

    Signed-off-by: Huang Ying
    Acked-by: Stefani Seibold
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Ying
     
  • The introduction of support for SD combo cards breaks the initialization
    of all CSR SDIO chips. The GO_IDLE (CMD0) in mmc_sd_get_cid() causes CSR
    chips to be reset (this is non-standard behavior).

    When initializing an SDIO card check for a combo card by using the memory
    present bit in the R4 response to IO_SEND_OP_COND (CMD5). This avoids the
    call to mmc_sd_get_cid() on an SDIO-only card.

    Signed-off-by: David Vrabel
    Acked-by: Michal Mirolaw
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Vrabel
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm: (30 commits)
    ARM: Update mach-types
    ARM: Partially revert "Auto calculate ZRELADDR and provide option for exceptions"
    ARM: Ensure PTE modifications via dma_alloc_coherent are visible
    ARM: 6359/1: ep93xx: move clock initialization earlier
    Revert "[ARM] pxa: remove now unnecessary dma_needs_bounce()"
    ARM: 6352/1: perf: fix event validation
    ARM: 6344/1: Mark CPU_32v6K as depended on CPU_V7
    ARM: 6343/1: wire up fanotify and prlimit64 syscalls on ARM
    ARM: 6330/1: perf: reword comments relating to perf_event_do_pending
    ARM: pxa168fb: fix section mismatch
    ARM: pxa: Make id const in pwm_probe()
    ARM: pxa: fix CI_HSYNC and CI_VSYNC MFP defines for pxa300
    ARM: pxa: remove __init from cpufreq_driver->init()
    ARM: imx: set cache line size to 64 bytes for i.MX5
    mx5/clock: fix clear bit fields issue in _clk_ccgr_disable function
    mxc/tzic: add base address when accessing TZIC registers
    ARM: mach-shmobile: ap4evb: fix write protect for SDHI1
    ARM: mach-shmobile: ap4evb: modify FSI2 ID
    ARM: mach-shmobile: do not enable the PLLC2 clock on init
    ARM: mach-shmobile: Clock framework comment fix
    ...

    Linus Torvalds
     
  • Signed-off-by: Russell King

    Russell King
     
  • Partially revert e69edc7, which introduced automatic zreladdr
    support. The change in the way the manual definition is defined
    seems to be error and conflict prone. Go back to the original way
    we were handling this for the time being, while keeping the automatic
    zreladdr facility.

    Acked-by: Uwe Kleine-König

    Russell King
     
  • Russell King
     
  • lg_lock_global() currently only acquires spinlocks for online CPUs, but
    it's meant to lock all possible CPUs. Lglock-protected resources may be
    associated with removed CPUs - and, indeed, that could happen with the
    per-superblock open files lists.

    At Nick's suggestion, change for_each_online_cpu() to
    for_each_possible_cpu() to protect accesses to those resources.

    Cc: Al Viro
    Acked-by: Nick Piggin
    Signed-off-by: Jonathan Corbet
    Signed-off-by: Linus Torvalds

    Jonathan Corbet
     
  • So it can be used by all that need to check for that.

    Signed-off-by: Stefan Bader
    Signed-off-by: Linus Torvalds

    Stefan Bader
     

09 Sep, 2010

13 commits


08 Sep, 2010

13 commits

  • 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: Dave Hylands
    Tested-by: Dave Hylands
    Signed-off-by: Russell King

    Russell King
     
  • 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: Thomas Gleixner
    Cc: Peter Zijlstra
    Cc: Christoph Hellwig
    LKML-Reference:

    Thomas Gleixner
     
  • Commit 7cfe24947 ("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: Mika Westerberg
    Acked-by: H Hartley Sweeten
    Signed-off-by: Russell King

    Mika Westerberg
     
  • This reverts commit 4fa5518, which causes a compilation regression for
    IXP4xx platforms.

    Reported-by: Richard Cochran
    Acked-by: Eric Miao
    Signed-off-by: Russell King

    Russell King
     
  • 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: Mark Fasheh
    Signed-off-by: Tao Ma

    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: Mark Fasheh
    Signed-off-by: Tao Ma

    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: Mark Fasheh
    Signed-off-by: Tao Ma

    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: Mark Fasheh
    Signed-off-by: Tao Ma

    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: Mark Fasheh
    Signed-off-by: Tao Ma

    Mark Fasheh
     
  • The patch is to fix the regression bug brought from commit 6b933c8...( 'ocfs2:
    Avoid direct write if we fall back to buffered I/O'):

    http://oss.oracle.com/bugzilla/show_bug.cgi?id=1285

    The commit 6b933c8e6f1a2f3118082c455eef25f9b1ac7b45 changed __generic_file_aio_write
    to generic_file_buffered_write, which didn't call filemap_{write,wait}_range to flush
    the pagecaches when we were falling O_DIRECT writes back to buffered ones. it did hurt
    the O_DIRECT semantics somehow in extented odirect writes.

    This patch tries to guarantee O_DIRECT writes of 'fall back to buffered' to be correctly
    flushed.

    Signed-off-by: Tristan Ye
    Signed-off-by: Tao Ma

    Tristan Ye
     
  • We cannot call grab_cache_page() when holding filesystem locks or with
    a transaction started as grab_cache_page() calls page allocation with
    GFP_KERNEL flag and thus page reclaim can recurse back into the filesystem
    causing deadlocks or various assertion failures. We have to use
    find_or_create_page() instead and pass it GFP_NOFS as we do with other
    allocations.

    Acked-by: Mark Fasheh
    Signed-off-by: Jan Kara
    Signed-off-by: Tao Ma

    Jan Kara
     
  • We were setting ac->ac_last_group in ocfs2_claim_suballoc_bits from
    res->sr_bg_blkno. Unfortunately, res->sr_bg_blkno is going to be zero under
    normal (non-fragmented) circumstances. The discontig block group patches
    effectively turned off that feature. Fix this by correctly calculating what
    the next group hint should be.

    Acked-by: Tao Ma
    Signed-off-by: Mark Fasheh
    Tested-by: Goldwyn Rodrigues
    Signed-off-by: Tao Ma

    Mark Fasheh
     
  • We have added discontig block group now, and now an inode
    can be allocated in an discontig block group. So get
    it in ocfs2_get_suballoc_slot_bit.

    The old ocfs2_test_suballoc_bit gets group block no
    from the allocation inode which is wrong. Fix it by
    passing the right group.

    Acked-by: Mark Fasheh
    Signed-off-by: Tao Ma

    Tao Ma