03 Jun, 2011
1 commit
-
The detection of spurios interrupts is currently limited to first level
handler. In force-threaded mode we never notice if the threaded irq does
not feel responsible.
This patch catches the return value of the threaded handler and forwards
it to the spurious detector. If the primary handler returns only
IRQ_WAKE_THREAD then the spourious detector ignores it because it gets
called again from the threaded handler.[ tglx: Report the erroneous return value early and bail out ]
Signed-off-by: Sebastian Andrzej Siewior
Link: http://lkml.kernel.org/r/1306824972-27067-2-git-send-email-sebastian@breakpoint.cc
Signed-off-by: Thomas Gleixner
29 Mar, 2011
1 commit
-
Signed-off-by: Thomas Gleixner
28 Mar, 2011
2 commits
-
Last user gone.
Signed-off-by: Thomas Gleixner
-
We really need these flags for some of the interrupt chips. Move it
from internal state to irq_data and provide proper accessors.Signed-off-by: Thomas Gleixner
Cc: David Daney
26 Feb, 2011
2 commits
-
For level type interrupts we need to track how many threads are on
flight to avoid useless interrupt storms when not all thread handlers
have finished yet. Keep track of the woken threads and only unmask
when there are no more threads in flight.Yes, I'm lazy and using a bitfield. But not only because I'm lazy, the
main reason is that it's way simpler than using a refcount. A refcount
based solution would need to keep track of various things like
crashing the irq thread, spurious interrupts coming in,
disables/enables, free_irq() and some more. The bitfield keeps the
tracking simple and makes things just work. It's also nicely confined
to the thread code pathes and does not require additional checks all
over the place.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference: -
The WARN_ON_ONCE in handle_percpu_event() which emits a warning when
an action handler returns with interrupts enabled is not really
useful. It does not reveal the interrupt number and handler function
which caused it. Make it WARN_ONCE() and add the information.Reported-by: Tony Luck
Signed-off-by: Thomas Gleixner
22 Feb, 2011
1 commit
-
note_interrupt wants to be called with the combined result of all
handlers called, not with the last one. If it's a shared interrupt
then the last handler might return IRQ_NONE often enough to trigger
the spurious dectector which turns off a perfectly fine working
interrupt line. Bug was introduced in commit 1277a532(genirq: Simplify
handle_irq_event()).Yes, I really messed up there. First the variable ret should not have
been named differently to avoid similarity with retval. Second it
should have been declared in the do {} loop.Rename it to res and move it into the do {} loop and vanish under a
huge brown paperbag.Reported-bisected-tested-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
19 Feb, 2011
6 commits
-
Force the usage of wrappers by another nasty CPP substitution.
Signed-off-by: Thomas Gleixner
-
Keep status in sync until all users are fixed.
Signed-off-by: Thomas Gleixner
-
We need to maintain the flag for now in both fields status and istate.
Add a CONFIG_GENERIC_HARDIRQS_NO_COMPAT switch to allow testing w/o
the status one. Wrap the access to status IRQ_INPROGRESS in a inline
which can be turned of with CONFIG_GENERIC_HARDIRQS_NO_COMPAT along
with the define.There is no reason that anything outside of core looks at this. That
needs some modifications, but we'll get there.Signed-off-by: Thomas Gleixner
-
Now that all core users are converted one layer can go.
Signed-off-by: Thomas Gleixner
-
Core code replacement for the ugly camel case. It contains all the
code which is shared in all handlers.clear status flags
set INPROGRESS flag
unlock
call action chain
note_interrupt
lock
clr INPROGRESS flagSigned-off-by: Thomas Gleixner
-
We run all handlers with interrupts disabled and expect them not to
enable them. Warn when we catch one who does.Signed-off-by: Thomas Gleixner
21 Jan, 2011
1 commit
-
All architectures are finally converted. Remove the cruft.
Signed-off-by: Thomas Gleixner
Cc: Richard Henderson
Cc: Mike Frysinger
Cc: David Howells
Cc: Tony Luck
Cc: Greg Ungerer
Cc: Michal Simek
Acked-by: David Howells
Cc: Kyle McMartin
Acked-by: Benjamin Herrenschmidt
Cc: Chen Liqin
Cc: "David S. Miller"
Cc: Chris Metcalf
Cc: Jeff Dike
12 Oct, 2010
1 commit
-
kernel/irq/handle.c has become a dumpground for random code in random
order. Split out the irq descriptor management and the dummy irq_chip
implementation into separate files. Cleanup the include maze while at
it.No code change.
Signed-off-by: Thomas Gleixner
Reviewed-by: Ingo Molnar
04 Oct, 2010
10 commits
-
This option covers now the old chip functions and the irq_desc data
fields which are moving to struct irq_data. More stuff will follow.Pretty handy for testing a conversion, whether something broke or not.
Signed-off-by: Thomas Gleixner
Reviewed-by: Ingo Molnar -
Wrap the old chip function startup() until the migration is complete and
the old chip functions are removed.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar -
Wrap the old chip functions disable() and shutdown() until the
migration is complete and the old chip functions are removed.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar -
Wrap the old chip function enable() until the migration is complete and
the old chip functions are removed.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar -
Wrap the old chip function ack() until the migration is complete and
the old chip functions are removed.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar -
Wrap the old chip function unmask() until the migration is complete
and the old chip functions are removed.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar -
Wrap the old chip function mask() until the migration is complete and
the old chip functions are removed.Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar -
The compat functions go away when the core code is converted.
Signed-off-by: Thomas Gleixner
Reviewed-by: Ingo Molnar -
Convert all references in the core code to orq, chip, handler_data,
chip_data, msi_desc, affinity to irq_data.*Signed-off-by: Thomas Gleixner
Reviewed-by: Ingo Molnar -
Low level chip functions need access to irq_desc->handler_data,
irq_desc->chip_data and irq_desc->msi_desc. We hand down the irq
number to the low level functions, so they need to lookup irq_desc.
With sparse irq this means a radix tree lookup.We could hand down irq_desc itself, but low level chip functions have
no need to fiddle with it directly and we want to restrict access to
irq_desc further.Preparatory patch for new chip functions.
Note, that the ugly anon union/struct is there to avoid a full tree
wide clean up for now. This is not going to last 3 years like __do_IRQ()Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
LKML-Reference:
Reviewed-by: H. Peter Anvin
Reviewed-by: Ingo Molnar
13 Apr, 2010
1 commit
-
Running interrupt handlers with interrupts enabled can cause stack
overflows. That has been observed with multiqueue NICs delivering all
their interrupts to a single core. We might band aid that somehow by
checking the interrupt stacks, but the real safe fix is to run the irq
handlers with interrupts disabled.Drivers for whacky hardware still can reenable them in the handler
itself, if the need arises. (They do already due to lockdep)The risk of doing this is rather low:
- lockdep already enforces this
- CONFIG_NOHZ has shaken out the drivers which relied on jiffies updates
- time keeping is not longer sensitive to the timer interrupt being delayedSigned-off-by: Ingo Molnar
Signed-off-by: Thomas Gleixner
Cc: Peter Zijlstra
Cc: Alan Cox
Cc: Andi Kleen
Cc: David Miller
Cc: Greg Kroah-Hartman
Cc: Arnaldo Carvalho de Melo
Cc: Linus Torvalds
LKML-Reference:
18 Feb, 2010
3 commits
-
Use radix_tree irq_desc_tree instead of irq_desc_ptrs.
-v2: according to Eric and cyrill to use radix_tree_lookup_slot and
radix_tree_replace_slotSigned-off-by: Yinghai Lu
LKML-Reference:
Signed-off-by: H. Peter Anvin -
Add replace_irq_desc() instead of poking at the array directly.
-v2: remove unneeded boundary check in replace_irq_desc
Signed-off-by: Yinghai Lu
LKML-Reference:
Signed-off-by: H. Peter Anvin -
mem_init is moved early already.
Signed-off-by: Yinghai Lu
LKML-Reference:
Signed-off-by: H. Peter Anvin
15 Dec, 2009
1 commit
-
Convert locks which cannot be sleeping locks in preempt-rt to
raw_spinlocks.Signed-off-by: Thomas Gleixner
Acked-by: Peter Zijlstra
Acked-by: Ingo Molnar
12 Oct, 2009
1 commit
-
After m68k's task_thread_info() doesn't refer to current,
it's possible to remove sched.h from interrupt.h and not break m68k!
Many thanks to Heiko Carstens for allowing this.Signed-off-by: Alexey Dobriyan
29 Aug, 2009
1 commit
-
when there is no ram on node 0.
Signed-off-by: Yinghai Lu
Cc: Andrew Morton
Cc: Jesse Barnes
LKML-Reference:
Signed-off-by: Ingo Molnar
12 Jun, 2009
3 commits
-
Ingo had
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x2b/0x71()
[ 0.000000] Hardware name: System Product Name
[ 0.000000] Modules linked in:
[ 0.000000] Pid: 0, comm: swapper Tainted: G W 2.6.30-tip-03087-g0bb2618-dirty #52506
[ 0.000000] Call Trace:
[ 0.000000] [] warn_slowpath_common+0x60/0x90
[ 0.000000] [] warn_slowpath_null+0xd/0x10
[ 0.000000] [] alloc_arch_preferred_bootmem+0x2b/0x71
[ 0.000000] [] ___alloc_bootmem_nopanic+0x2b/0x9a
[ 0.000000] [] ? lock_release+0xac/0xb2
[ 0.000000] [] ___alloc_bootmem+0xe/0x2d
[ 0.000000] [] __alloc_bootmem+0xa/0xc
[ 0.000000] [] alloc_bootmem_cpumask_var+0x21/0x26
[ 0.000000] [] early_irq_init+0x15/0x10d
[ 0.000000] [] start_kernel+0x167/0x326
[ 0.000000] [] __init_begin+0x6b/0x70
[ 0.000000] ---[ end trace 4eaa2a86a8e2da23 ]---
[ 0.000000] NR_IRQS:2304 nr_irqs:424
[ 0.000000] CPU 0 irqstacks, hard=821e6000 soft=821e7000we need to update init_irq_default_affinity
Signed-off-by: Yinghai Lu
Signed-off-by: Pekka Enberg -
Fixes the following problem:
[ 0.000000] Experimental hierarchical RCU init done.
[ 0.000000] NR_IRQS:4352 nr_irqs:256
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: at mm/bootmem.c:537 alloc_arch_preferred_bootmem+0x40/0x7e()
[ 0.000000] Hardware name: To Be Filled By O.E.M.
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.30-tip-02161-g7a74539-dirty #59709
[ 0.000000] Call Trace:
[ 0.000000] [] ? alloc_arch_preferred_bootmem+0x40/0x7e
[ 0.000000] [] warn_slowpath_common+0x88/0xcb
[ 0.000000] [] warn_slowpath_null+0x27/0x3d
[ 0.000000] [] alloc_arch_preferred_bootmem+0x40/0x7e
[ 0.000000] [] ___alloc_bootmem_nopanic+0x4e/0xec
[ 0.000000] [] ___alloc_bootmem+0x20/0x61
[ 0.000000] [] __alloc_bootmem+0x1e/0x34
[ 0.000000] [] early_irq_init+0x6d/0x118
[ 0.000000] [] ? early_idt_handler+0x0/0x71
[ 0.000000] [] start_kernel+0x192/0x394
[ 0.000000] [] ? early_idt_handler+0x0/0x71
[ 0.000000] [] x86_64_start_reservations+0xb4/0xcf
[ 0.000000] [] ? __init_begin+0x0/0x140
[ 0.000000] [] x86_64_start_kernel+0x158/0x17b
[ 0.000000] ---[ end trace a7919e7f17c0a725 ]---
[ 0.000000] Fast TSC calibration using PIT
[ 0.000000] Detected 2002.510 MHz processor.
[ 0.004000] Console: colour VGA+ 80x25Reported-by: Ingo Molnar
Signed-off-by: Pekka Enberg -
Don't hardcode to node zero for early boot IRQ setup memory allocations.
[ penberg@cs.helsinki.fi: minor cleanups ]
Cc: Ingo Molnar
Cc: Johannes Weiner
Cc: Linus Torvalds
Signed-off-by: Yinghai Lu
Signed-off-by: Pekka Enberg
11 Jun, 2009
1 commit
-
* 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (244 commits)
Revert "x86, bts: reenable ptrace branch trace support"
tracing: do not translate event helper macros in print format
ftrace/documentation: fix typo in function grapher name
tracing/events: convert block trace points to TRACE_EVENT(), fix !CONFIG_BLOCK
tracing: add protection around module events unload
tracing: add trace_seq_vprint interface
tracing: fix the block trace points print size
tracing/events: convert block trace points to TRACE_EVENT()
ring-buffer: fix ret in rb_add_time_stamp
ring-buffer: pass in lockdep class key for reader_lock
tracing: add annotation to what type of stack trace is recorded
tracing: fix multiple use of __print_flags and __print_symbolic
tracing/events: fix output format of user stack
tracing/events: fix output format of kernel stack
tracing/trace_stack: fix the number of entries in the header
ring-buffer: discard timestamps that are at the start of the buffer
ring-buffer: try to discard unneeded timestamps
ring-buffer: fix bug in ring_buffer_discard_commit
ftrace: do not profile functions when disabled
tracing: make trace pipe recognize latency format flag
...
23 May, 2009
1 commit
-
Presently non-legacy IRQs have their irq_desc allocated with
kzalloc_node(). This assumes that all callers of irq_to_desc_node_alloc()
will be sufficiently late in the boot process that kmalloc is available.While porting sparseirq support to sh this blew up immediately, as at the
time that we register the CPU's interrupt vector map only bootmem is
available. Check slab_is_available() to work out which path to use.[ Impact: fix SH early boot crash with sparseirq enabled ]
Signed-off-by: Paul Mundt
Acked-by: Yinghai Lu
Cc: Andrew Morton
Cc: Mel Gorman
LKML-Reference:
Signed-off-by: Ingo Molnar
12 May, 2009
1 commit
-
Merge reason: both topics modify the APIC code but were able to do it in
parallel so far. An upcoming patch generates a conflict so
merge them to avoid the conflict.Signed-off-by: Ingo Molnar
07 May, 2009
1 commit
-
Merge reason: tracing/core was on a .30-rc1 base and was missing out on
on a handful of tracing fixes present in .30-rc5-almost.Signed-off-by: Ingo Molnar
01 May, 2009
1 commit
-
This reverts commit 044d408409cc4e1bc75c886e27ca85c270db104c.
The commit added a warning when handle_IRQ_event() is called outside
of hard interrupt context. This breaks the generic tasklet based
interrupt resend mechanism which is used when the hardware has no way
to retrigger the interrupt. So we get a warning for a use case which
is correct and worked for years. Remove it.Signed-off-by: Thomas Gleixner