aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-03 03:14:09 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-03 03:14:09 -0400
commit27b030d58c8e72fc7a95187a791bd9406e350f02 (patch)
treeab3bab7f39a5ce5bab65578a7e08fa4dfdeb198c /include/linux
parent79d20b14a0d651f15b0ef9a22b6cf12d284a6d38 (diff)
parent6628465e33ca694bd8fd5c3cf4eb7ff9177bc694 (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/auto_fs4.h2
-rw-r--r--include/linux/compiler-gcc2.h5
-rw-r--r--include/linux/compiler.h6
-rw-r--r--include/linux/cpufreq.h5
-rw-r--r--include/linux/edd.h2
-rw-r--r--include/linux/fb.h3
-rw-r--r--include/linux/fs.h112
-rw-r--r--include/linux/gfp.h6
-rw-r--r--include/linux/input.h5
-rw-r--r--include/linux/kernel.h9
-rw-r--r--include/linux/mm.h1
-rw-r--r--include/linux/net.h38
-rw-r--r--include/linux/page-flags.h1
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/rcupdate.h23
-rw-r--r--include/linux/reboot_fixups.h10
-rw-r--r--include/linux/reiserfs_acl.h12
-rw-r--r--include/linux/reiserfs_fs.h249
-rw-r--r--include/linux/reiserfs_xattr.h4
-rw-r--r--include/linux/sched.h2
-rw-r--r--include/linux/signal.h17
-rw-r--r--include/linux/skbuff.h7
-rw-r--r--include/linux/slab.h23
-rw-r--r--include/linux/syscalls.h3
24 files changed, 302 insertions, 245 deletions
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h
index d1c7b0ec7c22..a1657fb99516 100644
--- a/include/linux/auto_fs4.h
+++ b/include/linux/auto_fs4.h
@@ -23,7 +23,7 @@
23#define AUTOFS_MIN_PROTO_VERSION 3 23#define AUTOFS_MIN_PROTO_VERSION 3
24#define AUTOFS_MAX_PROTO_VERSION 4 24#define AUTOFS_MAX_PROTO_VERSION 4
25 25
26#define AUTOFS_PROTO_SUBVERSION 5 26#define AUTOFS_PROTO_SUBVERSION 6
27 27
28/* Mask for expire behaviour */ 28/* Mask for expire behaviour */
29#define AUTOFS_EXP_IMMEDIATE 1 29#define AUTOFS_EXP_IMMEDIATE 1
diff --git a/include/linux/compiler-gcc2.h b/include/linux/compiler-gcc2.h
index 5a359153ffd9..ebed17660c5f 100644
--- a/include/linux/compiler-gcc2.h
+++ b/include/linux/compiler-gcc2.h
@@ -22,3 +22,8 @@
22# define __attribute_pure__ __attribute__((pure)) 22# define __attribute_pure__ __attribute__((pure))
23# define __attribute_const__ __attribute__((__const__)) 23# define __attribute_const__ __attribute__((__const__))
24#endif 24#endif
25
26/* GCC 2.95.x/2.96 recognize __va_copy, but not va_copy. Actually later GCC's
27 * define both va_copy and __va_copy, but the latter may go away, so limit this
28 * to this header */
29#define va_copy __va_copy
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 487725cf0d0d..d7378215b851 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -90,6 +90,12 @@ extern void __chk_io_ptr(void __iomem *);
90# define __deprecated /* unimplemented */ 90# define __deprecated /* unimplemented */
91#endif 91#endif
92 92
93#ifdef MODULE
94#define __deprecated_for_modules __deprecated
95#else
96#define __deprecated_for_modules
97#endif
98
93#ifndef __must_check 99#ifndef __must_check
94#define __must_check 100#define __must_check
95#endif 101#endif
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 910eca35583d..f21af067d015 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -103,6 +103,7 @@ struct cpufreq_policy {
103#define CPUFREQ_PRECHANGE (0) 103#define CPUFREQ_PRECHANGE (0)
104#define CPUFREQ_POSTCHANGE (1) 104#define CPUFREQ_POSTCHANGE (1)
105#define CPUFREQ_RESUMECHANGE (8) 105#define CPUFREQ_RESUMECHANGE (8)
106#define CPUFREQ_SUSPENDCHANGE (9)
106 107
107struct cpufreq_freqs { 108struct cpufreq_freqs {
108 unsigned int cpu; /* cpu nr */ 109 unsigned int cpu; /* cpu nr */
@@ -200,6 +201,7 @@ struct cpufreq_driver {
200 201
201 /* optional */ 202 /* optional */
202 int (*exit) (struct cpufreq_policy *policy); 203 int (*exit) (struct cpufreq_policy *policy);
204 int (*suspend) (struct cpufreq_policy *policy, u32 state);
203 int (*resume) (struct cpufreq_policy *policy); 205 int (*resume) (struct cpufreq_policy *policy);
204 struct freq_attr **attr; 206 struct freq_attr **attr;
205}; 207};
@@ -211,7 +213,8 @@ struct cpufreq_driver {
211#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel 213#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
212 * "constants" aren't affected by 214 * "constants" aren't affected by
213 * frequency transitions */ 215 * frequency transitions */
214 216#define CPUFREQ_PM_NO_WARN 0x04 /* don't warn on suspend/resume speed
217 * mismatches */
215 218
216int cpufreq_register_driver(struct cpufreq_driver *driver_data); 219int cpufreq_register_driver(struct cpufreq_driver *driver_data);
217int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); 220int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
diff --git a/include/linux/edd.h b/include/linux/edd.h
index c6e6747a401d..162512b886f7 100644
--- a/include/linux/edd.h
+++ b/include/linux/edd.h
@@ -32,7 +32,7 @@
32 32
33#define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF 33#define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF
34 in boot_params - treat this as 1 byte */ 34 in boot_params - treat this as 1 byte */
35#define EDDBUF 0x600 /* addr of edd_info structs in boot_params */ 35#define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */
36#define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */ 36#define EDDMAXNR 6 /* number of edd_info structs starting at EDDBUF */
37#define EDDEXTSIZE 8 /* change these if you muck with the structures */ 37#define EDDEXTSIZE 8 /* change these if you muck with the structures */
38#define EDDPARMSIZE 74 38#define EDDPARMSIZE 74
diff --git a/include/linux/fb.h b/include/linux/fb.h
index b45d3e2d711a..b468bf496547 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -563,6 +563,9 @@ struct fb_ops {
563 int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, 563 int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green,
564 unsigned blue, unsigned transp, struct fb_info *info); 564 unsigned blue, unsigned transp, struct fb_info *info);
565 565
566 /* set color registers in batch */
567 int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
568
566 /* blank display */ 569 /* blank display */
567 int (*fb_blank)(int blank, struct fb_info *info); 570 int (*fb_blank)(int blank, struct fb_info *info);
568 571
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5df687d940fa..4edba067a717 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1053,83 +1053,87 @@ static inline void file_accessed(struct file *file)
1053int sync_inode(struct inode *inode, struct writeback_control *wbc); 1053int sync_inode(struct inode *inode, struct writeback_control *wbc);
1054 1054
1055/** 1055/**
1056 * &export_operations - for nfsd to communicate with file systems 1056 * struct export_operations - for nfsd to communicate with file systems
1057 * decode_fh: decode a file handle fragment and return a &struct dentry 1057 * @decode_fh: decode a file handle fragment and return a &struct dentry
1058 * encode_fh: encode a file handle fragment from a dentry 1058 * @encode_fh: encode a file handle fragment from a dentry
1059 * get_name: find the name for a given inode in a given directory 1059 * @get_name: find the name for a given inode in a given directory
1060 * get_parent: find the parent of a given directory 1060 * @get_parent: find the parent of a given directory
1061 * get_dentry: find a dentry for the inode given a file handle sub-fragment 1061 * @get_dentry: find a dentry for the inode given a file handle sub-fragment
1062 * 1062 *
1063 * Description: 1063 * Description:
1064 * The export_operations structure provides a means for nfsd to communicate 1064 * The export_operations structure provides a means for nfsd to communicate
1065 * with a particular exported file system - particularly enabling nfsd and 1065 * with a particular exported file system - particularly enabling nfsd and
1066 * the filesystem to co-operate when dealing with file handles. 1066 * the filesystem to co-operate when dealing with file handles.
1067 * 1067 *
1068 * export_operations contains two basic operation for dealing with file handles, 1068 * export_operations contains two basic operation for dealing with file
1069 * decode_fh() and encode_fh(), and allows for some other operations to be defined 1069 * handles, decode_fh() and encode_fh(), and allows for some other
1070 * which standard helper routines use to get specific information from the 1070 * operations to be defined which standard helper routines use to get
1071 * filesystem. 1071 * specific information from the filesystem.
1072 * 1072 *
1073 * nfsd encodes information use to determine which filesystem a filehandle 1073 * nfsd encodes information use to determine which filesystem a filehandle
1074 * applies to in the initial part of the file handle. The remainder, termed a 1074 * applies to in the initial part of the file handle. The remainder, termed
1075 * file handle fragment, is controlled completely by the filesystem. 1075 * a file handle fragment, is controlled completely by the filesystem. The
1076 * The standard helper routines assume that this fragment will contain one or two 1076 * standard helper routines assume that this fragment will contain one or
1077 * sub-fragments, one which identifies the file, and one which may be used to 1077 * two sub-fragments, one which identifies the file, and one which may be
1078 * identify the (a) directory containing the file. 1078 * used to identify the (a) directory containing the file.
1079 * 1079 *
1080 * In some situations, nfsd needs to get a dentry which is connected into a 1080 * In some situations, nfsd needs to get a dentry which is connected into a
1081 * specific part of the file tree. To allow for this, it passes the function 1081 * specific part of the file tree. To allow for this, it passes the
1082 * acceptable() together with a @context which can be used to see if the dentry 1082 * function acceptable() together with a @context which can be used to see
1083 * is acceptable. As there can be multiple dentrys for a given file, the filesystem 1083 * if the dentry is acceptable. As there can be multiple dentrys for a
1084 * should check each one for acceptability before looking for the next. As soon 1084 * given file, the filesystem should check each one for acceptability before
1085 * as an acceptable one is found, it should be returned. 1085 * looking for the next. As soon as an acceptable one is found, it should
1086 * be returned.
1086 * 1087 *
1087 * decode_fh: 1088 * decode_fh:
1088 * @decode_fh is given a &struct super_block (@sb), a file handle fragment (@fh, @fh_len) 1089 * @decode_fh is given a &struct super_block (@sb), a file handle fragment
1089 * and an acceptability testing function (@acceptable, @context). It should return 1090 * (@fh, @fh_len) and an acceptability testing function (@acceptable,
1090 * a &struct dentry which refers to the same file that the file handle fragment refers 1091 * @context). It should return a &struct dentry which refers to the same
1091 * to, and which passes the acceptability test. If it cannot, it should return 1092 * file that the file handle fragment refers to, and which passes the
1092 * a %NULL pointer if the file was found but no acceptable &dentries were available, or 1093 * acceptability test. If it cannot, it should return a %NULL pointer if
1093 * a %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or %ENOMEM). 1094 * the file was found but no acceptable &dentries were available, or a
1095 * %ERR_PTR error code indicating why it couldn't be found (e.g. %ENOENT or
1096 * %ENOMEM).
1094 * 1097 *
1095 * encode_fh: 1098 * encode_fh:
1096 * @encode_fh should store in the file handle fragment @fh (using at most @max_len bytes) 1099 * @encode_fh should store in the file handle fragment @fh (using at most
1097 * information that can be used by @decode_fh to recover the file refered to by the 1100 * @max_len bytes) information that can be used by @decode_fh to recover the
1098 * &struct dentry @de. If the @connectable flag is set, the encode_fh() should store 1101 * file refered to by the &struct dentry @de. If the @connectable flag is
1099 * sufficient information so that a good attempt can be made to find not only 1102 * set, the encode_fh() should store sufficient information so that a good
1100 * the file but also it's place in the filesystem. This typically means storing 1103 * attempt can be made to find not only the file but also it's place in the
1101 * a reference to de->d_parent in the filehandle fragment. 1104 * filesystem. This typically means storing a reference to de->d_parent in
1102 * encode_fh() should return the number of bytes stored or a negative error code 1105 * the filehandle fragment. encode_fh() should return the number of bytes
1103 * such as %-ENOSPC 1106 * stored or a negative error code such as %-ENOSPC
1104 * 1107 *
1105 * get_name: 1108 * get_name:
1106 * @get_name should find a name for the given @child in the given @parent directory. 1109 * @get_name should find a name for the given @child in the given @parent
1107 * The name should be stored in the @name (with the understanding that it is already 1110 * directory. The name should be stored in the @name (with the
1108 * pointing to a a %NAME_MAX+1 sized buffer. get_name() should return %0 on success, 1111 * understanding that it is already pointing to a a %NAME_MAX+1 sized
1109 * a negative error code or error. 1112 * buffer. get_name() should return %0 on success, a negative error code
1110 * @get_name will be called without @parent->i_sem held. 1113 * or error. @get_name will be called without @parent->i_sem held.
1111 * 1114 *
1112 * get_parent: 1115 * get_parent:
1113 * @get_parent should find the parent directory for the given @child which is also 1116 * @get_parent should find the parent directory for the given @child which
1114 * a directory. In the event that it cannot be found, or storage space cannot be 1117 * is also a directory. In the event that it cannot be found, or storage
1115 * allocated, a %ERR_PTR should be returned. 1118 * space cannot be allocated, a %ERR_PTR should be returned.
1116 * 1119 *
1117 * get_dentry: 1120 * get_dentry:
1118 * Given a &super_block (@sb) and a pointer to a file-system specific inode identifier, 1121 * Given a &super_block (@sb) and a pointer to a file-system specific inode
1119 * possibly an inode number, (@inump) get_dentry() should find the identified inode and 1122 * identifier, possibly an inode number, (@inump) get_dentry() should find
1120 * return a dentry for that inode. 1123 * the identified inode and return a dentry for that inode. Any suitable
1121 * Any suitable dentry can be returned including, if necessary, a new dentry created 1124 * dentry can be returned including, if necessary, a new dentry created with
1122 * with d_alloc_root. The caller can then find any other extant dentrys by following the 1125 * d_alloc_root. The caller can then find any other extant dentrys by
1123 * d_alias links. If a new dentry was created using d_alloc_root, DCACHE_NFSD_DISCONNECTED 1126 * following the d_alias links. If a new dentry was created using
1124 * should be set, and the dentry should be d_rehash()ed. 1127 * d_alloc_root, DCACHE_NFSD_DISCONNECTED should be set, and the dentry
1128 * should be d_rehash()ed.
1125 * 1129 *
1126 * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code can be returned. 1130 * If the inode cannot be found, either a %NULL pointer or an %ERR_PTR code
1127 * The @inump will be whatever was passed to nfsd_find_fh_dentry() in either the 1131 * can be returned. The @inump will be whatever was passed to
1128 * @obj or @parent parameters. 1132 * nfsd_find_fh_dentry() in either the @obj or @parent parameters.
1129 * 1133 *
1130 * Locking rules: 1134 * Locking rules:
1131 * get_parent is called with child->d_inode->i_sem down 1135 * get_parent is called with child->d_inode->i_sem down
1132 * get_name is not (which is possibly inconsistent) 1136 * get_name is not (which is possibly inconsistent)
1133 */ 1137 */
1134 1138
1135struct export_operations { 1139struct export_operations {
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 848a1baac079..af7407e8cfc5 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -38,14 +38,16 @@ struct vm_area_struct;
38#define __GFP_NO_GROW 0x2000u /* Slab internal usage */ 38#define __GFP_NO_GROW 0x2000u /* Slab internal usage */
39#define __GFP_COMP 0x4000u /* Add compound page metadata */ 39#define __GFP_COMP 0x4000u /* Add compound page metadata */
40#define __GFP_ZERO 0x8000u /* Return zeroed page on success */ 40#define __GFP_ZERO 0x8000u /* Return zeroed page on success */
41#define __GFP_NOMEMALLOC 0x10000u /* Don't use emergency reserves */
41 42
42#define __GFP_BITS_SHIFT 16 /* Room for 16 __GFP_FOO bits */ 43#define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */
43#define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) 44#define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1)
44 45
45/* if you forget to add the bitmask here kernel will crash, period */ 46/* if you forget to add the bitmask here kernel will crash, period */
46#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \ 47#define GFP_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS| \
47 __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \ 48 __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT| \
48 __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP) 49 __GFP_NOFAIL|__GFP_NORETRY|__GFP_NO_GROW|__GFP_COMP| \
50 __GFP_NOMEMALLOC)
49 51
50#define GFP_ATOMIC (__GFP_HIGH) 52#define GFP_ATOMIC (__GFP_HIGH)
51#define GFP_NOIO (__GFP_WAIT) 53#define GFP_NOIO (__GFP_WAIT)
diff --git a/include/linux/input.h b/include/linux/input.h
index b70df8fe60e6..72731d7d189e 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -328,6 +328,11 @@ struct input_absinfo {
328#define KEY_BRIGHTNESSUP 225 328#define KEY_BRIGHTNESSUP 225
329#define KEY_MEDIA 226 329#define KEY_MEDIA 226
330 330
331#define KEY_SWITCHVIDEOMODE 227
332#define KEY_KBDILLUMTOGGLE 228
333#define KEY_KBDILLUMDOWN 229
334#define KEY_KBDILLUMUP 230
335
331#define KEY_UNKNOWN 240 336#define KEY_UNKNOWN 240
332 337
333#define BTN_MISC 0x100 338#define BTN_MISC 0x100
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 7c1cba4a5278..e25b97062ce1 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -115,10 +115,19 @@ extern int __kernel_text_address(unsigned long addr);
115extern int kernel_text_address(unsigned long addr); 115extern int kernel_text_address(unsigned long addr);
116extern int session_of_pgrp(int pgrp); 116extern int session_of_pgrp(int pgrp);
117 117
118#ifdef CONFIG_PRINTK
118asmlinkage int vprintk(const char *fmt, va_list args) 119asmlinkage int vprintk(const char *fmt, va_list args)
119 __attribute__ ((format (printf, 1, 0))); 120 __attribute__ ((format (printf, 1, 0)));
120asmlinkage int printk(const char * fmt, ...) 121asmlinkage int printk(const char * fmt, ...)
121 __attribute__ ((format (printf, 1, 2))); 122 __attribute__ ((format (printf, 1, 2)));
123#else
124static inline int vprintk(const char *s, va_list args)
125 __attribute__ ((format (printf, 1, 0)));
126static inline int vprintk(const char *s, va_list args) { return 0; }
127static inline int printk(const char *s, ...)
128 __attribute__ ((format (printf, 1, 2)));
129static inline int printk(const char *s, ...) { return 0; }
130#endif
122 131
123unsigned long int_sqrt(unsigned long); 132unsigned long int_sqrt(unsigned long);
124 133
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c74a74ca401d..8b007ad2d450 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -726,6 +726,7 @@ extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
726extern struct vm_area_struct *copy_vma(struct vm_area_struct **, 726extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
727 unsigned long addr, unsigned long len, pgoff_t pgoff); 727 unsigned long addr, unsigned long len, pgoff_t pgoff);
728extern void exit_mmap(struct mm_struct *); 728extern void exit_mmap(struct mm_struct *);
729extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
729 730
730extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); 731extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
731 732
diff --git a/include/linux/net.h b/include/linux/net.h
index 7823b3482506..e5914c1f0c4d 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -64,19 +64,19 @@ typedef enum {
64#define SOCK_PASSCRED 3 64#define SOCK_PASSCRED 3
65 65
66#ifndef ARCH_HAS_SOCKET_TYPES 66#ifndef ARCH_HAS_SOCKET_TYPES
67/** sock_type - Socket types 67/**
68 * 68 * enum sock_type - Socket types
69 * @SOCK_STREAM: stream (connection) socket
70 * @SOCK_DGRAM: datagram (conn.less) socket
71 * @SOCK_RAW: raw socket
72 * @SOCK_RDM: reliably-delivered message
73 * @SOCK_SEQPACKET: sequential packet socket
74 * @SOCK_PACKET: linux specific way of getting packets at the dev level.
75 * For writing rarp and other similar things on the user level.
76 *
69 * When adding some new socket type please 77 * When adding some new socket type please
70 * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS 78 * grep ARCH_HAS_SOCKET_TYPE include/asm-* /socket.h, at least MIPS
71 * overrides this enum for binary compat reasons. 79 * overrides this enum for binary compat reasons.
72 *
73 * @SOCK_STREAM - stream (connection) socket
74 * @SOCK_DGRAM - datagram (conn.less) socket
75 * @SOCK_RAW - raw socket
76 * @SOCK_RDM - reliably-delivered message
77 * @SOCK_SEQPACKET - sequential packet socket
78 * @SOCK_PACKET - linux specific way of getting packets at the dev level.
79 * For writing rarp and other similar things on the user level.
80 */ 80 */
81enum sock_type { 81enum sock_type {
82 SOCK_STREAM = 1, 82 SOCK_STREAM = 1,
@@ -93,15 +93,15 @@ enum sock_type {
93 93
94/** 94/**
95 * struct socket - general BSD socket 95 * struct socket - general BSD socket
96 * @state - socket state (%SS_CONNECTED, etc) 96 * @state: socket state (%SS_CONNECTED, etc)
97 * @flags - socket flags (%SOCK_ASYNC_NOSPACE, etc) 97 * @flags: socket flags (%SOCK_ASYNC_NOSPACE, etc)
98 * @ops - protocol specific socket operations 98 * @ops: protocol specific socket operations
99 * @fasync_list - Asynchronous wake up list 99 * @fasync_list: Asynchronous wake up list
100 * @file - File back pointer for gc 100 * @file: File back pointer for gc
101 * @sk - internal networking protocol agnostic socket representation 101 * @sk: internal networking protocol agnostic socket representation
102 * @wait - wait queue for several uses 102 * @wait: wait queue for several uses
103 * @type - socket type (%SOCK_STREAM, etc) 103 * @type: socket type (%SOCK_STREAM, etc)
104 * @passcred - credentials (used only in Unix Sockets (aka PF_LOCAL)) 104 * @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL))
105 */ 105 */
106struct socket { 106struct socket {
107 socket_state state; 107 socket_state state;
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6b74fcf5bb63..39ab8c6b5652 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -131,6 +131,7 @@ struct page_state {
131 unsigned long allocstall; /* direct reclaim calls */ 131 unsigned long allocstall; /* direct reclaim calls */
132 132
133 unsigned long pgrotated; /* pages rotated to tail of the LRU */ 133 unsigned long pgrotated; /* pages rotated to tail of the LRU */
134 unsigned long nr_bounce; /* pages for bounce buffers */
134}; 135};
135 136
136extern void get_page_state(struct page_state *ret); 137extern void get_page_state(struct page_state *ret);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 6a1897481942..5d5820a4cf10 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2415,6 +2415,8 @@
2415#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 2415#define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9
2416#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0 2416#define PCI_DEVICE_ID_INTEL_ICH7_2 0x27c0
2417#define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1 2417#define PCI_DEVICE_ID_INTEL_ICH7_3 0x27c1
2418#define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0
2419#define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd
2418#define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4 2420#define PCI_DEVICE_ID_INTEL_ICH7_5 0x27c4
2419#define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5 2421#define PCI_DEVICE_ID_INTEL_ICH7_6 0x27c5
2420#define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8 2422#define PCI_DEVICE_ID_INTEL_ICH7_7 0x27c8
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 4d747433916b..fd276adf0fd5 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -157,9 +157,9 @@ static inline int rcu_pending(int cpu)
157/** 157/**
158 * rcu_read_lock - mark the beginning of an RCU read-side critical section. 158 * rcu_read_lock - mark the beginning of an RCU read-side critical section.
159 * 159 *
160 * When synchronize_kernel() is invoked on one CPU while other CPUs 160 * When synchronize_rcu() is invoked on one CPU while other CPUs
161 * are within RCU read-side critical sections, then the 161 * are within RCU read-side critical sections, then the
162 * synchronize_kernel() is guaranteed to block until after all the other 162 * synchronize_rcu() is guaranteed to block until after all the other
163 * CPUs exit their critical sections. Similarly, if call_rcu() is invoked 163 * CPUs exit their critical sections. Similarly, if call_rcu() is invoked
164 * on one CPU while other CPUs are within RCU read-side critical 164 * on one CPU while other CPUs are within RCU read-side critical
165 * sections, invocation of the corresponding RCU callback is deferred 165 * sections, invocation of the corresponding RCU callback is deferred
@@ -256,6 +256,21 @@ static inline int rcu_pending(int cpu)
256 (p) = (v); \ 256 (p) = (v); \
257 }) 257 })
258 258
259/**
260 * synchronize_sched - block until all CPUs have exited any non-preemptive
261 * kernel code sequences.
262 *
263 * This means that all preempt_disable code sequences, including NMI and
264 * hardware-interrupt handlers, in progress on entry will have completed
265 * before this primitive returns. However, this does not guarantee that
266 * softirq handlers will have completed, since in some kernels
267 *
268 * This primitive provides the guarantees made by the (deprecated)
269 * synchronize_kernel() API. In contrast, synchronize_rcu() only
270 * guarantees that rcu_read_lock() sections will have completed.
271 */
272#define synchronize_sched() synchronize_rcu()
273
259extern void rcu_init(void); 274extern void rcu_init(void);
260extern void rcu_check_callbacks(int cpu, int user); 275extern void rcu_check_callbacks(int cpu, int user);
261extern void rcu_restart_cpu(int cpu); 276extern void rcu_restart_cpu(int cpu);
@@ -265,7 +280,9 @@ extern void FASTCALL(call_rcu(struct rcu_head *head,
265 void (*func)(struct rcu_head *head))); 280 void (*func)(struct rcu_head *head)));
266extern void FASTCALL(call_rcu_bh(struct rcu_head *head, 281extern void FASTCALL(call_rcu_bh(struct rcu_head *head,
267 void (*func)(struct rcu_head *head))); 282 void (*func)(struct rcu_head *head)));
268extern void synchronize_kernel(void); 283extern __deprecated_for_modules void synchronize_kernel(void);
284extern void synchronize_rcu(void);
285void synchronize_idle(void);
269 286
270#endif /* __KERNEL__ */ 287#endif /* __KERNEL__ */
271#endif /* __LINUX_RCUPDATE_H */ 288#endif /* __LINUX_RCUPDATE_H */
diff --git a/include/linux/reboot_fixups.h b/include/linux/reboot_fixups.h
new file mode 100644
index 000000000000..480ea2d489d8
--- /dev/null
+++ b/include/linux/reboot_fixups.h
@@ -0,0 +1,10 @@
1#ifndef _LINUX_REBOOT_FIXUPS_H
2#define _LINUX_REBOOT_FIXUPS_H
3
4#ifdef CONFIG_X86_REBOOTFIXUPS
5extern void mach_reboot_fixups(void);
6#else
7#define mach_reboot_fixups() ((void)(0))
8#endif
9
10#endif /* _LINUX_REBOOT_FIXUPS_H */
diff --git a/include/linux/reiserfs_acl.h b/include/linux/reiserfs_acl.h
index a57e973af0bd..2aef9c3f5ce8 100644
--- a/include/linux/reiserfs_acl.h
+++ b/include/linux/reiserfs_acl.h
@@ -5,18 +5,18 @@
5#define REISERFS_ACL_VERSION 0x0001 5#define REISERFS_ACL_VERSION 0x0001
6 6
7typedef struct { 7typedef struct {
8 __u16 e_tag; 8 __le16 e_tag;
9 __u16 e_perm; 9 __le16 e_perm;
10 __u32 e_id; 10 __le32 e_id;
11} reiserfs_acl_entry; 11} reiserfs_acl_entry;
12 12
13typedef struct { 13typedef struct {
14 __u16 e_tag; 14 __le16 e_tag;
15 __u16 e_perm; 15 __le16 e_perm;
16} reiserfs_acl_entry_short; 16} reiserfs_acl_entry_short;
17 17
18typedef struct { 18typedef struct {
19 __u32 a_version; 19 __le32 a_version;
20} reiserfs_acl_header; 20} reiserfs_acl_header;
21 21
22static inline size_t reiserfs_acl_size(int count) 22static inline size_t reiserfs_acl_size(int count)
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index bccff8b17dc4..32148625fc2f 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -114,47 +114,47 @@ if( !( cond ) ) \
114 114
115 115
116struct journal_params { 116struct journal_params {
117 __u32 jp_journal_1st_block; /* where does journal start from on its 117 __le32 jp_journal_1st_block; /* where does journal start from on its
118 * device */ 118 * device */
119 __u32 jp_journal_dev; /* journal device st_rdev */ 119 __le32 jp_journal_dev; /* journal device st_rdev */
120 __u32 jp_journal_size; /* size of the journal */ 120 __le32 jp_journal_size; /* size of the journal */
121 __u32 jp_journal_trans_max; /* max number of blocks in a transaction. */ 121 __le32 jp_journal_trans_max; /* max number of blocks in a transaction. */
122 __u32 jp_journal_magic; /* random value made on fs creation (this 122 __le32 jp_journal_magic; /* random value made on fs creation (this
123 * was sb_journal_block_count) */ 123 * was sb_journal_block_count) */
124 __u32 jp_journal_max_batch; /* max number of blocks to batch into a 124 __le32 jp_journal_max_batch; /* max number of blocks to batch into a
125 * trans */ 125 * trans */
126 __u32 jp_journal_max_commit_age; /* in seconds, how old can an async 126 __le32 jp_journal_max_commit_age; /* in seconds, how old can an async
127 * commit be */ 127 * commit be */
128 __u32 jp_journal_max_trans_age; /* in seconds, how old can a transaction 128 __le32 jp_journal_max_trans_age; /* in seconds, how old can a transaction
129 * be */ 129 * be */
130}; 130};
131 131
132/* this is the super from 3.5.X, where X >= 10 */ 132/* this is the super from 3.5.X, where X >= 10 */
133struct reiserfs_super_block_v1 133struct reiserfs_super_block_v1
134{ 134{
135 __u32 s_block_count; /* blocks count */ 135 __le32 s_block_count; /* blocks count */
136 __u32 s_free_blocks; /* free blocks count */ 136 __le32 s_free_blocks; /* free blocks count */
137 __u32 s_root_block; /* root block number */ 137 __le32 s_root_block; /* root block number */
138 struct journal_params s_journal; 138 struct journal_params s_journal;
139 __u16 s_blocksize; /* block size */ 139 __le16 s_blocksize; /* block size */
140 __u16 s_oid_maxsize; /* max size of object id array, see 140 __le16 s_oid_maxsize; /* max size of object id array, see
141 * get_objectid() commentary */ 141 * get_objectid() commentary */
142 __u16 s_oid_cursize; /* current size of object id array */ 142 __le16 s_oid_cursize; /* current size of object id array */
143 __u16 s_umount_state; /* this is set to 1 when filesystem was 143 __le16 s_umount_state; /* this is set to 1 when filesystem was
144 * umounted, to 2 - when not */ 144 * umounted, to 2 - when not */
145 char s_magic[10]; /* reiserfs magic string indicates that 145 char s_magic[10]; /* reiserfs magic string indicates that
146 * file system is reiserfs: 146 * file system is reiserfs:
147 * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */ 147 * "ReIsErFs" or "ReIsEr2Fs" or "ReIsEr3Fs" */
148 __u16 s_fs_state; /* it is set to used by fsck to mark which 148 __le16 s_fs_state; /* it is set to used by fsck to mark which
149 * phase of rebuilding is done */ 149 * phase of rebuilding is done */
150 __u32 s_hash_function_code; /* indicate, what hash function is being use 150 __le32 s_hash_function_code; /* indicate, what hash function is being use
151 * to sort names in a directory*/ 151 * to sort names in a directory*/
152 __u16 s_tree_height; /* height of disk tree */ 152 __le16 s_tree_height; /* height of disk tree */
153 __u16 s_bmap_nr; /* amount of bitmap blocks needed to address 153 __le16 s_bmap_nr; /* amount of bitmap blocks needed to address
154 * each block of file system */ 154 * each block of file system */
155 __u16 s_version; /* this field is only reliable on filesystem 155 __le16 s_version; /* this field is only reliable on filesystem
156 * with non-standard journal */ 156 * with non-standard journal */
157 __u16 s_reserved_for_journal; /* size in blocks of journal area on main 157 __le16 s_reserved_for_journal; /* size in blocks of journal area on main
158 * device, we need to keep after 158 * device, we need to keep after
159 * making fs with non-standard journal */ 159 * making fs with non-standard journal */
160} __attribute__ ((__packed__)); 160} __attribute__ ((__packed__));
@@ -165,8 +165,8 @@ struct reiserfs_super_block_v1
165struct reiserfs_super_block 165struct reiserfs_super_block
166{ 166{
167 struct reiserfs_super_block_v1 s_v1; 167 struct reiserfs_super_block_v1 s_v1;
168 __u32 s_inode_generation; 168 __le32 s_inode_generation;
169 __u32 s_flags; /* Right now used only by inode-attributes, if enabled */ 169 __le32 s_flags; /* Right now used only by inode-attributes, if enabled */
170 unsigned char s_uuid[16]; /* filesystem unique identifier */ 170 unsigned char s_uuid[16]; /* filesystem unique identifier */
171 unsigned char s_label[16]; /* filesystem volume label */ 171 unsigned char s_label[16]; /* filesystem volume label */
172 char s_unused[88] ; /* zero filled by mkreiserfs and 172 char s_unused[88] ; /* zero filled by mkreiserfs and
@@ -225,7 +225,7 @@ struct reiserfs_super_block
225#define SB_ONDISK_JOURNAL_DEVICE(s) \ 225#define SB_ONDISK_JOURNAL_DEVICE(s) \
226 le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev)) 226 le32_to_cpu ((SB_ONDISK_JP(s)->jp_journal_dev))
227#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \ 227#define SB_ONDISK_RESERVED_FOR_JOURNAL(s) \
228 le32_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal)) 228 le16_to_cpu ((SB_V1_DISK_SUPER_BLOCK(s)->s_reserved_for_journal))
229 229
230#define is_block_in_log_or_reserved_area(s, block) \ 230#define is_block_in_log_or_reserved_area(s, block) \
231 block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \ 231 block >= SB_JOURNAL_1st_RESERVED_BLOCK(s) \
@@ -269,7 +269,7 @@ int is_reiserfs_jr (struct reiserfs_super_block * rs);
269#define QUOTA_EXCEEDED -6 269#define QUOTA_EXCEEDED -6
270 270
271typedef __u32 b_blocknr_t; 271typedef __u32 b_blocknr_t;
272typedef __u32 unp_t; 272typedef __le32 unp_t;
273 273
274struct unfm_nodeinfo { 274struct unfm_nodeinfo {
275 unp_t unfm_nodenum; 275 unp_t unfm_nodenum;
@@ -376,78 +376,57 @@ static inline struct reiserfs_sb_info *REISERFS_SB(const struct super_block *sb)
376// directories use this key as well as old files 376// directories use this key as well as old files
377// 377//
378struct offset_v1 { 378struct offset_v1 {
379 __u32 k_offset; 379 __le32 k_offset;
380 __u32 k_uniqueness; 380 __le32 k_uniqueness;
381} __attribute__ ((__packed__)); 381} __attribute__ ((__packed__));
382 382
383struct offset_v2 { 383struct offset_v2 {
384#ifdef __LITTLE_ENDIAN 384 __le64 v;
385 /* little endian version */
386 __u64 k_offset:60;
387 __u64 k_type: 4;
388#else
389 /* big endian version */
390 __u64 k_type: 4;
391 __u64 k_offset:60;
392#endif
393} __attribute__ ((__packed__)); 385} __attribute__ ((__packed__));
394 386
395#ifndef __LITTLE_ENDIAN
396typedef union {
397 struct offset_v2 offset_v2;
398 __u64 linear;
399} __attribute__ ((__packed__)) offset_v2_esafe_overlay;
400
401static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 ) 387static inline __u16 offset_v2_k_type( const struct offset_v2 *v2 )
402{ 388{
403 offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2; 389 __u8 type = le64_to_cpu(v2->v) >> 60;
404 tmp.linear = le64_to_cpu( tmp.linear ); 390 return (type <= TYPE_MAXTYPE)?type:TYPE_ANY;
405 return (tmp.offset_v2.k_type <= TYPE_MAXTYPE)?tmp.offset_v2.k_type:TYPE_ANY;
406} 391}
407 392
408static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type ) 393static inline void set_offset_v2_k_type( struct offset_v2 *v2, int type )
409{ 394{
410 offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2; 395 v2->v = (v2->v & cpu_to_le64(~0ULL>>4)) | cpu_to_le64((__u64)type<<60);
411 tmp->linear = le64_to_cpu(tmp->linear);
412 tmp->offset_v2.k_type = type;
413 tmp->linear = cpu_to_le64(tmp->linear);
414} 396}
415 397
416static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 ) 398static inline loff_t offset_v2_k_offset( const struct offset_v2 *v2 )
417{ 399{
418 offset_v2_esafe_overlay tmp = *(const offset_v2_esafe_overlay *)v2; 400 return le64_to_cpu(v2->v) & (~0ULL>>4);
419 tmp.linear = le64_to_cpu( tmp.linear );
420 return tmp.offset_v2.k_offset;
421} 401}
422 402
423static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){ 403static inline void set_offset_v2_k_offset( struct offset_v2 *v2, loff_t offset ){
424 offset_v2_esafe_overlay *tmp = (offset_v2_esafe_overlay *)v2; 404 offset &= (~0ULL>>4);
425 tmp->linear = le64_to_cpu(tmp->linear); 405 v2->v = (v2->v & cpu_to_le64(15ULL<<60)) | cpu_to_le64(offset);
426 tmp->offset_v2.k_offset = offset;
427 tmp->linear = cpu_to_le64(tmp->linear);
428} 406}
429#else
430# define offset_v2_k_type(v2) ((v2)->k_type)
431# define set_offset_v2_k_type(v2,val) (offset_v2_k_type(v2) = (val))
432# define offset_v2_k_offset(v2) ((v2)->k_offset)
433# define set_offset_v2_k_offset(v2,val) (offset_v2_k_offset(v2) = (val))
434#endif
435 407
436/* Key of an item determines its location in the S+tree, and 408/* Key of an item determines its location in the S+tree, and
437 is composed of 4 components */ 409 is composed of 4 components */
438struct reiserfs_key { 410struct reiserfs_key {
439 __u32 k_dir_id; /* packing locality: by default parent 411 __le32 k_dir_id; /* packing locality: by default parent
440 directory object id */ 412 directory object id */
441 __u32 k_objectid; /* object identifier */ 413 __le32 k_objectid; /* object identifier */
442 union { 414 union {
443 struct offset_v1 k_offset_v1; 415 struct offset_v1 k_offset_v1;
444 struct offset_v2 k_offset_v2; 416 struct offset_v2 k_offset_v2;
445 } __attribute__ ((__packed__)) u; 417 } __attribute__ ((__packed__)) u;
446} __attribute__ ((__packed__)); 418} __attribute__ ((__packed__));
447 419
420struct in_core_key {
421 __u32 k_dir_id; /* packing locality: by default parent
422 directory object id */
423 __u32 k_objectid; /* object identifier */
424 __u64 k_offset;
425 __u8 k_type;
426};
448 427
449struct cpu_key { 428struct cpu_key {
450 struct reiserfs_key on_disk_key; 429 struct in_core_key on_disk_key;
451 int version; 430 int version;
452 int key_length; /* 3 in all cases but direct2indirect and 431 int key_length; /* 3 in all cases but direct2indirect and
453 indirect2direct conversion */ 432 indirect2direct conversion */
@@ -508,15 +487,15 @@ struct item_head
508 item. Note that the key, not this field, is used to 487 item. Note that the key, not this field, is used to
509 determine the item type, and thus which field this 488 determine the item type, and thus which field this
510 union contains. */ 489 union contains. */
511 __u16 ih_free_space_reserved; 490 __le16 ih_free_space_reserved;
512 /* Iff this is a directory item, this field equals the 491 /* Iff this is a directory item, this field equals the
513 number of directory entries in the directory item. */ 492 number of directory entries in the directory item. */
514 __u16 ih_entry_count; 493 __le16 ih_entry_count;
515 } __attribute__ ((__packed__)) u; 494 } __attribute__ ((__packed__)) u;
516 __u16 ih_item_len; /* total size of the item body */ 495 __le16 ih_item_len; /* total size of the item body */
517 __u16 ih_item_location; /* an offset to the item body 496 __le16 ih_item_location; /* an offset to the item body
518 * within the block */ 497 * within the block */
519 __u16 ih_version; /* 0 for all old items, 2 for new 498 __le16 ih_version; /* 0 for all old items, 2 for new
520 ones. Highest bit is set by fsck 499 ones. Highest bit is set by fsck
521 temporary, cleaned after all 500 temporary, cleaned after all
522 done */ 501 done */
@@ -670,43 +649,29 @@ static inline void set_le_ih_k_type (struct item_head * ih, int type)
670// 649//
671static inline loff_t cpu_key_k_offset (const struct cpu_key * key) 650static inline loff_t cpu_key_k_offset (const struct cpu_key * key)
672{ 651{
673 return (key->version == KEY_FORMAT_3_5) ? 652 return key->on_disk_key.k_offset;
674 key->on_disk_key.u.k_offset_v1.k_offset :
675 key->on_disk_key.u.k_offset_v2.k_offset;
676} 653}
677 654
678static inline loff_t cpu_key_k_type (const struct cpu_key * key) 655static inline loff_t cpu_key_k_type (const struct cpu_key * key)
679{ 656{
680 return (key->version == KEY_FORMAT_3_5) ? 657 return key->on_disk_key.k_type;
681 uniqueness2type (key->on_disk_key.u.k_offset_v1.k_uniqueness) :
682 key->on_disk_key.u.k_offset_v2.k_type;
683} 658}
684 659
685static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset) 660static inline void set_cpu_key_k_offset (struct cpu_key * key, loff_t offset)
686{ 661{
687 (key->version == KEY_FORMAT_3_5) ? 662 key->on_disk_key.k_offset = offset;
688 (key->on_disk_key.u.k_offset_v1.k_offset = offset) :
689 (key->on_disk_key.u.k_offset_v2.k_offset = offset);
690} 663}
691 664
692
693static inline void set_cpu_key_k_type (struct cpu_key * key, int type) 665static inline void set_cpu_key_k_type (struct cpu_key * key, int type)
694{ 666{
695 (key->version == KEY_FORMAT_3_5) ? 667 key->on_disk_key.k_type = type;
696 (key->on_disk_key.u.k_offset_v1.k_uniqueness = type2uniqueness (type)):
697 (key->on_disk_key.u.k_offset_v2.k_type = type);
698} 668}
699 669
700
701static inline void cpu_key_k_offset_dec (struct cpu_key * key) 670static inline void cpu_key_k_offset_dec (struct cpu_key * key)
702{ 671{
703 if (key->version == KEY_FORMAT_3_5) 672 key->on_disk_key.k_offset --;
704 key->on_disk_key.u.k_offset_v1.k_offset --;
705 else
706 key->on_disk_key.u.k_offset_v2.k_offset --;
707} 673}
708 674
709
710#define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY) 675#define is_direntry_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRENTRY)
711#define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT) 676#define is_direct_cpu_key(key) (cpu_key_k_type (key) == TYPE_DIRECT)
712#define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT) 677#define is_indirect_cpu_key(key) (cpu_key_k_type (key) == TYPE_INDIRECT)
@@ -752,10 +717,10 @@ extern struct reiserfs_key root_key;
752/* Header of a disk block. More precisely, header of a formatted leaf 717/* Header of a disk block. More precisely, header of a formatted leaf
753 or internal node, and not the header of an unformatted node. */ 718 or internal node, and not the header of an unformatted node. */
754struct block_head { 719struct block_head {
755 __u16 blk_level; /* Level of a block in the tree. */ 720 __le16 blk_level; /* Level of a block in the tree. */
756 __u16 blk_nr_item; /* Number of keys/items in a block. */ 721 __le16 blk_nr_item; /* Number of keys/items in a block. */
757 __u16 blk_free_space; /* Block free space in bytes. */ 722 __le16 blk_free_space; /* Block free space in bytes. */
758 __u16 blk_reserved; 723 __le16 blk_reserved;
759 /* dump this in v4/planA */ 724 /* dump this in v4/planA */
760 struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */ 725 struct reiserfs_key blk_right_delim_key; /* kept only for compatibility */
761}; 726};
@@ -819,19 +784,19 @@ struct block_head {
819// 784//
820struct stat_data_v1 785struct stat_data_v1
821{ 786{
822 __u16 sd_mode; /* file type, permissions */ 787 __le16 sd_mode; /* file type, permissions */
823 __u16 sd_nlink; /* number of hard links */ 788 __le16 sd_nlink; /* number of hard links */
824 __u16 sd_uid; /* owner */ 789 __le16 sd_uid; /* owner */
825 __u16 sd_gid; /* group */ 790 __le16 sd_gid; /* group */
826 __u32 sd_size; /* file size */ 791 __le32 sd_size; /* file size */
827 __u32 sd_atime; /* time of last access */ 792 __le32 sd_atime; /* time of last access */
828 __u32 sd_mtime; /* time file was last modified */ 793 __le32 sd_mtime; /* time file was last modified */
829 __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ 794 __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
830 union { 795 union {
831 __u32 sd_rdev; 796 __le32 sd_rdev;
832 __u32 sd_blocks; /* number of blocks file uses */ 797 __le32 sd_blocks; /* number of blocks file uses */
833 } __attribute__ ((__packed__)) u; 798 } __attribute__ ((__packed__)) u;
834 __u32 sd_first_direct_byte; /* first byte of file which is stored 799 __le32 sd_first_direct_byte; /* first byte of file which is stored
835 in a direct item: except that if it 800 in a direct item: except that if it
836 equals 1 it is a symlink and if it 801 equals 1 it is a symlink and if it
837 equals ~(__u32)0 there is no 802 equals ~(__u32)0 there is no
@@ -897,20 +862,20 @@ struct stat_data_v1
897/* Stat Data on disk (reiserfs version of UFS disk inode minus the 862/* Stat Data on disk (reiserfs version of UFS disk inode minus the
898 address blocks) */ 863 address blocks) */
899struct stat_data { 864struct stat_data {
900 __u16 sd_mode; /* file type, permissions */ 865 __le16 sd_mode; /* file type, permissions */
901 __u16 sd_attrs; /* persistent inode flags */ 866 __le16 sd_attrs; /* persistent inode flags */
902 __u32 sd_nlink; /* number of hard links */ 867 __le32 sd_nlink; /* number of hard links */
903 __u64 sd_size; /* file size */ 868 __le64 sd_size; /* file size */
904 __u32 sd_uid; /* owner */ 869 __le32 sd_uid; /* owner */
905 __u32 sd_gid; /* group */ 870 __le32 sd_gid; /* group */
906 __u32 sd_atime; /* time of last access */ 871 __le32 sd_atime; /* time of last access */
907 __u32 sd_mtime; /* time file was last modified */ 872 __le32 sd_mtime; /* time file was last modified */
908 __u32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */ 873 __le32 sd_ctime; /* time inode (stat data) was last changed (except changes to sd_atime and sd_mtime) */
909 __u32 sd_blocks; 874 __le32 sd_blocks;
910 union { 875 union {
911 __u32 sd_rdev; 876 __le32 sd_rdev;
912 __u32 sd_generation; 877 __le32 sd_generation;
913 //__u32 sd_first_direct_byte; 878 //__le32 sd_first_direct_byte;
914 /* first byte of file which is stored in a 879 /* first byte of file which is stored in a
915 direct item: except that if it equals 1 880 direct item: except that if it equals 1
916 it is a symlink and if it equals 881 it is a symlink and if it equals
@@ -993,12 +958,12 @@ struct stat_data {
993 958
994struct reiserfs_de_head 959struct reiserfs_de_head
995{ 960{
996 __u32 deh_offset; /* third component of the directory entry key */ 961 __le32 deh_offset; /* third component of the directory entry key */
997 __u32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced 962 __le32 deh_dir_id; /* objectid of the parent directory of the object, that is referenced
998 by directory entry */ 963 by directory entry */
999 __u32 deh_objectid; /* objectid of the object, that is referenced by directory entry */ 964 __le32 deh_objectid; /* objectid of the object, that is referenced by directory entry */
1000 __u16 deh_location; /* offset of name in the whole item */ 965 __le16 deh_location; /* offset of name in the whole item */
1001 __u16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether 966 __le16 deh_state; /* whether 1) entry contains stat data (for future), and 2) whether
1002 entry is hidden (unlinked) */ 967 entry is hidden (unlinked) */
1003} __attribute__ ((__packed__)); 968} __attribute__ ((__packed__));
1004#define DEH_SIZE sizeof(struct reiserfs_de_head) 969#define DEH_SIZE sizeof(struct reiserfs_de_head)
@@ -1058,10 +1023,10 @@ struct reiserfs_de_head
1058#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) 1023#define de_visible(deh) test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
1059#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state)) 1024#define de_hidden(deh) !test_bit_unaligned (DEH_Visible, &((deh)->deh_state))
1060 1025
1061extern void make_empty_dir_item_v1 (char * body, __u32 dirid, __u32 objid, 1026extern void make_empty_dir_item_v1 (char * body, __le32 dirid, __le32 objid,
1062 __u32 par_dirid, __u32 par_objid); 1027 __le32 par_dirid, __le32 par_objid);
1063extern void make_empty_dir_item (char * body, __u32 dirid, __u32 objid, 1028extern void make_empty_dir_item (char * body, __le32 dirid, __le32 objid,
1064 __u32 par_dirid, __u32 par_objid); 1029 __le32 par_dirid, __le32 par_objid);
1065 1030
1066/* array of the entry headers */ 1031/* array of the entry headers */
1067 /* get item body */ 1032 /* get item body */
@@ -1160,9 +1125,9 @@ struct reiserfs_dir_entry
1160/* Disk child pointer: The pointer from an internal node of the tree 1125/* Disk child pointer: The pointer from an internal node of the tree
1161 to a node that is on disk. */ 1126 to a node that is on disk. */
1162struct disk_child { 1127struct disk_child {
1163 __u32 dc_block_number; /* Disk child's block number. */ 1128 __le32 dc_block_number; /* Disk child's block number. */
1164 __u16 dc_size; /* Disk child's used space. */ 1129 __le16 dc_size; /* Disk child's used space. */
1165 __u16 dc_reserved; 1130 __le16 dc_reserved;
1166}; 1131};
1167 1132
1168#define DC_SIZE (sizeof(struct disk_child)) 1133#define DC_SIZE (sizeof(struct disk_child))
@@ -1476,7 +1441,7 @@ struct tree_balance
1476 int fs_gen; /* saved value of `reiserfs_generation' counter 1441 int fs_gen; /* saved value of `reiserfs_generation' counter
1477 see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */ 1442 see FILESYSTEM_CHANGED() macro in reiserfs_fs.h */
1478#ifdef DISPLACE_NEW_PACKING_LOCALITIES 1443#ifdef DISPLACE_NEW_PACKING_LOCALITIES
1479 struct reiserfs_key key; /* key pointer, to pass to block allocator or 1444 struct in_core_key key; /* key pointer, to pass to block allocator or
1480 another low-level subsystem */ 1445 another low-level subsystem */
1481#endif 1446#endif
1482} ; 1447} ;
@@ -1630,10 +1595,10 @@ struct reiserfs_iget_args {
1630 1595
1631/* first block written in a commit. */ 1596/* first block written in a commit. */
1632struct reiserfs_journal_desc { 1597struct reiserfs_journal_desc {
1633 __u32 j_trans_id ; /* id of commit */ 1598 __le32 j_trans_id ; /* id of commit */
1634 __u32 j_len ; /* length of commit. len +1 is the commit block */ 1599 __le32 j_len ; /* length of commit. len +1 is the commit block */
1635 __u32 j_mount_id ; /* mount id of this trans*/ 1600 __le32 j_mount_id ; /* mount id of this trans*/
1636 __u32 j_realblock[1] ; /* real locations for each block */ 1601 __le32 j_realblock[1] ; /* real locations for each block */
1637} ; 1602} ;
1638 1603
1639#define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id) 1604#define get_desc_trans_id(d) le32_to_cpu((d)->j_trans_id)
@@ -1646,9 +1611,9 @@ struct reiserfs_journal_desc {
1646 1611
1647/* last block written in a commit */ 1612/* last block written in a commit */
1648struct reiserfs_journal_commit { 1613struct reiserfs_journal_commit {
1649 __u32 j_trans_id ; /* must match j_trans_id from the desc block */ 1614 __le32 j_trans_id ; /* must match j_trans_id from the desc block */
1650 __u32 j_len ; /* ditto */ 1615 __le32 j_len ; /* ditto */
1651 __u32 j_realblock[1] ; /* real locations for each block */ 1616 __le32 j_realblock[1] ; /* real locations for each block */
1652} ; 1617} ;
1653 1618
1654#define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id) 1619#define get_commit_trans_id(c) le32_to_cpu((c)->j_trans_id)
@@ -1663,9 +1628,9 @@ struct reiserfs_journal_commit {
1663** and this transaction does not need to be replayed. 1628** and this transaction does not need to be replayed.
1664*/ 1629*/
1665struct reiserfs_journal_header { 1630struct reiserfs_journal_header {
1666 __u32 j_last_flush_trans_id ; /* id of last fully flushed transaction */ 1631 __le32 j_last_flush_trans_id ; /* id of last fully flushed transaction */
1667 __u32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */ 1632 __le32 j_first_unflushed_offset ; /* offset in the log of where to start replay after a crash */
1668 __u32 j_mount_id ; 1633 __le32 j_mount_id ;
1669 /* 12 */ struct journal_params jh_journal; 1634 /* 12 */ struct journal_params jh_journal;
1670} ; 1635} ;
1671 1636
@@ -2117,7 +2082,7 @@ struct buffer_head * get_FEB (struct tree_balance *);
2117 struct __reiserfs_blocknr_hint { 2082 struct __reiserfs_blocknr_hint {
2118 struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */ 2083 struct inode * inode; /* inode passed to allocator, if we allocate unf. nodes */
2119 long block; /* file offset, in blocks */ 2084 long block; /* file offset, in blocks */
2120 struct reiserfs_key key; 2085 struct in_core_key key;
2121 struct path * path; /* search path, used by allocator to deternine search_start by 2086 struct path * path; /* search path, used by allocator to deternine search_start by
2122 * various ways */ 2087 * various ways */
2123 struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and 2088 struct reiserfs_transaction_handle * th; /* transaction handle is needed to log super blocks and
@@ -2144,7 +2109,7 @@ void reiserfs_init_alloc_options (struct super_block *s);
2144 * to use for a new object underneat it. The locality is returned 2109 * to use for a new object underneat it. The locality is returned
2145 * in disk byte order (le). 2110 * in disk byte order (le).
2146 */ 2111 */
2147u32 reiserfs_choose_packing(struct inode *dir); 2112__le32 reiserfs_choose_packing(struct inode *dir);
2148 2113
2149int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value); 2114int is_reusable (struct super_block * s, b_blocknr_t block, int bit_value);
2150void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted); 2115void reiserfs_free_block (struct reiserfs_transaction_handle *th, struct inode *, b_blocknr_t, int for_unformatted);
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 1eaa48eca811..9244c5748820 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -10,8 +10,8 @@
10#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ 10#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
11 11
12struct reiserfs_xattr_header { 12struct reiserfs_xattr_header {
13 __u32 h_magic; /* magic number for identification */ 13 __le32 h_magic; /* magic number for identification */
14 __u32 h_hash; /* hash of the value */ 14 __le32 h_hash; /* hash of the value */
15}; 15};
16 16
17#ifdef __KERNEL__ 17#ifdef __KERNEL__
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1cced971232c..5f868a588581 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -845,6 +845,7 @@ extern void sched_idle_next(void);
845extern void set_user_nice(task_t *p, long nice); 845extern void set_user_nice(task_t *p, long nice);
846extern int task_prio(const task_t *p); 846extern int task_prio(const task_t *p);
847extern int task_nice(const task_t *p); 847extern int task_nice(const task_t *p);
848extern int can_nice(const task_t *p, const int nice);
848extern int task_curr(const task_t *p); 849extern int task_curr(const task_t *p);
849extern int idle_cpu(int cpu); 850extern int idle_cpu(int cpu);
850extern int sched_setscheduler(struct task_struct *, int, struct sched_param *); 851extern int sched_setscheduler(struct task_struct *, int, struct sched_param *);
@@ -1011,7 +1012,6 @@ extern int copy_thread(int, unsigned long, unsigned long, unsigned long, struct
1011extern void flush_thread(void); 1012extern void flush_thread(void);
1012extern void exit_thread(void); 1013extern void exit_thread(void);
1013 1014
1014extern void exit_mm(struct task_struct *);
1015extern void exit_files(struct task_struct *); 1015extern void exit_files(struct task_struct *);
1016extern void exit_signal(struct task_struct *); 1016extern void exit_signal(struct task_struct *);
1017extern void __exit_signal(struct task_struct *); 1017extern void __exit_signal(struct task_struct *);
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 99c97ad026c8..0a98f5ec5cae 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -9,6 +9,17 @@
9#ifdef __KERNEL__ 9#ifdef __KERNEL__
10 10
11/* 11/*
12 * These values of sa_flags are used only by the kernel as part of the
13 * irq handling routines.
14 *
15 * SA_INTERRUPT is also used by the irq handling routines.
16 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
17 */
18#define SA_PROBE SA_ONESHOT
19#define SA_SAMPLE_RANDOM SA_RESTART
20#define SA_SHIRQ 0x04000000
21
22/*
12 * Real Time signals may be queued. 23 * Real Time signals may be queued.
13 */ 24 */
14 25
@@ -209,6 +220,12 @@ static inline void init_sigpending(struct sigpending *sig)
209 INIT_LIST_HEAD(&sig->list); 220 INIT_LIST_HEAD(&sig->list);
210} 221}
211 222
223/* Test if 'sig' is valid signal. Use this instead of testing _NSIG directly */
224static inline int valid_signal(unsigned long sig)
225{
226 return sig <= _NSIG ? 1 : 0;
227}
228
212extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); 229extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p);
213extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); 230extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *);
214extern long do_sigpending(void __user *, unsigned long); 231extern long do_sigpending(void __user *, unsigned long);
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 22b701819619..cc04f5cd2286 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -167,13 +167,14 @@ struct skb_shared_info {
167 * @h: Transport layer header 167 * @h: Transport layer header
168 * @nh: Network layer header 168 * @nh: Network layer header
169 * @mac: Link layer header 169 * @mac: Link layer header
170 * @dst: FIXME: Describe this field 170 * @dst: destination entry
171 * @sp: the security path, used for xfrm
171 * @cb: Control buffer. Free for use by every layer. Put private vars here 172 * @cb: Control buffer. Free for use by every layer. Put private vars here
172 * @len: Length of actual data 173 * @len: Length of actual data
173 * @data_len: Data length 174 * @data_len: Data length
174 * @mac_len: Length of link layer header 175 * @mac_len: Length of link layer header
175 * @csum: Checksum 176 * @csum: Checksum
176 * @__unused: Dead field, may be reused 177 * @local_df: allow local fragmentation
177 * @cloned: Head may be cloned (check refcnt to be sure) 178 * @cloned: Head may be cloned (check refcnt to be sure)
178 * @nohdr: Payload reference only, must not modify header 179 * @nohdr: Payload reference only, must not modify header
179 * @pkt_type: Packet class 180 * @pkt_type: Packet class
@@ -968,6 +969,7 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
968 kfree_skb(skb); 969 kfree_skb(skb);
969} 970}
970 971
972#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
971/** 973/**
972 * __dev_alloc_skb - allocate an skbuff for sending 974 * __dev_alloc_skb - allocate an skbuff for sending
973 * @length: length to allocate 975 * @length: length to allocate
@@ -980,7 +982,6 @@ static inline void __skb_queue_purge(struct sk_buff_head *list)
980 * 982 *
981 * %NULL is returned in there is no free memory. 983 * %NULL is returned in there is no free memory.
982 */ 984 */
983#ifndef CONFIG_HAVE_ARCH_DEV_ALLOC_SKB
984static inline struct sk_buff *__dev_alloc_skb(unsigned int length, 985static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
985 int gfp_mask) 986 int gfp_mask)
986{ 987{
diff --git a/include/linux/slab.h b/include/linux/slab.h
index 3e3c3ab8ff94..7d66385ae750 100644
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -62,16 +62,9 @@ extern kmem_cache_t *kmem_cache_create(const char *, size_t, size_t, unsigned lo
62extern int kmem_cache_destroy(kmem_cache_t *); 62extern int kmem_cache_destroy(kmem_cache_t *);
63extern int kmem_cache_shrink(kmem_cache_t *); 63extern int kmem_cache_shrink(kmem_cache_t *);
64extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast); 64extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
65#ifdef CONFIG_NUMA
66extern void *kmem_cache_alloc_node(kmem_cache_t *, int);
67#else
68static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int node)
69{
70 return kmem_cache_alloc(cachep, GFP_KERNEL);
71}
72#endif
73extern void kmem_cache_free(kmem_cache_t *, void *); 65extern void kmem_cache_free(kmem_cache_t *, void *);
74extern unsigned int kmem_cache_size(kmem_cache_t *); 66extern unsigned int kmem_cache_size(kmem_cache_t *);
67extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags);
75 68
76/* Size description struct for general caches. */ 69/* Size description struct for general caches. */
77struct cache_sizes { 70struct cache_sizes {
@@ -109,6 +102,20 @@ extern void *kcalloc(size_t, size_t, unsigned int __nocast);
109extern void kfree(const void *); 102extern void kfree(const void *);
110extern unsigned int ksize(const void *); 103extern unsigned int ksize(const void *);
111 104
105#ifdef CONFIG_NUMA
106extern void *kmem_cache_alloc_node(kmem_cache_t *, int flags, int node);
107extern void *kmalloc_node(size_t size, int flags, int node);
108#else
109static inline void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int node)
110{
111 return kmem_cache_alloc(cachep, flags);
112}
113static inline void *kmalloc_node(size_t size, int flags, int node)
114{
115 return kmalloc(size, flags);
116}
117#endif
118
112extern int FASTCALL(kmem_cache_reap(int)); 119extern int FASTCALL(kmem_cache_reap(int));
113extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr)); 120extern int FASTCALL(kmem_ptr_validate(kmem_cache_t *cachep, void *ptr));
114 121
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 757cd9be7743..c39f6f72cbbc 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -456,8 +456,7 @@ asmlinkage long sys_semctl(int semid, int semnum, int cmd, union semun arg);
456asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, 456asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops,
457 unsigned nsops, 457 unsigned nsops,
458 const struct timespec __user *timeout); 458 const struct timespec __user *timeout);
459asmlinkage long sys_shmat(int shmid, char __user *shmaddr, 459asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg);
460 int shmflg, unsigned long __user *addr);
461asmlinkage long sys_shmget(key_t key, size_t size, int flag); 460asmlinkage long sys_shmget(key_t key, size_t size, int flag);
462asmlinkage long sys_shmdt(char __user *shmaddr); 461asmlinkage long sys_shmdt(char __user *shmaddr);
463asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); 462asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf);