23 Oct, 2010

10 commits

  • When returning from the kernel debugger reset the rcu jiffies_stall
    value to prevent the rcu stall detector from sending NMI events which
    invoke a stack dump for each cpu in the system.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • Move the various clock and watch dog syncs to a single function in
    advance of adding another sync for the rcu stall detector.

    Signed-off-by: Jason Wessel

    Jason Wessel
     
  • HW breakpoints events stopped working correctly with kgdb as a result
    of commit: 018cbffe6819f6f8db20a0a3acd9bab9bfd667e4 (Merge commit
    'v2.6.33' into perf/core), later commit:
    ba773f7c510c0b252145933926c636c439889207 (x86,kgdb: Fix hw breakpoint
    regression) allowed breakpoints to propagate to the debugger core but
    did not completely address the original regression in functionality
    found in 2.6.35.

    When the DR_STEP flag is set in dr6 along with any of the DR_TRAP
    bits, the kgdb exception handler will enter once from the
    hw_breakpoint API call back and again from the die notifier for
    do_debug(), which causes the debugger to stop twice and also for the
    kgdb regression tests to fail running under kvm with:

    echo V2I1 > /sys/module/kgdbts/parameters/kgdbts

    To address the problem, the kgdb overflow handler needs to implement
    the same logic as the ptrace overflow handler call back with respect
    to updating the virtual copy of dr6. This will allow the kgdb
    do_debug() die notifier to properly handle the exception and the
    attached debugger, or kgdb test suite, will only receive a single
    notification.

    Signed-off-by: Jason Wessel
    CC: Frederic Weisbecker
    CC: x86@kernel.org

    Jason Wessel
     
  • * 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
    pcmcia: fix ni_daq_700 compilation
    pcmcia: IOCARD is also required for using IRQs

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
    asm-generic/io.h: allow people to override individual funcs
    bitops: remove duplicated extern declarations
    bitops: make asm-generic/bitops/find.h more generic
    asm-generic: kdebug.h: Checkpatch cleanup
    asm-generic: fcntl: make exported headers use strict posix types
    asm-generic: cmpxchg does not handle non-long arguments
    asm-generic: make atomic_add_unless a function

    Linus Torvalds
     
  • * 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    vfs: make no_llseek the default
    vfs: don't use BKL in default_llseek
    llseek: automatically add .llseek fop
    libfs: use generic_file_llseek for simple_attr
    mac80211: disallow seeks in minstrel debug code
    lirc: make chardev nonseekable
    viotape: use noop_llseek
    raw: use explicit llseek file operations
    ibmasmfs: use generic_file_llseek
    spufs: use llseek in all file operations
    arm/omap: use generic_file_llseek in iommu_debug
    lkdtm: use generic_file_llseek in debugfs
    net/wireless: use generic_file_llseek in debugfs
    drm: use noop_llseek

    Linus Torvalds
     
  • * 'vfs' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl: (30 commits)
    BKL: remove BKL from freevxfs
    BKL: remove BKL from qnx4
    autofs4: Only declare function when CONFIG_COMPAT is defined
    autofs: Only declare function when CONFIG_COMPAT is defined
    ncpfs: Lock socket in ncpfs while setting its callbacks
    fs/locks.c: prepare for BKL removal
    BKL: Remove BKL from ncpfs
    BKL: Remove BKL from OCFS2
    BKL: Remove BKL from squashfs
    BKL: Remove BKL from jffs2
    BKL: Remove BKL from ecryptfs
    BKL: Remove BKL from afs
    BKL: Remove BKL from USB gadgetfs
    BKL: Remove BKL from autofs4
    BKL: Remove BKL from isofs
    BKL: Remove BKL from fat
    BKL: Remove BKL from ext2 filesystem
    BKL: Remove BKL from do_new_mount()
    BKL: Remove BKL from cgroup
    BKL: Remove BKL from NTFS
    ...

    Linus Torvalds
     
  • * 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    block: autoconvert trivial BKL users to private mutex
    drivers: autoconvert trivial BKL users to private mutex
    ipmi: autoconvert trivial BKL users to private mutex
    mac: autoconvert trivial BKL users to private mutex
    mtd: autoconvert trivial BKL users to private mutex
    scsi: autoconvert trivial BKL users to private mutex

    Fix up trivial conflicts (due to addition of private mutex right next to
    deletion of a version string) in drivers/char/pcmcia/cm40[04]0_cs.c

    Linus Torvalds
     
  • * 'config' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
    BKL: introduce CONFIG_BKL.
    dabusb: remove the BKL
    sunrpc: remove the big kernel lock
    init/main.c: remove BKL notations
    blktrace: remove the big kernel lock
    rtmutex-tester: make it build without BKL
    dvb-core: kill the big kernel lock
    dvb/bt8xx: kill the big kernel lock
    tlclk: remove big kernel lock
    fix rawctl compat ioctls breakage on amd64 and itanic
    uml: kill big kernel lock
    parisc: remove big kernel lock
    cris: autoconvert trivial BKL users
    alpha: kill big kernel lock
    isapnp: BKL removal
    s390/block: kill the big kernel lock
    hpet: kill BKL, add compat_ioctl

    Linus Torvalds
     
  • Reported-by: Anca Emanuel
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

22 Oct, 2010

30 commits

  • * 'x86-irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, 32-bit: Align percpu area and irq stacks to THREAD_SIZE
    x86: Move alloc_desk_mask variables inside ifdef
    x86-32: Align IRQ stacks properly
    x86: Remove CONFIG_4KSTACKS
    x86: Always use irq stacks

    Fixed up trivial conflicts in include/linux/{irq.h, percpu-defs.h}

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'x86-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Hpet: Avoid the comparator readback penalty

    Linus Torvalds
     
  • Fortunately this is only exploitable on very unusual hardware.

    [Reported a while ago but nothing happened so just fixing it]

    Signed-off-by: Alan Cox
    Cc: stable@kernel.org
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Dave Hinds pointed out to me that 37979e1546a7 will break b43 and
    ray_cs, as IOCARD is not -- as the name would suggest -- only needed
    for cards using IO ports. Instead, as it re-deines several pins, it
    is also required for using interrupts.

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (71 commits)
    powerpc/44x: Update ppc44x_defconfig
    powerpc/watchdog: Make default timeout for Book-E watchdog a Kconfig option
    fsl_rio: Add comments for sRIO registers.
    powerpc/fsl-booke: Add e55xx (64-bit) smp defconfig
    powerpc/fsl-booke: Add p5020 DS board support
    powerpc/fsl-booke64: Use TLB CAMs to cover linear mapping on FSL 64-bit chips
    powerpc/fsl-booke: Add support for FSL Arch v1.0 MMU in setup_page_sizes
    powerpc/fsl-booke: Add support for FSL 64-bit e5500 core
    powerpc/85xx: add cache-sram support
    powerpc/85xx: add ngPIXIS FPGA device tree node to the P1022DS board
    powerpc: Fix compile error with paca code on ppc64e
    powerpc/fsl-booke: Add p3041 DS board support
    oprofile/fsl emb: Don't set MSR[PMM] until after clearing the interrupt.
    powerpc/fsl-booke: Add PCI device ids for P2040/P3041/P5010/P5020 QoirQ chips
    powerpc/mpc8xxx_gpio: Add support for 'qoriq-gpio' controllers
    powerpc/fsl_booke: Add support to boot from core other than 0
    powerpc/p1022: Add probing for individual DMA channels
    powerpc/fsl_soc: Search all global-utilities nodes for rstccr
    powerpc: Fix invalid page flags in create TLB CAM path for PTE_64BIT
    powerpc/mpc83xx: Support for MPC8308 P1M board
    ...

    Fix up conflict with the generic irq_work changes in arch/powerpc/kernel/time.c

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: (26 commits)
    include/linux/libata.h: fix typo
    pata_bf54x: fix return type of bfin_set_devctl
    Drivers: ata: Makefile: replace the use of -objs with -y
    libahci: fix result_tf handling after an ATA PIO data-in command
    pata_sl82c105: implement sff_irq_check() method
    pata_sil680: implement sff_irq_check() method
    pata_pdc202xx_old: implement sff_irq_check() method
    pata_cmd640: implement sff_irq_check() method
    ata_piix: Add device ID for ICH4-L
    pata_sil680: make sil680_sff_exec_command() 'static'
    ata: Intel IDE-R support
    libata: reorder ata_queued_cmd to remove alignment padding on 64 bit builds
    libata: Signal that our SATL supports WRITE SAME(16) with UNMAP
    ata_piix: remove SIDPR locking
    libata: implement cross-port EH exclusion
    libata: add @ap to ata_wait_register() and introduce ata_msleep()
    ata_piix: implement LPM support
    libata: implement LPM support for port multipliers
    libata: reimplement link power management
    libata: implement sata_link_scr_lpm() and make ata_dev_set_feature() global
    ...

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jlbec/ocfs2: (48 commits)
    ocfs2: Avoid to evaluate xattr block flags again.
    ocfs2/cluster: Release debugfs file elapsed_time_in_ms
    ocfs2: Add a mount option "coherency=*" to handle cluster coherency for O_DIRECT writes.
    Initialize max_slots early
    When I tried to compile I got the following warning: fs/ocfs2/slot_map.c: In function ‘ocfs2_init_slot_info’: fs/ocfs2/slot_map.c:360: warning: ‘bytes’ may be used uninitialized in this function fs/ocfs2/slot_map.c:360: note: ‘bytes’ was declared here Compiler: gcc version 4.4.3 (GCC) on Mandriva I'm not sure why this warning occurs, I think compiler don't know that variable "bytes" is initialized when it is sent by reference to ocfs2_slot_map_physical_size and it throws that ugly warning. However, a simple initialization of "bytes" variable with 0 will fix it.
    ocfs2: validate bg_free_bits_count after update
    ocfs2/cluster: Bump up dlm protocol to version 1.1
    ocfs2/cluster: Show per region heartbeat elapsed time
    ocfs2/cluster: Add mlogs for heartbeat up/down events
    ocfs2/cluster: Create debugfs dir/files for each region
    ocfs2/cluster: Create debugfs files for live, quorum and failed region bitmaps
    ocfs2/cluster: Maintain bitmap of failed regions
    ocfs2/cluster: Maintain bitmap of quorum regions
    ocfs2/cluster: Track bitmap of live heartbeat regions
    ocfs2/cluster: Track number of global heartbeat regions
    ocfs2/cluster: Maintain live node bitmap per heartbeat region
    ocfs2/cluster: Reorganize o2hb debugfs init
    ocfs2/cluster: Check slots for unconfigured live nodes
    ocfs2/cluster: Print messages when adding/removing nodes
    ocfs2/cluster: Print messages when adding/removing heartbeat regions
    ...

    Linus Torvalds
     
  • …nel/git/tip/linux-2.6-tip

    * 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits)
    x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
    xen: Cope with unmapped pages when initializing kernel pagetable
    memblock, bootmem: Round pfn properly for memory and reserved regions
    memblock: Annotate memblock functions with __init_memblock
    memblock: Allow memblock_init to be called early
    memblock/arm: Fix memblock_region_is_memory() typo
    x86, memblock: Remove __memblock_x86_find_in_range_size()
    memblock: Fix wraparound in find_region()
    x86-32, memblock: Make add_highpages honor early reserved ranges
    x86, memblock: Fix crashkernel allocation
    arm, memblock: Fix the sparsemem build
    memblock: Fix section mismatch warnings
    powerpc, memblock: Fix memblock API change fallout
    memblock, microblaze: Fix memblock API change fallout
    x86: Remove old bootmem code
    x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
    x86: Remove not used early_res code
    x86, memblock: Replace e820_/_early string with memblock_
    x86: Use memblock to replace early_res
    x86, memblock: Use memblock_debug to control debug message print out
    ...

    Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile

    Linus Torvalds
     
  • Signed-off-by: Andrea Gelmini
    Signed-off-by: Jeff Garzik

    Andrea Gelmini
     
  • The new devctl func added for us to the driver has the wrong return
    type. Which is to say there shouldn't be any. This fixes compile
    time warnings as there shouldn't be any runtime difference.

    Signed-off-by: Mike Frysinger
    Signed-off-by: Jeff Garzik

    Mike Frysinger
     
  • Changed -objs to -y in Makefile.

    Signed-off-by: Tracey Dent
    Signed-off-by: Jeff Garzik

    Tracey Dent
     
  • ATA devices don't send D2H Reg FIS after an successful ATA PIO data-in
    command. The host is supposed to take the TF and E_Status of the
    preceding PIO Setup FIS. Update ahci_qc_fill_rtf() such that it takes
    TF + E_Status from PIO Setup FIS after a successful ATA PIO data-in
    command.

    Without this patch, result_tf for such a command is filled with the
    content of the previous D2H Reg FIS which belongs to a previous
    command, which can make the command incorrectly seen as failed.

    * Patch updated to grab the whole TF + E_Status from PIO Setup FIS
    instead of just E_Status as suggested by Robert Hancock.

    Signed-off-by: Tejun Heo
    Reported-by: Mark Lord
    Cc: Robert Hancock
    Cc: stable@kernel.org
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • ICH4-L is a variant of ICH4 lacking USB2 functionality and with some
    different device IDs.

    It is documented in Intel specification update 290745-025, currently
    at , and is
    included in the device ID table for piix.

    Signed-off-by: Ben Hutchings
    Signed-off-by: Jeff Garzik

    Ben Hutchings
     
  • ... since, of course, it's not used outside this driver.

    Signed-off-by: Sergei Shtylyov
    Signed-off-by: Jeff Garzik

    Sergei Shtylyov
     
  • Intel IDE-R devices are part of the Intel AMT management setup. They don't
    have any special configuration registers or settings so the ata_generic
    driver will support them fully.

    Rather than add a huge table of IDs for each chipset and keep sending in
    new ones this patch autodetects them.

    Signed-off-by: Alan Cox
    Acked-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Alan Cox
     
  • Reorder structure ata_queued_cmd to remove 8 bytes of alignment padding
    on 64 bit builds & therefore reduce the size of structure ata_port by
    256 bytes.

    Overall this will have little impact, other than reducing the amount of
    memory that is cleared when allocating ata_ports.

    Signed-off-by: Richard Kennedy
    Signed-off-by: Jeff Garzik

    Richard Kennedy
     
  • Until now identifying that a device supports WRITE SAME(16) with the
    UNMAP bit set has been black magic. Implement support for the SBC-3
    Thin Provisioning VPD page and set the TPWS bit.

    Signed-off-by: Martin K. Petersen
    Signed-off-by: Jeff Garzik

    Martin K. Petersen
     
  • Now that libata provides proper cross-port EH exclusion. The SIDPR
    locking added by commit 213373cf (ata_piix: fix locking around SIDPR
    access) is no longer necessary. Remove it.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • In libata, the non-EH code paths should always take and release
    ap->lock explicitly when accessing hardware or shared data structures.
    However, once EH is active, it's assumed that the port is owned by EH
    and EH methods don't explicitly take ap->lock unless race from irq
    handler or other code paths are expected. However, libata EH didn't
    guarantee exclusion among EHs for ports of the same host. IOW,
    multiple EHs may execute in parallel on multiple ports of the same
    controller.

    In many cases, especially in SATA, the ports are completely
    independent of each other and this doesn't cause problems; however,
    there are cases where different ports share the same resource, which
    lead to obscure timing related bugs such as the one fixed by commit
    213373cf (ata_piix: fix locking around SIDPR access).

    This patch implements exclusion among EHs of the same host. When EH
    begins, it acquires per-host EH ownership by calling ata_eh_acquire().
    When EH finishes, the ownership is released by calling
    ata_eh_release(). EH ownership is also released whenever the EH
    thread goes to sleep from ata_msleep() or explicitly and reacquired
    after waking up.

    This ensures that while EH is actively accessing the hardware, it has
    exclusive access to it while allowing EHs to interleave and progress
    in parallel as they hit waiting stages, which dominate the time spent
    in EH. This achieves cross-port EH exclusion without pervasive and
    fragile changes while still allowing parallel EH for the most part.

    This was first reported by yuanding02@gmail.com more than three years
    ago in the following bugzilla. :-)

    https://bugzilla.kernel.org/show_bug.cgi?id=8223

    Signed-off-by: Tejun Heo
    Cc: Alan Cox
    Reported-by: yuanding02@gmail.com
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Add optional @ap argument to ata_wait_register() and replace msleep()
    calls with ata_msleep() which take optional @ap in addition to the
    duration. These will be used to implement EH exclusion.

    This patch doesn't cause any behavior difference.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Now that DIPM can be used independently from HIPM, ata_piix can
    support LPM too.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Port multipliers can do DIPM on fan-out links fine. Implement support
    for it. Tested w/ SIMG 57xx and marvell PMPs. Both the host and
    fan-out links enter power save modes nicely.

    SIMG 37xx and 47xx report link offline on SStatus causing EH to detach
    the devices. Blacklisted.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • The current LPM implementation has the following issues.

    * Operation order isn't well thought-out. e.g. HIPM should be
    configured after IPM in SControl is properly configured. Not the
    other way around.

    * Suspend/resume paths call ata_lpm_enable/disable() which must only
    be called from EH context directly. Also, ata_lpm_enable/disable()
    were called whether LPM was in use or not.

    * Implementation is per-port when it should be per-link. As a result,
    it can't be used for controllers with slave links or PMP.

    * LPM state isn't managed consistently. After a link reset for
    whatever reason including suspend/resume the actual LPM state would
    be reset leaving ap->lpm_policy inconsistent.

    * Generic/driver-specific logic boundary isn't clear. Currently,
    libahci has to mangle stuff which libata EH proper should be
    handling. This makes the implementation unnecessarily complex and
    fragile.

    * Tied to ALPM. Doesn't consider DIPM only cases and doesn't check
    whether the device allows HIPM.

    * Error handling isn't implemented.

    Given the extent of mismatch with the rest of libata, I don't think
    trying to fix it piecewise makes much sense. This patch reimplements
    LPM support.

    * The new implementation is per-link. The target policy is still
    port-wide (ap->target_lpm_policy) but all the mechanisms and states
    are per-link and integrate well with the rest of link abstraction
    and can work with slave and PMP links.

    * Core EH has proper control of LPM state. LPM state is reconfigured
    when and only when reconfiguration is necessary. It makes sure that
    LPM state is reset when probing for new device on the link.
    Controller agnostic logic is now implemented in libata EH proper and
    driver implementation only has to deal with controller specifics.

    * Proper error handling. LPM config failure is attributed to the
    device on the link and LPM is disabled for the link if it fails
    repeatedly.

    * ops->enable/disable_pm() are replaced with single ops->set_lpm()
    which takes @policy and @hints. This simplifies driver specific
    implementation.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Link power management is about to be reimplemented. Prepare for it.

    * Implement sata_link_scr_lpm().

    * Drop static from ata_dev_set_feature() and make it available to
    other libata files.

    * Trivial whitespace adjustments.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • Link power management related symbols are in confusing state w/ mixed
    usages of lpm, ipm and pm. This patch cleans up lpm related symbols
    and sysfs show/store functions as follows.

    * lpm states - NOT_AVAILABLE, MIN_POWER, MAX_PERFORMANCE and
    MEDIUM_POWER are renamed to ATA_LPM_UNKNOWN and
    ATA_LPM_{MIN|MAX|MED}_POWER.

    * Pre/postfixes are unified to lpm.

    * sysfs show/store functions for link_power_management_policy were
    curiously named get/put and unnecessarily complex. Renamed to
    show/store and simplified.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Tejun Heo
     
  • This build error showed up in linux-next tag next-20100820 for ia64:

    WARNING: vmlinux.o(.init.text+0x4a952): Section mismatch in reference from the function ata_init() to the function .exit.text:ata_sff_exit()
    The function __init ata_init() references
    a function __exit ata_sff_exit().
    This is often seen when error handling in the init function
    uses functionality in the exit path.
    The fix is often to remove the __exit annotation of
    ata_sff_exit() so it may be used outside an exit section.

    Sure enough, dropping the __exit fixes the problem.

    Signed-off-by: Tony Luck
    Signed-off-by: Jeff Garzik

    Luck, Tony