[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/19] arm: Remove dependencies with membank(s) definitions from setup.h



On Fri, 30 May 2025, Alejandro Vallejo wrote:
> ... as they can be forward-declared changing arrays for pointers in the 
> function
> declarations.
> 
> No functional change.
> 
> Signed-off-by: Alejandro Vallejo <agarciav@xxxxxxx>
> ---
>  xen/arch/arm/include/asm/setup.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/setup.h 
> b/xen/arch/arm/include/asm/setup.h
> index 6cf272c160..0f9e531a34 100644
> --- a/xen/arch/arm/include/asm/setup.h
> +++ b/xen/arch/arm/include/asm/setup.h
> @@ -3,7 +3,6 @@
>  
>  #include <public/version.h>
>  #include <asm/p2m.h>
> -#include <xen/bootfdt.h>
>  #include <xen/device_tree.h>

This change breaks the build on ARM:

  CC      xsm/xsm_policy.o
xsm/xsm_policy.c: In function ‘xsm_dt_policy_init’:
xsm/xsm_policy.c:71:30: error: implicit declaration of function 
‘boot_module_find_by_kind’ [-Werror=implicit-function-declaration]
   71 |     struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_XSM);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
xsm/xsm_policy.c:71:30: error: nested extern declaration of 
‘boot_module_find_by_kind’ [-Werror=nested-externs]
xsm/xsm_policy.c:71:55: error: ‘BOOTMOD_XSM’ undeclared (first use in this 
function)
   71 |     struct bootmodule *mod = boot_module_find_by_kind(BOOTMOD_XSM);
      |                                                       ^~~~~~~~~~~
xsm/xsm_policy.c:71:55: note: each undeclared identifier is reported only once 
for each function it appears in
xsm/xsm_policy.c:74:22: error: dereferencing pointer to incomplete type ‘struct 
bootmodule’
   74 |     if ( !mod || !mod->size )
      |                      ^~
cc1: all warnings being treated as errors
make[2]: *** [Rules.mk:249: xsm/xsm_policy.o] Error 1
make[1]: *** [build.mk:72: xsm] Error 2
make: *** [Makefile:619: xen] Error 2

The rest looks OK


>  #if defined(CONFIG_MMU)
> @@ -14,6 +13,9 @@
>  
>  #define MAX_FDT_SIZE SZ_2M
>  
> +struct membank;
> +struct membanks;
> +
>  struct map_range_data
>  {
>      struct domain *d;
> @@ -32,13 +34,13 @@ void copy_from_paddr(void *dst, paddr_t paddr, unsigned 
> long len);
>  size_t estimate_efi_size(unsigned int mem_nr_banks);
>  
>  void acpi_create_efi_system_table(struct domain *d,
> -                                  struct membank tbl_add[]);
> +                                  struct membank *tbl_add);
>  
>  void acpi_create_efi_mmap_table(struct domain *d,
>                                  const struct membanks *mem,
> -                                struct membank tbl_add[]);
> +                                struct membank *tbl_add);
>  
> -int acpi_make_efi_nodes(void *fdt, struct membank tbl_add[]);
> +int acpi_make_efi_nodes(void *fdt, struct membank *tbl_add);
>  
>  void create_dom0(void);
>  
> -- 
> 2.43.0
> 

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.