2008-10-23 05:26:29 +00:00
|
|
|
#ifndef _ASM_X86_IRQ_H
|
|
|
|
#define _ASM_X86_IRQ_H
|
2008-05-02 20:14:44 +00:00
|
|
|
/*
|
|
|
|
* (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar
|
|
|
|
*
|
|
|
|
* IRQ/IPI changes taken from work by Thomas Radke
|
|
|
|
* <tomsoft@informatik.tu-chemnitz.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <asm/apicdef.h>
|
|
|
|
#include <asm/irq_vectors.h>
|
|
|
|
|
|
|
|
static inline int irq_canonicalize(int irq)
|
|
|
|
{
|
|
|
|
return ((irq == 2) ? 9 : irq);
|
|
|
|
}
|
|
|
|
|
2010-06-28 12:15:54 +00:00
|
|
|
#ifdef CONFIG_X86_32
|
|
|
|
extern void irq_ctx_init(int cpu);
|
2007-10-11 09:20:03 +00:00
|
|
|
#else
|
2008-05-02 20:14:44 +00:00
|
|
|
# define irq_ctx_init(cpu) do { } while (0)
|
|
|
|
#endif
|
|
|
|
|
2010-06-28 12:15:54 +00:00
|
|
|
#define __ARCH_HAS_DO_SOFTIRQ
|
|
|
|
|
2008-05-02 20:14:44 +00:00
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
|
|
#include <linux/cpumask.h>
|
2008-12-17 01:33:58 +00:00
|
|
|
extern void fixup_irqs(void);
|
2009-10-26 22:24:34 +00:00
|
|
|
extern void irq_force_complete_move(int);
|
2007-10-11 09:20:03 +00:00
|
|
|
#endif
|
2008-05-02 20:14:44 +00:00
|
|
|
|
2009-10-14 14:22:57 +00:00
|
|
|
extern void (*x86_platform_ipi_callback)(void);
|
2008-05-02 20:14:44 +00:00
|
|
|
extern void native_init_IRQ(void);
|
2009-02-06 22:09:40 +00:00
|
|
|
extern bool handle_irq(unsigned irq, struct pt_regs *regs);
|
2008-05-02 20:14:44 +00:00
|
|
|
|
2013-08-05 22:02:37 +00:00
|
|
|
extern __visible unsigned int do_IRQ(struct pt_regs *regs);
|
2009-02-06 22:09:41 +00:00
|
|
|
|
2008-05-02 20:14:44 +00:00
|
|
|
/* Interrupt vector management */
|
|
|
|
extern DECLARE_BITMAP(used_vectors, NR_VECTORS);
|
2008-12-19 23:23:44 +00:00
|
|
|
extern int vector_used_by_percpu_irq(unsigned int vector);
|
2008-05-02 20:14:44 +00:00
|
|
|
|
2009-08-20 07:41:38 +00:00
|
|
|
extern void init_ISA_irqs(void);
|
|
|
|
|
x86: Fix trigger_all_cpu_backtrace() implementation
The following change fixes the x86 implementation of
trigger_all_cpu_backtrace(), which was previously (accidentally,
as far as I can tell) disabled to always return false as on
architectures that do not implement this function.
trigger_all_cpu_backtrace(), as defined in include/linux/nmi.h,
should call arch_trigger_all_cpu_backtrace() if available, or
return false if the underlying arch doesn't implement this
function.
x86 did provide a suitable arch_trigger_all_cpu_backtrace()
implementation, but it wasn't actually being used because it was
declared in asm/nmi.h, which linux/nmi.h doesn't include. Also,
linux/nmi.h couldn't easily be fixed by including asm/nmi.h,
because that file is not available on all architectures.
I am proposing to fix this by moving the x86 definition of
arch_trigger_all_cpu_backtrace() to asm/irq.h.
Tested via: echo l > /proc/sysrq-trigger
Before the change, this uses a fallback implementation which
shows backtraces on active CPUs (using
smp_call_function_interrupt() )
After the change, this shows NMI backtraces on all CPUs
Signed-off-by: Michel Lespinasse <walken@google.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1370518875-1346-1-git-send-email-walken@google.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2013-06-06 11:41:15 +00:00
|
|
|
#ifdef CONFIG_X86_LOCAL_APIC
|
|
|
|
void arch_trigger_all_cpu_backtrace(void);
|
|
|
|
#define arch_trigger_all_cpu_backtrace arch_trigger_all_cpu_backtrace
|
|
|
|
#endif
|
|
|
|
|
2008-10-23 05:26:29 +00:00
|
|
|
#endif /* _ASM_X86_IRQ_H */
|