[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] common: re-arrange struct kernel_param fields
commit 7c09fee0b26aaa5bb34e8e08e436978d5711fad6 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Mon Feb 22 17:38:34 2016 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Mon Feb 22 17:38:34 2016 +0100 common: re-arrange struct kernel_param fields Even if placed in .init.* there's no reason to needlessly bloat the binary due to padding fields the compiler needs to insert on 64-bit architectures. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- xen/include/xen/init.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h index 6081102..fd8b614 100644 --- a/xen/include/xen/init.h +++ b/xen/include/xen/init.h @@ -81,34 +81,35 @@ struct kernel_param { OPT_SIZE, OPT_CUSTOM } type; - void *var; unsigned int len; + void *var; }; extern struct kernel_param __setup_start, __setup_end; #define __setup_str static __initdata __attribute__((__aligned__(1))) char -#define __kparam static __initsetup struct kernel_param +#define __kparam static __initsetup \ + __attribute__((__aligned__(sizeof(void *)))) struct kernel_param #define custom_param(_name, _var) \ __setup_str __setup_str_##_var[] = _name; \ - __kparam __setup_##_var = { __setup_str_##_var, OPT_CUSTOM, _var, 0 } + __kparam __setup_##_var = { __setup_str_##_var, OPT_CUSTOM, 0, _var } #define boolean_param(_name, _var) \ __setup_str __setup_str_##_var[] = _name; \ __kparam __setup_##_var = \ - { __setup_str_##_var, OPT_BOOL, &_var, sizeof(_var) } + { __setup_str_##_var, OPT_BOOL, sizeof(_var), &_var } #define integer_param(_name, _var) \ __setup_str __setup_str_##_var[] = _name; \ __kparam __setup_##_var = \ - { __setup_str_##_var, OPT_UINT, &_var, sizeof(_var) } + { __setup_str_##_var, OPT_UINT, sizeof(_var), &_var } #define size_param(_name, _var) \ __setup_str __setup_str_##_var[] = _name; \ __kparam __setup_##_var = \ - { __setup_str_##_var, OPT_SIZE, &_var, sizeof(_var) } + { __setup_str_##_var, OPT_SIZE, sizeof(_var), &_var } #define string_param(_name, _var) \ __setup_str __setup_str_##_var[] = _name; \ __kparam __setup_##_var = \ - { __setup_str_##_var, OPT_STR, &_var, sizeof(_var) } + { __setup_str_##_var, OPT_STR, sizeof(_var), &_var } #endif /* __ASSEMBLY__ */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |