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

Reply via email to