[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] xen: remove init_constructors out of start_xen
- To: boyoun.park@xxxxxxxxxxx
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 3 Aug 2022 09:10:44 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=cpaqcIPRp/SD/qO5v9kDSfLjx6mKTwCIa+UN6oOKuHA=; b=bAoMVxNuc7SxOCULeK4zA6rG459xLDAef2vRjQQfHZ8RMtLmf44OAaYfsYJTScSE8XUnHlY1q5VxS5xf0SMi8XUZJ8UpQULQlPffSXWIaW3o1kd5hZC+I3gQacCfPoMZu7i/mhePAh+jnVEr48tE63RAq10D9AM4w2+ynhIWocMCRH60JCSgdV4CfN2taOr7qEGz4rgYokvfGPdf7x3hmyS4Ig3Qp01dbzlJHKAcbwqSOUt+ch5yFeOqmS/1TTbNF3nyUfRP5F6i35IG787msnrui0XRNBgS/tBNpklCsSdFb4qqgzL6JEX/K8/fJUgMD+2l/KDphMI9473OryZv+g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LD+yuSr64vu8LLe2C0ziPD3djIsPo17xAjrx+ifjm6uUbtoKp0ptTH2h4nARkxZUT5BiD1VqW3WcfAsSIZGnEqKfILt04XdWYkqd7opEC49dUVg8P+91wW31ms/PM9fyi97/HfBGy5F0ooRMkeLHjdEd4IyGOO41/txfR2w7y3FTR4nMsYccOmhbdzQbianlr1VKpj7GFvz4oI/qF/x+Y++i9n/bSGH8pQyKfDEYS8wFB4SC5inXKqvvk+wjK5X04looPhSX+iIuJMZjMKLGC+D5gjCpTeOKc+OsErE+yO842sOJLYoWb04v19MzMSpxAD55yhPPGm9AVl8gl9fV8A==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "julien@xxxxxxx" <julien@xxxxxxx>, "bertrand.marquis@xxxxxxx" <bertrand.marquis@xxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, Chungwoo Park <cww.park@xxxxxxxxxxx>, Gang Li <gang30.li@xxxxxxxxxxx>, Lei Wang <lei19.wang@xxxxxxxxxxx>, SoungKwan Kimn <sk.kimn@xxxxxxxxxxx>, DongJin PARK <djpax.park@xxxxxxxxxxx>, Joonjae Lee <joonjae7.lee@xxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Wed, 03 Aug 2022 07:10:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 03.08.2022 04:44, Boyoun Park wrote:
> From: Boyoun Park <boyoun.park@xxxxxxxxxxx>
> Date: Wed, 3 Aug 2022 10:31:55 +0900
> Subject: [PATCH v2 2/2] xen: remove init_constructors out of start_xen
>
> This patch removed init_constructors from start_xen
> by using __late_initcall.
> It can be applied to other init functions in start_xen
> so that only main init functions are included in there.
Only if the relative order in which they're called doesn't matter. In
fact ...
> To use __late_initcall, the format of a function should
> be changed according to initcall. Thus, the return type
> of init_constructors function is changed in this patch.
... you're changing the point in time when the constructors are called.
This _may_ be fine, but the reason(s) why it is would need supplying in
the description.
> Change-Id: Ife13484d346cff15983aacbfefde21d508f4690a
Please omit such.
> --- a/xen/include/xen/lib.h
> +++ b/xen/include/xen/lib.h
> @@ -211,7 +211,7 @@ extern void add_taint(unsigned int taint);
> struct cpu_user_regs;
> void cf_check dump_execstate(struct cpu_user_regs *);
>
> -void init_constructors(void);
> +int init_constructors(void);
This wants to be removed, with ...
> --- a/xen/lib/ctors.c
> +++ b/xen/lib/ctors.c
> @@ -4,7 +4,7 @@
> typedef void (*ctor_func_t)(void);
> extern const ctor_func_t __ctors_start[], __ctors_end[];
>
> -void __init init_constructors(void)
> +int __init init_constructors(void)
... static added here.
> @@ -12,8 +12,12 @@ void __init init_constructors(void)
>
> /* Putting this here seems as good (or bad) as any other place. */
> BUILD_BUG_ON(sizeof(size_t) != sizeof(ssize_t));
> +
> + return 0;
> }
>
> +__late_initcall(init_constructors);
> +
> /*
> * Local variables:
> * mode: C
We prefer to not leave a blank line between the function referenced by
__initcall et al and the __initcall() itself.
Jan
|