aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-01-28 18:29:04 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-01-28 18:29:04 +0000
commita2a4fd60d08cd4894a779051918f4d706f3e923c (patch)
treeb999a9fed307a4b53daac326b3dc38f84a13e932
parentb88b24c645cf013a9dad3f70ba4ef23369ad1191 (diff)
downloadxen-a2a4fd60d08cd4894a779051918f4d706f3e923c.tar.gz
xen-a2a4fd60d08cd4894a779051918f4d706f3e923c.tar.bz2
xen-a2a4fd60d08cd4894a779051918f4d706f3e923c.zip
bitkeeper revision 1.695 (4017ff70oJV8517inpGbN1CixN6csw)
Many files: Clean up compile warnings. Added stricter gcc options for Xen build.
-rw-r--r--extras/mini-os/Makefile4
-rw-r--r--extras/mini-os/lib/malloc.c11
-rw-r--r--xen/arch/i386/Rules.mk1
-rw-r--r--xen/arch/i386/acpitable.c3
-rw-r--r--xen/arch/i386/io_apic.c101
-rw-r--r--xen/arch/i386/setup.c1
-rw-r--r--xen/drivers/block/cciss.c15
-rw-r--r--xen/drivers/cdrom/cdrom.c3
-rw-r--r--xen/drivers/char/xen_kbd.c2
-rw-r--r--xen/drivers/ide/ide-geometry.c3
-rw-r--r--xen/drivers/message/fusion/mptscsih.c5
-rw-r--r--xen/drivers/net/e100/e100_main.c5
-rw-r--r--xen/drivers/net/tg3.c8
-rw-r--r--xen/drivers/net/tulip/tulip.h1
-rw-r--r--xen/drivers/pci/pci.c2
-rw-r--r--xen/drivers/scsi/BusLogic.h2
-rw-r--r--xen/drivers/scsi/aic7xxx/aic79xx_osm.c4
-rw-r--r--xen/drivers/scsi/aic7xxx/aic79xx_osm.h8
-rw-r--r--xen/drivers/scsi/constants.h1
-rw-r--r--xen/drivers/scsi/megaraid.c3
-rw-r--r--xen/drivers/scsi/megaraid.h2
-rw-r--r--xen/drivers/scsi/scsi.c6
-rw-r--r--xen/drivers/scsi/scsi_obsolete.c2
-rw-r--r--xen/drivers/scsi/scsi_syms.c2
-rw-r--r--xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h2
-rw-r--r--xen/include/asm-i386/domain_page.h22
-rw-r--r--xen/include/asm-i386/mpspec.h6
-rw-r--r--xen/include/asm-i386/smp.h1
-rw-r--r--xen/include/scsi/scsicam.h2
29 files changed, 90 insertions, 138 deletions
diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
index 2e4d08e9d0..41d6785c00 100644
--- a/extras/mini-os/Makefile
+++ b/extras/mini-os/Makefile
@@ -5,9 +5,7 @@ LD := ld
# Linker should relocate monitor to this address
MONITOR_BASE := 0xE0100000
-# NB. '-Wstrict-prototypes -Wredundant-decls -Wpointer-arith -Winline -ansi'
-# might all be okay to add to Xen. '-Wnested-externs' is a maybe.
-# '-Wcast-qual' is evil.
+# NB. '-Wcast-qual' is nasty, so I omitted it.
CFLAGS := -fno-builtin -O3 -Wall -Ih/ -Wredundant-decls
CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -ansi
diff --git a/extras/mini-os/lib/malloc.c b/extras/mini-os/lib/malloc.c
index 68af1581cb..e9169b11dc 100644
--- a/extras/mini-os/lib/malloc.c
+++ b/extras/mini-os/lib/malloc.c
@@ -2637,17 +2637,12 @@ static void malloc_init_state(av) mstate av;
Other internal utilities operating on mstates
*/
-#if __STD_C
static Void_t* sYSMALLOc(INTERNAL_SIZE_T, mstate);
+#ifndef MORECORE_CANNOT_TRIM
static int sYSTRIm(size_t, mstate);
+#endif
static void malloc_consolidate(mstate);
static Void_t** iALLOc(size_t, size_t*, int, Void_t**);
-#else
-static Void_t* sYSMALLOc();
-static int sYSTRIm();
-static void malloc_consolidate();
-static Void_t** iALLOc();
-#endif
/*
Debugging support
@@ -3420,6 +3415,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
+#ifndef MORECORE_CANNOT_TRIM
/*
sYSTRIm is an inverse of sorts to sYSMALLOc. It gives memory back
to the system (via negative arguments to sbrk) if there is unused
@@ -3485,6 +3481,7 @@ static int sYSTRIm(pad, av) size_t pad; mstate av;
}
return 0;
}
+#endif
/*
------------------------------ malloc ------------------------------
diff --git a/xen/arch/i386/Rules.mk b/xen/arch/i386/Rules.mk
index 2f57ce536e..56f5932b6d 100644
--- a/xen/arch/i386/Rules.mk
+++ b/xen/arch/i386/Rules.mk
@@ -11,6 +11,7 @@ CFLAGS := -nostdinc -fno-builtin -fno-common -fno-strict-aliasing
CFLAGS += -iwithprefix include -O3 -Wall -DMONITOR_BASE=$(MONITOR_BASE)
CFLAGS += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__ -DNDEBUG
#CFLAGS += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__
+CFLAGS += -Wno-pointer-arith -Wredundant-decls
LDFLAGS := -T xeno.lds -N
diff --git a/xen/arch/i386/acpitable.c b/xen/arch/i386/acpitable.c
index a24050bb8b..304f0e3a63 100644
--- a/xen/arch/i386/acpitable.c
+++ b/xen/arch/i386/acpitable.c
@@ -31,7 +31,6 @@
#include <xeno/kernel.h>
#include <xeno/init.h>
#include <xeno/types.h>
-/*#include <xeno/stddef.h>*/
#include <xeno/slab.h>
#include <xeno/pci.h>
#include <asm/mpspec.h>
@@ -39,7 +38,7 @@
#include <asm/apic.h>
#include <asm/apicdef.h>
#include <asm/page.h>
-/*#include <asm/pgtable.h>*/
+#include <asm/io_apic.h>
#ifdef CONFIG_X86_IO_APIC
diff --git a/xen/arch/i386/io_apic.c b/xen/arch/i386/io_apic.c
index 7369966dd8..8401a1612a 100644
--- a/xen/arch/i386/io_apic.c
+++ b/xen/arch/i386/io_apic.c
@@ -689,11 +689,6 @@ next:
/* XXX Skip the Linux/BSD fast-trap vector! XXX */
if (current_vector == 0x80) goto next;
-#if 0
- if (current_vector == SYSCALL_VECTOR)
- goto next;
-#endif
-
if (current_vector > FIRST_SYSTEM_VECTOR) {
offset++;
current_vector = FIRST_DEVICE_VECTOR + offset;
@@ -707,8 +702,49 @@ next:
}
extern void (*interrupt[NR_IRQS])(void);
-static struct hw_interrupt_type ioapic_level_irq_type;
-static struct hw_interrupt_type ioapic_edge_irq_type;
+
+/*
+ * Level and edge triggered IO-APIC interrupts need different handling,
+ * so we use two separate IRQ descriptors. Edge triggered IRQs can be
+ * handled with the level-triggered descriptor, but that one has slightly
+ * more overhead. Level-triggered interrupts cannot be handled with the
+ * edge-triggered handler, without risking IRQ storms and other ugly
+ * races.
+ */
+
+static unsigned int startup_edge_ioapic_irq(unsigned int irq);
+#define shutdown_edge_ioapic_irq disable_edge_ioapic_irq
+#define enable_edge_ioapic_irq unmask_IO_APIC_irq
+static void disable_edge_ioapic_irq (unsigned int irq);
+static void ack_edge_ioapic_irq(unsigned int irq);
+static void end_edge_ioapic_irq (unsigned int i);
+static struct hw_interrupt_type ioapic_edge_irq_type = {
+ "IO-APIC-edge",
+ startup_edge_ioapic_irq,
+ shutdown_edge_ioapic_irq,
+ enable_edge_ioapic_irq,
+ disable_edge_ioapic_irq,
+ ack_edge_ioapic_irq,
+ end_edge_ioapic_irq,
+ set_ioapic_affinity,
+};
+
+static unsigned int startup_level_ioapic_irq (unsigned int irq);
+#define shutdown_level_ioapic_irq mask_IO_APIC_irq
+#define enable_level_ioapic_irq unmask_IO_APIC_irq
+#define disable_level_ioapic_irq mask_IO_APIC_irq
+static void mask_and_ack_level_ioapic_irq (unsigned int irq);
+static void end_level_ioapic_irq (unsigned int irq);
+static struct hw_interrupt_type ioapic_level_irq_type = {
+ "IO-APIC-level",
+ startup_level_ioapic_irq,
+ shutdown_level_ioapic_irq,
+ enable_level_ioapic_irq,
+ disable_level_ioapic_irq,
+ mask_and_ack_level_ioapic_irq,
+ end_level_ioapic_irq,
+ set_ioapic_affinity,
+};
void __init setup_IO_APIC_irqs(void)
{
@@ -1262,20 +1298,6 @@ static int __init timer_irq_works(void)
return 0;
}
-/*
- * In the SMP+IOAPIC case it might happen that there are an unspecified
- * number of pending IRQ events unhandled. These cases are very rare,
- * so we 'resend' these IRQs via IPIs, to the same CPU. It's much
- * better to do it this way as thus we do not have to be aware of
- * 'pending' interrupts in the IRQ path, except at this point.
- */
-/*
- * Edge triggered needs to resend any interrupt
- * that was delayed but this is now handled in the device
- * independent code.
- */
-#define enable_edge_ioapic_irq unmask_IO_APIC_irq
-
static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
/*
@@ -1305,8 +1327,6 @@ static unsigned int startup_edge_ioapic_irq(unsigned int irq)
return was_pending;
}
-#define shutdown_edge_ioapic_irq disable_edge_ioapic_irq
-
/*
* Once we have recorded IRQ_PENDING already, we can mask the
* interrupt for real. This prevents IRQ storms from unhandled
@@ -1345,10 +1365,6 @@ static unsigned int startup_level_ioapic_irq (unsigned int irq)
return 0; /* don't check for pending */
}
-#define shutdown_level_ioapic_irq mask_IO_APIC_irq
-#define enable_level_ioapic_irq unmask_IO_APIC_irq
-#define disable_level_ioapic_irq mask_IO_APIC_irq
-
static void end_level_ioapic_irq (unsigned int irq)
{
unsigned long v;
@@ -1412,37 +1428,6 @@ static void end_level_ioapic_irq (unsigned int irq)
static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
-/*
- * Level and edge triggered IO-APIC interrupts need different handling,
- * so we use two separate IRQ descriptors. Edge triggered IRQs can be
- * handled with the level-triggered descriptor, but that one has slightly
- * more overhead. Level-triggered interrupts cannot be handled with the
- * edge-triggered handler, without risking IRQ storms and other ugly
- * races.
- */
-
-static struct hw_interrupt_type ioapic_edge_irq_type = {
- "IO-APIC-edge",
- startup_edge_ioapic_irq,
- shutdown_edge_ioapic_irq,
- enable_edge_ioapic_irq,
- disable_edge_ioapic_irq,
- ack_edge_ioapic_irq,
- end_edge_ioapic_irq,
- set_ioapic_affinity,
-};
-
-static struct hw_interrupt_type ioapic_level_irq_type = {
- "IO-APIC-level",
- startup_level_ioapic_irq,
- shutdown_level_ioapic_irq,
- enable_level_ioapic_irq,
- disable_level_ioapic_irq,
- mask_and_ack_level_ioapic_irq,
- end_level_ioapic_irq,
- set_ioapic_affinity,
-};
-
static inline void init_IO_APIC_traps(void)
{
int irq;
diff --git a/xen/arch/i386/setup.c b/xen/arch/i386/setup.c
index 90d3b8fca0..13298f7385 100644
--- a/xen/arch/i386/setup.c
+++ b/xen/arch/i386/setup.c
@@ -308,7 +308,6 @@ void __init start_of_day(void)
extern void trap_init(void);
extern void init_IRQ(void);
extern void time_init(void);
- extern void softirq_init(void);
extern void timer_bh(void);
extern void init_timervecs(void);
extern void ac_timer_init(void);
diff --git a/xen/drivers/block/cciss.c b/xen/drivers/block/cciss.c
index a9b5193394..833fcaa54a 100644
--- a/xen/drivers/block/cciss.c
+++ b/xen/drivers/block/cciss.c
@@ -29,17 +29,14 @@
#include <xeno/slab.h>
#include <xeno/delay.h>
#include <xeno/major.h>
-//#include <xeno/fs.h>
#include <xeno/blkpg.h>
#include <xeno/interrupt.h>
#include <xeno/timer.h>
-//#include <xeno/proc_fs.h>
#include <xeno/init.h>
#include <xeno/hdreg.h>
#include <xeno/spinlock.h>
#include <asm/uaccess.h>
#include <asm/io.h>
-//#include <xeno/smp_lock.h>
#include <xeno/blk.h>
#include <xeno/blkdev.h>
@@ -60,7 +57,6 @@ MODULE_LICENSE("GPL");
#include "cciss_cmd.h"
#include "cciss.h"
-//#include <xeno/cciss_ioctl.h>
/* define the PCI info for the cards we can control */
const struct pci_device_id cciss_pci_device_id[] = {
@@ -137,7 +133,6 @@ static u32 heartbeat_timer = 0;
static ctlr_info_t *hba[MAX_CTLR];
static int map_major_to_ctlr[MAX_BLKDEV] = {0}; /* gets ctlr num from maj num */
-//static struct proc_dir_entry *proc_cciss;
static void do_cciss_request(request_queue_t *q);
static int cciss_open(struct inode *inode, struct file *filep);
@@ -147,9 +142,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
static int revalidate_logvol(kdev_t dev, int maxusage);
static int frevalidate_logvol(kdev_t dev);
+#if 0
static int deregister_disk(int ctlr, int logvol);
static int register_new_disk(int cltr, int opened_vol, __u64 requested_lun);
static int cciss_rescan_disk(int cltr, int logvol);
+#endif
static void cciss_getgeometry(int cntl_num);
@@ -173,7 +170,6 @@ static void cciss_procinit(int i) {}
static struct block_device_operations cciss_fops = {
- //owner: THIS_MODULE,
open: cciss_open,
release: cciss_release,
ioctl: cciss_ioctl,
@@ -503,9 +499,11 @@ static int cciss_release(struct inode *inode, struct file *filep)
static int cciss_ioctl(struct inode *inode, struct file *filep,
unsigned int cmd, unsigned long arg)
{
+#if 0
//int ctlr = map_major_to_ctlr[MAJOR(inode->i_rdev)];
//int dsk = MINOR(inode->i_rdev) >> NWD_SHIFT;
+#endif
printk(KERN_ALERT "cciss_ioctl: Called BUT NOT SUPPORTED cmd=%x %lx\n", cmd, arg);
@@ -1101,6 +1099,7 @@ static int frevalidate_logvol(kdev_t dev)
#endif /* CCISS_DEBUG */
return revalidate_logvol(dev, 0);
}
+#if 0
static int deregister_disk(int ctlr, int logvol)
{
unsigned long flags;
@@ -1781,6 +1780,8 @@ static int cciss_rescan_disk(int ctlr, int logvol)
kfree(inq_buff);
return 0;
}
+#endif
+
/*
* Wait polling for a command to complete.
* The memory mapped FIFO is polled for the completion.
@@ -3136,7 +3137,9 @@ static int __init cciss_init_one(struct pci_dev *pdev,
request_queue_t *q;
int i;
int j;
+#if 0
int rc;
+#endif
printk(KERN_DEBUG "cciss: Device 0x%x has been found at"
" bus %d dev %d func %d\n",
diff --git a/xen/drivers/cdrom/cdrom.c b/xen/drivers/cdrom/cdrom.c
index 8bf93cc5c7..0df4f589ad 100644
--- a/xen/drivers/cdrom/cdrom.c
+++ b/xen/drivers/cdrom/cdrom.c
@@ -318,9 +318,6 @@ static void sanitize_format(union cdrom_addr *addr,
static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
unsigned long arg);
-int cdrom_get_last_written(kdev_t dev, long *last_written);
-int cdrom_get_next_writable(kdev_t dev, long *next_writable);
-
#ifdef CONFIG_SYSCTL
static void cdrom_sysctl_register(void);
#endif /* CONFIG_SYSCTL */
diff --git a/xen/drivers/char/xen_kbd.c b/xen/drivers/char/xen_kbd.c
index 2da604d972..43260506ed 100644
--- a/xen/drivers/char/xen_kbd.c
+++ b/xen/drivers/char/xen_kbd.c
@@ -183,7 +183,7 @@ long do_kbd_op(unsigned char op, unsigned char val)
static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- unsigned char status, scancode;
+ unsigned char status=0, scancode;
unsigned int work = 1000;
unsigned long cpu_mask = 0, flags;
struct task_struct *p = CONSOLE_OWNER;
diff --git a/xen/drivers/ide/ide-geometry.c b/xen/drivers/ide/ide-geometry.c
index 22428288b6..0e28927e70 100644
--- a/xen/drivers/ide/ide-geometry.c
+++ b/xen/drivers/ide/ide-geometry.c
@@ -89,9 +89,6 @@ void probe_cmos_for_drives (ide_hwif_t *hwif)
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
-extern ide_drive_t * get_info_ptr(kdev_t);
-extern unsigned long current_capacity (ide_drive_t *);
-
/*
* If heads is nonzero: find a translation with this many heads and S=63.
* Otherwise: find out how OnTrack Disk Manager would translate the disk.
diff --git a/xen/drivers/message/fusion/mptscsih.c b/xen/drivers/message/fusion/mptscsih.c
index 5a8a78ad33..5094d811d2 100644
--- a/xen/drivers/message/fusion/mptscsih.c
+++ b/xen/drivers/message/fusion/mptscsih.c
@@ -204,7 +204,7 @@ static int mptscsih_doDv(MPT_SCSI_HOST *hd, int channel, int target);
static void mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage);
static void mptscsih_fillbuf(char *buffer, int size, int index, int width);
#endif
-static int mptscsih_setup(char *str);
+/*static int mptscsih_setup(char *str);*/
static int mptscsih_halt(struct notifier_block *nb, ulong event, void *buf);
#if XENO_KILLED
@@ -7853,6 +7853,7 @@ mptscsih_fillbuf(char *buffer, int size, int index, int width)
}
#endif /* ~MPTSCSIH_DISABLE_DOMAIN_VALIDATION */
+#if 0
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
/* Commandline Parsing routines and defines.
*
@@ -7943,6 +7944,6 @@ __init mptscsih_setup(char *str)
}
return 1;
}
-
/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+#endif
diff --git a/xen/drivers/net/e100/e100_main.c b/xen/drivers/net/e100/e100_main.c
index fe3d905dc9..b2870e6c5b 100644
--- a/xen/drivers/net/e100/e100_main.c
+++ b/xen/drivers/net/e100/e100_main.c
@@ -143,9 +143,8 @@ static char *test_strings[] = {
};
#endif
-static int e100_ethtool_led_blink(struct net_device *, struct ifreq *);
-
#if 0
+static int e100_ethtool_led_blink(struct net_device *, struct ifreq *);
static int e100_mii_ioctl(struct net_device *, struct ifreq *, int);
#endif
@@ -3584,6 +3583,7 @@ e100_ethtool_eeprom(struct net_device *dev, struct ifreq *ifr)
}
#endif
+#if 0
#define E100_BLINK_INTERVAL (HZ/4)
/**
* e100_led_control
@@ -3666,6 +3666,7 @@ e100_ethtool_led_blink(struct net_device *dev, struct ifreq *ifr)
return 0;
}
+#endif
static inline int __devinit
e100_10BaseT_adapter(struct e100_private *bdp)
diff --git a/xen/drivers/net/tg3.c b/xen/drivers/net/tg3.c
index 82d56cc562..8b36e4d29b 100644
--- a/xen/drivers/net/tg3.c
+++ b/xen/drivers/net/tg3.c
@@ -5868,6 +5868,8 @@ static void tg3_set_rx_mode(struct net_device *dev)
spin_unlock_irq(&tp->lock);
}
+#ifdef ETHTOOL
+
#define TG3_REGDUMP_LEN (32 * 1024)
static int tg3_get_regs_len(struct net_device *dev)
@@ -5939,6 +5941,8 @@ do { p = orig_p + (reg); \
spin_unlock_irq(&tp->lock);
}
+#endif /* ETHTOOL */
+
static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct tg3 *tp = dev->priv;
@@ -6088,6 +6092,8 @@ static int tg3_nway_reset(struct net_device *dev)
return r;
}
+#ifdef ETHTOOL
+
static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
{
struct tg3 *tp = dev->priv;
@@ -6170,6 +6176,8 @@ static int tg3_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam
return 0;
}
+#endif /* ETHTOOL */
+
static u32 tg3_get_rx_csum(struct net_device *dev)
{
struct tg3 *tp = dev->priv;
diff --git a/xen/drivers/net/tulip/tulip.h b/xen/drivers/net/tulip/tulip.h
index 905258e4e6..ca519fe8c0 100644
--- a/xen/drivers/net/tulip/tulip.h
+++ b/xen/drivers/net/tulip/tulip.h
@@ -416,7 +416,6 @@ void t21142_lnk_change(struct net_device *dev, int csr5);
void pnic2_lnk_change(struct net_device *dev, int csr5);
void pnic2_timer(unsigned long data);
void pnic2_start_nway(struct net_device *dev);
-void pnic2_lnk_change(struct net_device *dev, int csr5);
/* eeprom.c */
void tulip_parse_eeprom(struct net_device *dev);
diff --git a/xen/drivers/pci/pci.c b/xen/drivers/pci/pci.c
index 2692435463..30b18ed96c 100644
--- a/xen/drivers/pci/pci.c
+++ b/xen/drivers/pci/pci.c
@@ -1261,8 +1261,6 @@ struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_de
return child;
}
-unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus);
-
/*
* If it's a bridge, configure it and scan the bus behind it.
* For CardBus bridges, we don't scan behind as the devices will
diff --git a/xen/drivers/scsi/BusLogic.h b/xen/drivers/scsi/BusLogic.h
index 9f9d549851..b0e1bd755f 100644
--- a/xen/drivers/scsi/BusLogic.h
+++ b/xen/drivers/scsi/BusLogic.h
@@ -1801,8 +1801,6 @@ static void BusLogic_ReleaseResources(BusLogic_HostAdapter_T *) __init;
static boolean BusLogic_TargetDeviceInquiry(BusLogic_HostAdapter_T *) __init;
static void BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T *,
SCSI_Host_T *) __init;
-int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *) __init;
-int BusLogic_ReleaseHostAdapter(SCSI_Host_T *) __init;
static boolean BusLogic_ParseKeyword(char **, char *) __init;
#if 0 /* XEN */
static int BusLogic_ParseDriverOptions(char *) __init;
diff --git a/xen/drivers/scsi/aic7xxx/aic79xx_osm.c b/xen/drivers/scsi/aic7xxx/aic79xx_osm.c
index 8aa7c01bef..a69fbbdbec 100644
--- a/xen/drivers/scsi/aic7xxx/aic79xx_osm.c
+++ b/xen/drivers/scsi/aic7xxx/aic79xx_osm.c
@@ -376,8 +376,8 @@ static void ahd_linux_dev_timed_unfreeze(u_long arg);
/* SAE */
#if XENO_KILLED
static void ahd_linux_sem_timeout(u_long arg);
-#endif
static int ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
+#endif
static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
static void ahd_linux_select_queue_depth(struct Scsi_Host *host,
@@ -2458,7 +2458,6 @@ ahd_linux_sem_timeout(u_long arg)
sem = (struct semaphore *)arg;
up(sem);
}
-#endif
static int
ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
@@ -2733,6 +2732,7 @@ done:
spin_lock_irq(&io_request_lock);
return (retval);
}
+#endif /* XENO_KILLED */
static void
ahd_linux_dev_timed_unfreeze(u_long arg)
diff --git a/xen/drivers/scsi/aic7xxx/aic79xx_osm.h b/xen/drivers/scsi/aic7xxx/aic79xx_osm.h
index b7686f1993..b739b8c091 100644
--- a/xen/drivers/scsi/aic7xxx/aic79xx_osm.h
+++ b/xen/drivers/scsi/aic7xxx/aic79xx_osm.h
@@ -42,6 +42,7 @@
#ifndef _AIC79XX_LINUX_H_
#define _AIC79XX_LINUX_H_
+#include <xeno/config.h>
#include <xeno/types.h>
#include <xeno/blk.h>
#include <xeno/blkdev.h>
@@ -1123,8 +1124,11 @@ ahd_flush_device_writes(struct ahd_softc *ahd)
/*
* Always "return" 0 for success.
*/
-#define ahd_pci_set_dma_mask(dev_softc, mask) \
- (((dev_softc)->dma_mask = mask) && 0)
+static inline int ahd_pci_set_dma_mask(struct pci_dev *dev_softc, u64 mask)
+{
+ dev_softc->dma_mask = mask;
+ return 0;
+}
#endif
/*********************** Transaction Access Wrappers **************************/
static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
diff --git a/xen/drivers/scsi/constants.h b/xen/drivers/scsi/constants.h
index e10527ea5e..6de2644cc3 100644
--- a/xen/drivers/scsi/constants.h
+++ b/xen/drivers/scsi/constants.h
@@ -1,6 +1,5 @@
#ifndef _CONSTANTS_H
#define _CONSTANTS_H
extern int print_msg(unsigned char *);
-extern void print_status(int);
extern void print_Scsi_Cmnd (Scsi_Cmnd *);
#endif /* def _CONSTANTS_H */
diff --git a/xen/drivers/scsi/megaraid.c b/xen/drivers/scsi/megaraid.c
index 44e9aa59f6..89d9cec744 100644
--- a/xen/drivers/scsi/megaraid.c
+++ b/xen/drivers/scsi/megaraid.c
@@ -5407,7 +5407,7 @@ mega_del_logdrv(mega_host_config *this_hba, int logdrv)
#endif
}
-
+#if XENO_KILLED_DELLOGDRV
static int
mega_do_del_logdrv(mega_host_config *this_hba, int logdrv)
{
@@ -5442,6 +5442,7 @@ mega_do_del_logdrv(mega_host_config *this_hba, int logdrv)
return rval;
}
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
void *
diff --git a/xen/drivers/scsi/megaraid.h b/xen/drivers/scsi/megaraid.h
index cb8c9aba9e..e55702bd1f 100644
--- a/xen/drivers/scsi/megaraid.h
+++ b/xen/drivers/scsi/megaraid.h
@@ -1036,7 +1036,7 @@ static void mega_get_boot_drv(mega_host_config *);
static int mega_get_ldrv_num(mega_host_config *, Scsi_Cmnd *, int);
static int mega_support_random_del(mega_host_config *);
static int mega_del_logdrv(mega_host_config *, int);
-static int mega_do_del_logdrv(mega_host_config *, int);
+/*static int mega_do_del_logdrv(mega_host_config *, int);*/
#endif
diff --git a/xen/drivers/scsi/scsi.c b/xen/drivers/scsi/scsi.c
index ed869dd6aa..d19d16b762 100644
--- a/xen/drivers/scsi/scsi.c
+++ b/xen/drivers/scsi/scsi.c
@@ -147,12 +147,6 @@ const char *const scsi_device_types[MAX_SCSI_DEVICE_CODE] =
"Enclosure ",
};
-/*
- * Function prototypes.
- */
-extern void scsi_times_out(Scsi_Cmnd * SCpnt);
-void scsi_build_commandblocks(Scsi_Device * SDpnt);
-
/*
* These are the interface to the old error handling code. It should go away
* someday soon.
diff --git a/xen/drivers/scsi/scsi_obsolete.c b/xen/drivers/scsi/scsi_obsolete.c
index a9f7db43a3..d5309d2669 100644
--- a/xen/drivers/scsi/scsi_obsolete.c
+++ b/xen/drivers/scsi/scsi_obsolete.c
@@ -85,8 +85,6 @@ extern void scsi_old_done(Scsi_Cmnd * SCpnt);
int update_timeout(Scsi_Cmnd *, int);
extern void scsi_old_times_out(Scsi_Cmnd * SCpnt);
-extern int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt);
-
#define SCSI_BLOCK(HOST) (HOST->can_queue && HOST->host_busy >= HOST->can_queue)
static unsigned char generic_sense[6] =
diff --git a/xen/drivers/scsi/scsi_syms.c b/xen/drivers/scsi/scsi_syms.c
index 82b23e84ce..efea5288c0 100644
--- a/xen/drivers/scsi/scsi_syms.c
+++ b/xen/drivers/scsi/scsi_syms.c
@@ -99,7 +99,5 @@ EXPORT_SYMBOL(scsi_device_types);
/*
* Externalize timers so that HBAs can safely start/restart commands.
*/
-extern void scsi_add_timer(Scsi_Cmnd *, int, void ((*) (Scsi_Cmnd *)));
-extern int scsi_delete_timer(Scsi_Cmnd *);
EXPORT_SYMBOL(scsi_add_timer);
EXPORT_SYMBOL(scsi_delete_timer);
diff --git a/xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h
index 73bd0ed4f9..8b649547c8 100644
--- a/xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h
+++ b/xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h
@@ -181,7 +181,7 @@ int sym53c8xx_release(struct Scsi_Host *);
/*
* These options are not tunable from 'make config'
*/
-#if 1
+#if 0
#define SYM_LINUX_PROC_INFO_SUPPORT
#define SYM_LINUX_BOOT_COMMAND_LINE_SUPPORT
#define SYM_LINUX_USER_COMMAND_SUPPORT
diff --git a/xen/include/asm-i386/domain_page.h b/xen/include/asm-i386/domain_page.h
index e91689c867..1d38d8b310 100644
--- a/xen/include/asm-i386/domain_page.h
+++ b/xen/include/asm-i386/domain_page.h
@@ -4,6 +4,9 @@
* Allow temporary mapping of domain page frames into Xen space.
*/
+#ifndef __ASM_DOMAIN_PAGE_H__
+#define __ASM_DOMAIN_PAGE_H__
+
#include <xeno/config.h>
#include <xeno/sched.h>
@@ -23,21 +26,4 @@ extern void *map_domain_mem(unsigned long pa);
*/
extern void unmap_domain_mem(void *va);
-#if 0
-#define MAPCACHE_HASH(_pfn) ((_pfn) & (MAPCACHE_ENTRIES-1))
-static inline void *map_domain_mem(unsigned long pa)
-{
- unsigned long pfn = pa >> PAGE_SHIFT;
- unsigned long hash = MAPCACHE_HASH(pfn);
- unsigned long *pent = mapcache[smp_processor_id()] + hash;
- void *va = (void *)(MAPCACHE_VIRT_START +
- (hash << PAGE_SHIFT) +
- (pa & ~PAGE_MASK));
- if ( (*pent & PAGE_MASK) != (pfn << PAGE_SHIFT) )
- {
- *pent = (pfn << PAGE_SHIFT) | __PAGE_HYPERVISOR;
- __flush_tlb_one(va);
- }
- return va;
-}
-#endif
+#endif /* __ASM_DOMAIN_PAGE_H__ */
diff --git a/xen/include/asm-i386/mpspec.h b/xen/include/asm-i386/mpspec.h
index 4a8c499763..7ca70f41a8 100644
--- a/xen/include/asm-i386/mpspec.h
+++ b/xen/include/asm-i386/mpspec.h
@@ -206,18 +206,12 @@ extern int *mp_bus_id_to_pci_bus;
extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
extern unsigned int boot_cpu_physical_apicid;
-extern unsigned long phys_cpu_present_map;
extern int smp_found_config;
extern void find_smp_config (void);
extern void get_smp_config (void);
-extern int nr_ioapics;
extern int apic_version [MAX_APICS];
-extern int mp_irq_entries;
-extern struct mpc_config_intsrc *mp_irqs;
-extern int mpc_default_type;
extern int mp_current_pci_id;
extern unsigned long mp_lapic_addr;
-extern int pic_mode;
#endif
diff --git a/xen/include/asm-i386/smp.h b/xen/include/asm-i386/smp.h
index 08eef3c8bd..58a0a24d30 100644
--- a/xen/include/asm-i386/smp.h
+++ b/xen/include/asm-i386/smp.h
@@ -54,7 +54,6 @@ extern volatile int logical_apicid_to_cpu[MAX_APICID];
* General functions that each host system must provide.
*/
-extern void smp_boot_cpus(void);
extern void smp_store_cpu_info(int id); /* Store per CPU info (like the initial udelay numbers */
/*
diff --git a/xen/include/scsi/scsicam.h b/xen/include/scsi/scsicam.h
index 13e9378f55..438cc80b83 100644
--- a/xen/include/scsi/scsicam.h
+++ b/xen/include/scsi/scsicam.h
@@ -14,6 +14,4 @@
#define SCSICAM_H
#include <xeno/kdev_t.h>
extern int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip);
-extern int scsi_partsize(struct buffer_head *bh, unsigned long capacity,
- unsigned int *cyls, unsigned int *hds, unsigned int *secs);
#endif /* def SCSICAM_H */