diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2004-09-30 03:00:38 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-09-30 03:00:38 -0700 |
| commit | 086bdc0608c56c6b1afb76d641111e1df6e99024 (patch) | |
| tree | 3a12daf8729a75a6239bb5473816d3e986ced152 /include/linux | |
| parent | 6e20f10823dcecd65019dc42ef7e63f392abe4ed (diff) | |
| parent | bc633e90bf3ef39b798e2cc417a890a9f72e95cd (diff) | |
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/driver-2.6
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dqblk_xfs.h | 63 | ||||
| -rw-r--r-- | include/linux/ipv6.h | 15 | ||||
| -rw-r--r-- | include/linux/pci_ids.h | 1 | ||||
| -rw-r--r-- | include/linux/pm.h | 11 | ||||
| -rw-r--r-- | include/linux/proc_fs.h | 1 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 2 | ||||
| -rw-r--r-- | include/linux/suspend.h | 20 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 3 | ||||
| -rw-r--r-- | include/linux/tcp.h | 10 | ||||
| -rw-r--r-- | include/linux/time.h | 12 | ||||
| -rw-r--r-- | include/linux/tty.h | 39 | ||||
| -rw-r--r-- | include/linux/tty_ldisc.h | 10 | ||||
| -rw-r--r-- | include/linux/wait.h | 23 |
13 files changed, 132 insertions, 78 deletions
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h index 330f23e0c6d1..bf2d65765189 100644 --- a/include/linux/dqblk_xfs.h +++ b/include/linux/dqblk_xfs.h @@ -1,34 +1,22 @@ /* - * Copyright (c) 1995-2001 Silicon Graphics, Inc. All Rights Reserved. + * Copyright (c) 1995-2001,2004 Silicon Graphics, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2.1 of the GNU Lesser General Public License * as published by the Free Software Foundation. * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA * - * You should have received a copy of the GNU Lesser General Public - * License along with this program; if not, write the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, - * USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ + * Contact information: Silicon Graphics, Inc., 1500 Crittenden Lane, + * Mountain View, CA 94043, USA, or: http://www.sgi.com */ #ifndef _LINUX_DQBLK_XFS_H #define _LINUX_DQBLK_XFS_H @@ -40,12 +28,12 @@ */ #define XQM_CMD(x) (('X'<<8)+(x)) /* note: forms first QCMD argument */ -#define Q_XQUOTAON XQM_CMD(0x1) /* enable accounting/enforcement */ -#define Q_XQUOTAOFF XQM_CMD(0x2) /* disable accounting/enforcement */ -#define Q_XGETQUOTA XQM_CMD(0x3) /* get disk limits and usage */ -#define Q_XSETQLIM XQM_CMD(0x4) /* set disk limits */ -#define Q_XGETQSTAT XQM_CMD(0x5) /* get quota subsystem status */ -#define Q_XQUOTARM XQM_CMD(0x6) /* free disk space used by dquots */ +#define Q_XQUOTAON XQM_CMD(1) /* enable accounting/enforcement */ +#define Q_XQUOTAOFF XQM_CMD(2) /* disable accounting/enforcement */ +#define Q_XGETQUOTA XQM_CMD(3) /* get disk limits and usage */ +#define Q_XSETQLIM XQM_CMD(4) /* set disk limits */ +#define Q_XGETQSTAT XQM_CMD(5) /* get quota subsystem status */ +#define Q_XQUOTARM XQM_CMD(6) /* free disk space used by dquots */ /* * fs_disk_quota structure: @@ -105,15 +93,30 @@ typedef struct fs_disk_quota { #define FS_DQ_TIMER_MASK (FS_DQ_BTIMER | FS_DQ_ITIMER | FS_DQ_RTBTIMER) /* + * Warning counts are set in both super user's dquot and others. For others, + * warnings are set/cleared by the administrators (or automatically by going + * below the soft limit). Superusers warning values set the warning limits + * for the rest. In case these values are zero, the DQ_{F,B}WARNLIMIT values + * defined below are used. + * These values also apply only to the d_fieldmask field for Q_XSETQLIM. + */ +#define FS_DQ_BWARNS (1<<9) +#define FS_DQ_IWARNS (1<<10) +#define FS_DQ_RTBWARNS (1<<11) +#define FS_DQ_WARNS_MASK (FS_DQ_BWARNS | FS_DQ_IWARNS | FS_DQ_RTBWARNS) + +/* * Various flags related to quotactl(2). Only relevant to XFS filesystems. */ #define XFS_QUOTA_UDQ_ACCT (1<<0) /* user quota accounting */ #define XFS_QUOTA_UDQ_ENFD (1<<1) /* user quota limits enforcement */ #define XFS_QUOTA_GDQ_ACCT (1<<2) /* group quota accounting */ #define XFS_QUOTA_GDQ_ENFD (1<<3) /* group quota limits enforcement */ +#define XFS_QUOTA_PDQ_ACCT (1<<4) /* project quota accounting */ +#define XFS_QUOTA_PDQ_ENFD (1<<5) /* project quota limits enforcement */ #define XFS_USER_QUOTA (1<<0) /* user quota type */ -#define XFS_PROJ_QUOTA (1<<1) /* (IRIX) project quota type */ +#define XFS_PROJ_QUOTA (1<<1) /* project quota type */ #define XFS_GROUP_QUOTA (1<<2) /* group quota type */ /* diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 55aba976aba6..d7d1673880d5 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -182,8 +182,7 @@ enum { as offsets from skb->nh. */ -struct inet6_skb_parm -{ +struct inet6_skb_parm { int iif; __u16 ra; __u16 hop; @@ -194,6 +193,14 @@ struct inet6_skb_parm #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) +/** + * struct ipv6_pinfo - ipv6 private area + * + * In the struct sock hierarchy (tcp6_sock, upd6_sock, etc) + * this _must_ be the last member, so that inet6_sk_generic + * is able to calculate its offset from the base struct sock + * by using the struct proto->slab_obj_size member. -acme + */ struct ipv6_pinfo { struct in6_addr saddr; struct in6_addr rcv_saddr; @@ -282,10 +289,6 @@ static inline struct raw6_opt * raw6_sk(const struct sock *__sk) return &((struct raw6_sock *)__sk)->raw6; } -struct ipv6_sk_offset { - int offset; -}; - #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) #define __ipv6_only_sock(sk) (inet6_sk(sk)->ipv6only) #define ipv6_only_sock(sk) ((sk)->sk_family == PF_INET6 && __ipv6_only_sock(sk)) diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index bc69e1f29b46..eed506d0196d 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -734,6 +734,7 @@ #define PCI_DEVICE_ID_TI_1251B 0xac1f #define PCI_DEVICE_ID_TI_4410 0xac41 #define PCI_DEVICE_ID_TI_4451 0xac42 +#define PCI_DEVICE_ID_TI_4520 0xac46 #define PCI_DEVICE_ID_TI_1410 0xac50 #define PCI_DEVICE_ID_TI_1420 0xac51 #define PCI_DEVICE_ID_TI_1451A 0xac52 diff --git a/include/linux/pm.h b/include/linux/pm.h index d54bc441daff..7bfd2d43963e 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -194,11 +194,12 @@ extern void (*pm_idle)(void); extern void (*pm_power_off)(void); enum { - PM_SUSPEND_ON, - PM_SUSPEND_STANDBY, - PM_SUSPEND_MEM, - PM_SUSPEND_DISK, - PM_SUSPEND_MAX, + PM_SUSPEND_ON = 0, + PM_SUSPEND_STANDBY = 1, + /* NOTE: PM_SUSPEND_MEM == PCI_D3hot */ + PM_SUSPEND_MEM = 3, + PM_SUSPEND_DISK = 4, + PM_SUSPEND_MAX = 5, }; enum { diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index abcfc4bca268..c83dd15b728c 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -79,6 +79,7 @@ struct kcore_list { extern struct proc_dir_entry proc_root; extern struct proc_dir_entry *proc_root_fs; extern struct proc_dir_entry *proc_net; +extern struct proc_dir_entry *proc_net_stat; extern struct proc_dir_entry *proc_bus; extern struct proc_dir_entry *proc_root_driver; extern struct proc_dir_entry *proc_root_kcore; diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 66a56c3d2436..b6c6ef59ab16 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -250,8 +250,8 @@ struct sk_buff { #ifdef CONFIG_NETFILTER unsigned long nfmark; __u32 nfcache; - struct nf_conntrack *nfct; __u32 nfctinfo; + struct nf_conntrack *nfct; #ifdef CONFIG_NETFILTER_DEBUG unsigned int nf_debug; #endif diff --git a/include/linux/suspend.h b/include/linux/suspend.h index d0955f06c9b4..932dc2ca4152 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -23,16 +23,6 @@ typedef struct pbe { #define SWAP_FILENAME_MAXLENGTH 32 -struct suspend_header { - u32 version_code; - unsigned long num_physpages; - char machine[8]; - char version[20]; - int num_cpus; - int page_size; - suspend_pagedir_t *suspend_pagedir; - unsigned int num_pbes; -}; #define SUSPEND_PD_PAGES(x) (((x)*sizeof(struct pbe))/PAGE_SIZE+1) @@ -45,16 +35,12 @@ extern void drain_local_pages(void); /* kernel/power/swsusp.c */ extern int software_suspend(void); -extern unsigned int nr_copy_pages __nosavedata; -extern suspend_pagedir_t *pagedir_nosave __nosavedata; - #else /* CONFIG_SOFTWARE_SUSPEND */ static inline int software_suspend(void) { printk("Warning: fake suspend called\n"); return -EPERM; } -#define software_resume() do { } while(0) #endif /* CONFIG_SOFTWARE_SUSPEND */ @@ -78,12 +64,6 @@ static inline void disable_nonboot_cpus(void) {} static inline void enable_nonboot_cpus(void) {} #endif -asmlinkage void do_magic(int is_resume); -asmlinkage void do_magic_resume_1(void); -asmlinkage void do_magic_resume_2(void); -asmlinkage void do_magic_suspend_1(void); -asmlinkage void do_magic_suspend_2(void); - void save_processor_state(void); void restore_processor_state(void); struct saved_context; diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index c08b42e2bee4..bd26cf298d9a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -114,6 +114,9 @@ asmlinkage long sys_getitimer(int which, struct itimerval __user *value); asmlinkage long sys_setitimer(int which, struct itimerval __user *value, struct itimerval __user *ovalue); +asmlinkage long sys_timer_create(clockid_t which_clock, + struct sigevent __user *timer_event_spec, + timer_t __user * created_timer_id); asmlinkage long sys_timer_gettime(timer_t timer_id, struct itimerspec __user *setting); asmlinkage long sys_timer_getoverrun(timer_t timer_id); diff --git a/include/linux/tcp.h b/include/linux/tcp.h index c03df4894379..f374df7a823f 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h @@ -205,6 +205,13 @@ typedef struct tcp_pcount { __u32 val; } tcp_pcount_t; +enum tcp_congestion_algo { + TCP_RENO=0, + TCP_VEGAS, + TCP_WESTWOOD, + TCP_BIC, +}; + struct tcp_opt { int tcp_header_len; /* Bytes of tcp header to send */ @@ -265,7 +272,7 @@ struct tcp_opt { __u8 frto_counter; /* Number of new acks after RTO */ __u32 frto_highmark; /* snd_nxt when RTO occurred */ - __u8 unused_pad; + __u8 adv_cong; /* Using Vegas, Westwood, or BIC */ __u8 defer_accept; /* User waits for some data after accept() */ /* one byte hole, try to pack */ @@ -412,7 +419,6 @@ struct tcp_opt { __u32 beg_snd_nxt; /* right edge during last RTT */ __u32 beg_snd_una; /* left edge during last RTT */ __u32 beg_snd_cwnd; /* saves the size of the cwnd */ - __u8 do_vegas; /* do vegas for this connection */ __u8 doing_vegas_now;/* if true, do vegas for this RTT */ __u16 cntRTT; /* # of RTTs measured within last RTT */ __u32 minRTT; /* min of RTTs measured within last RTT (in usec) */ diff --git a/include/linux/time.h b/include/linux/time.h index de41e12bbbff..8bccdf73a97f 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -194,6 +194,18 @@ static inline unsigned int jiffies_to_msecs(const unsigned long j) return (j * 1000) / HZ; #endif } + +static inline unsigned int jiffies_to_usecs(const unsigned long j) +{ +#if HZ <= 1000 && !(1000 % HZ) + return (1000000 / HZ) * j; +#elif HZ > 1000 && !(HZ % 1000) + return (j*1000 + (HZ - 1000))/(HZ / 1000); +#else + return (j * 1000000) / HZ; +#endif +} + static inline unsigned long msecs_to_jiffies(const unsigned int m) { #if HZ <= 1000 && !(1000 % HZ) diff --git a/include/linux/tty.h b/include/linux/tty.h index 7481d70fbf41..24b4a7383b53 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -306,26 +306,27 @@ struct tty_struct { * tty->write. Thus, you must use the inline functions set_bit() and * clear_bit() to make things atomic. */ -#define TTY_THROTTLED 0 -#define TTY_IO_ERROR 1 -#define TTY_OTHER_CLOSED 2 -#define TTY_EXCLUSIVE 3 -#define TTY_DEBUG 4 -#define TTY_DO_WRITE_WAKEUP 5 -#define TTY_PUSH 6 -#define TTY_CLOSING 7 -#define TTY_DONT_FLIP 8 -#define TTY_HW_COOK_OUT 14 -#define TTY_HW_COOK_IN 15 -#define TTY_PTY_LOCK 16 -#define TTY_NO_WRITE_SPLIT 17 +#define TTY_THROTTLED 0 /* Call unthrottle() at threshold min */ +#define TTY_IO_ERROR 1 /* Canse an I/O error (may be no ldisc too) */ +#define TTY_OTHER_CLOSED 2 /* Other side (if any) has closed */ +#define TTY_EXCLUSIVE 3 /* Exclusive open mode */ +#define TTY_DEBUG 4 /* Debugging */ +#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ +#define TTY_PUSH 6 /* n_tty private */ +#define TTY_CLOSING 7 /* ->close() in progress */ +#define TTY_DONT_FLIP 8 /* Defer buffer flip */ +#define TTY_LDISC 9 /* Line discipline attached */ +#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ +#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ +#define TTY_PTY_LOCK 16 /* pty private */ +#define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ +#define TTY_HUPPED 18 /* Post driver->hangup() */ #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) extern void tty_write_flush(struct tty_struct *); extern struct termios tty_std_termios; -extern struct tty_ldisc ldiscs[]; extern int fg_console, last_console, want_console; extern int kmsg_redirect; @@ -362,6 +363,16 @@ extern void tty_flip_buffer_push(struct tty_struct *tty); extern int tty_get_baud_rate(struct tty_struct *tty); extern int tty_termios_baud_rate(struct termios *termios); +extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); +extern void tty_ldisc_deref(struct tty_ldisc *); +extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *); + +extern struct tty_ldisc *tty_ldisc_get(int); +extern void tty_ldisc_put(int); + +extern void tty_wakeup(struct tty_struct *tty); +extern void tty_ldisc_flush(struct tty_struct *tty); + struct semaphore; extern struct semaphore tty_sem; diff --git a/include/linux/tty_ldisc.h b/include/linux/tty_ldisc.h index cb7ca58e44e8..deacf01e50e8 100644 --- a/include/linux/tty_ldisc.h +++ b/include/linux/tty_ldisc.h @@ -95,6 +95,13 @@ * that line discpline should try to send more characters to the * low-level driver for transmission. If the line discpline does * not have any more data to send, it can just return. + * + * int (*hangup)(struct tty_struct *) + * + * Called on a hangup. Tells the discipline that it should + * cease I/O to the tty driver. Can sleep. The driver should + * seek to perform this action quickly but should wait until + * any pending driver I/O is completed. */ #include <linux/fs.h> @@ -122,6 +129,7 @@ struct tty_ldisc { void (*set_termios)(struct tty_struct *tty, struct termios * old); unsigned int (*poll)(struct tty_struct *, struct file *, struct poll_table_struct *); + int (*hangup)(struct tty_struct *tty); /* * The following routines are called from below. @@ -132,6 +140,8 @@ struct tty_ldisc { void (*write_wakeup)(struct tty_struct *); struct module *owner; + + int refcount; }; #define TTY_LDISC_MAGIC 0x5403 diff --git a/include/linux/wait.h b/include/linux/wait.h index 4417f800a639..21cd4df67b24 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -156,6 +156,29 @@ do { \ __wait_event(wq, condition); \ } while (0) +#define __wait_event_timeout(wq, condition, ret) \ +do { \ + DEFINE_WAIT(__wait); \ + \ + for (;;) { \ + prepare_to_wait(&wq, &__wait, TASK_UNINTERRUPTIBLE); \ + if (condition) \ + break; \ + ret = schedule_timeout(ret); \ + if (!ret) \ + break; \ + } \ + finish_wait(&wq, &__wait); \ +} while (0) + +#define wait_event_timeout(wq, condition, timeout) \ +({ \ + long __ret = timeout; \ + if (!(condition)) \ + __wait_event_timeout(wq, condition, __ret); \ + __ret; \ +}) + #define __wait_event_interruptible(wq, condition, ret) \ do { \ DEFINE_WAIT(__wait); \ |
