01 May, 2009

1 commit


06 Apr, 2009

1 commit


02 Apr, 2009

1 commit


28 Mar, 2009

1 commit


24 Mar, 2009

3 commits

  • Delta patch to address the review comments.

    - Implement warning when IRQ_WAKE_THREAD is requested and no
    thread handler installed
    - coding style fixes

    Pointed-out-by: Christoph Hellwig
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Add support for threaded interrupt handlers:

    A device driver can request that its main interrupt handler runs in a
    thread. To achive this the device driver requests the interrupt with
    request_threaded_irq() and provides additionally to the handler a
    thread function. The handler function is called in hard interrupt
    context and needs to check whether the interrupt originated from the
    device. If the interrupt originated from the device then the handler
    can either return IRQ_HANDLED or IRQ_WAKE_THREAD. IRQ_HANDLED is
    returned when no further action is required. IRQ_WAKE_THREAD causes
    the genirq code to invoke the threaded (main) handler. When
    IRQ_WAKE_THREAD is returned handler must have disabled the interrupt
    on the device level. This is mandatory for shared interrupt handlers,
    but we need to do it as well for obscure x86 hardware where disabling
    an interrupt on the IO_APIC level redirects the interrupt to the
    legacy PIC interrupt lines.

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Ingo Molnar

    Thomas Gleixner
     
  • Conflicts:
    arch/parisc/kernel/irq.c
    kernel/irq/handle.c

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

16 Mar, 2009

1 commit


13 Mar, 2009

1 commit


06 Mar, 2009

1 commit


03 Mar, 2009

1 commit


27 Feb, 2009

1 commit

  • Impact: add new tracepoints

    Add them to the generic IRQ code, that way every architecture
    gets these new tracepoints, not just x86.

    Using Steve's new 'TRACE_FORMAT', I can get function graph
    trace as follows using the original two IRQ tracepoints:

    3) | handle_IRQ_event() {
    3) | /* (irq_handler_entry) irq=28 handler=eth0 */
    3) | e1000_intr_msi() {
    3) 2.460 us | __napi_schedule();
    3) 9.416 us | }
    3) | /* (irq_handler_exit) irq=28 handler=eth0 return=handled */
    3) + 22.935 us | }

    Signed-off-by: Jason Baron
    Signed-off-by: Steven Rostedt
    Acked-by: Peter Zijlstra
    Acked-by: Masami Hiramatsu
    Cc: KOSAKI Motohiro
    Cc: Mathieu Desnoyers
    Cc: "Frank Ch. Eigler"
    Cc: Arnaldo Carvalho de Melo
    Cc: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Jason Baron
     

13 Feb, 2009

1 commit


09 Feb, 2009

2 commits

  • Simplify and make init_kstat_irqs etc more type proof, suggested by
    Andrew.

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

    Yinghai Lu
     
  • Impact: get correct kstat_irqs [/proc/interrupts] for msi/msi-x etc

    need to call clear_kstat_irqs(), so when we reuse that irq_desc,
    we get correct kstat in /proc/interrupts.

    This makes /proc/interrupts not have entries.

    Don't need to worry about arch that doesn't support genirq, because they
    will not call dynamic_irq_cleanup().

    v2: simplify and make clear_kstat_irqs more robust

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

    Yinghai Lu
     

31 Jan, 2009

1 commit


29 Jan, 2009

1 commit


28 Jan, 2009

1 commit

  • Move the initialization of irq_default_affinity to early_irq_init as
    core_initcall is too late.

    irq_default_affinity can be used in init_IRQ and potentially timer and
    SMP init as well. All of these happen before core_initcall. Moving
    the initialization to early_irq_init ensures that it is initialized
    before it is used.

    Signed-off-by: David Daney
    Acked-by: Mike Travis
    Signed-off-by: Linus Torvalds

    David Daney
     

13 Jan, 2009

1 commit


12 Jan, 2009

8 commits

  • Ingo Molnar wrote:

    > All non-x86 architectures fail to build:
    >
    > In file included from /home/mingo/tip/include/linux/random.h:11,
    > from /home/mingo/tip/include/linux/stackprotector.h:6,
    > from /home/mingo/tip/init/main.c:17:
    > /home/mingo/tip/include/linux/irqnr.h:26:63: error: asm/irq_vectors.h: No such file or directory

    Do not include asm/irq_vectors.h in generic code - it's not available
    on all architectures.

    Signed-off-by: Ingo Molnar

    Mike Travis
     
  • Impact: reduce memory usage.

    Allocate kstat_irqs_legacy based on nr_cpu_ids to deal with this
    memory usage bump when NR_CPUS bumped from 128 to 4096:

    8192 +253952 262144 +3100% kstat_irqs_legacy(.bss)

    This is only when CONFIG_SPARSE_IRQS=y.

    Signed-off-by: Mike Travis

    Mike Travis
     
  • Impact: Reduce memory usage.

    This is the second half of the changes to make the irq_desc_ptrs be
    variable sized based on nr_cpu_ids. This is done by adding a new
    "max_nr_irqs" macro to irq_vectors.h (and a dummy in irqnr.h) to
    return a max NR_IRQS value based on NR_CPUS or nr_cpu_ids.

    This necessitated moving the define of MAX_IO_APICS to a separate
    file (asm/apicnum.h) so it could be included without the baggage
    of the other asm/apicdef.h declarations.

    Signed-off-by: Mike Travis

    Mike Travis
     
  • Impact: allocate irq_desc_ptrs in preparation for making it variable-sized.

    This addresses this memory usage bump when NR_CPUS bumped from 128 to 4096:

    34816 +229376 264192 +658% irq_desc_ptrs(.data.read_mostly)

    The patch is split into two parts, the first simply allocates the
    irq_desc_ptrs array. Then next will deal with making it variable.
    This is only when CONFIG_SPARSE_IRQS=y.

    Signed-off-by: Mike Travis

    Mike Travis
     
  • Impact: cleanup WARN msg.

    Ingo requested:
    > While at it, could you please also convert this to a WARN() construct
    > instead? (in a separate commit)

    ... and it shall be done. ;-)

    Signed-off-by: Mike Travis

    Mike Travis
     
  • Impact: preparation, cleanup, add KERN_INFO printk

    Modify references from NR_IRQS to nr_irqs as the later will become
    variable-sized based on nr_cpu_ids when CONFIG_SPARSE_IRQS=y.

    Signed-off-by: Mike Travis

    Mike Travis
     
  • Impact: fix bug where new irq_desc uses old cpumask pointers which are freed.

    As Yinghai pointed out, init_copy_one_irq_desc() copies the old desc to
    the new desc overwriting the cpumask pointers. Since the old_desc and
    the cpumask pointers are freed, then memory corruption will occur if
    these old pointers are used.

    Move the allocation of these pointers to after the copy.

    Signed-off-by: Mike Travis
    Cc: Yinghai Lu

    Mike Travis
     
  • Impact: reduce memory usage, use new cpumask API.

    Replace the affinity and pending_masks with cpumask_var_t's. This adds
    to the significant size reduction done with the SPARSE_IRQS changes.

    The added functions (init_alloc_desc_masks & init_copy_desc_masks) are
    in the include file so they can be inlined (and optimized out for the
    !CONFIG_CPUMASKS_OFFSTACK case.) [Naming chosen to be consistent with
    the other init*irq functions, as well as the backwards arg declaration
    of "from, to" instead of the more common "to, from" standard.]

    Includes a slight change to the declaration of struct irq_desc to embed
    the pending_mask within ifdef(CONFIG_SMP) to be consistent with other
    references, and some small changes to Xen.

    Tested: sparse/non-sparse/cpumask_offstack/non-cpumask_offstack/nonuma/nosmp on x86_64

    Signed-off-by: Mike Travis
    Cc: Chris Wright
    Cc: Jeremy Fitzhardinge
    Cc: KOSAKI Motohiro
    Cc: Venkatesh Pallipadi
    Cc: virtualization@lists.osdl.org
    Cc: xen-devel@lists.xensource.com
    Cc: Yinghai Lu

    Mike Travis
     

11 Jan, 2009

1 commit


29 Dec, 2008

1 commit

  • Impact: fix boot crash if the kernel is built with certain GCC versions

    GCC has a bug with __weak alias functions: if the functions are in
    the same compilation unit as their call site, GCC can decide to
    inline them - and thus rob the linker of the opportunity to override
    the weak alias with the real thing.

    This can lead to the boot crash reported by Kamalesh Babulal:

    ACPI: Core revision 20080926
    Setting APIC routing to flat
    BUG: unable to handle kernel NULL pointer dereference at
    0000000000000000
    IP: [] add_pin_to_irq_cpu+0x14/0x74
    PGD 0
    Oops: 0000 [#1] SMP
    [...]

    So move the arch_init_chip_data() function from handle.c to manage.c.

    Reported-by: Kamalesh Babulal
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

28 Dec, 2008

2 commits

  • Impact: fix hang

    Suresh report his two sockets system only works with SPARSE_IRQ enable
    it turns out we miss the setting desc->irq

    so provide early_irq_init() even !SPARSE_IRQ to set desc->irq

    Reported-by: "Siddha, Suresh B"
    Signed-off-by: Yinghai Lu
    Signed-off-by: Ingo Molnar

    Yinghai Lu
     
  • Impact: add lockdep annotation to legacy IRQ descs

    Warnings resulting out of this were not seen in practice, but it's prudent
    to initialize the legacy descriptors to the lock class as well, symmetric
    to how we do it with other descriptors.

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

    Yinghai Lu
     

27 Dec, 2008

2 commits

  • Impact: fix panic on null pointer with sparseirq

    Some GCC versions seem to inline the weak global function,
    when that function is empty.

    Work it around, by making the functions return a (dummy) integer.

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

    Yinghai Lu
     
  • Impact: cleanup

    init_one_irq_desc() does not initialize the desc->lock properly -
    you cannot init a lock by memcpying some other lock on it.

    This happens to work right now (because irq_desc_init is never in use),
    but it's a dangerous construct nevertheless, so fix it.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

26 Dec, 2008

4 commits


18 Dec, 2008

1 commit

  • Impact: simplify code

    commit "08678b0: generic: sparse irqs: use irq_desc() [...]" introduced
    the irq_desc_lock_class variable.

    But it is used only if CONFIG_SPARSE_IRQ=Y or CONFIG_TRACE_IRQFLAGS=Y.
    Otherwise, following warnings happen:

    CC kernel/irq/handle.o
    kernel/irq/handle.c:26: warning: 'irq_desc_lock_class' defined but not used

    Actually, current early_init_irq_lock_class has a bit strange and messy ifdef.
    In addition, it is not valueable.

    1. this function is protected by !CONFIG_SPARSE_IRQ, but that is not necessary.
    if CONFIG_SPARSE_IRQ=Y, desc of all irq number are initialized by NULL
    at first - then this function calling is safe.

    2. this function protected by CONFIG_TRACE_IRQFLAGS too. but it is not
    necessary either, because lockdep_set_class() doesn't have bad side
    effect even if CONFIG_TRACE_IRQFLAGS=n.

    This patch bloat kernel size a bit on CONFIG_TRACE_IRQFLAGS=n and
    CONFIG_SPARSE_IRQ=Y - but that's ok. early_init_irq_lock_class() is not
    a fastpatch at all.

    To avoid messy ifdefs is more important than a few bytes diet.

    Signed-off-by: KOSAKI Motohiro
    Signed-off-by: Ingo Molnar

    KOSAKI Motohiro
     

17 Dec, 2008

1 commit

  • Impact: improve NUMA handling by migrating irq_desc on smp_affinity changes

    if CONFIG_NUMA_MIGRATE_IRQ_DESC is set:

    - make irq_desc to go with affinity aka irq_desc moving etc
    - call move_irq_desc in irq_complete_move()
    - legacy irq_desc is not moved, because they are allocated via static array

    for logical apic mode, need to add move_desc_in_progress_in_same_domain,
    otherwise it will not be moved ==> also could need two phases to get
    irq_desc moved.

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

    Yinghai Lu
     

08 Dec, 2008

1 commit