aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-12-18 11:27:37 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-12-18 11:27:37 +0000
commitcea7a6cd7b6e6b95177ca9d93865041f5642b6e7 (patch)
treeadac406ac101c288e8331810a3bbc2658ce098a1 /extras
parent6840dfbbd0605b40b4b58a5cf2b5f5b97e1ef846 (diff)
downloadxen-cea7a6cd7b6e6b95177ca9d93865041f5642b6e7.tar.gz
xen-cea7a6cd7b6e6b95177ca9d93865041f5642b6e7.tar.bz2
xen-cea7a6cd7b6e6b95177ca9d93865041f5642b6e7.zip
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@ens-lyon.org>
Diffstat (limited to 'extras')
-rw-r--r--extras/mini-os/Makefile8
-rw-r--r--extras/mini-os/kernel.c22
2 files changed, 17 insertions, 13 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
index ec24cba14a..78e0c9d527 100644
--- a/extras/mini-os/Makefile
+++ b/extras/mini-os/Makefile
@@ -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 --git a/extras/mini-os/kernel.c b/extras/mini-os/kernel.c
index 877168c750..ba27e64ef4 100644
--- a/extras/mini-os/kernel.c
+++ b/extras/mini-os/kernel.c
@@ -434,25 +434,25 @@ static void kbdfront_thread(void *p)
static struct pcifront_dev *pci_dev;
-static void pcifront_thread(void *p)
+static void print_pcidev(unsigned int domain, unsigned int bus, unsigned int slot, unsigned int fun)
{
- void print(unsigned int domain, unsigned int bus, unsigned int slot, unsigned int fun)
- {
- unsigned int vendor, device, rev, class;
+ 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);
+ 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);
- }
+ 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)
+{
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)