These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / x86 / kernel / irq_32.c
index 521ef3c..ce71f70 100644 (file)
 
 #include <asm/apic.h>
 
-DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
-EXPORT_PER_CPU_SYMBOL(irq_stat);
-
-DEFINE_PER_CPU(struct pt_regs *, irq_regs);
-EXPORT_PER_CPU_SYMBOL(irq_regs);
-
 #ifdef CONFIG_DEBUG_STACKOVERFLOW
 
 int sysctl_panic_on_stackoverflow __read_mostly;
@@ -74,11 +68,10 @@ static inline void *current_stack(void)
        return (void *)(current_stack_pointer() & ~(THREAD_SIZE - 1));
 }
 
-static inline int
-execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
+static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc)
 {
        struct irq_stack *curstk, *irqstk;
-       u32 *isp, *prev_esp, arg1, arg2;
+       u32 *isp, *prev_esp, arg1;
 
        curstk = (struct irq_stack *) current_stack();
        irqstk = __this_cpu_read(hardirq_stack);
@@ -104,8 +97,8 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
        asm volatile("xchgl     %%ebx,%%esp     \n"
                     "call      *%%edi          \n"
                     "movl      %%ebx,%%esp     \n"
-                    : "=a" (arg1), "=d" (arg2), "=b" (isp)
-                    :  "0" (irq),   "1" (desc),  "2" (isp),
+                    : "=a" (arg1), "=b" (isp)
+                    :  "0" (desc),   "1" (isp),
                        "D" (desc->handle_irq)
                     : "memory", "cc", "ecx");
        return 1;
@@ -156,21 +149,17 @@ void do_softirq_own_stack(void)
 }
 #endif
 
-bool handle_irq(unsigned irq, struct pt_regs *regs)
+bool handle_irq(struct irq_desc *desc, struct pt_regs *regs)
 {
-       struct irq_desc *desc;
-       int overflow;
-
-       overflow = check_stack_overflow();
+       int overflow = check_stack_overflow();
 
-       desc = irq_to_desc(irq);
-       if (unlikely(!desc))
+       if (IS_ERR_OR_NULL(desc))
                return false;
 
-       if (user_mode(regs) || !execute_on_irq_stack(overflow, desc, irq)) {
+       if (user_mode(regs) || !execute_on_irq_stack(overflow, desc)) {
                if (unlikely(overflow))
                        print_stack_overflow();
-               desc->handle_irq(irq, desc);
+               generic_handle_irq_desc(desc);
        }
 
        return true;