diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc/div64.h | 23 | ||||
| -rw-r--r-- | include/asm-ppc/pci-bridge.h | 5 | ||||
| -rw-r--r-- | include/asm-ppc/sections.h | 16 | ||||
| -rw-r--r-- | include/asm-ppc/system.h | 6 | ||||
| -rw-r--r-- | include/asm-sparc/ptrace.h | 7 | ||||
| -rw-r--r-- | include/linux/cdrom.h | 9 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/genhd.h | 10 | ||||
| -rw-r--r-- | include/linux/ide.h | 13 | ||||
| -rw-r--r-- | include/scsi/sg.h | 2 |
10 files changed, 56 insertions, 39 deletions
diff --git a/include/asm-ppc/div64.h b/include/asm-ppc/div64.h index 114e6ab34147..ec3ae5bcb3de 100644 --- a/include/asm-ppc/div64.h +++ b/include/asm-ppc/div64.h @@ -1,10 +1,23 @@ #ifndef __PPC_DIV64 #define __PPC_DIV64 -#define do_div(n,base) ({ \ -int __res; \ -__res = ((unsigned long) n) % (unsigned) base; \ -n = ((unsigned long) n) / (unsigned) base; \ -__res; }) +#include <linux/types.h> + +extern u32 __div64_32(u64 *dividend, u32 div); + +#define do_div(n, div) ({ \ + u64 __n = (n); \ + u32 __d = (div); \ + u32 __q, __r; \ + if ((__n >> 32) == 0) { \ + __q = (u32)__n / __d; \ + __r = (u32)__n - __q * __d; \ + (n) = __q; \ + } else { \ + __r = __div64_32(&__n, __d); \ + (n) = __n; \ + } \ + __r; \ +}) #endif diff --git a/include/asm-ppc/pci-bridge.h b/include/asm-ppc/pci-bridge.h index 1d7bec303e02..f17cca329ed9 100644 --- a/include/asm-ppc/pci-bridge.h +++ b/include/asm-ppc/pci-bridge.h @@ -68,6 +68,11 @@ struct pci_controller { struct pci_ops *ops; volatile unsigned int *cfg_addr; volatile unsigned char *cfg_data; + /* + * If set, indirect method will set the cfg_type bit as + * needed to generate type 1 configuration transactions. + */ + int set_cfg_type; /* Currently, we limit ourselves to 1 IO range and 3 mem * ranges since the common pci_bus structure can't handle more diff --git a/include/asm-ppc/sections.h b/include/asm-ppc/sections.h index 1f2f5fd05966..564e1e58f141 100644 --- a/include/asm-ppc/sections.h +++ b/include/asm-ppc/sections.h @@ -2,27 +2,27 @@ #ifndef _PPC_SECTIONS_H #define _PPC_SECTIONS_H -#define __pmac __attribute__ ((__section__ (".text.pmac"))) -#define __pmacdata __attribute__ ((__section__ (".data.pmac"))) +#define __pmac __attribute__ ((__section__ (".pmac.text"))) +#define __pmacdata __attribute__ ((__section__ (".pmac.data"))) #define __pmacfunc(__argpmac) \ __argpmac __pmac; \ __argpmac -#define __prep __attribute__ ((__section__ (".text.prep"))) -#define __prepdata __attribute__ ((__section__ (".data.prep"))) +#define __prep __attribute__ ((__section__ (".prep.text"))) +#define __prepdata __attribute__ ((__section__ (".prep.data"))) #define __prepfunc(__argprep) \ __argprep __prep; \ __argprep -#define __chrp __attribute__ ((__section__ (".text.chrp"))) -#define __chrpdata __attribute__ ((__section__ (".data.chrp"))) +#define __chrp __attribute__ ((__section__ (".chrp.text"))) +#define __chrpdata __attribute__ ((__section__ (".chrp.data"))) #define __chrpfunc(__argchrp) \ __argchrp __chrp; \ __argchrp /* this is actually just common chrp/pmac code, not OF code -- Cort */ -#define __openfirmware __attribute__ ((__section__ (".text.openfirmware"))) -#define __openfirmwaredata __attribute__ ((__section__ (".data.openfirmware"))) +#define __openfirmware __attribute__ ((__section__ (".openfirmware.text"))) +#define __openfirmwaredata __attribute__ ((__section__ (".openfirmware.data"))) #define __openfirmwarefunc(__argopenfirmware) \ __argopenfirmware __openfirmware; \ __argopenfirmware diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 58a305b6b0c7..8cbe28a3dc91 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h @@ -119,14 +119,14 @@ extern void __xchg_called_with_bad_pointer(void); #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) #define tas(ptr) (xchg((ptr),1)) -static inline unsigned long __xchg(unsigned long x, void * ptr, int size) +static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) { switch (size) { case 4: - return (unsigned long )xchg_u32(ptr, x); + return (unsigned long) xchg_u32(ptr, x); #if 0 /* xchg_u64 doesn't exist on 32-bit PPC */ case 8: - return (unsigned long )xchg_u64(ptr, x); + return (unsigned long) xchg_u64(ptr, x); #endif /* 0 */ } __xchg_called_with_bad_pointer(); diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h index ff3bd04a3253..53d4136efb91 100644 --- a/include/asm-sparc/ptrace.h +++ b/include/asm-sparc/ptrace.h @@ -73,7 +73,12 @@ extern void show_regs(struct pt_regs *); #define REGWIN_SZ 0x40 #endif -#include <asm/asm_offsets.h> +/* + * The asm_offsets.h is a generated file, so we cannot include it. + * It may be OK for glibc headers, but it's utterly pointless for C code. + * The assembly code using those offsets has to include it explicitly. + */ +/* #include <asm/asm_offsets.h> */ /* These are for pt_regs. */ #define PT_PSR 0x0 diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 4387203c95b7..7ac3926382f8 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h @@ -731,7 +731,6 @@ struct cdrom_device_info { struct cdrom_device_info *next; /* next device_info for this major */ void *handle; /* driver-dependent data */ /* specifications */ - kdev_t dev; /* device number */ int mask; /* mask of capability: disables them */ int speed; /* maximum speed for reading data */ int capacity; /* number of discs in jukebox */ @@ -776,10 +775,10 @@ struct cdrom_device_ops { }; /* the general block_device operations structure: */ -extern int cdrom_open(struct inode *, struct file *); -extern int cdrom_release(struct inode *, struct file *); -extern int cdrom_ioctl(struct inode *, struct file *, unsigned, unsigned long); -extern int cdrom_media_changed(kdev_t); +extern int cdrom_open(struct cdrom_device_info *, struct inode *, struct file *); +extern int cdrom_release(struct cdrom_device_info *, struct file *); +extern int cdrom_ioctl(struct cdrom_device_info *, struct inode *, unsigned, unsigned long); +extern int cdrom_media_changed(struct cdrom_device_info *); extern int register_cdrom(struct cdrom_device_info *cdi); extern int unregister_cdrom(struct cdrom_device_info *cdi); diff --git a/include/linux/fs.h b/include/linux/fs.h index e5ced4dc214a..c2e39a247227 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -730,8 +730,8 @@ struct block_device_operations { int (*open) (struct inode *, struct file *); int (*release) (struct inode *, struct file *); int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); - int (*check_media_change) (kdev_t); - int (*revalidate) (kdev_t); + int (*media_changed) (struct gendisk *); + int (*revalidate_disk) (struct gendisk *); struct module *owner; }; diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 9de2f51ae935..8cd8a826bf6f 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -80,6 +80,8 @@ struct gendisk { char disk_name[16]; /* name of major driver */ struct hd_struct *part; /* [indexed by minor] */ struct block_device_operations *fops; + struct request_queue *queue; + void *private_data; sector_t capacity; struct list_head list; struct list_head full_list; @@ -273,8 +275,12 @@ extern struct gendisk *alloc_disk(int minors); extern struct gendisk *get_disk(struct gendisk *disk); extern void put_disk(struct gendisk *disk); -/* will go away */ -extern void blk_set_probe(int major, struct gendisk *(p)(int)); +extern void blk_register_region(dev_t dev, unsigned long range, + struct module *module, + struct gendisk *(*probe)(dev_t, int *, void *), + void (*lock)(dev_t, void *), + void *data); +extern void blk_unregister_region(dev_t dev, unsigned long range); #endif diff --git a/include/linux/ide.h b/include/linux/ide.h index 44cb38c00b96..607464f740f5 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -1256,7 +1256,6 @@ extern int noautodma; */ #define IDE_DRIVER /* Toggle some magic bits in blk.h */ #define LOCAL_END_REQUEST /* Don't generate end_request in blk.h */ -#define DEVICE_NR(device) (minor(device) >> PARTN_BITS) #include <linux/blk.h> extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); @@ -1316,12 +1315,7 @@ extern int ide_wait_stat(ide_startstop_t *, ide_drive_t *, u8, u8, unsigned long * This routine is called from the partition-table code in genhd.c * to "convert" a drive to a logical geometry with fewer than 1024 cyls. */ -extern int ide_xlate_1024 (kdev_t, int, int, const char *); - -/* - * Convert kdev_t structure into ide_drive_t * one. - */ -extern ide_drive_t *get_info_ptr (kdev_t i_rdev); +extern int ide_xlate_1024(struct block_device *, int, int, const char *); /* * Return the current idea about the total capacity of this drive. @@ -1577,11 +1571,6 @@ extern int ide_system_bus_speed(void); extern void ide_stall_queue(ide_drive_t *drive, unsigned long timeout); /* - * ide_get_queue() returns the queue which corresponds to a given device. - */ -extern request_queue_t *ide_get_queue (kdev_t dev); - -/* * CompactFlash cards and their brethern pretend to be removable hard disks, * but they never have a slave unit, and they don't have doorlock mechanisms. * This test catches them, and is invoked elsewhere when setting appropriate diff --git a/include/scsi/sg.h b/include/scsi/sg.h index ddf83957b343..b5f80d97f07b 100644 --- a/include/scsi/sg.h +++ b/include/scsi/sg.h @@ -130,7 +130,7 @@ typedef struct sg_io_hdr /* following flag values can be "or"-ed together */ #define SG_FLAG_DIRECT_IO 1 /* default is indirect IO */ -#define SG_FLAG_LUN_INHIBIT 2 /* default is overwrite lun in SCSI */ +#define SG_FLAG_UNUSED_LUN_INHIBIT 2 /* default is overwrite lun in SCSI */ /* command block (when <= SCSI_2) */ #define SG_FLAG_MMAP_IO 4 /* request memory mapped IO */ #define SG_FLAG_NO_DXFER 0x10000 /* no transfer of kernel buffers to/from */ |
