WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [linux-ppc-2.6] [POWERPC][XEN][LINUX] Always construct a start_

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [linux-ppc-2.6] [POWERPC][XEN][LINUX] Always construct a start_info_t from device tree properties.
From: "Xen patchbot-linux-ppc-2.6" <patchbot-linux-ppc-2.6@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Mar 2007 12:50:38 -0800
Delivery-date: Fri, 02 Mar 2007 05:25:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1172781585 21600
# Node ID 7638780944199b7dad6cc4f017e26cde99f0e695
# Parent  3e512eaf2a6f0f740331bc891fbc0a29392a2794
[POWERPC][XEN][LINUX] Always construct a start_info_t from device tree 
properties.
Xen used to create one for Dom0, but no longer.
Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
---
 arch/powerpc/platforms/xen/setup.c |   35 ++++++++++++++++-------------------
 1 files changed, 16 insertions(+), 19 deletions(-)

diff -r 3e512eaf2a6f -r 763878094419 arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Thu Mar 01 10:27:39 2007 -0600
+++ b/arch/powerpc/platforms/xen/setup.c        Thu Mar 01 14:39:45 2007 -0600
@@ -32,7 +32,7 @@ EXPORT_SYMBOL(HYPERVISOR_shared_info);
 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 
 /* Raw start-of-day parameters from the hypervisor. */
-start_info_t xsi;
+static start_info_t xsi;
 start_info_t *xen_start_info;
 EXPORT_SYMBOL(xen_start_info);
 
@@ -89,29 +89,26 @@ static void __init xen_init_early(void)
 static void __init xen_init_early(void)
 {
        struct device_node *xen;
-       u64 *si;
 
        DBG(" -> %s\n", __func__);
 
        xen = of_find_node_by_path("/xen");
 
-       si = (u64 *)get_property(xen, "start-info", NULL);
-
-       /* build our own start_info_t if start-info property is not present */
-       if (si != NULL) {
-               xen_start_info = (start_info_t *)__va(*si);
-       } else {
-               struct device_node *console;
-               struct device_node *store;
-
-               console = of_find_node_by_path("/xen/console");
-               store = of_find_node_by_path("/xen/store");
-
-               xen_start_info = &xsi;
-
-               /* fill out start_info_t from devtree */
-               xen_start_info->shared_info = *((u64 *)get_property(xen, 
-                  "shared-info", NULL));
+       xen_start_info = &xsi;
+
+       /* fill out start_info_t from devtree */
+       if ((char *)get_property(xen, "privileged", NULL))
+               xen_start_info->flags |= SIF_PRIVILEGED;
+       if ((char *)get_property(xen, "initdomain", NULL))
+               xen_start_info->flags |= SIF_INITDOMAIN;
+       xen_start_info->shared_info = *((u64 *)get_property(xen, 
+          "shared-info", NULL));
+
+       /* only look for store and console for guest domains */
+       if (xen_start_info->flags == 0) {
+               struct device_node *console = 
of_find_node_by_path("/xen/console");
+               struct device_node *store = of_find_node_by_path("/xen/store");
+
                xen_start_info->store_mfn = (*((u64 *)get_property(store,
                   "reg", NULL))) >> PAGE_SHIFT;
                xen_start_info->store_evtchn = *((u32 *)get_property(store,

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [linux-ppc-2.6] [POWERPC][XEN][LINUX] Always construct a start_info_t from device tree properties., Xen patchbot-linux-ppc-2.6 <=