All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: julien.grall@arm.com
Cc: artem_mygaiev@epam.com, Stefano Stabellini <stefanos@xilinx.com>,
	sstabellini@kernel.org, andrii_anisov@epam.com,
	xen-devel@lists.xen.org
Subject: [PATCH RFC 05/15] xen/arm: rename acpi_make_chosen_node to make_chosen_node
Date: Wed, 13 Jun 2018 15:15:08 -0700	[thread overview]
Message-ID: <1528928118-14960-5-git-send-email-sstabellini@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.10.1806131457490.14695@sstabellini-ThinkPad-X260>

acpi_make_chosen_node is actually generic and can be reused. Rename it
to make_chosen_node and make it available to non-ACPI builds.

Signed-off-by: Stefano Stabellini <stefanos@xilinx.com>
---
 xen/arch/arm/domain_build.c | 84 ++++++++++++++++++++++-----------------------
 1 file changed, 42 insertions(+), 42 deletions(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index bb88e09..4e4cd19 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -935,6 +935,47 @@ static int make_timer_node(const struct domain *d, void *fdt,
     return res;
 }
 
+static int make_chosen_node(const struct kernel_info *kinfo)
+{
+    int res;
+    const char *bootargs = NULL;
+    const struct bootmodule *mod = kinfo->kernel_bootmodule;
+    void *fdt = kinfo->fdt;
+
+    dt_dprintk("Create chosen node\n");
+    res = fdt_begin_node(fdt, "chosen");
+    if ( res )
+        return res;
+
+    if ( mod && mod->cmdline[0] )
+    {
+        bootargs = &mod->cmdline[0];
+        res = fdt_property(fdt, "bootargs", bootargs, strlen(bootargs) + 1);
+        if ( res )
+           return res;
+    }
+
+    /*
+     * If the bootloader provides an initrd, we must create a placeholder
+     * for the initrd properties. The values will be replaced later.
+     */
+    if ( mod && mod->size )
+    {
+        u64 a = 0;
+        res = fdt_property(kinfo->fdt, "linux,initrd-start", &a, sizeof(a));
+        if ( res )
+            return res;
+
+        res = fdt_property(kinfo->fdt, "linux,initrd-end", &a, sizeof(a));
+        if ( res )
+            return res;
+    }
+
+    res = fdt_end_node(fdt);
+
+    return res;
+}
+
 static int map_irq_to_domain(struct domain *d, unsigned int irq,
                              bool need_mapping, const char *devname)
 
@@ -1420,47 +1461,6 @@ static int acpi_route_spis(struct domain *d)
     return 0;
 }
 
-static int acpi_make_chosen_node(const struct kernel_info *kinfo)
-{
-    int res;
-    const char *bootargs = NULL;
-    const struct bootmodule *mod = kinfo->kernel_bootmodule;
-    void *fdt = kinfo->fdt;
-
-    dt_dprintk("Create chosen node\n");
-    res = fdt_begin_node(fdt, "chosen");
-    if ( res )
-        return res;
-
-    if ( mod && mod->cmdline[0] )
-    {
-        bootargs = &mod->cmdline[0];
-        res = fdt_property(fdt, "bootargs", bootargs, strlen(bootargs) + 1);
-        if ( res )
-           return res;
-    }
-
-    /*
-     * If the bootloader provides an initrd, we must create a placeholder
-     * for the initrd properties. The values will be replaced later.
-     */
-    if ( mod && mod->size )
-    {
-        u64 a = 0;
-        res = fdt_property(kinfo->fdt, "linux,initrd-start", &a, sizeof(a));
-        if ( res )
-            return res;
-
-        res = fdt_property(kinfo->fdt, "linux,initrd-end", &a, sizeof(a));
-        if ( res )
-            return res;
-    }
-
-    res = fdt_end_node(fdt);
-
-    return res;
-}
-
 static int acpi_make_hypervisor_node(const struct kernel_info *kinfo,
                                      struct membank tbl_add[])
 {
@@ -1532,7 +1532,7 @@ static int create_acpi_dtb(struct kernel_info *kinfo, struct membank tbl_add[])
         return ret;
 
     /* Create a chosen node for DOM0 */
-    ret = acpi_make_chosen_node(kinfo);
+    ret = make_chosen_node(kinfo);
     if ( ret )
         goto err;
 
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-06-13 22:15 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-13 22:15 [PATCH RFC 00/15] dom0less step1: boot multiple domains from device tree Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 01/15] xen: allow console_io hypercalls from DomUs on ARM Stefano Stabellini
2018-06-14 15:33   ` Julien Grall
2018-06-13 22:15 ` [PATCH RFC 02/15] xen/arm: move a few guest related #defines to public/arch-arm.h Stefano Stabellini
2018-06-14 15:36   ` Julien Grall
2018-06-14 21:15     ` Stefano Stabellini
2018-06-15 16:21       ` Julien Grall
2018-07-02 20:37         ` Stefano Stabellini
2018-07-02 21:13           ` Julien Grall
2018-07-02 21:38             ` Stefano Stabellini
2018-07-03 10:22               ` Julien Grall
2018-07-03 21:30                 ` Stefano Stabellini
2018-07-04  7:20                   ` Julien Grall
2018-06-27 14:11   ` Wei Liu
2018-06-13 22:15 ` [PATCH RFC 03/15] xen/arm: extend device tree based multiboot protocol Stefano Stabellini
2018-06-14 16:07   ` Julien Grall
2018-07-02 21:31     ` Stefano Stabellini
2018-07-03  9:35       ` Edgar E. Iglesias
2018-07-03 22:23         ` Stefano Stabellini
2018-07-03 10:40       ` Julien Grall
2018-07-03 22:16         ` Stefano Stabellini
2018-07-04 16:27           ` Julien Grall
2018-06-13 22:15 ` [PATCH RFC 04/15] xen/arm: do not pass dt_host to make_memory_node and make_hypervisor_node Stefano Stabellini
2018-06-14 16:10   ` Julien Grall
2018-06-14 21:24     ` Stefano Stabellini
2018-06-13 22:15 ` Stefano Stabellini [this message]
2018-06-14 16:16   ` [PATCH RFC 05/15] xen/arm: rename acpi_make_chosen_node to make_chosen_node Julien Grall
2018-06-14 22:01     ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 06/15] xen/arm: add BOOTMOD_DOMU_KERNEL/RAMDISK Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 07/15] xen/arm: increase MAX_MODULES Stefano Stabellini
2018-07-06  2:10   ` Doug Goldstein
2018-07-06 10:17     ` Julien Grall
2018-06-13 22:15 ` [PATCH RFC 08/15] xen/arm: probe domU kernels and initrds Stefano Stabellini
2018-06-14 16:45   ` Julien Grall
2018-07-05 20:38     ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 09/15] xen/arm: refactor construct_dom0 Stefano Stabellini
2018-06-14 17:16   ` Julien Grall
2018-06-14 23:35     ` Stefano Stabellini
2018-06-15 16:32       ` Julien Grall
2018-07-05 20:55         ` Stefano Stabellini
2018-07-05 21:06           ` Julien Grall
2018-07-06 23:11             ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 10/15] xen/arm: introduce construct_domU Stefano Stabellini
2018-06-14 17:25   ` Julien Grall
2018-07-05 23:00     ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 11/15] xen/arm: generate a simple device tree for domUs Stefano Stabellini
2018-06-14 18:13   ` Julien Grall
2018-07-05 23:59     ` Stefano Stabellini
2018-07-06 10:22       ` Julien Grall
2018-07-06 16:16         ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 12/15] xen/arm: generate vpl011 node on device tree for domU Stefano Stabellini
2018-06-15 16:58   ` Julien Grall
2018-07-06 17:11     ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 13/15] xen/arm: Allow vpl011 to be used by DomU Stefano Stabellini
2018-06-15 17:38   ` Julien Grall
2018-07-06 23:10     ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 14/15] xen/arm: call construct_domU from start_xen and start DomU VMs Stefano Stabellini
2018-06-15 18:24   ` Julien Grall
2018-07-06 23:11     ` Stefano Stabellini
2018-07-09 12:48       ` Julien Grall
2018-07-09 20:59         ` Stefano Stabellini
2018-07-09 21:06           ` Julien Grall
2018-07-09 21:23             ` Stefano Stabellini
2018-06-13 22:15 ` [PATCH RFC 15/15] xen: support console_switching between Dom0 and DomUs on ARM Stefano Stabellini
2018-06-14 19:08 ` [PATCH RFC 00/15] dom0less step1: boot multiple domains from device tree Edgar E. Iglesias
2018-06-14 20:34   ` Stefano Stabellini

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=1528928118-14960-5-git-send-email-sstabellini@kernel.org \
    --to=sstabellini@kernel.org \
    --cc=andrii_anisov@epam.com \
    --cc=artem_mygaiev@epam.com \
    --cc=julien.grall@arm.com \
    --cc=stefanos@xilinx.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.