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] [xenppc-unstable] merge

# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Node ID 81281ae027e1844ef8475cf5eeaffe43a1413752
# Parent  aaa0870863b457be3c243640e10f0097bfc83296
# Parent  517ce601ae9d49a63fd14d61a5f6a060fbf2853c
merge
---
 xen/arch/ppc/Makefile             |   13 ++++++++++---
 xen/arch/ppc/Rules.mk             |    4 +++-
 xen/arch/ppc/boot_of.c            |    2 +-
 xen/arch/ppc/mpic.c               |    4 ++--
 xen/arch/ppc/of_handler/control.c |    2 +-
 xen/arch/ppc/of_handler/devtree.c |   12 ++++++------
 xen/arch/ppc/of_handler/io.c      |    6 +++---
 xen/arch/ppc/of_handler/memory.c  |    4 ++--
 xen/arch/ppc/of_handler/ofh.c     |    4 ++--
 xen/arch/ppc/of_handler/ofh.h     |    4 ++--
 xen/arch/ppc/ofd_fixup.c          |    2 +-
 xen/arch/ppc/papr/tce.c           |    2 +-
 12 files changed, 34 insertions(+), 25 deletions(-)

diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/Makefile
--- a/xen/arch/ppc/Makefile     Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/Makefile     Tue Jun 06 15:03:45 2006 -0500
@@ -44,10 +44,17 @@ obj-y += firmware_image.o
 
 CFLAGS += -Wundef -Wpointer-arith
 CFLAGS += -Wmissing-prototypes -Wmissing-declarations -Wpacked
-CFALGS += -Wredundant-decls
+CFLAGS += -Wredundant-decls
+
+#
+# The following flags are fed to gcc in order to link several
+# objects into a single ELF segment and to not link in any additional
+# objects that gcc would normally like to
+#
+OMAGIC = -N -nodefaultlibs -nostartfiles
 
 firmware: of_handler/built_in.o $(TARGET_SUBARCH)/memcpy.o of-devtree.o
-       $(LD) $(LDFLAGS) -e __ofh_start -N -Ttext=0x0 $^ -o $@
+       $(CC) $(CFLAGS) $(OMAGIC) -e __ofh_start -Wl,-Ttext,0x0 $^ -o $@
 
 firmware_image: firmware
        $(CROSS_COMPILE)objcopy --output-target=binary $< $@
@@ -72,7 +79,7 @@ start.o: boot/start.S
        $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
 
 $(TARGET)-syms: start.o $(ALL_OBJS) xen.lds
-       $(LD) $(LDFLAGS) -N -Ttext 0x2000100 -T xen.lds start.o $(ALL_OBJS) -o 
$@
+       $(CC) $(CFLAGS) $(OMAGIC) -Wl,-Ttext,0x2000100,-T,xen.lds start.o 
$(ALL_OBJS) -o $@
 
 $(TARGET).bin: $(TARGET)-syms
        $(CROSS_COMPILE)objcopy --output-target=binary $< $@
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/Rules.mk
--- a/xen/arch/ppc/Rules.mk     Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/Rules.mk     Tue Jun 06 15:03:45 2006 -0500
@@ -3,7 +3,7 @@ CC := $(CROSS_COMPILE)gcc
 CC := $(CROSS_COMPILE)gcc
 LD := $(CROSS_COMPILE)ld
 
-CFLAGS := -ffreestanding -fno-builtin -fno-common -fno-strict-aliasing
+CFLAGS := -m64 -ffreestanding -fno-builtin -fno-common -fno-strict-aliasing
 CFLAGS += -iwithprefix include -Wall -Werror -pipe # -Wpadded
 CFLAGS += -I$(BASEDIR)/include
 CFLAGS += -I$(BASEDIR)/include/asm-ppc/mach-generic
@@ -12,6 +12,8 @@ CFLAGS += -msoft-float -O2
 CFLAGS += -msoft-float -O2
 CFLAGS-$(debug) += -O0 # last one wins
 CFLAGS-$(papr_vterm) += -DPAPR_VDEVICE -DPAPR_VTERM
+
+LDFLAGS += -m elf64ppc
 
 #
 # command to embed a binary inside a .o
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/boot_of.c
--- a/xen/arch/ppc/boot_of.c    Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/boot_of.c    Tue Jun 06 15:03:45 2006 -0500
@@ -62,7 +62,7 @@ extern s32 prom_call(void *arg, ulong rt
 extern s32 prom_call(void *arg, ulong rtas_base, ulong func, ulong msr);
 
 static int __init of_call(
-    const char *service, u32 nargs, u32 nrets, u32 rets[], ...)
+    const char *service, u32 nargs, u32 nrets, s32 rets[], ...)
 {
     int rc;
 
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/mpic.c
--- a/xen/arch/ppc/mpic.c       Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/mpic.c       Tue Jun 06 15:03:45 2006 -0500
@@ -896,7 +896,7 @@ void __init mpic_init(struct mpic *mpic)
 
 void mpic_irq_set_priority(unsigned int irq, unsigned int pri)
 {
-       int is_ipi;
+       unsigned is_ipi;
        struct mpic *mpic = mpic_find(irq, &is_ipi);
        unsigned long flags;
        u32 reg;
@@ -918,7 +918,7 @@ void mpic_irq_set_priority(unsigned int 
 
 unsigned int mpic_irq_get_priority(unsigned int irq)
 {
-       int is_ipi;
+       unsigned is_ipi;
        struct mpic *mpic = mpic_find(irq, &is_ipi);
        unsigned long flags;
        u32 reg;
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/of_handler/control.c
--- a/xen/arch/ppc/of_handler/control.c Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/of_handler/control.c Tue Jun 06 15:03:45 2006 -0500
@@ -48,7 +48,7 @@ ofh_exit(u32 nargs __attribute__ ((unuse
         ulong b)
 {
     static const char msg[] = "OFH: exit method called\n";
-    u32 dummy;
+    s32 dummy;
 
     ofh_cons_write(DRELA(&msg[0], b), sizeof (msg), &dummy);
 
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/of_handler/devtree.c
--- a/xen/arch/ppc/of_handler/devtree.c Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/of_handler/devtree.c Tue Jun 06 15:03:45 2006 -0500
@@ -26,7 +26,7 @@ ofh_peer(u32 nargs, u32 nrets, s32 argp[
     if (nargs == 1) {
         if (nrets == 1) {
             ofdn_t ph = argp[0];
-            u32 *sib_ph = &retp[0];
+            s32 *sib_ph = &retp[0];
             void *mem = ofd_mem(b);
 
             *sib_ph = ofd_node_peer(mem, ph);
@@ -42,7 +42,7 @@ ofh_child(u32 nargs, u32 nrets, s32 argp
     if (nargs == 1) {
         if (nrets == 1) {
             ofdn_t ph = argp[0];
-            u32 *ch_ph = &retp[0];
+            s32 *ch_ph = &retp[0];
             void *mem = ofd_mem(b);
 
             *ch_ph = ofd_node_child(mem, ph);
@@ -58,7 +58,7 @@ ofh_parent(u32 nargs, u32 nrets, s32 arg
     if (nargs == 1) {
         if (nrets == 1) {
             ofdn_t ph = argp[0];
-            u32 *parent_ph = &retp[0];
+            s32 *parent_ph = &retp[0];
             void *mem = ofd_mem(b);
 
             *parent_ph = ofd_node_parent(mem, ph);
@@ -76,7 +76,7 @@ ofh_instance_to_package(u32 nargs, u32 n
         if (nrets == 1) {
             struct ofh_ihandle *ih =
                 (struct ofh_ihandle *)(ulong)argp[0];
-            u32 *p = &retp[0];
+            s32 *p = &retp[0];
 
             *p = (s32)ih->ofi_node;
             return OF_SUCCESS;
@@ -173,7 +173,7 @@ ofh_canon(u32 nargs, u32 nrets, s32 argp
             const char *dev_spec = (const char *)(ulong)argp[0];
             char *buf = (char *)(ulong)argp[1];
             u32 sz = argp[2];
-            u32 *len = &retp[0];
+            s32 *len = &retp[0];
             void *mem = ofd_mem(b);
             ofdn_t ph;
 
@@ -227,7 +227,7 @@ ofh_instance_to_path(u32 nargs, u32 nret
                 (struct ofh_ihandle *)((ulong)argp[0]);
             char *buf = (char *)(ulong)argp[1];
             u32 sz = argp[2];
-            u32 *len = &retp[0];
+            s32 *len = &retp[0];
             ofdn_t ph;
             void *mem = ofd_mem(b);
 
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/of_handler/io.c
--- a/xen/arch/ppc/of_handler/io.c      Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/of_handler/io.c      Tue Jun 06 15:03:45 2006 -0500
@@ -25,7 +25,7 @@ ofh_open(u32 nargs, u32 nrets, s32 argp[
     if (nargs == 1) {
         if (nrets == 1) {
             const char *devspec = (const char *)(ulong)argp[0];
-            u32 *ih = &retp[0];
+            s32 *ih = &retp[0];
             ofdn_t p;
             void *mem = ofd_mem(b);
 
@@ -72,7 +72,7 @@ ofh_read(u32 nargs, u32 nrets, s32 argp[
             if (ih->ofi_read != NULL) {
                 void *addr = (void *)(ulong)argp[1];
                 u32 sz = argp[2];
-                u32 *actual = &retp[0];
+                s32 *actual = &retp[0];
                 void *f = ih->ofi_read;
 
                 if (f != 0) {
@@ -96,7 +96,7 @@ ofh_write(u32 nargs, u32 nrets, s32 argp
             if (ih->ofi_write != NULL) {
                 void *addr = (void *)(ulong)argp[1];
                 u32 sz = argp[2];
-                u32 *actual = &retp[0];
+                s32 *actual = &retp[0];
                 void *f = ih->ofi_write;
 
                 if (f != 0) {
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/of_handler/memory.c
--- a/xen/arch/ppc/of_handler/memory.c  Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/of_handler/memory.c  Tue Jun 06 15:03:45 2006 -0500
@@ -25,7 +25,7 @@ static struct of_malloc_s claimed[64];
 static struct of_malloc_s claimed[64];
 
 static s32
-claim(ulong b, u32 virt, u32 size, u32 align, u32 *baseaddr)
+claim(ulong b, u32 virt, u32 size, u32 align, s32 *baseaddr)
 {
     struct of_malloc_s *cp;
     u32 i;
@@ -76,7 +76,7 @@ ofh_claim(u32 nargs, u32 nrets, s32 argp
             u32 virt = argp[0];
             u32 size = argp[1];
             u32 align = argp[2];
-            u32 *baseaddr = &retp[0];
+            s32 *baseaddr = &retp[0];
 
             return claim(b, virt, size, align, baseaddr);
         }
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/of_handler/ofh.c
--- a/xen/arch/ppc/of_handler/ofh.c     Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/of_handler/ofh.c     Tue Jun 06 15:03:45 2006 -0500
@@ -67,7 +67,7 @@ assprint(const char *expr, const char *f
     a[13] = '\n';
     a[14] = '\n';
 
-    u32 actual;
+    s32 actual;
     u32 t = 1;
     volatile u32 *tp = &t;
 
@@ -319,7 +319,7 @@ ofh_handler(struct ofh_args *args, ulong
 
         if ((ulong)ofd_mem(b) < (ulong)_end + b) {
             static const char msg[] = "PANIC: OFD and BSS collide\n";
-            u32 dummy;
+            s32 dummy;
 
             ofh_cons_write(DRELA(&msg[0], b), sizeof (msg), &dummy);
             for (;;);
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/of_handler/ofh.h
--- a/xen/arch/ppc/of_handler/ofh.h     Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/of_handler/ofh.h     Tue Jun 06 15:03:45 2006 -0500
@@ -124,10 +124,10 @@ extern s32 ofh_cons_write(const void *bu
 extern s32 ofh_cons_write(const void *buf, u32 count, s32 *actual);
 extern s32 ofh_cons_close(void);
 extern s32 ofh_handler(struct ofh_args *args, ulong ifh_base);
-extern s32 leap(u32 nargs, u32 nrets, u32 args[], u32 rets[],
+extern s32 leap(u32 nargs, u32 nrets, s32 args[], s32 rets[],
                 ulong ba, void *f);
 
-extern s32 io_leap(s32 chan, void *buf, u32 sz, u32 *actual,
+extern s32 io_leap(s32 chan, void *buf, u32 sz, s32 *actual,
                 ulong ba, void *f);
 
 extern void ofh_vty_init(ofdn_t chosen, ulong b);
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/ofd_fixup.c
--- a/xen/arch/ppc/ofd_fixup.c  Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/ofd_fixup.c  Tue Jun 06 15:03:45 2006 -0500
@@ -484,7 +484,7 @@ int ofd_dom0_fixup(struct domain *d, ulo
     ofd_cpus_props(m, d);
 
     printk("Add /chosen props\n");
-    ofd_chosen_props(m, si->cmd_line);
+    ofd_chosen_props(m, (char *)si->cmd_line);
 
     printk("fix /memory@0 props\n");
     ofd_memory_props(m, d, eoload);
diff -r aaa0870863b4 -r 81281ae027e1 xen/arch/ppc/papr/tce.c
--- a/xen/arch/ppc/papr/tce.c   Tue Jun 06 14:37:46 2006 -0500
+++ b/xen/arch/ppc/papr/tce.c   Tue Jun 06 15:03:45 2006 -0500
@@ -70,7 +70,7 @@ static void h_stuff_tce(struct cpu_user_
 #ifdef DEBUG
     printk("%s: liobn: 0x%x ioba: 0x%lx tce: 0x%"
             PRIx64"(0x%"PRIx64") count: %lu\n",
-            __func__, liobn, ioba, tce.tce_dword, tce.tce_bits.tce_rpn,
+           __func__, liobn, ioba, tce.tce_dword, (long)tce.tce_bits.tce_rpn,
             count);
 #endif
     regs->gprs[3] = H_Function;

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

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