On 03.08.2022 04:44, Boyoun Park wrote: > From: Boyoun Park <boyoun.p...@samsung.com> > 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