diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-03-08 04:25:54 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-03-08 04:25:54 -0500 |
| commit | def7102a5bd2d60b1a96a58a39846150285d7c77 (patch) | |
| tree | df0e6726c593a7e1f820a3341c627835a1c0d5ce /include/linux | |
| parent | a4bc8f1c791fa542a6f0f8043b670690894bd440 (diff) | |
| parent | 09aa3367ff6a0bbff7ce35eb770aab23bc9d4213 (diff) | |
Merge pobox.com:/garz/repo/linux-2.6
into pobox.com:/garz/repo/net-drivers-2.6
Diffstat (limited to 'include/linux')
45 files changed, 468 insertions, 893 deletions
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h index c3970bb88c4d..c35833824e11 100644 --- a/include/linux/ac97_codec.h +++ b/include/linux/ac97_codec.h @@ -323,6 +323,7 @@ struct ac97_ops #define AC97_DELUDED_MODEM 1 /* Audio codec reports its a modem */ #define AC97_NO_PCM_VOLUME 2 /* Volume control is missing */ +#define AC97_DEFAULT_POWER_OFF 4 /* Needs warm reset to power up */ }; extern int ac97_read_proc (char *page_out, char **start, off_t off, diff --git a/include/linux/bio.h b/include/linux/bio.h index cd8d47bf34b4..06925a788519 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -59,6 +59,7 @@ struct bio_vec { unsigned int bv_offset; }; +struct bio_set; struct bio; typedef int (bio_end_io_t) (struct bio *, unsigned int, int); typedef void (bio_destructor_t) (struct bio *); @@ -109,6 +110,7 @@ struct bio { void *bi_private; bio_destructor_t *bi_destructor; /* destructor */ + struct bio_set *bi_set; /* memory pools set */ }; /* @@ -258,7 +260,11 @@ extern struct bio_pair *bio_split(struct bio *bi, mempool_t *pool, extern mempool_t *bio_split_pool; extern void bio_pair_release(struct bio_pair *dbio); +extern struct bio_set *bioset_create(int, int, int); +extern void bioset_free(struct bio_set *); + extern struct bio *bio_alloc(int, int); +extern struct bio *bio_alloc_bioset(int, int, struct bio_set *); extern void bio_put(struct bio *); extern void bio_endio(struct bio *, unsigned int, int); @@ -280,6 +286,7 @@ extern void bio_set_pages_dirty(struct bio *bio); extern void bio_check_pages_dirty(struct bio *bio); extern struct bio *bio_copy_user(struct request_queue *, unsigned long, unsigned int, int); extern int bio_uncopy_user(struct bio *); +void zero_fill_bio(struct bio *bio); #ifdef CONFIG_HIGHMEM /* diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 48f87b979ca9..7d1f8b67c6bf 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -134,4 +134,26 @@ static inline unsigned long hweight_long(unsigned long w) return sizeof(w) == 4 ? generic_hweight32(w) : generic_hweight64(w); } +/* + * rol32 - rotate a 32-bit value left + * + * @word: value to rotate + * @shift: bits to roll + */ +static inline __u32 rol32(__u32 word, int shift) +{ + return (word << shift) | (word >> (32 - shift)); +} + +/* + * ror32 - rotate a 32-bit value right + * + * @word: value to rotate + * @shift: bits to roll + */ +static inline __u32 ror32(__u32 word, int shift) +{ + return (word >> shift) | (word << (32 - shift)); +} + #endif diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 5615a3c9e410..83eef4fde873 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -93,6 +93,9 @@ struct io_context *get_io_context(int gfp_flags); void copy_io_context(struct io_context **pdst, struct io_context **psrc); void swap_io_context(struct io_context **ioc1, struct io_context **ioc2); +struct request; +typedef void (rq_end_io_fn)(struct request *); + struct request_list { int count[2]; int starved[2]; @@ -176,6 +179,12 @@ struct request { * For Power Management requests */ struct request_pm_state *pm; + + /* + * completion callback. end_io_data should be folded in with waiting + */ + rq_end_io_fn *end_io; + void *end_io_data; }; /* @@ -266,6 +275,8 @@ struct bio_vec; typedef int (merge_bvec_fn) (request_queue_t *, struct bio *, struct bio_vec *); typedef void (activity_fn) (void *data, int rw); typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); +typedef int (prepare_flush_fn) (request_queue_t *, struct request *); +typedef void (end_flush_fn) (request_queue_t *, struct request *); enum blk_queue_state { Queue_down, @@ -309,6 +320,8 @@ struct request_queue merge_bvec_fn *merge_bvec_fn; activity_fn *activity_fn; issue_flush_fn *issue_flush_fn; + prepare_flush_fn *prepare_flush_fn; + end_flush_fn *end_flush_fn; /* * Auto-unplugging state @@ -380,6 +393,18 @@ struct request_queue unsigned int sg_reserved_size; struct list_head drain_list; + + /* + * reserved for flush operations + */ + struct request *flush_rq; + unsigned char ordered; +}; + +enum { + QUEUE_ORDERED_NONE, + QUEUE_ORDERED_TAG, + QUEUE_ORDERED_FLUSH, }; #define RQ_INACTIVE (-1) @@ -396,12 +421,13 @@ struct request_queue #define QUEUE_FLAG_DEAD 5 /* queue being torn down */ #define QUEUE_FLAG_REENTER 6 /* Re-entrancy avoidance */ #define QUEUE_FLAG_PLUGGED 7 /* queue is plugged */ -#define QUEUE_FLAG_ORDERED 8 /* supports ordered writes */ -#define QUEUE_FLAG_DRAIN 9 /* draining queue for sched switch */ +#define QUEUE_FLAG_DRAIN 8 /* draining queue for sched switch */ +#define QUEUE_FLAG_FLUSH 9 /* doing barrier flush sequence */ #define blk_queue_plugged(q) test_bit(QUEUE_FLAG_PLUGGED, &(q)->queue_flags) #define blk_queue_tagged(q) test_bit(QUEUE_FLAG_QUEUED, &(q)->queue_flags) #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) +#define blk_queue_flushing(q) test_bit(QUEUE_FLAG_FLUSH, &(q)->queue_flags) #define blk_fs_request(rq) ((rq)->flags & REQ_CMD) #define blk_pc_request(rq) ((rq)->flags & REQ_BLOCK_PC) @@ -509,10 +535,10 @@ extern void blk_unregister_queue(struct gendisk *disk); extern void register_disk(struct gendisk *dev); extern void generic_make_request(struct bio *bio); extern void blk_put_request(struct request *); +extern void blk_end_sync_rq(struct request *rq); extern void blk_attempt_remerge(request_queue_t *, struct request *); extern void __blk_attempt_remerge(request_queue_t *, struct request *); extern struct request *blk_get_request(request_queue_t *, int, int); -extern void blk_put_request(struct request *); extern void blk_insert_request(request_queue_t *, struct request *, int, void *, int); extern void blk_requeue_request(request_queue_t *, struct request *); extern void blk_plug_device(request_queue_t *); @@ -602,6 +628,9 @@ extern struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bd extern void blk_queue_ordered(request_queue_t *, int); extern void blk_queue_issue_flush_fn(request_queue_t *, issue_flush_fn *); extern int blkdev_scsi_issue_flush_fn(request_queue_t *, struct gendisk *, sector_t *); +extern struct request *blk_start_pre_flush(request_queue_t *,struct request *); +extern int blk_complete_barrier_rq(request_queue_t *, struct request *, int); +extern int blk_complete_barrier_rq_locked(request_queue_t *, struct request *, int); extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *); extern void blk_dump_rq_flags(struct request *, char *); diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index f388b513df75..e0d70070fabc 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -203,6 +203,9 @@ int file_fsync(struct file *, struct dentry *, int); int nobh_prepare_write(struct page*, unsigned, unsigned, get_block_t*); int nobh_commit_write(struct file *, struct page *, unsigned, unsigned); int nobh_truncate_page(struct address_space *, loff_t); +int nobh_writepage(struct page *page, get_block_t *get_block, + struct writeback_control *wbc); + /* * inline definitions diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 383275bf924e..56fa057bf0d7 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -16,6 +16,7 @@ COMPATIBLE_IOCTL(TCSETA) COMPATIBLE_IOCTL(TCSETAW) COMPATIBLE_IOCTL(TCSETAF) COMPATIBLE_IOCTL(TCSBRK) +ULONG_IOCTL(TCSBRKP) COMPATIBLE_IOCTL(TCXONC) COMPATIBLE_IOCTL(TCFLSH) COMPATIBLE_IOCTL(TCGETS) diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index eec2f88c4301..a6fa615afab5 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h @@ -10,7 +10,7 @@ #endif #if __GNUC_MINOR__ > 0 -# define __deprecated __attribute__((deprecated)) +# define __deprecated __attribute__((deprecated)) #endif #if __GNUC_MINOR__ >= 3 @@ -23,12 +23,10 @@ #define __attribute_const__ __attribute__((__const__)) #if __GNUC_MINOR__ >= 1 -#define noinline __attribute__((noinline)) +#define noinline __attribute__((noinline)) #endif + #if __GNUC_MINOR__ >= 4 -#define __must_check __attribute__((warn_unused_result)) +#define __must_check __attribute__((warn_unused_result)) #endif -#if __GNUC_MINOR__ >= 5 -#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) -#endif diff --git a/include/linux/compiler-gcc+.h b/include/linux/compiler-gcc4.h index 6b9308541dcd..53686c037a06 100644 --- a/include/linux/compiler-gcc+.h +++ b/include/linux/compiler-gcc4.h @@ -1,9 +1,6 @@ /* Never include this file directly. Include <linux/compiler.h> instead. */ -/* - * These definitions are for Ueber-GCC: always newer than the latest - * version and hence sporting everything plus a kitchen-sink. - */ +/* These definitions are for GCC v4.x. */ #include <linux/compiler-gcc.h> #define inline inline __attribute__((always_inline)) @@ -13,4 +10,7 @@ #define __attribute_used__ __attribute__((__used__)) #define __attribute_pure__ __attribute__((pure)) #define __attribute_const__ __attribute__((__const__)) +#define noinline __attribute__((noinline)) #define __must_check __attribute__((warn_unused_result)) +#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) + diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 0fd06b029847..b475fd608115 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -34,8 +34,10 @@ extern void __chk_io_ptr(void __iomem *); #ifdef __KERNEL__ -#if __GNUC__ > 3 -# include <linux/compiler-gcc+.h> /* catch-all for GCC 4, 5, etc. */ +#if __GNUC__ > 4 +#error no compiler-gcc.h file for this gcc version +#elif __GNUC__ == 4 +# include <linux/compiler-gcc4.h> #elif __GNUC__ == 3 # include <linux/compiler-gcc3.h> #elif __GNUC__ == 2 diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index 062049ca5c44..725be90ef55e 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -26,6 +26,7 @@ struct vc_data { const struct consw *vc_sw; unsigned short *vc_screenbuf; /* In-memory character/attribute buffer */ unsigned int vc_screenbuf_size; + unsigned char vc_mode; /* KD_TEXT, ... */ /* attributes for all characters on screen */ unsigned char vc_attr; /* Current attributes */ unsigned char vc_def_color; /* Default colors */ @@ -48,6 +49,11 @@ struct vc_data { unsigned int vc_state; /* Escape sequence parser state */ unsigned int vc_npar,vc_par[NPAR]; /* Parameters of current escape sequence */ struct tty_struct *vc_tty; /* TTY we are attached to */ + /* data for manual vt switching */ + struct vt_mode vt_mode; + int vt_pid; + int vt_newvt; + wait_queue_head_t paste_wait; /* mode flags */ unsigned int vc_charset : 1; /* Character set G0 / G1 */ unsigned int vc_s_charset : 1; /* Saved character set */ @@ -89,7 +95,6 @@ struct vc_data { struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ unsigned long vc_uni_pagedir; unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */ - struct vt_struct *vc_vt; /* additional information is in vt_kern.h */ }; diff --git a/include/linux/consolemap.h b/include/linux/consolemap.h index dee4b654c589..65842efc1b70 100644 --- a/include/linux/consolemap.h +++ b/include/linux/consolemap.h @@ -11,5 +11,5 @@ struct vc_data; extern unsigned char inverse_translate(struct vc_data *conp, int glyph); -extern unsigned short *set_translate(int m,int currcons); +extern unsigned short *set_translate(int m, struct vc_data *vc); extern int conv_uni_to_pc(struct vc_data *conp, long ucs); diff --git a/include/linux/cryptohash.h b/include/linux/cryptohash.h new file mode 100644 index 000000000000..c118b2ad9807 --- /dev/null +++ b/include/linux/cryptohash.h @@ -0,0 +1,12 @@ +#ifndef __CRYPTOHASH_H +#define __CRYPTOHASH_H + +#define SHA_DIGEST_WORDS 5 +#define SHA_WORKSPACE_WORDS 80 + +void sha_init(__u32 *buf); +void sha_transform(__u32 *digest, const char *data, __u32 *W); + +__u32 half_md4_transform(__u32 buf[4], __u32 const in[8]); + +#endif diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 2da76867183c..50be290d24d2 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -162,17 +162,16 @@ extern spinlock_t dcache_lock; * d_drop - drop a dentry * @dentry: dentry to drop * - * d_drop() unhashes the entry from the parent - * dentry hashes, so that it won't be found through - * a VFS lookup any more. Note that this is different - * from deleting the dentry - d_delete will try to - * mark the dentry negative if possible, giving a - * successful _negative_ lookup, while d_drop will + * d_drop() unhashes the entry from the parent dentry hashes, so that it won't + * be found through a VFS lookup any more. Note that this is different from + * deleting the dentry - d_delete will try to mark the dentry negative if + * possible, giving a successful _negative_ lookup, while d_drop will * just make the cache lookup fail. * - * d_drop() is used mainly for stuff that wants - * to invalidate a dentry for some reason (NFS - * timeouts or autofs deletes). + * d_drop() is used mainly for stuff that wants to invalidate a dentry for some + * reason (NFS timeouts or autofs deletes). + * + * __d_drop requires dentry->d_lock. */ static inline void __d_drop(struct dentry *dentry) @@ -186,7 +185,9 @@ static inline void __d_drop(struct dentry *dentry) static inline void d_drop(struct dentry *dentry) { spin_lock(&dcache_lock); + spin_lock(&dentry->d_lock); __d_drop(dentry); + spin_unlock(&dentry->d_lock); spin_unlock(&dcache_lock); } diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h index bf2d65765189..cb31719ee192 100644 --- a/include/linux/dqblk_xfs.h +++ b/include/linux/dqblk_xfs.h @@ -28,6 +28,12 @@ */ #define XQM_CMD(x) (('X'<<8)+(x)) /* note: forms first QCMD argument */ +#define XQM_COMMAND(x) (((x) & (0xff<<8)) == ('X'<<8)) /* test if for XFS */ + +#define XQM_USRQUOTA 0 /* system call user quota type */ +#define XQM_GRPQUOTA 1 /* system call group quota type */ +#define XQM_MAXQUOTAS 2 + #define Q_XQUOTAON XQM_CMD(1) /* enable accounting/enforcement */ #define Q_XQUOTAOFF XQM_CMD(2) /* disable accounting/enforcement */ #define Q_XGETQUOTA XQM_CMD(3) /* get disk limits and usage */ diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h index 47445f93d4f7..e8292af9033b 100644 --- a/include/linux/ext3_jbd.h +++ b/include/linux/ext3_jbd.h @@ -111,9 +111,9 @@ void ext3_journal_abort_handle(const char *caller, const char *err_fn, static inline int __ext3_journal_get_undo_access(const char *where, handle_t *handle, - struct buffer_head *bh, int *credits) + struct buffer_head *bh) { - int err = journal_get_undo_access(handle, bh, credits); + int err = journal_get_undo_access(handle, bh); if (err) ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); return err; @@ -121,19 +121,18 @@ __ext3_journal_get_undo_access(const char *where, handle_t *handle, static inline int __ext3_journal_get_write_access(const char *where, handle_t *handle, - struct buffer_head *bh, int *credits) + struct buffer_head *bh) { - int err = journal_get_write_access(handle, bh, credits); + int err = journal_get_write_access(handle, bh); if (err) ext3_journal_abort_handle(where, __FUNCTION__, bh, handle,err); return err; } static inline void -ext3_journal_release_buffer(handle_t *handle, struct buffer_head *bh, - int credits) +ext3_journal_release_buffer(handle_t *handle, struct buffer_head *bh) { - journal_release_buffer(handle, bh, credits); + journal_release_buffer(handle, bh); } static inline int @@ -176,12 +175,10 @@ __ext3_journal_dirty_metadata(const char *where, } -#define ext3_journal_get_undo_access(handle, bh, credits) \ - __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh), (credits)) +#define ext3_journal_get_undo_access(handle, bh) \ + __ext3_journal_get_undo_access(__FUNCTION__, (handle), (bh)) #define ext3_journal_get_write_access(handle, bh) \ - __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh), NULL) -#define ext3_journal_get_write_access_credits(handle, bh, credits) \ - __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh), (credits)) + __ext3_journal_get_write_access(__FUNCTION__, (handle), (bh)) #define ext3_journal_revoke(handle, blocknr, bh) \ __ext3_journal_revoke(__FUNCTION__, (handle), (blocknr), (bh)) #define ext3_journal_get_create_access(handle, bh) \ diff --git a/include/linux/fs.h b/include/linux/fs.h index c4081935da26..3ea266972f06 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -129,6 +129,7 @@ extern int dir_notify_enable; #define S_DIRSYNC 64 /* Directory modifications are synchronous */ #define S_NOCMTIME 128 /* Do not update file c/mtime */ #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ +#define S_PRIVATE 512 /* Inode is fs-internal */ /* * Note that nosuid etc flags are inode-specific: setting some file-system @@ -162,6 +163,7 @@ extern int dir_notify_enable; #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) +#define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) /* the read-only stuff doesn't really belong here, but any other place is probably as bad and I don't want to create yet another include file. */ diff --git a/include/linux/ide.h b/include/linux/ide.h index 28f35bc8ba7e..9c25adc6c28d 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h @@ -740,7 +740,6 @@ typedef struct ide_drive_s { u8 sect; /* "real" sectors per track */ u8 bios_head; /* BIOS/fdisk/LILO number of heads */ u8 bios_sect; /* BIOS/fdisk/LILO sectors per track */ - u8 doing_barrier; /* state, 1=currently doing flush */ unsigned int bios_cyl; /* BIOS/fdisk/LILO number of cyls */ unsigned int cyl; /* "real" number of cyls */ @@ -1130,6 +1129,7 @@ extern ide_hwif_t ide_hwifs[]; /* master data repository */ extern int noautodma; extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs); +extern int __ide_end_request (ide_drive_t *drive, struct request *rq, int uptodate, int nrsecs); /* * This is used on exit from the driver to designate the next irq handler diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 6498e9da9ce6..a6a8c1a38d5e 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -51,6 +51,7 @@ .list = LIST_HEAD_INIT(sig.shared_pending.list), \ .signal = {{0}}}, \ .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ + .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ .rlim = INIT_RLIMITS, \ } @@ -89,9 +90,6 @@ extern struct group_info init_groups; .children = LIST_HEAD_INIT(tsk.children), \ .sibling = LIST_HEAD_INIT(tsk.sibling), \ .group_leader = &tsk, \ - .real_timer = { \ - .function = it_real_fn \ - }, \ .group_info = &init_groups, \ .cap_effective = CAP_INIT_EFF_SET, \ .cap_inheritable = CAP_INIT_INH_SET, \ @@ -112,8 +110,16 @@ extern struct group_info init_groups; .proc_lock = SPIN_LOCK_UNLOCKED, \ .switch_lock = SPIN_LOCK_UNLOCKED, \ .journal_info = NULL, \ + .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ } +#define INIT_CPU_TIMERS(cpu_timers) \ +{ \ + LIST_HEAD_INIT(cpu_timers[0]), \ + LIST_HEAD_INIT(cpu_timers[1]), \ + LIST_HEAD_INIT(cpu_timers[2]), \ +} + #endif diff --git a/include/linux/ioc4_common.h b/include/linux/ioc4_common.h new file mode 100644 index 000000000000..b03bcc46df55 --- /dev/null +++ b/include/linux/ioc4_common.h @@ -0,0 +1,21 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * Copyright (c) 2005 Silicon Graphics, Inc. All Rights Reserved. + */ + +#ifndef _LINUX_IOC4_COMMON_H +#define _LINUX_IOC4_COMMON_H + +/* prototypes */ + +int ioc4_serial_init(void); + +int ioc4_serial_attach_one(struct pci_dev *pdev, const struct + pci_device_id *pci_id); +int ioc4_ide_attach_one(struct pci_dev *pdev, const struct + pci_device_id *pci_id); + +#endif /* _LINUX_IOC4_COMMON_H */ diff --git a/include/linux/ipmi_smi.h b/include/linux/ipmi_smi.h index 88dd37439078..e36ee157ad67 100644 --- a/include/linux/ipmi_smi.h +++ b/include/linux/ipmi_smi.h @@ -104,13 +104,22 @@ struct ipmi_smi_handlers /* Called to poll for work to do. This is so upper layers can poll for operations during things like crash dumps. */ void (*poll)(void *send_info); + + /* Tell the handler that we are using it/not using it. The + message handler get the modules that this handler belongs + to; this function lets the SMI claim any modules that it + uses. These may be NULL if this is not required. */ + int (*inc_usecount)(void *send_info); + void (*dec_usecount)(void *send_info); }; -/* Add a low-level interface to the IPMI driver. */ +/* Add a low-level interface to the IPMI driver. Note that if the + interface doesn't know its slave address, it should pass in zero. */ int ipmi_register_smi(struct ipmi_smi_handlers *handlers, void *send_info, unsigned char version_major, unsigned char version_minor, + unsigned char slave_addr, ipmi_smi_t *intf); /* diff --git a/include/linux/jbd.h b/include/linux/jbd.h index f857ff09921d..e28f8b23558f 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -789,6 +789,12 @@ struct journal_s struct jbd_revoke_table_s *j_revoke_table[2]; /* + * array of bhs for journal_commit_transaction + */ + struct buffer_head **j_wbuf; + int j_wbufsize; + + /* * An opaque pointer to fs-private information. ext3 puts its * superblock pointer here */ @@ -867,15 +873,12 @@ static inline handle_t *journal_current_handle(void) extern handle_t *journal_start(journal_t *, int nblocks); extern int journal_restart (handle_t *, int nblocks); extern int journal_extend (handle_t *, int nblocks); -extern int journal_get_write_access(handle_t *, struct buffer_head *, - int *credits); +extern int journal_get_write_access(handle_t *, struct buffer_head *); extern int journal_get_create_access (handle_t *, struct buffer_head *); -extern int journal_get_undo_access(handle_t *, struct buffer_head *, - int *credits); +extern int journal_get_undo_access(handle_t *, struct buffer_head *); extern int journal_dirty_data (handle_t *, struct buffer_head *); extern int journal_dirty_metadata (handle_t *, struct buffer_head *); -extern void journal_release_buffer (handle_t *, struct buffer_head *, - int credits); +extern void journal_release_buffer (handle_t *, struct buffer_head *); extern int journal_forget (handle_t *, struct buffer_head *); extern void journal_sync_buffer (struct buffer_head *); extern int journal_invalidatepage(journal_t *, diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h index 8751663d04cc..8a62d1e84b9b 100644 --- a/include/linux/journal-head.h +++ b/include/linux/journal-head.h @@ -32,6 +32,13 @@ struct journal_head { unsigned b_jlist; /* + * This flag signals the buffer has been modified by + * the currently running transaction + * [jbd_lock_bh_state()] + */ + unsigned b_modified; + + /* * Copy of the buffer data frozen for writing to the log. * [jbd_lock_bh_state()] */ diff --git a/include/linux/loop.h b/include/linux/loop.h index 652124463a24..8220d9c9da00 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h @@ -71,7 +71,10 @@ struct loop_device { /* * Loop flags */ -#define LO_FLAGS_READ_ONLY 1 +enum { + LO_FLAGS_READ_ONLY = 1, + LO_FLAGS_USE_AOPS = 2, +}; #include <asm/posix_types.h> /* for __kernel_old_dev_t */ #include <asm/types.h> /* for __u64 */ diff --git a/include/linux/major.h b/include/linux/major.h index 8585730af484..4b62c42b842c 100644 --- a/include/linux/major.h +++ b/include/linux/major.h @@ -25,7 +25,6 @@ #define MISC_MAJOR 10 #define SCSI_CDROM_MAJOR 11 #define MUX_MAJOR 11 /* PA-RISC only */ -#define QIC02_TAPE_MAJOR 12 #define XT_DISK_MAJOR 13 #define INPUT_MAJOR 13 #define SOUND_MAJOR 14 diff --git a/include/linux/mpage.h b/include/linux/mpage.h index 86aa7b676274..3ca880463c47 100644 --- a/include/linux/mpage.h +++ b/include/linux/mpage.h @@ -11,12 +11,15 @@ */ struct writeback_control; +typedef int (writepage_t)(struct page *page, struct writeback_control *wbc); int mpage_readpages(struct address_space *mapping, struct list_head *pages, unsigned nr_pages, get_block_t get_block); int mpage_readpage(struct page *page, get_block_t get_block); int mpage_writepages(struct address_space *mapping, struct writeback_control *wbc, get_block_t get_block); +int mpage_writepage(struct page *page, get_block_t *get_block, + struct writeback_control *wbc); static inline int generic_writepages(struct address_space *mapping, struct writeback_control *wbc) diff --git a/include/linux/mtio.h b/include/linux/mtio.h index 4f2daa83d3ad..8c66151821e3 100644 --- a/include/linux/mtio.h +++ b/include/linux/mtio.h @@ -150,34 +150,6 @@ struct mtpos { }; -/* structure for MTIOCGETCONFIG/MTIOCSETCONFIG primarily intended - * as an interim solution for QIC-02 until DDI is fully implemented. - */ -struct mtconfiginfo { - long mt_type; /* drive type */ - long ifc_type; /* interface card type */ - unsigned short irqnr; /* IRQ number to use */ - unsigned short dmanr; /* DMA channel to use */ - unsigned short port; /* IO port base address */ - - unsigned long debug; /* debugging flags */ - - unsigned have_dens:1; - unsigned have_bsf:1; - unsigned have_fsr:1; - unsigned have_bsr:1; - unsigned have_eod:1; - unsigned have_seek:1; - unsigned have_tell:1; - unsigned have_ras1:1; - unsigned have_ras2:1; - unsigned have_ras3:1; - unsigned have_qfa:1; - - unsigned pad1:5; - char reserved[10]; -}; - /* structure for MTIOCVOLINFO, query information about the volume * currently positioned at (zftape) */ diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 45c638b9fdef..b65f84ec1118 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -397,6 +397,8 @@ #define PCI_DEVICE_ID_NS_SCx200_VIDEO 0x0504 #define PCI_DEVICE_ID_NS_SCx200_XBUS 0x0505 #define PCI_DEVICE_ID_NS_SC1100_BRIDGE 0x0510 +#define PCI_DEVICE_ID_NS_SC1100_SMI 0x0511 +#define PCI_DEVICE_ID_NS_SC1100_XBUS 0x0515 #define PCI_DEVICE_ID_NS_87410 0xd001 #define PCI_VENDOR_ID_TSENG 0x100c diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h index 006f3e9af475..f942e2bad8e3 100644 --- a/include/linux/posix-timers.h +++ b/include/linux/posix-timers.h @@ -3,6 +3,36 @@ #include <linux/spinlock.h> #include <linux/list.h> +#include <linux/sched.h> + +union cpu_time_count { + cputime_t cpu; + unsigned long long sched; +}; + +struct cpu_timer_list { + struct list_head entry; + union cpu_time_count expires, incr; + struct task_struct *task; + int firing; +}; + +#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) +#define CPUCLOCK_PERTHREAD(clock) \ + (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) +#define CPUCLOCK_PID_MASK 7 +#define CPUCLOCK_PERTHREAD_MASK 4 +#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) +#define CPUCLOCK_CLOCK_MASK 3 +#define CPUCLOCK_PROF 0 +#define CPUCLOCK_VIRT 1 +#define CPUCLOCK_SCHED 2 +#define CPUCLOCK_MAX 3 + +#define MAKE_PROCESS_CPUCLOCK(pid, clock) \ + ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) +#define MAKE_THREAD_CPUCLOCK(tid, clock) \ + MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK) /* POSIX.1b interval timer structure. */ struct k_itimer { @@ -13,15 +43,27 @@ struct k_itimer { int it_overrun; /* overrun on pending signal */ int it_overrun_last; /* overrun on last delivered signal */ int it_requeue_pending; /* waiting to requeue this timer */ +#define REQUEUE_PENDING 1 int it_sigev_notify; /* notify word of sigevent struct */ int it_sigev_signo; /* signo word of sigevent struct */ sigval_t it_sigev_value; /* value word of sigevent struct */ - unsigned long it_incr; /* interval specified in jiffies */ struct task_struct *it_process; /* process to send signal to */ - struct timer_list it_timer; struct sigqueue *sigq; /* signal queue entry. */ - struct list_head abs_timer_entry; /* clock abs_timer_list */ - struct timespec wall_to_prev; /* wall_to_monotonic used when set */ + union { + struct { + struct timer_list timer; + struct list_head abs_timer_entry; /* clock abs_timer_list */ + struct timespec wall_to_prev; /* wall_to_monotonic used when set */ + unsigned long incr; /* interval in jiffies */ + } real; + struct cpu_timer_list cpu; + struct { + unsigned int clock; + unsigned int node; + unsigned long incr; + unsigned long expires; + } mmtimer; + } it; }; struct k_clock_abs { @@ -30,26 +72,27 @@ struct k_clock_abs { }; struct k_clock { int res; /* in nano seconds */ + int (*clock_getres) (clockid_t which_clock, struct timespec *tp); struct k_clock_abs *abs_struct; - int (*clock_set) (struct timespec * tp); - int (*clock_get) (struct timespec * tp); + int (*clock_set) (clockid_t which_clock, struct timespec * tp); + int (*clock_get) (clockid_t which_clock, struct timespec * tp); int (*timer_create) (struct k_itimer *timer); - int (*nsleep) (int which_clock, int flags, - struct timespec * t); + int (*nsleep) (clockid_t which_clock, int flags, struct timespec *); int (*timer_set) (struct k_itimer * timr, int flags, struct itimerspec * new_setting, struct itimerspec * old_setting); int (*timer_del) (struct k_itimer * timr); +#define TIMER_RETRY 1 void (*timer_get) (struct k_itimer * timr, struct itimerspec * cur_setting); }; -void register_posix_clock(int clock_id, struct k_clock *new_clock); +void register_posix_clock(clockid_t clock_id, struct k_clock *new_clock); /* Error handlers for timer_create, nanosleep and settime */ int do_posix_clock_notimer_create(struct k_itimer *timer); -int do_posix_clock_nonanosleep(int which_clock, int flags, struct timespec * t); -int do_posix_clock_nosettime(struct timespec *tp); +int do_posix_clock_nonanosleep(clockid_t, int flags, struct timespec *); +int do_posix_clock_nosettime(clockid_t, struct timespec *tp); /* function to call to trigger timer event */ int posix_timer_event(struct k_itimer *timr, int si_private); @@ -65,12 +108,32 @@ struct now_struct { #define posix_bump_timer(timr, now) \ do { \ long delta, orun; \ - delta = now.jiffies - (timr)->it_timer.expires; \ + delta = now.jiffies - (timr)->it.real.timer.expires; \ if (delta >= 0) { \ - orun = 1 + (delta / (timr)->it_incr); \ - (timr)->it_timer.expires += orun * (timr)->it_incr; \ + orun = 1 + (delta / (timr)->it.real.incr); \ + (timr)->it.real.timer.expires += \ + orun * (timr)->it.real.incr; \ (timr)->it_overrun += orun; \ } \ }while (0) -#endif +int posix_cpu_clock_getres(clockid_t which_clock, struct timespec *); +int posix_cpu_clock_get(clockid_t which_clock, struct timespec *); +int posix_cpu_clock_set(clockid_t which_clock, const struct timespec *tp); +int posix_cpu_timer_create(struct k_itimer *); +int posix_cpu_nsleep(clockid_t, int, struct timespec *); +int posix_cpu_timer_set(struct k_itimer *, int, + struct itimerspec *, struct itimerspec *); +int posix_cpu_timer_del(struct k_itimer *); +void posix_cpu_timer_get(struct k_itimer *, struct itimerspec *); + +void posix_cpu_timer_schedule(struct k_itimer *); + +void run_posix_cpu_timers(struct task_struct *); +void posix_cpu_timers_exit(struct task_struct *); +void posix_cpu_timers_exit_group(struct task_struct *); + +void set_process_cpu_timer(struct task_struct *, unsigned int, + cputime_t *, cputime_t *); + +#endif diff --git a/include/linux/random.h b/include/linux/random.h index cccb11199d88..cc6703449916 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -57,14 +57,6 @@ extern u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport); extern __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr, __u16 sport, __u16 dport); -extern __u32 secure_tcp_syn_cookie(__u32 saddr, __u32 daddr, - __u16 sport, __u16 dport, - __u32 sseq, __u32 count, - __u32 data); -extern __u32 check_tcp_syn_cookie(__u32 cookie, __u32 saddr, - __u32 daddr, __u16 sport, - __u16 dport, __u32 sseq, - __u32 count, __u32 maxdiff); extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, __u16 sport, __u16 dport); diff --git a/include/linux/reiserfs_fs_i.h b/include/linux/reiserfs_fs_i.h index e08142a75f03..e321eb050d65 100644 --- a/include/linux/reiserfs_fs_i.h +++ b/include/linux/reiserfs_fs_i.h @@ -23,9 +23,8 @@ typedef enum { space on crash with some files open, but unlinked. */ i_link_saved_unlink_mask = 0x0010, i_link_saved_truncate_mask = 0x0020, - i_priv_object = 0x0080, - i_has_xattr_dir = 0x0100, - i_data_log = 0x0200, + i_has_xattr_dir = 0x0040, + i_data_log = 0x0080, } reiserfs_inode_flags; diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 9c40c4e9ba03..1eaa48eca811 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h @@ -31,7 +31,7 @@ struct reiserfs_xattr_handler { #ifdef CONFIG_REISERFS_FS_XATTR -#define is_reiserfs_priv_object(inode) (REISERFS_I(inode)->i_flags & i_priv_object) +#define is_reiserfs_priv_object(inode) IS_PRIVATE(inode) #define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) ssize_t reiserfs_getxattr (struct dentry *dentry, const char *name, void *buffer, size_t size); @@ -103,9 +103,16 @@ reiserfs_read_unlock_xattr_i(struct inode *inode) up_read (&REISERFS_I(inode)->xattr_sem); } +static inline void +reiserfs_mark_inode_private(struct inode *inode) +{ + inode->i_flags |= S_PRIVATE; +} + #else #define is_reiserfs_priv_object(inode) 0 +#define reiserfs_mark_inode_private(inode) #define reiserfs_getxattr NULL #define reiserfs_setxattr NULL #define reiserfs_listxattr NULL diff --git a/include/linux/sched.h b/include/linux/sched.h index 2f249f8015e5..cf90d1ed1a1f 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -32,6 +32,7 @@ #include <linux/pid.h> #include <linux/percpu.h> #include <linux/topology.h> +#include <linux/seccomp.h> struct exec_domain; @@ -300,6 +301,14 @@ struct signal_struct { /* POSIX.1b Interval Timers */ struct list_head posix_timers; + /* ITIMER_REAL timer for the process */ + struct timer_list real_timer; + unsigned long it_real_value, it_real_incr; + + /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ + cputime_t it_prof_expires, it_virt_expires; + cputime_t it_prof_incr, it_virt_incr; + /* job control IDs */ pid_t pgrp; pid_t tty_old_pgrp; @@ -320,6 +329,14 @@ struct signal_struct { unsigned long min_flt, maj_flt, cmin_flt, cmaj_flt; /* + * Cumulative ns of scheduled CPU time for dead threads in the + * group, not including a zombie group leader. (This only differs + * from jiffies_to_ns(utime + stime) if sched_clock uses something + * other than jiffies.) + */ + unsigned long long sched_time; + + /* * We don't bother to synchronize most readers of this at all, * because there is no reader checking a limit that actually needs * to get both rlim_cur and rlim_max atomically, and either one @@ -329,6 +346,8 @@ struct signal_struct { * have no need to disable irqs. */ struct rlimit rlim[RLIM_NLIMITS]; + + struct list_head cpu_timers[3]; }; /* @@ -540,6 +559,7 @@ struct task_struct { unsigned long sleep_avg; unsigned long long timestamp, last_ran; + unsigned long long sched_time; /* sched_clock time spent running */ int activated; unsigned long policy; @@ -593,15 +613,16 @@ struct task_struct { int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ unsigned long rt_priority; - unsigned long it_real_value, it_real_incr; - cputime_t it_virt_value, it_virt_incr; - cputime_t it_prof_value, it_prof_incr; - struct timer_list real_timer; cputime_t utime, stime; unsigned long nvcsw, nivcsw; /* context switch counts */ struct timespec start_time; /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ unsigned long min_flt, maj_flt; + + cputime_t it_prof_expires, it_virt_expires; + unsigned long long it_sched_expires; + struct list_head cpu_timers[3]; + /* process credentials */ uid_t uid,euid,suid,fsuid; gid_t gid,egid,sgid,fsgid; @@ -643,6 +664,7 @@ struct task_struct { void *security; struct audit_context *audit_context; + seccomp_t seccomp; /* Thread group tracking */ u32 parent_exec_id; @@ -774,6 +796,7 @@ static inline int set_cpus_allowed(task_t *p, cpumask_t new_mask) #endif extern unsigned long long sched_clock(void); +extern unsigned long long current_sched_time(const task_t *current_task); /* sched_exec is called by processes performing an exec */ #ifdef CONFIG_SMP diff --git a/include/linux/scx200.h b/include/linux/scx200.h index af7d53acad99..a22f9e173ad2 100644 --- a/include/linux/scx200.h +++ b/include/linux/scx200.h @@ -7,6 +7,10 @@ /* Interesting stuff for the National Semiconductor SCx200 CPU */ +extern unsigned scx200_cb_base; + +#define scx200_cb_present() (scx200_cb_base!=0) + /* F0 PCI Header/Bridge Configuration Registers */ #define SCx200_DOCCS_BASE 0x78 /* DOCCS Base Address Register */ #define SCx200_DOCCS_CTRL 0x7c /* DOCCS Control Register */ @@ -15,7 +19,7 @@ #define SCx200_GPIO_SIZE 0x2c /* Size of GPIO register block */ /* General Configuration Block */ -#define SCx200_CB_BASE 0x9000 /* Base fixed at 0x9000 according to errata */ +#define SCx200_CB_BASE_FIXED 0x9000 /* Base fixed at 0x9000 according to errata? */ /* Watchdog Timer */ #define SCx200_WDT_OFFSET 0x00 /* offset within configuration block */ @@ -44,9 +48,7 @@ #define SCx200_IID 0x3c /* IA On a Chip Identification Number Reg */ #define SCx200_REV 0x3d /* Revision Register */ #define SCx200_CBA 0x3e /* Configuration Base Address Register */ - -/* Verify that the configuration block really is there */ -#define scx200_cb_probe(base) (inw((base) + SCx200_CBA) == (base)) +#define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ /* Local variables: diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h new file mode 100644 index 000000000000..ee989b6ee22a --- /dev/null +++ b/include/linux/seccomp.h @@ -0,0 +1,33 @@ +#ifndef _LINUX_SECCOMP_H +#define _LINUX_SECCOMP_H + +#include <linux/config.h> + +#ifdef CONFIG_SECCOMP + +#define NR_SECCOMP_MODES 1 + +#include <linux/thread_info.h> + +typedef struct { int mode; } seccomp_t; + +extern void __secure_computing(int); +static inline void secure_computing(int this_syscall) +{ + if (unlikely(test_thread_flag(TIF_SECCOMP))) + __secure_computing(this_syscall); +} + +#else /* CONFIG_SECCOMP */ + +#if (__GNUC__ > 2) + typedef struct { } seccomp_t; +#else + typedef struct { int gcc_is_buggy; } seccomp_t; +#endif + +#define secure_computing(x) do { } while (0) + +#endif /* CONFIG_SECCOMP */ + +#endif /* _LINUX_SECCOMP_H */ diff --git a/include/linux/security.h b/include/linux/security.h index 2b048ec62e9c..78d91972c4dc 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -1426,11 +1426,15 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd, static inline int security_inode_alloc (struct inode *inode) { + if (unlikely (IS_PRIVATE (inode))) + return 0; return security_ops->inode_alloc_security (inode); } static inline void security_inode_free (struct inode *inode) { + if (unlikely (IS_PRIVATE (inode))) + return; security_ops->inode_free_security (inode); } @@ -1438,6 +1442,8 @@ static inline int security_inode_create (struct inode *dir, struct dentry *dentry, int mode) { + if (unlikely (IS_PRIVATE (dir))) + return 0; return security_ops->inode_create (dir, dentry, mode); } @@ -1445,6 +1451,8 @@ static inline void security_inode_post_create (struct inode *dir, struct dentry *dentry, int mode) { + if (dentry->d_inode && unlikely (IS_PRIVATE (dentry->d_inode))) + return; security_ops->inode_post_create (dir, dentry, mode); } @@ -1452,6 +1460,8 @@ static inline int security_inode_link (struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry) { + if (unlikely (IS_PRIVATE (old_dentry->d_inode))) + return 0; return security_ops->inode_link (old_dentry, dir, new_dentry); } @@ -1459,12 +1469,16 @@ static inline void security_inode_post_link (struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry) { + if (new_dentry->d_inode && unlikely (IS_PRIVATE (new_dentry->d_inode))) + return; security_ops->inode_post_link (old_dentry, dir, new_dentry); } static inline int security_inode_unlink (struct inode *dir, struct dentry *dentry) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_unlink (dir, dentry); } @@ -1472,6 +1486,8 @@ static inline int security_inode_symlink (struct inode *dir, struct dentry *dentry, const char *old_name) { + if (unlikely (IS_PRIVATE (dir))) + return 0; return security_ops->inode_symlink (dir, dentry, old_name); } @@ -1479,6 +1495,8 @@ static inline void security_inode_post_symlink (struct inode *dir, struct dentry *dentry, const char *old_name) { + if (dentry->d_inode && unlikely (IS_PRIVATE (dentry->d_inode))) + return; security_ops->inode_post_symlink (dir, dentry, old_name); } @@ -1486,6 +1504,8 @@ static inline int security_inode_mkdir (struct inode *dir, struct dentry *dentry, int mode) { + if (unlikely (IS_PRIVATE (dir))) + return 0; return security_ops->inode_mkdir (dir, dentry, mode); } @@ -1493,12 +1513,16 @@ static inline void security_inode_post_mkdir (struct inode *dir, struct dentry *dentry, int mode) { + if (dentry->d_inode && unlikely (IS_PRIVATE (dentry->d_inode))) + return; security_ops->inode_post_mkdir (dir, dentry, mode); } static inline int security_inode_rmdir (struct inode *dir, struct dentry *dentry) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_rmdir (dir, dentry); } @@ -1506,6 +1530,8 @@ static inline int security_inode_mknod (struct inode *dir, struct dentry *dentry, int mode, dev_t dev) { + if (unlikely (IS_PRIVATE (dir))) + return 0; return security_ops->inode_mknod (dir, dentry, mode, dev); } @@ -1513,6 +1539,8 @@ static inline void security_inode_post_mknod (struct inode *dir, struct dentry *dentry, int mode, dev_t dev) { + if (dentry->d_inode && unlikely (IS_PRIVATE (dentry->d_inode))) + return; security_ops->inode_post_mknod (dir, dentry, mode, dev); } @@ -1521,6 +1549,9 @@ static inline int security_inode_rename (struct inode *old_dir, struct inode *new_dir, struct dentry *new_dentry) { + if (unlikely (IS_PRIVATE (old_dentry->d_inode) || + (new_dentry->d_inode && IS_PRIVATE (new_dentry->d_inode)))) + return 0; return security_ops->inode_rename (old_dir, old_dentry, new_dir, new_dentry); } @@ -1530,83 +1561,114 @@ static inline void security_inode_post_rename (struct inode *old_dir, struct inode *new_dir, struct dentry *new_dentry) { + if (unlikely (IS_PRIVATE (old_dentry->d_inode) || + (new_dentry->d_inode && IS_PRIVATE (new_dentry->d_inode)))) + return; security_ops->inode_post_rename (old_dir, old_dentry, new_dir, new_dentry); } static inline int security_inode_readlink (struct dentry *dentry) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_readlink (dentry); } static inline int security_inode_follow_link (struct dentry *dentry, struct nameidata *nd) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_follow_link (dentry, nd); } static inline int security_inode_permission (struct inode *inode, int mask, struct nameidata *nd) { + if (unlikely (IS_PRIVATE (inode))) + return 0; return security_ops->inode_permission (inode, mask, nd); } static inline int security_inode_setattr (struct dentry *dentry, struct iattr *attr) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_setattr (dentry, attr); } static inline int security_inode_getattr (struct vfsmount *mnt, struct dentry *dentry) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_getattr (mnt, dentry); } static inline void security_inode_delete (struct inode *inode) { + if (unlikely (IS_PRIVATE (inode))) + return; security_ops->inode_delete (inode); } static inline int security_inode_setxattr (struct dentry *dentry, char *name, void *value, size_t size, int flags) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_setxattr (dentry, name, value, size, flags); } static inline void security_inode_post_setxattr (struct dentry *dentry, char *name, void *value, size_t size, int flags) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return; security_ops->inode_post_setxattr (dentry, name, value, size, flags); } static inline int security_inode_getxattr (struct dentry *dentry, char *name) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_getxattr (dentry, name); } static inline int security_inode_listxattr (struct dentry *dentry) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_listxattr (dentry); } static inline int security_inode_removexattr (struct dentry *dentry, char *name) { + if (unlikely (IS_PRIVATE (dentry->d_inode))) + return 0; return security_ops->inode_removexattr (dentry, name); } static inline int security_inode_getsecurity(struct inode *inode, const char *name, void *buffer, size_t size) { + if (unlikely (IS_PRIVATE (inode))) + return 0; return security_ops->inode_getsecurity(inode, name, buffer, size); } static inline int security_inode_setsecurity(struct inode *inode, const char *name, const void *value, size_t size, int flags) { + if (unlikely (IS_PRIVATE (inode))) + return 0; return security_ops->inode_setsecurity(inode, name, value, size, flags); } static inline int security_inode_listsecurity(struct inode *inode, char *buffer, size_t buffer_size) { + if (unlikely (IS_PRIVATE (inode))) + return 0; return security_ops->inode_listsecurity(inode, buffer, buffer_size); } @@ -1883,6 +1945,8 @@ static inline int security_sem_semop (struct sem_array * sma, static inline void security_d_instantiate (struct dentry *dentry, struct inode *inode) { + if (unlikely (inode && IS_PRIVATE (inode))) + return; security_ops->d_instantiate (dentry, inode); } diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index 28141af6a19a..850a974ee505 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h @@ -18,6 +18,7 @@ struct seq_file { size_t from; size_t count; loff_t index; + loff_t version; struct semaphore sem; struct seq_operations *op; void *private; diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index c45598d0a846..b5c7b44da087 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -106,6 +106,10 @@ /* TXX9 type number */ #define PORT_TXX9 64 +/* NEC VR4100 series SIU/DSIU */ +#define PORT_VR41XX_SIU 65 +#define PORT_VR41XX_DSIU 66 + #ifdef __KERNEL__ #include <linux/config.h> diff --git a/include/linux/signal.h b/include/linux/signal.h index e5f3d83ab215..99c97ad026c8 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -8,8 +8,6 @@ #ifdef __KERNEL__ -#define MAX_SIGPENDING 1024 - /* * Real Time signals may be queued. */ @@ -212,6 +210,7 @@ static inline void init_sigpending(struct sigpending *sig) } extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); +extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); extern long do_sigpending(void __user *, unsigned long); extern int sigprocmask(int, sigset_t *, sigset_t *); diff --git a/include/linux/sort.h b/include/linux/sort.h new file mode 100644 index 000000000000..d534da2b5575 --- /dev/null +++ b/include/linux/sort.h @@ -0,0 +1,10 @@ +#ifndef _LINUX_SORT_H +#define _LINUX_SORT_H + +#include <linux/types.h> + +void sort(void *base, size_t num, size_t size, + int (*cmp)(const void *, const void *), + void (*swap)(void *, void *, int)); + +#endif diff --git a/include/linux/stop_machine.h b/include/linux/stop_machine.h index 6f43cb53f21b..151a803ed0ed 100644 --- a/include/linux/stop_machine.h +++ b/include/linux/stop_machine.h @@ -8,7 +8,7 @@ #include <linux/cpu.h> #include <asm/system.h> -#ifdef CONFIG_SMP +#if defined(CONFIG_STOP_MACHINE) && defined(CONFIG_SMP) /** * stop_machine_run: freeze the machine on all CPUs and run this function * @fn: the function to run diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 138f5b178f39..4b6993558ee2 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -15,11 +15,22 @@ typedef struct pbe { unsigned long address; /* address of the copy */ unsigned long orig_address; /* original address of page */ swp_entry_t swap_address; - swp_entry_t dummy; /* we need scratch space at - * end of page (see link, diskpage) - */ + + struct pbe *next; /* also used as scratch space at + * end of page (see link, diskpage) + */ } suspend_pagedir_t; +#define for_each_pbe(pbe, pblist) \ + for (pbe = pblist ; pbe ; pbe = pbe->next) + +#define PBES_PER_PAGE (PAGE_SIZE/sizeof(struct pbe)) +#define PB_PAGE_SKIP (PBES_PER_PAGE-1) + +#define for_each_pb_page(pbe, pblist) \ + for (pbe = pblist ; pbe ; pbe = (pbe+PB_PAGE_SKIP)->next) + + #define SWAP_FILENAME_MAXLENGTH 32 diff --git a/include/linux/threads.h b/include/linux/threads.h index 4243c55cce87..b59738ac6197 100644 --- a/include/linux/threads.h +++ b/include/linux/threads.h @@ -7,7 +7,7 @@ * The default limit for the nr of threads is now in * /proc/sys/kernel/threads-max. */ - + /* * Maximum supported processors that can run under SMP. This value is * set via configure setting. The maximum is equal to the size of the @@ -25,11 +25,12 @@ /* * This controls the default maximum pid allocated to a process */ -#define PID_MAX_DEFAULT 0x8000 +#define PID_MAX_DEFAULT (CONFIG_BASE_SMALL ? 0x1000 : 0x8000) /* * A maximum of 4 million PIDs should be enough for a while: */ -#define PID_MAX_LIMIT (sizeof(long) > 4 ? 4*1024*1024 : PID_MAX_DEFAULT) +#define PID_MAX_LIMIT (CONFIG_BASE_SMALL ? PAGE_SIZE * 8 : \ + (sizeof(long) > 4 ? 4 * 1024 * 1024 : PID_MAX_DEFAULT)) #endif diff --git a/include/linux/tpqic02.h b/include/linux/tpqic02.h deleted file mode 100644 index f0dfcfa56273..000000000000 --- a/include/linux/tpqic02.h +++ /dev/null @@ -1,738 +0,0 @@ -/* $Id: tpqic02.h,v 1.5 1996/12/14 23:01:38 root Exp root $ - * - * Include file for QIC-02 driver for Linux. - * - * Copyright (c) 1992--1995 by H. H. Bergman. All rights reserved. - * - * ******* USER CONFIG SECTION BELOW (Near line 70) ******* - */ - -#ifndef _LINUX_TPQIC02_H -#define _LINUX_TPQIC02_H - -#include <linux/config.h> - -#if defined(CONFIG_QIC02_TAPE) || defined(CONFIG_QIC02_TAPE_MODULE) - -/* need to have QIC02_TAPE_DRIVE and QIC02_TAPE_IFC expand to something */ -#include <linux/mtio.h> - - -/* Make QIC02_TAPE_IFC expand to something. - * - * The only difference between WANGTEK and EVEREX is in the - * handling of the DMA channel 3. - * Note that the driver maps EVEREX to WANGTEK internally for speed - * reasons. Externally WANGTEK==1, EVEREX==2, ARCHIVE==3. - * These must correspond to the values used in qic02config(1). - * - * Support for Mountain controllers was added by Erik Jacobson - * and severely hacked by me. -- hhb - * - * Support for Emerald controllers by Alan Bain <afrb2@chiark.chu.cam.ac.uk> - * with more hacks by me. -- hhb - */ -#define WANGTEK 1 /* don't know about Wangtek QIC-36 */ -#define EVEREX (WANGTEK+1) /* I heard *some* of these are identical */ -#define EVEREX_811V EVEREX /* With TEAC MT 2ST 45D */ -#define EVEREX_831V EVEREX -#define ARCHIVE 3 -#define ARCHIVE_SC400 ARCHIVE /* rumoured to be from the pre-SMD-age */ -#define ARCHIVE_SC402 ARCHIVE /* don't know much about SC400 */ -#define ARCHIVE_SC499 ARCHIVE /* SC402 and SC499R should be identical */ - -#define MOUNTAIN 5 /* Mountain Computer Interface */ -#define EMERALD 6 /* Emerald Interface card */ - - - -#define QIC02_TAPE_PORT_RANGE 8 /* number of IO locations to reserve */ - - -/*********** START OF USER CONFIGURABLE SECTION ************/ - -/* Tape configuration: Select DRIVE, IFC, PORT, IRQ and DMA below. - * Runtime (re)configuration is not supported yet. - * - * Tape drive configuration: (MT_IS* constants are defined in mtio.h) - * - * QIC02_TAPE_DRIVE = MT_ISWT5150 - * - Wangtek 5150, format: up to QIC-150. - * QIC02_TAPE_DRIVE = MT_ISQIC02_ALL_FEATURES - * - Enables some optional QIC02 commands that some drives may lack. - * It is provided so you can check which are supported by your drive. - * Refer to tpqic02.h for others. - * - * Supported interface cards: QIC02_TAPE_IFC = - * WANGTEK, - * ARCHIVE_SC402, ARCHIVE_SC499. (both same programming interface) - * - * Make sure you have the I/O ports/DMA channels - * and IRQ stuff configured properly! - * NOTE: There may be other device drivers using the same major - * number. This must be avoided. Check for timer.h conflicts too. - * - * If you have an EVEREX EV-831 card and you are using DMA channel 3, - * you will probably have to ``#define QIC02_TAPE_DMA3_FIX'' below. - */ - -/* CONFIG_QIC02_DYNCONF can be defined in autoconf.h, by `make config' */ - -/*** #undef CONFIG_QIC02_DYNCONF ***/ - -#ifndef CONFIG_QIC02_DYNCONF - -#define QIC02_TAPE_DRIVE MT_ISQIC02_ALL_FEATURES /* drive type */ -/* #define QIC02_TAPE_DRIVE MT_ISWT5150 */ -/* #define QIC02_TAPE_DRIVE MT_ISARCHIVE_5945L2 */ -/* #define QIC02_TAPE_DRIVE MT_ISTEAC_MT2ST */ -/* #define QIC02_TAPE_DRIVE MT_ISARCHIVE_2150L */ -/* #define QIC02_TAPE_DRIVE MT_ISARCHIVESC499 */ - -/* Either WANGTEK, ARCHIVE or MOUNTAIN. Not EVEREX. - * If you have an EVEREX, use WANGTEK and try the DMA3_FIX below. - */ -#define QIC02_TAPE_IFC WANGTEK /* interface card type */ -/* #define QIC02_TAPE_IFC ARCHIVE */ -/* #define QIC02_TAPE_IFC MOUNTAIN */ - -#define QIC02_TAPE_PORT 0x300 /* controller port address */ -#define QIC02_TAPE_IRQ 5 /* For IRQ2, use 9 here, others normal. */ -#define QIC02_TAPE_DMA 1 /* either 1 or 3, because 2 is used by the floppy */ - -/* If DMA3 doesn't work, but DMA1 does, and you have a - * Wangtek/Everex card, you can try #define-ing the flag - * below. Note that you should also change the DACK jumper - * for Wangtek/Everex cards when changing the DMA channel. - */ -#undef QIC02_TAPE_DMA3_FIX - -/************ END OF USER CONFIGURABLE SECTION *************/ - -/* I put the stuff above in config.in, but a few recompiles, to - * verify different configurations, and several days later I decided - * to change it back again. - */ - - - -/* NOTE: TP_HAVE_DENS should distinguish between available densities (?) - * NOTE: Drive select is not implemented -- I have only one tape streamer, - * so I'm unable and unmotivated to test and implement that. ;-) ;-) - */ -#if QIC02_TAPE_DRIVE == MT_ISWT5150 -#define TP_HAVE_DENS 1 -#define TP_HAVE_BSF 0 /* nope */ -#define TP_HAVE_FSR 0 /* nope */ -#define TP_HAVE_BSR 0 /* nope */ -#define TP_HAVE_EOD 0 /* most of the time */ -#define TP_HAVE_SEEK 0 -#define TP_HAVE_TELL 0 -#define TP_HAVE_RAS1 1 -#define TP_HAVE_RAS2 1 - -#elif QIC02_TAPE_DRIVE == MT_ISARCHIVESC499 /* Archive SC-499 QIC-36 controller */ -#define TP_HAVE_DENS 1 /* can do set density (QIC-11 / QIC-24) */ -#define TP_HAVE_BSF 0 -#define TP_HAVE_FSR 1 /* can skip one block forwards */ -#define TP_HAVE_BSR 1 /* can skip one block backwards */ -#define TP_HAVE_EOD 1 /* can seek to end of recorded data */ -#define TP_HAVE_SEEK 0 -#define TP_HAVE_TELL 0 -#define TP_HAVE_RAS1 1 /* can run selftest 1 */ -#define TP_HAVE_RAS2 1 /* can run selftest 2 */ -/* These last two selftests shouldn't be used yet! */ - -#elif (QIC02_TAPE_DRIVE == MT_ISARCHIVE_2060L) || (QIC02_TAPE_DRIVE == MT_ISARCHIVE_2150L) -#define TP_HAVE_DENS 1 /* can do set density (QIC-24 / QIC-120 / QIC-150) */ -#define TP_HAVE_BSF 0 -#define TP_HAVE_FSR 1 /* can skip one block forwards */ -#define TP_HAVE_BSR 1 /* can skip one block backwards */ -#define TP_HAVE_EOD 1 /* can seek to end of recorded data */ -#define TP_HAVE_TELL 1 /* can read current block address */ -#define TP_HAVE_SEEK 1 /* can seek to block */ -#define TP_HAVE_RAS1 1 /* can run selftest 1 */ -#define TP_HAVE_RAS2 1 /* can run selftest 2 */ -/* These last two selftests shouldn't be used yet! */ - -#elif QIC02_TAPE_DRIVE == MT_ISARCHIVE_5945L2 -/* can anyone verify this entry?? */ -#define TP_HAVE_DENS 1 /* can do set density?? (QIC-24??) */ -#define TP_HAVE_BSF 0 -#define TP_HAVE_FSR 1 /* can skip one block forwards */ -#define TP_HAVE_BSR 1 /* can skip one block backwards */ -#define TP_HAVE_EOD 1 /* can seek to end of recorded data */ -#define TP_HAVE_TELL 1 /* can read current block address */ -#define TP_HAVE_SEEK 1 /* can seek to block */ -#define TP_HAVE_RAS1 1 /* can run selftest 1 */ -#define TP_HAVE_RAS2 1 /* can run selftest 2 */ -/* These last two selftests shouldn't be used yet! */ - -#elif QIC02_TAPE_DRIVE == MT_ISTEAC_MT2ST -/* can anyone verify this entry?? */ -#define TP_HAVE_DENS 0 /* cannot do set density?? (QIC-150?) */ -#define TP_HAVE_BSF 0 -#define TP_HAVE_FSR 1 /* can skip one block forwards */ -#define TP_HAVE_BSR 1 /* can skip one block backwards */ -#define TP_HAVE_EOD 1 /* can seek to end of recorded data */ -#define TP_HAVE_SEEK 1 /* can seek to block */ -#define TP_HAVE_TELL 1 /* can read current block address */ -#define TP_HAVE_RAS1 1 /* can run selftest 1 */ -#define TP_HAVE_RAS2 1 /* can run selftest 2 */ -/* These last two selftests shouldn't be used yet! */ - -#elif QIC02_TAPE_DRIVE == MT_ISQIC02_ALL_FEATURES -#define TP_HAVE_DENS 1 /* can do set density */ -#define TP_HAVE_BSF 1 /* can search filemark backwards */ -#define TP_HAVE_FSR 1 /* can skip one block forwards */ -#define TP_HAVE_BSR 1 /* can skip one block backwards */ -#define TP_HAVE_EOD 1 /* can seek to end of recorded data */ -#define TP_HAVE_SEEK 1 /* seek to block address */ -#define TP_HAVE_TELL 1 /* tell current block address */ -#define TP_HAVE_RAS1 1 /* can run selftest 1 */ -#define TP_HAVE_RAS2 1 /* can run selftest 2 */ -/* These last two selftests shouldn't be used yet! */ - - -#else -#error No QIC-02 tape drive type defined! -/* If your drive is not listed above, first try the 'ALL_FEATURES', - * to see what commands are supported, then create your own entry in - * the list above. You may want to mail it to me, so that I can include - * it in the next release. - */ -#endif - -#endif /* !CONFIG_QIC02_DYNCONF */ - - -/* WANGTEK interface card specifics */ -#define WT_QIC02_STAT_PORT (QIC02_TAPE_PORT) -#define WT_QIC02_CTL_PORT (QIC02_TAPE_PORT) -#define WT_QIC02_CMD_PORT (QIC02_TAPE_PORT+1) -#define WT_QIC02_DATA_PORT (QIC02_TAPE_PORT+1) - -/* status register bits (Active LOW!) */ -#define WT_QIC02_STAT_POLARITY 0 -#define WT_QIC02_STAT_READY 0x01 -#define WT_QIC02_STAT_EXCEPTION 0x02 -#define WT_QIC02_STAT_MASK (WT_QIC02_STAT_READY|WT_QIC02_STAT_EXCEPTION) - -#define WT_QIC02_STAT_RESETMASK 0x07 -#define WT_QIC02_STAT_RESETVAL (WT_QIC02_STAT_RESETMASK & ~WT_QIC02_STAT_EXCEPTION) - -/* controller register (QIC02_CTL_PORT) bits */ -#define WT_QIC02_CTL_RESET 0x02 -#define WT_QIC02_CTL_REQUEST 0x04 -#define WT_CTL_ONLINE 0x01 -#define WT_CTL_CMDOFF 0xC0 - -#define WT_CTL_DMA3 0x10 /* enable dma chan3 */ -#define WT_CTL_DMA1 0x08 /* enable dma chan1 or chan2 */ - -/* EMERALD interface card specifics - * Much like Wangtek, only different polarity and bit locations - */ -#define EMR_QIC02_STAT_PORT (QIC02_TAPE_PORT) -#define EMR_QIC02_CTL_PORT (QIC02_TAPE_PORT) -#define EMR_QIC02_CMD_PORT (QIC02_TAPE_PORT+1) -#define EMR_QIC02_DATA_PORT (QIC02_TAPE_PORT+1) - -/* status register bits (Active High!) */ -#define EMR_QIC02_STAT_POLARITY 1 -#define EMR_QIC02_STAT_READY 0x01 -#define EMR_QIC02_STAT_EXCEPTION 0x02 -#define EMR_QIC02_STAT_MASK (EMR_QIC02_STAT_READY|EMR_QIC02_STAT_EXCEPTION) - -#define EMR_QIC02_STAT_RESETMASK 0x07 -#define EMR_QIC02_STAT_RESETVAL (EMR_QIC02_STAT_RESETMASK & ~EMR_QIC02_STAT_EXCEPTION) - -/* controller register (QIC02_CTL_PORT) bits */ -#define EMR_QIC02_CTL_RESET 0x02 -#define EMR_QIC02_CTL_REQUEST 0x04 -#define EMR_CTL_ONLINE 0x01 -#define EMR_CTL_CMDOFF 0xC0 - -#define EMR_CTL_DMA3 0x10 /* enable dma chan3 */ -#define EMR_CTL_DMA1 0x08 /* enable dma chan1 or chan2 */ - - - -/* ARCHIVE interface card specifics */ -#define AR_QIC02_STAT_PORT (QIC02_TAPE_PORT+1) -#define AR_QIC02_CTL_PORT (QIC02_TAPE_PORT+1) -#define AR_QIC02_CMD_PORT (QIC02_TAPE_PORT) -#define AR_QIC02_DATA_PORT (QIC02_TAPE_PORT) - -#define AR_START_DMA_PORT (QIC02_TAPE_PORT+2) -#define AR_RESET_DMA_PORT (QIC02_TAPE_PORT+3) - -/* STAT port bits */ -#define AR_QIC02_STAT_POLARITY 0 -#define AR_STAT_IRQF 0x80 /* active high, interrupt request flag */ -#define AR_QIC02_STAT_READY 0x40 /* active low */ -#define AR_QIC02_STAT_EXCEPTION 0x20 /* active low */ -#define AR_QIC02_STAT_MASK (AR_QIC02_STAT_READY|AR_QIC02_STAT_EXCEPTION) -#define AR_STAT_DMADONE 0x10 /* active high, DMA done */ -#define AR_STAT_DIRC 0x08 /* active high, direction */ - -#define AR_QIC02_STAT_RESETMASK 0x70 /* check RDY,EXC,DMADONE */ -#define AR_QIC02_STAT_RESETVAL ((AR_QIC02_STAT_RESETMASK & ~AR_STAT_IRQF & ~AR_QIC02_STAT_EXCEPTION) | AR_STAT_DMADONE) - -/* CTL port bits */ -#define AR_QIC02_CTL_RESET 0x80 /* drive reset */ -#define AR_QIC02_CTL_REQUEST 0x40 /* notify of new command */ -#define AR_CTL_IEN 0x20 /* interrupt enable */ -#define AR_CTL_DNIEN 0x10 /* done-interrupt enable */ - /* Note: All of these bits are cleared automatically when writing to - * AR_RESET_DMA_PORT. So AR_CTL_IEN and AR_CTL_DNIEN must be - * reprogrammed before the write to AR_START_DMA_PORT. - */ - - -/* MOUNTAIN interface specifics */ -#define MTN_QIC02_STAT_PORT (QIC02_TAPE_PORT+1) -#define MTN_QIC02_CTL_PORT (QIC02_TAPE_PORT+1) -#define MTN_QIC02_CMD_PORT (QIC02_TAPE_PORT) -#define MTN_QIC02_DATA_PORT (QIC02_TAPE_PORT) - -#define MTN_W_SELECT_DMA_PORT (QIC02_TAPE_PORT+2) -#define MTN_R_DESELECT_DMA_PORT (QIC02_TAPE_PORT+2) -#define MTN_W_DMA_WRITE_PORT (QIC02_TAPE_PORT+3) - -/* STAT port bits */ -#define MTN_QIC02_STAT_POLARITY 0 -#define MTN_QIC02_STAT_READY 0x02 /* active low */ -#define MTN_QIC02_STAT_EXCEPTION 0x04 /* active low */ -#define MTN_QIC02_STAT_MASK (MTN_QIC02_STAT_READY|MTN_QIC02_STAT_EXCEPTION) -#define MTN_STAT_DMADONE 0x01 /* active high, DMA done */ - -#define MTN_QIC02_STAT_RESETMASK 0x07 /* check RDY,EXC,DMADONE */ -#define MTN_QIC02_STAT_RESETVAL ((MTN_QIC02_STAT_RESETMASK & ~MTN_QIC02_STAT_EXCEPTION) | MTN_STAT_DMADONE) - -/* CTL port bits */ -#define MTN_QIC02_CTL_RESET_NOT 0x80 /* drive reset, active low */ -#define MTN_QIC02_CTL_RESET 0x80 /* Fodder #definition to keep gcc happy */ - -#define MTN_QIC02_CTL_ONLINE 0x40 /* Put drive on line */ -#define MTN_QIC02_CTL_REQUEST 0x20 /* notify of new command */ -#define MTN_QIC02_CTL_IRQ_DRIVER 0x10 /* Enable IRQ tristate driver */ -#define MTN_QIC02_CTL_DMA_DRIVER 0x08 /* Enable DMA tristate driver */ -#define MTN_CTL_EXC_IEN 0x04 /* Exception interrupt enable */ -#define MTN_CTL_RDY_IEN 0x02 /* Ready interrupt enable */ -#define MTN_CTL_DNIEN 0x01 /* done-interrupt enable */ - -#define MTN_CTL_ONLINE (MTN_QIC02_CTL_RESET_NOT | MTN_QIC02_CTL_IRQ_DRIVER | MTN_QIC02_CTL_DMA_DRIVER) - - -#ifndef CONFIG_QIC02_DYNCONF - -# define QIC02_TAPE_DEBUG (qic02_tape_debug) - -# if QIC02_TAPE_IFC == WANGTEK -# define QIC02_STAT_POLARITY WT_QIC02_STAT_POLARITY -# define QIC02_STAT_PORT WT_QIC02_STAT_PORT -# define QIC02_CTL_PORT WT_QIC02_CTL_PORT -# define QIC02_CMD_PORT WT_QIC02_CMD_PORT -# define QIC02_DATA_PORT WT_QIC02_DATA_PORT - -# define QIC02_STAT_READY WT_QIC02_STAT_READY -# define QIC02_STAT_EXCEPTION WT_QIC02_STAT_EXCEPTION -# define QIC02_STAT_MASK WT_QIC02_STAT_MASK -# define QIC02_STAT_RESETMASK WT_QIC02_STAT_RESETMASK -# define QIC02_STAT_RESETVAL WT_QIC02_STAT_RESETVAL - -# define QIC02_CTL_RESET WT_QIC02_CTL_RESET -# define QIC02_CTL_REQUEST WT_QIC02_CTL_REQUEST - -# if QIC02_TAPE_DMA == 3 -# ifdef QIC02_TAPE_DMA3_FIX -# define WT_CTL_DMA WT_CTL_DMA1 -# else -# define WT_CTL_DMA WT_CTL_DMA3 -# endif -# elif QIC02_TAPE_DMA == 1 -# define WT_CTL_DMA WT_CTL_DMA1 -# else -# error Unsupported or incorrect DMA configuration. -# endif - -# elif QIC02_TAPE_IFC == EMERALD -# define QIC02_STAT_POLARITY EMR_QIC02_STAT_POLARITY -# define QIC02_STAT_PORT EMR_QIC02_STAT_PORT -# define QIC02_CTL_PORT EMR_QIC02_CTL_PORT -# define QIC02_CMD_PORT EMR_QIC02_CMD_PORT -# define QIC02_DATA_PORT EMR_QIC02_DATA_PORT - -# define QIC02_STAT_READY EMR_QIC02_STAT_READY -# define QIC02_STAT_EXCEPTION EMR_QIC02_STAT_EXCEPTION -# define QIC02_STAT_MASK EMR_QIC02_STAT_MASK -# define QIC02_STAT_RESETMASK EMR_QIC02_STAT_RESETMASK -# define QIC02_STAT_RESETVAL EMR_QIC02_STAT_RESETVAL - -# define QIC02_CTL_RESET EMR_QIC02_CTL_RESET -# define QIC02_CTL_REQUEST EMR_QIC02_CTL_REQUEST - -# if QIC02_TAPE_DMA == 3 -# ifdef QIC02_TAPE_DMA3_FIX -# define EMR_CTL_DMA EMR_CTL_DMA1 -# else -# define EMR_CTL_DMA EMR_CTL_DMA3 -# endif -# elif QIC02_TAPE_DMA == 1 -# define EMR_CTL_DMA EMR_CTL_DMA1 -# else -# error Unsupported or incorrect DMA configuration. -# endif - -# elif QIC02_TAPE_IFC == ARCHIVE -# define QIC02_STAT_POLARITY AR_QIC02_STAT_POLARITY -# define QIC02_STAT_PORT AR_QIC02_STAT_PORT -# define QIC02_CTL_PORT AR_QIC02_CTL_PORT -# define QIC02_CMD_PORT AR_QIC02_CMD_PORT -# define QIC02_DATA_PORT AR_QIC02_DATA_PORT - -# define QIC02_STAT_READY AR_QIC02_STAT_READY -# define QIC02_STAT_EXCEPTION AR_QIC02_STAT_EXCEPTION -# define QIC02_STAT_MASK AR_QIC02_STAT_MASK -# define QIC02_STAT_RESETMASK AR_QIC02_STAT_RESETMASK -# define QIC02_STAT_RESETVAL AR_QIC02_STAT_RESETVAL - -# define QIC02_CTL_RESET AR_QIC02_CTL_RESET -# define QIC02_CTL_REQUEST AR_QIC02_CTL_REQUEST - -# if QIC02_TAPE_DMA > 3 /* channel 2 is used by the floppy driver */ -# error DMA channels other than 1 and 3 are not supported. -# endif - -# elif QIC02_TAPE_IFC == MOUNTAIN -# define QIC02_STAT_POLARITY MTN_QIC02_STAT_POLARITY -# define QIC02_STAT_PORT MTN_QIC02_STAT_PORT -# define QIC02_CTL_PORT MTN_QIC02_CTL_PORT -# define QIC02_CMD_PORT MTN_QIC02_CMD_PORT -# define QIC02_DATA_PORT MTN_QIC02_DATA_PORT - -# define QIC02_STAT_READY MTN_QIC02_STAT_READY -# define QIC02_STAT_EXCEPTION MTN_QIC02_STAT_EXCEPTION -# define QIC02_STAT_MASK MTN_QIC02_STAT_MASK -# define QIC02_STAT_RESETMASK MTN_QIC02_STAT_RESETMASK -# define QIC02_STAT_RESETVAL MTN_QIC02_STAT_RESETVAL - -# define QIC02_CTL_RESET MTN_QIC02_CTL_RESET -# define QIC02_CTL_REQUEST MTN_QIC02_CTL_REQUEST - -# if QIC02_TAPE_DMA > 3 /* channel 2 is used by the floppy driver */ -# error DMA channels other than 1 and 3 are not supported. -# endif - -# else -# error No valid interface card specified! -# endif /* QIC02_TAPE_IFC */ - - - /* An ugly hack to make sure WT_CTL_DMA is defined even for the - * static, non-Wangtek case. The alternative was even worse. - */ -# ifndef WT_CTL_DMA -# define WT_CTL_DMA WT_CTL_DMA1 -# endif - -/*******************/ - -#else /* !CONFIG_QIC02_DYNCONF */ - -/* Now the runtime config version, using variables instead of constants. - * - * qic02_tape_dynconf is R/O for the kernel, set from userspace. - * qic02_tape_ccb is private to the driver, R/W. - */ - -# define QIC02_TAPE_DRIVE (qic02_tape_dynconf.mt_type) -# define QIC02_TAPE_IFC (qic02_tape_ccb.ifc_type) -# define QIC02_TAPE_IRQ (qic02_tape_dynconf.irqnr) -# define QIC02_TAPE_DMA (qic02_tape_dynconf.dmanr) -# define QIC02_TAPE_PORT (qic02_tape_dynconf.port) -# define WT_CTL_DMA (qic02_tape_ccb.dma_enable_value) -# define QIC02_TAPE_DEBUG (qic02_tape_dynconf.debug) - -# define QIC02_STAT_PORT (qic02_tape_ccb.port_stat) -# define QIC02_CTL_PORT (qic02_tape_ccb.port_ctl) -# define QIC02_CMD_PORT (qic02_tape_ccb.port_cmd) -# define QIC02_DATA_PORT (qic02_tape_ccb.port_data) - -# define QIC02_STAT_POLARITY (qic02_tape_ccb.stat_polarity) -# define QIC02_STAT_READY (qic02_tape_ccb.stat_ready) -# define QIC02_STAT_EXCEPTION (qic02_tape_ccb.stat_exception) -# define QIC02_STAT_MASK (qic02_tape_ccb.stat_mask) - -# define QIC02_STAT_RESETMASK (qic02_tape_ccb.stat_resetmask) -# define QIC02_STAT_RESETVAL (qic02_tape_ccb.stat_resetval) - -# define QIC02_CTL_RESET (qic02_tape_ccb.ctl_reset) -# define QIC02_CTL_REQUEST (qic02_tape_ccb.ctl_request) - -# define TP_HAVE_DENS (qic02_tape_dynconf.have_dens) -# define TP_HAVE_BSF (qic02_tape_dynconf.have_bsf) -# define TP_HAVE_FSR (qic02_tape_dynconf.have_fsr) -# define TP_HAVE_BSR (qic02_tape_dynconf.have_bsr) -# define TP_HAVE_EOD (qic02_tape_dynconf.have_eod) -# define TP_HAVE_SEEK (qic02_tape_dynconf.have_seek) -# define TP_HAVE_TELL (qic02_tape_dynconf.have_tell) -# define TP_HAVE_RAS1 (qic02_tape_dynconf.have_ras1) -# define TP_HAVE_RAS2 (qic02_tape_dynconf.have_ras2) - -#endif /* CONFIG_QIC02_DYNCONF */ - - -/* "Vendor Unique" codes */ -/* Archive seek & tell stuff */ -#define AR_QCMDV_TELL_BLK 0xAE /* read current block address */ -#define AR_QCMDV_SEEK_BLK 0xAD /* seek to specific block */ -#define AR_SEEK_BUF_SIZE 3 /* address is 3 bytes */ - - - -/* - * Misc common stuff - */ - -/* Standard QIC-02 commands -- rev F. All QIC-02 drives must support these */ -#define QCMD_SEL_1 0x01 /* select drive 1 */ -#define QCMD_SEL_2 0x02 /* select drive 2 */ -#define QCMD_SEL_3 0x04 /* select drive 3 */ -#define QCMD_SEL_4 0x08 /* select drive 4 */ -#define QCMD_REWIND 0x21 /* rewind tape */ -#define QCMD_ERASE 0x22 /* erase tape */ -#define QCMD_RETEN 0x24 /* retension tape */ -#define QCMD_WRT_DATA 0x40 /* write data */ -#define QCMD_WRT_FM 0x60 /* write file mark */ -#define QCMD_RD_DATA 0x80 /* read data */ -#define QCMD_RD_FM 0xA0 /* read file mark (forward direction) */ -#define QCMD_RD_STAT 0xC0 /* read status */ - -/* Other (optional/vendor unique) commands */ - /* Density commands are only valid when TP_BOM is set! */ -#define QCMD_DENS_11 0x26 /* QIC-11 */ -#define QCMD_DENS_24 0x27 /* QIC-24: 9 track 60MB */ -#define QCMD_DENS_120 0x28 /* QIC-120: 15 track 120MB */ -#define QCMD_DENS_150 0x29 /* QIC-150: 18 track 150MB */ -#define QCMD_DENS_300 0x2A /* QIC-300/QIC-2100 */ -#define QCMD_DENS_600 0x2B /* QIC-600/QIC-2200 */ -/* don't know about QIC-1000 and QIC-1350 */ - -#define QCMD_WRTNU_DATA 0x40 /* write data, no underruns, insert filler. */ -#define QCMD_SPACE_FWD 0x81 /* skip next block */ -#define QCMD_SPACE_BCK 0x89 /* move tape head one block back -- very useful! */ -#define QCMD_RD_FM_BCK 0xA8 /* read filemark (backwards) */ -#define QCMD_SEEK_EOD 0xA3 /* skip to EOD */ -#define QCMD_RD_STAT_X1 0xC1 /* read extended status 1 */ -#define QCMD_RD_STAT_X2 0xC4 /* read extended status 2 */ -#define QCMD_RD_STAT_X3 0xE0 /* read extended status 3 */ -#define QCMD_SELF_TST1 0xC2 /* run self test 1 (nondestructive) */ -#define QCMD_SELF_TST2 0xCA /* run self test 2 (destructive) */ - - - -/* Optional, QFA (Quick File Access) commands. - * Not all drives support this, but those that do could use these commands - * to implement semi-non-sequential access. `mt fsf` would benefit from this. - * QFA divides the tape into 2 partitions, a data and a directory partition, - * causing some incompatibility problems wrt std QIC-02 data exchange. - * It would be useful to cache the directory info, but that might be tricky - * to do in kernel-space. [Size constraints.] - * Refer to the QIC-02 specs, appendix A for more information. - * I have no idea how other *nix variants implement QFA. - * I have no idea which drives support QFA and which don't. - */ -#define QFA_ENABLE 0x2D /* enter QFA mode, give @ BOT only */ -#define QFA_DATA 0x20 /* select data partition */ -#define QFA_DIR 0x23 /* select directory partition */ -#define QFA_RD_POS 0xCF /* read position+status bytes */ -#define QFA_SEEK_EOD 0xA1 /* seek EOD within current partition */ -#define QFA_SEEK_BLK 0xAF /* seek to a block within current partition */ - - - - -/* - * Debugging flags - */ -#define TPQD_SENSE_TEXT 0x0001 -#define TPQD_SENSE_CNTS 0x0002 -#define TPQD_REWIND 0x0004 -#define TPQD_TERM_CYCLE 0x0008 -#define TPQD_IOCTLS 0x0010 -#define TPQD_DMAX 0x0020 -#define TPQD_BLKSZ 0x0040 -#define TPQD_MISC 0x0080 - -#define TPQD_DEBUG 0x0100 - -#define TPQD_DIAGS 0x1000 - -#define TPQD_ALWAYS 0x8000 - -#define TPQD_DEFAULT_FLAGS 0x00fc - - -#define TPQDBG(f) ((QIC02_TAPE_DEBUG) & (TPQD_##f)) - - -/* Minor device codes for tapes: - * |7|6|5|4|3|2|1|0| - * | \ | / \ | / |_____ 1=rewind on close, 0=no rewind on close - * | \|/ |_________ Density: 000=none, 001=QIC-11, 010=24, 011=120, - * | | 100=QIC-150, 101..111 reserved. - * | |_______________ Reserved for unit numbers. - * |___________________ Reserved for diagnostics during debugging. - */ - -#define TP_REWCLOSE(d) ((d)&1) /* rewind bit */ - /* rewind is only done if data has been transferred */ -#define TP_DENS(d) (((d) >> 1) & 0x07) /* tape density */ -#define TP_UNIT(d) (((d) >> 4) & 0x07) /* unit number */ - -/* print excessive diagnostics */ -#define TP_DIAGS(dev) (QIC02_TAPE_DEBUG & TPQD_DIAGS) - -/* status codes returned by a WTS_RDSTAT call */ -struct tpstatus { /* sizeof(short)==2), LSB first */ - unsigned short exs; /* Drive exception flags */ - unsigned short dec; /* data error count: nr of blocks rewritten/soft read errors */ - unsigned short urc; /* underrun count: nr of times streaming was interrupted */ -}; -#define TPSTATSIZE sizeof(struct tpstatus) - - -/* defines for tpstatus.exs -- taken from 386BSD wt driver */ -#define TP_POR 0x100 /* Power on or reset occurred */ -#define TP_EOR 0x200 /* REServed for end of RECORDED media */ -#define TP_PAR 0x400 /* REServed for bus parity */ -#define TP_BOM 0x800 /* Beginning of media */ -#define TP_MBD 0x1000 /* Marginal block detected */ -#define TP_NDT 0x2000 /* No data detected */ -#define TP_ILL 0x4000 /* Illegal command */ -#define TP_ST1 0x8000 /* Status byte 1 flag */ -#define TP_FIL 0x01 /* File mark detected */ -#define TP_BNL 0x02 /* Bad block not located */ -#define TP_UDA 0x04 /* Unrecoverable data error */ -#define TP_EOM 0x08 /* End of media */ -#define TP_WRP 0x10 /* Write protected cartridge */ -#define TP_USL 0x20 /* Unselected drive */ -#define TP_CNI 0x40 /* Cartridge not in place */ -#define TP_ST0 0x80 /* Status byte 0 flag */ - -#define REPORT_ERR0 (TP_CNI|TP_USL|TP_WRP|TP_EOM|TP_UDA|TP_BNL|TP_FIL) -#define REPORT_ERR1 (TP_ILL|TP_NDT|TP_MBD|TP_PAR) - - -/* exception numbers */ -#define EXC_UNKNOWN 0 /* (extra) Unknown exception code */ -#define EXC_NDRV 1 /* No drive */ -#define EXC_NCART 2 /* No cartridge */ -#define EXC_WP 3 /* Write protected */ -#define EXC_EOM 4 /* EOM */ -#define EXC_RWA 5 /* read/write abort */ -#define EXC_XBAD 6 /* read error, bad block transferred */ -#define EXC_XFILLER 7 /* read error, filler block transferred */ -#define EXC_NDT 8 /* read error, no data */ -#define EXC_NDTEOM 9 /* read error, no data & EOM */ -#define EXC_NDTBOM 10 /* read error, no data & BOM */ -#define EXC_FM 11 /* Read a filemark */ -#define EXC_ILL 12 /* Illegal command */ -#define EXC_POR 13 /* Power on/reset */ -#define EXC_MARGINAL 14 /* Marginal block detected */ -#define EXC_EOR 15 /* (extra, for SEEKEOD) End Of Recorded data reached */ -#define EXC_BOM 16 /* (extra) BOM reached */ - - -#define TAPE_NOTIFY_TIMEOUT 1000000 - -/* internal function return codes */ -#define TE_OK 0 /* everything is fine */ -#define TE_EX 1 /* exception detected */ -#define TE_ERR 2 /* some error */ -#define TE_NS 3 /* can't read status */ -#define TE_TIM 4 /* timed out */ -#define TE_DEAD 5 /* tape drive doesn't respond */ -#define TE_END 6 /******** Archive hack *****/ - -/* timeout timer values -- check these! */ -#define TIM_S (4*HZ) /* 4 seconds (normal cmds) */ -#define TIM_M (30*HZ) /* 30 seconds (write FM) */ -#define TIM_R (8*60*HZ) /* 8 minutes (retensioning) */ -#define TIM_F (2*3600*HZ) /* est. 1.2hr for full tape read/write+2 retens */ - -#define TIMERON(t) mod_timer(&tp_timer, jiffies + (t)) -#define TIMEROFF del_timer_sync(&tp_timer); -#define TIMERCONT add_timer(&tp_timer); - - -typedef char flag; -#define NO 0 /* NO must be 0 */ -#define YES 1 /* YES must be != 0 */ - - -#ifdef TDEBUG -# define TPQDEB(s) s -# define TPQPUTS(s) tpqputs(s) -#else -# define TPQDEB(s) -# define TPQPUTS(s) -#endif - - -/* NR_BLK_BUF is a `tuneable parameter'. If you're really low on - * kernel space, you could decrease it to 1, or if you got a very - * slow machine, you could increase it up to 127 blocks. Less kernel - * buffer blocks result in more context-switching. - */ -#define NR_BLK_BUF 20 /* max 127 blocks */ -#define TAPE_BLKSIZE 512 /* streamer tape block size (fixed) */ -#define TPQBUF_SIZE (TAPE_BLKSIZE*NR_BLK_BUF) /* buffer size */ - - -#define BLOCKS_BEYOND_EW 2 /* nr of blocks after Early Warning hole */ -#define BOGUS_IRQ 32009 - - -/* This is internal data, filled in based on the ifc_type field given - * by the user. Everex is mapped to Wangtek with a different - * `dma_enable_value', if dmanr==3. - */ -struct qic02_ccb { - long ifc_type; - - unsigned short port_stat; /* Status port address */ - unsigned short port_ctl; /* Control port address */ - unsigned short port_cmd; /* Command port address */ - unsigned short port_data; /* Data port address */ - - /* status register bits */ - unsigned short stat_polarity; /* invert status bits or not */ - unsigned short stat_ready; /* drive ready */ - unsigned short stat_exception; /* drive signals exception */ - unsigned short stat_mask; - unsigned short stat_resetmask; - unsigned short stat_resetval; - - /* control register bits */ - unsigned short ctl_reset; /* reset drive */ - unsigned short ctl_request; /* latch command */ - - /* This is used to change the DMA3 behaviour */ - unsigned short dma_enable_value; -}; - -#if MODULE -static int qic02_tape_init(void); -#else -extern int qic02_tape_init(void); /* for mem.c */ -#endif - - - -#endif /* CONFIG_QIC02_TAPE */ - -#endif /* _LINUX_TPQIC02_H */ - diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h index 6dbef2f8445a..dc392a1b58eb 100644 --- a/include/linux/vt_kern.h +++ b/include/linux/vt_kern.h @@ -25,15 +25,6 @@ #define BROKEN_GRAPHICS_PROGRAMS 1 #endif -extern struct vt_struct { - int vc_num; /* The console number */ - unsigned char vc_mode; /* KD_TEXT, ... */ - struct vt_mode vt_mode; - int vt_pid; - int vt_newvt; - wait_queue_head_t paste_wait; -} *vt_cons[MAX_NR_CONSOLES]; - extern void kd_mksound(unsigned int hz, unsigned int ticks); extern int kbd_rate(struct kbd_repeat *rep); @@ -41,25 +32,25 @@ extern int kbd_rate(struct kbd_repeat *rep); int vc_allocate(unsigned int console); int vc_cons_allocated(unsigned int console); -int vc_resize(int currcons, unsigned int cols, unsigned int lines); +int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines); void vc_disallocate(unsigned int console); -void reset_palette(int currcons); -void set_palette(int currcons); +void reset_palette(struct vc_data *vc); +void set_palette(struct vc_data *vc); void do_blank_screen(int entering_gfx); void do_unblank_screen(int leaving_gfx); void unblank_screen(void); void poke_blanked_console(void); -int con_font_op(int currcons, struct console_font_op *op); -int con_font_set(int currcons, struct console_font_op *op); -int con_font_get(int currcons, struct console_font_op *op); -int con_font_default(int currcons, struct console_font_op *op); -int con_font_copy(int currcons, struct console_font_op *op); +int con_font_op(struct vc_data *vc, struct console_font_op *op); +int con_font_set(struct vc_data *vc, struct console_font_op *op); +int con_font_get(struct vc_data *vc, struct console_font_op *op); +int con_font_default(struct vc_data *vc, struct console_font_op *op); +int con_font_copy(struct vc_data *vc, struct console_font_op *op); int con_set_cmap(unsigned char __user *cmap); int con_get_cmap(unsigned char __user *cmap); -void scrollback(int); -void scrollfront(int); -void update_region(int currcons, unsigned long start, int count); -void redraw_screen(int new_console, int is_switch); +void scrollback(struct vc_data *vc, int lines); +void scrollfront(struct vc_data *vc, int lines); +void update_region(struct vc_data *vc, unsigned long start, int count); +void redraw_screen(struct vc_data *vc, int is_switch); #define update_screen(x) redraw_screen(x, 0) #define switch_screen(x) redraw_screen(x, 1) @@ -75,25 +66,26 @@ int con_set_trans_old(unsigned char __user * table); int con_get_trans_old(unsigned char __user * table); int con_set_trans_new(unsigned short __user * table); int con_get_trans_new(unsigned short __user * table); -int con_clear_unimap(int currcons, struct unimapinit *ui); -int con_set_unimap(int currcons, ushort ct, struct unipair __user *list); -int con_get_unimap(int currcons, ushort ct, ushort __user *uct, struct unipair __user *list); -int con_set_default_unimap(int currcons); -void con_free_unimap(int currcons); -void con_protect_unimap(int currcons, int rdonly); -int con_copy_unimap(int dstcons, int srccons); +int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui); +int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list); +int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct unipair __user *list); +int con_set_default_unimap(struct vc_data *vc); +void con_free_unimap(struct vc_data *vc); +void con_protect_unimap(struct vc_data *vc, int rdonly); +int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc); /* vt.c */ -void complete_change_console(unsigned int new_console); +void complete_change_console(struct vc_data *vc); int vt_waitactive(int vt); -void change_console(unsigned int); -void reset_vc(unsigned int new_console); +void change_console(struct vc_data *new_vc); +void reset_vc(struct vc_data *vc); /* * vc_screen.c shares this temporary buffer with the console write code so that * we can easily avoid touching user space while holding the console spinlock. */ -#define CON_BUF_SIZE PAGE_SIZE + +#define CON_BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) extern char con_buf[CON_BUF_SIZE]; extern struct semaphore con_buf_sem; diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 4ab519ad9f55..1262cb43c3ab 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -86,6 +86,7 @@ static inline void wait_on_inode(struct inode *inode) int wakeup_bdflush(long nr_pages); void laptop_io_completion(void); void laptop_sync_completion(void); +void throttle_vm_writeout(void); /* These are exported to sysctl. */ extern int dirty_background_ratio; |
