15 Dec, 2009

1 commit


08 Dec, 2009

1 commit


06 Dec, 2009

1 commit


04 Dec, 2009

1 commit


08 Nov, 2009

1 commit

  • Prarit reported:
    =================================
    [ INFO: inconsistent lock state ]
    2.6.32-rc5 #1
    ---------------------------------
    inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
    swapper/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
    (&irq_desc_lock_class){?.-...}, at: [] try_one_irq+0x32/0x138
    {IN-HARDIRQ-W} state was registered at:
    [] __lock_acquire+0x2fc/0xd5d
    [] lock_acquire+0xf3/0x12d
    [] _spin_lock+0x40/0x89
    [] handle_level_irq+0x30/0x105
    [] handle_irq+0x95/0xb7
    [] do_IRQ+0x6a/0xe0
    [] ret_from_intr+0x0/0x16
    irq event stamp: 195096
    hardirqs last enabled at (195096): [] _spin_unlock_irq+0x3a/0x5c
    hardirqs last disabled at (195095): [] _spin_lock_irq+0x29/0x95
    softirqs last enabled at (195088): [] __do_softirq+0x1c1/0x1ef
    softirqs last disabled at (195093): [] call_softirq+0x1c/0x30

    other info that might help us debug this:
    1 lock held by swapper/0:
    #0: (kernel/irq/spurious.c:21){+.-...}, at: []
    run_timer_softirq+0x1a9/0x315

    stack backtrace:
    Pid: 0, comm: swapper Not tainted 2.6.32-rc5 #1
    Call Trace:
    [] valid_state+0x187/0x1ae
    [] mark_lock+0x129/0x253
    [] __lock_acquire+0x370/0xd5d
    [] lock_acquire+0xf3/0x12d
    [] _spin_lock+0x40/0x89
    [] try_one_irq+0x32/0x138
    [] poll_all_shared_irqs+0x41/0x6d
    [] poll_spurious_irqs+0x1c/0x49
    [] run_timer_softirq+0x239/0x315
    [] __do_softirq+0x102/0x1ef
    [] call_softirq+0x1c/0x30
    [] do_softirq+0x59/0xca
    [] irq_exit+0x58/0xae
    [] smp_apic_timer_interrupt+0x94/0xba
    [] apic_timer_interrupt+0x13/0x20

    The reason is that try_one_irq() is called from hardirq context with
    interrupts disabled and from softirq context (poll_all_shared_irqs())
    with interrupts enabled.

    Disable interrupts before calling it from poll_all_shared_irqs().

    Reported-and-tested-by: Prarit Bhargava
    Signed-off-by: Yong Zhang
    LKML-Reference:
    Signed-off-by: Thomas Gleixner

    Yong Zhang
     

04 Nov, 2009

1 commit


04 Aug, 2009

1 commit


17 Jan, 2009

1 commit

  • Provide a shared interrupt debug facility under CONFIG_DEBUG_SHIRQ:
    it uses the existing irqpoll facilities to iterate through all
    registered interrupt handlers and call those which can handle shared
    IRQ lines.

    This can be handy for suspend/resume debugging: if we call this function
    early during resume we can trigger crashes in those drivers which have
    incorrect assumptions about when exactly their ISRs will be called
    during suspend/resume.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

26 Dec, 2008

1 commit


08 Dec, 2008

1 commit

  • Impact: new feature

    Problem on distro kernels: irq_desc[NR_IRQS] takes megabytes of RAM with
    NR_CPUS set to large values. The goal is to be able to scale up to much
    larger NR_IRQS value without impacting the (important) common case.

    To solve this, we generalize irq_desc[NR_IRQS] to an (optional) array of
    irq_desc pointers.

    When CONFIG_SPARSE_IRQ=y is used, we use kzalloc_node to get irq_desc,
    this also makes the IRQ descriptors NUMA-local (to the site that calls
    request_irq()).

    This gets rid of the irq_cfg[] static array on x86 as well: irq_cfg now
    uses desc->chip_data for x86 to store irq_cfg.

    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     

16 Oct, 2008

4 commits


19 Jul, 2008

1 commit

  • When we disable a screaming irq we never see it again. If the irq
    line is shared or if the driver half works this is a real pain. So
    periodically poll the handlers for screaming interrupts.

    I use a timer instead of the classic irq poll technique of working off
    the timer interrupt because when we use the local apic timers
    note_interrupt is never called (bug?). Further on a system with
    dynamic ticks the timer interrupt might not even fire unless there is
    a timer telling it it needs to.

    I forced this case on my test system with an e1000 nic and my ssh
    session remained responsive despite the interrupt handler only being
    called every 10th of a second.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Ingo Molnar

    Eric W. Biederman
     

02 May, 2008

1 commit

  • Uwe Kleine-Koenig has some strange hardware where one of the shared
    interrupts can be asserted during boot before the appropriate driver
    loads. Requesting the shared irq line from another driver result in a
    spurious interrupt storm which finally disables the interrupt line.

    I have seen similar behaviour on resume before (the hardware does not
    work anymore so I can not verify).

    Change the spurious disable logic to increment the disable depth and
    mark the interrupt with an extra flag which allows us to reenable the
    interrupt when a new driver arrives which requests the same irq
    line. In the worst case this will disable the irq again via the
    spurious trap, but there is a decent chance that the new driver is the
    one which can handle the already asserted interrupt and makes the box
    usable again.

    Eric Biederman said further: This case also happens on a regular basis
    in kdump kernels where we deliberately don't shutdown the hardware
    before starting the new kernel. This patch should reduce the need for
    using irqpoll in that situation by a small amount.

    Signed-off-by: Thomas Gleixner
    Tested-and-Acked-by: Uwe Kleine-König

    Thomas Gleixner
     

19 Feb, 2008

1 commit

  • The functions time_before, time_before_eq, time_after, and
    time_after_eq are more robust for comparing jiffies against other
    values.

    So following patch implements usage of the time_after() macro, defined
    at linux/jiffies.h, which deals with wrapping correctly

    Signed-off-by: S.Caglar Onur
    Acked-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner

    S.Caglar Onur
     

30 Jan, 2008

1 commit


17 Jul, 2007

1 commit

  • Currently we handle spurious IRQ activity based upon seeing a lot of
    invalid interrupts, and we clear things back on the base of lots of valid
    interrupts.

    Unfortunately in some cases you get legitimate invalid interrupts caused by
    timing asynchronicity between the PCI bus and the APIC bus when disabling
    interrupts and pulling other tricks. In this case although the spurious
    IRQs are not a problem our unhandled counters didn't clear and they act as
    a slow running timebomb. (This is effectively what the serial port/tty
    problem that was fixed by clearing counters when registering a handler
    showed up)

    It's easy enough to add a second parameter - time. This means that if we
    see a regular stream of harmless spurious interrupts which are not harming
    processing we don't go off and do something stupid like disable the IRQ
    after a month of running. OTOH lockups and performance killers show up a
    lot more than 10/second

    [akpm@linux-foundation.org: cleanup]
    Signed-off-by: Alan Cox
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

24 May, 2007

1 commit

  • With irqpoll enabled, trying to test the IRQF_IRQPOLL flag in the
    actions would cause a NULL pointer dereference if no action was
    installed (for example, the driver might have been unloaded with
    interrupts still pending).

    So be a bit more careful about testing the flag by making sure to test
    for that case.

    (The actual _change_ is trivial, the patch is more than a one-liner
    because I rewrote the testing to also be much more readable.

    Original (discarded) bugfix by Bernhard Walle.

    Cc: Bernhard Walle
    Tested-by: Vivek Goyal
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

09 May, 2007

1 commit

  • irqpoll is broken on some architectures that don't use the IRQ 0 for the timer
    interrupt like IA64. This patch adds a IRQF_IRQPOLL flag.

    Each architecture is handled in a separate pach. As I left the irq == 0 as
    condition, this should not break existing architectures that use timer_irq ==
    0 and that I did't address with that patch (because I don't know).

    This patch:

    This patch adds a IRQF_IRQPOLL flag that the interrupt registration code could
    use for the interrupt it wants to use for IRQ polling.

    Because this must not be the timer interrupt, an additional flag was added
    instead of re-using the IRQF_TIMER constant. Until all architectures will
    have an IRQF_IRQPOLL interrupt, irq == 0 will stay as alternative as it should
    not break anything.

    Also, note_interrupt() is called on CPU-specific interrupts to be used as
    interrupt source for IRQ polling.

    Signed-off-by: Bernhard Walle
    Cc: Russell King
    Cc: Kyle McMartin
    Cc: Matthew Wilcox
    Cc: Grant Grundler
    Cc: Paul Mundt
    Cc: "Luck, Tony"
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bernhard Walle
     

11 Jan, 2007

1 commit

  • o noirqdebug_setup() is __init but it is being called by
    quirk_intel_irqbalance() which if of type __devinit. If CONFIG_HOTPLUG=y,
    quirk_intel_irqbalance() is put into text section and it is wrong to
    call a function in __init section.

    o MODPOST flags this on i386 if CONFIG_RELOCATABLE=y

    WARNING: vmlinux - Section mismatch: reference to .init.text:noirqdebug_setup from .text between 'quirk_intel_irqbalance' (at offset 0xc010969e) and 'i8237A_suspend'

    o Make noirqdebug_setup() non-init.

    Signed-off-by: Vivek Goyal
    Signed-off-by: Andi Kleen

    Vivek Goyal
     

05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

03 Jul, 2006

1 commit


30 Jun, 2006

5 commits

  • Enable platforms to use the irq-chip and irq-flow abstractions: allow setting
    of the chip, the type and provide highlevel handlers for common irq-flows.

    [rostedt@goodmis.org: misroute-irq: Don't call desc->chip->end because of edge interrupts]
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Steven Rostedt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Core genirq support: add the irq-chip and irq-flow abstractions.

    Signed-off-by: Thomas Gleixner
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • Cleanup: remove irq_desc_t use from the generic IRQ code, and mark it
    obsolete.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Assorted code cleanups to the generic IRQ code.

    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • This patch-queue improves the generic IRQ layer to be truly generic, by adding
    various abstractions and features to it, without impacting existing
    functionality.

    While the queue can be best described as "fix and improve everything in the
    generic IRQ layer that we could think of", and thus it consists of many
    smaller features and lots of cleanups, the one feature that stands out most is
    the new 'irq chip' abstraction.

    The irq-chip abstraction is about describing and coding and IRQ controller
    driver by mapping its raw hardware capabilities [and quirks, if needed] in a
    straightforward way, without having to think about "IRQ flow"
    (level/edge/etc.) type of details.

    This stands in contrast with the current 'irq-type' model of genirq
    architectures, which 'mixes' raw hardware capabilities with 'flow' details.
    The patchset supports both types of irq controller designs at once, and
    converts i386 and x86_64 to the new irq-chip design.

    As a bonus side-effect of the irq-chip approach, chained interrupt controllers
    (master/slave PIC constructs, etc.) are now supported by design as well.

    The end result of this patchset intends to be simpler architecture-level code
    and more consolidation between architectures.

    We reused many bits of code and many concepts from Russell King's ARM IRQ
    layer, the merging of which was one of the motivations for this patchset.

    This patch:

    rename desc->handler to desc->chip.

    Originally i did not want to do this, because it's a big patch. But having
    both "desc->handler", "desc->handle_irq" and "action->handler" caused a
    large degree of confusion and made the code appear alot less clean than it
    truly is.

    I have also attempted a dual approach as well by introducing a
    desc->chip alias - but that just wasnt robust enough and broke
    frequently.

    So lets get over with this quickly. The conversion was done automatically
    via scripts and converts all the code in the kernel.

    This renaming patch is the first one amongst the patches, so that the
    remaining patches can stay flexible and can be merged and split up
    without having some big monolithic patch act as a merge barrier.

    [akpm@osdl.org: build fix]
    [akpm@osdl.org: another build fix]
    Signed-off-by: Ingo Molnar
    Signed-off-by: Thomas Gleixner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

23 Jun, 2006

1 commit


29 Jun, 2005

1 commit

  • Anyone reporting a stuck IRQ should try these options. Its effectiveness
    varies we've found in the Fedora case. Quite a few systems with misdescribed
    IRQ routing just work when you use irqpoll. It also fixes up the VIA systems
    although thats now fixed with the VIA quirk (which we could just make default
    as its what Redmond OS does but Linus didn't like it historically).

    A small number of systems have jammed IRQ sources or misdescribes that cause
    an IRQ that we have no handler registered anywhere for. In those cases it
    doesn't help.

    Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

24 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds