diff mbox series

[v4,03/14] xen/asm-generic: introduce generic hypercall.h

Message ID b08aeb05ae905d8ed0d61f3780e20c576950f96b.1701093907.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series Introduce generic headers | expand

Commit Message

Oleksii Kurochko Nov. 27, 2023, 2:13 p.m. UTC
Introduce an empty generic hypercall.h for archs which don't
implement it.

Drop PPC's hypercall.h and switch to generic one instead.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---
Changes in V4:
 - Nothing changed. Only rebase.
---
Changes in V3:
 - Drop PPC's hypercall.h and switch to generic one.
 - Update the commit message
 - Add Acked-by: Jan Beulich <jbeulich@suse.com>
---
Changes in V2:
 - add check that <asm/hypercall.h> isn't included directly.
---
 xen/arch/ppc/include/asm/Makefile    |  1 +
 xen/arch/ppc/include/asm/hypercall.h |  5 -----
 xen/include/asm-generic/hypercall.h  | 18 ++++++++++++++++++
 3 files changed, 19 insertions(+), 5 deletions(-)
 delete mode 100644 xen/arch/ppc/include/asm/hypercall.h
 create mode 100644 xen/include/asm-generic/hypercall.h

Comments

Shawn Anastasio Nov. 28, 2023, 9:47 p.m. UTC | #1
Hi Oleksii,

On 11/27/23 8:13 AM, Oleksii Kurochko wrote:
> Introduce an empty generic hypercall.h for archs which don't
> implement it.
> 
> Drop PPC's hypercall.h and switch to generic one instead.

Acked-by: Shawn Anastasio <sanastasio@raptorengineering.com>

Thanks,
Shawn
diff mbox series

Patch

diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile
index df4c1ebb08..d5e369128c 100644
--- a/xen/arch/ppc/include/asm/Makefile
+++ b/xen/arch/ppc/include/asm/Makefile
@@ -1,4 +1,5 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 generic-y += device.h
+generic-y += hypercall.h
 generic-y += paging.h
 generic-y += vm_event.h
diff --git a/xen/arch/ppc/include/asm/hypercall.h b/xen/arch/ppc/include/asm/hypercall.h
deleted file mode 100644
index 1e8ca0ce9c..0000000000
--- a/xen/arch/ppc/include/asm/hypercall.h
+++ /dev/null
@@ -1,5 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0-only */
-#ifndef __ASM_PPC_HYPERCALL_H__
-#define __ASM_PPC_HYPERCALL_H__
-
-#endif /* __ASM_PPC_HYPERCALL_H__ */
diff --git a/xen/include/asm-generic/hypercall.h b/xen/include/asm-generic/hypercall.h
new file mode 100644
index 0000000000..7743b35c0d
--- /dev/null
+++ b/xen/include/asm-generic/hypercall.h
@@ -0,0 +1,18 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only */
+#ifndef __XEN_HYPERCALL_H__
+#error "asm/hypercall.h should not be included directly - include xen/hypercall.h instead"
+#endif
+
+#ifndef __ASM_GENERIC_HYPERCALL_H__
+#define __ASM_GENERIC_HYPERCALL_H__
+
+#endif /* __ASM_GENERIC_HYPERCALL_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */