x86: extract vendor numeric id to x86-vendors.h
authorWei Liu <wei.liu2@citrix.com>
Mon, 30 Jan 2017 12:51:08 +0000 (12:51 +0000)
committerWei Liu <wei.liu2@citrix.com>
Mon, 6 Feb 2017 10:15:49 +0000 (10:15 +0000)
They will be shared between xen and userspace programs.

This is not strictly necessary, but it helps reduce overall code size.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/processor.h
xen/include/asm-x86/x86-vendors.h [new file with mode: 0644]

index 5902c93a7c3ba2ac2bc0478df564b93e380c27cb..7735bc2a49ba6909825209a35a6bb3458840566c 100644 (file)
 #endif
 
 #include <asm/x86-defns.h>
-
-/*
- * CPU vendor IDs
- */
-#define X86_VENDOR_INTEL 0
-#define X86_VENDOR_AMD 1
-#define X86_VENDOR_CENTAUR 2
-#define X86_VENDOR_NUM 3
-#define X86_VENDOR_UNKNOWN 0xff
-
+#include <asm/x86-vendors.h>
 
 /*
  * Trap/fault mnemonics.
diff --git a/xen/include/asm-x86/x86-vendors.h b/xen/include/asm-x86/x86-vendors.h
new file mode 100644 (file)
index 0000000..cae5507
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef __XEN_X86_VENDORS_H__
+#define __XEN_X86_VENDORS_H__
+
+/*
+ * CPU vendor IDs
+ */
+#define X86_VENDOR_INTEL 0
+#define X86_VENDOR_AMD 1
+#define X86_VENDOR_CENTAUR 2
+#define X86_VENDOR_NUM 3
+#define X86_VENDOR_UNKNOWN 0xff
+
+#endif /* __XEN_X86_VENDORS_H__ */