diff options
| author | James Simmons <jsimmons@heisenberg.transvirtual.com> | 2002-06-20 19:29:23 -0700 |
|---|---|---|
| committer | James Simmons <jsimmons@heisenberg.transvirtual.com> | 2002-06-20 19:29:23 -0700 |
| commit | 7f933b363840d138d022010a80807d1fb0c5ef18 (patch) | |
| tree | 9081e4b9e92833c43a25ebc21803eb7258145591 /include/linux | |
| parent | 0d71c71674d9704fd36732b3fb0e12a2b8125a1d (diff) | |
| parent | 2ffe5f2f17d6698d1b0e78c43a4b9eb91426340d (diff) | |
Merge heisenberg.transvirtual.com:/tmp/linus-2.5
into heisenberg.transvirtual.com:/tmp/fbdev-2.5
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/blk.h | 33 | ||||
| -rw-r--r-- | include/linux/elevator.h | 1 | ||||
| -rw-r--r-- | include/linux/futex.h | 1 | ||||
| -rw-r--r-- | include/linux/i2c-dev.h | 18 | ||||
| -rw-r--r-- | include/linux/i2c-id.h | 15 | ||||
| -rw-r--r-- | include/linux/i2c-proc.h | 5 | ||||
| -rw-r--r-- | include/linux/i2c.h | 23 | ||||
| -rw-r--r-- | include/linux/ide.h | 12 | ||||
| -rw-r--r-- | include/linux/if_tun.h | 4 | ||||
| -rw-r--r-- | include/linux/interrupt.h | 25 | ||||
| -rw-r--r-- | include/linux/proc_fs.h | 1 | ||||
| -rw-r--r-- | include/linux/sched.h | 28 |
12 files changed, 98 insertions, 68 deletions
diff --git a/include/linux/blk.h b/include/linux/blk.h index 69aa2fa94a97..7fbd3f6acae8 100644 --- a/include/linux/blk.h +++ b/include/linux/blk.h @@ -40,6 +40,7 @@ void initrd_init(void); extern int end_that_request_first(struct request *, int, int); extern void end_that_request_last(struct request *); +struct request *elv_next_request(request_queue_t *q); static inline void blkdev_dequeue_request(struct request *req) { @@ -49,38 +50,6 @@ static inline void blkdev_dequeue_request(struct request *req) elv_remove_request(req->q, req); } -extern inline struct request *elv_next_request(request_queue_t *q) -{ - struct request *rq; - - while ((rq = __elv_next_request(q))) { - rq->flags |= REQ_STARTED; - - if (&rq->queuelist == q->last_merge) - q->last_merge = NULL; - - if ((rq->flags & REQ_DONTPREP) || !q->prep_rq_fn) - break; - - /* - * all ok, break and return it - */ - if (!q->prep_rq_fn(q, rq)) - break; - - /* - * prep said no-go, kill it - */ - blkdev_dequeue_request(rq); - if (end_that_request_first(rq, 0, rq->nr_sectors)) - BUG(); - - end_that_request_last(rq); - } - - return rq; -} - #define _elv_add_request_core(q, rq, where, plug) \ do { \ if ((plug)) \ diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 44cbb0e8e8fe..3bd08ecdaf0b 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -40,7 +40,6 @@ struct elevator_s */ extern void __elv_add_request(request_queue_t *, struct request *, struct list_head *); -extern struct request *__elv_next_request(request_queue_t *); extern void elv_merge_cleanup(request_queue_t *, struct request *, int); extern int elv_merge(request_queue_t *, struct request **, struct bio *); extern void elv_merge_requests(request_queue_t *, struct request *, diff --git a/include/linux/futex.h b/include/linux/futex.h index d913c30590df..f0925a8e6a2e 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h @@ -4,5 +4,6 @@ /* Second argument to futex syscall */ #define FUTEX_WAIT (0) #define FUTEX_WAKE (1) +#define FUTEX_FD (2) #endif diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index 7134c8b8a18e..4c67640b9c91 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h @@ -19,7 +19,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: i2c-dev.h,v 1.9 2001/08/15 03:04:58 mds Exp $ */ +/* $Id: i2c-dev.h,v 1.10 2001/11/19 19:01:46 mds Exp $ */ #ifndef I2C_DEV_H #define I2C_DEV_H @@ -162,6 +162,22 @@ static inline __s32 i2c_smbus_write_block_data(int file, __u8 command, I2C_SMBUS_BLOCK_DATA, &data); } +/* Returns the number of read bytes */ +static inline __s32 i2c_smbus_read_i2c_block_data(int file, __u8 command, + __u8 *values) +{ + union i2c_smbus_data data; + int i; + if (i2c_smbus_access(file,I2C_SMBUS_READ,command, + I2C_SMBUS_I2C_BLOCK_DATA,&data)) + return -1; + else { + for (i = 1; i <= data.block[0]; i++) + values[i-1] = data.block[i]; + return data.block[0]; + } +} + static inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command, __u8 length, __u8 *values) { diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 74f4f23c1b09..039fb3640431 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -20,7 +20,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -/* $Id: i2c-id.h,v 1.35 2001/08/12 17:22:20 mds Exp $ */ +/* $Id: i2c-id.h,v 1.41 2002/03/11 07:18:55 simon Exp $ */ #ifndef I2C_ID_H #define I2C_ID_H @@ -90,6 +90,10 @@ #define I2C_DRIVERID_DRP3510 43 /* ADR decoder (Astra Radio) */ #define I2C_DRIVERID_SP5055 44 /* Satellite tuner */ #define I2C_DRIVERID_STV0030 45 /* Multipurpose switch */ +#define I2C_DRIVERID_SAA7108 46 /* video decoder, image scaler */ + + + #define I2C_DRIVERID_EXP0 0xF0 /* experimental use id's */ #define I2C_DRIVERID_EXP1 0xF1 @@ -127,6 +131,9 @@ #define I2C_DRIVERID_ADM1024 1025 #define I2C_DRIVERID_IT87 1026 #define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */ +#define I2C_DRIVERID_FSCPOS 1028 +#define I2C_DRIVERID_FSCSCY 1029 +#define I2C_DRIVERID_PCF8591 1030 /* * ---- Adapter types ---------------------------------------------------- @@ -143,7 +150,8 @@ #define I2C_ALGO_ISA 0x050000 /* lm_sensors ISA pseudo-adapter */ #define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */ #define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */ - +#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */ +#define I2C_ALGO_SAA7134 0x090000 #define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */ #define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */ @@ -189,6 +197,9 @@ /* --- MPC8xx PowerPC adapters */ #define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */ +/* --- ITE based algorithms */ +#define I2C_HW_I_IIC 0x00 /* controller on the ITE */ + /* --- SMBus only adapters */ #define I2C_HW_SMBUS_PIIX4 0x00 #define I2C_HW_SMBUS_ALI15X3 0x01 diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h index 364cfe77d4d6..4a4c33db48d5 100644 --- a/include/linux/i2c-proc.h +++ b/include/linux/i2c-proc.h @@ -1,6 +1,7 @@ /* - sensors.h - Part of lm_sensors, Linux kernel modules for hardware - monitoring + i2c-proc.h - Part of the i2c package + was originally sensors.h - Part of lm_sensors, Linux kernel modules + for hardware monitoring Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl> This program is free software; you can redistribute it and/or modify diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 256a7da0d845..7bb812551f6c 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -23,13 +23,13 @@ /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and Frodo Looijaard <frodol@dds.nl> */ -/* $Id: i2c.h,v 1.46 2001/08/31 00:04:07 phil Exp $ */ +/* $Id: i2c.h,v 1.50 2002/03/23 00:53:38 phil Exp $ */ #ifndef I2C_H #define I2C_H -#define I2C_DATE "20010830" -#define I2C_VERSION "2.6.1" +#define I2C_DATE "20020322" +#define I2C_VERSION "2.6.3" #include <linux/i2c-id.h> /* id values of adapters et. al. */ #include <linux/types.h> @@ -48,11 +48,8 @@ struct i2c_msg; #endif #include <asm/page.h> /* for 2.2.xx */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,25) #include <linux/sched.h> -#else #include <asm/semaphore.h> -#endif #include <linux/config.h> /* --- General options ------------------------------------------------ */ @@ -123,6 +120,8 @@ extern s32 i2c_smbus_read_block_data(struct i2c_client * client, extern s32 i2c_smbus_write_block_data(struct i2c_client * client, u8 command, u8 length, u8 *values); +extern s32 i2c_smbus_read_i2c_block_data(struct i2c_client * client, + u8 command, u8 *values); extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, u8 command, u8 length, u8 *values); @@ -406,8 +405,10 @@ struct i2c_msg { #define I2C_FUNC_SMBUS_PROC_CALL 0x00800000 #define I2C_FUNC_SMBUS_READ_BLOCK_DATA 0x01000000 #define I2C_FUNC_SMBUS_WRITE_BLOCK_DATA 0x02000000 -#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* New I2C-like block */ -#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* transfer */ +#define I2C_FUNC_SMBUS_READ_I2C_BLOCK 0x04000000 /* I2C-like block xfer */ +#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* w/ 1-byte reg. addr. */ +#define I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 0x10000000 /* I2C-like block xfer */ +#define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 0x20000000 /* w/ 2-byte reg. addr. */ #define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \ I2C_FUNC_SMBUS_WRITE_BYTE @@ -419,13 +420,17 @@ struct i2c_msg { I2C_FUNC_SMBUS_WRITE_BLOCK_DATA #define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \ I2C_FUNC_SMBUS_WRITE_I2C_BLOCK +#define I2C_FUNC_SMBUS_I2C_BLOCK_2 I2C_FUNC_SMBUS_READ_I2C_BLOCK_2 | \ + I2C_FUNC_SMBUS_WRITE_I2C_BLOCK_2 #define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \ I2C_FUNC_SMBUS_BYTE | \ I2C_FUNC_SMBUS_BYTE_DATA | \ I2C_FUNC_SMBUS_WORD_DATA | \ I2C_FUNC_SMBUS_PROC_CALL | \ - I2C_FUNC_SMBUS_WRITE_BLOCK_DATA + I2C_FUNC_SMBUS_WRITE_BLOCK_DATA | \ + I2C_FUNC_SMBUS_I2C_BLOCK | \ + I2C_FUNC_SMBUS_I2C_BLOCK_2 /* * Data for SMBus Messages diff --git a/include/linux/ide.h b/include/linux/ide.h index 03c21c567ce4..98426a06e782 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -298,7 +298,6 @@ struct ata_device { unsigned using_tcq : 1; /* disk is using queueing */ unsigned dsc_overlap : 1; /* flag: DSC overlap */ - unsigned waiting_for_dma: 1; /* dma currently in progress */ unsigned busy : 1; /* currently doing revalidate_disk() */ unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ @@ -681,7 +680,8 @@ static inline void ide_unmap_rq(struct request *rq, char *to, bio_kunmap_irq(to, flags); } -extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *, char *); +extern ide_startstop_t ata_special_intr(struct ata_device *, struct request *); +extern int ide_raw_taskfile(struct ata_device *, struct ata_taskfile *); extern void ide_fix_driveid(struct hd_driveid *id); extern int ide_config_drive_speed(struct ata_device *, byte); @@ -756,6 +756,8 @@ static inline void udma_start(struct ata_device *drive, struct request *rq) static inline int udma_stop(struct ata_device *drive) { + clear_bit(IDE_DMA, drive->channel->active); + return drive->channel->udma_stop(drive); } @@ -764,7 +766,11 @@ static inline int udma_stop(struct ata_device *drive) */ static inline ide_startstop_t udma_init(struct ata_device *drive, struct request *rq) { - return drive->channel->udma_init(drive, rq); + int ret = drive->channel->udma_init(drive, rq); + if (ret == ide_started) + set_bit(IDE_DMA, drive->channel->active); + + return ret; } static inline int udma_irq_status(struct ata_device *drive) diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 0cfd69202430..2af535344624 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h @@ -50,10 +50,6 @@ struct tun_struct { #endif }; -#ifndef MIN -#define MIN(a,b) ( (a)<(b) ? (a):(b) ) -#endif - #endif /* __KERNEL__ */ /* Read queue size */ diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 90446b0d75e5..fbc10eab16f4 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -28,20 +28,17 @@ struct irqaction { enum { TIMER_BH = 0, - TQUEUE_BH, - DIGI_BH, - SERIAL_BH, - RISCOM8_BH, - SPECIALIX_BH, - AURORA_BH, - ESP_BH, - SCSI_BH, - IMMEDIATE_BH, - CYCLADES_BH, - CM206_BH, - JS_BH, - MACSERIAL_BH, - ISICOM_BH + TQUEUE_BH = 1, + DIGI_BH = 2, + SERIAL_BH = 3, + RISCOM8_BH = 4, + SPECIALIX_BH = 5, + AURORA_BH = 6, + ESP_BH = 7, + IMMEDIATE_BH = 9, + CYCLADES_BH = 10, + MACSERIAL_BH = 13, + ISICOM_BH = 14 }; #include <asm/hardirq.h> diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 33e093a1357b..4490c4d3a5de 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -198,6 +198,7 @@ static inline struct proc_dir_entry *create_proc_info_entry(const char *name, mode_t mode, struct proc_dir_entry *base, get_info_t *get_info) { return NULL; } +struct tty_driver; static inline void proc_tty_register_driver(struct tty_driver *driver) {}; static inline void proc_tty_unregister_driver(struct tty_driver *driver) {}; diff --git a/include/linux/sched.h b/include/linux/sched.h index 9e7d80851c32..390627c2f1f6 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -863,6 +863,34 @@ static inline void recalc_sigpending(void) clear_thread_flag(TIF_SIGPENDING); } +/* + * Wrappers for p->thread_info->cpu access. No-op on UP. + */ +#ifdef CONFIG_SMP + +static inline unsigned int task_cpu(struct task_struct *p) +{ + return p->thread_info->cpu; +} + +static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) +{ + p->thread_info->cpu = cpu; +} + +#else + +static inline unsigned int task_cpu(struct task_struct *p) +{ + return 0; +} + +static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) +{ +} + +#endif /* CONFIG_SMP */ + #endif /* __KERNEL__ */ #endif |
