From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 3/3] xen/init: Annotate all command line parameter infrastructure as const Date: Mon, 8 Feb 2016 17:07:47 +0000 Message-ID: <1454951267-30034-3-git-send-email-andrew.cooper3@citrix.com> References: <1454951267-30034-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1454951267-30034-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Stefano Stabellini , Tim Deegan , Ian Campbell , Jan Beulich List-Id: xen-devel@lists.xenproject.org There is no reason for any of it to be modified. Additionally, link .init.setup beside the other constant .init data. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Tim Deegan CC: Ian Campbell CC: Stefano Stabellini --- xen/arch/arm/xen.lds.S | 11 ++++++----- xen/arch/x86/xen.lds.S | 11 ++++++----- xen/include/xen/init.h | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index f501a2f..0e2c582 100644 --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -115,6 +115,12 @@ SECTIONS .init.data : { *(.init.rodata) *(.init.rodata.str*) + + . = ALIGN(32); + __setup_start = .; + *(.init.setup) + __setup_end = .; + *(.init.data) *(.init.data.rel) *(.init.data.rel.*) @@ -125,11 +131,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 c1ce027..86905c8 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -120,6 +120,12 @@ SECTIONS .init.data : { *(.init.rodata) *(.init.rodata.str*) + + . = ALIGN(32); + __setup_start = .; + *(.init.setup) + __setup_end = .; + *(.init.data) *(.init.data.rel) *(.init.data.rel.*) @@ -146,11 +152,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/include/xen/init.h b/xen/include/xen/init.h index 6081102..142c5c8 100644 --- a/xen/include/xen/init.h +++ b/xen/include/xen/init.h @@ -87,8 +87,8 @@ struct kernel_param { 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 __setup_str static const __initconst __attribute__((__aligned__(1))) char +#define __kparam static const __initsetup struct kernel_param #define custom_param(_name, _var) \ __setup_str __setup_str_##_var[] = _name; \ -- 2.1.4