Skip to contentSkip to conversation

x86: Move definition of some exception vectors into processor.h

PATCH Applied Xiaoyao Li 2 participants 2 messages Mar 4, 2020 – Mar 5, 2020 KVM

lore
Share & tools
lore

Xiaoyao Li

author
#0 lore raw

PATCH 1/1 x86: Move definition of some exception vectors into processor.h

Both processor.h and desc.h hold some definitions of exception vector. put them together in processor.h

---
 lib/x86/desc.h      | 5 -----
 lib/x86/processor.h | 3 +++
 x86/debug.c         | 1 +
 x86/idt_test.c      | 1 +
 4 files changed, 5 insertions(+), 5 deletions(-)
lib/x86/desc.h +0 -5
index 00b93285f5c6..0fe5cbf35577 100644
@@ -91,11 +91,6 @@ typedef struct  __attribute__((packed)) {
     "1111:"
 #endif
 
-#define DB_VECTOR   1
-#define BP_VECTOR   3
-#define UD_VECTOR   6
-#define GP_VECTOR   13
-
 /*
  * selector     32-bit                        64-bit
  * 0x00         NULL descriptor               NULL descriptor
lib/x86/processor.h +3 -0
index 103e52b19d82..67ba416b73ff 100644
@@ -15,6 +15,9 @@
 #  define S "4"
 #endif
 
+#define DB_VECTOR 1
+#define BP_VECTOR 3
+#define UD_VECTOR 6
 #define DF_VECTOR 8
 #define TS_VECTOR 10
 #define NP_VECTOR 11
x86/debug.c +1 -0
index c5db4c6ecf5a..972762a72ce8 100644
@@ -10,6 +10,7 @@
  */
 
 #include "libcflat.h"
+#include "processor.h"
 #include "desc.h"
 
 static volatile unsigned long bp_addr;
x86/idt_test.c +1 -0
index aa2973301ee0..964f119060ee 100644
@@ -1,4 +1,5 @@
 #include "libcflat.h"
+#include "processor.h"
 #include "desc.h"
 
 static int test_ud2(bool *rflags_rf)
Signature · 1 line
2.20.1
maintainer Applied
#1 lore raw
Quoted 59 lines · Xiaoyao Li

Both processor.h and desc.h hold some definitions of exception vector. put them together in processor.h

---
 lib/x86/desc.h      | 5 -----
 lib/x86/processor.h | 3 +++
 x86/debug.c         | 1 +
 x86/idt_test.c      | 1 +
 4 files changed, 5 insertions(+), 5 deletions(-)
lib/x86/desc.h +0 -5
index 00b93285f5c6..0fe5cbf35577 100644
@@ -91,11 +91,6 @@ typedef struct  __attribute__((packed)) {
     "1111:"
 #endif
 
-#define DB_VECTOR   1
-#define BP_VECTOR   3
-#define UD_VECTOR   6
-#define GP_VECTOR   13
-
 /*
  * selector     32-bit                        64-bit
  * 0x00         NULL descriptor               NULL descriptor
lib/x86/processor.h +3 -0
index 103e52b19d82..67ba416b73ff 100644
@@ -15,6 +15,9 @@
 #  define S "4"
 #endif
 
+#define DB_VECTOR 1
+#define BP_VECTOR 3
+#define UD_VECTOR 6
 #define DF_VECTOR 8
 #define TS_VECTOR 10
 #define NP_VECTOR 11
x86/debug.c +1 -0
index c5db4c6ecf5a..972762a72ce8 100644
@@ -10,6 +10,7 @@
  */
 
 #include "libcflat.h"
+#include "processor.h"
 #include "desc.h"
 
 static volatile unsigned long bp_addr;
x86/idt_test.c +0 -0
index aa2973301ee0..964f119060ee 100644

x86/idt_test.c line 5

Quoted 5 lines
x86/idt_test.c +1 -0
@@ -1,4 +1,5 @@
 #include "libcflat.h"
+#include "processor.h"
 #include "desc.h"
 
 static int test_ud2(bool *rflags_rf)

Queued, thanks.

Paolo