aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/irqdesc.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/irqdesc.c')
-rw-r--r--kernel/irq/irqdesc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index c52b737ab8e3..a92b33593b8d 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -680,6 +680,8 @@ int __handle_domain_irq(struct irq_domain *domain, unsigned int hwirq,
680 * @hwirq: The HW irq number to convert to a logical one 680 * @hwirq: The HW irq number to convert to a logical one
681 * @regs: Register file coming from the low-level handling code 681 * @regs: Register file coming from the low-level handling code
682 * 682 *
683 * This function must be called from an NMI context.
684 *
683 * Returns: 0 on success, or -EINVAL if conversion has failed 685 * Returns: 0 on success, or -EINVAL if conversion has failed
684 */ 686 */
685int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq, 687int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
@@ -689,7 +691,10 @@ int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
689 unsigned int irq; 691 unsigned int irq;
690 int ret = 0; 692 int ret = 0;
691 693
692 nmi_enter(); 694 /*
695 * NMI context needs to be setup earlier in order to deal with tracing.
696 */
697 WARN_ON(!in_nmi());
693 698
694 irq = irq_find_mapping(domain, hwirq); 699 irq = irq_find_mapping(domain, hwirq);
695 700
@@ -702,7 +707,6 @@ int handle_domain_nmi(struct irq_domain *domain, unsigned int hwirq,
702 else 707 else
703 ret = -EINVAL; 708 ret = -EINVAL;
704 709
705 nmi_exit();
706 set_irq_regs(old_regs); 710 set_irq_regs(old_regs);
707 return ret; 711 return ret;
708} 712}