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]

changeset:   9707:e5f8a390fd700c15b9b48a00fabe0aedda3dc47a
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Thu Mar 30 08:29:13 2006 -0500
files:       xen/Rules.mk xen/arch/ppc/Makefile xen/arch/ppc/Rules.mk 
xen/arch/ppc/ofd_fixup.c
description:
Do not add PAPR vterm and /vdevice nodes if not configed

If the PAPR vterm hcalls are not supported then make sure they are not
in the devtree so Dom0 does not instantiate the vterm driver.


diff -r 608a66128e677636142e204adfda02b6014f1a76 -r 
e5f8a390fd700c15b9b48a00fabe0aedda3dc47a xen/Rules.mk
--- a/xen/Rules.mk      Wed Mar 29 16:21:48 2006 -0600
+++ b/xen/Rules.mk      Thu Mar 30 08:29:13 2006 -0500
@@ -57,6 +57,8 @@ CFLAGS-y               += -DMAX_PHYS_CPU
 CFLAGS-y               += -DMAX_PHYS_CPUS=$(max_phys_cpus)
 endif
 
+AFLAGS := -D__ASSEMBLY__
+
 ALL_OBJS := $(ALL_OBJS-y)
 CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y))
 
@@ -64,4 +66,4 @@ CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y
        $(CC) $(CFLAGS) -c $< -o $@
 
 %.o: %.S $(HDRS) Makefile
-       $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
+       $(CC) $(CFLAGS) $(AFLAGS) -c $< -o $@
diff -r 608a66128e677636142e204adfda02b6014f1a76 -r 
e5f8a390fd700c15b9b48a00fabe0aedda3dc47a xen/arch/ppc/Makefile
--- a/xen/arch/ppc/Makefile     Wed Mar 29 16:21:48 2006 -0600
+++ b/xen/arch/ppc/Makefile     Thu Mar 30 08:29:13 2006 -0500
@@ -40,7 +40,7 @@ obj-y += papr/debug.o
 obj-y += papr/debug.o
 obj-y += papr/tce.o
 obj-y += papr/vtce.o
-#obj-y += papr/vterm.o
+obj-$(papr_vterm) += papr/vterm.o
 obj-y += papr/xlate.o
 
 obj-$(debug) += 0opt.o
diff -r 608a66128e677636142e204adfda02b6014f1a76 -r 
e5f8a390fd700c15b9b48a00fabe0aedda3dc47a xen/arch/ppc/Rules.mk
--- a/xen/arch/ppc/Rules.mk     Wed Mar 29 16:21:48 2006 -0600
+++ b/xen/arch/ppc/Rules.mk     Thu Mar 30 08:29:13 2006 -0500
@@ -10,7 +10,8 @@ CFLAGS += -I$(BASEDIR)/include/asm-ppc/m
 CFLAGS += -I$(BASEDIR)/include/asm-ppc/mach-default
 CFLAGS += -Wpointer-arith -Wredundant-decls
 CFLAGS += -msoft-float -O2
-CFLAGS-$(debug) += -g -O0 # last one wins
+CFLAGS-$(debug) += -O0 # last one wins
+CFLAGS-$(papr_vterm) += -DPAPR_VDEVICE -DPAPR_VTERM
 
 #
 # command to embed a binary inside a .o
diff -r 608a66128e677636142e204adfda02b6014f1a76 -r 
e5f8a390fd700c15b9b48a00fabe0aedda3dc47a xen/arch/ppc/ofd_fixup.c
--- a/xen/arch/ppc/ofd_fixup.c  Wed Mar 29 16:21:48 2006 -0600
+++ b/xen/arch/ppc/ofd_fixup.c  Thu Mar 30 08:29:13 2006 -0500
@@ -24,6 +24,7 @@
 #include <public/xen.h>
 #include <public/of-devtree.h>
 
+#ifdef PAPR_VTERM
 static ofdn_t ofd_vdevice_vty(void *m, ofdn_t p, struct domain *d)
 {
     ofdn_t n;
@@ -51,7 +52,9 @@ static ofdn_t ofd_vdevice_vty(void *m, o
 
     return n;
 }
-
+#endif
+
+#ifdef PAPR_VDEVICE
 static ofdn_t ofd_vdevice(void *m, struct domain *d)
 {
     ofdn_t n;
@@ -63,7 +66,6 @@ static ofdn_t ofd_vdevice(void *m, struc
     n = ofd_node_add(m, OFD_ROOT, path, sizeof (path));
 
     if (n > 0) {
-        ofdn_t r;
 
         ofd_prop_add(m, n, "name", name, sizeof (name));
         val = 1;
@@ -75,13 +77,18 @@ static ofdn_t ofd_vdevice(void *m, struc
         ofd_prop_add(m, n, "device_type", name, sizeof (name));
         ofd_prop_add(m, n, "interupt-controller", NULL, 0);
 
+#ifdef PAPR_VDEVICE
+        ofdn_t r;
+
         /* add vty */
         r = ofd_vdevice_vty(m, n, d);
         printk("vdevice r: %x\n", r);
         n = r;
-    }
-    return n;
-}
+#endif
+    }
+    return n;
+}
+#endif
 
 static ofdn_t ofd_openprom_props(void *m)
 {
@@ -103,21 +110,23 @@ static ofdn_t ofd_openprom_props(void *m
 
 }
 
+#ifdef PAPR_VTERM
 static ofdn_t ofd_aliases_props(void *m)
 {
     static const char path[] = "/aliases";
-    static const char vty[] = "/vdevice/vty@0";
-    ofdn_t n;
-
-    n = ofd_node_find(m, path);
-    if (n == 0) {
-        n = ofd_node_add(m, OFD_ROOT, path, sizeof (path));
-        ofd_prop_add(m, n, "name",
-                     &path[1], sizeof (path) - 1);
-    }
-    ofd_prop_add(m, n, "screen", vty, sizeof(vty));
-    return n;
-}
+    static const char screen[] = "/vdevice/vty@0";
+    ofdn_t n;
+
+    n = ofd_node_find(m, path);
+    if (n == 0) {
+        n = ofd_node_add(m, OFD_ROOT, path, sizeof (path));
+        ofd_prop_add(m, n, "name",
+                     &path[1], sizeof (path) - 1);
+    }
+    ofd_prop_add(m, n, "screen", screen, sizeof(screen));
+    return n;
+}
+#endif
 
 static ofdn_t ofd_options_props(void *m)
 {
@@ -242,7 +251,7 @@ static ofdn_t ofd_chosen_props(void *m, 
     ofdn_t n;
     ofdn_t p;
     static const char path[] = "/chosen";
-    static const char console[] = " console=ttyS0 ";// " console=hvc0 ";
+    static const char console[] = " console=ttyS0 ";
     char bootargs[256];
     int bsz;
     int sz;
@@ -465,14 +474,16 @@ int ofd_dom0_fixup(struct domain *d, ulo
 
     m = (void *)mem;
 
+#ifdef PAPR_VDEVICE
     printk("Add /vdevice\n");
     ofd_vdevice(m, d);
 
+    printk("Add /aliases props\n");
+    ofd_aliases_props(m);
+#endif
+
     printk("Add /openprom props\n");
     ofd_openprom_props(m);
-
-    printk("Add /aliases props\n");
-    ofd_aliases_props(m);
 
     printk("Add /options props\n");
     ofd_options_props(m);



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

<Prev in Thread] Current Thread [Next in Thread>