28 Jun, 2013

1 commit

  • Commit 02725e7471b8 ('genirq: Use irq_get/put functions'),
    inadvertently changed can_request_irq() to return 0 for IRQs that have
    no action. This causes pcibios_lookup_irq() to select only IRQs that
    already have an action with IRQF_SHARED set, or to fail if there are
    none. Change can_request_irq() to return 1 for IRQs that have no
    action (if the first two conditions are met).

    Reported-by: Bjarni Ingi Gislason
    Tested-by: Bjarni Ingi Gislason (against 3.2)
    Signed-off-by: Ben Hutchings
    Cc: 709647@bugs.debian.org
    Cc: stable@vger.kernel.org # 2.6.39+
    Link: http://bugs.debian.org/709647
    Link: http://lkml.kernel.org/r/1372383630.23847.40.camel@deadeye.wl.decadent.org.uk
    Signed-off-by: Thomas Gleixner

    Ben Hutchings
     

11 Jun, 2013

1 commit

  • When a threaded irq handler is installed the irq thread is initially
    created on normal scheduling priority. Only after the irq thread is
    woken up it sets its priority to RT_FIFO MAX_USER_RT_PRIO/2 itself.

    This means that interrupts that occur directly after the irq handler
    is installed will be handled on a normal scheduling priority instead
    of the realtime priority that one would expect.

    Fix this by setting the RT priority on creation of the irq_thread.

    Signed-off-by: Ivo Sieben
    Cc: Sebastian Andrzej Siewior
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/1370254322-17240-1-git-send-email-meltedpianoman@gmail.com
    Signed-off-by: Thomas Gleixner

    Ivo Sieben
     

20 Feb, 2013

1 commit

  • Pull scheduler changes from Ingo Molnar:
    "Main changes:

    - scheduler side full-dynticks (user-space execution is undisturbed
    and receives no timer IRQs) preparation changes that convert the
    cputime accounting code to be full-dynticks ready, from Frederic
    Weisbecker.

    - Initial sched.h split-up changes, by Clark Williams

    - select_idle_sibling() performance improvement by Mike Galbraith:

    " 1 tbench pair (worst case) in a 10 core + SMT package:

    pre 15.22 MB/sec 1 procs
    post 252.01 MB/sec 1 procs "

    - sched_rr_get_interval() ABI fix/change. We think this detail is not
    used by apps (so it's not an ABI in practice), but lets keep it
    under observation.

    - misc RT scheduling cleanups, optimizations"

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits)
    sched/rt: Add header to
    cputime: Remove irqsave from seqlock readers
    sched, powerpc: Fix sched.h split-up build failure
    cputime: Restore CPU_ACCOUNTING config defaults for PPC64
    sched/rt: Move rt specific bits into new header file
    sched/rt: Add a tuning knob to allow changing SCHED_RR timeslice
    sched: Move sched.h sysctl bits into separate header
    sched: Fix signedness bug in yield_to()
    sched: Fix select_idle_sibling() bouncing cow syndrome
    sched/rt: Further simplify pick_rt_task()
    sched/rt: Do not account zero delta_exec in update_curr_rt()
    cputime: Safely read cputime of full dynticks CPUs
    kvm: Prepare to add generic guest entry/exit callbacks
    cputime: Use accessors to read task cputime stats
    cputime: Allow dynamic switch between tick/virtual based cputime accounting
    cputime: Generic on-demand virtual cputime accounting
    cputime: Move default nsecs_to_cputime() to jiffies based cputime file
    cputime: Librarize per nsecs resolution cputime definitions
    cputime: Avoid multiplication overflow on utime scaling
    context_tracking: Export context state for generic vtime
    ...

    Fix up conflict in kernel/context_tracking.c due to comment additions.

    Linus Torvalds
     

19 Feb, 2013

1 commit

  • These functions are used by the tilegx onchip network driver, and it's
    useful to be able to load that driver as a module.

    Signed-off-by: Chris Metcalf
    Link: http://lkml.kernel.org/r/201302012043.r11KhNZF024371@farm-0021.internal.tilera.com
    Signed-off-by: Thomas Gleixner

    Chris Metcalf
     

08 Feb, 2013

1 commit


19 Dec, 2012

1 commit

  • The array check is useless so remove it.

    [akpm@linux-foundation.org: remove comment, per David]
    Signed-off-by: Alan Cox
    Cc: David Rientjes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

13 Nov, 2012

1 commit

  • Sankara reported that the genirq core code fails to adjust the
    affinity of an interrupt thread in several cases:

    1) On request/setup_irq() the call to setup_affinity() happens before
    the new action is registered, so the new thread is not notified.

    2) For secondary shared interrupts nothing notifies the new thread to
    change its affinity.

    3) Interrupts which have the IRQ_NO_BALANCE flag set are not moving
    the thread either.

    Fix this by setting the thread affinity flag right on thread creation
    time. This ensures that under all circumstances the thread moves to
    the right place. Requires a check in irq_thread_check_affinity for an
    existing affinity mask (CONFIG_CPU_MASK_OFFSTACK=y)

    Reported-and-tested-by: Sankara Muthukrishnan
    Cc: stable@vger.kernel.org
    Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1209041738200.2754@ionos
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

01 Nov, 2012

2 commits

  • As irq_thread_check_affinity is called ONLY inside the while loop in
    the irq thread, the core affinity is set only when an interrupt
    occurs. This patch sets the core affinity right after the irq thread
    is created and before it waits for interrupts. In real-tiime targets
    that do not typically change the core affinity of irqs during
    run-time, this patch will save additional latency of an irq thread in
    setting the core affinity during the first interrupt occurrence for
    that irq.

    Signed-off-by: Sankara S Muthukrishnan
    Acked-by: Steven Rostedt
    Link: http://lkml.kernel.org/r/CAFQPvXeVZ858WFYimEU5uvLNxLDd6bJMmqWihFmbCf3ntokz0A@mail.gmail.com
    Signed-off-by: Thomas Gleixner

    Sankara Muthukrishnan
     
  • Attempts to retrigger nested threaded IRQs currently fail because they
    have no primary handler. In order to support retrigger of nested
    IRQs, the parent IRQ needs to be retriggered.

    To fix, when an IRQ needs to be resent, if the interrupt has a parent
    IRQ and runs in the context of the parent IRQ, then resend the parent.

    Also, handle_nested_irq() needs to clear the replay flag like the
    other handlers, otherwise check_irq_resend() will set it and it will
    never be cleared. Without clearing, it results in the first resend
    working fine, but check_irq_resend() returning early on subsequent
    resends because the replay flag is still set.

    Problem discovered on ARM/OMAP platforms where a nested IRQ that's
    also a wakeup IRQ happens late in suspend and needed to be retriggered
    during the resume process.

    [khilman@ti.com: changelog edits, clear IRQS_REPLAY in handle_nested_irq()]

    Reported-by: Kevin Hilman
    Tested-by: Kevin Hilman
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1350425269-11489-1-git-send-email-khilman@deeprootsystems.com
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

04 Aug, 2012

1 commit


01 Aug, 2012

1 commit

  • Pull random subsystem patches from Ted Ts'o:
    "This patch series contains a major revamp of how we collect entropy
    from interrupts for /dev/random and /dev/urandom.

    The goal is to addresses weaknesses discussed in the paper "Mining
    your Ps and Qs: Detection of Widespread Weak Keys in Network Devices",
    by Nadia Heninger, Zakir Durumeric, Eric Wustrow, J. Alex Halderman,
    which will be published in the Proceedings of the 21st Usenix Security
    Symposium, August 2012. (See https://factorable.net for more
    information and an extended version of the paper.)"

    Fix up trivial conflicts due to nearby changes in
    drivers/{mfd/ab3100-core.c, usb/gadget/omap_udc.c}

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random: (33 commits)
    random: mix in architectural randomness in extract_buf()
    dmi: Feed DMI table to /dev/random driver
    random: Add comment to random_initialize()
    random: final removal of IRQF_SAMPLE_RANDOM
    um: remove IRQF_SAMPLE_RANDOM which is now a no-op
    sparc/ldc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    [ARM] pxa: remove IRQF_SAMPLE_RANDOM which is now a no-op
    board-palmz71: remove IRQF_SAMPLE_RANDOM which is now a no-op
    isp1301_omap: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pxa25x_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    omap_udc: remove IRQF_SAMPLE_RANDOM which is now a no-op
    goku_udc: remove IRQF_SAMPLE_RANDOM which was commented out
    uartlite: remove IRQF_SAMPLE_RANDOM which is now a no-op
    drivers: hv: remove IRQF_SAMPLE_RANDOM which is now a no-op
    xen-blkfront: remove IRQF_SAMPLE_RANDOM which is now a no-op
    n2_crypto: remove IRQF_SAMPLE_RANDOM which is now a no-op
    pda_power: remove IRQF_SAMPLE_RANDOM which is now a no-op
    i2c-pmcmsp: remove IRQF_SAMPLE_RANDOM which is now a no-op
    input/serio/hp_sdc.c: remove IRQF_SAMPLE_RANDOM which is now a no-op
    mfd: remove IRQF_SAMPLE_RANDOM which is now a no-op
    ...

    Linus Torvalds
     

25 Jul, 2012

1 commit

  • Some interrupt chips like MSI are oneshot safe by implementation. For
    those interrupts we can avoid the mask/unmask sequence for threaded
    interrupt handlers.

    Signed-off-by: Thomas Gleixner
    Link: http://lkml.kernel.org/r/alpine.LFD.2.02.1207132056540.32033@ionos
    Cc: Linus Torvalds
    Cc: Avi Kivity
    Cc: Marcelo Tosatti
    Cc: Jan Kiszka

    Thomas Gleixner
     

23 Jul, 2012

2 commits


19 Jul, 2012

1 commit

  • With the new interrupt sampling system, we are no longer using the
    timer_rand_state structure in the irq descriptor, so we can stop
    initializing it now.

    [ Merged in fixes from Sedat to find some last missing references to
    rand_initialize_irq() ]

    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Sedat Dilek

    Theodore Ts'o
     

05 Jun, 2012

1 commit

  • …ernel.org/pub/scm/linux/kernel/git/tip/tip

    Pull irq and smpboot updates from Thomas Gleixner:
    "Just cleanup patches with no functional change and a fix for suspend
    issues."

    * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    genirq: Introduce irq_do_set_affinity() to reduce duplicated code
    genirq: Add IRQS_PENDING for nested and simple irq

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    smpboot, idle: Fix comment mismatch over idle_threads_init()
    smpboot, idle: Optimize calls to smp_processor_id() in idle_threads_init()

    Linus Torvalds
     

01 Jun, 2012

2 commits

  • Pull second pile of signal handling patches from Al Viro:
    "This one is just task_work_add() series + remaining prereqs for it.

    There probably will be another pull request from that tree this
    cycle - at least for helpers, to get them out of the way for per-arch
    fixes remaining in the tree."

    Fix trivial conflict in kernel/irq/manage.c: the merge of Andrew's pile
    had brought in commit 97fd75b7b8e0 ("kernel/irq/manage.c: use the
    pr_foo() infrastructure to prefix printks") which changed one of the
    pr_err() calls that this merge moves around.

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal:
    keys: kill task_struct->replacement_session_keyring
    keys: kill the dummy key_replace_session_keyring()
    keys: change keyctl_session_to_parent() to use task_work_add()
    genirq: reimplement exit_irq_thread() hook via task_work_add()
    task_work_add: generic process-context callbacks
    avr32: missed _TIF_NOTIFY_RESUME on one of do_notify_resume callers
    parisc: need to check NOTIFY_RESUME when exiting from syscall
    move key_repace_session_keyring() into tracehook_notify_resume()
    TIF_NOTIFY_RESUME is defined on all targets now

    Linus Torvalds
     
  • Use the module-wide pr_fmt() mechanism rather than open-coding "genirq: "
    everywhere.

    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

25 May, 2012

1 commit

  • All invocations of chip->irq_set_affinity() are doing the same return
    value checks. Let them all use a common function.

    [ tglx: removed the silly likely while at it ]

    Signed-off-by: Jiang Liu
    Cc: Jiang Liu
    Cc: Keping Chen
    Link: http://lkml.kernel.org/r/1333120296-13563-3-git-send-email-jiang.liu@huawei.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     

24 May, 2012

2 commits

  • exit_irq_thread() and task->irq_thread are needed to handle the unexpected
    (and unlikely) exit of irq-thread.

    We can use task_work instead and make this all private to
    kernel/irq/manage.c, cleanup plus micro-optimization.

    1. rename exit_irq_thread() to irq_thread_dtor(), make it
    static, and move it up before irq_thread().

    2. change irq_thread() to do task_work_add(irq_thread_dtor)
    at the start and task_work_cancel() before return.

    tracehook_notify_resume() can never play with kthreads,
    only do_exit()->exit_task_work() can call the callback
    and this is what we want.

    3. remove task_struct->irq_thread and the special hook
    in do_exit().

    Signed-off-by: Oleg Nesterov
    Reviewed-by: Thomas Gleixner
    Cc: David Howells
    Cc: Richard Kuo
    Cc: Linus Torvalds
    Cc: Alexander Gordeev
    Cc: Chris Zankel
    Cc: David Smith
    Cc: "Frank Ch. Eigler"
    Cc: Geert Uytterhoeven
    Cc: Larry Woodman
    Cc: Peter Zijlstra
    Cc: Tejun Heo
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Oleg Nesterov
     
  • Pull UML updates from Richard Weinberger:
    "Most changes are bug fixes and cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
    um: missing checks of __put_user()/__get_user() return values
    um: stub_rt_sigsuspend isn't needed these days anymore
    um/x86: merge (and trim) 32- and 64-bit variants of ptrace.h
    irq: Remove irq_chip->release()
    um: Remove CONFIG_IRQ_RELEASE_METHOD
    um: Remove usage of irq_chip->release()
    um: Implement um_free_irq()
    um: Fix __swp_type()
    um: Implement a custom pte_same() function
    um: Add BUG() to do_ops()'s error path
    um: Remove unused variables
    um: bury unused _TIF_RESTORE_SIGMASK
    um: wrong sigmask saved in case of multiple sigframes
    um: add TIF_NOTIFY_RESUME
    um: ->restart_block.fn needs to be reset on sigreturn

    Linus Torvalds
     

22 May, 2012

1 commit


19 Apr, 2012

2 commits

  • We require that shared interrupts agree on a few flag settings. Right
    now we silently return with an error code without giving any hint why
    we reject it.

    Make the printout unconditionally and actually useful by printing the
    flags of the new and the already registered action.

    Convert all printks to pr_* and use a proper prefix while at it.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Requesting a threaded interrupt without a primary handler and without
    IRQF_ONESHOT set is dangerous.

    The core will use the default primary handler for it, which merily
    wakes the thread. For a level type interrupt this results in an
    interrupt storm, because the interrupt line is reenabled after the
    primary handler runs. The device has still the line asserted, which
    brings us back into the primary handler.

    While this works for edge type interrupts, we play it safe and reject
    unconditionally because we can't say for sure which type this
    interrupt really has. The type flags are unreliable as the underlying
    chip implementation can override them. And we cannot assume that
    developers using that interface know what they are doing.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

29 Mar, 2012

2 commits

  • We respect node affinity of devices already in the irq descriptor
    allocation, but we ignore it for the initial interrupt affinity
    setup, so the interrupt might be routed to a different node.

    Restrict the default affinity mask to the node on which the irq
    descriptor is allocated.

    [ tglx: Massaged changelog ]

    Signed-off-by: Prarit Bhargava
    Acked-by: Neil Horman
    Cc: Yinghai Lu
    Cc: David Rientjes
    Link: http://lkml.kernel.org/r/1332788538-17425-1-git-send-email-prarit@redhat.com
    Signed-off-by: Thomas Gleixner

    Prarit Bhargava
     
  • The only place irq_finalize_oneshot() is called with force parameter set
    is the threaded handler error exit path. But IRQTF_RUNTHREAD is dropped
    at this point and irq_wake_thread() is not going to set it again,
    since PF_EXITING is set for this thread already. So irq_finalize_oneshot()
    will drop the threads bit in threads_oneshot anyway and hence the force
    parameter is superfluous.

    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120321162234.GP24806@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner

    Alexander Gordeev
     

16 Mar, 2012

1 commit

  • Alexander pointed out that the warnons in the regular exit path are
    bogus and the thread_mask one actually could be triggered when
    __setup_irq() hands out that thread_mask again after __free_irq()
    dropped irq_desc->lock.

    Thinking more about it, neither IRQTF_RUNTHREAD nor the bit in
    thread_mask can be set as this is the regular exit path. We come here
    due to:
    __free_irq()
    remove action from desc
    synchronize_irq()
    kthread_stop()

    So synchronize_irq() makes sure that the thread finished running and
    cleaned up both the thread_active count and thread_mask. After that
    point nothing can set IRQTF_RUNTHREAD on this action. So the warnons
    and the cleanups are pointless.

    Reported-by: Alexander Gordeev
    Cc: Ido Yariv
    Link: http://lkml.kernel.org/r/20120315190755.GA6732@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

14 Mar, 2012

1 commit

  • The current implementation does not always flush the threaded handler
    when disabling the irq. In case the irq handler was called, but the
    threaded handler hasn't started running yet, the interrupt will be
    flagged as pending, and the handler will not run. This implementation
    has some issues:

    First, if the interrupt is a wake source and flagged as pending, the
    system will not be able to suspend.

    Second, when quickly disabling and re-enabling the irq, the threaded
    handler might continue to run after the irq is re-enabled without the
    irq handler being called first. This might be an unexpected behavior.

    In addition, it might be counter-intuitive that the threaded handler
    will not be called even though the irq handler was called and returned
    IRQ_WAKE_THREAD.

    Fix this by always waiting for the threaded handler to complete in
    synchronize_irq().

    [ tglx: Massaged comments, added WARN_ONs and the missing
    IRQTF_RUNTHREAD check in exit_irq_thread() ]

    Signed-off-by: Ido Yariv
    Link: http://lkml.kernel.org/r/1322843052-7166-1-git-send-email-ido@wizery.com
    Signed-off-by: Thomas Gleixner

    Ido Yariv
     

13 Mar, 2012

1 commit


10 Mar, 2012

4 commits

  • Currently IRQTF_DIED flag is set when a IRQ thread handler calls do_exit()
    But also PF_EXITING per process flag gets set when a thread exits. This
    fix eliminates the duplicate by using PF_EXITING flag.

    Also, there is a race condition in exit_irq_thread(). In case a thread's
    bit is cleared in desc->threads_oneshot (and the IRQ line gets unmasked),
    but before IRQTF_DIED flag is set, a new interrupt might come in and set
    just cleared bit again, this time forever. This fix throws IRQTF_DIED flag
    away, eliminating the race as a result.

    [ tglx: Test THREAD_EXITING first as suggested by Oleg ]

    Reported-by: Oleg Nesterov
    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120309135958.GD2114@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner

    Alexander Gordeev
     
  • Since 63706172f332fd3f6e7458ebfb35fa6de9c21dc5 kthread_stop() is not
    afraid of dead kernel threads. So no need to check if a thread is
    alive before stopping it. These checks still were racy.

    Reported-by: Oleg Nesterov
    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120309135939.GC2114@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner

    Alexander Gordeev
     
  • When a new thread handler is created, an irqaction is passed to it as
    data. Not only that irqaction is stored in task_struct by the handler
    for later use, but also a structure associated with the kernel thread
    keeps this value as long as the thread exists.

    This fix kicks irqaction out off task_struct. Yes, I introduce new bit
    field. But it allows not only to eliminate the duplicate, but also
    shortens size of task_struct.

    Reported-by: Oleg Nesterov
    Signed-off-by: Alexander Gordeev
    Link: http://lkml.kernel.org/r/20120309135925.GB2114@dhcp-26-207.brq.redhat.com
    Signed-off-by: Thomas Gleixner

    Alexander Gordeev
     
  • We do not want a bitwise AND between boolean operands

    Signed-off-by: Alexander Gordeev
    Cc: Oleg Nesterov
    Link: http://lkml.kernel.org/r/20120309135912.GA2114@dhcp-26-207.brq.redhat.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner

    Alexander Gordeev
     

07 Mar, 2012

1 commit

  • Xommit ac5637611(genirq: Unmask oneshot irqs when thread was not woken)
    fails to unmask when a !IRQ_ONESHOT threaded handler is handled by
    handle_level_irq.

    This happens because thread_mask is or'ed unconditionally in
    irq_wake_thread(), but for !IRQ_ONESHOT interrupts never cleared. So
    the check for !desc->thread_active fails and keeps the interrupt
    disabled.

    Keep the thread_mask zero for !IRQ_ONESHOT interrupts.

    Document the thread_mask magic while at it.

    Reported-and-tested-by: Sven Joachim
    Reported-and-tested-by: Stefan Lippers-Hollmann
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     

15 Feb, 2012

1 commit

  • An interrupt might be pending when irq_startup() is called, but the
    startup code does not invoke the resend logic. In some cases this
    prevents the device from issuing another interrupt which renders the
    device non functional.

    Call the resend function in irq_startup() to keep things going.

    Reported-and-tested-by: Russell King
    Cc: stable@vger.kernel.org
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

09 Jan, 2012

1 commit

  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (53 commits)
    Kconfig: acpi: Fix typo in comment.
    misc latin1 to utf8 conversions
    devres: Fix a typo in devm_kfree comment
    btrfs: free-space-cache.c: remove extra semicolon.
    fat: Spelling s/obsolate/obsolete/g
    SCSI, pmcraid: Fix spelling error in a pmcraid_err() call
    tools/power turbostat: update fields in manpage
    mac80211: drop spelling fix
    types.h: fix comment spelling for 'architectures'
    typo fixes: aera -> area, exntension -> extension
    devices.txt: Fix typo of 'VMware'.
    sis900: Fix enum typo 'sis900_rx_bufer_status'
    decompress_bunzip2: remove invalid vi modeline
    treewide: Fix comment and string typo 'bufer'
    hyper-v: Update MAINTAINERS
    treewide: Fix typos in various parts of the kernel, and fix some comments.
    clockevents: drop unknown Kconfig symbol GENERIC_CLOCKEVENTS_MIGR
    gpio: Kconfig: drop unknown symbol 'CS5535_GPIO'
    leds: Kconfig: Fix typo 'D2NET_V2'
    sound: Kconfig: drop unknown symbol ARCH_CLPS7500
    ...

    Fix up trivial conflicts in arch/powerpc/platforms/40x/Kconfig (some new
    kconfig additions, close to removed commented-out old ones)

    Linus Torvalds
     

02 Dec, 2011

1 commit

  • In irq_wait_for_interrupt(), the should_stop member is verified before
    setting the task's state to TASK_INTERRUPTIBLE and calling schedule().
    In case kthread_stop sets should_stop and wakes up the process after
    should_stop is checked by the irq thread but before the task's state
    is changed, the irq thread might never exit:

    kthread_stop irq_wait_for_interrupt
    ------------ ----------------------

    ...
    ... while (!kthread_should_stop()) {
    kthread->should_stop = 1;
    wake_up_process(k);
    wait_for_completion(&kthread->exited);
    ...
    set_current_state(TASK_INTERRUPTIBLE);

    ...

    schedule();
    }

    Fix this by checking if the thread should stop after modifying the
    task's state.

    [ tglx: Simplified it a bit ]

    Signed-off-by: Ido Yariv
    Link: http://lkml.kernel.org/r/1322740508-22640-1-git-send-email-ido@wizery.com
    Signed-off-by: Thomas Gleixner
    Cc: stable@kernel.org

    Ido Yariv
     

18 Nov, 2011

1 commit

  • The power management functions related to interrupts do not know
    (yet) about per-cpu interrupts and end up calling the wrong
    low-level methods to enable/disable interrupts.

    This leads to all kind of interesting issues (action taken on one
    CPU only, updating a refcount which is not used otherwise...).

    The workaround for the time being is simply to flag these interrupts
    with IRQF_NO_SUSPEND. At least on ARM, these interrupts are actually
    dealt with at the architecture level.

    Reported-by: Santosh Shilimkar
    Tested-by: Santosh Shilimkar
    Signed-off-by: Marc Zyngier
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/1321446459-31409-1-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

14 Nov, 2011

1 commit


30 Oct, 2011

1 commit