On 22.11.2024 10:33, Frediano Ziglio wrote:
> This allows to include other headers and avoid duplicated declarations.
> 
> Signed-off-by: Frediano Ziglio <frediano.zig...@cloud.com>

Again it's left unclear what the purpose / goal is.

> --- /dev/null
> +++ b/xen/arch/x86/include/boot/public/xen.h
> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +
> +/* This header allows the inclusion of public xen.h */
> +
> +#ifndef BOOT__PUBLIC__XEN_H
> +#define BOOT__PUBLIC__XEN_H
> +
> +#if !defined(__XEN__) || defined(__XEN_TOOLS__) || __XEN__ != 1
> +#error Unexpected defines
> +#endif

What is this to guard against? We're in the Xen tree, building Xen.

> +#include <xen/types.h>
> +
> +#ifdef __i386__
> +
> +# define __XEN_TOOLS__ 1
> +# undef __XEN__
> +# include <public/arch-x86/xen.h>
> +# define __XEN__ 1
> +# undef __XEN_TOOLS__

Why would __XEN__ need un-defining and __XEN_TOOLS__ (seemingly wrongly)
need defining? (As an aside, I don't think the expansion of either macro
really matters. IOW I don#t see the need for the two 1-s.)

Jan

Reply via email to