[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Fix mini-os ia64 compilation



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1229599657 0
# Node ID b33b745cd5ec3213feeb1d99e421e79cc5f12370
# Parent  22e3666ee483be177a94225d80ac8be0ae6bb6eb
Fix mini-os ia64 compilation

- Avoid nested function to avoid a trampoline.
- Do not link mini-os_app.o when it is empty.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
---
 extras/mini-os/Makefile |    8 ++++++--
 extras/mini-os/kernel.c |   26 +++++++++++++-------------
 2 files changed, 19 insertions(+), 15 deletions(-)

diff -r 22e3666ee483 -r b33b745cd5ec extras/mini-os/Makefile
--- a/extras/mini-os/Makefile   Wed Dec 17 11:36:22 2008 +0000
+++ b/extras/mini-os/Makefile   Thu Dec 18 11:27:37 2008 +0000
@@ -93,8 +93,12 @@ endif
 $(OBJ_DIR)/$(TARGET)_app.o: $(APP_OBJS) app.lds
        $(LD) -r -d $(LDFLAGS) -\( $^ -\) $(APP_LDLIBS) --undefined main -o $@
 
-$(OBJ_DIR)/$(TARGET): links $(OBJS) $(OBJ_DIR)/$(TARGET)_app.o arch_lib
-       $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(OBJ_DIR)/$(TARGET)_app.o $(OBJS) 
$(LDARCHLIB) $(LDLIBS) -o $@.o
+ifneq ($(APP_OBJS),)
+APP_O=$(OBJ_DIR)/$(TARGET)_app.o 
+endif
+
+$(OBJ_DIR)/$(TARGET): links $(OBJS) $(APP_O) arch_lib
+       $(LD) -r $(LDFLAGS) $(HEAD_OBJ) $(APP_O) $(OBJS) $(LDARCHLIB) $(LDLIBS) 
-o $@.o
        $(OBJCOPY) -w -G $(GLOBAL_PREFIX)* -G _start $@.o $@.o
        $(LD) $(LDFLAGS) $(LDFLAGS_FINAL) $@.o $(EXTRA_OBJS) -o $@
        gzip -f -9 -c $@ >$@.gz
diff -r 22e3666ee483 -r b33b745cd5ec extras/mini-os/kernel.c
--- a/extras/mini-os/kernel.c   Wed Dec 17 11:36:22 2008 +0000
+++ b/extras/mini-os/kernel.c   Thu Dec 18 11:27:37 2008 +0000
@@ -434,25 +434,25 @@ static void kbdfront_thread(void *p)
 
 static struct pcifront_dev *pci_dev;
 
+static void print_pcidev(unsigned int domain, unsigned int bus, unsigned int 
slot, unsigned int fun)
+{
+    unsigned int vendor, device, rev, class;
+
+    pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x00, 2, &vendor);
+    pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x02, 2, &device);
+    pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x08, 1, &rev);
+    pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x0a, 2, &class);
+
+    printk("%04x:%02x:%02x.%02x %04x: %04x:%04x (rev %02x)\n", domain, bus, 
slot, fun, class, vendor, device, rev);
+}
+
 static void pcifront_thread(void *p)
 {
-    void print(unsigned int domain, unsigned int bus, unsigned int slot, 
unsigned int fun)
-    {
-        unsigned int vendor, device, rev, class;
-
-        pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x00, 2, &vendor);
-        pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x02, 2, &device);
-        pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x08, 1, &rev);
-        pcifront_conf_read(pci_dev, domain, bus, slot, fun, 0x0a, 2, &class);
-
-        printk("%04x:%02x:%02x.%02x %04x: %04x:%04x (rev %02x)\n", domain, 
bus, slot, fun, class, vendor, device, rev);
-    }
-
     pci_dev = init_pcifront(NULL);
     if (!pci_dev)
         return;
     printk("PCI devices:\n");
-    pcifront_scan(pci_dev, print);
+    pcifront_scan(pci_dev, print_pcidev);
 }
 
 static void fs_thread(void *p)

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.