Message ID | 102c2a155cc7b14f0a8ea8049672f1d5ecbcd0e5.1694702259.git.oleksii.kurochko@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Introduce stub headers necessary for full Xen build | expand |
On 14.09.2023 16:56, Oleksii Kurochko wrote: > --- /dev/null > +++ b/xen/include/asm-generic/numa.h > @@ -0,0 +1,35 @@ > +/* SPDX-License-Identifier: GPL-2.0-only */ > +#ifndef __ARCH_GENERIC_NUMA_H > +#define __ARCH_GENERIC_NUMA_H > + > +#include <xen/mm.h> > + > +typedef u8 nodeid_t; If an 8-bit quantity, then uint8_t please. > +/* Fake one node for now. See also node_online_map. */ > +#define cpu_to_node(cpu) 0 > +#define node_to_cpumask(node) (cpu_online_map) Looks like this really is fake NUMA then, with just a single node. That's certainly in need of expressing in a comment. > +extern mfn_t first_valid_mfn; > + > +#define node_spanned_pages(nid) (max_page - mfn_x(first_valid_mfn)) > +#define node_start_pfn(nid) (mfn_x(first_valid_mfn)) > +#define __node_distance(a, b) (20) This also needs commenting, even if it ended up being "arbitrary". > +static inline unsigned int arch_get_dma_bitsize(void) > +{ > + return 32; Same here. Jan
diff --git a/xen/include/asm-generic/numa.h b/xen/include/asm-generic/numa.h new file mode 100644 index 0000000000..028f7b3638 --- /dev/null +++ b/xen/include/asm-generic/numa.h @@ -0,0 +1,35 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __ARCH_GENERIC_NUMA_H +#define __ARCH_GENERIC_NUMA_H + +#include <xen/mm.h> + +typedef u8 nodeid_t; + +/* Fake one node for now. See also node_online_map. */ +#define cpu_to_node(cpu) 0 +#define node_to_cpumask(node) (cpu_online_map) + +extern mfn_t first_valid_mfn; + +#define node_spanned_pages(nid) (max_page - mfn_x(first_valid_mfn)) +#define node_start_pfn(nid) (mfn_x(first_valid_mfn)) +#define __node_distance(a, b) (20) + +static inline unsigned int arch_get_dma_bitsize(void) +{ + return 32; +} + +#define arch_want_default_dmazone() (false) + +#endif /* __ARCH_GENERIC_NUMA_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */
The patch introduces header stub necessry for full Xen build. Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com> --- xen/include/asm-generic/numa.h | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 xen/include/asm-generic/numa.h