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] [pushed] [ppc] make pruning by path an OFD global function

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [pushed] [ppc] make pruning by path an OFD global function
From: jimix@xxxxxxxxxxxxxx
Date: Fri, 19 May 2006 07:05:08 -0400
Delivery-date: Fri, 19 May 2006 04:03:07 -0700
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>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
changeset:   10291:953fd3f66b0015c8883815c89549fda1e920b4da
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Thu May 18 13:57:33 2006 -0400
files:       xen/arch/ppc/of-devtree.c xen/arch/ppc/ofd_fixup.c 
xen/include/public/of-devtree.h
description:
[ppc] make pruning by path an OFD global function


diff -r a9f1f041083927b7e8e3c9496dc1cdc36acb8960 -r 
953fd3f66b0015c8883815c89549fda1e920b4da xen/arch/ppc/of-devtree.c
--- a/xen/arch/ppc/of-devtree.c Thu May 18 13:27:35 2006 -0400
+++ b/xen/arch/ppc/of-devtree.c Thu May 18 13:57:33 2006 -0400
@@ -394,6 +394,17 @@ int ofd_node_prune(void *mem, ofdn_t nod
     return 1;
 }
 
+ofdn_t ofd_prune_path(void *m, const char *path)
+{
+    ofdn_t n;
+    int rc = -1;
+    while ((n = ofd_node_find(m, path)) > 0) {
+        rc = ofd_node_prune(m, n);
+    }
+
+    return rc;
+}
+
 ofdn_t ofd_node_child_create(
     void *mem, ofdn_t parent, const char *path, size_t pathlen)
 {
diff -r a9f1f041083927b7e8e3c9496dc1cdc36acb8960 -r 
953fd3f66b0015c8883815c89549fda1e920b4da xen/arch/ppc/ofd_fixup.c
--- a/xen/arch/ppc/ofd_fixup.c  Thu May 18 13:27:35 2006 -0400
+++ b/xen/arch/ppc/ofd_fixup.c  Thu May 18 13:57:33 2006 -0400
@@ -456,17 +456,6 @@ static ofdn_t ofd_xen_props(void *m, str
     return n;
 }
 
-static ofdn_t ofd_prune(void *m, const char *devspec)
-{
-    ofdn_t n;
-    int rc = -1;
-    while ((n = ofd_node_find(m, devspec)) > 0) {
-        rc = ofd_node_prune(m, n);
-    }
-
-    return rc;
-}
-
 int ofd_dom0_fixup(struct domain *d, ulong mem, start_info_t *si, ulong eoload)
 {
     void *m;
@@ -505,10 +494,10 @@ int ofd_dom0_fixup(struct domain *d, ulo
     ofd_xen_props(m, d, si);
 
     printk("Remove original /dart\n");
-    ofd_prune(m, "/dart");
+    ofd_prune_path(m, "/dart");
 
     printk("Remove original /rtas\n");
-    ofd_prune(m, "/rtas");
+    ofd_prune_path(m, "/rtas");
 
 #ifdef RTAS
     printk("Create a new RTAS with just enough stuff to convince "
diff -r a9f1f041083927b7e8e3c9496dc1cdc36acb8960 -r 
953fd3f66b0015c8883815c89549fda1e920b4da xen/include/public/of-devtree.h
--- a/xen/include/public/of-devtree.h   Thu May 18 13:27:35 2006 -0400
+++ b/xen/include/public/of-devtree.h   Thu May 18 13:57:33 2006 -0400
@@ -93,6 +93,7 @@ extern ofdn_t ofd_node_find(void *mem, c
 extern ofdn_t ofd_node_find(void *mem, const char *devspec);
 extern ofdn_t ofd_node_add(void *m, ofdn_t n, const char *path, size_t sz);
 extern int ofd_node_prune(void *m, ofdn_t n);
+extern int ofd_prune_path(void *m, const char *path);
 extern ofdn_t ofd_node_io(void *mem, ofdn_t n);
 
 extern ofdn_t ofd_nextprop(void *mem, ofdn_t n, const char *prev, char *name);



_______________________________________________
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] [pushed] [ppc] make pruning by path an OFD global function, jimix <=