01 Jan, 2009

1 commit

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

    * 'irq-fixes-for-linus-4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sparseirq: move __weak symbols into separate compilation unit
    sparseirq: work around __weak alias bug
    sparseirq: fix hang with !SPARSE_IRQ
    sparseirq: set lock_class for legacy irq when sparse_irq is selected
    sparseirq: work around compiler optimizing away __weak functions
    sparseirq: fix desc->lock init
    sparseirq: do not printk when migrating IRQ descriptors
    sparseirq: remove duplicated arch_early_irq_init()
    irq: simplify for_each_irq_desc() usage
    proc: remove ifdef CONFIG_SPARSE_IRQ from stat.c
    irq: for_each_irq_desc() move to irqnr.h
    hrtimer: remove #include <linux/irq.h>

    Linus Torvalds
     

31 Dec, 2008

1 commit

  • * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, sparseirq: clean up Kconfig entry
    x86: turn CONFIG_SPARSE_IRQ off by default
    sparseirq: fix numa_migrate_irq_desc dependency and comments
    sparseirq: add kernel-doc notation for new member in irq_desc, -v2
    locking, irq: enclose irq_desc_lock_class in CONFIG_LOCKDEP
    sparseirq, xen: make sure irq_desc is allocated for interrupts
    sparseirq: fix !SMP building, #2
    x86, sparseirq: move irq_desc according to smp_affinity, v7
    proc: enclose desc variable of show_stat() in CONFIG_SPARSE_IRQ
    sparse irqs: add irqnr.h to the user headers list
    sparse irqs: handle !GENIRQ platforms
    sparseirq: fix !SMP && !PCI_MSI && !HT_IRQ build
    sparseirq: fix Alpha build failure
    sparseirq: fix typo in !CONFIG_IO_APIC case
    x86, MSI: pass irq_cfg and irq_desc
    x86: MSI start irq numbering from nr_irqs_gsi
    x86: use NR_IRQS_LEGACY
    sparse irq_desc[] array: core kernel and x86 changes
    genirq: record IRQ_LEVEL in irq_desc[]
    irq.h: remove padding from irq_desc on 64bits

    Linus Torvalds
     

29 Dec, 2008

2 commits

  • 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.

    So move all the IRQ handling related __weak symbols to kernel/irq/chip.c.

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

    Yinghai Lu
     
  • 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

3 commits


26 Dec, 2008

4 commits


25 Dec, 2008

1 commit


20 Dec, 2008

1 commit


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

2 commits

  • Impact: cleanup

    Introduce NR_IRQS_LEGACY instead of hard coded number.

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

    Yinghai Lu
     
  • 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
     

04 Dec, 2008

1 commit


02 Dec, 2008

2 commits

  • Impact: emit new warning

    We periodically waste time tracking down problems from the genirq
    framework not respecting IRQF_DISABLED for some shared IRQ cases. Linus
    views this as "will not fix", but we're still left with the bugs caused by
    this misbehavior.

    This patch adds a nag message in request_irq(), so that drivers can fix
    their IRQ handlers to avoid this problem.

    Note that developers will never see the relevant bugs when they run with
    LOCKDEP, so it's no wonder these bugs are hard to find. (That also means
    LOCKDEP is overlooking some IRQ-related bugs involving IRQ handlers that
    don't set IRQF_DISABLED...)

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Acked-by: Peter Zijlstra
    Signed-off-by: Ingo Molnar

    David Brownell
     
  • Impact: fix __irq_set_trigger() for IRQ_LEVEL

    When recording the irq trigger type, let's also make sure
    that IRQ_LEVEL gets set correctly.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Ingo Molnar

    David Brownell
     

13 Nov, 2008

1 commit

  • Commit 0c5d1eb77a8be917b638344a22afe1398236482b (genirq: record trigger
    type) caused powerpc platforms that had no set_type() function in their
    struct irq_chip to spew out warnings about "No set_type function for
    IRQ...". This warning isn't necessarily justified though because the
    generic powerpc platform code calls set_irq_type() (which in turn calls
    __irq_set_trigger) with information from the device tree to establish
    the interrupt mappings, regardless of whether the PIC can actually set
    a type.

    A platform's irq_chip might not have a set_type function for a variety
    of reasons, for example: the platform may have the type essentially
    hard-coded, or as in the case for Cell interrupts are just messages
    past around that have no real concept of type, or the platform
    could even have a virtual PIC as on the PS3.

    Signed-off-by: Mark Nelson
    Signed-off-by: Ingo Molnar

    Mark Nelson
     

10 Nov, 2008

3 commits

  • Impact: build fix

    fix build failure on UP.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • The affinity setting in setup irq is called before the NO_BALANCING
    flag is checked and might therefore override affinity settings from the
    calling code with the default setting.

    Move the NO_BALANCING flag check before the call to the affinity
    setting.

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

    Thomas Gleixner
     
  • Impact: preserve user-modified affinities on interrupts

    Kumar Galak noticed that commit
    18404756765c713a0be4eb1082920c04822ce588 (genirq: Expose default irq
    affinity mask (take 3))

    overrides an already set affinity setting across a free /
    request_irq(). Happens e.g. with ifdown/ifup of a network device.

    Change the logic to mark the affinities as set and keep them
    intact. This also fixes the unlocked access to irq_desc in
    irq_select_affinity() when called from irq_affinity_proc_write()

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

    Thomas Gleixner
     

22 Oct, 2008

1 commit


21 Oct, 2008

2 commits

  • If the member 'name' of the irq_desc structure happens to point to a
    character string that is resident within a kernel module, problems ensue
    if that module is rmmod'd (at which time dynamic_irq_cleanup() is called)
    and then later show_interrupts() is called by someone.

    It is also not a good thing if the character string resided in kmalloc'd
    space that has been kfree'd (after having called dynamic_irq_cleanup()).
    dynamic_irq_cleanup() fails to NULL the 'name' member and
    show_interrupts() references it on a few architectures (like h8300, sh and
    x86).

    Signed-off-by: Dean Nelson
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Ingo Molnar

    Dean Nelson
     
  • Impact: fix boot hang on a G5

    In set_irq_type() we want to pass the type rather than the current
    interrupt state.

    Signed-off-by: Chris Friesen
    Acked-by: Benjamin Herrenschmidt
    Acked-by: David Brownell
    Signed-off-by: Ingo Molnar

    Chris Friesen
     

16 Oct, 2008

11 commits