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

Re: [PATCH] xen: Consolidate linker script setup data


  • To: "Jason Andryuk" <jason.andryuk@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Alejandro Vallejo" <alejandro.garciavallejo@xxxxxxx>
  • Date: Thu, 24 Sep 2026 17:58:55 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z6hdd+WxYwINwdvB8aBG2UPN/VWbPUZ4KqepmVC0zWE=; b=wqkGUi9QixA0rG06tJaMWMX3syGzZlPh/GuD1mdXOAwvCLgYGteie35wEvJIw2efiA1gFhSZzrv0hN4PALKNpfqQhXFIeVfuZLcxCe1KM+nT/YLTf13g3C/RBSqWQYjip12QWxdRHetzN+4fKzIEGHgomJ6v8EeNRAZZBnQ7tB2m3jbuata69wCZhOtSSjoHrgpfxAVinBdnLZkyGuoRMDocfXVLvEXib+7gMl5Woyl7aTGMt7Oiz1cBpIoFQq1AEXcY8AcTeqAQPU9pr6k4NE87mYpDezZbOShV5Dk4M1ikB8QevKsmbfiLgFI+hJkua+d8cbCpZWbBVSE/tdhAwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XK/2eedU0ipgPn0Ce+GMnCUZQZYpFH6HXDVuv9GRmNEte3k0EfR5A1dITeveOGsjQkie/MpoGKv6pe3wOQlUf1ooGZd9ZUqPqcdKgwhuxgX24ssKmw5f0ROP10EACVT2PVty9XYVmc/aVH76V/XICLRdxaqUwEJ3HGxqWh5BR+L8yj7yu31r78/7OxJqe/sPVkyGyaX30oY6JUKyv5MQWoWD5O3wmYYq+W+B5Y2DL6970Es8EAZaHYkwEAANVnemVlA8P+a13hueHWY2FLDykgGvDcVWlCkOTA4QK2TljiY3r676f0keeGktCXU6vtGFtFWnC0y6vTP0wZKEJb485w==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-Id:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, "Julien Grall" <julien@xxxxxxx>, "Bertrand Marquis" <bertrand.marquis@xxxxxxx>, "Michal Orzel" <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, "Anthony PERARD" <anthony.perard@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, "Timothy Pearson" <tpearson@xxxxxxxxxxxxxxxxxxxxx>, "Alistair Francis" <alistair.francis@xxxxxxx>, "Connor Davis" <connojdavis@xxxxxxxxx>, "Oleksii Kurochko" <oleksii.kurochko@xxxxxxxxx>, "Teddy Astie" <teddy.astie@xxxxxxxxxx>, "Grygorii Strashko" <grygorii_strashko@xxxxxxxx>
  • Delivery-date: Thu, 24 Sep 2026 15:59:17 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed Sep 23, 2026 at 6:19 PM CEST, Jason Andryuk wrote:
> .init.setup, .initcallpresmp.init, and .initcall1.init are duplicated
> across architectures.  Replace them with a common define, SETUP_DATA.
>
> Suggested-by: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
> Signed-off-by: Jason Andryuk <jason.andryuk@xxxxxxx>
> Reviewed-by: Alejandro Vallejo <alejandro.garciavallejo@xxxxxxx>
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> ---
> Alejandro reviewed internally.

In case it matters, I confirm.

Cheers,
Alejandro

> Jan reviewed off list.
> ---
>  xen/arch/arm/xen.lds.S    | 11 +----------
>  xen/arch/ppc/xen.lds.S    | 12 +-----------
>  xen/arch/riscv/xen.lds.S  | 12 +-----------
>  xen/arch/x86/xen.lds.S    | 11 +----------
>  xen/include/xen/xen.lds.h | 12 ++++++++++++
>  5 files changed, 16 insertions(+), 42 deletions(-)
>
> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
> index d4d9594033..32afbfe131 100644
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -135,16 +135,7 @@ SECTIONS
>         *(.init.rodata)
>         *(.init.rodata.*)
>  
> -       . = ALIGN(POINTER_ALIGN);
> -       __setup_start = .;
> -       *(.init.setup)
> -       __setup_end = .;
> -
> -       __initcall_start = .;
> -       *(.initcallpresmp.init)
> -       __presmp_initcall_end = .;
> -       *(.initcall1.init)
> -       __initcall_end = .;
> +       SETUP_DATA
>  
>         . = ALIGN(4);
>         __alt_instructions = .;
> diff --git a/xen/arch/ppc/xen.lds.S b/xen/arch/ppc/xen.lds.S
> index d0f2ed43f1..37256c8865 100644
> --- a/xen/arch/ppc/xen.lds.S
> +++ b/xen/arch/ppc/xen.lds.S
> @@ -107,17 +107,7 @@ SECTIONS
>          *(.init.rodata)
>          *(.init.rodata.*)
>  
> -        . = ALIGN(POINTER_ALIGN);
> -        __setup_start = .;
> -        *(.init.setup)
> -        __setup_end = .;
> -
> -        __initcall_start = .;
> -        *(.initcallpresmp.init)
> -        __presmp_initcall_end = .;
> -        *(.initcall1.init)
> -        __initcall_end = .;
> -
> +        SETUP_DATA
>          LOCK_PROFILE_DATA
>  
>          *(.init.data)
> diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
> index 70db658fef..d9375a9616 100644
> --- a/xen/arch/riscv/xen.lds.S
> +++ b/xen/arch/riscv/xen.lds.S
> @@ -114,17 +114,7 @@ SECTIONS
>          *(.init.rodata)
>          *(.init.rodata.*)
>  
> -        . = ALIGN(POINTER_ALIGN);
> -        __setup_start = .;
> -        *(.init.setup)
> -        __setup_end = .;
> -
> -        __initcall_start = .;
> -        *(.initcallpresmp.init)
> -        __presmp_initcall_end = .;
> -        *(.initcall1.init)
> -        __initcall_end = .;
> -
> +        SETUP_DATA
>          LOCK_PROFILE_DATA
>  
>          *(.init.data)
> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> index b9e888e596..8f943e11ea 100644
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -223,16 +223,7 @@ SECTIONS
>         *(.init.rodata)
>         *(.init.rodata.*)
>  
> -       . = ALIGN(POINTER_ALIGN);
> -       __setup_start = .;
> -       *(.init.setup)
> -       __setup_end = .;
> -
> -       __initcall_start = .;
> -       *(.initcallpresmp.init)
> -       __presmp_initcall_end = .;
> -       *(.initcall1.init)
> -       __initcall_end = .;
> +       SETUP_DATA
>  
>         *(.init.data)
>         *(.init.data.rel)
> diff --git a/xen/include/xen/xen.lds.h b/xen/include/xen/xen.lds.h
> index ea11e3fb62..958f8256b0 100644
> --- a/xen/include/xen/xen.lds.h
> +++ b/xen/include/xen/xen.lds.h
> @@ -179,6 +179,18 @@
>         *(.data.schedulers)           \
>         __end_schedulers_array = .;
>  
> +#define SETUP_DATA                   \
> +       . = ALIGN(POINTER_ALIGN);     \
> +       __setup_start = .;            \
> +       *(.init.setup)                \
> +       __setup_end = .;              \
> +                                     \
> +       __initcall_start = .;         \
> +       *(.initcallpresmp.init)       \
> +       __presmp_initcall_end = .;    \
> +       *(.initcall1.init)            \
> +       __initcall_end = .;
> +
>  #ifdef CONFIG_HYPFS
>  #define HYPFS_PARAM              \
>         . = ALIGN(POINTER_ALIGN); \




 


Rackspace

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