ia64/xen-unstable

changeset 503:6be2874c3f07

bitkeeper revision 1.272 (3f056927K6c1zv1tNa8i4njBXcuuQg)

Fix a random bunch of compiler warnings all over the tree.
author sos22@labyrinth.cl.cam.ac.uk
date Fri Jul 04 11:46:47 2003 +0000 (2003-07-04)
parents bb7333faba06
children aeb88ca14b2d
files .rootkeys BitKeeper/etc/ignore xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_ide.c xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_scsi.c xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_core.c xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c xenolinux-2.4.21-sparse/arch/xeno/kernel/process.c xenolinux-2.4.21-sparse/arch/xeno/kernel/traps.c xenolinux-2.4.21-sparse/arch/xeno/mm/hypervisor.c xenolinux-2.4.21-sparse/arch/xeno/mm/init.c xenolinux-2.4.21-sparse/include/asm-xeno/processor.h xenolinux-2.4.21-sparse/include/linux/blk.h
line diff
     1.1 --- a/.rootkeys	Fri Jul 04 11:23:03 2003 +0000
     1.2 +++ b/.rootkeys	Fri Jul 04 11:46:47 2003 +0000
     1.3 @@ -568,6 +568,7 @@ 3e5a4e67AJPjW-zL7p-xWuA6IVeH1g xenolinux
     1.4  3e5a4e68uJz-xI0IBVMD7xRLQKJDFg xenolinux-2.4.21-sparse/include/asm-xeno/segment.h
     1.5  3e5a4e68Nfdh6QcOKUTGCaYkf2LmYA xenolinux-2.4.21-sparse/include/asm-xeno/smp.h
     1.6  3e5a4e68mTr0zcp9SXDbnd-XLrrfxw xenolinux-2.4.21-sparse/include/asm-xeno/system.h
     1.7 +3f056927gMHl7mWB89rb73JahbhQIA xenolinux-2.4.21-sparse/include/linux/blk.h
     1.8  3e5a4e68WLX3B8owTvktP3HHOtznPQ xenolinux-2.4.21-sparse/include/linux/major.h
     1.9  3e5a4e686V0nioX2ZpFf056sgvdiQw xenolinux-2.4.21-sparse/include/linux/sunrpc/debug.h
    1.10  3e5a4e68W_hpMlM3u_-QOKMp3gzcwQ xenolinux-2.4.21-sparse/init/do_mounts.c
     2.1 --- a/BitKeeper/etc/ignore	Fri Jul 04 11:23:03 2003 +0000
     2.2 +++ b/BitKeeper/etc/ignore	Fri Jul 04 11:46:47 2003 +0000
     2.3 @@ -426,3 +426,4 @@ xen/tools/figlet/figlet
     2.4  xenolinux-2.4.16-sparse/arch/xeno/drivers/block/Makefile.orig
     2.5  xenolinux-2.4.16-sparse/arch/xeno/drivers/block/block.c.orig
     2.6  xenolinux-2.4.16-sparse/scripts/kconfig.tk
     2.7 +xenolinux-2.4.21-sparse/include/linux/blk.h~
     3.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_ide.c	Fri Jul 04 11:23:03 2003 +0000
     3.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_ide.c	Fri Jul 04 11:46:47 2003 +0000
     3.3 @@ -125,7 +125,7 @@ static void setup_major(struct gendisk *
     3.4          }
     3.5      }
     3.6  
     3.7 -    return gd;
     3.8 +    return;
     3.9  }
    3.10  
    3.11  
     4.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_scsi.c	Fri Jul 04 11:23:03 2003 +0000
     4.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_scsi.c	Fri Jul 04 11:46:47 2003 +0000
     4.3 @@ -70,7 +70,7 @@ int xlscsi_init(xen_disk_info_t *xdi)
     4.4      blksize_size[XLSCSI_MAJOR]  = xlscsi_blksize_size;
     4.5      hardsect_size[XLSCSI_MAJOR] = xlscsi_hardsect_size;
     4.6      max_sectors[XLSCSI_MAJOR]   = xlscsi_max_sectors;
     4.7 -    read_ahead[XLSCSI_MAJOR]    = NULL; //XXX8;
     4.8 +    read_ahead[XLSCSI_MAJOR]    = 0; //XXX8;
     4.9  
    4.10      blk_init_queue(BLK_DEFAULT_QUEUE(XLSCSI_MAJOR), do_xlblk_request);
    4.11  
     5.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c	Fri Jul 04 11:23:03 2003 +0000
     5.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/block/xl_segment_proc.c	Fri Jul 04 11:46:47 2003 +0000
     5.3 @@ -10,6 +10,8 @@
     5.4  
     5.5  static struct proc_dir_entry *vhd;
     5.6  
     5.7 +extern unsigned short xldev_to_physdev(kdev_t xldev);
     5.8 +
     5.9  static int proc_read_vhd(char *page, char **start, off_t off,
    5.10  			 int count, int *eof, void *data)
    5.11  {
     6.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c	Fri Jul 04 11:23:03 2003 +0000
     6.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/console/console.c	Fri Jul 04 11:46:47 2003 +0000
     6.3 @@ -61,7 +61,9 @@ static kdev_t xen_console_device(struct 
     6.4  }
     6.5  
     6.6  static struct console xen_console_info = {
     6.7 -    name:		"xen_console",
     6.8 +    name:		"xencons", /* Used to be xen_console, but we're only
     6.9 +				      actually allowed 8 charcters including
    6.10 +				      the terminator... */
    6.11      write:		xen_console_write,
    6.12      device:             xen_console_device,
    6.13      flags:		CON_PRINTBUFFER,
     7.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_core.c	Fri Jul 04 11:23:03 2003 +0000
     7.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_core.c	Fri Jul 04 11:46:47 2003 +0000
     7.3 @@ -64,7 +64,6 @@ extern struct file_operations dom0_phd_f
     7.4  
     7.5  struct proc_dir_entry *xeno_base;
     7.6  static struct proc_dir_entry *dom0_cmd_intf;
     7.7 -static struct proc_dir_entry *proc_ft;
     7.8  static struct proc_dir_entry *dom_list_intf;
     7.9  
    7.10  unsigned long direct_mmap(unsigned long, unsigned long, pgprot_t, int, int);
    7.11 @@ -341,8 +340,6 @@ static int cmd_write_proc(struct file *f
    7.12      int ret = 0;
    7.13      struct proc_dir_entry * new_dom_id;
    7.14      dom0_newdomain_t * params;
    7.15 -    int i;
    7.16 -    unsigned long p;
    7.17      
    7.18      copy_from_user(&op, buffer, sizeof(dom0_op_t));
    7.19  
    7.20 @@ -359,7 +356,7 @@ static int cmd_write_proc(struct file *f
    7.21      }
    7.22      else if ( op.cmd == DO_PGUPDATES )
    7.23      {
    7.24 -        ret = HYPERVISOR_pt_update(op.u.pgupdate.pgt_update_arr,
    7.25 +        ret = HYPERVISOR_pt_update((void *)op.u.pgupdate.pgt_update_arr,
    7.26                                     op.u.pgupdate.num_pgt_updates);
    7.27      }
    7.28      else
    7.29 @@ -460,7 +457,7 @@ static int xeno_domains_show(struct seq_
    7.30                di -> u.getdominfo.state,
    7.31                di -> u.getdominfo.hyp_events,
    7.32                di -> u.getdominfo.mcu_advance,
    7.33 -              di -> u.getdominfo.pg_head,
    7.34 +              (void *)di -> u.getdominfo.pg_head,
    7.35                di -> u.getdominfo.tot_pages,
    7.36                di -> u.getdominfo.name);
    7.37  
     8.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Fri Jul 04 11:23:03 2003 +0000
     8.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/drivers/dom0/dom0_memory.c	Fri Jul 04 11:46:47 2003 +0000
     8.3 @@ -127,7 +127,7 @@ int direct_remap_disc_page_range(unsigne
     8.4                  unsigned long first_pg, int tot_pages, pgprot_t prot)
     8.5  {
     8.6      dom0_op_t dom0_op;
     8.7 -    unsigned long *pfns = get_free_page(GFP_KERNEL);
     8.8 +    unsigned long *pfns = (unsigned long *)get_free_page(GFP_KERNEL);
     8.9      unsigned long start = from;
    8.10      int pages, i;
    8.11  
    8.12 @@ -154,7 +154,7 @@ int direct_remap_disc_page_range(unsigne
    8.13      }
    8.14  
    8.15  out:
    8.16 -    free_page(pfns);
    8.17 +    free_page((unsigned long)pfns);
    8.18      return tot_pages;
    8.19  } 
    8.20             
     9.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/kernel/process.c	Fri Jul 04 11:23:03 2003 +0000
     9.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/kernel/process.c	Fri Jul 04 11:46:47 2003 +0000
     9.3 @@ -347,8 +347,7 @@ void dump_thread(struct pt_regs * regs, 
     9.4   */
     9.5  void __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
     9.6  {
     9.7 -    struct thread_struct *prev = &prev_p->thread,
     9.8 -        *next = &next_p->thread;
     9.9 +    struct thread_struct *next = &next_p->thread;
    9.10  
    9.11      __cli();
    9.12  
    10.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/kernel/traps.c	Fri Jul 04 11:23:03 2003 +0000
    10.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/kernel/traps.c	Fri Jul 04 11:46:47 2003 +0000
    10.3 @@ -168,7 +168,6 @@ void show_stack(unsigned long * esp)
    10.4  
    10.5  void show_registers(struct pt_regs *regs)
    10.6  {
    10.7 -	int i;
    10.8  	int in_kernel = 1;
    10.9  	unsigned long esp;
   10.10  	unsigned short ss;
   10.11 @@ -200,19 +199,22 @@ void show_registers(struct pt_regs *regs
   10.12  		show_stack((unsigned long*)esp);
   10.13  
   10.14  #if 0
   10.15 -		printk("\nCode: ");
   10.16 -		if(regs->eip < PAGE_OFFSET)
   10.17 -			goto bad;
   10.18 +                {
   10.19 +                        int i;
   10.20 +			printk("\nCode: ");
   10.21 +			if(regs->eip < PAGE_OFFSET)
   10.22 +			        goto bad;
   10.23  
   10.24 -		for(i=0;i<20;i++)
   10.25 -		{
   10.26 -			unsigned char c;
   10.27 -			if(__get_user(c, &((unsigned char*)regs->eip)[i])) {
   10.28 +			for(i=0;i<20;i++)
   10.29 +			{
   10.30 +			        unsigned char c;
   10.31 +			        if(__get_user(c, &((unsigned char*)regs->eip)[i])) {
   10.32  bad:
   10.33 -				printk(" Bad EIP value.");
   10.34 -				break;
   10.35 +				        printk(" Bad EIP value.");
   10.36 +					break;
   10.37 +				}
   10.38 +				printk("%02x ", c);
   10.39  			}
   10.40 -			printk("%02x ", c);
   10.41  		}
   10.42  #endif
   10.43  	}
    11.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/mm/hypervisor.c	Fri Jul 04 11:23:03 2003 +0000
    11.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/mm/hypervisor.c	Fri Jul 04 11:46:47 2003 +0000
    11.3 @@ -96,7 +96,7 @@ void MULTICALL_flush_page_update_queue(v
    11.4  #if PT_UPDATE_DEBUG > 0
    11.5          DEBUG_allow_pt_reads();
    11.6  #endif
    11.7 -        queue_multicall2(__HYPERVISOR_pt_update, update_queue, idx);
    11.8 +        queue_multicall2(__HYPERVISOR_pt_update, (unsigned long)update_queue, idx);
    11.9          idx = 0;
   11.10      }
   11.11      spin_unlock_irqrestore(&update_lock, flags);
    12.1 --- a/xenolinux-2.4.21-sparse/arch/xeno/mm/init.c	Fri Jul 04 11:23:03 2003 +0000
    12.2 +++ b/xenolinux-2.4.21-sparse/arch/xeno/mm/init.c	Fri Jul 04 11:46:47 2003 +0000
    12.3 @@ -284,7 +284,11 @@ static void __init set_max_mapnr_init(vo
    12.4  
    12.5  static int __init free_pages_init(void)
    12.6  {
    12.7 -	int bad_ppro, reservedpages, pfn;
    12.8 +#ifdef CONFIG_HIGHMEM
    12.9 +#error Where is this supposed to be initialised?
   12.10 +        int bad_ppro;
   12.11 +#endif
   12.12 +	int reservedpages, pfn;
   12.13  
   12.14  	/* this will put all low memory onto the freelists */
   12.15  	totalram_pages += free_all_bootmem();
    13.1 --- a/xenolinux-2.4.21-sparse/include/asm-xeno/processor.h	Fri Jul 04 11:23:03 2003 +0000
    13.2 +++ b/xenolinux-2.4.21-sparse/include/asm-xeno/processor.h	Fri Jul 04 11:46:47 2003 +0000
    13.3 @@ -372,7 +372,7 @@ struct thread_struct {
    13.4  };
    13.5  
    13.6  #define INIT_THREAD  { sizeof(init_stack) + (long) &init_stack, \
    13.7 -                       0, 0, 0, 0, 0, 0, {0}, 0, 0, 0, {0}, 0, 0, 0, 0, 0 }
    13.8 +                       0, 0, 0, 0, 0, 0, {0}, 0, 0, 0, {{0}}, 0, 0, 0, 0, 0 }
    13.9  
   13.10  #define INIT_TSS  {						\
   13.11  	0,0, /* back_link, __blh */				\
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/xenolinux-2.4.21-sparse/include/linux/blk.h	Fri Jul 04 11:46:47 2003 +0000
    14.3 @@ -0,0 +1,411 @@
    14.4 +#ifndef _BLK_H
    14.5 +#define _BLK_H
    14.6 +
    14.7 +#include <linux/blkdev.h>
    14.8 +#include <linux/locks.h>
    14.9 +#include <linux/config.h>
   14.10 +#include <linux/spinlock.h>
   14.11 +
   14.12 +/*
   14.13 + * Spinlock for protecting the request queue which
   14.14 + * is mucked around with in interrupts on potentially
   14.15 + * multiple CPU's..
   14.16 + */
   14.17 +extern spinlock_t io_request_lock;
   14.18 +
   14.19 +/*
   14.20 + * Initialization functions.
   14.21 + */
   14.22 +extern int isp16_init(void);
   14.23 +extern int cdu31a_init(void);
   14.24 +extern int acsi_init(void);
   14.25 +extern int mcd_init(void);
   14.26 +extern int mcdx_init(void);
   14.27 +extern int sbpcd_init(void);
   14.28 +extern int aztcd_init(void);
   14.29 +extern int sony535_init(void);
   14.30 +extern int gscd_init(void);
   14.31 +extern int cm206_init(void);
   14.32 +extern int optcd_init(void);
   14.33 +extern int sjcd_init(void);
   14.34 +extern int cdi_init(void);
   14.35 +extern int hd_init(void);
   14.36 +extern int ide_init(void);
   14.37 +extern int xd_init(void);
   14.38 +extern int mfm_init(void);
   14.39 +extern int loop_init(void);
   14.40 +extern int md_init(void);
   14.41 +extern int ap_init(void);
   14.42 +extern int ddv_init(void);
   14.43 +extern int z2_init(void);
   14.44 +extern int swim3_init(void);
   14.45 +extern int swimiop_init(void);
   14.46 +extern int amiga_floppy_init(void);
   14.47 +extern int atari_floppy_init(void);
   14.48 +extern int ez_init(void);
   14.49 +extern int bpcd_init(void);
   14.50 +extern int ps2esdi_init(void);
   14.51 +extern int jsfd_init(void);
   14.52 +extern int viodasd_init(void);
   14.53 +extern int viocd_init(void);
   14.54 +
   14.55 +#if defined(CONFIG_ARCH_S390)
   14.56 +extern int dasd_init(void);
   14.57 +extern int xpram_init(void);
   14.58 +extern int tapeblock_init(void);
   14.59 +#endif /* CONFIG_ARCH_S390 */
   14.60 +
   14.61 +#if defined(CONFIG_XENOLINUX_BLOCK)
   14.62 +extern int xlblk_init(void);
   14.63 +extern int xlseg_init(void);
   14.64 +extern int xlseg_proc_init(void);
   14.65 +#endif /* CONFIG_ARCH_XENO */
   14.66 +
   14.67 +extern void set_device_ro(kdev_t dev,int flag);
   14.68 +void add_blkdev_randomness(int major);
   14.69 +
   14.70 +extern int floppy_init(void);
   14.71 +extern int rd_doload;		/* 1 = load ramdisk, 0 = don't load */
   14.72 +extern int rd_prompt;		/* 1 = prompt for ramdisk, 0 = don't prompt */
   14.73 +extern int rd_image_start;	/* starting block # of image */
   14.74 +
   14.75 +#ifdef CONFIG_BLK_DEV_INITRD
   14.76 +
   14.77 +#define INITRD_MINOR 250 /* shouldn't collide with /dev/ram* too soon ... */
   14.78 +
   14.79 +extern unsigned long initrd_start,initrd_end;
   14.80 +extern int initrd_below_start_ok; /* 1 if it is not an error if initrd_start < memory_start */
   14.81 +void initrd_init(void);
   14.82 +
   14.83 +#endif
   14.84 +
   14.85 +		 
   14.86 +/*
   14.87 + * end_request() and friends. Must be called with the request queue spinlock
   14.88 + * acquired. All functions called within end_request() _must_be_ atomic.
   14.89 + *
   14.90 + * Several drivers define their own end_request and call
   14.91 + * end_that_request_first() and end_that_request_last()
   14.92 + * for parts of the original function. This prevents
   14.93 + * code duplication in drivers.
   14.94 + */
   14.95 +
   14.96 +static inline void blkdev_dequeue_request(struct request * req)
   14.97 +{
   14.98 +	list_del(&req->queue);
   14.99 +}
  14.100 +
  14.101 +int end_that_request_first(struct request *req, int uptodate, char *name);
  14.102 +void end_that_request_last(struct request *req);
  14.103 +
  14.104 +#if defined(MAJOR_NR) || defined(IDE_DRIVER)
  14.105 +
  14.106 +#undef DEVICE_ON
  14.107 +#undef DEVICE_OFF
  14.108 +
  14.109 +/*
  14.110 + * Add entries as needed.
  14.111 + */
  14.112 +
  14.113 +#ifdef IDE_DRIVER
  14.114 +
  14.115 +#define DEVICE_NR(device)	(MINOR(device) >> PARTN_BITS)
  14.116 +#define DEVICE_NAME "ide"
  14.117 +
  14.118 +#elif (MAJOR_NR == RAMDISK_MAJOR)
  14.119 +
  14.120 +/* ram disk */
  14.121 +#define DEVICE_NAME "ramdisk"
  14.122 +#define DEVICE_NR(device) (MINOR(device))
  14.123 +#define DEVICE_NO_RANDOM
  14.124 +
  14.125 +#elif (MAJOR_NR == Z2RAM_MAJOR)
  14.126 +
  14.127 +/* Zorro II Ram */
  14.128 +#define DEVICE_NAME "Z2RAM"
  14.129 +#define DEVICE_REQUEST do_z2_request
  14.130 +#define DEVICE_NR(device) (MINOR(device))
  14.131 +
  14.132 +#elif (MAJOR_NR == FLOPPY_MAJOR)
  14.133 +
  14.134 +static void floppy_off(unsigned int nr);
  14.135 +
  14.136 +#define DEVICE_NAME "floppy"
  14.137 +#define DEVICE_INTR do_floppy
  14.138 +#define DEVICE_REQUEST do_fd_request
  14.139 +#define DEVICE_NR(device) ( (MINOR(device) & 3) | ((MINOR(device) & 0x80 ) >> 5 ))
  14.140 +#define DEVICE_OFF(device) floppy_off(DEVICE_NR(device))
  14.141 +
  14.142 +#elif (MAJOR_NR == HD_MAJOR)
  14.143 +
  14.144 +/* Hard disk:  timeout is 6 seconds. */
  14.145 +#define DEVICE_NAME "hard disk"
  14.146 +#define DEVICE_INTR do_hd
  14.147 +#define TIMEOUT_VALUE (6*HZ)
  14.148 +#define DEVICE_REQUEST do_hd_request
  14.149 +#define DEVICE_NR(device) (MINOR(device)>>6)
  14.150 +
  14.151 +#elif (SCSI_DISK_MAJOR(MAJOR_NR))
  14.152 +
  14.153 +#define DEVICE_NAME "scsidisk"
  14.154 +#define TIMEOUT_VALUE (2*HZ)
  14.155 +#define DEVICE_NR(device) (((MAJOR(device) & SD_MAJOR_MASK) << (8 - 4)) + (MINOR(device) >> 4))
  14.156 +
  14.157 +/* Kludge to use the same number for both char and block major numbers */
  14.158 +#elif  (MAJOR_NR == MD_MAJOR) && defined(MD_DRIVER)
  14.159 +
  14.160 +#define DEVICE_NAME "Multiple devices driver"
  14.161 +#define DEVICE_REQUEST do_md_request
  14.162 +#define DEVICE_NR(device) (MINOR(device))
  14.163 +
  14.164 +#elif (MAJOR_NR == SCSI_TAPE_MAJOR)
  14.165 +
  14.166 +#define DEVICE_NAME "scsitape"
  14.167 +#define DEVICE_INTR do_st  
  14.168 +#define DEVICE_NR(device) (MINOR(device) & 0x7f)
  14.169 +
  14.170 +#elif (MAJOR_NR == OSST_MAJOR)
  14.171 +
  14.172 +#define DEVICE_NAME "onstream" 
  14.173 +#define DEVICE_INTR do_osst
  14.174 +#define DEVICE_NR(device) (MINOR(device) & 0x7f) 
  14.175 +#define DEVICE_ON(device) 
  14.176 +#define DEVICE_OFF(device) 
  14.177 +
  14.178 +#elif (MAJOR_NR == SCSI_CDROM_MAJOR)
  14.179 +
  14.180 +#define DEVICE_NAME "CD-ROM"
  14.181 +#define DEVICE_NR(device) (MINOR(device))
  14.182 +
  14.183 +#elif (MAJOR_NR == XT_DISK_MAJOR)
  14.184 +
  14.185 +#define DEVICE_NAME "xt disk"
  14.186 +#define DEVICE_REQUEST do_xd_request
  14.187 +#define DEVICE_NR(device) (MINOR(device) >> 6)
  14.188 +
  14.189 +#elif (MAJOR_NR == PS2ESDI_MAJOR)
  14.190 +
  14.191 +#define DEVICE_NAME "PS/2 ESDI"
  14.192 +#define DEVICE_REQUEST do_ps2esdi_request
  14.193 +#define DEVICE_NR(device) (MINOR(device) >> 6)
  14.194 +
  14.195 +#elif (MAJOR_NR == CDU31A_CDROM_MAJOR)
  14.196 +
  14.197 +#define DEVICE_NAME "CDU31A"
  14.198 +#define DEVICE_REQUEST do_cdu31a_request
  14.199 +#define DEVICE_NR(device) (MINOR(device))
  14.200 +
  14.201 +#elif (MAJOR_NR == ACSI_MAJOR) && (defined(CONFIG_ATARI_ACSI) || defined(CONFIG_ATARI_ACSI_MODULE))
  14.202 +
  14.203 +#define DEVICE_NAME "ACSI"
  14.204 +#define DEVICE_INTR do_acsi
  14.205 +#define DEVICE_REQUEST do_acsi_request
  14.206 +#define DEVICE_NR(device) (MINOR(device) >> 4)
  14.207 +
  14.208 +#elif (MAJOR_NR == MITSUMI_CDROM_MAJOR)
  14.209 +
  14.210 +#define DEVICE_NAME "Mitsumi CD-ROM"
  14.211 +/* #define DEVICE_INTR do_mcd */
  14.212 +#define DEVICE_REQUEST do_mcd_request
  14.213 +#define DEVICE_NR(device) (MINOR(device))
  14.214 +
  14.215 +#elif (MAJOR_NR == MITSUMI_X_CDROM_MAJOR)
  14.216 +
  14.217 +#define DEVICE_NAME "Mitsumi CD-ROM"
  14.218 +/* #define DEVICE_INTR do_mcdx */
  14.219 +#define DEVICE_REQUEST do_mcdx_request
  14.220 +#define DEVICE_NR(device) (MINOR(device))
  14.221 +
  14.222 +#elif (MAJOR_NR == MATSUSHITA_CDROM_MAJOR)
  14.223 +
  14.224 +#define DEVICE_NAME "Matsushita CD-ROM controller #1"
  14.225 +#define DEVICE_REQUEST do_sbpcd_request
  14.226 +#define DEVICE_NR(device) (MINOR(device))
  14.227 +
  14.228 +#elif (MAJOR_NR == MATSUSHITA_CDROM2_MAJOR)
  14.229 +
  14.230 +#define DEVICE_NAME "Matsushita CD-ROM controller #2"
  14.231 +#define DEVICE_REQUEST do_sbpcd2_request
  14.232 +#define DEVICE_NR(device) (MINOR(device))
  14.233 +
  14.234 +#elif (MAJOR_NR == MATSUSHITA_CDROM3_MAJOR)
  14.235 +
  14.236 +#define DEVICE_NAME "Matsushita CD-ROM controller #3"
  14.237 +#define DEVICE_REQUEST do_sbpcd3_request
  14.238 +#define DEVICE_NR(device) (MINOR(device))
  14.239 +
  14.240 +#elif (MAJOR_NR == MATSUSHITA_CDROM4_MAJOR)
  14.241 +
  14.242 +#define DEVICE_NAME "Matsushita CD-ROM controller #4"
  14.243 +#define DEVICE_REQUEST do_sbpcd4_request
  14.244 +#define DEVICE_NR(device) (MINOR(device))
  14.245 +
  14.246 +#elif (MAJOR_NR == AZTECH_CDROM_MAJOR)
  14.247 +
  14.248 +#define DEVICE_NAME "Aztech CD-ROM"
  14.249 +#define DEVICE_REQUEST do_aztcd_request
  14.250 +#define DEVICE_NR(device) (MINOR(device))
  14.251 +
  14.252 +#elif (MAJOR_NR == CDU535_CDROM_MAJOR)
  14.253 +
  14.254 +#define DEVICE_NAME "SONY-CDU535"
  14.255 +#define DEVICE_INTR do_cdu535
  14.256 +#define DEVICE_REQUEST do_cdu535_request
  14.257 +#define DEVICE_NR(device) (MINOR(device))
  14.258 +
  14.259 +#elif (MAJOR_NR == GOLDSTAR_CDROM_MAJOR)
  14.260 +
  14.261 +#define DEVICE_NAME "Goldstar R420"
  14.262 +#define DEVICE_REQUEST do_gscd_request
  14.263 +#define DEVICE_NR(device) (MINOR(device))
  14.264 +
  14.265 +#elif (MAJOR_NR == CM206_CDROM_MAJOR)
  14.266 +#define DEVICE_NAME "Philips/LMS CD-ROM cm206"
  14.267 +#define DEVICE_REQUEST do_cm206_request
  14.268 +#define DEVICE_NR(device) (MINOR(device))
  14.269 +
  14.270 +#elif (MAJOR_NR == OPTICS_CDROM_MAJOR)
  14.271 +
  14.272 +#define DEVICE_NAME "DOLPHIN 8000AT CD-ROM"
  14.273 +#define DEVICE_REQUEST do_optcd_request
  14.274 +#define DEVICE_NR(device) (MINOR(device))
  14.275 +
  14.276 +#elif (MAJOR_NR == SANYO_CDROM_MAJOR)
  14.277 +
  14.278 +#define DEVICE_NAME "Sanyo H94A CD-ROM"
  14.279 +#define DEVICE_REQUEST do_sjcd_request
  14.280 +#define DEVICE_NR(device) (MINOR(device))
  14.281 +
  14.282 +#elif (MAJOR_NR == APBLOCK_MAJOR)
  14.283 +
  14.284 +#define DEVICE_NAME "apblock"
  14.285 +#define DEVICE_REQUEST ap_request
  14.286 +#define DEVICE_NR(device) (MINOR(device))
  14.287 +
  14.288 +#elif (MAJOR_NR == DDV_MAJOR)
  14.289 +
  14.290 +#define DEVICE_NAME "ddv"
  14.291 +#define DEVICE_REQUEST ddv_request
  14.292 +#define DEVICE_NR(device) (MINOR(device)>>PARTN_BITS)
  14.293 +
  14.294 +#elif (MAJOR_NR == MFM_ACORN_MAJOR)
  14.295 +
  14.296 +#define DEVICE_NAME "mfm disk"
  14.297 +#define DEVICE_INTR do_mfm
  14.298 +#define DEVICE_REQUEST do_mfm_request
  14.299 +#define DEVICE_NR(device) (MINOR(device) >> 6)
  14.300 +
  14.301 +#elif (MAJOR_NR == NBD_MAJOR)
  14.302 +
  14.303 +#define DEVICE_NAME "nbd"
  14.304 +#define DEVICE_REQUEST do_nbd_request
  14.305 +#define DEVICE_NR(device) (MINOR(device))
  14.306 +
  14.307 +#elif (MAJOR_NR == MDISK_MAJOR)
  14.308 +
  14.309 +#define DEVICE_NAME "mdisk"
  14.310 +#define DEVICE_REQUEST mdisk_request
  14.311 +#define DEVICE_NR(device) (MINOR(device))
  14.312 +
  14.313 +#elif (MAJOR_NR == DASD_MAJOR)
  14.314 +
  14.315 +#define DEVICE_NAME "dasd"
  14.316 +#define DEVICE_REQUEST do_dasd_request
  14.317 +#define DEVICE_NR(device) (MINOR(device) >> PARTN_BITS)
  14.318 +
  14.319 +#elif (MAJOR_NR == I2O_MAJOR)
  14.320 +
  14.321 +#define DEVICE_NAME "I2O block"
  14.322 +#define DEVICE_REQUEST i2ob_request
  14.323 +#define DEVICE_NR(device) (MINOR(device)>>4)
  14.324 +
  14.325 +#elif (MAJOR_NR == COMPAQ_SMART2_MAJOR)
  14.326 +
  14.327 +#define DEVICE_NAME "ida"
  14.328 +#define TIMEOUT_VALUE (25*HZ)
  14.329 +#define DEVICE_REQUEST do_ida_request
  14.330 +#define DEVICE_NR(device) (MINOR(device) >> 4)
  14.331 +
  14.332 +#endif /* MAJOR_NR == whatever */
  14.333 +
  14.334 +/* provide DEVICE_xxx defaults, if not explicitly defined
  14.335 + * above in the MAJOR_NR==xxx if-elif tree */
  14.336 +#ifndef DEVICE_ON
  14.337 +#define DEVICE_ON(device) do {} while (0)
  14.338 +#endif
  14.339 +#ifndef DEVICE_OFF
  14.340 +#define DEVICE_OFF(device) do {} while (0)
  14.341 +#endif
  14.342 +
  14.343 +#if (MAJOR_NR != SCSI_TAPE_MAJOR) && (MAJOR_NR != OSST_MAJOR)
  14.344 +#if !defined(IDE_DRIVER)
  14.345 +
  14.346 +#ifndef CURRENT
  14.347 +#define CURRENT blkdev_entry_next_request(&blk_dev[MAJOR_NR].request_queue.queue_head)
  14.348 +#endif
  14.349 +#ifndef QUEUE_EMPTY
  14.350 +#define QUEUE_EMPTY list_empty(&blk_dev[MAJOR_NR].request_queue.queue_head)
  14.351 +#endif
  14.352 +
  14.353 +#ifndef DEVICE_NAME
  14.354 +#define DEVICE_NAME "unknown"
  14.355 +#endif
  14.356 +
  14.357 +#define CURRENT_DEV DEVICE_NR(CURRENT->rq_dev)
  14.358 +
  14.359 +#ifdef DEVICE_INTR
  14.360 +static void (*DEVICE_INTR)(void) = NULL;
  14.361 +#endif
  14.362 +
  14.363 +#define SET_INTR(x) (DEVICE_INTR = (x))
  14.364 +
  14.365 +#ifdef DEVICE_REQUEST
  14.366 +static void (DEVICE_REQUEST)(request_queue_t *);
  14.367 +#endif 
  14.368 +  
  14.369 +#ifdef DEVICE_INTR
  14.370 +#define CLEAR_INTR SET_INTR(NULL)
  14.371 +#else
  14.372 +#define CLEAR_INTR
  14.373 +#endif
  14.374 +
  14.375 +#define INIT_REQUEST \
  14.376 +	if (QUEUE_EMPTY) {\
  14.377 +		CLEAR_INTR; \
  14.378 +		return; \
  14.379 +	} \
  14.380 +	if (MAJOR(CURRENT->rq_dev) != MAJOR_NR) \
  14.381 +		panic(DEVICE_NAME ": request list destroyed"); \
  14.382 +	if (CURRENT->bh) { \
  14.383 +		if (!buffer_locked(CURRENT->bh)) \
  14.384 +			panic(DEVICE_NAME ": block not locked"); \
  14.385 +	}
  14.386 +
  14.387 +#endif /* !defined(IDE_DRIVER) */
  14.388 +
  14.389 +
  14.390 +#ifndef LOCAL_END_REQUEST	/* If we have our own end_request, we do not want to include this mess */
  14.391 +
  14.392 +#if ! SCSI_BLK_MAJOR(MAJOR_NR) && (MAJOR_NR != COMPAQ_SMART2_MAJOR)
  14.393 +
  14.394 +static inline void end_request(int uptodate) {
  14.395 +	struct request *req = CURRENT;
  14.396 +
  14.397 +	if (end_that_request_first(req, uptodate, DEVICE_NAME))
  14.398 +		return;
  14.399 +
  14.400 +#ifndef DEVICE_NO_RANDOM
  14.401 +	add_blkdev_randomness(MAJOR(req->rq_dev));
  14.402 +#endif
  14.403 +	DEVICE_OFF(req->rq_dev);
  14.404 +	blkdev_dequeue_request(req);
  14.405 +	end_that_request_last(req);
  14.406 +}
  14.407 +
  14.408 +#endif /* ! SCSI_BLK_MAJOR(MAJOR_NR) */
  14.409 +#endif /* LOCAL_END_REQUEST */
  14.410 +
  14.411 +#endif /* (MAJOR_NR != SCSI_TAPE_MAJOR) */
  14.412 +#endif /* defined(MAJOR_NR) || defined(IDE_DRIVER) */
  14.413 +
  14.414 +#endif /* _BLK_H */