diff mbox series

[v2,1/7] xen/asm-generic: Introduce generic static-shmem.h

Message ID ea548f9c6cefff54dadf83446d4f5c721281f247.1702607884.git.sanastasio@raptorengineering.com (mailing list archive)
State New
Headers show
Series Early Boot Allocation on Power | expand

Commit Message

Shawn Anastasio Dec. 15, 2023, 2:43 a.m. UTC
Introduce static-shmem.h to asm-generic as a prerequisite for moving
ARM's bootfdt.c into xen/common.

Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
---
 xen/arch/ppc/include/asm/Makefile      |  1 +
 xen/include/asm-generic/static-shmem.h | 12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 xen/include/asm-generic/static-shmem.h

Comments

Jan Beulich Dec. 19, 2023, 5:07 p.m. UTC | #1
On 15.12.2023 03:43, Shawn Anastasio wrote:
> --- /dev/null
> +++ b/xen/include/asm-generic/static-shmem.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier:  GPL-2.0-only */
> +
> +#ifndef __ASM_GENERIC_STATIC_SHMEM_H__
> +#define __ASM_GENERIC_STATIC_SHMEM_H__
> +
> +static inline int process_shm_node(const void *fdt, int node,
> +                                   uint32_t address_cells, uint32_t size_cells)
> +{
> +    return -EINVAL;
> +}

This talking of fdt and cells doesn't look very generic to me, I'm
afraid. Plus if such a header was introduced, I'd kind of expect it
to also be used by Arm's !CONFIG_STATIC_SHM section - no need to
duplicate anything.

Jan
diff mbox series

Patch

diff --git a/xen/arch/ppc/include/asm/Makefile b/xen/arch/ppc/include/asm/Makefile
index 2da995bb2f..a711cfa856 100644
--- a/xen/arch/ppc/include/asm/Makefile
+++ b/xen/arch/ppc/include/asm/Makefile
@@ -6,4 +6,5 @@  generic-y += iocap.h
 generic-y += paging.h
 generic-y += percpu.h
 generic-y += random.h
+generic-y += static-shmem.h
 generic-y += vm_event.h
diff --git a/xen/include/asm-generic/static-shmem.h b/xen/include/asm-generic/static-shmem.h
new file mode 100644
index 0000000000..d45c44a419
--- /dev/null
+++ b/xen/include/asm-generic/static-shmem.h
@@ -0,0 +1,12 @@ 
+/* SPDX-License-Identifier:  GPL-2.0-only */
+
+#ifndef __ASM_GENERIC_STATIC_SHMEM_H__
+#define __ASM_GENERIC_STATIC_SHMEM_H__
+
+static inline int process_shm_node(const void *fdt, int node,
+                                   uint32_t address_cells, uint32_t size_cells)
+{
+    return -EINVAL;
+}
+
+#endif /* __ASM_GENERIC_STATIC_SHMEM_H__ */