28 Jul, 2011

8 commits


27 Jul, 2011

7 commits

  • remove unneeded pci.h include.
    and include ioport.h to avoid build errors for the region functions.

    Reported-by: Randy Dunlap
    Signed-off-by: Wim Van Sebroeck

    Wim Van Sebroeck
     
  • move register header to drivers

    Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD
    Cc: Nicolas Ferre
    Signed-off-by: Wim Van Sebroeck

    Jean-Christophe Plagniol-Villard
     
  • Watchdog timer device driver for Xilinx xps_timebase_wdt compatible ip cores.
    It takes watchdog timer configuration from device tree and it needs that its
    parent has defined the property "clock-frecuency".
    It is compatible with watchdog timer kernel API, so user apps like watchdogd
    may talk with it.

    Signed-off-by: Alejandro Cabrera
    Signed-off-by: Wim Van Sebroeck

    Alejandro Cabrera
     
  • While checking what watchdog drivers usually do in suspend/resume to
    spot common behaviour for the watchdog framework, I found these drivers
    which do nothing but add some cruft. Remove it, it is superfluous. New
    approaches should probably be done with pm_ops anyway.

    Signed-off-by: Wolfram Sang
    Signed-off-by: Wim Van Sebroeck

    Wolfram Sang
     
  • There are no reads in these functions, so if MMIO writes are posted,
    the writes in enable/disable may not have completed by the time these
    functions return. If the functions run from different CPUs, it's
    in theory possible for the writes to be interleaved, which would be
    disastrous for this driver.

    At the very least, we need an mmiowb() before releasing the lock, but
    since it seems desirable for the watchdog timer to be actually stopped
    or reset when these functions return, read the lock register to force
    the writes out.

    Signed-off-by: Nick Bowler
    Signed-off-by: Wim Van Sebroeck

    Nick Bowler
     
  • At least on the Versatile Express' V2M, calling wdt_disable followed by
    wdt_enable, for instance by running the following sequence:

    echo V > /dev/watchdog; echo V > /dev/watchdog

    results in an immediate reset. The wdt_disable function writes 0 to the
    load register; while the watchdog interrupts are disabled at this point,
    this special value is defined to trigger an interrupt immediately. It
    appears that in this instance, the reset happens when the interrupts
    are subsequently enabled by wdt_enable.

    Putting in a short delay after writing a new load value in wdt_enable
    solves the issue, but it seems cleaner to simply never write 0 to the
    load register at all: according to the hardware docs, writing 0 to the
    control register suffices to stop the counter, and the write of 0 to
    the load register is questionable anyway since this register resets to
    0xffffffff.

    Signed-off-by: Nick Bowler
    Signed-off-by: Wim Van Sebroeck

    Nick Bowler
     
  • Adds device tree probe support for imx2_wdt driver.

    Signed-off-by: Shawn Guo
    Cc: Grant Likely
    Cc: Wolfram Sang
    Signed-off-by: Wim Van Sebroeck

    Shawn Guo
     

22 Jul, 2011

18 commits


21 Jul, 2011

7 commits

  • Signed-off-by: Pavel Shilovsky
    Reviewed-by: Jeff Layton
    Signed-off-by: Steve French

    Pavel Shilovsky
     
  • …l/git/tip/linux-2.6-tip

    * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    signal: align __lock_task_sighand() irq disabling and RCU
    softirq,rcu: Inform RCU of irq_exit() activity
    sched: Add irq_{enter,exit}() to scheduler_ipi()
    rcu: protect __rcu_read_unlock() against scheduler-using irq handlers
    rcu: Streamline code produced by __rcu_read_unlock()
    rcu: Fix RCU_BOOST race handling current->rcu_read_unlock_special
    rcu: decrease rcu_report_exp_rnp coupling with scheduler

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

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Avoid creating superfluous NUMA domains on non-NUMA systems
    sched: Allow for overlapping sched_domain spans
    sched: Break out cpu_power from the sched_group structure

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

    * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86. reboot: Make Dell Latitude E6320 use reboot=pci
    x86, doc only: Correct real-mode kernel header offset for init_size
    x86: Disable AMD_NUMA for 32bit for now

    Linus Torvalds
     
  • …ck/linux-2.6-rcu into core/urgent

    Ingo Molnar
     
  • The __lock_task_sighand() function calls rcu_read_lock() with interrupts
    and preemption enabled, but later calls rcu_read_unlock() with interrupts
    disabled. It is therefore possible that this RCU read-side critical
    section will be preempted and later RCU priority boosted, which means that
    rcu_read_unlock() will call rt_mutex_unlock() in order to deboost itself, but
    with interrupts disabled. This results in lockdep splats, so this commit
    nests the RCU read-side critical section within the interrupt-disabled
    region of code. This prevents the RCU read-side critical section from
    being preempted, and thus prevents the attempt to deboost with interrupts
    disabled.

    It is quite possible that a better long-term fix is to make rt_mutex_unlock()
    disable irqs when acquiring the rt_mutex structure's ->wait_lock.

    Signed-off-by: Paul E. McKenney
    Signed-off-by: Paul E. McKenney

    Paul E. McKenney
     
  • The rcu_read_unlock_special() function relies on in_irq() to exclude
    scheduler activity from interrupt level. This fails because exit_irq()
    can invoke the scheduler after clearing the preempt_count() bits that
    in_irq() uses to determine that it is at interrupt level. This situation
    can result in failures as follows:

    $task IRQ SoftIRQ

    rcu_read_lock()

    /* do stuff */

    |= UNLOCK_BLOCKED

    rcu_read_unlock()
    --t->rcu_read_lock_nesting

    irq_enter();
    /* do stuff, don't use RCU */
    irq_exit();
    sub_preempt_count(IRQ_EXIT_OFFSET);
    invoke_softirq()

    ttwu();
    spin_lock_irq(&pi->lock)
    rcu_read_lock();
    /* do stuff */
    rcu_read_unlock();
    rcu_read_unlock_special()
    rcu_report_exp_rnp()
    ttwu()
    spin_lock_irq(&pi->lock) /* deadlock */

    rcu_read_unlock_special(t);

    Ed can simply trigger this 'easy' because invoke_softirq() immediately
    does a ttwu() of ksoftirqd/# instead of doing the in-place softirq stuff
    first, but even without that the above happens.

    Cure this by also excluding softirqs from the
    rcu_read_unlock_special() handler and ensuring the force_irqthreads
    ksoftirqd/# wakeup is done from full softirq context.

    [ Alternatively, delaying the ->rcu_read_lock_nesting decrement
    until after the special handling would make the thing more robust
    in the face of interrupts as well. And there is a separate patch
    for that. ]

    Cc: Thomas Gleixner
    Reported-and-tested-by: Ed Tomlinson
    Signed-off-by: Peter Zijlstra
    Signed-off-by: Paul E. McKenney

    Peter Zijlstra