Ejemplo n.º 1
0
asmlinkage void do_nmi(struct pt_regs * regs, long error_code)
{
	int cpu = safe_smp_processor_id();

	nmi_enter();
	add_pda(__nmi_count,1);
	if (!nmi_callback(regs, cpu))
		default_do_nmi(regs);
	nmi_exit();
}
Ejemplo n.º 2
0
dotraplinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{
	nmi_enter();

	inc_irq_stat(__nmi_count);

	if (!ignore_nmis)
		default_do_nmi(regs);

	nmi_exit();
}
int handle_perf_interrupt(struct pt_regs *regs, int fault)
{
	int retval;

	if (!perf_irq)
		panic("Unexpected PERF_COUNT interrupt %d\n", fault);

	nmi_enter();
	retval = perf_irq(regs, fault);
	nmi_exit();
	return retval;
}
Ejemplo n.º 4
0
dotraplinkage notrace __kprobes void
do_nmi(struct pt_regs *regs, long error_code)
{
	nmi_enter();

#ifdef CONFIG_X86_32
	{ int cpu; cpu = smp_processor_id(); ++nmi_count(cpu); }
#else
	add_pda(__nmi_count, 1);
#endif

	if (!ignore_nmis)
		default_do_nmi(regs);

	nmi_exit();
}
Ejemplo n.º 5
0
/**
 * handle_domain_nmi - Invoke the handler for a HW irq belonging to a domain
 * @domain:	The domain where to perform the lookup
 * @hwirq:	The HW irq number to convert to a logical one
 * @regs:	Register file coming from the low-level handling code
 *
 * Returns:	0 on success, or -EINVAL if conversion has failed
 */
int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
		      struct pt_regs *regs)
{
	struct pt_regs *old_regs = set_irq_regs(regs);
	unsigned int irq;
	int ret = 0;

	nmi_enter();

	irq = irq_find_mapping(domain, hwirq);

	/*
	 * ack_bad_irq is not NMI-safe, just report
	 * an invalid interrupt.
	 */
	if (likely(irq))
		generic_handle_irq(irq);
	else
		ret = -EINVAL;

	nmi_exit();
	set_irq_regs(old_regs);
	return ret;
}