From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xenproject.org
Cc: stefano.stabellini@citrix.com,
Daniel De Graaf <dgdegra@tycho.nsa.gov>,
Julien Grall <julien.grall@linaro.org>,
tim@xen.org, ian.campbell@citrix.com
Subject: [PATCH v4 2/4] xen/xsm: Add xsm_core_init function
Date: Fri, 21 Mar 2014 15:22:12 +0000 [thread overview]
Message-ID: <1395415334-31538-3-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1395415334-31538-1-git-send-email-julien.grall@linaro.org>
This function contains non-specific architecture code (mostly the tail of
xsm_multiboot_init). It will be used later to avoid code duplication.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
---
Changes in v2:
- Patch added
---
xen/xsm/xsm_core.c | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/xen/xsm/xsm_core.c b/xen/xsm/xsm_core.c
index 11a9ca7..24b0ff4 100644
--- a/xen/xsm/xsm_core.c
+++ b/xen/xsm/xsm_core.c
@@ -43,6 +43,21 @@ static void __init do_xsm_initcalls(void)
}
}
+static int __init xsm_core_init(void)
+{
+ if ( verify(&dummy_xsm_ops) )
+ {
+ printk("%s could not verify "
+ "dummy_xsm_ops structure.\n", __FUNCTION__);
+ return -EIO;
+ }
+
+ xsm_ops = &dummy_xsm_ops;
+ do_xsm_initcalls();
+
+ return 0;
+}
+
#ifdef CONFIG_MULTIBOOT
int __init xsm_multiboot_init(unsigned long *module_map,
const multiboot_info_t *mbi,
@@ -63,16 +78,7 @@ int __init xsm_multiboot_init(unsigned long *module_map,
}
}
- if ( verify(&dummy_xsm_ops) )
- {
- bootstrap_map(NULL);
- printk("%s could not verify "
- "dummy_xsm_ops structure.\n", __FUNCTION__);
- return -EIO;
- }
-
- xsm_ops = &dummy_xsm_ops;
- do_xsm_initcalls();
+ ret = xsm_core_init();
bootstrap_map(NULL);
return 0;
--
1.7.10.4
next prev parent reply other threads:[~2014-03-21 15:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 15:22 [PATCH v4 0/4] xen/arm: Add support for XSM Julien Grall
2014-03-21 15:22 ` [PATCH v4 1/4] xen/xsm: Don't use multiboot by default to initialize XSM Julien Grall
2014-03-21 15:22 ` Julien Grall [this message]
2014-03-21 15:22 ` [PATCH v4 3/4] xen/xsm: Add support for device tree Julien Grall
2014-03-21 16:57 ` Ian Campbell
2014-03-21 15:22 ` [PATCH v4 4/4] xen/arm: Add support for XSM Julien Grall
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=1395415334-31538-3-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=dgdegra@tycho.nsa.gov \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.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).