x86/vm86: Move the vm86 IRQ definitions to vm86.h
authorIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2015 08:59:20 +0000 (10:59 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 31 Jul 2015 11:31:10 +0000 (13:31 +0200)
Move vm86 specific definitions from irq_vectors.h to vm86.h.

Based on patch from Brian Gerst.

Originally-from: Brian Gerst <brgerst@gmail.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1438148483-11932-6-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/irq_vectors.h
arch/x86/include/asm/vm86.h

index 4c2d2eb2060a0b4b74d71bae834e49e51e777cff..6ca9fd6234e13b83de1bd495d0c4f7231ba439d4 100644 (file)
 
 #define FPU_IRQ                                  13
 
-#define        FIRST_VM86_IRQ                     3
-#define LAST_VM86_IRQ                    15
-
-#ifndef __ASSEMBLY__
-static inline int invalid_vm86_irq(int irq)
-{
-       return irq < FIRST_VM86_IRQ || irq > LAST_VM86_IRQ;
-}
-#endif
-
 /*
  * Size the maximum number of interrupts.
  *
index e45386eee17a71e576339d1f46ca0a32a9621774..b0631965b93575c2b0b8e08946ecc6b1c722ece1 100644 (file)
@@ -49,7 +49,6 @@ int handle_vm86_trap(struct kernel_vm86_regs *, long, int);
 void save_v86_state(struct kernel_vm86_regs *, int);
 
 struct task_struct;
-void release_vm86_irqs(struct task_struct *);
 
 #define free_vm86(t) do {                              \
        struct thread_struct *__t = (t);                \
@@ -59,6 +58,20 @@ void release_vm86_irqs(struct task_struct *);
        }                                               \
 } while (0)
 
+/*
+ * Support for VM86 programs to request interrupts for
+ * real mode hardware drivers:
+ */
+#define FIRST_VM86_IRQ          3
+#define LAST_VM86_IRQ          15
+
+static inline int invalid_vm86_irq(int irq)
+{
+       return irq < FIRST_VM86_IRQ || irq > LAST_VM86_IRQ;
+}
+
+void release_vm86_irqs(struct task_struct *);
+
 #else
 
 #define handle_vm86_fault(a, b)