summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2011-07-26 00:29:23 +0000
committerRobert Mustacchi <rm@joyent.com>2011-07-26 00:29:43 +0000
commit54f86be87be55bc4745fe34fa4c33473ca94736c (patch)
tree4b61b42342ef1312102214f78d49129a4c0f1a07
parent85cb0449e660806d679c50fabdcba3c8ea7b9fc1 (diff)
downloadillumos-kvm-54f86be87be55bc4745fe34fa4c33473ca94736c.tar.gz
HVM-519 Remove asm.h
-rw-r--r--asm.h51
-rw-r--r--kvm_x86host.h11
-rw-r--r--msr.h1
3 files changed, 11 insertions, 52 deletions
diff --git a/asm.h b/asm.h
deleted file mode 100644
index 1ce0949..0000000
--- a/asm.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#ifndef _ASM_X86_ASM_H
-#define _ASM_X86_ASM_H
-
-#ifdef __ASSEMBLY__
-# define __ASM_FORM(x) x
-# define __ASM_EX_SEC .section __ex_table, "a"
-#else
-# define __ASM_FORM(x) " " #x " "
-# define __ASM_EX_SEC " .section __ex_table,\"a\"\n"
-#endif
-
-# define __ASM_SEL(a,b) __ASM_FORM(b)
-
-#define __ASM_SIZE(inst) __ASM_SEL(inst##l, inst##q)
-#define __ASM_REG(reg) __ASM_SEL(e##reg, r##reg)
-
-#define _ASM_PTR __ASM_SEL(.long, .quad)
-#define _ASM_ALIGN __ASM_SEL(.balign 4, .balign 8)
-
-#define _ASM_MOV __ASM_SIZE(mov)
-#define _ASM_INC __ASM_SIZE(inc)
-#define _ASM_DEC __ASM_SIZE(dec)
-#define _ASM_ADD __ASM_SIZE(add)
-#define _ASM_SUB __ASM_SIZE(sub)
-#define _ASM_XADD __ASM_SIZE(xadd)
-
-#define _ASM_AX __ASM_REG(ax)
-#define _ASM_BX __ASM_REG(bx)
-#define _ASM_CX __ASM_REG(cx)
-#define _ASM_DX __ASM_REG(dx)
-#define _ASM_SP __ASM_REG(sp)
-#define _ASM_BP __ASM_REG(bp)
-#define _ASM_SI __ASM_REG(si)
-#define _ASM_DI __ASM_REG(di)
-
-/* Exception table entry */
-#ifdef __ASSEMBLY__
-# define _ASM_EXTABLE(from,to) \
- __ASM_EX_SEC ; \
- _ASM_ALIGN ; \
- _ASM_PTR from , to ; \
- .previous
-#else
-# define _ASM_EXTABLE(from,to) \
- __ASM_EX_SEC \
- _ASM_ALIGN "\n" \
- _ASM_PTR #from "," #to "\n" \
- " .previous\n"
-#endif
-
-#endif /* _ASM_X86_ASM_H */
diff --git a/kvm_x86host.h b/kvm_x86host.h
index a060096..b52c518 100644
--- a/kvm_x86host.h
+++ b/kvm_x86host.h
@@ -828,6 +828,17 @@ enum {
#define HF_IRET_MASK (1 << 4)
/*
+ * These definitions used to exist in asm.h. However because most of the file
+ * was unnecessary, they have been moved into here.
+ */
+#define __ASM_FORM(x) " " #x " "
+
+#define __ASM_SEL(a,b) __ASM_FORM(b)
+
+#define __ASM_SIZE(inst) __ASM_SEL(inst##l, inst##q)
+#define _ASM_PTR __ASM_SEL(.long, .quad)
+
+/*
* Hardware virtualization extension instructions may fault if a
* reboot turns off virtualization while processes are running.
* Trap the fault and ignore the instruction if that happens.
diff --git a/msr.h b/msr.h
index 7e80788..f4ea1e3 100644
--- a/msr.h
+++ b/msr.h
@@ -11,7 +11,6 @@
#ifdef _KERNEL
-#include "asm.h"
#include <sys/ontrap.h>
#include <sys/errno.h>