]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Remove an unnecessary level of directory hierachy
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 31 May 2017 13:40:22 +0000 (13:40 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 5 Jun 2017 10:47:39 +0000 (11:47 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
arch/x86/include/arch/hypercall-x86_32.h [new file with mode: 0644]
arch/x86/include/arch/hypercall-x86_64.h [new file with mode: 0644]
arch/x86/include/arch/x86_32/hypercall-x86_32.h [deleted file]
arch/x86/include/arch/x86_64/hypercall-x86_64.h [deleted file]
include/xtf/hypercall.h

diff --git a/arch/x86/include/arch/hypercall-x86_32.h b/arch/x86/include/arch/hypercall-x86_32.h
new file mode 100644 (file)
index 0000000..9bb72ef
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef XTF_X86_32_HYPERCALL_H
+#define XTF_X86_32_HYPERCALL_H
+
+/*
+ * Hypercall primatives for 32bit
+ *
+ * Inputs: %ebx, %ecx, %edx, %esi, %edi, %ebp (arguments 1-6)
+ */
+
+#define _hypercall32_1(type, hcall, a1)                                 \
+    ({                                                                  \
+        long __res, __ign1;                                             \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=b" (__ign1)                               \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1))                                          \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#define _hypercall32_2(type, hcall, a1, a2)                             \
+    ({                                                                  \
+        long __res, __ign1, __ign2;                                     \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=b" (__ign1), "=c" (__ign2)                \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1)), "2" ((long)(a2))                        \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#define _hypercall32_3(type, hcall, a1, a2, a3)                         \
+    ({                                                                  \
+        long __res, __ign1, __ign2, __ign3;                             \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3) \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3))      \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#define _hypercall32_4(type, hcall, a1, a2, a3, a4)                     \
+    ({                                                                  \
+        long __res, __ign1, __ign2, __ign3, __ign4;                     \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3),\
+              "=S" (__ign4)                                             \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)),     \
+              "4" ((long)(a4))                                          \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#endif /* XTF_X86_32_HYPERCALL_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/arch/x86/include/arch/hypercall-x86_64.h b/arch/x86/include/arch/hypercall-x86_64.h
new file mode 100644 (file)
index 0000000..885bd30
--- /dev/null
@@ -0,0 +1,71 @@
+#ifndef XTF_X86_64_HYPERCALL_H
+#define XTF_X86_64_HYPERCALL_H
+
+/*
+ * Hypercall primatives for 64bit
+ *
+ * Inputs: %rdi, %rsi, %rdx, %r10, %r8, %r9 (arguments 1-6)
+ */
+
+#define _hypercall64_1(type, hcall, a1)                                 \
+    ({                                                                  \
+        long __res, __ign1;                                             \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=D" (__ign1)                               \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1))                                          \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#define _hypercall64_2(type, hcall, a1, a2)                             \
+    ({                                                                  \
+        long __res, __ign1, __ign2;                                     \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=D" (__ign1), "=S" (__ign2)                \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1)), "2" ((long)(a2))                        \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#define _hypercall64_3(type, hcall, a1, a2, a3)                         \
+    ({                                                                  \
+        long __res, __ign1, __ign2, __ign3;                             \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=D" (__ign1), "=S" (__ign2), "=d" (__ign3) \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3))      \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#define _hypercall64_4(type, hcall, a1, a2, a3, a4)                     \
+    ({                                                                  \
+        long __res, __ign1, __ign2, __ign3, __ign4;                     \
+        register long _a4 asm ("r10") = ((long)(a4));                   \
+        asm volatile (                                                  \
+            "call hypercall_page + %c[offset]"                          \
+            : "=a" (__res), "=D" (__ign1), "=S" (__ign2), "=d" (__ign3),\
+              "=&r" (__ign4)                                            \
+            : [offset] "i" (hcall * 32),                                \
+              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)),     \
+              "4" (_a4)                                                 \
+            : "memory" );                                               \
+        (type)__res;                                                    \
+    })
+
+#endif /* XTF_X86_64_HYPERCALL_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/arch/x86/include/arch/x86_32/hypercall-x86_32.h b/arch/x86/include/arch/x86_32/hypercall-x86_32.h
deleted file mode 100644 (file)
index 9bb72ef..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef XTF_X86_32_HYPERCALL_H
-#define XTF_X86_32_HYPERCALL_H
-
-/*
- * Hypercall primatives for 32bit
- *
- * Inputs: %ebx, %ecx, %edx, %esi, %edi, %ebp (arguments 1-6)
- */
-
-#define _hypercall32_1(type, hcall, a1)                                 \
-    ({                                                                  \
-        long __res, __ign1;                                             \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=b" (__ign1)                               \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1))                                          \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#define _hypercall32_2(type, hcall, a1, a2)                             \
-    ({                                                                  \
-        long __res, __ign1, __ign2;                                     \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=b" (__ign1), "=c" (__ign2)                \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1)), "2" ((long)(a2))                        \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#define _hypercall32_3(type, hcall, a1, a2, a3)                         \
-    ({                                                                  \
-        long __res, __ign1, __ign2, __ign3;                             \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3) \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3))      \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#define _hypercall32_4(type, hcall, a1, a2, a3, a4)                     \
-    ({                                                                  \
-        long __res, __ign1, __ign2, __ign3, __ign4;                     \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=b" (__ign1), "=c" (__ign2), "=d" (__ign3),\
-              "=S" (__ign4)                                             \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)),     \
-              "4" ((long)(a4))                                          \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#endif /* XTF_X86_32_HYPERCALL_H */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/arch/x86/include/arch/x86_64/hypercall-x86_64.h b/arch/x86/include/arch/x86_64/hypercall-x86_64.h
deleted file mode 100644 (file)
index 885bd30..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-#ifndef XTF_X86_64_HYPERCALL_H
-#define XTF_X86_64_HYPERCALL_H
-
-/*
- * Hypercall primatives for 64bit
- *
- * Inputs: %rdi, %rsi, %rdx, %r10, %r8, %r9 (arguments 1-6)
- */
-
-#define _hypercall64_1(type, hcall, a1)                                 \
-    ({                                                                  \
-        long __res, __ign1;                                             \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=D" (__ign1)                               \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1))                                          \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#define _hypercall64_2(type, hcall, a1, a2)                             \
-    ({                                                                  \
-        long __res, __ign1, __ign2;                                     \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=D" (__ign1), "=S" (__ign2)                \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1)), "2" ((long)(a2))                        \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#define _hypercall64_3(type, hcall, a1, a2, a3)                         \
-    ({                                                                  \
-        long __res, __ign1, __ign2, __ign3;                             \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=D" (__ign1), "=S" (__ign2), "=d" (__ign3) \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3))      \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#define _hypercall64_4(type, hcall, a1, a2, a3, a4)                     \
-    ({                                                                  \
-        long __res, __ign1, __ign2, __ign3, __ign4;                     \
-        register long _a4 asm ("r10") = ((long)(a4));                   \
-        asm volatile (                                                  \
-            "call hypercall_page + %c[offset]"                          \
-            : "=a" (__res), "=D" (__ign1), "=S" (__ign2), "=d" (__ign3),\
-              "=&r" (__ign4)                                            \
-            : [offset] "i" (hcall * 32),                                \
-              "1" ((long)(a1)), "2" ((long)(a2)), "3" ((long)(a3)),     \
-              "4" (_a4)                                                 \
-            : "memory" );                                               \
-        (type)__res;                                                    \
-    })
-
-#endif /* XTF_X86_64_HYPERCALL_H */
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
index 5db8b95a21c5084c7980229f23153c79cf763dc8..4e8a6fc89a195fce5520007475e85a6bdb7d0efb 100644 (file)
@@ -6,7 +6,7 @@
 
 #if defined(__x86_64__)
 
-# include <arch/x86_64/hypercall-x86_64.h>
+# include <arch/hypercall-x86_64.h>
 # define HYPERCALL1 _hypercall64_1
 # define HYPERCALL2 _hypercall64_2
 # define HYPERCALL3 _hypercall64_3
@@ -14,7 +14,7 @@
 
 #elif defined(__i386__)
 
-# include <arch/x86_32/hypercall-x86_32.h>
+# include <arch/hypercall-x86_32.h>
 # define HYPERCALL1 _hypercall32_1
 # define HYPERCALL2 _hypercall32_2
 # define HYPERCALL3 _hypercall32_3