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>
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
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 -
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
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->irqso 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 -
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
27 Dec, 2008
3 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 -
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
-
Impact: reduce printk noise
There were a couple of leftover KERN_DEBUG debugging printks, remove
them. Also clarify an error message.Signed-off-by: Ingo Molnar
26 Dec, 2008
4 commits
-
Impact: clean up
We already have a weak copy of this function in init/main.c
Signed-off-by: Yinghai
Signed-off-by: Ingo Molnar -
Impact: cleanup
all for_each_irq_desc() usage point have !desc check.
then its check can move into for_each_irq_desc() macro.Signed-off-by: KOSAKI Motohiro
Acked-by: Yinghai Lu
Signed-off-by: Ingo Molnar -
Impact: cleanup
irq_desc can be NULL when CONFIG_SPARSE_IRQ=y only.
therefore, NULL checking can move into kstat_irqs_cpu() of SPARSE_IRQ version.Signed-off-by: KOSAKI Motohiro
Acked-by: "Yinghai Lu"
Signed-off-by: Ingo Molnar -
Impact: cleanup
before CONFIG_SPARSE_IRQ age, for_each_irq_desc() sat in irqnr.h and
could be called from generic code.CONFIG_SPARSE_IRQ breaks this assumption, but SPARSE_IRQ version
for_each_irq_desc() also can move into irqnr.h easily.Also, this patch unifies CONFIG_SPARSE_IRQ and !CONFIG_SPARSE_IRQ
for_each_irq_desc().Signed-off-by: KOSAKI Motohiro
Signed-off-by: Ingo Molnar
25 Dec, 2008
1 commit
20 Dec, 2008
1 commit
-
Impact: reduce kconfig variable scope and clean up
Bartlomiej pointed out that the config dependencies and comments are not right.
update it depend to NUMA, and fix some comments
Reported-by: Bartlomiej Zolnierkiewicz
Signed-off-by: Yinghai Lu
Signed-off-by: Ingo Molnar
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 usedActually, 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
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 arrayfor 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
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 -
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
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 -
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
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
10 Nov, 2008
3 commits
-
Impact: build fix
fix build failure on UP.
Signed-off-by: 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 -
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
22 Oct, 2008
1 commit
-
This variable is only used in the source file, so make it static.
Signed-off-by: Roel Kluin
Signed-off-by: Ingo Molnar
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 -
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
16 Oct, 2008
11 commits
-
probe_irq_off() is disfunctional as the local nr_irqs is referenced
instead of the global one for the for_each_irq_desc() iterator.Signed-off-by: Thomas Gleixner
-
Use for_each_irq_desc[_reverse] for all the iteration loops.
Signed-off-by: Thomas Gleixner
-
Signed-off-by: Thomas Gleixner
-
Revert the dynarray changes. They need more thought and polishing.
Signed-off-by: Thomas Gleixner
-
Remove the leftover of sparseirqs.
Signed-off-by: Thomas Gleixner
-
This code is not ready, but we need to rip it out instead of rebasing
as we would lose the APIC/IO_APIC unification otherwise.Signed-off-by: Thomas Gleixner
-
For the non sparse irq case an inline function is perfectly fine.
Signed-off-by: Thomas Gleixner
-
when SPARSE_IRQ is not used, should still use irq_desc->lock
Signed-off-by: Yinghai Lu
Signed-off-by: Ingo Molnar -
caused by
commit a532e19680ada3b8579b81e67e76d3ebd19c340f
Author: Yinghai Lu
Date: Wed Aug 20 20:46:25 2008 -0700x86: sparse_irq needs spin_lock in allocations
Signed-off-by: Andrew Morton
Signed-off-by: Ingo Molnar -
Signed-off-by: Yinghai Lu
Cc: Yinghai Lu
Cc: Andrew Morton
Signed-off-by: Ingo Molnar -
Steven Noonan reported a boot hang when using irqpoll and
CONFIG_HAVE_SPARSE_IRQ=y.The irqpoll loop needs to be updated to not iterate from 1 to nr_irqs
but to iterate via for_each_irq_desc(). (in the former case desc can
be NULL which crashes the box)Reported-by: Steven Noonan
Tested-by: Steven Noonan
Signed-off-by: Ingo Molnar