aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acct.h4
-rw-r--r--include/linux/aio.h12
-rw-r--r--include/linux/aio_abi.h2
-rw-r--r--include/linux/compat.h1
-rw-r--r--include/linux/compat_ioctl.h12
-rw-r--r--include/linux/compiler.h8
-rw-r--r--include/linux/console_struct.h2
-rw-r--r--include/linux/fs.h53
-rw-r--r--include/linux/genalloc.h1
-rw-r--r--include/linux/init_task.h12
-rw-r--r--include/linux/input.h272
-rw-r--r--include/linux/io.h4
-rw-r--r--include/linux/ipc.h54
-rw-r--r--include/linux/ipmi.h48
-rw-r--r--include/linux/kmod.h4
-rw-r--r--include/linux/kprobes.h8
-rw-r--r--include/linux/latency.h25
-rw-r--r--include/linux/libps2.h1
-rw-r--r--include/linux/lockd/bind.h2
-rw-r--r--include/linux/lockd/lockd.h2
-rw-r--r--include/linux/memory.h4
-rw-r--r--include/linux/memory_hotplug.h2
-rw-r--r--include/linux/mm.h2
-rw-r--r--include/linux/module.h2
-rw-r--r--include/linux/mtd/nand.h25
-rw-r--r--include/linux/mtd/onenand.h6
-rw-r--r--include/linux/mtd/onenand_regs.h4
-rw-r--r--include/linux/namei.h1
-rw-r--r--include/linux/namespace.h6
-rw-r--r--include/linux/ncp_fs.h1
-rw-r--r--include/linux/nfs_fs.h10
-rw-r--r--include/linux/nfsd/nfsd.h5
-rw-r--r--include/linux/nfsd/nfsfh.h11
-rw-r--r--include/linux/nfsd/syscall.h17
-rw-r--r--include/linux/nodemask.h2
-rw-r--r--include/linux/nsproxy.h52
-rw-r--r--include/linux/pci.h5
-rw-r--r--include/linux/pid.h53
-rw-r--r--include/linux/proc_fs.h10
-rw-r--r--include/linux/pspace.h23
-rw-r--r--include/linux/reiserfs_fs.h4
-rw-r--r--include/linux/reiserfs_fs_sb.h2
-rw-r--r--include/linux/rtc.h4
-rw-r--r--include/linux/sched.h59
-rw-r--r--include/linux/serio.h3
-rw-r--r--include/linux/stddef.h6
-rw-r--r--include/linux/string.h1
-rw-r--r--include/linux/sunrpc/svc.h69
-rw-r--r--include/linux/sunrpc/svcsock.h15
-rw-r--r--include/linux/synclink.h4
-rw-r--r--include/linux/syscalls.h2
-rw-r--r--include/linux/sysrq.h4
-rw-r--r--include/linux/taskstats.h64
-rw-r--r--include/linux/timex.h58
-rw-r--r--include/linux/tsacct_kern.h34
-rw-r--r--include/linux/tty_driver.h3
-rw-r--r--include/linux/types.h2
-rw-r--r--include/linux/uinput.h35
-rw-r--r--include/linux/unistd.h6
-rw-r--r--include/linux/unwind.h2
-rw-r--r--include/linux/utime.h2
-rw-r--r--include/linux/utsname.h55
-rw-r--r--include/linux/vt_kern.h7
63 files changed, 933 insertions, 276 deletions
diff --git a/include/linux/acct.h b/include/linux/acct.h
index e86bae7324d2..0496d1f09952 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -124,16 +124,12 @@ extern void acct_auto_close(struct super_block *sb);
124extern void acct_init_pacct(struct pacct_struct *pacct); 124extern void acct_init_pacct(struct pacct_struct *pacct);
125extern void acct_collect(long exitcode, int group_dead); 125extern void acct_collect(long exitcode, int group_dead);
126extern void acct_process(void); 126extern void acct_process(void);
127extern void acct_update_integrals(struct task_struct *tsk);
128extern void acct_clear_integrals(struct task_struct *tsk);
129#else 127#else
130#define acct_auto_close_mnt(x) do { } while (0) 128#define acct_auto_close_mnt(x) do { } while (0)
131#define acct_auto_close(x) do { } while (0) 129#define acct_auto_close(x) do { } while (0)
132#define acct_init_pacct(x) do { } while (0) 130#define acct_init_pacct(x) do { } while (0)
133#define acct_collect(x,y) do { } while (0) 131#define acct_collect(x,y) do { } while (0)
134#define acct_process() do { } while (0) 132#define acct_process() do { } while (0)
135#define acct_update_integrals(x) do { } while (0)
136#define acct_clear_integrals(task) do { } while (0)
137#endif 133#endif
138 134
139/* 135/*
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 00c8efa95cc3..0d71c0041f13 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -4,8 +4,10 @@
4#include <linux/list.h> 4#include <linux/list.h>
5#include <linux/workqueue.h> 5#include <linux/workqueue.h>
6#include <linux/aio_abi.h> 6#include <linux/aio_abi.h>
7#include <linux/uio.h>
7 8
8#include <asm/atomic.h> 9#include <asm/atomic.h>
10#include <linux/uio.h>
9 11
10#define AIO_MAXSEGS 4 12#define AIO_MAXSEGS 4
11#define AIO_KIOGRP_NR_ATOMIC 8 13#define AIO_KIOGRP_NR_ATOMIC 8
@@ -110,8 +112,10 @@ struct kiocb {
110 char __user *ki_buf; /* remaining iocb->aio_buf */ 112 char __user *ki_buf; /* remaining iocb->aio_buf */
111 size_t ki_left; /* remaining bytes */ 113 size_t ki_left; /* remaining bytes */
112 long ki_retried; /* just for testing */ 114 long ki_retried; /* just for testing */
113 long ki_kicked; /* just for testing */ 115 struct iovec ki_inline_vec; /* inline vector */
114 long ki_queued; /* just for testing */ 116 struct iovec *ki_iovec;
117 unsigned long ki_nr_segs;
118 unsigned long ki_cur_seg;
115 119
116 struct list_head ki_list; /* the aio core uses this 120 struct list_head ki_list; /* the aio core uses this
117 * for cancellation */ 121 * for cancellation */
@@ -213,11 +217,11 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
213 struct iocb *iocb)); 217 struct iocb *iocb));
214 218
215#define get_ioctx(kioctx) do { \ 219#define get_ioctx(kioctx) do { \
216 BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \ 220 BUG_ON(atomic_read(&(kioctx)->users) <= 0); \
217 atomic_inc(&(kioctx)->users); \ 221 atomic_inc(&(kioctx)->users); \
218} while (0) 222} while (0)
219#define put_ioctx(kioctx) do { \ 223#define put_ioctx(kioctx) do { \
220 BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0)); \ 224 BUG_ON(atomic_read(&(kioctx)->users) <= 0); \
221 if (unlikely(atomic_dec_and_test(&(kioctx)->users))) \ 225 if (unlikely(atomic_dec_and_test(&(kioctx)->users))) \
222 __put_ioctx(kioctx); \ 226 __put_ioctx(kioctx); \
223} while (0) 227} while (0)
diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h
index 30fdcc89d142..3466b1d0ffd2 100644
--- a/include/linux/aio_abi.h
+++ b/include/linux/aio_abi.h
@@ -41,6 +41,8 @@ enum {
41 * IOCB_CMD_POLL = 5, 41 * IOCB_CMD_POLL = 5,
42 */ 42 */
43 IOCB_CMD_NOOP = 6, 43 IOCB_CMD_NOOP = 6,
44 IOCB_CMD_PREADV = 7,
45 IOCB_CMD_PWRITEV = 8,
44}; 46};
45 47
46/* read() from /dev/aio returns these structures. */ 48/* read() from /dev/aio returns these structures. */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 9760753e662b..6f110957cc97 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -13,6 +13,7 @@
13 13
14#include <asm/compat.h> 14#include <asm/compat.h>
15#include <asm/siginfo.h> 15#include <asm/siginfo.h>
16#include <asm/signal.h>
16 17
17#define compat_jiffies_to_clock_t(x) \ 18#define compat_jiffies_to_clock_t(x) \
18 (((unsigned long)(x) * COMPAT_USER_HZ) / HZ) 19 (((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index d61ef5951538..d5b7abc4f409 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -569,18 +569,6 @@ COMPATIBLE_IOCTL(RAW_SETBIND)
569COMPATIBLE_IOCTL(RAW_GETBIND) 569COMPATIBLE_IOCTL(RAW_GETBIND)
570/* SMB ioctls which do not need any translations */ 570/* SMB ioctls which do not need any translations */
571COMPATIBLE_IOCTL(SMB_IOC_NEWCONN) 571COMPATIBLE_IOCTL(SMB_IOC_NEWCONN)
572/* NCP ioctls which do not need any translations */
573COMPATIBLE_IOCTL(NCP_IOC_CONN_LOGGED_IN)
574COMPATIBLE_IOCTL(NCP_IOC_SIGN_INIT)
575COMPATIBLE_IOCTL(NCP_IOC_SIGN_WANTED)
576COMPATIBLE_IOCTL(NCP_IOC_SET_SIGN_WANTED)
577COMPATIBLE_IOCTL(NCP_IOC_LOCKUNLOCK)
578COMPATIBLE_IOCTL(NCP_IOC_GETROOT)
579COMPATIBLE_IOCTL(NCP_IOC_SETROOT)
580COMPATIBLE_IOCTL(NCP_IOC_GETCHARSETS)
581COMPATIBLE_IOCTL(NCP_IOC_SETCHARSETS)
582COMPATIBLE_IOCTL(NCP_IOC_GETDENTRYTTL)
583COMPATIBLE_IOCTL(NCP_IOC_SETDENTRYTTL)
584/* Little a */ 572/* Little a */
585COMPATIBLE_IOCTL(ATMSIGD_CTRL) 573COMPATIBLE_IOCTL(ATMSIGD_CTRL)
586COMPATIBLE_IOCTL(ATMARPD_CTRL) 574COMPATIBLE_IOCTL(ATMARPD_CTRL)
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 0780de440220..538423d4a865 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -10,10 +10,10 @@
10# define __force __attribute__((force)) 10# define __force __attribute__((force))
11# define __nocast __attribute__((nocast)) 11# define __nocast __attribute__((nocast))
12# define __iomem __attribute__((noderef, address_space(2))) 12# define __iomem __attribute__((noderef, address_space(2)))
13# define __acquires(x) __attribute__((context(0,1))) 13# define __acquires(x) __attribute__((context(x,0,1)))
14# define __releases(x) __attribute__((context(1,0))) 14# define __releases(x) __attribute__((context(x,1,0)))
15# define __acquire(x) __context__(1) 15# define __acquire(x) __context__(x,1)
16# define __release(x) __context__(-1) 16# define __release(x) __context__(x,-1)
17# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) 17# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
18extern void __chk_user_ptr(void __user *); 18extern void __chk_user_ptr(void __user *);
19extern void __chk_io_ptr(void __iomem *); 19extern void __chk_io_ptr(void __iomem *);
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index 25423f79bf9f..ed6c0fee1ac7 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -54,7 +54,7 @@ struct vc_data {
54 struct tty_struct *vc_tty; /* TTY we are attached to */ 54 struct tty_struct *vc_tty; /* TTY we are attached to */
55 /* data for manual vt switching */ 55 /* data for manual vt switching */
56 struct vt_mode vt_mode; 56 struct vt_mode vt_mode;
57 int vt_pid; 57 struct pid *vt_pid;
58 int vt_newvt; 58 int vt_newvt;
59 wait_queue_head_t paste_wait; 59 wait_queue_head_t paste_wait;
60 /* mode flags */ 60 /* mode flags */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5baf3a153403..91c0b2a32a90 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -684,7 +684,8 @@ extern struct block_device *I_BDEV(struct inode *inode);
684 684
685struct fown_struct { 685struct fown_struct {
686 rwlock_t lock; /* protects pid, uid, euid fields */ 686 rwlock_t lock; /* protects pid, uid, euid fields */
687 int pid; /* pid or -pgrp where SIGIO should be sent */ 687 struct pid *pid; /* pid or -pgrp where SIGIO should be sent */
688 enum pid_type pid_type; /* Kind of process group SIGIO should be sent to */
688 uid_t uid, euid; /* uid/euid of process setting the owner */ 689 uid_t uid, euid; /* uid/euid of process setting the owner */
689 int signum; /* posix.1b rt signal to be delivered on IO */ 690 int signum; /* posix.1b rt signal to be delivered on IO */
690}; 691};
@@ -880,8 +881,10 @@ extern void kill_fasync(struct fasync_struct **, int, int);
880/* only for net: no internal synchronization */ 881/* only for net: no internal synchronization */
881extern void __kill_fasync(struct fasync_struct *, int, int); 882extern void __kill_fasync(struct fasync_struct *, int, int);
882 883
884extern int __f_setown(struct file *filp, struct pid *, enum pid_type, int force);
883extern int f_setown(struct file *filp, unsigned long arg, int force); 885extern int f_setown(struct file *filp, unsigned long arg, int force);
884extern void f_delown(struct file *filp); 886extern void f_delown(struct file *filp);
887extern pid_t f_getown(struct file *filp);
885extern int send_sigurg(struct fown_struct *fown); 888extern int send_sigurg(struct fown_struct *fown);
886 889
887/* 890/*
@@ -1097,9 +1100,9 @@ struct file_operations {
1097 struct module *owner; 1100 struct module *owner;
1098 loff_t (*llseek) (struct file *, loff_t, int); 1101 loff_t (*llseek) (struct file *, loff_t, int);
1099 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *); 1102 ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
1100 ssize_t (*aio_read) (struct kiocb *, char __user *, size_t, loff_t);
1101 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); 1103 ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
1102 ssize_t (*aio_write) (struct kiocb *, const char __user *, size_t, loff_t); 1104 ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
1105 ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
1103 int (*readdir) (struct file *, void *, filldir_t); 1106 int (*readdir) (struct file *, void *, filldir_t);
1104 unsigned int (*poll) (struct file *, struct poll_table_struct *); 1107 unsigned int (*poll) (struct file *, struct poll_table_struct *);
1105 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long); 1108 int (*ioctl) (struct inode *, struct file *, unsigned int, unsigned long);
@@ -1113,8 +1116,6 @@ struct file_operations {
1113 int (*aio_fsync) (struct kiocb *, int datasync); 1116 int (*aio_fsync) (struct kiocb *, int datasync);
1114 int (*fasync) (int, struct file *, int); 1117 int (*fasync) (int, struct file *, int);
1115 int (*lock) (struct file *, int, struct file_lock *); 1118 int (*lock) (struct file *, int, struct file_lock *);
1116 ssize_t (*readv) (struct file *, const struct iovec *, unsigned long, loff_t *);
1117 ssize_t (*writev) (struct file *, const struct iovec *, unsigned long, loff_t *);
1118 ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *); 1119 ssize_t (*sendfile) (struct file *, loff_t *, size_t, read_actor_t, void *);
1119 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int); 1120 ssize_t (*sendpage) (struct file *, struct page *, int, size_t, loff_t *, int);
1120 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 1121 unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
@@ -1152,6 +1153,11 @@ struct inode_operations {
1152 1153
1153struct seq_file; 1154struct seq_file;
1154 1155
1156ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
1157 unsigned long nr_segs, unsigned long fast_segs,
1158 struct iovec *fast_pointer,
1159 struct iovec **ret_pointer);
1160
1155extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *); 1161extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
1156extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *); 1162extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
1157extern ssize_t vfs_readv(struct file *, const struct iovec __user *, 1163extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
@@ -1216,15 +1222,30 @@ static inline void mark_inode_dirty_sync(struct inode *inode)
1216 __mark_inode_dirty(inode, I_DIRTY_SYNC); 1222 __mark_inode_dirty(inode, I_DIRTY_SYNC);
1217} 1223}
1218 1224
1219static inline void inode_inc_link_count(struct inode *inode) 1225static inline void inc_nlink(struct inode *inode)
1220{ 1226{
1221 inode->i_nlink++; 1227 inode->i_nlink++;
1228}
1229
1230static inline void inode_inc_link_count(struct inode *inode)
1231{
1232 inc_nlink(inode);
1222 mark_inode_dirty(inode); 1233 mark_inode_dirty(inode);
1223} 1234}
1224 1235
1225static inline void inode_dec_link_count(struct inode *inode) 1236static inline void drop_nlink(struct inode *inode)
1226{ 1237{
1227 inode->i_nlink--; 1238 inode->i_nlink--;
1239}
1240
1241static inline void clear_nlink(struct inode *inode)
1242{
1243 inode->i_nlink = 0;
1244}
1245
1246static inline void inode_dec_link_count(struct inode *inode)
1247{
1248 drop_nlink(inode);
1228 mark_inode_dirty(inode); 1249 mark_inode_dirty(inode);
1229} 1250}
1230 1251
@@ -1623,6 +1644,9 @@ static inline void allow_write_access(struct file *file)
1623 atomic_inc(&file->f_dentry->d_inode->i_writecount); 1644 atomic_inc(&file->f_dentry->d_inode->i_writecount);
1624} 1645}
1625extern int do_pipe(int *); 1646extern int do_pipe(int *);
1647extern struct file *create_read_pipe(struct file *f);
1648extern struct file *create_write_pipe(void);
1649extern void free_write_pipe(struct file *);
1626 1650
1627extern int open_namei(int dfd, const char *, int, int, struct nameidata *); 1651extern int open_namei(int dfd, const char *, int, int, struct nameidata *);
1628extern int may_open(struct nameidata *, int, int); 1652extern int may_open(struct nameidata *, int, int);
@@ -1701,22 +1725,17 @@ extern int generic_file_mmap(struct file *, struct vm_area_struct *);
1701extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *); 1725extern int generic_file_readonly_mmap(struct file *, struct vm_area_struct *);
1702extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); 1726extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
1703extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size); 1727extern int file_send_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
1704extern ssize_t generic_file_read(struct file *, char __user *, size_t, loff_t *);
1705int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk); 1728int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk);
1706extern ssize_t generic_file_write(struct file *, const char __user *, size_t, loff_t *); 1729extern ssize_t generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t);
1707extern ssize_t generic_file_aio_read(struct kiocb *, char __user *, size_t, loff_t); 1730extern ssize_t generic_file_aio_write(struct kiocb *, const struct iovec *, unsigned long, loff_t);
1708extern ssize_t __generic_file_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t *);
1709extern ssize_t generic_file_aio_write(struct kiocb *, const char __user *, size_t, loff_t);
1710extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *, 1731extern ssize_t generic_file_aio_write_nolock(struct kiocb *, const struct iovec *,
1711 unsigned long, loff_t *); 1732 unsigned long, loff_t);
1712extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *, 1733extern ssize_t generic_file_direct_write(struct kiocb *, const struct iovec *,
1713 unsigned long *, loff_t, loff_t *, size_t, size_t); 1734 unsigned long *, loff_t, loff_t *, size_t, size_t);
1714extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *, 1735extern ssize_t generic_file_buffered_write(struct kiocb *, const struct iovec *,
1715 unsigned long, loff_t, loff_t *, size_t, ssize_t); 1736 unsigned long, loff_t, loff_t *, size_t, ssize_t);
1716extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos); 1737extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
1717extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos); 1738extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
1718ssize_t generic_file_write_nolock(struct file *file, const struct iovec *iov,
1719 unsigned long nr_segs, loff_t *ppos);
1720extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *); 1739extern ssize_t generic_file_sendfile(struct file *, loff_t *, size_t, read_actor_t, void *);
1721extern void do_generic_mapping_read(struct address_space *mapping, 1740extern void do_generic_mapping_read(struct address_space *mapping,
1722 struct file_ra_state *, struct file *, 1741 struct file_ra_state *, struct file *,
@@ -1734,10 +1753,6 @@ extern long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
1734 1753
1735extern void 1754extern void
1736file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); 1755file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
1737extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
1738 unsigned long nr_segs, loff_t *ppos);
1739ssize_t generic_file_writev(struct file *filp, const struct iovec *iov,
1740 unsigned long nr_segs, loff_t *ppos);
1741extern loff_t no_llseek(struct file *file, loff_t offset, int origin); 1756extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
1742extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); 1757extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
1743extern loff_t remote_llseek(struct file *file, loff_t offset, int origin); 1758extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
index 690c42803d2e..9869ef3674ac 100644
--- a/include/linux/genalloc.h
+++ b/include/linux/genalloc.h
@@ -31,5 +31,6 @@ struct gen_pool_chunk {
31 31
32extern struct gen_pool *gen_pool_create(int, int); 32extern struct gen_pool *gen_pool_create(int, int);
33extern int gen_pool_add(struct gen_pool *, unsigned long, size_t, int); 33extern int gen_pool_add(struct gen_pool *, unsigned long, size_t, int);
34extern void gen_pool_destroy(struct gen_pool *);
34extern unsigned long gen_pool_alloc(struct gen_pool *, size_t); 35extern unsigned long gen_pool_alloc(struct gen_pool *, size_t);
35extern void gen_pool_free(struct gen_pool *, unsigned long, size_t); 36extern void gen_pool_free(struct gen_pool *, unsigned long, size_t);
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 60aac2cea0cf..33c5daacc743 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -4,7 +4,9 @@
4#include <linux/file.h> 4#include <linux/file.h>
5#include <linux/rcupdate.h> 5#include <linux/rcupdate.h>
6#include <linux/irqflags.h> 6#include <linux/irqflags.h>
7#include <linux/utsname.h>
7#include <linux/lockdep.h> 8#include <linux/lockdep.h>
9#include <linux/ipc.h>
8 10
9#define INIT_FDTABLE \ 11#define INIT_FDTABLE \
10{ \ 12{ \
@@ -68,6 +70,15 @@
68 .session = 1, \ 70 .session = 1, \
69} 71}
70 72
73extern struct nsproxy init_nsproxy;
74#define INIT_NSPROXY(nsproxy) { \
75 .count = ATOMIC_INIT(1), \
76 .nslock = SPIN_LOCK_UNLOCKED, \
77 .uts_ns = &init_uts_ns, \
78 .namespace = NULL, \
79 INIT_IPC_NS(ipc_ns) \
80}
81
71#define INIT_SIGHAND(sighand) { \ 82#define INIT_SIGHAND(sighand) { \
72 .count = ATOMIC_INIT(1), \ 83 .count = ATOMIC_INIT(1), \
73 .action = { { { .sa_handler = NULL, } }, }, \ 84 .action = { { { .sa_handler = NULL, } }, }, \
@@ -117,6 +128,7 @@ extern struct group_info init_groups;
117 .files = &init_files, \ 128 .files = &init_files, \
118 .signal = &init_signals, \ 129 .signal = &init_signals, \
119 .sighand = &init_sighand, \ 130 .sighand = &init_sighand, \
131 .nsproxy = &init_nsproxy, \
120 .pending = { \ 132 .pending = { \
121 .list = LIST_HEAD_INIT(tsk.pending.list), \ 133 .list = LIST_HEAD_INIT(tsk.pending.list), \
122 .signal = {{0}}}, \ 134 .signal = {{0}}}, \
diff --git a/include/linux/input.h b/include/linux/input.h
index b3253ab72ff7..5770105471dd 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -349,6 +349,9 @@ struct input_absinfo {
349 349
350#define KEY_BATTERY 236 350#define KEY_BATTERY 236
351 351
352#define KEY_BLUETOOTH 237
353#define KEY_WLAN 238
354
352#define KEY_UNKNOWN 240 355#define KEY_UNKNOWN 240
353 356
354#define BTN_MISC 0x100 357#define BTN_MISC 0x100
@@ -645,6 +648,7 @@ struct input_absinfo {
645#define BUS_USB 0x03 648#define BUS_USB 0x03
646#define BUS_HIL 0x04 649#define BUS_HIL 0x04
647#define BUS_BLUETOOTH 0x05 650#define BUS_BLUETOOTH 0x05
651#define BUS_VIRTUAL 0x06
648 652
649#define BUS_ISA 0x10 653#define BUS_ISA 0x10
650#define BUS_I8042 0x11 654#define BUS_I8042 0x11
@@ -667,98 +671,167 @@ struct input_absinfo {
667 671
668/* 672/*
669 * Structures used in ioctls to upload effects to a device 673 * Structures used in ioctls to upload effects to a device
670 * The first structures are not passed directly by using ioctls. 674 * They are pieces of a bigger structure (called ff_effect)
671 * They are sub-structures of the actually sent structure (called ff_effect) 675 */
676
677/*
678 * All duration values are expressed in ms. Values above 32767 ms (0x7fff)
679 * should not be used and have unspecified results.
672 */ 680 */
673 681
682/**
683 * struct ff_replay - defines scheduling of the effect
684 * @length: duration of the effect
685 * @delay: delay before effect should start playing
686 */
674struct ff_replay { 687struct ff_replay {
675 __u16 length; /* Duration of an effect in ms. All other times are also expressed in ms */ 688 __u16 length;
676 __u16 delay; /* Time to wait before to start playing an effect */ 689 __u16 delay;
677}; 690};
678 691
692/**
693 * struct ff_trigger - defines what triggers the effect
694 * @button: number of the button triggering the effect
695 * @interval: controls how soon the effect can be re-triggered
696 */
679struct ff_trigger { 697struct ff_trigger {
680 __u16 button; /* Number of button triggering an effect */ 698 __u16 button;
681 __u16 interval; /* Time to wait before an effect can be re-triggered (ms) */ 699 __u16 interval;
682}; 700};
683 701
702/**
703 * struct ff_envelope - generic effect envelope
704 * @attack_length: duration of the attack (ms)
705 * @attack_level: level at the beginning of the attack
706 * @fade_length: duration of fade (ms)
707 * @fade_level: level at the end of fade
708 *
709 * The @attack_level and @fade_level are absolute values; when applying
710 * envelope force-feedback core will convert to positive/negative
711 * value based on polarity of the default level of the effect.
712 * Valid range for the attack and fade levels is 0x0000 - 0x7fff
713 */
684struct ff_envelope { 714struct ff_envelope {
685 __u16 attack_length; /* Duration of attack (ms) */ 715 __u16 attack_length;
686 __u16 attack_level; /* Level at beginning of attack */ 716 __u16 attack_level;
687 __u16 fade_length; /* Duration of fade (ms) */ 717 __u16 fade_length;
688 __u16 fade_level; /* Level at end of fade */ 718 __u16 fade_level;
689}; 719};
690 720
691/* FF_CONSTANT */ 721/**
722 * struct ff_constant_effect - defines parameters of a constant effect
723 * @level: strength of the effect; may be negative
724 * @envelope: envelope data
725 */
692struct ff_constant_effect { 726struct ff_constant_effect {
693 __s16 level; /* Strength of effect. Negative values are OK */ 727 __s16 level;
694 struct ff_envelope envelope; 728 struct ff_envelope envelope;
695}; 729};
696 730
697/* FF_RAMP */ 731/**
732 * struct ff_ramp_effect - defines parameters of a ramp effect
733 * @start_level: beginning strength of the effect; may be negative
734 * @end_level: final strength of the effect; may be negative
735 * @envelope: envelope data
736 */
698struct ff_ramp_effect { 737struct ff_ramp_effect {
699 __s16 start_level; 738 __s16 start_level;
700 __s16 end_level; 739 __s16 end_level;
701 struct ff_envelope envelope; 740 struct ff_envelope envelope;
702}; 741};
703 742
704/* FF_SPRING of FF_FRICTION */ 743/**
744 * struct ff_condition_effect - defines a spring or friction effect
745 * @right_saturation: maximum level when joystick moved all way to the right
746 * @left_saturation: same for the left side
747 * @right_coeff: controls how fast the force grows when the joystick moves
748 * to the right
749 * @left_coeff: same for the left side
750 * @deadband: size of the dead zone, where no force is produced
751 * @center: position of the dead zone
752 */
705struct ff_condition_effect { 753struct ff_condition_effect {
706 __u16 right_saturation; /* Max level when joystick is on the right */ 754 __u16 right_saturation;
707 __u16 left_saturation; /* Max level when joystick in on the left */ 755 __u16 left_saturation;
708
709 __s16 right_coeff; /* Indicates how fast the force grows when the
710 joystick moves to the right */
711 __s16 left_coeff; /* Same for left side */
712 756
713 __u16 deadband; /* Size of area where no force is produced */ 757 __s16 right_coeff;
714 __s16 center; /* Position of dead zone */ 758 __s16 left_coeff;
715 759
760 __u16 deadband;
761 __s16 center;
716}; 762};
717 763
718/* FF_PERIODIC */ 764/**
765 * struct ff_periodic_effect - defines parameters of a periodic effect
766 * @waveform: kind of the effect (wave)
767 * @period: period of the wave (ms)
768 * @magnitude: peak value
769 * @offset: mean value of the wave (roughly)
770 * @phase: 'horizontal' shift
771 * @envelope: envelope data
772 * @custom_len: number of samples (FF_CUSTOM only)
773 * @custom_data: buffer of samples (FF_CUSTOM only)
774 *
775 * Known waveforms - FF_SQUARE, FF_TRIANGLE, FF_SINE, FF_SAW_UP,
776 * FF_SAW_DOWN, FF_CUSTOM. The exact syntax FF_CUSTOM is undefined
777 * for the time being as no driver supports it yet.
778 *
779 * Note: the data pointed by custom_data is copied by the driver.
780 * You can therefore dispose of the memory after the upload/update.
781 */
719struct ff_periodic_effect { 782struct ff_periodic_effect {
720 __u16 waveform; /* Kind of wave (sine, square...) */ 783 __u16 waveform;
721 __u16 period; /* in ms */ 784 __u16 period;
722 __s16 magnitude; /* Peak value */ 785 __s16 magnitude;
723 __s16 offset; /* Mean value of wave (roughly) */ 786 __s16 offset;
724 __u16 phase; /* 'Horizontal' shift */ 787 __u16 phase;
725 788
726 struct ff_envelope envelope; 789 struct ff_envelope envelope;
727 790
728/* Only used if waveform == FF_CUSTOM */ 791 __u32 custom_len;
729 __u32 custom_len; /* Number of samples */ 792 __s16 *custom_data;
730 __s16 *custom_data; /* Buffer of samples */
731/* Note: the data pointed by custom_data is copied by the driver. You can
732 * therefore dispose of the memory after the upload/update */
733}; 793};
734 794
735/* FF_RUMBLE */ 795/**
736/* Some rumble pads have two motors of different weight. 796 * struct ff_rumble_effect - defines parameters of a periodic effect
737 strong_magnitude represents the magnitude of the vibration generated 797 * @strong_magnitude: magnitude of the heavy motor
738 by the heavy motor. 798 * @weak_magnitude: magnitude of the light one
739*/ 799 *
800 * Some rumble pads have two motors of different weight. Strong_magnitude
801 * represents the magnitude of the vibration generated by the heavy one.
802 */
740struct ff_rumble_effect { 803struct ff_rumble_effect {
741 __u16 strong_magnitude; /* Magnitude of the heavy motor */ 804 __u16 strong_magnitude;
742 __u16 weak_magnitude; /* Magnitude of the light one */ 805 __u16 weak_magnitude;
743}; 806};
744 807
745/* 808/**
746 * Structure sent through ioctl from the application to the driver 809 * struct ff_effect - defines force feedback effect
810 * @type: type of the effect (FF_CONSTANT, FF_PERIODIC, FF_RAMP, FF_SPRING,
811 * FF_FRICTION, FF_DAMPER, FF_RUMBLE, FF_INERTIA, or FF_CUSTOM)
812 * @id: an unique id assigned to an effect
813 * @direction: direction of the effect
814 * @trigger: trigger conditions (struct ff_trigger)
815 * @replay: scheduling of the effect (struct ff_replay)
816 * @u: effect-specific structure (one of ff_constant_effect, ff_ramp_effect,
817 * ff_periodic_effect, ff_condition_effect, ff_rumble_effect) further
818 * defining effect parameters
819 *
820 * This structure is sent through ioctl from the application to the driver.
821 * To create a new effect aplication should set its @id to -1; the kernel
822 * will return assigned @id which can later be used to update or delete
823 * this effect.
824 *
825 * Direction of the effect is encoded as follows:
826 * 0 deg -> 0x0000 (down)
827 * 90 deg -> 0x4000 (left)
828 * 180 deg -> 0x8000 (up)
829 * 270 deg -> 0xC000 (right)
747 */ 830 */
748struct ff_effect { 831struct ff_effect {
749 __u16 type; 832 __u16 type;
750/* Following field denotes the unique id assigned to an effect.
751 * If user sets if to -1, a new effect is created, and its id is returned in the same field
752 * Else, the user sets it to the effect id it wants to update.
753 */
754 __s16 id; 833 __s16 id;
755 834 __u16 direction;
756 __u16 direction; /* Direction. 0 deg -> 0x0000 (down)
757 90 deg -> 0x4000 (left)
758 180 deg -> 0x8000 (up)
759 270 deg -> 0xC000 (right)
760 */
761
762 struct ff_trigger trigger; 835 struct ff_trigger trigger;
763 struct ff_replay replay; 836 struct ff_replay replay;
764 837
@@ -784,6 +857,9 @@ struct ff_effect {
784#define FF_INERTIA 0x56 857#define FF_INERTIA 0x56
785#define FF_RAMP 0x57 858#define FF_RAMP 0x57
786 859
860#define FF_EFFECT_MIN FF_RUMBLE
861#define FF_EFFECT_MAX FF_RAMP
862
787/* 863/*
788 * Force feedback periodic effect types 864 * Force feedback periodic effect types
789 */ 865 */
@@ -795,6 +871,9 @@ struct ff_effect {
795#define FF_SAW_DOWN 0x5c 871#define FF_SAW_DOWN 0x5c
796#define FF_CUSTOM 0x5d 872#define FF_CUSTOM 0x5d
797 873
874#define FF_WAVEFORM_MIN FF_SQUARE
875#define FF_WAVEFORM_MAX FF_CUSTOM
876
798/* 877/*
799 * Set ff device properties 878 * Set ff device properties
800 */ 879 */
@@ -864,12 +943,13 @@ struct input_dev {
864 unsigned long sndbit[NBITS(SND_MAX)]; 943 unsigned long sndbit[NBITS(SND_MAX)];
865 unsigned long ffbit[NBITS(FF_MAX)]; 944 unsigned long ffbit[NBITS(FF_MAX)];
866 unsigned long swbit[NBITS(SW_MAX)]; 945 unsigned long swbit[NBITS(SW_MAX)];
867 int ff_effects_max;
868 946
869 unsigned int keycodemax; 947 unsigned int keycodemax;
870 unsigned int keycodesize; 948 unsigned int keycodesize;
871 void *keycode; 949 void *keycode;
872 950
951 struct ff_device *ff;
952
873 unsigned int repeat_key; 953 unsigned int repeat_key;
874 struct timer_list timer; 954 struct timer_list timer;
875 955
@@ -895,8 +975,6 @@ struct input_dev {
895 void (*close)(struct input_dev *dev); 975 void (*close)(struct input_dev *dev);
896 int (*flush)(struct input_dev *dev, struct file *file); 976 int (*flush)(struct input_dev *dev, struct file *file);
897 int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); 977 int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
898 int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect);
899 int (*erase_effect)(struct input_dev *dev, int effect_id);
900 978
901 struct input_handle *grab; 979 struct input_handle *grab;
902 980
@@ -904,9 +982,6 @@ struct input_dev {
904 unsigned int users; 982 unsigned int users;
905 983
906 struct class_device cdev; 984 struct class_device cdev;
907 struct device *dev; /* will be removed soon */
908
909 int dynalloc; /* temporarily */
910 985
911 struct list_head h_list; 986 struct list_head h_list;
912 struct list_head node; 987 struct list_head node;
@@ -985,16 +1060,16 @@ struct input_handler {
985 void *private; 1060 void *private;
986 1061
987 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); 1062 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
988 struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); 1063 struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
989 void (*disconnect)(struct input_handle *handle); 1064 void (*disconnect)(struct input_handle *handle);
990 void (*start)(struct input_handle *handle); 1065 void (*start)(struct input_handle *handle);
991 1066
992 const struct file_operations *fops; 1067 const struct file_operations *fops;
993 int minor; 1068 int minor;
994 char *name; 1069 const char *name;
995 1070
996 struct input_device_id *id_table; 1071 const struct input_device_id *id_table;
997 struct input_device_id *blacklist; 1072 const struct input_device_id *blacklist;
998 1073
999 struct list_head h_list; 1074 struct list_head h_list;
1000 struct list_head node; 1075 struct list_head node;
@@ -1005,7 +1080,7 @@ struct input_handle {
1005 void *private; 1080 void *private;
1006 1081
1007 int open; 1082 int open;
1008 char *name; 1083 const char *name;
1009 1084
1010 struct input_dev *dev; 1085 struct input_dev *dev;
1011 struct input_handler *handler; 1086 struct input_handler *handler;
@@ -1019,12 +1094,6 @@ struct input_handle {
1019#define to_handle(n) container_of(n,struct input_handle,d_node) 1094#define to_handle(n) container_of(n,struct input_handle,d_node)
1020#define to_handle_h(n) container_of(n,struct input_handle,h_node) 1095#define to_handle_h(n) container_of(n,struct input_handle,h_node)
1021 1096
1022static inline void init_input_dev(struct input_dev *dev)
1023{
1024 INIT_LIST_HEAD(&dev->h_list);
1025 INIT_LIST_HEAD(&dev->node);
1026}
1027
1028struct input_dev *input_allocate_device(void); 1097struct input_dev *input_allocate_device(void);
1029void input_free_device(struct input_dev *dev); 1098void input_free_device(struct input_dev *dev);
1030 1099
@@ -1041,7 +1110,7 @@ static inline void input_put_device(struct input_dev *dev)
1041int input_register_device(struct input_dev *); 1110int input_register_device(struct input_dev *);
1042void input_unregister_device(struct input_dev *); 1111void input_unregister_device(struct input_dev *);
1043 1112
1044void input_register_handler(struct input_handler *); 1113int input_register_handler(struct input_handler *);
1045void input_unregister_handler(struct input_handler *); 1114void input_unregister_handler(struct input_handler *);
1046 1115
1047int input_grab_device(struct input_handle *); 1116int input_grab_device(struct input_handle *);
@@ -1070,11 +1139,6 @@ static inline void input_report_abs(struct input_dev *dev, unsigned int code, in
1070 input_event(dev, EV_ABS, code, value); 1139 input_event(dev, EV_ABS, code, value);
1071} 1140}
1072 1141
1073static inline void input_report_ff(struct input_dev *dev, unsigned int code, int value)
1074{
1075 input_event(dev, EV_FF, code, value);
1076}
1077
1078static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value) 1142static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value)
1079{ 1143{
1080 input_event(dev, EV_FF_STATUS, code, value); 1144 input_event(dev, EV_FF_STATUS, code, value);
@@ -1108,5 +1172,61 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min
1108 1172
1109extern struct class input_class; 1173extern struct class input_class;
1110 1174
1175/**
1176 * struct ff_device - force-feedback part of an input device
1177 * @upload: Called to upload an new effect into device
1178 * @erase: Called to erase an effect from device
1179 * @playback: Called to request device to start playing specified effect
1180 * @set_gain: Called to set specified gain
1181 * @set_autocenter: Called to auto-center device
1182 * @destroy: called by input core when parent input device is being
1183 * destroyed
1184 * @private: driver-specific data, will be freed automatically
1185 * @ffbit: bitmap of force feedback capabilities truly supported by
1186 * device (not emulated like ones in input_dev->ffbit)
1187 * @mutex: mutex for serializing access to the device
1188 * @max_effects: maximum number of effects supported by device
1189 * @effects: pointer to an array of effects currently loaded into device
1190 * @effect_owners: array of effect owners; when file handle owning
1191 * an effect gets closed the effcet is automatically erased
1192 *
1193 * Every force-feedback device must implement upload() and playback()
1194 * methods; erase() is optional. set_gain() and set_autocenter() need
1195 * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER
1196 * bits.
1197 */
1198struct ff_device {
1199 int (*upload)(struct input_dev *dev, struct ff_effect *effect,
1200 struct ff_effect *old);
1201 int (*erase)(struct input_dev *dev, int effect_id);
1202
1203 int (*playback)(struct input_dev *dev, int effect_id, int value);
1204 void (*set_gain)(struct input_dev *dev, u16 gain);
1205 void (*set_autocenter)(struct input_dev *dev, u16 magnitude);
1206
1207 void (*destroy)(struct ff_device *);
1208
1209 void *private;
1210
1211 unsigned long ffbit[NBITS(FF_MAX)];
1212
1213 struct mutex mutex;
1214
1215 int max_effects;
1216 struct ff_effect *effects;
1217 struct file *effect_owners[];
1218};
1219
1220int input_ff_create(struct input_dev *dev, int max_effects);
1221void input_ff_destroy(struct input_dev *dev);
1222
1223int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
1224
1225int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
1226int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
1227
1228int input_ff_create_memless(struct input_dev *dev, void *data,
1229 int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
1230
1111#endif 1231#endif
1112#endif 1232#endif
diff --git a/include/linux/io.h b/include/linux/io.h
index 420e2fdf26f6..aa3f5af670b5 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -19,8 +19,12 @@
19#define _LINUX_IO_H 19#define _LINUX_IO_H
20 20
21#include <asm/io.h> 21#include <asm/io.h>
22#include <asm/page.h>
22 23
23void __iowrite32_copy(void __iomem *to, const void *from, size_t count); 24void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
24void __iowrite64_copy(void __iomem *to, const void *from, size_t count); 25void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
25 26
27int ioremap_page_range(unsigned long addr, unsigned long end,
28 unsigned long phys_addr, pgprot_t prot);
29
26#endif /* _LINUX_IO_H */ 30#endif /* _LINUX_IO_H */
diff --git a/include/linux/ipc.h b/include/linux/ipc.h
index b291189737e7..d9e2b3f36c35 100644
--- a/include/linux/ipc.h
+++ b/include/linux/ipc.h
@@ -2,6 +2,7 @@
2#define _LINUX_IPC_H 2#define _LINUX_IPC_H
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/kref.h>
5 6
6#define IPC_PRIVATE ((__kernel_key_t) 0) 7#define IPC_PRIVATE ((__kernel_key_t) 0)
7 8
@@ -68,6 +69,59 @@ struct kern_ipc_perm
68 void *security; 69 void *security;
69}; 70};
70 71
72struct ipc_ids;
73struct ipc_namespace {
74 struct kref kref;
75 struct ipc_ids *ids[3];
76
77 int sem_ctls[4];
78 int used_sems;
79
80 int msg_ctlmax;
81 int msg_ctlmnb;
82 int msg_ctlmni;
83
84 size_t shm_ctlmax;
85 size_t shm_ctlall;
86 int shm_ctlmni;
87 int shm_tot;
88};
89
90extern struct ipc_namespace init_ipc_ns;
91
92#ifdef CONFIG_SYSVIPC
93#define INIT_IPC_NS(ns) .ns = &init_ipc_ns,
94#else
95#define INIT_IPC_NS(ns)
96#endif
97
98#ifdef CONFIG_IPC_NS
99extern void free_ipc_ns(struct kref *kref);
100extern int copy_ipcs(unsigned long flags, struct task_struct *tsk);
101extern int unshare_ipcs(unsigned long flags, struct ipc_namespace **ns);
102#else
103static inline int copy_ipcs(unsigned long flags, struct task_struct *tsk)
104{
105 return 0;
106}
107#endif
108
109static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
110{
111#ifdef CONFIG_IPC_NS
112 if (ns)
113 kref_get(&ns->kref);
114#endif
115 return ns;
116}
117
118static inline void put_ipc_ns(struct ipc_namespace *ns)
119{
120#ifdef CONFIG_IPC_NS
121 kref_put(&ns->kref, free_ipc_ns);
122#endif
123}
124
71#endif /* __KERNEL__ */ 125#endif /* __KERNEL__ */
72 126
73#endif /* _LINUX_IPC_H */ 127#endif /* _LINUX_IPC_H */
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h
index d09fbeabf1dc..796ca009fd46 100644
--- a/include/linux/ipmi.h
+++ b/include/linux/ipmi.h
@@ -148,6 +148,13 @@ struct ipmi_lan_addr
148#define IPMI_BMC_CHANNEL 0xf 148#define IPMI_BMC_CHANNEL 0xf
149#define IPMI_NUM_CHANNELS 0x10 149#define IPMI_NUM_CHANNELS 0x10
150 150
151/*
152 * Used to signify an "all channel" bitmask. This is more than the
153 * actual number of channels because this is used in userland and
154 * will cover us if the number of channels is extended.
155 */
156#define IPMI_CHAN_ALL (~0)
157
151 158
152/* 159/*
153 * A raw IPMI message without any addressing. This covers both 160 * A raw IPMI message without any addressing. This covers both
@@ -350,18 +357,21 @@ int ipmi_request_supply_msgs(ipmi_user_t user,
350 357
351/* 358/*
352 * When commands come in to the SMS, the user can register to receive 359 * When commands come in to the SMS, the user can register to receive
353 * them. Only one user can be listening on a specific netfn/cmd pair 360 * them. Only one user can be listening on a specific netfn/cmd/chan tuple
354 * at a time, you will get an EBUSY error if the command is already 361 * at a time, you will get an EBUSY error if the command is already
355 * registered. If a command is received that does not have a user 362 * registered. If a command is received that does not have a user
356 * registered, the driver will automatically return the proper 363 * registered, the driver will automatically return the proper
357 * error. 364 * error. Channels are specified as a bitfield, use IPMI_CHAN_ALL to
365 * mean all channels.
358 */ 366 */
359int ipmi_register_for_cmd(ipmi_user_t user, 367int ipmi_register_for_cmd(ipmi_user_t user,
360 unsigned char netfn, 368 unsigned char netfn,
361 unsigned char cmd); 369 unsigned char cmd,
370 unsigned int chans);
362int ipmi_unregister_for_cmd(ipmi_user_t user, 371int ipmi_unregister_for_cmd(ipmi_user_t user,
363 unsigned char netfn, 372 unsigned char netfn,
364 unsigned char cmd); 373 unsigned char cmd,
374 unsigned int chans);
365 375
366/* 376/*
367 * Allow run-to-completion mode to be set for the interface of 377 * Allow run-to-completion mode to be set for the interface of
@@ -571,6 +581,36 @@ struct ipmi_cmdspec
571#define IPMICTL_UNREGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC, 15, \ 581#define IPMICTL_UNREGISTER_FOR_CMD _IOR(IPMI_IOC_MAGIC, 15, \
572 struct ipmi_cmdspec) 582 struct ipmi_cmdspec)
573 583
584/*
585 * Register to get commands from other entities on specific channels.
586 * This way, you can only listen on specific channels, or have messages
587 * from some channels go to one place and other channels to someplace
588 * else. The chans field is a bitmask, (1 << channel) for each channel.
589 * It may be IPMI_CHAN_ALL for all channels.
590 */
591struct ipmi_cmdspec_chans
592{
593 unsigned int netfn;
594 unsigned int cmd;
595 unsigned int chans;
596};
597
598/*
599 * Register to receive a specific command on specific channels. error values:
600 * - EFAULT - an address supplied was invalid.
601 * - EBUSY - One of the netfn/cmd/chans supplied was already in use.
602 * - ENOMEM - could not allocate memory for the entry.
603 */
604#define IPMICTL_REGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 28, \
605 struct ipmi_cmdspec_chans)
606/*
607 * Unregister some netfn/cmd/chans. error values:
608 * - EFAULT - an address supplied was invalid.
609 * - ENOENT - None of the netfn/cmd/chans were found registered for this user.
610 */
611#define IPMICTL_UNREGISTER_FOR_CMD_CHANS _IOR(IPMI_IOC_MAGIC, 29, \
612 struct ipmi_cmdspec_chans)
613
574/* 614/*
575 * Set whether this interface receives events. Note that the first 615 * Set whether this interface receives events. Note that the first
576 * user registered for events will get all pending events for the 616 * user registered for events will get all pending events for the
diff --git a/include/linux/kmod.h b/include/linux/kmod.h
index 0db22a1ab474..10f505c8431d 100644
--- a/include/linux/kmod.h
+++ b/include/linux/kmod.h
@@ -47,4 +47,8 @@ call_usermodehelper(char *path, char **argv, char **envp, int wait)
47 47
48extern void usermodehelper_init(void); 48extern void usermodehelper_init(void);
49 49
50struct file;
51extern int call_usermodehelper_pipe(char *path, char *argv[], char *envp[],
52 struct file **filp);
53
50#endif /* __LINUX_KMOD_H__ */ 54#endif /* __LINUX_KMOD_H__ */
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 8bf6702da2a0..ac4c0559f751 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -77,6 +77,12 @@ struct kprobe {
77 /* location of the probe point */ 77 /* location of the probe point */
78 kprobe_opcode_t *addr; 78 kprobe_opcode_t *addr;
79 79
80 /* Allow user to indicate symbol name of the probe point */
81 char *symbol_name;
82
83 /* Offset into the symbol */
84 unsigned int offset;
85
80 /* Called before addr is executed. */ 86 /* Called before addr is executed. */
81 kprobe_pre_handler_t pre_handler; 87 kprobe_pre_handler_t pre_handler;
82 88
@@ -196,7 +202,7 @@ void unregister_kretprobe(struct kretprobe *rp);
196struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); 202struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp);
197void add_rp_inst(struct kretprobe_instance *ri); 203void add_rp_inst(struct kretprobe_instance *ri);
198void kprobe_flush_task(struct task_struct *tk); 204void kprobe_flush_task(struct task_struct *tk);
199void recycle_rp_inst(struct kretprobe_instance *ri); 205void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
200#else /* CONFIG_KPROBES */ 206#else /* CONFIG_KPROBES */
201 207
202#define __kprobes /**/ 208#define __kprobes /**/
diff --git a/include/linux/latency.h b/include/linux/latency.h
new file mode 100644
index 000000000000..c08b52bb55b0
--- /dev/null
+++ b/include/linux/latency.h
@@ -0,0 +1,25 @@
1/*
2 * latency.h: Explicit system-wide latency-expectation infrastructure
3 *
4 * (C) Copyright 2006 Intel Corporation
5 * Author: Arjan van de Ven <arjan@linux.intel.com>
6 *
7 */
8
9#ifndef _INCLUDE_GUARD_LATENCY_H_
10#define _INCLUDE_GUARD_LATENCY_H_
11
12#include <linux/notifier.h>
13
14void set_acceptable_latency(char *identifier, int usecs);
15void modify_acceptable_latency(char *identifier, int usecs);
16void remove_acceptable_latency(char *identifier);
17void synchronize_acceptable_latency(void);
18int system_latency_constraint(void);
19
20int register_latency_notifier(struct notifier_block * nb);
21int unregister_latency_notifier(struct notifier_block * nb);
22
23#define INFINITE_LATENCY 1000000
24
25#endif
diff --git a/include/linux/libps2.h b/include/linux/libps2.h
index 08a450a9dbf7..f6f301e2b0f5 100644
--- a/include/linux/libps2.h
+++ b/include/linux/libps2.h
@@ -47,5 +47,6 @@ int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int comman
47int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data); 47int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data);
48int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data); 48int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data);
49void ps2_cmd_aborted(struct ps2dev *ps2dev); 49void ps2_cmd_aborted(struct ps2dev *ps2dev);
50int ps2_is_keyboard_id(char id);
50 51
51#endif /* _LIBPS2_H */ 52#endif /* _LIBPS2_H */
diff --git a/include/linux/lockd/bind.h b/include/linux/lockd/bind.h
index b054debef2e0..81e3a185f951 100644
--- a/include/linux/lockd/bind.h
+++ b/include/linux/lockd/bind.h
@@ -30,7 +30,7 @@ extern struct nlmsvc_binding * nlmsvc_ops;
30 * Functions exported by the lockd module 30 * Functions exported by the lockd module
31 */ 31 */
32extern int nlmclnt_proc(struct inode *, int, struct file_lock *); 32extern int nlmclnt_proc(struct inode *, int, struct file_lock *);
33extern int lockd_up(void); 33extern int lockd_up(int proto);
34extern void lockd_down(void); 34extern void lockd_down(void);
35 35
36#endif /* LINUX_LOCKD_BIND_H */ 36#endif /* LINUX_LOCKD_BIND_H */
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 0d92c468d55a..47b7dbd647a6 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -80,7 +80,7 @@ struct nlm_wait;
80/* 80/*
81 * Memory chunk for NLM client RPC request. 81 * Memory chunk for NLM client RPC request.
82 */ 82 */
83#define NLMCLNT_OHSIZE (sizeof(system_utsname.nodename)+10) 83#define NLMCLNT_OHSIZE (sizeof(utsname()->nodename)+10)
84struct nlm_rqst { 84struct nlm_rqst {
85 unsigned int a_flags; /* initial RPC task flags */ 85 unsigned int a_flags; /* initial RPC task flags */
86 struct nlm_host * a_host; /* host handle */ 86 struct nlm_host * a_host; /* host handle */
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 8f04143ca363..654ef5544878 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -57,7 +57,7 @@ struct memory_block {
57struct notifier_block; 57struct notifier_block;
58struct mem_section; 58struct mem_section;
59 59
60#ifndef CONFIG_MEMORY_HOTPLUG 60#ifndef CONFIG_MEMORY_HOTPLUG_SPARSE
61static inline int memory_dev_init(void) 61static inline int memory_dev_init(void)
62{ 62{
63 return 0; 63 return 0;
@@ -78,7 +78,7 @@ extern int remove_memory_block(unsigned long, struct mem_section *, int);
78#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT) 78#define CONFIG_MEM_BLOCK_SIZE (PAGES_PER_SECTION<<PAGE_SHIFT)
79 79
80 80
81#endif /* CONFIG_MEMORY_HOTPLUG */ 81#endif /* CONFIG_MEMORY_HOTPLUG_SPARSE */
82 82
83#define hotplug_memory_notifier(fn, pri) { \ 83#define hotplug_memory_notifier(fn, pri) { \
84 static struct notifier_block fn##_mem_nb = \ 84 static struct notifier_block fn##_mem_nb = \
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index 218501cfaeb9..7b54666cea8e 100644
--- a/include/linux/memory_hotplug.h
+++ b/include/linux/memory_hotplug.h
@@ -172,5 +172,7 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn,
172extern int add_memory(int nid, u64 start, u64 size); 172extern int add_memory(int nid, u64 start, u64 size);
173extern int arch_add_memory(int nid, u64 start, u64 size); 173extern int arch_add_memory(int nid, u64 start, u64 size);
174extern int remove_memory(u64 start, u64 size); 174extern int remove_memory(u64 start, u64 size);
175extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn,
176 int nr_pages);
175 177
176#endif /* __LINUX_MEMORY_HOTPLUG_H */ 178#endif /* __LINUX_MEMORY_HOTPLUG_H */
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 4edf1934e5ca..b7966ab8cb6a 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -946,6 +946,8 @@ extern void mem_init(void);
946extern void show_mem(void); 946extern void show_mem(void);
947extern void si_meminfo(struct sysinfo * val); 947extern void si_meminfo(struct sysinfo * val);
948extern void si_meminfo_node(struct sysinfo *val, int nid); 948extern void si_meminfo_node(struct sysinfo *val, int nid);
949extern void zonetable_add(struct zone *zone, int nid, enum zone_type zid,
950 unsigned long pfn, unsigned long size);
949 951
950#ifdef CONFIG_NUMA 952#ifdef CONFIG_NUMA
951extern void setup_per_cpu_pageset(void); 953extern void setup_per_cpu_pageset(void);
diff --git a/include/linux/module.h b/include/linux/module.h
index 2c599175c583..4b2d8091a410 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -320,6 +320,8 @@ struct module
320 /* Am I GPL-compatible */ 320 /* Am I GPL-compatible */
321 int license_gplok; 321 int license_gplok;
322 322
323 unsigned int taints; /* same bits as kernel:tainted */
324
323#ifdef CONFIG_MODULE_UNLOAD 325#ifdef CONFIG_MODULE_UNLOAD
324 /* Reference counts */ 326 /* Reference counts */
325 struct module_ref ref[NR_CPUS]; 327 struct module_ref ref[NR_CPUS];
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 0b4cd2fa64aa..70420bbae82b 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -27,9 +27,17 @@
27struct mtd_info; 27struct mtd_info;
28/* Scan and identify a NAND device */ 28/* Scan and identify a NAND device */
29extern int nand_scan (struct mtd_info *mtd, int max_chips); 29extern int nand_scan (struct mtd_info *mtd, int max_chips);
30/* Separate phases of nand_scan(), allowing board driver to intervene
31 * and override command or ECC setup according to flash type */
32extern int nand_scan_ident(struct mtd_info *mtd, int max_chips);
33extern int nand_scan_tail(struct mtd_info *mtd);
34
30/* Free resources held by the NAND device */ 35/* Free resources held by the NAND device */
31extern void nand_release (struct mtd_info *mtd); 36extern void nand_release (struct mtd_info *mtd);
32 37
38/* Internal helper for board drivers which need to override command function */
39extern void nand_wait_ready(struct mtd_info *mtd);
40
33/* The maximum number of NAND chips in an array */ 41/* The maximum number of NAND chips in an array */
34#define NAND_MAX_CHIPS 8 42#define NAND_MAX_CHIPS 8
35 43
@@ -178,7 +186,9 @@ typedef enum {
178#define NAND_USE_FLASH_BBT 0x00010000 186#define NAND_USE_FLASH_BBT 0x00010000
179/* This option skips the bbt scan during initialization. */ 187/* This option skips the bbt scan during initialization. */
180#define NAND_SKIP_BBTSCAN 0x00020000 188#define NAND_SKIP_BBTSCAN 0x00020000
181 189/* This option is defined if the board driver allocates its own buffers
190 (e.g. because it needs them DMA-coherent */
191#define NAND_OWN_BUFFERS 0x00040000
182/* Options set by nand scan */ 192/* Options set by nand scan */
183/* Nand scan has allocated controller struct */ 193/* Nand scan has allocated controller struct */
184#define NAND_CONTROLLER_ALLOC 0x80000000 194#define NAND_CONTROLLER_ALLOC 0x80000000
@@ -228,6 +238,8 @@ struct nand_hw_control {
228 * be provided if an hardware ECC is available 238 * be provided if an hardware ECC is available
229 * @calculate: function for ecc calculation or readback from ecc hardware 239 * @calculate: function for ecc calculation or readback from ecc hardware
230 * @correct: function for ecc correction, matching to ecc generator (sw/hw) 240 * @correct: function for ecc correction, matching to ecc generator (sw/hw)
241 * @read_page_raw: function to read a raw page without ECC
242 * @write_page_raw: function to write a raw page without ECC
231 * @read_page: function to read a page according to the ecc generator requirements 243 * @read_page: function to read a page according to the ecc generator requirements
232 * @write_page: function to write a page according to the ecc generator requirements 244 * @write_page: function to write a page according to the ecc generator requirements
233 * @read_oob: function to read chip OOB data 245 * @read_oob: function to read chip OOB data
@@ -249,6 +261,12 @@ struct nand_ecc_ctrl {
249 int (*correct)(struct mtd_info *mtd, uint8_t *dat, 261 int (*correct)(struct mtd_info *mtd, uint8_t *dat,
250 uint8_t *read_ecc, 262 uint8_t *read_ecc,
251 uint8_t *calc_ecc); 263 uint8_t *calc_ecc);
264 int (*read_page_raw)(struct mtd_info *mtd,
265 struct nand_chip *chip,
266 uint8_t *buf);
267 void (*write_page_raw)(struct mtd_info *mtd,
268 struct nand_chip *chip,
269 const uint8_t *buf);
252 int (*read_page)(struct mtd_info *mtd, 270 int (*read_page)(struct mtd_info *mtd,
253 struct nand_chip *chip, 271 struct nand_chip *chip,
254 uint8_t *buf); 272 uint8_t *buf);
@@ -337,6 +355,7 @@ struct nand_buffers {
337 * @priv: [OPTIONAL] pointer to private chip date 355 * @priv: [OPTIONAL] pointer to private chip date
338 * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks 356 * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks
339 * (determine if errors are correctable) 357 * (determine if errors are correctable)
358 * @write_page [REPLACEABLE] High-level page write function
340 */ 359 */
341 360
342struct nand_chip { 361struct nand_chip {
@@ -359,6 +378,8 @@ struct nand_chip {
359 void (*erase_cmd)(struct mtd_info *mtd, int page); 378 void (*erase_cmd)(struct mtd_info *mtd, int page);
360 int (*scan_bbt)(struct mtd_info *mtd); 379 int (*scan_bbt)(struct mtd_info *mtd);
361 int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); 380 int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page);
381 int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
382 const uint8_t *buf, int page, int cached, int raw);
362 383
363 int chip_delay; 384 int chip_delay;
364 unsigned int options; 385 unsigned int options;
@@ -380,7 +401,7 @@ struct nand_chip {
380 struct nand_ecclayout *ecclayout; 401 struct nand_ecclayout *ecclayout;
381 402
382 struct nand_ecc_ctrl ecc; 403 struct nand_ecc_ctrl ecc;
383 struct nand_buffers buffers; 404 struct nand_buffers *buffers;
384 struct nand_hw_control hwcontrol; 405 struct nand_hw_control hwcontrol;
385 406
386 struct mtd_oob_ops ops; 407 struct mtd_oob_ops ops;
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h
index 1f4972155249..6f045b586e76 100644
--- a/include/linux/mtd/onenand.h
+++ b/include/linux/mtd/onenand.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * linux/include/linux/mtd/onenand.h 2 * linux/include/linux/mtd/onenand.h
3 * 3 *
4 * Copyright (C) 2005 Samsung Electronics 4 * Copyright (C) 2005-2006 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com> 5 * Kyungmin Park <kyungmin.park@samsung.com>
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
@@ -96,6 +96,7 @@ struct onenand_chip {
96 void __iomem *base; 96 void __iomem *base;
97 unsigned int chipsize; 97 unsigned int chipsize;
98 unsigned int device_id; 98 unsigned int device_id;
99 unsigned int version_id;
99 unsigned int density_mask; 100 unsigned int density_mask;
100 unsigned int options; 101 unsigned int options;
101 102
@@ -149,7 +150,8 @@ struct onenand_chip {
149/* 150/*
150 * Options bits 151 * Options bits
151 */ 152 */
152#define ONENAND_CONT_LOCK (0x0001) 153#define ONENAND_HAS_CONT_LOCK (0x0001)
154#define ONENAND_HAS_UNLOCK_ALL (0x0002)
153#define ONENAND_PAGEBUF_ALLOC (0x1000) 155#define ONENAND_PAGEBUF_ALLOC (0x1000)
154 156
155/* 157/*
diff --git a/include/linux/mtd/onenand_regs.h b/include/linux/mtd/onenand_regs.h
index 4a72818d2545..9e409fe6ded6 100644
--- a/include/linux/mtd/onenand_regs.h
+++ b/include/linux/mtd/onenand_regs.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * OneNAND Register header file 4 * OneNAND Register header file
5 * 5 *
6 * Copyright (C) 2005 Samsung Electronics 6 * Copyright (C) 2005-2006 Samsung Electronics
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
@@ -72,6 +72,7 @@
72#define ONENAND_DEVICE_VCC_MASK (0x3) 72#define ONENAND_DEVICE_VCC_MASK (0x3)
73 73
74#define ONENAND_DEVICE_DENSITY_512Mb (0x002) 74#define ONENAND_DEVICE_DENSITY_512Mb (0x002)
75#define ONENAND_DEVICE_DENSITY_1Gb (0x003)
75 76
76/* 77/*
77 * Version ID Register F002h (R) 78 * Version ID Register F002h (R)
@@ -110,6 +111,7 @@
110#define ONENAND_CMD_UNLOCK (0x23) 111#define ONENAND_CMD_UNLOCK (0x23)
111#define ONENAND_CMD_LOCK (0x2A) 112#define ONENAND_CMD_LOCK (0x2A)
112#define ONENAND_CMD_LOCK_TIGHT (0x2C) 113#define ONENAND_CMD_LOCK_TIGHT (0x2C)
114#define ONENAND_CMD_UNLOCK_ALL (0x27)
113#define ONENAND_CMD_ERASE (0x94) 115#define ONENAND_CMD_ERASE (0x94)
114#define ONENAND_CMD_RESET (0xF0) 116#define ONENAND_CMD_RESET (0xF0)
115#define ONENAND_CMD_OTP_ACCESS (0x65) 117#define ONENAND_CMD_OTP_ACCESS (0x65)
diff --git a/include/linux/namei.h b/include/linux/namei.h
index c6470ba00668..f5f19606effb 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -1,6 +1,7 @@
1#ifndef _LINUX_NAMEI_H 1#ifndef _LINUX_NAMEI_H
2#define _LINUX_NAMEI_H 2#define _LINUX_NAMEI_H
3 3
4#include <linux/dcache.h>
4#include <linux/linkage.h> 5#include <linux/linkage.h>
5 6
6struct vfsmount; 7struct vfsmount;
diff --git a/include/linux/namespace.h b/include/linux/namespace.h
index 3abc8e3b4879..d137009f0b2b 100644
--- a/include/linux/namespace.h
+++ b/include/linux/namespace.h
@@ -4,6 +4,7 @@
4 4
5#include <linux/mount.h> 5#include <linux/mount.h>
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/nsproxy.h>
7 8
8struct namespace { 9struct namespace {
9 atomic_t count; 10 atomic_t count;
@@ -26,11 +27,8 @@ static inline void put_namespace(struct namespace *namespace)
26 27
27static inline void exit_namespace(struct task_struct *p) 28static inline void exit_namespace(struct task_struct *p)
28{ 29{
29 struct namespace *namespace = p->namespace; 30 struct namespace *namespace = p->nsproxy->namespace;
30 if (namespace) { 31 if (namespace) {
31 task_lock(p);
32 p->namespace = NULL;
33 task_unlock(p);
34 put_namespace(namespace); 32 put_namespace(namespace);
35 } 33 }
36} 34}
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 02e352be717e..0ea7f89e613c 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -212,6 +212,7 @@ void ncp_date_unix2dos(int unix_date, __le16 * time, __le16 * date);
212 212
213/* linux/fs/ncpfs/ioctl.c */ 213/* linux/fs/ncpfs/ioctl.c */
214int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long); 214int ncp_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
215long ncp_compat_ioctl(struct file *, unsigned int, unsigned long);
215 216
216/* linux/fs/ncpfs/sock.c */ 217/* linux/fs/ncpfs/sock.c */
217int ncp_request2(struct ncp_server *server, int function, 218int ncp_request2(struct ncp_server *server, int function,
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 98c9b9f667a5..76ff54846ada 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -367,10 +367,12 @@ extern int nfs3_removexattr (struct dentry *, const char *name);
367 */ 367 */
368extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t, 368extern ssize_t nfs_direct_IO(int, struct kiocb *, const struct iovec *, loff_t,
369 unsigned long); 369 unsigned long);
370extern ssize_t nfs_file_direct_read(struct kiocb *iocb, char __user *buf, 370extern ssize_t nfs_file_direct_read(struct kiocb *iocb,
371 size_t count, loff_t pos); 371 const struct iovec *iov, unsigned long nr_segs,
372extern ssize_t nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, 372 loff_t pos);
373 size_t count, loff_t pos); 373extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
374 const struct iovec *iov, unsigned long nr_segs,
375 loff_t pos);
374 376
375/* 377/*
376 * linux/fs/nfs/dir.c 378 * linux/fs/nfs/dir.c
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index 2dcad295fece..e1dbc86c270b 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -140,6 +140,11 @@ struct posix_acl *nfsd_get_posix_acl(struct svc_fh *, int);
140int nfsd_set_posix_acl(struct svc_fh *, int, struct posix_acl *); 140int nfsd_set_posix_acl(struct svc_fh *, int, struct posix_acl *);
141#endif 141#endif
142 142
143enum vers_op {NFSD_SET, NFSD_CLEAR, NFSD_TEST, NFSD_AVAIL };
144int nfsd_vers(int vers, enum vers_op change);
145void nfsd_reset_versions(void);
146int nfsd_create_serv(void);
147
143 148
144/* 149/*
145 * NFSv4 State 150 * NFSv4 State
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h
index 31a3cb617ce0..069257ea99a0 100644
--- a/include/linux/nfsd/nfsfh.h
+++ b/include/linux/nfsd/nfsfh.h
@@ -290,8 +290,9 @@ fill_post_wcc(struct svc_fh *fhp)
290 * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once 290 * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once
291 * so, any changes here should be reflected there. 291 * so, any changes here should be reflected there.
292 */ 292 */
293
293static inline void 294static inline void
294fh_lock(struct svc_fh *fhp) 295fh_lock_nested(struct svc_fh *fhp, unsigned int subclass)
295{ 296{
296 struct dentry *dentry = fhp->fh_dentry; 297 struct dentry *dentry = fhp->fh_dentry;
297 struct inode *inode; 298 struct inode *inode;
@@ -310,11 +311,17 @@ fh_lock(struct svc_fh *fhp)
310 } 311 }
311 312
312 inode = dentry->d_inode; 313 inode = dentry->d_inode;
313 mutex_lock(&inode->i_mutex); 314 mutex_lock_nested(&inode->i_mutex, subclass);
314 fill_pre_wcc(fhp); 315 fill_pre_wcc(fhp);
315 fhp->fh_locked = 1; 316 fhp->fh_locked = 1;
316} 317}
317 318
319static inline void
320fh_lock(struct svc_fh *fhp)
321{
322 fh_lock_nested(fhp, I_MUTEX_NORMAL);
323}
324
318/* 325/*
319 * Unlock a file handle/inode 326 * Unlock a file handle/inode
320 */ 327 */
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h
index dae0faea2807..8bcddccb6c42 100644
--- a/include/linux/nfsd/syscall.h
+++ b/include/linux/nfsd/syscall.h
@@ -38,21 +38,6 @@
38#define NFSCTL_GETFD 7 /* get an fh by path (used by mountd) */ 38#define NFSCTL_GETFD 7 /* get an fh by path (used by mountd) */
39#define NFSCTL_GETFS 8 /* get an fh by path with max FH len */ 39#define NFSCTL_GETFS 8 /* get an fh by path with max FH len */
40 40
41/*
42 * Macros used to set version
43 */
44#define NFSCTL_VERSET(_cltbits, _v) ((_cltbits) |= (1 << (_v)))
45#define NFSCTL_VERUNSET(_cltbits, _v) ((_cltbits) &= ~(1 << (_v)))
46#define NFSCTL_VERISSET(_cltbits, _v) ((_cltbits) & (1 << (_v)))
47
48#if defined(CONFIG_NFSD_V4)
49#define NFSCTL_VERALL (0x1c /* 0b011100 */)
50#elif defined(CONFIG_NFSD_V3)
51#define NFSCTL_VERALL (0x0c /* 0b001100 */)
52#else
53#define NFSCTL_VERALL (0x04 /* 0b000100 */)
54#endif
55
56/* SVC */ 41/* SVC */
57struct nfsctl_svc { 42struct nfsctl_svc {
58 unsigned short svc_port; 43 unsigned short svc_port;
@@ -134,8 +119,6 @@ extern int exp_delclient(struct nfsctl_client *ncp);
134extern int exp_export(struct nfsctl_export *nxp); 119extern int exp_export(struct nfsctl_export *nxp);
135extern int exp_unexport(struct nfsctl_export *nxp); 120extern int exp_unexport(struct nfsctl_export *nxp);
136 121
137extern unsigned int nfsd_versbits;
138
139#endif /* __KERNEL__ */ 122#endif /* __KERNEL__ */
140 123
141#endif /* NFSD_SYSCALL_H */ 124#endif /* NFSD_SYSCALL_H */
diff --git a/include/linux/nodemask.h b/include/linux/nodemask.h
index 1a9ef3e627d1..5dce5c21822c 100644
--- a/include/linux/nodemask.h
+++ b/include/linux/nodemask.h
@@ -352,6 +352,7 @@ extern nodemask_t node_possible_map;
352#define node_possible(node) node_isset((node), node_possible_map) 352#define node_possible(node) node_isset((node), node_possible_map)
353#define first_online_node first_node(node_online_map) 353#define first_online_node first_node(node_online_map)
354#define next_online_node(nid) next_node((nid), node_online_map) 354#define next_online_node(nid) next_node((nid), node_online_map)
355int highest_possible_node_id(void);
355#else 356#else
356#define num_online_nodes() 1 357#define num_online_nodes() 1
357#define num_possible_nodes() 1 358#define num_possible_nodes() 1
@@ -359,6 +360,7 @@ extern nodemask_t node_possible_map;
359#define node_possible(node) ((node) == 0) 360#define node_possible(node) ((node) == 0)
360#define first_online_node 0 361#define first_online_node 0
361#define next_online_node(nid) (MAX_NUMNODES) 362#define next_online_node(nid) (MAX_NUMNODES)
363#define highest_possible_node_id() 0
362#endif 364#endif
363 365
364#define any_online_node(mask) \ 366#define any_online_node(mask) \
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h
new file mode 100644
index 000000000000..f6baecdeecd6
--- /dev/null
+++ b/include/linux/nsproxy.h
@@ -0,0 +1,52 @@
1#ifndef _LINUX_NSPROXY_H
2#define _LINUX_NSPROXY_H
3
4#include <linux/spinlock.h>
5#include <linux/sched.h>
6
7struct namespace;
8struct uts_namespace;
9struct ipc_namespace;
10
11/*
12 * A structure to contain pointers to all per-process
13 * namespaces - fs (mount), uts, network, sysvipc, etc.
14 *
15 * 'count' is the number of tasks holding a reference.
16 * The count for each namespace, then, will be the number
17 * of nsproxies pointing to it, not the number of tasks.
18 *
19 * The nsproxy is shared by tasks which share all namespaces.
20 * As soon as a single namespace is cloned or unshared, the
21 * nsproxy is copied.
22 */
23struct nsproxy {
24 atomic_t count;
25 spinlock_t nslock;
26 struct uts_namespace *uts_ns;
27 struct ipc_namespace *ipc_ns;
28 struct namespace *namespace;
29};
30extern struct nsproxy init_nsproxy;
31
32struct nsproxy *dup_namespaces(struct nsproxy *orig);
33int copy_namespaces(int flags, struct task_struct *tsk);
34void get_task_namespaces(struct task_struct *tsk);
35void free_nsproxy(struct nsproxy *ns);
36
37static inline void put_nsproxy(struct nsproxy *ns)
38{
39 if (atomic_dec_and_test(&ns->count)) {
40 free_nsproxy(ns);
41 }
42}
43
44static inline void exit_task_namespaces(struct task_struct *p)
45{
46 struct nsproxy *ns = p->nsproxy;
47 if (ns) {
48 put_nsproxy(ns);
49 p->nsproxy = NULL;
50 }
51}
52#endif
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 5c3a4176eb64..4431ce4e1e6f 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -787,12 +787,13 @@ enum pci_fixup_pass {
787void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 787void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
788 788
789extern int pci_pci_problems; 789extern int pci_pci_problems;
790#define PCIPCI_FAIL 1 790#define PCIPCI_FAIL 1 /* No PCI PCI DMA */
791#define PCIPCI_TRITON 2 791#define PCIPCI_TRITON 2
792#define PCIPCI_NATOMA 4 792#define PCIPCI_NATOMA 4
793#define PCIPCI_VIAETBF 8 793#define PCIPCI_VIAETBF 8
794#define PCIPCI_VSFX 16 794#define PCIPCI_VSFX 16
795#define PCIPCI_ALIMAGIK 32 795#define PCIPCI_ALIMAGIK 32 /* Need low latency setting */
796#define PCIAGP_FAIL 64 /* No PCI to AGP DMA */
796 797
797#endif /* __KERNEL__ */ 798#endif /* __KERNEL__ */
798#endif /* LINUX_PCI_H */ 799#endif /* LINUX_PCI_H */
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 93da7e2d9f30..17b9e04d3586 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -68,6 +68,8 @@ extern struct task_struct *FASTCALL(pid_task(struct pid *pid, enum pid_type));
68extern struct task_struct *FASTCALL(get_pid_task(struct pid *pid, 68extern struct task_struct *FASTCALL(get_pid_task(struct pid *pid,
69 enum pid_type)); 69 enum pid_type));
70 70
71extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
72
71/* 73/*
72 * attach_pid() and detach_pid() must be called with the tasklist_lock 74 * attach_pid() and detach_pid() must be called with the tasklist_lock
73 * write-held. 75 * write-held.
@@ -89,33 +91,42 @@ extern struct pid *FASTCALL(find_pid(int nr));
89 * Lookup a PID in the hash table, and return with it's count elevated. 91 * Lookup a PID in the hash table, and return with it's count elevated.
90 */ 92 */
91extern struct pid *find_get_pid(int nr); 93extern struct pid *find_get_pid(int nr);
94extern struct pid *find_ge_pid(int nr);
92 95
93extern struct pid *alloc_pid(void); 96extern struct pid *alloc_pid(void);
94extern void FASTCALL(free_pid(struct pid *pid)); 97extern void FASTCALL(free_pid(struct pid *pid));
95 98
96#define pid_next(task, type) \ 99static inline pid_t pid_nr(struct pid *pid)
97 ((task)->pids[(type)].node.next) 100{
101 pid_t nr = 0;
102 if (pid)
103 nr = pid->nr;
104 return nr;
105}
106
98 107
99#define pid_next_task(task, type) \ 108#define do_each_task_pid(who, type, task) \
100 hlist_entry(pid_next(task, type), struct task_struct, \ 109 do { \
101 pids[(type)].node) 110 struct hlist_node *pos___; \
111 struct pid *pid___ = find_pid(who); \
112 if (pid___ != NULL) \
113 hlist_for_each_entry_rcu((task), pos___, \
114 &pid___->tasks[type], pids[type].node) {
102 115
116#define while_each_task_pid(who, type, task) \
117 } \
118 } while (0)
103 119
104/* We could use hlist_for_each_entry_rcu here but it takes more arguments 120
105 * than the do_each_task_pid/while_each_task_pid. So we roll our own 121#define do_each_pid_task(pid, type, task) \
106 * to preserve the existing interface. 122 do { \
107 */ 123 struct hlist_node *pos___; \
108#define do_each_task_pid(who, type, task) \ 124 if (pid != NULL) \
109 if ((task = find_task_by_pid_type(type, who))) { \ 125 hlist_for_each_entry_rcu((task), pos___, \
110 prefetch(pid_next(task, type)); \ 126 &pid->tasks[type], pids[type].node) {
111 do { 127
112 128#define while_each_pid_task(pid, type, task) \
113#define while_each_task_pid(who, type, task) \ 129 } \
114 } while (pid_next(task, type) && ({ \ 130 } while (0)
115 task = pid_next_task(task, type); \
116 rcu_dereference(task); \
117 prefetch(pid_next(task, type)); \
118 1; }) ); \
119 }
120 131
121#endif /* _LINUX_PID_H */ 132#endif /* _LINUX_PID_H */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 57f70bc8b24b..87dec8fe6de9 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -244,13 +244,15 @@ static inline void kclist_add(struct kcore_list *new, void *addr, size_t size)
244extern void kclist_add(struct kcore_list *, void *, size_t); 244extern void kclist_add(struct kcore_list *, void *, size_t);
245#endif 245#endif
246 246
247union proc_op {
248 int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
249 int (*proc_read)(struct task_struct *task, char *page);
250};
251
247struct proc_inode { 252struct proc_inode {
248 struct pid *pid; 253 struct pid *pid;
249 int fd; 254 int fd;
250 union { 255 union proc_op op;
251 int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
252 int (*proc_read)(struct task_struct *task, char *page);
253 } op;
254 struct proc_dir_entry *pde; 256 struct proc_dir_entry *pde;
255 struct inode vfs_inode; 257 struct inode vfs_inode;
256}; 258};
diff --git a/include/linux/pspace.h b/include/linux/pspace.h
new file mode 100644
index 000000000000..91d48b8b2d99
--- /dev/null
+++ b/include/linux/pspace.h
@@ -0,0 +1,23 @@
1#ifndef _LINUX_PSPACE_H
2#define _LINUX_PSPACE_H
3
4#include <linux/sched.h>
5#include <linux/mm.h>
6#include <linux/threads.h>
7#include <linux/pid.h>
8
9struct pidmap {
10 atomic_t nr_free;
11 void *page;
12};
13
14#define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8)
15
16struct pspace {
17 struct pidmap pidmap[PIDMAP_ENTRIES];
18 int last_pid;
19};
20
21extern struct pspace init_pspace;
22
23#endif /* _LINUX_PSPACE_H */
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index 9c63abffd7b2..7bc6bfb86253 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -2073,6 +2073,10 @@ void reiserfs_init_alloc_options(struct super_block *s);
2073 */ 2073 */
2074__le32 reiserfs_choose_packing(struct inode *dir); 2074__le32 reiserfs_choose_packing(struct inode *dir);
2075 2075
2076int reiserfs_init_bitmap_cache(struct super_block *sb);
2077void reiserfs_free_bitmap_cache(struct super_block *sb);
2078void reiserfs_cache_bitmap_metadata(struct super_block *sb, struct buffer_head *bh, struct reiserfs_bitmap_info *info);
2079struct buffer_head *reiserfs_read_bitmap_block(struct super_block *sb, unsigned int bitmap);
2076int is_reusable(struct super_block *s, b_blocknr_t block, int bit_value); 2080int is_reusable(struct super_block *s, b_blocknr_t block, int bit_value);
2077void reiserfs_free_block(struct reiserfs_transaction_handle *th, struct inode *, 2081void reiserfs_free_block(struct reiserfs_transaction_handle *th, struct inode *,
2078 b_blocknr_t, int for_unformatted); 2082 b_blocknr_t, int for_unformatted);
diff --git a/include/linux/reiserfs_fs_sb.h b/include/linux/reiserfs_fs_sb.h
index 31b4c0bd4fa0..73e0becec086 100644
--- a/include/linux/reiserfs_fs_sb.h
+++ b/include/linux/reiserfs_fs_sb.h
@@ -267,7 +267,6 @@ struct reiserfs_bitmap_info {
267 // FIXME: Won't work with block sizes > 8K 267 // FIXME: Won't work with block sizes > 8K
268 __u16 first_zero_hint; 268 __u16 first_zero_hint;
269 __u16 free_count; 269 __u16 free_count;
270 struct buffer_head *bh; /* the actual bitmap */
271}; 270};
272 271
273struct proc_dir_entry; 272struct proc_dir_entry;
@@ -414,6 +413,7 @@ struct reiserfs_sb_info {
414/* Definitions of reiserfs on-disk properties: */ 413/* Definitions of reiserfs on-disk properties: */
415#define REISERFS_3_5 0 414#define REISERFS_3_5 0
416#define REISERFS_3_6 1 415#define REISERFS_3_6 1
416#define REISERFS_OLD_FORMAT 2
417 417
418enum reiserfs_mount_options { 418enum reiserfs_mount_options {
419/* Mount options */ 419/* Mount options */
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index 5371e4e74595..b89f09357054 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -141,7 +141,7 @@ struct rtc_device
141 int id; 141 int id;
142 char name[RTC_DEVICE_NAME_SIZE]; 142 char name[RTC_DEVICE_NAME_SIZE];
143 143
144 struct rtc_class_ops *ops; 144 const struct rtc_class_ops *ops;
145 struct mutex ops_lock; 145 struct mutex ops_lock;
146 146
147 struct class_device *rtc_dev; 147 struct class_device *rtc_dev;
@@ -172,7 +172,7 @@ struct rtc_device
172 172
173extern struct rtc_device *rtc_device_register(const char *name, 173extern struct rtc_device *rtc_device_register(const char *name,
174 struct device *dev, 174 struct device *dev,
175 struct rtc_class_ops *ops, 175 const struct rtc_class_ops *ops,
176 struct module *owner); 176 struct module *owner);
177extern void rtc_device_unregister(struct rtc_device *rdev); 177extern void rtc_device_unregister(struct rtc_device *rdev);
178extern int rtc_interface_register(struct class_interface *intf); 178extern int rtc_interface_register(struct class_interface *intf);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index fc4a9873ec10..38530232d92f 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -24,6 +24,8 @@
24#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */ 24#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
25#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */ 25#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
26#define CLONE_STOPPED 0x02000000 /* Start in stopped state */ 26#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
27#define CLONE_NEWUTS 0x04000000 /* New utsname group? */
28#define CLONE_NEWIPC 0x08000000 /* New ipcs */
27 29
28/* 30/*
29 * Scheduling policies 31 * Scheduling policies
@@ -118,7 +120,6 @@ extern unsigned long avenrun[]; /* Load averages */
118 120
119extern unsigned long total_forks; 121extern unsigned long total_forks;
120extern int nr_threads; 122extern int nr_threads;
121extern int last_pid;
122DECLARE_PER_CPU(unsigned long, process_counts); 123DECLARE_PER_CPU(unsigned long, process_counts);
123extern int nr_processes(void); 124extern int nr_processes(void);
124extern unsigned long nr_running(void); 125extern unsigned long nr_running(void);
@@ -239,7 +240,7 @@ extern signed long schedule_timeout_interruptible(signed long timeout);
239extern signed long schedule_timeout_uninterruptible(signed long timeout); 240extern signed long schedule_timeout_uninterruptible(signed long timeout);
240asmlinkage void schedule(void); 241asmlinkage void schedule(void);
241 242
242struct namespace; 243struct nsproxy;
243 244
244/* Maximum number of active map areas.. This is a random (large) number */ 245/* Maximum number of active map areas.. This is a random (large) number */
245#define DEFAULT_MAX_MAP_COUNT 65536 246#define DEFAULT_MAX_MAP_COUNT 65536
@@ -754,6 +755,7 @@ static inline void prefetch_stack(struct task_struct *t) { }
754struct audit_context; /* See audit.c */ 755struct audit_context; /* See audit.c */
755struct mempolicy; 756struct mempolicy;
756struct pipe_inode_info; 757struct pipe_inode_info;
758struct uts_namespace;
757 759
758enum sleep_type { 760enum sleep_type {
759 SLEEP_NORMAL, 761 SLEEP_NORMAL,
@@ -897,8 +899,8 @@ struct task_struct {
897 struct fs_struct *fs; 899 struct fs_struct *fs;
898/* open file information */ 900/* open file information */
899 struct files_struct *files; 901 struct files_struct *files;
900/* namespace */ 902/* namespaces */
901 struct namespace *namespace; 903 struct nsproxy *nsproxy;
902/* signal handlers */ 904/* signal handlers */
903 struct signal_struct *signal; 905 struct signal_struct *signal;
904 struct sighand_struct *sighand; 906 struct sighand_struct *sighand;
@@ -981,10 +983,10 @@ struct task_struct {
981 wait_queue_t *io_wait; 983 wait_queue_t *io_wait;
982/* i/o counters(bytes read/written, #syscalls */ 984/* i/o counters(bytes read/written, #syscalls */
983 u64 rchar, wchar, syscr, syscw; 985 u64 rchar, wchar, syscr, syscw;
984#if defined(CONFIG_BSD_PROCESS_ACCT) 986#if defined(CONFIG_TASK_XACCT)
985 u64 acct_rss_mem1; /* accumulated rss usage */ 987 u64 acct_rss_mem1; /* accumulated rss usage */
986 u64 acct_vm_mem1; /* accumulated virtual memory usage */ 988 u64 acct_vm_mem1; /* accumulated virtual memory usage */
987 clock_t acct_stimexpd; /* clock_t-converted stime since last update */ 989 cputime_t acct_stimexpd;/* stime since last update */
988#endif 990#endif
989#ifdef CONFIG_NUMA 991#ifdef CONFIG_NUMA
990 struct mempolicy *mempolicy; 992 struct mempolicy *mempolicy;
@@ -1020,6 +1022,26 @@ static inline pid_t process_group(struct task_struct *tsk)
1020 return tsk->signal->pgrp; 1022 return tsk->signal->pgrp;
1021} 1023}
1022 1024
1025static inline struct pid *task_pid(struct task_struct *task)
1026{
1027 return task->pids[PIDTYPE_PID].pid;
1028}
1029
1030static inline struct pid *task_tgid(struct task_struct *task)
1031{
1032 return task->group_leader->pids[PIDTYPE_PID].pid;
1033}
1034
1035static inline struct pid *task_pgrp(struct task_struct *task)
1036{
1037 return task->group_leader->pids[PIDTYPE_PGID].pid;
1038}
1039
1040static inline struct pid *task_session(struct task_struct *task)
1041{
1042 return task->group_leader->pids[PIDTYPE_SID].pid;
1043}
1044
1023/** 1045/**
1024 * pid_alive - check that a task structure is not stale 1046 * pid_alive - check that a task structure is not stale
1025 * @p: Task structure to be checked. 1047 * @p: Task structure to be checked.
@@ -1043,6 +1065,8 @@ static inline int is_init(struct task_struct *tsk)
1043 return tsk->pid == 1; 1065 return tsk->pid == 1;
1044} 1066}
1045 1067
1068extern struct pid *cad_pid;
1069
1046extern void free_task(struct task_struct *tsk); 1070extern void free_task(struct task_struct *tsk);
1047#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) 1071#define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0)
1048 1072
@@ -1247,10 +1271,15 @@ extern int send_sig_info(int, struct siginfo *, struct task_struct *);
1247extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); 1271extern int send_group_sig_info(int, struct siginfo *, struct task_struct *);
1248extern int force_sigsegv(int, struct task_struct *); 1272extern int force_sigsegv(int, struct task_struct *);
1249extern int force_sig_info(int, struct siginfo *, struct task_struct *); 1273extern int force_sig_info(int, struct siginfo *, struct task_struct *);
1274extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
1275extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp);
1276extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
1277extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
1278extern int kill_pgrp(struct pid *pid, int sig, int priv);
1279extern int kill_pid(struct pid *pid, int sig, int priv);
1250extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); 1280extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
1251extern int kill_pg_info(int, struct siginfo *, pid_t); 1281extern int kill_pg_info(int, struct siginfo *, pid_t);
1252extern int kill_proc_info(int, struct siginfo *, pid_t); 1282extern int kill_proc_info(int, struct siginfo *, pid_t);
1253extern int kill_proc_info_as_uid(int, struct siginfo *, pid_t, uid_t, uid_t, u32);
1254extern void do_notify_parent(struct task_struct *, int); 1283extern void do_notify_parent(struct task_struct *, int);
1255extern void force_sig(int, struct task_struct *); 1284extern void force_sig(int, struct task_struct *);
1256extern void force_sig_specific(int, struct task_struct *); 1285extern void force_sig_specific(int, struct task_struct *);
@@ -1265,6 +1294,11 @@ extern int send_group_sigqueue(int, struct sigqueue *, struct task_struct *);
1265extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *); 1294extern int do_sigaction(int, struct k_sigaction *, struct k_sigaction *);
1266extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long); 1295extern int do_sigaltstack(const stack_t __user *, stack_t __user *, unsigned long);
1267 1296
1297static inline int kill_cad_pid(int sig, int priv)
1298{
1299 return kill_pid(cad_pid, sig, priv);
1300}
1301
1268/* These can be the second arg to send_sig_info/send_group_sig_info. */ 1302/* These can be the second arg to send_sig_info/send_group_sig_info. */
1269#define SEND_SIG_NOINFO ((struct siginfo *) 0) 1303#define SEND_SIG_NOINFO ((struct siginfo *) 0)
1270#define SEND_SIG_PRIV ((struct siginfo *) 1) 1304#define SEND_SIG_PRIV ((struct siginfo *) 1)
@@ -1358,6 +1392,17 @@ extern void wait_task_inactive(struct task_struct * p);
1358/* de_thread depends on thread_group_leader not being a pid based check */ 1392/* de_thread depends on thread_group_leader not being a pid based check */
1359#define thread_group_leader(p) (p == p->group_leader) 1393#define thread_group_leader(p) (p == p->group_leader)
1360 1394
1395/* Do to the insanities of de_thread it is possible for a process
1396 * to have the pid of the thread group leader without actually being
1397 * the thread group leader. For iteration through the pids in proc
1398 * all we care about is that we have a task with the appropriate
1399 * pid, we don't actually care if we have the right task.
1400 */
1401static inline int has_group_leader_pid(struct task_struct *p)
1402{
1403 return p->pid == p->tgid;
1404}
1405
1361static inline struct task_struct *next_thread(const struct task_struct *p) 1406static inline struct task_struct *next_thread(const struct task_struct *p)
1362{ 1407{
1363 return list_entry(rcu_dereference(p->thread_group.next), 1408 return list_entry(rcu_dereference(p->thread_group.next),
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 6348e8330897..c9069310b6ac 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -217,5 +217,8 @@ static inline void serio_unpin_driver(struct serio *serio)
217#define SERIO_LKKBD 0x28 217#define SERIO_LKKBD 0x28
218#define SERIO_ELO 0x29 218#define SERIO_ELO 0x29
219#define SERIO_MICROTOUCH 0x30 219#define SERIO_MICROTOUCH 0x30
220#define SERIO_PENMOUNT 0x31
221#define SERIO_TOUCHRIGHT 0x32
222#define SERIO_TOUCHWIN 0x33
220 223
221#endif 224#endif
diff --git a/include/linux/stddef.h b/include/linux/stddef.h
index ea65dfb60cd8..6a40c76bdcf1 100644
--- a/include/linux/stddef.h
+++ b/include/linux/stddef.h
@@ -11,6 +11,12 @@
11#endif 11#endif
12 12
13#ifdef __KERNEL__ 13#ifdef __KERNEL__
14
15enum {
16 false = 0,
17 true = 1
18};
19
14#undef offsetof 20#undef offsetof
15#ifdef __compiler_offsetof 21#ifdef __compiler_offsetof
16#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER) 22#define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
diff --git a/include/linux/string.h b/include/linux/string.h
index e4c755860316..4f69ef9e6eb5 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -99,6 +99,7 @@ extern void * memchr(const void *,int,__kernel_size_t);
99#endif 99#endif
100 100
101extern char *kstrdup(const char *s, gfp_t gfp); 101extern char *kstrdup(const char *s, gfp_t gfp);
102extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
102 103
103#ifdef __cplusplus 104#ifdef __cplusplus
104} 105}
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 73140ee5c638..4ebcdf91f3b3 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -18,6 +18,30 @@
18#include <linux/mm.h> 18#include <linux/mm.h>
19 19
20/* 20/*
21 * This is the RPC server thread function prototype
22 */
23typedef void (*svc_thread_fn)(struct svc_rqst *);
24
25/*
26 *
27 * RPC service thread pool.
28 *
29 * Pool of threads and temporary sockets. Generally there is only
30 * a single one of these per RPC service, but on NUMA machines those
31 * services that can benefit from it (i.e. nfs but not lockd) will
32 * have one pool per NUMA node. This optimisation reduces cross-
33 * node traffic on multi-node NUMA NFS servers.
34 */
35struct svc_pool {
36 unsigned int sp_id; /* pool id; also node id on NUMA */
37 spinlock_t sp_lock; /* protects all fields */
38 struct list_head sp_threads; /* idle server threads */
39 struct list_head sp_sockets; /* pending sockets */
40 unsigned int sp_nrthreads; /* # of threads in pool */
41 struct list_head sp_all_threads; /* all server threads */
42} ____cacheline_aligned_in_smp;
43
44/*
21 * RPC service. 45 * RPC service.
22 * 46 *
23 * An RPC service is a ``daemon,'' possibly multithreaded, which 47 * An RPC service is a ``daemon,'' possibly multithreaded, which
@@ -28,8 +52,6 @@
28 * We currently do not support more than one RPC program per daemon. 52 * We currently do not support more than one RPC program per daemon.
29 */ 53 */
30struct svc_serv { 54struct svc_serv {
31 struct list_head sv_threads; /* idle server threads */
32 struct list_head sv_sockets; /* pending sockets */
33 struct svc_program * sv_program; /* RPC program */ 55 struct svc_program * sv_program; /* RPC program */
34 struct svc_stat * sv_stats; /* RPC statistics */ 56 struct svc_stat * sv_stats; /* RPC statistics */
35 spinlock_t sv_lock; 57 spinlock_t sv_lock;
@@ -40,11 +62,36 @@ struct svc_serv {
40 struct list_head sv_permsocks; /* all permanent sockets */ 62 struct list_head sv_permsocks; /* all permanent sockets */
41 struct list_head sv_tempsocks; /* all temporary sockets */ 63 struct list_head sv_tempsocks; /* all temporary sockets */
42 int sv_tmpcnt; /* count of temporary sockets */ 64 int sv_tmpcnt; /* count of temporary sockets */
65 struct timer_list sv_temptimer; /* timer for aging temporary sockets */
43 66
44 char * sv_name; /* service name */ 67 char * sv_name; /* service name */
68
69 unsigned int sv_nrpools; /* number of thread pools */
70 struct svc_pool * sv_pools; /* array of thread pools */
71
72 void (*sv_shutdown)(struct svc_serv *serv);
73 /* Callback to use when last thread
74 * exits.
75 */
76
77 struct module * sv_module; /* optional module to count when
78 * adding threads */
79 svc_thread_fn sv_function; /* main function for threads */
80 int sv_kill_signal; /* signal to kill threads */
45}; 81};
46 82
47/* 83/*
84 * We use sv_nrthreads as a reference count. svc_destroy() drops
85 * this refcount, so we need to bump it up around operations that
86 * change the number of threads. Horrible, but there it is.
87 * Should be called with the BKL held.
88 */
89static inline void svc_get(struct svc_serv *serv)
90{
91 serv->sv_nrthreads++;
92}
93
94/*
48 * Maximum payload size supported by a kernel RPC server. 95 * Maximum payload size supported by a kernel RPC server.
49 * This is use to determine the max number of pages nfsd is 96 * This is use to determine the max number of pages nfsd is
50 * willing to return in a single READ operation. 97 * willing to return in a single READ operation.
@@ -127,11 +174,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val)
127 */ 174 */
128struct svc_rqst { 175struct svc_rqst {
129 struct list_head rq_list; /* idle list */ 176 struct list_head rq_list; /* idle list */
177 struct list_head rq_all; /* all threads list */
130 struct svc_sock * rq_sock; /* socket */ 178 struct svc_sock * rq_sock; /* socket */
131 struct sockaddr_in rq_addr; /* peer address */ 179 struct sockaddr_in rq_addr; /* peer address */
132 int rq_addrlen; 180 int rq_addrlen;
133 181
134 struct svc_serv * rq_server; /* RPC service definition */ 182 struct svc_serv * rq_server; /* RPC service definition */
183 struct svc_pool * rq_pool; /* thread pool */
135 struct svc_procedure * rq_procinfo; /* procedure info */ 184 struct svc_procedure * rq_procinfo; /* procedure info */
136 struct auth_ops * rq_authop; /* authentication flavour */ 185 struct auth_ops * rq_authop; /* authentication flavour */
137 struct svc_cred rq_cred; /* auth info */ 186 struct svc_cred rq_cred; /* auth info */
@@ -180,6 +229,7 @@ struct svc_rqst {
180 * to prevent encrypting page 229 * to prevent encrypting page
181 * cache pages */ 230 * cache pages */
182 wait_queue_head_t rq_wait; /* synchronization */ 231 wait_queue_head_t rq_wait; /* synchronization */
232 struct task_struct *rq_task; /* service thread */
183}; 233};
184 234
185/* 235/*
@@ -321,20 +371,21 @@ struct svc_procedure {
321}; 371};
322 372
323/* 373/*
324 * This is the RPC server thread function prototype
325 */
326typedef void (*svc_thread_fn)(struct svc_rqst *);
327
328/*
329 * Function prototypes. 374 * Function prototypes.
330 */ 375 */
331struct svc_serv * svc_create(struct svc_program *, unsigned int); 376struct svc_serv * svc_create(struct svc_program *, unsigned int,
377 void (*shutdown)(struct svc_serv*));
332int svc_create_thread(svc_thread_fn, struct svc_serv *); 378int svc_create_thread(svc_thread_fn, struct svc_serv *);
333void svc_exit_thread(struct svc_rqst *); 379void svc_exit_thread(struct svc_rqst *);
380struct svc_serv * svc_create_pooled(struct svc_program *, unsigned int,
381 void (*shutdown)(struct svc_serv*),
382 svc_thread_fn, int sig, struct module *);
383int svc_set_num_threads(struct svc_serv *, struct svc_pool *, int);
334void svc_destroy(struct svc_serv *); 384void svc_destroy(struct svc_serv *);
335int svc_process(struct svc_serv *, struct svc_rqst *); 385int svc_process(struct svc_rqst *);
336int svc_register(struct svc_serv *, int, unsigned short); 386int svc_register(struct svc_serv *, int, unsigned short);
337void svc_wake_up(struct svc_serv *); 387void svc_wake_up(struct svc_serv *);
338void svc_reserve(struct svc_rqst *rqstp, int space); 388void svc_reserve(struct svc_rqst *rqstp, int space);
389struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu);
339 390
340#endif /* SUNRPC_SVC_H */ 391#endif /* SUNRPC_SVC_H */
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index b4acb3d37c3f..4c296152cbfa 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -20,8 +20,9 @@ struct svc_sock {
20 struct socket * sk_sock; /* berkeley socket layer */ 20 struct socket * sk_sock; /* berkeley socket layer */
21 struct sock * sk_sk; /* INET layer */ 21 struct sock * sk_sk; /* INET layer */
22 22
23 struct svc_pool * sk_pool; /* current pool iff queued */
23 struct svc_serv * sk_server; /* service for this socket */ 24 struct svc_serv * sk_server; /* service for this socket */
24 unsigned int sk_inuse; /* use count */ 25 atomic_t sk_inuse; /* use count */
25 unsigned long sk_flags; 26 unsigned long sk_flags;
26#define SK_BUSY 0 /* enqueued/receiving */ 27#define SK_BUSY 0 /* enqueued/receiving */
27#define SK_CONN 1 /* conn pending */ 28#define SK_CONN 1 /* conn pending */
@@ -31,9 +32,12 @@ struct svc_sock {
31#define SK_DEAD 6 /* socket closed */ 32#define SK_DEAD 6 /* socket closed */
32#define SK_CHNGBUF 7 /* need to change snd/rcv buffer sizes */ 33#define SK_CHNGBUF 7 /* need to change snd/rcv buffer sizes */
33#define SK_DEFERRED 8 /* request on sk_deferred */ 34#define SK_DEFERRED 8 /* request on sk_deferred */
35#define SK_OLD 9 /* used for temp socket aging mark+sweep */
36#define SK_DETACHED 10 /* detached from tempsocks list */
34 37
35 int sk_reserved; /* space on outq that is reserved */ 38 atomic_t sk_reserved; /* space on outq that is reserved */
36 39
40 spinlock_t sk_defer_lock; /* protects sk_deferred */
37 struct list_head sk_deferred; /* deferred requests that need to 41 struct list_head sk_deferred; /* deferred requests that need to
38 * be revisted */ 42 * be revisted */
39 struct mutex sk_mutex; /* to serialize sending data */ 43 struct mutex sk_mutex; /* to serialize sending data */
@@ -57,9 +61,14 @@ struct svc_sock {
57 */ 61 */
58int svc_makesock(struct svc_serv *, int, unsigned short); 62int svc_makesock(struct svc_serv *, int, unsigned short);
59void svc_delete_socket(struct svc_sock *); 63void svc_delete_socket(struct svc_sock *);
60int svc_recv(struct svc_serv *, struct svc_rqst *, long); 64int svc_recv(struct svc_rqst *, long);
61int svc_send(struct svc_rqst *); 65int svc_send(struct svc_rqst *);
62void svc_drop(struct svc_rqst *); 66void svc_drop(struct svc_rqst *);
63void svc_sock_update_bufs(struct svc_serv *serv); 67void svc_sock_update_bufs(struct svc_serv *serv);
68int svc_sock_names(char *buf, struct svc_serv *serv, char *toclose);
69int svc_addsock(struct svc_serv *serv,
70 int fd,
71 char *name_return,
72 int *proto);
64 73
65#endif /* SUNRPC_SVCSOCK_H */ 74#endif /* SUNRPC_SVCSOCK_H */
diff --git a/include/linux/synclink.h b/include/linux/synclink.h
index 0577f5284cbc..c8b042667af1 100644
--- a/include/linux/synclink.h
+++ b/include/linux/synclink.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * SyncLink Multiprotocol Serial Adapter Driver 2 * SyncLink Multiprotocol Serial Adapter Driver
3 * 3 *
4 * $Id: synclink.h,v 3.13 2006/05/23 18:25:06 paulkf Exp $ 4 * $Id: synclink.h,v 3.14 2006/07/17 20:15:43 paulkf Exp $
5 * 5 *
6 * Copyright (C) 1998-2000 by Microgate Corporation 6 * Copyright (C) 1998-2000 by Microgate Corporation
7 * 7 *
@@ -124,6 +124,8 @@
124 124
125#define MGSL_MODE_ASYNC 1 125#define MGSL_MODE_ASYNC 1
126#define MGSL_MODE_HDLC 2 126#define MGSL_MODE_HDLC 2
127#define MGSL_MODE_MONOSYNC 3
128#define MGSL_MODE_BISYNC 4
127#define MGSL_MODE_RAW 6 129#define MGSL_MODE_RAW 6
128 130
129#define MGSL_BUS_TYPE_ISA 1 131#define MGSL_BUS_TYPE_ISA 1
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 2d1c3d5c83ac..3efcfc7e9c6c 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -599,4 +599,6 @@ asmlinkage long sys_set_robust_list(struct robust_list_head __user *head,
599 size_t len); 599 size_t len);
600asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache); 600asmlinkage long sys_getcpu(unsigned __user *cpu, unsigned __user *node, struct getcpu_cache __user *cache);
601 601
602int kernel_execve(const char *filename, char *const argv[], char *const envp[]);
603
602#endif 604#endif
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h
index 4812ff60561c..e657e523b9bf 100644
--- a/include/linux/sysrq.h
+++ b/include/linux/sysrq.h
@@ -11,6 +11,8 @@
11 * based upon discusions in irc://irc.openprojects.net/#kernelnewbies 11 * based upon discusions in irc://irc.openprojects.net/#kernelnewbies
12 */ 12 */
13 13
14#ifndef _LINUX_SYSRQ_H
15#define _LINUX_SYSRQ_H
14 16
15struct pt_regs; 17struct pt_regs;
16struct tty_struct; 18struct tty_struct;
@@ -57,3 +59,5 @@ static inline int __reterr(void)
57#define unregister_sysrq_key(ig,nore) __reterr() 59#define unregister_sysrq_key(ig,nore) __reterr()
58 60
59#endif 61#endif
62
63#endif /* _LINUX_SYSRQ_H */
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h
index f1cb6cddd19d..45248806ae9c 100644
--- a/include/linux/taskstats.h
+++ b/include/linux/taskstats.h
@@ -2,6 +2,7 @@
2 * 2 *
3 * Copyright (C) Shailabh Nagar, IBM Corp. 2006 3 * Copyright (C) Shailabh Nagar, IBM Corp. 2006
4 * (C) Balbir Singh, IBM Corp. 2006 4 * (C) Balbir Singh, IBM Corp. 2006
5 * (C) Jay Lan, SGI, 2006
5 * 6 *
6 * This program is free software; you can redistribute it and/or modify it 7 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of version 2.1 of the GNU Lesser General Public License 8 * under the terms of version 2.1 of the GNU Lesser General Public License
@@ -29,16 +30,25 @@
29 * c) add new fields after version comment; maintain 64-bit alignment 30 * c) add new fields after version comment; maintain 64-bit alignment
30 */ 31 */
31 32
32#define TASKSTATS_VERSION 1 33
34#define TASKSTATS_VERSION 2
35#define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN
36 * in linux/sched.h */
33 37
34struct taskstats { 38struct taskstats {
35 39
36 /* Version 1 */ 40 /* The version number of this struct. This field is always set to
41 * TAKSTATS_VERSION, which is defined in <linux/taskstats.h>.
42 * Each time the struct is changed, the value should be incremented.
43 */
37 __u16 version; 44 __u16 version;
38 __u16 padding[3]; /* Userspace should not interpret the padding 45 __u32 ac_exitcode; /* Exit status */
39 * field which can be replaced by useful 46
40 * fields if struct taskstats is extended. 47 /* The accounting flags of a task as defined in <linux/acct.h>
41 */ 48 * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG.
49 */
50 __u8 ac_flag; /* Record flags */
51 __u8 ac_nice; /* task_nice */
42 52
43 /* Delay accounting fields start 53 /* Delay accounting fields start
44 * 54 *
@@ -88,6 +98,48 @@ struct taskstats {
88 __u64 cpu_run_virtual_total; 98 __u64 cpu_run_virtual_total;
89 /* Delay accounting fields end */ 99 /* Delay accounting fields end */
90 /* version 1 ends here */ 100 /* version 1 ends here */
101
102 /* Basic Accounting Fields start */
103 char ac_comm[TS_COMM_LEN]; /* Command name */
104 __u8 ac_sched; /* Scheduling discipline */
105 __u8 ac_pad[3];
106 __u32 ac_uid; /* User ID */
107 __u32 ac_gid; /* Group ID */
108 __u32 ac_pid; /* Process ID */
109 __u32 ac_ppid; /* Parent process ID */
110 __u32 ac_btime; /* Begin time [sec since 1970] */
111 __u64 ac_etime; /* Elapsed time [usec] */
112 __u64 ac_utime; /* User CPU time [usec] */
113 __u64 ac_stime; /* SYstem CPU time [usec] */
114 __u64 ac_minflt; /* Minor Page Fault Count */
115 __u64 ac_majflt; /* Major Page Fault Count */
116 /* Basic Accounting Fields end */
117
118 /* Extended accounting fields start */
119 /* Accumulated RSS usage in duration of a task, in MBytes-usecs.
120 * The current rss usage is added to this counter every time
121 * a tick is charged to a task's system time. So, at the end we
122 * will have memory usage multiplied by system time. Thus an
123 * average usage per system time unit can be calculated.
124 */
125 __u64 coremem; /* accumulated RSS usage in MB-usec */
126 /* Accumulated virtual memory usage in duration of a task.
127 * Same as acct_rss_mem1 above except that we keep track of VM usage.
128 */
129 __u64 virtmem; /* accumulated VM usage in MB-usec */
130
131 /* High watermark of RSS and virtual memory usage in duration of
132 * a task, in KBytes.
133 */
134 __u64 hiwater_rss; /* High-watermark of RSS usage, in KB */
135 __u64 hiwater_vm; /* High-water VM usage, in KB */
136
137 /* The following four fields are I/O statistics of a task. */
138 __u64 read_char; /* bytes read */
139 __u64 write_char; /* bytes written */
140 __u64 read_syscalls; /* read syscalls */
141 __u64 write_syscalls; /* write syscalls */
142 /* Extended accounting fields end */
91}; 143};
92 144
93 145
diff --git a/include/linux/timex.h b/include/linux/timex.h
index d543d3871e38..049dfe4a11f2 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -69,34 +69,28 @@
69 * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours, 69 * zero to MAXTC, the PLL will converge in 15 minutes to 16 hours,
70 * respectively. 70 * respectively.
71 */ 71 */
72#define SHIFT_KG 6 /* phase factor (shift) */ 72#define SHIFT_PLL 4 /* PLL frequency factor (shift) */
73#define SHIFT_KF 16 /* PLL frequency factor (shift) */ 73#define SHIFT_FLL 2 /* FLL frequency factor (shift) */
74#define SHIFT_KH 2 /* FLL frequency factor (shift) */ 74#define MAXTC 10 /* maximum time constant (shift) */
75#define MAXTC 6 /* maximum time constant (shift) */
76 75
77/* 76/*
78 * The SHIFT_SCALE define establishes the decimal point of the time_phase 77 * The SHIFT_UPDATE define establishes the decimal point of the
79 * variable which serves as an extension to the low-order bits of the 78 * time_offset variable which represents the current offset with
80 * system clock variable. The SHIFT_UPDATE define establishes the decimal 79 * respect to standard time.
81 * point of the time_offset variable which represents the current offset
82 * with respect to standard time. The FINENSEC define represents 1 nsec in
83 * scaled units.
84 * 80 *
85 * SHIFT_USEC defines the scaling (shift) of the time_freq and 81 * SHIFT_USEC defines the scaling (shift) of the time_freq and
86 * time_tolerance variables, which represent the current frequency 82 * time_tolerance variables, which represent the current frequency
87 * offset and maximum frequency tolerance. 83 * offset and maximum frequency tolerance.
88 *
89 * FINENSEC is 1 ns in SHIFT_UPDATE units of the time_phase variable.
90 */ 84 */
91#define SHIFT_SCALE 22 /* phase scale (shift) */ 85#define SHIFT_UPDATE (SHIFT_HZ + 1) /* time offset scale (shift) */
92#define SHIFT_UPDATE (SHIFT_KG + MAXTC) /* time offset scale (shift) */
93#define SHIFT_USEC 16 /* frequency offset scale (shift) */ 86#define SHIFT_USEC 16 /* frequency offset scale (shift) */
94#define FINENSEC (1L << (SHIFT_SCALE - 10)) /* ~1 ns in phase units */ 87#define SHIFT_NSEC 12 /* kernel frequency offset scale */
95 88
96#define MAXPHASE 512000L /* max phase error (us) */ 89#define MAXPHASE 512000L /* max phase error (us) */
97#define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */ 90#define MAXFREQ (512L << SHIFT_USEC) /* max frequency error (ppm) */
98#define MINSEC 16L /* min interval between updates (s) */ 91#define MAXFREQ_NSEC (512000L << SHIFT_NSEC) /* max frequency error (ppb) */
99#define MAXSEC 1200L /* max interval between updates (s) */ 92#define MINSEC 256 /* min interval between updates (s) */
93#define MAXSEC 2048 /* max interval between updates (s) */
100#define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */ 94#define NTP_PHASE_LIMIT (MAXPHASE << 5) /* beyond max. dispersion */
101 95
102/* 96/*
@@ -204,33 +198,15 @@ extern int tickadj; /* amount of adjustment per tick */
204/* 198/*
205 * phase-lock loop variables 199 * phase-lock loop variables
206 */ 200 */
207extern int time_state; /* clock status */
208extern int time_status; /* clock synchronization status bits */ 201extern int time_status; /* clock synchronization status bits */
209extern long time_offset; /* time adjustment (us) */
210extern long time_constant; /* pll time constant */
211extern long time_tolerance; /* frequency tolerance (ppm) */
212extern long time_precision; /* clock precision (us) */
213extern long time_maxerror; /* maximum error */ 202extern long time_maxerror; /* maximum error */
214extern long time_esterror; /* estimated error */ 203extern long time_esterror; /* estimated error */
215 204
216extern long time_freq; /* frequency offset (scaled ppm) */ 205extern long time_freq; /* frequency offset (scaled ppm) */
217extern long time_reftime; /* time at last adjustment (s) */
218 206
219extern long time_adjust; /* The amount of adjtime left */ 207extern long time_adjust; /* The amount of adjtime left */
220extern long time_next_adjust; /* Value for time_adjust at next tick */
221 208
222/** 209extern void ntp_clear(void);
223 * ntp_clear - Clears the NTP state variables
224 *
225 * Must be called while holding a write on the xtime_lock
226 */
227static inline void ntp_clear(void)
228{
229 time_adjust = 0; /* stop active adjtime() */
230 time_status |= STA_UNSYNC;
231 time_maxerror = NTP_PHASE_LIMIT;
232 time_esterror = NTP_PHASE_LIMIT;
233}
234 210
235/** 211/**
236 * ntp_synced - Returns 1 if the NTP status is not UNSYNC 212 * ntp_synced - Returns 1 if the NTP status is not UNSYNC
@@ -294,11 +270,15 @@ extern void register_time_interpolator(struct time_interpolator *);
294extern void unregister_time_interpolator(struct time_interpolator *); 270extern void unregister_time_interpolator(struct time_interpolator *);
295extern void time_interpolator_reset(void); 271extern void time_interpolator_reset(void);
296extern unsigned long time_interpolator_get_offset(void); 272extern unsigned long time_interpolator_get_offset(void);
273extern void time_interpolator_update(long delta_nsec);
297 274
298#else /* !CONFIG_TIME_INTERPOLATION */ 275#else /* !CONFIG_TIME_INTERPOLATION */
299 276
300static inline void 277static inline void time_interpolator_reset(void)
301time_interpolator_reset(void) 278{
279}
280
281static inline void time_interpolator_update(long delta_nsec)
302{ 282{
303} 283}
304 284
@@ -309,6 +289,8 @@ time_interpolator_reset(void)
309/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ 289/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
310extern u64 current_tick_length(void); 290extern u64 current_tick_length(void);
311 291
292extern void second_overflow(void);
293extern void update_ntp_one_tick(void);
312extern int do_adjtimex(struct timex *); 294extern int do_adjtimex(struct timex *);
313 295
314#endif /* KERNEL */ 296#endif /* KERNEL */
diff --git a/include/linux/tsacct_kern.h b/include/linux/tsacct_kern.h
new file mode 100644
index 000000000000..7e50ac795b0b
--- /dev/null
+++ b/include/linux/tsacct_kern.h
@@ -0,0 +1,34 @@
1/*
2 * tsacct_kern.h - kernel header for system accounting over taskstats interface
3 *
4 * Copyright (C) Jay Lan SGI
5 */
6
7#ifndef _LINUX_TSACCT_KERN_H
8#define _LINUX_TSACCT_KERN_H
9
10#include <linux/taskstats.h>
11
12#ifdef CONFIG_TASKSTATS
13extern void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk);
14#else
15static inline void bacct_add_tsk(struct taskstats *stats, struct task_struct *tsk)
16{}
17#endif /* CONFIG_TASKSTATS */
18
19#ifdef CONFIG_TASK_XACCT
20extern void xacct_add_tsk(struct taskstats *stats, struct task_struct *p);
21extern void acct_update_integrals(struct task_struct *tsk);
22extern void acct_clear_integrals(struct task_struct *tsk);
23#else
24static inline void xacct_add_tsk(struct taskstats *stats, struct task_struct *p)
25{}
26static inline void acct_update_integrals(struct task_struct *tsk)
27{}
28static inline void acct_clear_integrals(struct task_struct *tsk)
29{}
30#endif /* CONFIG_TASK_XACCT */
31
32#endif
33
34
diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h
index 58c961c9e170..5c8473bb6882 100644
--- a/include/linux/tty_driver.h
+++ b/include/linux/tty_driver.h
@@ -219,7 +219,8 @@ extern struct list_head tty_drivers;
219 219
220struct tty_driver *alloc_tty_driver(int lines); 220struct tty_driver *alloc_tty_driver(int lines);
221void put_tty_driver(struct tty_driver *driver); 221void put_tty_driver(struct tty_driver *driver);
222void tty_set_operations(struct tty_driver *driver, struct tty_operations *op); 222void tty_set_operations(struct tty_driver *driver,
223 const struct tty_operations *op);
223 224
224/* tty driver magic number */ 225/* tty driver magic number */
225#define TTY_DRIVER_MAGIC 0x5402 226#define TTY_DRIVER_MAGIC 0x5402
diff --git a/include/linux/types.h b/include/linux/types.h
index 3f235660a3cd..406d4ae57631 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -33,6 +33,8 @@ typedef __kernel_clockid_t clockid_t;
33typedef __kernel_mqd_t mqd_t; 33typedef __kernel_mqd_t mqd_t;
34 34
35#ifdef __KERNEL__ 35#ifdef __KERNEL__
36typedef _Bool bool;
37
36typedef __kernel_uid32_t uid_t; 38typedef __kernel_uid32_t uid_t;
37typedef __kernel_gid32_t gid_t; 39typedef __kernel_gid32_t gid_t;
38typedef __kernel_uid16_t uid16_t; 40typedef __kernel_uid16_t uid16_t;
diff --git a/include/linux/uinput.h b/include/linux/uinput.h
index 7168302f9844..1fd61eeed664 100644
--- a/include/linux/uinput.h
+++ b/include/linux/uinput.h
@@ -22,12 +22,18 @@
22 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org> 22 * Author: Aristeu Sergio Rozanski Filho <aris@cathedrallabs.org>
23 * 23 *
24 * Changes/Revisions: 24 * Changes/Revisions:
25 * 0.3 24/05/2006 (Anssi Hannula <anssi.hannulagmail.com>)
26 * - update ff support for the changes in kernel interface
27 * - add UINPUT_VERSION
25 * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>) 28 * 0.2 16/10/2004 (Micah Dowty <micah@navi.cx>)
26 * - added force feedback support 29 * - added force feedback support
27 * - added UI_SET_PHYS 30 * - added UI_SET_PHYS
28 * 0.1 20/06/2002 31 * 0.1 20/06/2002
29 * - first public version 32 * - first public version
30 */ 33 */
34
35#define UINPUT_VERSION 3
36
31#ifdef __KERNEL__ 37#ifdef __KERNEL__
32#define UINPUT_MINOR 223 38#define UINPUT_MINOR 223
33#define UINPUT_NAME "uinput" 39#define UINPUT_NAME "uinput"
@@ -45,7 +51,10 @@ struct uinput_request {
45 51
46 union { 52 union {
47 int effect_id; 53 int effect_id;
48 struct ff_effect* effect; 54 struct {
55 struct ff_effect *effect;
56 struct ff_effect *old;
57 } upload;
49 } u; 58 } u;
50}; 59};
51 60
@@ -58,6 +67,7 @@ struct uinput_device {
58 unsigned char head; 67 unsigned char head;
59 unsigned char tail; 68 unsigned char tail;
60 struct input_event buff[UINPUT_BUFFER_SIZE]; 69 struct input_event buff[UINPUT_BUFFER_SIZE];
70 int ff_effects_max;
61 71
62 struct uinput_request *requests[UINPUT_NUM_REQUESTS]; 72 struct uinput_request *requests[UINPUT_NUM_REQUESTS];
63 wait_queue_head_t requests_waitq; 73 wait_queue_head_t requests_waitq;
@@ -69,6 +79,7 @@ struct uinput_ff_upload {
69 int request_id; 79 int request_id;
70 int retval; 80 int retval;
71 struct ff_effect effect; 81 struct ff_effect effect;
82 struct ff_effect old;
72}; 83};
73 84
74struct uinput_ff_erase { 85struct uinput_ff_erase {
@@ -98,33 +109,33 @@ struct uinput_ff_erase {
98#define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase) 109#define UI_BEGIN_FF_ERASE _IOWR(UINPUT_IOCTL_BASE, 202, struct uinput_ff_erase)
99#define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase) 110#define UI_END_FF_ERASE _IOW(UINPUT_IOCTL_BASE, 203, struct uinput_ff_erase)
100 111
101/* To write a force-feedback-capable driver, the upload_effect 112/*
113 * To write a force-feedback-capable driver, the upload_effect
102 * and erase_effect callbacks in input_dev must be implemented. 114 * and erase_effect callbacks in input_dev must be implemented.
103 * The uinput driver will generate a fake input event when one of 115 * The uinput driver will generate a fake input event when one of
104 * these callbacks are invoked. The userspace code then uses 116 * these callbacks are invoked. The userspace code then uses
105 * ioctls to retrieve additional parameters and send the return code. 117 * ioctls to retrieve additional parameters and send the return code.
106 * The callback blocks until this return code is sent. 118 * The callback blocks until this return code is sent.
107 * 119 *
108 * The described callback mechanism is only used if EV_FF is set. 120 * The described callback mechanism is only used if ff_effects_max
109 * Otherwise, default implementations of upload_effect and erase_effect 121 * is set.
110 * are used.
111 * 122 *
112 * To implement upload_effect(): 123 * To implement upload_effect():
113 * 1. Wait for an event with type==EV_UINPUT and code==UI_FF_UPLOAD. 124 * 1. Wait for an event with type == EV_UINPUT and code == UI_FF_UPLOAD.
114 * A request ID will be given in 'value'. 125 * A request ID will be given in 'value'.
115 * 2. Allocate a uinput_ff_upload struct, fill in request_id with 126 * 2. Allocate a uinput_ff_upload struct, fill in request_id with
116 * the 'value' from the EV_UINPUT event. 127 * the 'value' from the EV_UINPUT event.
117 * 3. Issue a UI_BEGIN_FF_UPLOAD ioctl, giving it the 128 * 3. Issue a UI_BEGIN_FF_UPLOAD ioctl, giving it the
118 * uinput_ff_upload struct. It will be filled in with the 129 * uinput_ff_upload struct. It will be filled in with the
119 * ff_effect passed to upload_effect(). 130 * ff_effects passed to upload_effect().
120 * 4. Perform the effect upload, and place the modified ff_effect 131 * 4. Perform the effect upload, and place a return code back into
121 * and a return code back into the uinput_ff_upload struct. 132 the uinput_ff_upload struct.
122 * 5. Issue a UI_END_FF_UPLOAD ioctl, also giving it the 133 * 5. Issue a UI_END_FF_UPLOAD ioctl, also giving it the
123 * uinput_ff_upload_effect struct. This will complete execution 134 * uinput_ff_upload_effect struct. This will complete execution
124 * of our upload_effect() handler. 135 * of our upload_effect() handler.
125 * 136 *
126 * To implement erase_effect(): 137 * To implement erase_effect():
127 * 1. Wait for an event with type==EV_UINPUT and code==UI_FF_ERASE. 138 * 1. Wait for an event with type == EV_UINPUT and code == UI_FF_ERASE.
128 * A request ID will be given in 'value'. 139 * A request ID will be given in 'value'.
129 * 2. Allocate a uinput_ff_erase struct, fill in request_id with 140 * 2. Allocate a uinput_ff_erase struct, fill in request_id with
130 * the 'value' from the EV_UINPUT event. 141 * the 'value' from the EV_UINPUT event.
@@ -133,13 +144,13 @@ struct uinput_ff_erase {
133 * effect ID passed to erase_effect(). 144 * effect ID passed to erase_effect().
134 * 4. Perform the effect erasure, and place a return code back 145 * 4. Perform the effect erasure, and place a return code back
135 * into the uinput_ff_erase struct. 146 * into the uinput_ff_erase struct.
136 * and a return code back into the uinput_ff_erase struct.
137 * 5. Issue a UI_END_FF_ERASE ioctl, also giving it the 147 * 5. Issue a UI_END_FF_ERASE ioctl, also giving it the
138 * uinput_ff_erase_effect struct. This will complete execution 148 * uinput_ff_erase_effect struct. This will complete execution
139 * of our erase_effect() handler. 149 * of our erase_effect() handler.
140 */ 150 */
141 151
142/* This is the new event type, used only by uinput. 152/*
153 * This is the new event type, used only by uinput.
143 * 'code' is UI_FF_UPLOAD or UI_FF_ERASE, and 'value' 154 * 'code' is UI_FF_UPLOAD or UI_FF_ERASE, and 'value'
144 * is the unique request ID. This number was picked 155 * is the unique request ID. This number was picked
145 * arbitrarily, above EV_MAX (since the input system 156 * arbitrarily, above EV_MAX (since the input system
diff --git a/include/linux/unistd.h b/include/linux/unistd.h
index c18c60f3254e..aa8d5b5e2e3e 100644
--- a/include/linux/unistd.h
+++ b/include/linux/unistd.h
@@ -1,12 +1,8 @@
1#ifndef _LINUX_UNISTD_H_ 1#ifndef _LINUX_UNISTD_H_
2#define _LINUX_UNISTD_H_ 2#define _LINUX_UNISTD_H_
3 3
4#ifdef __KERNEL__
5extern int errno;
6#endif
7
8/* 4/*
9 * Include machine specific syscallX macros 5 * Include machine specific syscall numbers
10 */ 6 */
11#include <asm/unistd.h> 7#include <asm/unistd.h>
12 8
diff --git a/include/linux/unwind.h b/include/linux/unwind.h
index ce48e2cd37a2..73e1751d03dd 100644
--- a/include/linux/unwind.h
+++ b/include/linux/unwind.h
@@ -12,8 +12,6 @@
12 * is not much point in implementing the full Dwarf2 unwind API. 12 * is not much point in implementing the full Dwarf2 unwind API.
13 */ 13 */
14 14
15#include <linux/config.h>
16
17struct module; 15struct module;
18 16
19#ifdef CONFIG_STACK_UNWIND 17#ifdef CONFIG_STACK_UNWIND
diff --git a/include/linux/utime.h b/include/linux/utime.h
index c6bf27b7897e..640be6a1959e 100644
--- a/include/linux/utime.h
+++ b/include/linux/utime.h
@@ -1,6 +1,8 @@
1#ifndef _LINUX_UTIME_H 1#ifndef _LINUX_UTIME_H
2#define _LINUX_UTIME_H 2#define _LINUX_UTIME_H
3 3
4#include <linux/types.h>
5
4struct utimbuf { 6struct utimbuf {
5 time_t actime; 7 time_t actime;
6 time_t modtime; 8 time_t modtime;
diff --git a/include/linux/utsname.h b/include/linux/utsname.h
index 13e1da0c538d..02e4b6972064 100644
--- a/include/linux/utsname.h
+++ b/include/linux/utsname.h
@@ -1,6 +1,11 @@
1#ifndef _LINUX_UTSNAME_H 1#ifndef _LINUX_UTSNAME_H
2#define _LINUX_UTSNAME_H 2#define _LINUX_UTSNAME_H
3 3
4#include <linux/sched.h>
5#include <linux/kref.h>
6#include <linux/nsproxy.h>
7#include <asm/atomic.h>
8
4#define __OLD_UTS_LEN 8 9#define __OLD_UTS_LEN 8
5 10
6struct oldold_utsname { 11struct oldold_utsname {
@@ -30,7 +35,55 @@ struct new_utsname {
30 char domainname[65]; 35 char domainname[65];
31}; 36};
32 37
33extern struct new_utsname system_utsname; 38struct uts_namespace {
39 struct kref kref;
40 struct new_utsname name;
41};
42extern struct uts_namespace init_uts_ns;
43
44static inline void get_uts_ns(struct uts_namespace *ns)
45{
46 kref_get(&ns->kref);
47}
48
49#ifdef CONFIG_UTS_NS
50extern int unshare_utsname(unsigned long unshare_flags,
51 struct uts_namespace **new_uts);
52extern int copy_utsname(int flags, struct task_struct *tsk);
53extern void free_uts_ns(struct kref *kref);
54
55static inline void put_uts_ns(struct uts_namespace *ns)
56{
57 kref_put(&ns->kref, free_uts_ns);
58}
59#else
60static inline int unshare_utsname(unsigned long unshare_flags,
61 struct uts_namespace **new_uts)
62{
63 if (unshare_flags & CLONE_NEWUTS)
64 return -EINVAL;
65
66 return 0;
67}
68
69static inline int copy_utsname(int flags, struct task_struct *tsk)
70{
71 return 0;
72}
73static inline void put_uts_ns(struct uts_namespace *ns)
74{
75}
76#endif
77
78static inline struct new_utsname *utsname(void)
79{
80 return &current->nsproxy->uts_ns->name;
81}
82
83static inline struct new_utsname *init_utsname(void)
84{
85 return &init_uts_ns.name;
86}
34 87
35extern struct rw_semaphore uts_sem; 88extern struct rw_semaphore uts_sem;
36#endif 89#endif
diff --git a/include/linux/vt_kern.h b/include/linux/vt_kern.h
index 1009d3fe1fc2..37a1a41f5b65 100644
--- a/include/linux/vt_kern.h
+++ b/include/linux/vt_kern.h
@@ -84,4 +84,11 @@ void reset_vc(struct vc_data *vc);
84extern char con_buf[CON_BUF_SIZE]; 84extern char con_buf[CON_BUF_SIZE];
85extern struct semaphore con_buf_sem; 85extern struct semaphore con_buf_sem;
86 86
87struct vt_spawn_console {
88 spinlock_t lock;
89 struct pid *pid;
90 int sig;
91};
92extern struct vt_spawn_console vt_spawn_con;
93
87#endif /* _VT_KERN_H */ 94#endif /* _VT_KERN_H */