diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-04 21:11:08 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-10-04 21:11:08 -0700 |
| commit | da3103c8efd7570939617bfa1f06fcdab9a9a11d (patch) | |
| tree | f0e07dbc22384372c17d6b836f3a794fef62eed8 /include/linux | |
| parent | 799cc173710f8bac2e3d234445dbcf59483a872f (diff) | |
| parent | 11d3c5ea4e4b16afcbe5f0966ed44b8b8f5ce5e5 (diff) | |
Merge bk://kernel.bkbits.net/davem/net-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/compat.h | 7 | ||||
| -rw-r--r-- | include/linux/eisa.h | 16 | ||||
| -rw-r--r-- | include/linux/ext3_fs_i.h | 2 | ||||
| -rw-r--r-- | include/linux/list.h | 2 | ||||
| -rw-r--r-- | include/linux/mm.h | 1 | ||||
| -rw-r--r-- | include/linux/mman.h | 9 | ||||
| -rw-r--r-- | include/linux/mmzone.h | 28 | ||||
| -rw-r--r-- | include/linux/numa.h | 16 | ||||
| -rw-r--r-- | include/linux/sched.h | 32 | ||||
| -rw-r--r-- | include/linux/skbuff.h | 2 |
10 files changed, 84 insertions, 31 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index b338ca16f5af..3e8e53bdd42e 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -90,5 +90,12 @@ struct compat_statfs64 { __u32 f_spare[5]; }; +struct compat_dirent { + u32 d_ino; + compat_off_t d_off; + u16 d_reclen; + char d_name[256]; +}; + #endif /* CONFIG_COMPAT */ #endif /* _LINUX_COMPAT_H */ diff --git a/include/linux/eisa.h b/include/linux/eisa.h index dc76d57b10d0..4079242dced8 100644 --- a/include/linux/eisa.h +++ b/include/linux/eisa.h @@ -4,16 +4,6 @@ #include <linux/ioport.h> #include <linux/device.h> -#ifdef CONFIG_EISA -# ifdef CONFIG_EISA_ALWAYS -# define EISA_bus 1 -# else - extern int EISA_bus; -# endif -#else -# define EISA_bus 0 -#endif - #define EISA_SIG_LEN 8 #define EISA_MAX_SLOTS 8 @@ -108,4 +98,10 @@ struct eisa_root_device { int eisa_root_register (struct eisa_root_device *root); +#ifdef CONFIG_EISA +extern int EISA_bus; +#else +# define EISA_bus 0 +#endif + #endif diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index 1181cfae7142..7451cdcfb9da 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h @@ -106,7 +106,7 @@ struct ext3_inode_info { * during recovery. Hence we must fix the get_block-vs-truncate race * by other means, so we have truncate_sem. */ - struct rw_semaphore truncate_sem; + struct semaphore truncate_sem; struct inode vfs_inode; }; diff --git a/include/linux/list.h b/include/linux/list.h index 9e218f0e471c..5fdf945bbf93 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -449,7 +449,7 @@ static __inline__ void hlist_del(struct hlist_node *n) /** * hlist_del_rcu - deletes entry from hash list without re-initialization - * @entry: the element to delete from the hash list. + * @n: the element to delete from the hash list. * * Note: list_unhashed() on entry does not return true after this, * the entry is in an undefined state. It is useful for RCU based diff --git a/include/linux/mm.h b/include/linux/mm.h index ca006021a13e..f72772e17665 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -323,7 +323,6 @@ static inline void put_page(struct page *page) * The zone field is never updated after free_area_init_core() * sets it, so none of the operations on it need to be atomic. */ -#define NODE_SHIFT 4 #define ZONE_SHIFT (BITS_PER_LONG - 8) struct zone; diff --git a/include/linux/mman.h b/include/linux/mman.h index cfb6ac61bbde..07da84fcbd15 100644 --- a/include/linux/mman.h +++ b/include/linux/mman.h @@ -28,8 +28,13 @@ static inline void vm_unacct_memory(long pages) vm_acct_memory(-pages); } -/* Optimisation macro. */ -#define _calc_vm_trans(x,bit1,bit2) \ +/* + * Optimisation macro. It is equivalent to: + * (x & bit1) ? bit2 : 0 + * but this version is faster. + * ("bit1" and "bit2" must be single bits) + */ +#define _calc_vm_trans(x, bit1, bit2) \ ((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \ : ((x) & (bit1)) / ((bit1) / (bit2))) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index c66551a52d2a..bea51c4f5b22 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -10,13 +10,8 @@ #include <linux/wait.h> #include <linux/cache.h> #include <linux/threads.h> +#include <linux/numa.h> #include <asm/atomic.h> -#ifdef CONFIG_DISCONTIGMEM -#include <asm/numnodes.h> -#endif -#ifndef MAX_NUMNODES -#define MAX_NUMNODES 1 -#endif /* Free memory management - zoned buddy allocator. */ #ifndef CONFIG_FORCE_MAX_ZONEORDER @@ -303,19 +298,34 @@ extern void setup_per_zone_pages_min(void); #define numa_node_id() (cpu_to_node(smp_processor_id())) #ifndef CONFIG_DISCONTIGMEM + extern struct pglist_data contig_page_data; #define NODE_DATA(nid) (&contig_page_data) #define NODE_MEM_MAP(nid) mem_map -#define MAX_NR_NODES 1 +#define MAX_NODES_SHIFT 0 + #else /* CONFIG_DISCONTIGMEM */ #include <asm/mmzone.h> -/* page->zone is currently 8 bits ... */ -#define MAX_NR_NODES (255 / MAX_NR_ZONES) +#if BITS_PER_LONG == 32 +/* + * with 32 bit flags field, page->zone is currently 8 bits. + * there are 3 zones (2 bits) and this leaves 8-2=6 bits for nodes. + */ +#define MAX_NODES_SHIFT 6 +#elif BITS_PER_LONG == 64 +/* + * with 64 bit flags field, there's plenty of room. + */ +#define MAX_NODES_SHIFT 10 +#endif #endif /* !CONFIG_DISCONTIGMEM */ +#if NODES_SHIFT > MAX_NODES_SHIFT +#error NODES_SHIFT > MAX_NODES_SHIFT +#endif extern DECLARE_BITMAP(node_online_map, MAX_NUMNODES); extern DECLARE_BITMAP(memblk_online_map, MAX_NR_MEMBLKS); diff --git a/include/linux/numa.h b/include/linux/numa.h new file mode 100644 index 000000000000..bd0c8c4e9a95 --- /dev/null +++ b/include/linux/numa.h @@ -0,0 +1,16 @@ +#ifndef _LINUX_NUMA_H +#define _LINUX_NUMA_H + +#include <linux/config.h> + +#ifdef CONFIG_DISCONTIGMEM +#include <asm/numnodes.h> +#endif + +#ifndef NODES_SHIFT +#define NODES_SHIFT 0 +#endif + +#define MAX_NUMNODES (1 << NODES_SHIFT) + +#endif /* _LINUX_NUMA_H */ diff --git a/include/linux/sched.h b/include/linux/sched.h index 21a1c416594c..a504b6a92ccf 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -264,6 +264,15 @@ struct signal_struct { /* thread group stop support, overloads group_exit_code too */ int group_stop_count; + + /* job control IDs */ + pid_t pgrp; + pid_t tty_old_pgrp; + pid_t session; + /* boolean value for session group leader */ + int leader; + + struct tty_struct *tty; /* NULL if no tty */ }; /* @@ -366,12 +375,7 @@ struct task_struct { unsigned long personality; int did_exec:1; pid_t pid; - pid_t __pgrp; /* Accessed via process_group() */ - pid_t tty_old_pgrp; - pid_t session; pid_t tgid; - /* boolean value for session group leader */ - int leader; /* * pointers to (original) parent process, youngest child, younger sibling, * older sibling, respectively. (p->father can be replaced with @@ -415,7 +419,6 @@ struct task_struct { char comm[16]; /* file system info */ int link_count, total_link_count; - struct tty_struct *tty; /* NULL if no tty */ unsigned int locks; /* How many file locks are being held */ /* ipc stuff */ struct sysv_sem sysvsem; @@ -469,7 +472,22 @@ struct task_struct { static inline pid_t process_group(struct task_struct *tsk) { - return tsk->group_leader->__pgrp; + return tsk->signal->pgrp; +} + +static inline pid_t process_session(struct task_struct *tsk) +{ + return tsk->signal->session; +} + +static inline int process_session_leader(struct task_struct *tsk) +{ + return tsk->signal->leader; +} + +static inline struct tty_struct *process_tty(struct task_struct *tsk) +{ + return tsk->signal->tty; } extern void __put_task_struct(struct task_struct *tsk); diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 81b3289dbe68..2aeb35d62c2d 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -152,6 +152,7 @@ struct skb_shared_info { * @sk: Socket we are owned by * @stamp: Time we arrived * @dev: Device we arrived on/are leaving by + * @real_dev: The real device we are using * @h: Transport layer header * @nh: Network layer header * @mac: Link layer header @@ -179,6 +180,7 @@ struct skb_shared_info { * @nfct: Associated connection, if any * @nf_debug: Netfilter debugging * @nf_bridge: Saved data about a bridged frame - see br_netfilter.c + * @private: Data which is private to the HIPPI implementation * @tc_index: Traffic control index */ |
