diff options
| author | Anton Blanchard <anton@samba.org> | 2002-09-09 08:01:06 +1000 |
|---|---|---|
| committer | Anton Blanchard <anton@samba.org> | 2002-09-09 08:01:06 +1000 |
| commit | b2a5f08a83d248313436b1a6d83eec1cfd4eaf63 (patch) | |
| tree | f4a26ba9089791e3499efa9bcabc4f24048a0e84 /include | |
| parent | 17659443e63dd859e4ca035a20ea89e6773fc385 (diff) | |
| parent | 165088f970e9baa5a0b3d63313c869605e8f99f8 (diff) | |
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/linux-2.5_bar
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/core_t2.h | 40 | ||||
| -rw-r--r-- | include/asm-alpha/dma.h | 47 | ||||
| -rw-r--r-- | include/asm-alpha/floppy.h | 23 | ||||
| -rw-r--r-- | include/asm-alpha/ide.h | 11 | ||||
| -rw-r--r-- | include/asm-alpha/kmap_types.h | 31 | ||||
| -rw-r--r-- | include/asm-alpha/user.h | 1 | ||||
| -rw-r--r-- | include/linux/blkdev.h | 3 | ||||
| -rw-r--r-- | include/linux/genhd.h | 33 | ||||
| -rw-r--r-- | include/linux/ide.h | 3 | ||||
| -rw-r--r-- | include/linux/raid/md.h | 1 |
10 files changed, 122 insertions, 71 deletions
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h index 007cf43baf10..fdaa57aa2c14 100644 --- a/include/asm-alpha/core_t2.h +++ b/include/asm-alpha/core_t2.h @@ -19,7 +19,7 @@ * */ -#define T2_MEM_R1_MASK 0x03ffffff /* Mem sparse region 1 mask is 26 bits */ +#define T2_MEM_R1_MASK 0x07ffffff /* Mem sparse region 1 mask is 26 bits */ /* GAMMA-SABLE is a SABLE with EV5-based CPUs */ #define _GAMMA_BIAS 0x8000000000UL @@ -402,13 +402,17 @@ __EXTERN_INLINE void t2_outl(u32 b, unsigned long addr) * */ +#define t2_set_hae { \ + msb = addr >> 27; \ + addr &= T2_MEM_R1_MASK; \ + set_hae(msb); \ +} + __EXTERN_INLINE u8 t2_readb(unsigned long addr) { unsigned long result, msb; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; result = *(vip) ((addr << 5) + T2_SPARSE_MEM + 0x00); return __kernel_extbl(result, addr & 3); @@ -418,9 +422,7 @@ __EXTERN_INLINE u16 t2_readw(unsigned long addr) { unsigned long result, msb; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; result = *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08); return __kernel_extwl(result, addr & 3); @@ -431,9 +433,7 @@ __EXTERN_INLINE u32 t2_readl(unsigned long addr) { unsigned long msb; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; return *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18); } @@ -442,9 +442,7 @@ __EXTERN_INLINE u64 t2_readq(unsigned long addr) { unsigned long r0, r1, work, msb; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; work = (addr << 5) + T2_SPARSE_MEM + 0x18; r0 = *(vuip)(work); @@ -456,9 +454,7 @@ __EXTERN_INLINE void t2_writeb(u8 b, unsigned long addr) { unsigned long msb, w; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; w = __kernel_insbl(b, addr & 3); *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x00) = w; @@ -468,9 +464,7 @@ __EXTERN_INLINE void t2_writew(u16 b, unsigned long addr) { unsigned long msb, w; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; w = __kernel_inswl(b, addr & 3); *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x08) = w; @@ -481,9 +475,7 @@ __EXTERN_INLINE void t2_writel(u32 b, unsigned long addr) { unsigned long msb; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; *(vuip) ((addr << 5) + T2_SPARSE_MEM + 0x18) = b; } @@ -492,9 +484,7 @@ __EXTERN_INLINE void t2_writeq(u64 b, unsigned long addr) { unsigned long msb, work; - msb = addr & 0xE0000000; - addr &= T2_MEM_R1_MASK; - set_hae(msb); + t2_set_hae; work = (addr << 5) + T2_SPARSE_MEM + 0x18; *(vuip)work = b; diff --git a/include/asm-alpha/dma.h b/include/asm-alpha/dma.h index e6d667144b50..97daf7d786aa 100644 --- a/include/asm-alpha/dma.h +++ b/include/asm-alpha/dma.h @@ -75,34 +75,49 @@ #define MAX_DMA_CHANNELS 8 -/* The maximum address that we can perform a DMA transfer to on Alpha XL, - due to a hardware SIO (PCI<->ISA bus bridge) chip limitation, is 64MB. - See <asm/apecs.h> for more info. +/* + ISA DMA limitations on Alpha platforms, + + These may be due to SIO (PCI<->ISA bridge) chipset limitation, or + just a wiring limit. */ -/* The maximum address that we can perform a DMA transfer to on RUFFIAN, - due to a hardware SIO (PCI<->ISA bus bridge) chip limitation, is 16MB. - See <asm/pyxis.h> for more info. + +/* The maximum address for ISA DMA transfer on Alpha XL, due to an + hardware SIO limitation, is 64MB. +*/ +#define ALPHA_XL_MAX_DMA_ADDRESS (IDENT_ADDR+0x04000000UL) + +/* The maximum address for ISA DMA transfer on RUFFIAN and NAUTILUS, + due to an hardware SIO limitation, is 16MB. */ -/* NOTE: we must define the maximum as something less than 64Mb, to prevent - virt_to_bus() from returning an address in the first window, for a - data area that goes beyond the 64Mb first DMA window. Sigh... - We MUST coordinate the maximum with <asm/apecs.h> for consistency. - For now, this limit is set to 48Mb... +#define ALPHA_RUFFIAN_MAX_DMA_ADDRESS (IDENT_ADDR+0x01000000UL) +#define ALPHA_NAUTILUS_MAX_DMA_ADDRESS (IDENT_ADDR+0x01000000UL) + +/* The maximum address for ISA DMA transfer on SABLE, and some ALCORs, + due to an hardware SIO chip limitation, is 2GB. +*/ +#define ALPHA_SABLE_MAX_DMA_ADDRESS (IDENT_ADDR+0x80000000UL) +#define ALPHA_ALCOR_MAX_DMA_ADDRESS (IDENT_ADDR+0x80000000UL) + +/* + Maximum address for all the others is the complete 32-bit bus + address space. */ -#define ALPHA_XL_MAX_DMA_ADDRESS (IDENT_ADDR+0x3000000UL) -#define ALPHA_RUFFIAN_MAX_DMA_ADDRESS (IDENT_ADDR+0x1000000UL) -#define ALPHA_NAUTILUS_MAX_DMA_ADDRESS (IDENT_ADDR+0x1000000UL) -#define ALPHA_MAX_DMA_ADDRESS (~0UL) +#define ALPHA_MAX_DMA_ADDRESS (IDENT_ADDR+0x100000000UL) #ifdef CONFIG_ALPHA_GENERIC # define MAX_DMA_ADDRESS (alpha_mv.max_dma_address) #else -# ifdef CONFIG_ALPHA_XL +# if defined(CONFIG_ALPHA_XL) # define MAX_DMA_ADDRESS ALPHA_XL_MAX_DMA_ADDRESS # elif defined(CONFIG_ALPHA_RUFFIAN) # define MAX_DMA_ADDRESS ALPHA_RUFFIAN_MAX_DMA_ADDRESS # elif defined(CONFIG_ALPHA_NAUTILUS) # define MAX_DMA_ADDRESS ALPHA_NAUTILUS_MAX_DMA_ADDRESS +# elif defined(CONFIG_ALPHA_SABLE) +# define MAX_DMA_ADDRESS ALPHA_SABLE_MAX_DMA_ADDRESS +# elif defined(CONFIG_ALPHA_ALCOR) +# define MAX_DMA_ADDRESS ALPHA_ALCOR_MAX_DMA_ADDRESS # else # define MAX_DMA_ADDRESS ALPHA_MAX_DMA_ADDRESS # endif diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h index 58d053db1a7f..88049a927ddd 100644 --- a/include/asm-alpha/floppy.h +++ b/include/asm-alpha/floppy.h @@ -97,25 +97,22 @@ static int FDC2 = -1; /* * Most Alphas have no problems with floppy DMA crossing 64k borders, - * except for XL and RUFFIAN. They are also the only one with DMA - * limits, so we use that to test in the generic kernel. + * except for certain ones, like XL and RUFFIAN. + * + * However, the test is simple and fast, and this *is* floppy, after all, + * so we do it for all platforms, just to make sure. + * + * This is advantageous in other circumstances as well, as in moving + * about the PCI DMA windows and forcing the floppy to start doing + * scatter-gather when it never had before, and there *is* a problem + * on that platform... ;-} */ -#define __CROSS_64KB(a,s) \ +#define CROSS_64KB(a,s) \ ({ unsigned long __s64 = (unsigned long)(a); \ unsigned long __e64 = __s64 + (unsigned long)(s) - 1; \ (__s64 ^ __e64) & ~0xfffful; }) -#ifdef CONFIG_ALPHA_GENERIC -# define CROSS_64KB(a,s) (__CROSS_64KB(a,s) && ~alpha_mv.max_dma_address) -#else -# if defined(CONFIG_ALPHA_XL) || defined(CONFIG_ALPHA_RUFFIAN) || defined(CONFIG_ALPHA_NAUTILUS) -# define CROSS_64KB(a,s) __CROSS_64KB(a,s) -# else -# define CROSS_64KB(a,s) (0) -# endif -#endif - #define EXTRA_FLOPPY_PARAMS #endif /* __ASM_ALPHA_FLOPPY_H */ diff --git a/include/asm-alpha/ide.h b/include/asm-alpha/ide.h index 63bb9f785498..0ca863142cf5 100644 --- a/include/asm-alpha/ide.h +++ b/include/asm-alpha/ide.h @@ -80,6 +80,17 @@ static __inline__ void ide_init_default_hwifs(void) #endif } +#define ide_request_irq(irq,hand,flg,dev,id) request_irq((irq),(hand),(flg),(dev),(id)) +#define ide_free_irq(irq,dev_id) free_irq((irq), (dev_id)) +#define ide_check_region(from,extent) check_region((from), (extent)) +#define ide_request_region(from,extent,name) request_region((from), (extent), (name)) +#define ide_release_region(from,extent) release_region((from), (extent)) + +#define ide_ack_intr(hwif) (1) +#define ide_fix_driveid(id) do {} while (0) +#define ide_release_lock(lock) do {} while (0) +#define ide_get_lock(lock, hdlr, data) do {} while (0) + #endif /* __KERNEL__ */ #endif /* __ASMalpha_IDE_H */ diff --git a/include/asm-alpha/kmap_types.h b/include/asm-alpha/kmap_types.h new file mode 100644 index 000000000000..3e755b973e65 --- /dev/null +++ b/include/asm-alpha/kmap_types.h @@ -0,0 +1,31 @@ +#ifndef _ASM_KMAP_TYPES_H +#define _ASM_KMAP_TYPES_H + +/* Dummy header just to define km_type. */ + +#include <linux/config.h> + +#if CONFIG_DEBUG_HIGHMEM +# define D(n) __KM_FENCE_##n , +#else +# define D(n) +#endif + +enum km_type { +D(0) KM_BOUNCE_READ, +D(1) KM_SKB_SUNRPC_DATA, +D(2) KM_SKB_DATA_SOFTIRQ, +D(3) KM_USER0, +D(4) KM_USER1, +D(5) KM_BIO_SRC_IRQ, +D(6) KM_BIO_DST_IRQ, +D(7) KM_PTE0, +D(8) KM_PTE1, +D(9) KM_IRQ0, +D(10) KM_IRQ1, +D(11) KM_TYPE_NR +}; + +#undef D + +#endif diff --git a/include/asm-alpha/user.h b/include/asm-alpha/user.h index c5519bf162d7..7e417fc9d491 100644 --- a/include/asm-alpha/user.h +++ b/include/asm-alpha/user.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_USER_H #define _ALPHA_USER_H +#include <linux/sched.h> #include <linux/ptrace.h> #include <asm/page.h> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 9f1ac6d07fe8..a11b6181c76f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -281,10 +281,7 @@ struct sec_size { extern struct sec_size * blk_sec[MAX_BLKDEV]; extern struct blk_dev_struct blk_dev[MAX_BLKDEV]; -extern void grok_partitions(kdev_t dev, long size); -extern int wipe_partitions(kdev_t dev); extern void register_disk(struct gendisk *dev, kdev_t first, unsigned minors, struct block_device_operations *ops, long size); -extern void check_partition(struct gendisk *disk, struct block_device *bdev); extern void generic_make_request(struct bio *bio); extern inline request_queue_t *bdev_get_queue(struct block_device *bdev); extern void blk_put_request(struct request *); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index fd9f5a8d7c06..ecd747fbe569 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -62,11 +62,12 @@ struct hd_struct { unsigned long start_sect; unsigned long nr_sects; devfs_handle_t de; /* primary (master) devfs entry */ - int number; /* stupid old code wastes space */ struct device hd_driverfs_dev; /* support driverfs hiearchy */ }; #define GENHD_FL_REMOVABLE 1 +#define GENHD_FL_DRIVERFS 2 +#define GENHD_FL_DEVFS 4 struct gendisk { int major; /* major number of driver */ @@ -76,24 +77,35 @@ struct gendisk { get real minor */ struct hd_struct *part; /* [indexed by minor] */ - int nr_real; /* number of real devices */ - struct gendisk *next; struct block_device_operations *fops; - - devfs_handle_t *de_arr; /* one per physical disc */ - struct device **driverfs_dev_arr;/* support driverfs hierarchy */ - char *flags; /* one per physical disc */ + sector_t capacity; + + int flags; + int number; /* devfs crap */ + devfs_handle_t de; /* more of the same */ + devfs_handle_t disk_de; /* piled higher and deeper */ + struct device *driverfs_dev; + struct device disk_dev; }; /* drivers/block/genhd.c */ extern void add_gendisk(struct gendisk *gp); extern void del_gendisk(struct gendisk *gp); +extern void unlink_gendisk(struct gendisk *gp); extern struct gendisk *get_gendisk(kdev_t dev); static inline unsigned long get_start_sect(struct block_device *bdev) { return bdev->bd_offset; } +static inline sector_t get_capacity(struct gendisk *disk) +{ + return disk->capacity; +} +static inline void set_capacity(struct gendisk *disk, sector_t size) +{ + disk->capacity = size; +} #endif /* __KERNEL__ */ @@ -242,11 +254,10 @@ struct unixware_disklabel { #ifdef __KERNEL__ -char *disk_name (struct gendisk *hd, int minor, char *buf); +char *disk_name (struct gendisk *hd, int part, char *buf); -extern void devfs_register_partitions (struct gendisk *dev, int minor, - int unregister); -extern void driverfs_remove_partitions (struct gendisk *hd, int minor); +extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); +extern void update_partition(struct gendisk *disk, int part); static inline unsigned int disk_index (kdev_t dev) { diff --git a/include/linux/ide.h b/include/linux/ide.h index 98a2db1db397..1843237adf4a 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -506,7 +506,6 @@ typedef struct ide_drive_s { unsigned int drive_data; /* for use by tuneproc/selectproc as needed */ struct hwif_s *hwif; /* actually (ide_hwif_t *) */ struct hd_driveid *id; /* drive model identification info */ - struct hd_struct *part; /* drive partition table */ char name[4]; /* drive name, such as "hda" */ struct ide_driver_s *driver; /* (ide_driver_t *) */ void *driver_data; /* extra driver data */ @@ -528,6 +527,7 @@ typedef struct ide_drive_s { unsigned int failures; /* current failure count */ unsigned int max_failures; /* maximum allowed failure count */ struct list_head list; + struct gendisk *disk; } ide_drive_t; /* @@ -714,7 +714,6 @@ typedef struct hwif_s { */ hw_regs_t hw; /* Hardware info */ ide_drive_t drives[MAX_DRIVES]; /* drive info */ - struct gendisk *gd[MAX_DRIVES];/* gendisk structure */ int addressing; /* hosts addressing */ void (*tuneproc)(ide_drive_t *, byte); /* routine to tune PIO mode for drives */ int (*speedproc)(ide_drive_t *, byte); /* routine to retune DMA modes for drives */ diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index a9cca6e4da8f..f95cdf658a39 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h @@ -61,7 +61,6 @@ #define MD_PATCHLEVEL_VERSION 0 extern int md_size[MAX_MD_DEVS]; -extern struct hd_struct md_hd_struct[MAX_MD_DEVS]; extern char * partition_name (kdev_t dev); extern inline char * bdev_partition_name (struct block_device *bdev) |
