ia64/xen-unstable

changeset 1056:c67c82ddb44a

bitkeeper revision 1.695 (4017ff70oJV8517inpGbN1CixN6csw)

Many files:
Clean up compile warnings. Added stricter gcc options for Xen build.
author kaf24@scramble.cl.cam.ac.uk
date Wed Jan 28 18:29:04 2004 +0000 (2004-01-28)
parents aadd0dc51c45
children 432277fa713c
files extras/mini-os/Makefile extras/mini-os/lib/malloc.c xen/arch/i386/Rules.mk xen/arch/i386/acpitable.c xen/arch/i386/io_apic.c xen/arch/i386/setup.c xen/drivers/block/cciss.c xen/drivers/cdrom/cdrom.c xen/drivers/char/xen_kbd.c xen/drivers/ide/ide-geometry.c xen/drivers/message/fusion/mptscsih.c xen/drivers/net/e100/e100_main.c xen/drivers/net/tg3.c xen/drivers/net/tulip/tulip.h xen/drivers/pci/pci.c xen/drivers/scsi/BusLogic.h xen/drivers/scsi/aic7xxx/aic79xx_osm.c xen/drivers/scsi/aic7xxx/aic79xx_osm.h xen/drivers/scsi/constants.h xen/drivers/scsi/megaraid.c xen/drivers/scsi/megaraid.h xen/drivers/scsi/scsi.c xen/drivers/scsi/scsi_obsolete.c xen/drivers/scsi/scsi_syms.c xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h xen/include/asm-i386/domain_page.h xen/include/asm-i386/mpspec.h xen/include/asm-i386/smp.h xen/include/scsi/scsicam.h
line diff
     1.1 --- a/extras/mini-os/Makefile	Sun Jan 25 03:00:54 2004 +0000
     1.2 +++ b/extras/mini-os/Makefile	Wed Jan 28 18:29:04 2004 +0000
     1.3 @@ -5,9 +5,7 @@ LD := ld
     1.4  # Linker should relocate monitor to this address
     1.5  MONITOR_BASE := 0xE0100000
     1.6  
     1.7 -# NB. '-Wstrict-prototypes -Wredundant-decls -Wpointer-arith -Winline -ansi'
     1.8 -#     might all be okay to add to Xen. '-Wnested-externs' is a maybe.
     1.9 -#     '-Wcast-qual' is evil.
    1.10 +# NB. '-Wcast-qual' is nasty, so I omitted it.
    1.11  CFLAGS := -fno-builtin -O3 -Wall -Ih/ -Wredundant-decls
    1.12  CFLAGS += -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -ansi
    1.13  
     2.1 --- a/extras/mini-os/lib/malloc.c	Sun Jan 25 03:00:54 2004 +0000
     2.2 +++ b/extras/mini-os/lib/malloc.c	Wed Jan 28 18:29:04 2004 +0000
     2.3 @@ -2637,17 +2637,12 @@ static void malloc_init_state(av) mstate
     2.4     Other internal utilities operating on mstates
     2.5  */
     2.6  
     2.7 -#if __STD_C
     2.8  static Void_t*  sYSMALLOc(INTERNAL_SIZE_T, mstate);
     2.9 +#ifndef MORECORE_CANNOT_TRIM
    2.10  static int      sYSTRIm(size_t, mstate);
    2.11 +#endif
    2.12  static void     malloc_consolidate(mstate);
    2.13  static Void_t** iALLOc(size_t, size_t*, int, Void_t**);
    2.14 -#else
    2.15 -static Void_t*  sYSMALLOc();
    2.16 -static int      sYSTRIm();
    2.17 -static void     malloc_consolidate();
    2.18 -static Void_t** iALLOc();
    2.19 -#endif
    2.20  
    2.21  /*
    2.22    Debugging support
    2.23 @@ -3420,6 +3415,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNA
    2.24  
    2.25  
    2.26  
    2.27 +#ifndef MORECORE_CANNOT_TRIM
    2.28  /*
    2.29    sYSTRIm is an inverse of sorts to sYSMALLOc.  It gives memory back
    2.30    to the system (via negative arguments to sbrk) if there is unused
    2.31 @@ -3485,6 +3481,7 @@ static int sYSTRIm(pad, av) size_t pad; 
    2.32    }
    2.33    return 0;
    2.34  }
    2.35 +#endif
    2.36  
    2.37  /*
    2.38    ------------------------------ malloc ------------------------------
     3.1 --- a/xen/arch/i386/Rules.mk	Sun Jan 25 03:00:54 2004 +0000
     3.2 +++ b/xen/arch/i386/Rules.mk	Wed Jan 28 18:29:04 2004 +0000
     3.3 @@ -11,6 +11,7 @@ CFLAGS  := -nostdinc -fno-builtin -fno-c
     3.4  CFLAGS  += -iwithprefix include -O3 -Wall -DMONITOR_BASE=$(MONITOR_BASE)
     3.5  CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__ -DNDEBUG
     3.6  #CFLAGS  += -fomit-frame-pointer -I$(BASEDIR)/include -D__KERNEL__
     3.7 +CFLAGS  += -Wno-pointer-arith -Wredundant-decls
     3.8  LDFLAGS := -T xeno.lds -N
     3.9  
    3.10  
     4.1 --- a/xen/arch/i386/acpitable.c	Sun Jan 25 03:00:54 2004 +0000
     4.2 +++ b/xen/arch/i386/acpitable.c	Wed Jan 28 18:29:04 2004 +0000
     4.3 @@ -31,7 +31,6 @@
     4.4  #include <xeno/kernel.h>
     4.5  #include <xeno/init.h>
     4.6  #include <xeno/types.h>
     4.7 -/*#include <xeno/stddef.h>*/
     4.8  #include <xeno/slab.h>
     4.9  #include <xeno/pci.h>
    4.10  #include <asm/mpspec.h>
    4.11 @@ -39,7 +38,7 @@
    4.12  #include <asm/apic.h>
    4.13  #include <asm/apicdef.h>
    4.14  #include <asm/page.h>
    4.15 -/*#include <asm/pgtable.h>*/
    4.16 +#include <asm/io_apic.h>
    4.17  
    4.18  #ifdef CONFIG_X86_IO_APIC
    4.19  
     5.1 --- a/xen/arch/i386/io_apic.c	Sun Jan 25 03:00:54 2004 +0000
     5.2 +++ b/xen/arch/i386/io_apic.c	Wed Jan 28 18:29:04 2004 +0000
     5.3 @@ -689,11 +689,6 @@ next:
     5.4          /* XXX Skip the Linux/BSD fast-trap vector! XXX */
     5.5          if (current_vector == 0x80) goto next;
     5.6  
     5.7 -#if 0
     5.8 -	if (current_vector == SYSCALL_VECTOR)
     5.9 -		goto next;
    5.10 -#endif
    5.11 -
    5.12  	if (current_vector > FIRST_SYSTEM_VECTOR) {
    5.13  		offset++;
    5.14  		current_vector = FIRST_DEVICE_VECTOR + offset;
    5.15 @@ -707,8 +702,49 @@ next:
    5.16  }
    5.17  
    5.18  extern void (*interrupt[NR_IRQS])(void);
    5.19 -static struct hw_interrupt_type ioapic_level_irq_type;
    5.20 -static struct hw_interrupt_type ioapic_edge_irq_type;
    5.21 +
    5.22 +/*
    5.23 + * Level and edge triggered IO-APIC interrupts need different handling,
    5.24 + * so we use two separate IRQ descriptors. Edge triggered IRQs can be
    5.25 + * handled with the level-triggered descriptor, but that one has slightly
    5.26 + * more overhead. Level-triggered interrupts cannot be handled with the
    5.27 + * edge-triggered handler, without risking IRQ storms and other ugly
    5.28 + * races.
    5.29 + */
    5.30 +
    5.31 +static unsigned int startup_edge_ioapic_irq(unsigned int irq);
    5.32 +#define shutdown_edge_ioapic_irq  disable_edge_ioapic_irq
    5.33 +#define enable_edge_ioapic_irq    unmask_IO_APIC_irq
    5.34 +static void disable_edge_ioapic_irq (unsigned int irq);
    5.35 +static void ack_edge_ioapic_irq(unsigned int irq);
    5.36 +static void end_edge_ioapic_irq (unsigned int i);
    5.37 +static struct hw_interrupt_type ioapic_edge_irq_type = {
    5.38 +	"IO-APIC-edge",
    5.39 +	startup_edge_ioapic_irq,
    5.40 +	shutdown_edge_ioapic_irq,
    5.41 +	enable_edge_ioapic_irq,
    5.42 +	disable_edge_ioapic_irq,
    5.43 +	ack_edge_ioapic_irq,
    5.44 +	end_edge_ioapic_irq,
    5.45 +	set_ioapic_affinity,
    5.46 +};
    5.47 +
    5.48 +static unsigned int startup_level_ioapic_irq (unsigned int irq);
    5.49 +#define shutdown_level_ioapic_irq mask_IO_APIC_irq
    5.50 +#define enable_level_ioapic_irq   unmask_IO_APIC_irq
    5.51 +#define disable_level_ioapic_irq  mask_IO_APIC_irq
    5.52 +static void mask_and_ack_level_ioapic_irq (unsigned int irq);
    5.53 +static void end_level_ioapic_irq (unsigned int irq);
    5.54 +static struct hw_interrupt_type ioapic_level_irq_type = {
    5.55 +	"IO-APIC-level",
    5.56 +	startup_level_ioapic_irq,
    5.57 +	shutdown_level_ioapic_irq,
    5.58 +	enable_level_ioapic_irq,
    5.59 +	disable_level_ioapic_irq,
    5.60 +	mask_and_ack_level_ioapic_irq,
    5.61 +	end_level_ioapic_irq,
    5.62 +	set_ioapic_affinity,
    5.63 +};
    5.64  
    5.65  void __init setup_IO_APIC_irqs(void)
    5.66  {
    5.67 @@ -1262,20 +1298,6 @@ static int __init timer_irq_works(void)
    5.68  	return 0;
    5.69  }
    5.70  
    5.71 -/*
    5.72 - * In the SMP+IOAPIC case it might happen that there are an unspecified
    5.73 - * number of pending IRQ events unhandled. These cases are very rare,
    5.74 - * so we 'resend' these IRQs via IPIs, to the same CPU. It's much
    5.75 - * better to do it this way as thus we do not have to be aware of
    5.76 - * 'pending' interrupts in the IRQ path, except at this point.
    5.77 - */
    5.78 -/*
    5.79 - * Edge triggered needs to resend any interrupt
    5.80 - * that was delayed but this is now handled in the device
    5.81 - * independent code.
    5.82 - */
    5.83 -#define enable_edge_ioapic_irq unmask_IO_APIC_irq
    5.84 -
    5.85  static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
    5.86  
    5.87  /*
    5.88 @@ -1305,8 +1327,6 @@ static unsigned int startup_edge_ioapic_
    5.89  	return was_pending;
    5.90  }
    5.91  
    5.92 -#define shutdown_edge_ioapic_irq	disable_edge_ioapic_irq
    5.93 -
    5.94  /*
    5.95   * Once we have recorded IRQ_PENDING already, we can mask the
    5.96   * interrupt for real. This prevents IRQ storms from unhandled
    5.97 @@ -1345,10 +1365,6 @@ static unsigned int startup_level_ioapic
    5.98  	return 0; /* don't check for pending */
    5.99  }
   5.100  
   5.101 -#define shutdown_level_ioapic_irq	mask_IO_APIC_irq
   5.102 -#define enable_level_ioapic_irq		unmask_IO_APIC_irq
   5.103 -#define disable_level_ioapic_irq	mask_IO_APIC_irq
   5.104 -
   5.105  static void end_level_ioapic_irq (unsigned int irq)
   5.106  {
   5.107  	unsigned long v;
   5.108 @@ -1412,37 +1428,6 @@ static void end_level_ioapic_irq (unsign
   5.109  
   5.110  static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
   5.111  
   5.112 -/*
   5.113 - * Level and edge triggered IO-APIC interrupts need different handling,
   5.114 - * so we use two separate IRQ descriptors. Edge triggered IRQs can be
   5.115 - * handled with the level-triggered descriptor, but that one has slightly
   5.116 - * more overhead. Level-triggered interrupts cannot be handled with the
   5.117 - * edge-triggered handler, without risking IRQ storms and other ugly
   5.118 - * races.
   5.119 - */
   5.120 -
   5.121 -static struct hw_interrupt_type ioapic_edge_irq_type = {
   5.122 -	"IO-APIC-edge",
   5.123 -	startup_edge_ioapic_irq,
   5.124 -	shutdown_edge_ioapic_irq,
   5.125 -	enable_edge_ioapic_irq,
   5.126 -	disable_edge_ioapic_irq,
   5.127 -	ack_edge_ioapic_irq,
   5.128 -	end_edge_ioapic_irq,
   5.129 -	set_ioapic_affinity,
   5.130 -};
   5.131 -
   5.132 -static struct hw_interrupt_type ioapic_level_irq_type = {
   5.133 -	"IO-APIC-level",
   5.134 -	startup_level_ioapic_irq,
   5.135 -	shutdown_level_ioapic_irq,
   5.136 -	enable_level_ioapic_irq,
   5.137 -	disable_level_ioapic_irq,
   5.138 -	mask_and_ack_level_ioapic_irq,
   5.139 -	end_level_ioapic_irq,
   5.140 -	set_ioapic_affinity,
   5.141 -};
   5.142 -
   5.143  static inline void init_IO_APIC_traps(void)
   5.144  {
   5.145  	int irq;
     6.1 --- a/xen/arch/i386/setup.c	Sun Jan 25 03:00:54 2004 +0000
     6.2 +++ b/xen/arch/i386/setup.c	Wed Jan 28 18:29:04 2004 +0000
     6.3 @@ -308,7 +308,6 @@ void __init start_of_day(void)
     6.4      extern void trap_init(void);
     6.5      extern void init_IRQ(void);
     6.6      extern void time_init(void);
     6.7 -    extern void softirq_init(void);
     6.8      extern void timer_bh(void);
     6.9      extern void init_timervecs(void);
    6.10      extern void ac_timer_init(void);
     7.1 --- a/xen/drivers/block/cciss.c	Sun Jan 25 03:00:54 2004 +0000
     7.2 +++ b/xen/drivers/block/cciss.c	Wed Jan 28 18:29:04 2004 +0000
     7.3 @@ -29,17 +29,14 @@
     7.4  #include <xeno/slab.h>
     7.5  #include <xeno/delay.h>
     7.6  #include <xeno/major.h>
     7.7 -//#include <xeno/fs.h>
     7.8  #include <xeno/blkpg.h>
     7.9  #include <xeno/interrupt.h>
    7.10  #include <xeno/timer.h>
    7.11 -//#include <xeno/proc_fs.h>
    7.12  #include <xeno/init.h> 
    7.13  #include <xeno/hdreg.h>
    7.14  #include <xeno/spinlock.h>
    7.15  #include <asm/uaccess.h>
    7.16  #include <asm/io.h>
    7.17 -//#include <xeno/smp_lock.h>
    7.18  
    7.19  #include <xeno/blk.h>
    7.20  #include <xeno/blkdev.h>
    7.21 @@ -60,7 +57,6 @@ MODULE_LICENSE("GPL");
    7.22  
    7.23  #include "cciss_cmd.h"
    7.24  #include "cciss.h"
    7.25 -//#include <xeno/cciss_ioctl.h>
    7.26  
    7.27  /* define the PCI info for the cards we can control */
    7.28  const struct pci_device_id cciss_pci_device_id[] = {
    7.29 @@ -137,7 +133,6 @@ static u32 heartbeat_timer = 0;
    7.30  
    7.31  static ctlr_info_t *hba[MAX_CTLR];
    7.32  static int map_major_to_ctlr[MAX_BLKDEV] = {0}; /* gets ctlr num from maj num */
    7.33 -//static struct proc_dir_entry *proc_cciss;
    7.34  
    7.35  static void do_cciss_request(request_queue_t *q);
    7.36  static int cciss_open(struct inode *inode, struct file *filep);
    7.37 @@ -147,9 +142,11 @@ static int cciss_ioctl(struct inode *ino
    7.38  
    7.39  static int revalidate_logvol(kdev_t dev, int maxusage);
    7.40  static int frevalidate_logvol(kdev_t dev);
    7.41 +#if 0
    7.42  static int deregister_disk(int ctlr, int logvol);
    7.43  static int register_new_disk(int cltr, int opened_vol, __u64 requested_lun);
    7.44  static int cciss_rescan_disk(int cltr, int logvol);
    7.45 +#endif
    7.46  
    7.47  static void cciss_getgeometry(int cntl_num);
    7.48  
    7.49 @@ -173,7 +170,6 @@ static void cciss_procinit(int i) {}
    7.50  
    7.51  
    7.52  static struct block_device_operations cciss_fops  = {
    7.53 -	//owner:			THIS_MODULE,
    7.54  	open:			cciss_open, 
    7.55  	release:        	cciss_release,
    7.56          ioctl:			cciss_ioctl,
    7.57 @@ -503,9 +499,11 @@ static int cciss_release(struct inode *i
    7.58  static int cciss_ioctl(struct inode *inode, struct file *filep, 
    7.59  		unsigned int cmd, unsigned long arg)
    7.60  {
    7.61 +#if 0
    7.62  	//int ctlr = map_major_to_ctlr[MAJOR(inode->i_rdev)];
    7.63  
    7.64  	//int dsk  = MINOR(inode->i_rdev) >> NWD_SHIFT;
    7.65 +#endif
    7.66  
    7.67  printk(KERN_ALERT "cciss_ioctl: Called BUT NOT SUPPORTED cmd=%x %lx\n", cmd, arg);
    7.68  
    7.69 @@ -1101,6 +1099,7 @@ static int frevalidate_logvol(kdev_t dev
    7.70  #endif /* CCISS_DEBUG */ 
    7.71  	return revalidate_logvol(dev, 0);
    7.72  }
    7.73 +#if 0
    7.74  static int deregister_disk(int ctlr, int logvol)
    7.75  {
    7.76  	unsigned long flags;
    7.77 @@ -1781,6 +1780,8 @@ static int cciss_rescan_disk(int ctlr, i
    7.78  	kfree(inq_buff);
    7.79  	return 0;
    7.80  }
    7.81 +#endif
    7.82 +
    7.83  /*
    7.84   *   Wait polling for a command to complete.
    7.85   *   The memory mapped FIFO is polled for the completion.
    7.86 @@ -3136,7 +3137,9 @@ static int __init cciss_init_one(struct 
    7.87  	request_queue_t *q;
    7.88  	int i;
    7.89  	int j;
    7.90 +#if 0
    7.91  	int rc;
    7.92 +#endif
    7.93  
    7.94  	printk(KERN_DEBUG "cciss: Device 0x%x has been found at"
    7.95  			" bus %d dev %d func %d\n",
     8.1 --- a/xen/drivers/cdrom/cdrom.c	Sun Jan 25 03:00:54 2004 +0000
     8.2 +++ b/xen/drivers/cdrom/cdrom.c	Wed Jan 28 18:29:04 2004 +0000
     8.3 @@ -318,9 +318,6 @@ static void sanitize_format(union cdrom_
     8.4  static int mmc_ioctl(struct cdrom_device_info *cdi, unsigned int cmd,
     8.5  		     unsigned long arg);
     8.6  
     8.7 -int cdrom_get_last_written(kdev_t dev, long *last_written);
     8.8 -int cdrom_get_next_writable(kdev_t dev, long *next_writable);
     8.9 -
    8.10  #ifdef CONFIG_SYSCTL
    8.11  static void cdrom_sysctl_register(void);
    8.12  #endif /* CONFIG_SYSCTL */ 
     9.1 --- a/xen/drivers/char/xen_kbd.c	Sun Jan 25 03:00:54 2004 +0000
     9.2 +++ b/xen/drivers/char/xen_kbd.c	Wed Jan 28 18:29:04 2004 +0000
     9.3 @@ -183,7 +183,7 @@ long do_kbd_op(unsigned char op, unsigne
     9.4  
     9.5  static void keyboard_interrupt(int irq, void *dev_id, struct pt_regs *regs)
     9.6  {
     9.7 -    unsigned char status, scancode;
     9.8 +    unsigned char status=0, scancode;
     9.9      unsigned int work = 1000;
    9.10      unsigned long cpu_mask = 0, flags;
    9.11      struct task_struct *p = CONSOLE_OWNER;
    10.1 --- a/xen/drivers/ide/ide-geometry.c	Sun Jan 25 03:00:54 2004 +0000
    10.2 +++ b/xen/drivers/ide/ide-geometry.c	Wed Jan 28 18:29:04 2004 +0000
    10.3 @@ -89,9 +89,6 @@ void probe_cmos_for_drives (ide_hwif_t *
    10.4  
    10.5  #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
    10.6  
    10.7 -extern ide_drive_t * get_info_ptr(kdev_t);
    10.8 -extern unsigned long current_capacity (ide_drive_t *);
    10.9 -
   10.10  /*
   10.11   * If heads is nonzero: find a translation with this many heads and S=63.
   10.12   * Otherwise: find out how OnTrack Disk Manager would translate the disk.
    11.1 --- a/xen/drivers/message/fusion/mptscsih.c	Sun Jan 25 03:00:54 2004 +0000
    11.2 +++ b/xen/drivers/message/fusion/mptscsih.c	Wed Jan 28 18:29:04 2004 +0000
    11.3 @@ -204,7 +204,7 @@ static int	mptscsih_doDv(MPT_SCSI_HOST *
    11.4  static void	mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage);
    11.5  static void	mptscsih_fillbuf(char *buffer, int size, int index, int width);
    11.6  #endif
    11.7 -static int	mptscsih_setup(char *str);
    11.8 +/*static int	mptscsih_setup(char *str);*/
    11.9  static int	mptscsih_halt(struct notifier_block *nb, ulong event, void *buf);
   11.10  
   11.11  #if XENO_KILLED
   11.12 @@ -7853,6 +7853,7 @@ mptscsih_fillbuf(char *buffer, int size,
   11.13  }
   11.14  #endif /* ~MPTSCSIH_DISABLE_DOMAIN_VALIDATION */
   11.15  
   11.16 +#if 0
   11.17  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
   11.18  /* Commandline Parsing routines and defines.
   11.19   *
   11.20 @@ -7943,6 +7944,6 @@ static int
   11.21  	}
   11.22  	return 1;
   11.23  }
   11.24 -
   11.25  /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
   11.26 -
   11.27 +#endif
   11.28 +
    12.1 --- a/xen/drivers/net/e100/e100_main.c	Sun Jan 25 03:00:54 2004 +0000
    12.2 +++ b/xen/drivers/net/e100/e100_main.c	Wed Jan 28 18:29:04 2004 +0000
    12.3 @@ -143,9 +143,8 @@ static char *test_strings[] = {
    12.4  };
    12.5  #endif
    12.6  
    12.7 +#if 0
    12.8  static int e100_ethtool_led_blink(struct net_device *, struct ifreq *);
    12.9 -
   12.10 -#if 0
   12.11  static int e100_mii_ioctl(struct net_device *, struct ifreq *, int);
   12.12  #endif
   12.13  
   12.14 @@ -3584,6 +3583,7 @@ e100_ethtool_eeprom(struct net_device *d
   12.15  }
   12.16  #endif
   12.17  
   12.18 +#if 0
   12.19  #define E100_BLINK_INTERVAL	(HZ/4)
   12.20  /**
   12.21   * e100_led_control
   12.22 @@ -3666,6 +3666,7 @@ e100_ethtool_led_blink(struct net_device
   12.23  
   12.24  	return 0;
   12.25  }
   12.26 +#endif
   12.27  
   12.28  static inline int __devinit
   12.29  e100_10BaseT_adapter(struct e100_private *bdp)
    13.1 --- a/xen/drivers/net/tg3.c	Sun Jan 25 03:00:54 2004 +0000
    13.2 +++ b/xen/drivers/net/tg3.c	Wed Jan 28 18:29:04 2004 +0000
    13.3 @@ -5868,6 +5868,8 @@ static void tg3_set_rx_mode(struct net_d
    13.4  	spin_unlock_irq(&tp->lock);
    13.5  }
    13.6  
    13.7 +#ifdef ETHTOOL
    13.8 +
    13.9  #define TG3_REGDUMP_LEN		(32 * 1024)
   13.10  
   13.11  static int tg3_get_regs_len(struct net_device *dev)
   13.12 @@ -5939,6 +5941,8 @@ do {	p = orig_p + (reg);	\
   13.13  	spin_unlock_irq(&tp->lock);
   13.14  }
   13.15  
   13.16 +#endif /* ETHTOOL */
   13.17 +
   13.18  static int tg3_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
   13.19  {
   13.20    	struct tg3 *tp = dev->priv;
   13.21 @@ -6088,6 +6092,8 @@ static int tg3_nway_reset(struct net_dev
   13.22  	return r;
   13.23  }
   13.24    
   13.25 +#ifdef ETHTOOL
   13.26 +
   13.27  static void tg3_get_ringparam(struct net_device *dev, struct ethtool_ringparam *ering)
   13.28  {
   13.29  	struct tg3 *tp = dev->priv;
   13.30 @@ -6170,6 +6176,8 @@ static int tg3_set_pauseparam(struct net
   13.31  	return 0;
   13.32  }
   13.33    
   13.34 +#endif /* ETHTOOL */
   13.35 +
   13.36  static u32 tg3_get_rx_csum(struct net_device *dev)
   13.37  {
   13.38  	struct tg3 *tp = dev->priv;
    14.1 --- a/xen/drivers/net/tulip/tulip.h	Sun Jan 25 03:00:54 2004 +0000
    14.2 +++ b/xen/drivers/net/tulip/tulip.h	Wed Jan 28 18:29:04 2004 +0000
    14.3 @@ -416,7 +416,6 @@ void t21142_lnk_change(struct net_device
    14.4  void pnic2_lnk_change(struct net_device *dev, int csr5);
    14.5  void pnic2_timer(unsigned long data);
    14.6  void pnic2_start_nway(struct net_device *dev);
    14.7 -void pnic2_lnk_change(struct net_device *dev, int csr5);
    14.8  
    14.9  /* eeprom.c */
   14.10  void tulip_parse_eeprom(struct net_device *dev);
    15.1 --- a/xen/drivers/pci/pci.c	Sun Jan 25 03:00:54 2004 +0000
    15.2 +++ b/xen/drivers/pci/pci.c	Wed Jan 28 18:29:04 2004 +0000
    15.3 @@ -1261,8 +1261,6 @@ struct pci_bus * __devinit pci_add_new_b
    15.4  	return child;
    15.5  }
    15.6  
    15.7 -unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus);
    15.8 -
    15.9  /*
   15.10   * If it's a bridge, configure it and scan the bus behind it.
   15.11   * For CardBus bridges, we don't scan behind as the devices will
    16.1 --- a/xen/drivers/scsi/BusLogic.h	Sun Jan 25 03:00:54 2004 +0000
    16.2 +++ b/xen/drivers/scsi/BusLogic.h	Wed Jan 28 18:29:04 2004 +0000
    16.3 @@ -1801,8 +1801,6 @@ static void BusLogic_ReleaseResources(Bu
    16.4  static boolean BusLogic_TargetDeviceInquiry(BusLogic_HostAdapter_T *) __init;
    16.5  static void BusLogic_InitializeHostStructure(BusLogic_HostAdapter_T *,
    16.6  					     SCSI_Host_T *) __init;
    16.7 -int BusLogic_DetectHostAdapter(SCSI_Host_Template_T *) __init;
    16.8 -int BusLogic_ReleaseHostAdapter(SCSI_Host_T *) __init;
    16.9  static boolean BusLogic_ParseKeyword(char **, char *) __init;
   16.10  #if 0 /* XEN */
   16.11  static int BusLogic_ParseDriverOptions(char *) __init;
    17.1 --- a/xen/drivers/scsi/aic7xxx/aic79xx_osm.c	Sun Jan 25 03:00:54 2004 +0000
    17.2 +++ b/xen/drivers/scsi/aic7xxx/aic79xx_osm.c	Wed Jan 28 18:29:04 2004 +0000
    17.3 @@ -376,8 +376,8 @@ static void ahd_linux_dev_timed_unfreeze
    17.4  /* SAE */
    17.5  #if XENO_KILLED
    17.6  static void ahd_linux_sem_timeout(u_long arg);
    17.7 +static int  ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
    17.8  #endif
    17.9 -static int  ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag);
   17.10  
   17.11  static void ahd_linux_initialize_scsi_bus(struct ahd_softc *ahd);
   17.12  static void ahd_linux_select_queue_depth(struct Scsi_Host *host,
   17.13 @@ -2458,7 +2458,6 @@ ahd_linux_sem_timeout(u_long arg)
   17.14  	sem = (struct semaphore *)arg;
   17.15  	up(sem);
   17.16  }
   17.17 -#endif
   17.18  
   17.19  static int
   17.20  ahd_linux_queue_recovery_cmd(Scsi_Cmnd *cmd, scb_flag flag)
   17.21 @@ -2733,6 +2732,7 @@ done:
   17.22  	spin_lock_irq(&io_request_lock);
   17.23  	return (retval);
   17.24  }
   17.25 +#endif /* XENO_KILLED */
   17.26  
   17.27  static void
   17.28  ahd_linux_dev_timed_unfreeze(u_long arg)
    18.1 --- a/xen/drivers/scsi/aic7xxx/aic79xx_osm.h	Sun Jan 25 03:00:54 2004 +0000
    18.2 +++ b/xen/drivers/scsi/aic7xxx/aic79xx_osm.h	Wed Jan 28 18:29:04 2004 +0000
    18.3 @@ -42,6 +42,7 @@
    18.4  #ifndef _AIC79XX_LINUX_H_
    18.5  #define _AIC79XX_LINUX_H_
    18.6  
    18.7 +#include <xeno/config.h>
    18.8  #include <xeno/types.h>
    18.9  #include <xeno/blk.h>
   18.10  #include <xeno/blkdev.h>
   18.11 @@ -1123,8 +1124,11 @@ ahd_flush_device_writes(struct ahd_softc
   18.12  /*
   18.13   * Always "return" 0 for success.
   18.14   */
   18.15 -#define ahd_pci_set_dma_mask(dev_softc, mask)	\
   18.16 -	(((dev_softc)->dma_mask = mask) && 0)
   18.17 +static inline int ahd_pci_set_dma_mask(struct pci_dev *dev_softc, u64 mask)
   18.18 +{
   18.19 +    dev_softc->dma_mask = mask;
   18.20 +    return 0;
   18.21 +}
   18.22  #endif
   18.23  /*********************** Transaction Access Wrappers **************************/
   18.24  static __inline void ahd_set_transaction_status(struct scb *, uint32_t);
    19.1 --- a/xen/drivers/scsi/constants.h	Sun Jan 25 03:00:54 2004 +0000
    19.2 +++ b/xen/drivers/scsi/constants.h	Wed Jan 28 18:29:04 2004 +0000
    19.3 @@ -1,6 +1,5 @@
    19.4  #ifndef _CONSTANTS_H
    19.5  #define _CONSTANTS_H
    19.6  extern int print_msg(unsigned char *);
    19.7 -extern void print_status(int);
    19.8  extern void print_Scsi_Cmnd (Scsi_Cmnd *);
    19.9  #endif /* def _CONSTANTS_H */
    20.1 --- a/xen/drivers/scsi/megaraid.c	Sun Jan 25 03:00:54 2004 +0000
    20.2 +++ b/xen/drivers/scsi/megaraid.c	Wed Jan 28 18:29:04 2004 +0000
    20.3 @@ -5407,7 +5407,7 @@ mega_del_logdrv(mega_host_config *this_h
    20.4  #endif
    20.5  }
    20.6  
    20.7 -
    20.8 +#if XENO_KILLED_DELLOGDRV
    20.9  static int
   20.10  mega_do_del_logdrv(mega_host_config *this_hba, int logdrv)
   20.11  {
   20.12 @@ -5442,6 +5442,7 @@ mega_do_del_logdrv(mega_host_config *thi
   20.13  
   20.14  	return rval;
   20.15  }
   20.16 +#endif
   20.17  
   20.18  #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
   20.19  void *
    21.1 --- a/xen/drivers/scsi/megaraid.h	Sun Jan 25 03:00:54 2004 +0000
    21.2 +++ b/xen/drivers/scsi/megaraid.h	Wed Jan 28 18:29:04 2004 +0000
    21.3 @@ -1036,7 +1036,7 @@ static void mega_get_boot_drv(mega_host_
    21.4  static int mega_get_ldrv_num(mega_host_config *, Scsi_Cmnd *, int);
    21.5  static int mega_support_random_del(mega_host_config *);
    21.6  static int mega_del_logdrv(mega_host_config *, int);
    21.7 -static int mega_do_del_logdrv(mega_host_config *, int);
    21.8 +/*static int mega_do_del_logdrv(mega_host_config *, int);*/
    21.9  
   21.10  #endif
   21.11  
    22.1 --- a/xen/drivers/scsi/scsi.c	Sun Jan 25 03:00:54 2004 +0000
    22.2 +++ b/xen/drivers/scsi/scsi.c	Wed Jan 28 18:29:04 2004 +0000
    22.3 @@ -147,12 +147,6 @@ const char *const scsi_device_types[MAX_
    22.4  	"Enclosure        ",
    22.5  };
    22.6  
    22.7 -/* 
    22.8 - * Function prototypes.
    22.9 - */
   22.10 -extern void scsi_times_out(Scsi_Cmnd * SCpnt);
   22.11 -void scsi_build_commandblocks(Scsi_Device * SDpnt);
   22.12 -
   22.13  /*
   22.14   * These are the interface to the old error handling code.  It should go away
   22.15   * someday soon.
    23.1 --- a/xen/drivers/scsi/scsi_obsolete.c	Sun Jan 25 03:00:54 2004 +0000
    23.2 +++ b/xen/drivers/scsi/scsi_obsolete.c	Wed Jan 28 18:29:04 2004 +0000
    23.3 @@ -85,8 +85,6 @@ extern void scsi_old_done(Scsi_Cmnd * SC
    23.4  int update_timeout(Scsi_Cmnd *, int);
    23.5  extern void scsi_old_times_out(Scsi_Cmnd * SCpnt);
    23.6  
    23.7 -extern int scsi_dispatch_cmd(Scsi_Cmnd * SCpnt);
    23.8 -
    23.9  #define SCSI_BLOCK(HOST) (HOST->can_queue && HOST->host_busy >= HOST->can_queue)
   23.10  
   23.11  static unsigned char generic_sense[6] =
    24.1 --- a/xen/drivers/scsi/scsi_syms.c	Sun Jan 25 03:00:54 2004 +0000
    24.2 +++ b/xen/drivers/scsi/scsi_syms.c	Wed Jan 28 18:29:04 2004 +0000
    24.3 @@ -99,7 +99,5 @@ EXPORT_SYMBOL(scsi_device_types);
    24.4  /*
    24.5   * Externalize timers so that HBAs can safely start/restart commands.
    24.6   */
    24.7 -extern void scsi_add_timer(Scsi_Cmnd *, int, void ((*) (Scsi_Cmnd *)));
    24.8 -extern int scsi_delete_timer(Scsi_Cmnd *);
    24.9  EXPORT_SYMBOL(scsi_add_timer);
   24.10  EXPORT_SYMBOL(scsi_delete_timer);
    25.1 --- a/xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h	Sun Jan 25 03:00:54 2004 +0000
    25.2 +++ b/xen/drivers/scsi/sym53c8xx_2/sym53c8xx.h	Wed Jan 28 18:29:04 2004 +0000
    25.3 @@ -181,7 +181,7 @@ int sym53c8xx_release(struct Scsi_Host *
    25.4  /*
    25.5   *  These options are not tunable from 'make config'
    25.6   */
    25.7 -#if 1
    25.8 +#if 0
    25.9  #define	SYM_LINUX_PROC_INFO_SUPPORT
   25.10  #define SYM_LINUX_BOOT_COMMAND_LINE_SUPPORT
   25.11  #define SYM_LINUX_USER_COMMAND_SUPPORT
    26.1 --- a/xen/include/asm-i386/domain_page.h	Sun Jan 25 03:00:54 2004 +0000
    26.2 +++ b/xen/include/asm-i386/domain_page.h	Wed Jan 28 18:29:04 2004 +0000
    26.3 @@ -4,6 +4,9 @@
    26.4   * Allow temporary mapping of domain page frames into Xen space.
    26.5   */
    26.6  
    26.7 +#ifndef __ASM_DOMAIN_PAGE_H__
    26.8 +#define __ASM_DOMAIN_PAGE_H__
    26.9 +
   26.10  #include <xeno/config.h>
   26.11  #include <xeno/sched.h>
   26.12  
   26.13 @@ -23,21 +26,4 @@ extern void *map_domain_mem(unsigned lon
   26.14   */
   26.15  extern void unmap_domain_mem(void *va);
   26.16  
   26.17 -#if 0
   26.18 -#define MAPCACHE_HASH(_pfn)     ((_pfn) & (MAPCACHE_ENTRIES-1))
   26.19 -static inline void *map_domain_mem(unsigned long pa)
   26.20 -{
   26.21 -    unsigned long pfn = pa >> PAGE_SHIFT;
   26.22 -    unsigned long hash = MAPCACHE_HASH(pfn);
   26.23 -    unsigned long *pent = mapcache[smp_processor_id()] + hash;
   26.24 -    void *va = (void *)(MAPCACHE_VIRT_START + 
   26.25 -                        (hash << PAGE_SHIFT) + 
   26.26 -                        (pa & ~PAGE_MASK));
   26.27 -    if ( (*pent & PAGE_MASK) != (pfn << PAGE_SHIFT) )
   26.28 -    {
   26.29 -        *pent = (pfn << PAGE_SHIFT) | __PAGE_HYPERVISOR;
   26.30 -        __flush_tlb_one(va);
   26.31 -    }
   26.32 -    return va;
   26.33 -}
   26.34 -#endif
   26.35 +#endif /* __ASM_DOMAIN_PAGE_H__ */
    27.1 --- a/xen/include/asm-i386/mpspec.h	Sun Jan 25 03:00:54 2004 +0000
    27.2 +++ b/xen/include/asm-i386/mpspec.h	Wed Jan 28 18:29:04 2004 +0000
    27.3 @@ -206,18 +206,12 @@ extern int *mp_bus_id_to_pci_bus;
    27.4  extern int quad_local_to_mp_bus_id [NR_CPUS/4][4];
    27.5  
    27.6  extern unsigned int boot_cpu_physical_apicid;
    27.7 -extern unsigned long phys_cpu_present_map;
    27.8  extern int smp_found_config;
    27.9  extern void find_smp_config (void);
   27.10  extern void get_smp_config (void);
   27.11 -extern int nr_ioapics;
   27.12  extern int apic_version [MAX_APICS];
   27.13 -extern int mp_irq_entries;
   27.14 -extern struct mpc_config_intsrc *mp_irqs;
   27.15 -extern int mpc_default_type;
   27.16  extern int mp_current_pci_id;
   27.17  extern unsigned long mp_lapic_addr;
   27.18 -extern int pic_mode;
   27.19  
   27.20  #endif
   27.21  
    28.1 --- a/xen/include/asm-i386/smp.h	Sun Jan 25 03:00:54 2004 +0000
    28.2 +++ b/xen/include/asm-i386/smp.h	Wed Jan 28 18:29:04 2004 +0000
    28.3 @@ -54,7 +54,6 @@ extern volatile int logical_apicid_to_cp
    28.4   * General functions that each host system must provide.
    28.5   */
    28.6   
    28.7 -extern void smp_boot_cpus(void);
    28.8  extern void smp_store_cpu_info(int id);		/* Store per CPU info (like the initial udelay numbers */
    28.9  
   28.10  /*
    29.1 --- a/xen/include/scsi/scsicam.h	Sun Jan 25 03:00:54 2004 +0000
    29.2 +++ b/xen/include/scsi/scsicam.h	Wed Jan 28 18:29:04 2004 +0000
    29.3 @@ -14,6 +14,4 @@
    29.4  #define SCSICAM_H
    29.5  #include <xeno/kdev_t.h>
    29.6  extern int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip);
    29.7 -extern int scsi_partsize(struct buffer_head *bh, unsigned long capacity,
    29.8 -           unsigned int  *cyls, unsigned int *hds, unsigned int *secs);
    29.9  #endif /* def SCSICAM_H */