summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@maxwell.earthlink.net>2002-10-17 21:32:56 -0700
committerJames Simmons <jsimmons@maxwell.earthlink.net>2002-10-17 21:32:56 -0700
commitef3422e506572c675146d523db4c607133510e06 (patch)
tree06a02f574b4a3fc284d036a319271eac3be40a47 /include
parentc113c55b9cac05ee1466477a492384acb69502a1 (diff)
parentd103bdbf34d5ab76a92fc0d1a4aae7b1af5c8493 (diff)
Merge bk://linux.bkbits.net/linux-2.5
into maxwell.earthlink.net:/usr/src/linus-2.5
Diffstat (limited to 'include')
-rw-r--r--include/asm-ppc/div64.h23
-rw-r--r--include/asm-ppc/pci-bridge.h5
-rw-r--r--include/asm-ppc/sections.h16
-rw-r--r--include/asm-ppc/system.h6
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/cdrom.h9
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/genhd.h10
-rw-r--r--include/linux/ide.h13
9 files changed, 50 insertions, 37 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/linux/blkdev.h b/include/linux/blkdev.h
index ccb56d58de6a..42e81a4a0cab 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -235,6 +235,7 @@ struct request_queue
#define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags)
#define blk_queue_empty(q) elv_queue_empty(q)
#define blk_fs_request(rq) ((rq)->flags & REQ_CMD)
+#define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC)
#define list_entry_rq(ptr) list_entry((ptr), struct request, queuelist)
#define rq_data_dir(rq) ((rq)->flags & 1)
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