xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Daniel De Graaf <dgdegra@tycho.nsa.gov>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Julien Grall <julien.grall@arm.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: [PATCH] xen/xsm: Annotate xsm_initcall() data as const
Date: Thu, 9 Jun 2016 10:58:54 +0100	[thread overview]
Message-ID: <1465466335-19761-2-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1465466335-19761-1-git-send-email-andrew.cooper3@citrix.com>

Additionally, link it adjacently to the other constant init data.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Daniel De Graaf <dgdegra@tycho.nsa.gov>
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Julien Grall <julien.grall@arm.com>
---
 xen/arch/arm/xen.lds.S | 9 ++++-----
 xen/arch/x86/xen.lds.S | 9 ++++-----
 xen/include/xsm/xsm.h  | 2 +-
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 0ad2ad9..ff621b6 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -141,6 +141,10 @@ SECTIONS
        *(.init.setup)
        __setup_end = .;
 
+       __xsm_initcall_start = .;
+       *(.xsm_initcall.init)
+       __xsm_initcall_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -163,11 +167,6 @@ SECTIONS
        *(.initcall1.init)
        __initcall_end = .;
   } :text
-  .xsm_initcall.init : {
-       __xsm_initcall_start = .;
-       *(.xsm_initcall.init)
-       __xsm_initcall_end = .;
-  } :text
   __init_end_efi = .;
   . = ALIGN(STACK_SIZE);
   __init_end = .;
diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S
index e506714..301fd8c 100644
--- a/xen/arch/x86/xen.lds.S
+++ b/xen/arch/x86/xen.lds.S
@@ -158,6 +158,10 @@ SECTIONS
        *(.init.setup)
        __setup_end = .;
 
+       __xsm_initcall_start = .;
+       *(.xsm_initcall.init)
+       __xsm_initcall_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -191,11 +195,6 @@ SECTIONS
        *(.initcall1.init)
        __initcall_end = .;
   } :text
-  .xsm_initcall.init : {
-       __xsm_initcall_start = .;
-       *(.xsm_initcall.init)
-       __xsm_initcall_end = .;
-  } :text
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h
index 8ed8ee5..c1aa69c 100644
--- a/xen/include/xsm/xsm.h
+++ b/xen/include/xsm/xsm.h
@@ -51,7 +51,7 @@ typedef void (*xsm_initcall_t)(void);
 extern xsm_initcall_t __xsm_initcall_start[], __xsm_initcall_end[];
 
 #define xsm_initcall(fn) \
-    static xsm_initcall_t __initcall_##fn \
+    static const xsm_initcall_t __initcall_##fn \
     __used_section(".xsm_initcall.init") = fn
 
 struct xsm_operations {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2016-06-09  9:58 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 ` Andrew Cooper [this message]
2016-06-09 12:40   ` [PATCH] xen/xsm: Annotate xsm_initcall() data " 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 ` [PATCH] xen/init: Annotate all command line parameter infrastructure as const Andrew Cooper
2016-06-09 12:39 ` 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=1465466335-19761-2-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=dgdegra@tycho.nsa.gov \
    --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).