From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH] xen/init: Annotate all command line parameter infrastructure as const
Date: Thu, 9 Jun 2016 11:03:17 +0100 [thread overview]
Message-ID: <57593EE5.8000601@citrix.com> (raw)
In-Reply-To: <1465466335-19761-1-git-send-email-andrew.cooper3@citrix.com>
CC'ing Stefano's correct address. (This patch pre-dates quite a lot of
recent changes).
On 09/06/16 10:58, Andrew Cooper wrote:
> There is no reason for any of it to be modified. Additionally, link
> .init.setup beside the other constant .init data.
>
> While editing this area, correct the types used in the extern
> declarations for __setup_start and __setup_end to match the types the
> linker actually produces.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Stefano Stabellini <stefano.stabellini@citrix.com>
> CC: Julien Grall <julien.grall@arm.com>
> ---
> xen/arch/arm/xen.lds.S | 11 ++++++-----
> xen/arch/x86/xen.lds.S | 11 ++++++-----
> xen/common/kernel.c | 2 +-
> xen/include/xen/init.h | 7 ++++---
> 4 files changed, 17 insertions(+), 14 deletions(-)
>
> diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
> index 76982b2..0ad2ad9 100644
> --- a/xen/arch/arm/xen.lds.S
> +++ b/xen/arch/arm/xen.lds.S
> @@ -135,6 +135,12 @@ SECTIONS
> *(.init.rodata)
> *(.init.rodata.rel)
> *(.init.rodata.str*)
> +
> + . = ALIGN(POINTER_ALIGN);
> + __setup_start = .;
> + *(.init.setup)
> + __setup_end = .;
> +
> *(.init.data)
> *(.init.data.rel)
> *(.init.data.rel.*)
> @@ -145,11 +151,6 @@ SECTIONS
> __ctors_end = .;
> } :text
> . = ALIGN(32);
> - .init.setup : {
> - __setup_start = .;
> - *(.init.setup)
> - __setup_end = .;
> - } :text
> .init.proc.info : {
> __proc_info_start = .;
> *(.init.proc.info)
> diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
> index a43b29d..e506714 100644
> --- a/xen/arch/x86/xen.lds.S
> +++ b/xen/arch/x86/xen.lds.S
> @@ -152,6 +152,12 @@ SECTIONS
> *(.init.rodata)
> *(.init.rodata.rel)
> *(.init.rodata.str*)
> +
> + . = ALIGN(POINTER_ALIGN);
> + __setup_start = .;
> + *(.init.setup)
> + __setup_end = .;
> +
> *(.init.data)
> *(.init.data.rel)
> *(.init.data.rel.*)
> @@ -178,11 +184,6 @@ SECTIONS
> __ctors_end = .;
> } :text
> . = ALIGN(32);
> - .init.setup : {
> - __setup_start = .;
> - *(.init.setup)
> - __setup_end = .;
> - } :text
> .initcall.init : {
> __initcall_start = .;
> *(.initcallpresmp.init)
> diff --git a/xen/common/kernel.c b/xen/common/kernel.c
> index 1a6823a..6f785bb 100644
> --- a/xen/common/kernel.c
> +++ b/xen/common/kernel.c
> @@ -96,7 +96,7 @@ void __init cmdline_parse(const char *cmdline)
> if ( !bool_assert )
> optkey += 3;
>
> - for ( param = &__setup_start; param < &__setup_end; param++ )
> + for ( param = __setup_start; param < __setup_end; param++ )
> {
> if ( strcmp(param->name, optkey) )
> {
> diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
> index 671ac81..9d7a080 100644
> --- a/xen/include/xen/init.h
> +++ b/xen/include/xen/init.h
> @@ -86,10 +86,11 @@ struct kernel_param {
> void *var;
> };
>
> -extern struct kernel_param __setup_start, __setup_end;
> +extern struct kernel_param __setup_start[], __setup_end[];
>
> -#define __setup_str static __initdata __attribute__((__aligned__(1))) char
> -#define __kparam static __initsetup \
> +#define __setup_str static const __initconstrel \
> + __attribute__((__aligned__(1))) char
> +#define __kparam static const __initsetup \
> __attribute__((__aligned__(sizeof(void *)))) struct kernel_param
>
> #define custom_param(_name, _var) \
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-06-09 10:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-09 9:58 [PATCH] xen/init: Annotate all command line parameter infrastructure as const Andrew Cooper
2016-06-09 9:58 ` [PATCH] xen/xsm: Annotate xsm_initcall() data " Andrew Cooper
2016-06-09 12:40 ` Jan Beulich
2016-06-09 14:26 ` Daniel De Graaf
2016-06-09 14:28 ` Andrew Cooper
2016-06-09 9:58 ` [PATCH] x86/boot: copy/clear sections more efficiently Andrew Cooper
2016-06-09 12:42 ` Jan Beulich
2016-06-09 10:03 ` Andrew Cooper [this message]
2016-06-09 12:39 ` [PATCH] xen/init: Annotate all command line parameter infrastructure as const Jan Beulich
2016-06-09 13:45 ` Andrew Cooper
2016-06-09 14:19 ` Julien Grall
2016-06-09 14:20 ` Julien Grall
2016-06-09 14:28 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57593EE5.8000601@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=julien.grall@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).