aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bitmap.h5
-rw-r--r--include/linux/clocksource.h185
-rw-r--r--include/linux/compat.h2
-rw-r--r--include/linux/compat_ioctl.h5
-rw-r--r--include/linux/console.h4
-rw-r--r--include/linux/crypto.h34
-rw-r--r--include/linux/device-mapper.h111
-rw-r--r--include/linux/dm-ioctl.h6
-rw-r--r--include/linux/fb.h19
-rw-r--r--include/linux/hw_random.h50
-rw-r--r--include/linux/idr.h1
-rw-r--r--include/linux/init_task.h1
-rw-r--r--include/linux/input.h10
-rw-r--r--include/linux/kernel.h7
-rw-r--r--include/linux/key.h13
-rw-r--r--include/linux/license.h14
-rw-r--r--include/linux/loop.h2
-rw-r--r--include/linux/module.h3
-rw-r--r--include/linux/netdevice.h1
-rw-r--r--include/linux/netpoll.h1
-rw-r--r--include/linux/proc_fs.h16
-rw-r--r--include/linux/ptrace.h1
-rw-r--r--include/linux/raid/bitmap.h11
-rw-r--r--include/linux/raid/linear.h2
-rw-r--r--include/linux/raid/md.h4
-rw-r--r--include/linux/raid/md_k.h10
-rw-r--r--include/linux/raid/md_p.h5
-rw-r--r--include/linux/raid/raid10.h7
-rw-r--r--include/linux/raid/raid5.h1
-rw-r--r--include/linux/sched.h3
-rw-r--r--include/linux/security.h11
-rw-r--r--include/linux/sunrpc/gss_api.h2
-rw-r--r--include/linux/sysctl.h2
-rw-r--r--include/linux/time.h28
-rw-r--r--include/linux/timex.h2
-rw-r--r--include/linux/unwind.h127
-rw-r--r--include/linux/videodev2.h6
37 files changed, 631 insertions, 81 deletions
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h
index d9ed27969855..dcc5de7cc487 100644
--- a/include/linux/bitmap.h
+++ b/include/linux/bitmap.h
@@ -24,6 +24,9 @@
24 * The available bitmap operations and their rough meaning in the 24 * The available bitmap operations and their rough meaning in the
25 * case that the bitmap is a single unsigned long are thus: 25 * case that the bitmap is a single unsigned long are thus:
26 * 26 *
27 * Note that nbits should be always a compile time evaluable constant.
28 * Otherwise many inlines will generate horrible code.
29 *
27 * bitmap_zero(dst, nbits) *dst = 0UL 30 * bitmap_zero(dst, nbits) *dst = 0UL
28 * bitmap_fill(dst, nbits) *dst = ~0UL 31 * bitmap_fill(dst, nbits) *dst = ~0UL
29 * bitmap_copy(dst, src, nbits) *dst = *src 32 * bitmap_copy(dst, src, nbits) *dst = *src
@@ -244,6 +247,8 @@ static inline int bitmap_full(const unsigned long *src, int nbits)
244 247
245static inline int bitmap_weight(const unsigned long *src, int nbits) 248static inline int bitmap_weight(const unsigned long *src, int nbits)
246{ 249{
250 if (nbits <= BITS_PER_LONG)
251 return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits));
247 return __bitmap_weight(src, nbits); 252 return __bitmap_weight(src, nbits);
248} 253}
249 254
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
new file mode 100644
index 000000000000..d852024ed095
--- /dev/null
+++ b/include/linux/clocksource.h
@@ -0,0 +1,185 @@
1/* linux/include/linux/clocksource.h
2 *
3 * This file contains the structure definitions for clocksources.
4 *
5 * If you are not a clocksource, or timekeeping code, you should
6 * not be including this file!
7 */
8#ifndef _LINUX_CLOCKSOURCE_H
9#define _LINUX_CLOCKSOURCE_H
10
11#include <linux/types.h>
12#include <linux/timex.h>
13#include <linux/time.h>
14#include <linux/list.h>
15#include <asm/div64.h>
16#include <asm/io.h>
17
18/* clocksource cycle base type */
19typedef u64 cycle_t;
20
21/**
22 * struct clocksource - hardware abstraction for a free running counter
23 * Provides mostly state-free accessors to the underlying hardware.
24 *
25 * @name: ptr to clocksource name
26 * @list: list head for registration
27 * @rating: rating value for selection (higher is better)
28 * To avoid rating inflation the following
29 * list should give you a guide as to how
30 * to assign your clocksource a rating
31 * 1-99: Unfit for real use
32 * Only available for bootup and testing purposes.
33 * 100-199: Base level usability.
34 * Functional for real use, but not desired.
35 * 200-299: Good.
36 * A correct and usable clocksource.
37 * 300-399: Desired.
38 * A reasonably fast and accurate clocksource.
39 * 400-499: Perfect
40 * The ideal clocksource. A must-use where
41 * available.
42 * @read: returns a cycle value
43 * @mask: bitmask for two's complement
44 * subtraction of non 64 bit counters
45 * @mult: cycle to nanosecond multiplier
46 * @shift: cycle to nanosecond divisor (power of two)
47 * @update_callback: called when safe to alter clocksource values
48 * @is_continuous: defines if clocksource is free-running.
49 * @cycle_interval: Used internally by timekeeping core, please ignore.
50 * @xtime_interval: Used internally by timekeeping core, please ignore.
51 */
52struct clocksource {
53 char *name;
54 struct list_head list;
55 int rating;
56 cycle_t (*read)(void);
57 cycle_t mask;
58 u32 mult;
59 u32 shift;
60 int (*update_callback)(void);
61 int is_continuous;
62
63 /* timekeeping specific data, ignore */
64 cycle_t cycle_last, cycle_interval;
65 u64 xtime_nsec, xtime_interval;
66 s64 error;
67};
68
69/* simplify initialization of mask field */
70#define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1)
71
72/**
73 * clocksource_khz2mult - calculates mult from khz and shift
74 * @khz: Clocksource frequency in KHz
75 * @shift_constant: Clocksource shift factor
76 *
77 * Helper functions that converts a khz counter frequency to a timsource
78 * multiplier, given the clocksource shift value
79 */
80static inline u32 clocksource_khz2mult(u32 khz, u32 shift_constant)
81{
82 /* khz = cyc/(Million ns)
83 * mult/2^shift = ns/cyc
84 * mult = ns/cyc * 2^shift
85 * mult = 1Million/khz * 2^shift
86 * mult = 1000000 * 2^shift / khz
87 * mult = (1000000<<shift) / khz
88 */
89 u64 tmp = ((u64)1000000) << shift_constant;
90
91 tmp += khz/2; /* round for do_div */
92 do_div(tmp, khz);
93
94 return (u32)tmp;
95}
96
97/**
98 * clocksource_hz2mult - calculates mult from hz and shift
99 * @hz: Clocksource frequency in Hz
100 * @shift_constant: Clocksource shift factor
101 *
102 * Helper functions that converts a hz counter
103 * frequency to a timsource multiplier, given the
104 * clocksource shift value
105 */
106static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant)
107{
108 /* hz = cyc/(Billion ns)
109 * mult/2^shift = ns/cyc
110 * mult = ns/cyc * 2^shift
111 * mult = 1Billion/hz * 2^shift
112 * mult = 1000000000 * 2^shift / hz
113 * mult = (1000000000<<shift) / hz
114 */
115 u64 tmp = ((u64)1000000000) << shift_constant;
116
117 tmp += hz/2; /* round for do_div */
118 do_div(tmp, hz);
119
120 return (u32)tmp;
121}
122
123/**
124 * clocksource_read: - Access the clocksource's current cycle value
125 * @cs: pointer to clocksource being read
126 *
127 * Uses the clocksource to return the current cycle_t value
128 */
129static inline cycle_t clocksource_read(struct clocksource *cs)
130{
131 return cs->read();
132}
133
134/**
135 * cyc2ns - converts clocksource cycles to nanoseconds
136 * @cs: Pointer to clocksource
137 * @cycles: Cycles
138 *
139 * Uses the clocksource and ntp ajdustment to convert cycle_ts to nanoseconds.
140 *
141 * XXX - This could use some mult_lxl_ll() asm optimization
142 */
143static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles)
144{
145 u64 ret = (u64)cycles;
146 ret = (ret * cs->mult) >> cs->shift;
147 return ret;
148}
149
150/**
151 * clocksource_calculate_interval - Calculates a clocksource interval struct
152 *
153 * @c: Pointer to clocksource.
154 * @length_nsec: Desired interval length in nanoseconds.
155 *
156 * Calculates a fixed cycle/nsec interval for a given clocksource/adjustment
157 * pair and interval request.
158 *
159 * Unless you're the timekeeping code, you should not be using this!
160 */
161static inline void clocksource_calculate_interval(struct clocksource *c,
162 unsigned long length_nsec)
163{
164 u64 tmp;
165
166 /* XXX - All of this could use a whole lot of optimization */
167 tmp = length_nsec;
168 tmp <<= c->shift;
169 tmp += c->mult/2;
170 do_div(tmp, c->mult);
171
172 c->cycle_interval = (cycle_t)tmp;
173 if (c->cycle_interval == 0)
174 c->cycle_interval = 1;
175
176 c->xtime_interval = (u64)c->cycle_interval * c->mult;
177}
178
179
180/* used to install a new clocksource */
181int clocksource_register(struct clocksource*);
182void clocksource_reselect(void);
183struct clocksource* clocksource_get_next(void);
184
185#endif /* _LINUX_CLOCKSOURCE_H */
diff --git a/include/linux/compat.h b/include/linux/compat.h
index dda1697ec753..9760753e662b 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -226,5 +226,7 @@ static inline int compat_timespec_compare(struct compat_timespec *lhs,
226 226
227asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); 227asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp);
228 228
229extern int compat_printk(const char *fmt, ...);
230
229#endif /* CONFIG_COMPAT */ 231#endif /* CONFIG_COMPAT */
230#endif /* _LINUX_COMPAT_H */ 232#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h
index 89ab677cb993..917d62e41480 100644
--- a/include/linux/compat_ioctl.h
+++ b/include/linux/compat_ioctl.h
@@ -673,6 +673,11 @@ COMPATIBLE_IOCTL(CAPI_SET_FLAGS)
673COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) 673COMPATIBLE_IOCTL(CAPI_CLR_FLAGS)
674COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) 674COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT)
675COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) 675COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT)
676/* Siemens Gigaset */
677COMPATIBLE_IOCTL(GIGASET_REDIR)
678COMPATIBLE_IOCTL(GIGASET_CONFIG)
679COMPATIBLE_IOCTL(GIGASET_BRKCHARS)
680COMPATIBLE_IOCTL(GIGASET_VERSION)
676/* Misc. */ 681/* Misc. */
677COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ 682COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */
678COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ 683COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */
diff --git a/include/linux/console.h b/include/linux/console.h
index d0f8a8009490..3bdf2155e565 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -63,9 +63,11 @@ extern const struct consw vga_con; /* VGA text console */
63extern const struct consw newport_con; /* SGI Newport console */ 63extern const struct consw newport_con; /* SGI Newport console */
64extern const struct consw prom_con; /* SPARC PROM console */ 64extern const struct consw prom_con; /* SPARC PROM console */
65 65
66int con_is_bound(const struct consw *csw);
67int register_con_driver(const struct consw *csw, int first, int last);
68int unregister_con_driver(const struct consw *csw);
66int take_over_console(const struct consw *sw, int first, int last, int deflt); 69int take_over_console(const struct consw *sw, int first, int last, int deflt);
67void give_up_console(const struct consw *sw); 70void give_up_console(const struct consw *sw);
68
69/* scroll */ 71/* scroll */
70#define SM_UP (1) 72#define SM_UP (1)
71#define SM_DOWN (2) 73#define SM_DOWN (2)
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 5a0470e36111..7f946241b879 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -66,7 +66,7 @@ struct crypto_tfm;
66 66
67struct cipher_desc { 67struct cipher_desc {
68 struct crypto_tfm *tfm; 68 struct crypto_tfm *tfm;
69 void (*crfn)(void *ctx, u8 *dst, const u8 *src); 69 void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
70 unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, 70 unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst,
71 const u8 *src, unsigned int nbytes); 71 const u8 *src, unsigned int nbytes);
72 void *info; 72 void *info;
@@ -79,10 +79,10 @@ struct cipher_desc {
79struct cipher_alg { 79struct cipher_alg {
80 unsigned int cia_min_keysize; 80 unsigned int cia_min_keysize;
81 unsigned int cia_max_keysize; 81 unsigned int cia_max_keysize;
82 int (*cia_setkey)(void *ctx, const u8 *key, 82 int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key,
83 unsigned int keylen, u32 *flags); 83 unsigned int keylen, u32 *flags);
84 void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src); 84 void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
85 void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src); 85 void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
86 86
87 unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, 87 unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc,
88 u8 *dst, const u8 *src, 88 u8 *dst, const u8 *src,
@@ -100,20 +100,19 @@ struct cipher_alg {
100 100
101struct digest_alg { 101struct digest_alg {
102 unsigned int dia_digestsize; 102 unsigned int dia_digestsize;
103 void (*dia_init)(void *ctx); 103 void (*dia_init)(struct crypto_tfm *tfm);
104 void (*dia_update)(void *ctx, const u8 *data, unsigned int len); 104 void (*dia_update)(struct crypto_tfm *tfm, const u8 *data,
105 void (*dia_final)(void *ctx, u8 *out); 105 unsigned int len);
106 int (*dia_setkey)(void *ctx, const u8 *key, 106 void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
107 int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
107 unsigned int keylen, u32 *flags); 108 unsigned int keylen, u32 *flags);
108}; 109};
109 110
110struct compress_alg { 111struct compress_alg {
111 int (*coa_init)(void *ctx); 112 int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
112 void (*coa_exit)(void *ctx); 113 unsigned int slen, u8 *dst, unsigned int *dlen);
113 int (*coa_compress)(void *ctx, const u8 *src, unsigned int slen, 114 int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src,
114 u8 *dst, unsigned int *dlen); 115 unsigned int slen, u8 *dst, unsigned int *dlen);
115 int (*coa_decompress)(void *ctx, const u8 *src, unsigned int slen,
116 u8 *dst, unsigned int *dlen);
117}; 116};
118 117
119#define cra_cipher cra_u.cipher 118#define cra_cipher cra_u.cipher
@@ -129,14 +128,17 @@ struct crypto_alg {
129 128
130 int cra_priority; 129 int cra_priority;
131 130
132 const char cra_name[CRYPTO_MAX_ALG_NAME]; 131 char cra_name[CRYPTO_MAX_ALG_NAME];
133 const char cra_driver_name[CRYPTO_MAX_ALG_NAME]; 132 char cra_driver_name[CRYPTO_MAX_ALG_NAME];
134 133
135 union { 134 union {
136 struct cipher_alg cipher; 135 struct cipher_alg cipher;
137 struct digest_alg digest; 136 struct digest_alg digest;
138 struct compress_alg compress; 137 struct compress_alg compress;
139 } cra_u; 138 } cra_u;
139
140 int (*cra_init)(struct crypto_tfm *tfm);
141 void (*cra_exit)(struct crypto_tfm *tfm);
140 142
141 struct module *cra_module; 143 struct module *cra_module;
142}; 144};
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index aee10b2ea4c6..e3d1c33d1558 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -8,9 +8,12 @@
8#ifndef _LINUX_DEVICE_MAPPER_H 8#ifndef _LINUX_DEVICE_MAPPER_H
9#define _LINUX_DEVICE_MAPPER_H 9#define _LINUX_DEVICE_MAPPER_H
10 10
11#ifdef __KERNEL__
12
11struct dm_target; 13struct dm_target;
12struct dm_table; 14struct dm_table;
13struct dm_dev; 15struct dm_dev;
16struct mapped_device;
14 17
15typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; 18typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t;
16 19
@@ -78,7 +81,7 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d);
78struct target_type { 81struct target_type {
79 const char *name; 82 const char *name;
80 struct module *module; 83 struct module *module;
81 unsigned version[3]; 84 unsigned version[3];
82 dm_ctr_fn ctr; 85 dm_ctr_fn ctr;
83 dm_dtr_fn dtr; 86 dm_dtr_fn dtr;
84 dm_map_fn map; 87 dm_map_fn map;
@@ -128,4 +131,108 @@ struct dm_target {
128int dm_register_target(struct target_type *t); 131int dm_register_target(struct target_type *t);
129int dm_unregister_target(struct target_type *t); 132int dm_unregister_target(struct target_type *t);
130 133
131#endif /* _LINUX_DEVICE_MAPPER_H */ 134
135/*-----------------------------------------------------------------
136 * Functions for creating and manipulating mapped devices.
137 * Drop the reference with dm_put when you finish with the object.
138 *---------------------------------------------------------------*/
139
140/*
141 * DM_ANY_MINOR chooses the next available minor number.
142 */
143#define DM_ANY_MINOR (-1)
144int dm_create(int minor, struct mapped_device **md);
145
146/*
147 * Reference counting for md.
148 */
149struct mapped_device *dm_get_md(dev_t dev);
150void dm_get(struct mapped_device *md);
151void dm_put(struct mapped_device *md);
152
153/*
154 * An arbitrary pointer may be stored alongside a mapped device.
155 */
156void dm_set_mdptr(struct mapped_device *md, void *ptr);
157void *dm_get_mdptr(struct mapped_device *md);
158
159/*
160 * A device can still be used while suspended, but I/O is deferred.
161 */
162int dm_suspend(struct mapped_device *md, int with_lockfs);
163int dm_resume(struct mapped_device *md);
164
165/*
166 * Event functions.
167 */
168uint32_t dm_get_event_nr(struct mapped_device *md);
169int dm_wait_event(struct mapped_device *md, int event_nr);
170
171/*
172 * Info functions.
173 */
174const char *dm_device_name(struct mapped_device *md);
175struct gendisk *dm_disk(struct mapped_device *md);
176int dm_suspended(struct mapped_device *md);
177
178/*
179 * Geometry functions.
180 */
181int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo);
182int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo);
183
184
185/*-----------------------------------------------------------------
186 * Functions for manipulating device-mapper tables.
187 *---------------------------------------------------------------*/
188
189/*
190 * First create an empty table.
191 */
192int dm_table_create(struct dm_table **result, int mode,
193 unsigned num_targets, struct mapped_device *md);
194
195/*
196 * Then call this once for each target.
197 */
198int dm_table_add_target(struct dm_table *t, const char *type,
199 sector_t start, sector_t len, char *params);
200
201/*
202 * Finally call this to make the table ready for use.
203 */
204int dm_table_complete(struct dm_table *t);
205
206/*
207 * Table reference counting.
208 */
209struct dm_table *dm_get_table(struct mapped_device *md);
210void dm_table_get(struct dm_table *t);
211void dm_table_put(struct dm_table *t);
212
213/*
214 * Queries
215 */
216sector_t dm_table_get_size(struct dm_table *t);
217unsigned int dm_table_get_num_targets(struct dm_table *t);
218int dm_table_get_mode(struct dm_table *t);
219struct mapped_device *dm_table_get_md(struct dm_table *t);
220
221/*
222 * Trigger an event.
223 */
224void dm_table_event(struct dm_table *t);
225
226/*
227 * The device must be suspended before calling this method.
228 */
229int dm_swap_table(struct mapped_device *md, struct dm_table *t);
230
231/*
232 * Prepare a table for a device that will error all I/O.
233 * To make it active, call dm_suspend(), dm_swap_table() then dm_resume().
234 */
235int dm_create_error_table(struct dm_table **result, struct mapped_device *md);
236
237#endif /* __KERNEL__ */
238#endif /* _LINUX_DEVICE_MAPPER_H */
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h
index c67c6786612a..9623bb625090 100644
--- a/include/linux/dm-ioctl.h
+++ b/include/linux/dm-ioctl.h
@@ -285,9 +285,9 @@ typedef char ioctl_struct[308];
285#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) 285#define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl)
286 286
287#define DM_VERSION_MAJOR 4 287#define DM_VERSION_MAJOR 4
288#define DM_VERSION_MINOR 6 288#define DM_VERSION_MINOR 7
289#define DM_VERSION_PATCHLEVEL 0 289#define DM_VERSION_PATCHLEVEL 0
290#define DM_VERSION_EXTRA "-ioctl (2006-02-17)" 290#define DM_VERSION_EXTRA "-ioctl (2006-06-24)"
291 291
292/* Status bits */ 292/* Status bits */
293#define DM_READONLY_FLAG (1 << 0) /* In/Out */ 293#define DM_READONLY_FLAG (1 << 0) /* In/Out */
@@ -314,7 +314,7 @@ typedef char ioctl_struct[308];
314#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */ 314#define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */
315 315
316/* 316/*
317 * Set this to improve performance when you aren't going to use open_count. 317 * This flag is now ignored.
318 */ 318 */
319#define DM_SKIP_BDGET_FLAG (1 << 9) /* In */ 319#define DM_SKIP_BDGET_FLAG (1 << 9) /* In */
320 320
diff --git a/include/linux/fb.h b/include/linux/fb.h
index f1281687e549..07a08e92bc73 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -504,23 +504,19 @@ struct fb_cursor_user {
504#define FB_EVENT_MODE_DELETE 0x04 504#define FB_EVENT_MODE_DELETE 0x04
505/* A driver registered itself */ 505/* A driver registered itself */
506#define FB_EVENT_FB_REGISTERED 0x05 506#define FB_EVENT_FB_REGISTERED 0x05
507/* A driver unregistered itself */
508#define FB_EVENT_FB_UNREGISTERED 0x06
507/* CONSOLE-SPECIFIC: get console to framebuffer mapping */ 509/* CONSOLE-SPECIFIC: get console to framebuffer mapping */
508#define FB_EVENT_GET_CONSOLE_MAP 0x06 510#define FB_EVENT_GET_CONSOLE_MAP 0x07
509/* CONSOLE-SPECIFIC: set console to framebuffer mapping */ 511/* CONSOLE-SPECIFIC: set console to framebuffer mapping */
510#define FB_EVENT_SET_CONSOLE_MAP 0x07 512#define FB_EVENT_SET_CONSOLE_MAP 0x08
511/* A display blank is requested */ 513/* A display blank is requested */
512#define FB_EVENT_BLANK 0x08 514#define FB_EVENT_BLANK 0x09
513/* Private modelist is to be replaced */ 515/* Private modelist is to be replaced */
514#define FB_EVENT_NEW_MODELIST 0x09 516#define FB_EVENT_NEW_MODELIST 0x0A
515/* The resolution of the passed in fb_info about to change and 517/* The resolution of the passed in fb_info about to change and
516 all vc's should be changed */ 518 all vc's should be changed */
517#define FB_EVENT_MODE_CHANGE_ALL 0x0A 519#define FB_EVENT_MODE_CHANGE_ALL 0x0B
518/* CONSOLE-SPECIFIC: set console rotation */
519#define FB_EVENT_SET_CON_ROTATE 0x0B
520/* CONSOLE-SPECIFIC: get console rotation */
521#define FB_EVENT_GET_CON_ROTATE 0x0C
522/* CONSOLE-SPECIFIC: rotate all consoles */
523#define FB_EVENT_SET_CON_ROTATE_ALL 0x0D
524 520
525struct fb_event { 521struct fb_event {
526 struct fb_info *info; 522 struct fb_info *info;
@@ -892,7 +888,6 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var,
892 struct fb_fix_screeninfo *fix); 888 struct fb_fix_screeninfo *fix);
893extern int fb_get_options(char *name, char **option); 889extern int fb_get_options(char *name, char **option);
894extern int fb_new_modelist(struct fb_info *info); 890extern int fb_new_modelist(struct fb_info *info);
895extern int fb_con_duit(struct fb_info *info, int event, void *data);
896 891
897extern struct fb_info *registered_fb[FB_MAX]; 892extern struct fb_info *registered_fb[FB_MAX];
898extern int num_registered_fb; 893extern int num_registered_fb;
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h
new file mode 100644
index 000000000000..21ea7610e177
--- /dev/null
+++ b/include/linux/hw_random.h
@@ -0,0 +1,50 @@
1/*
2 Hardware Random Number Generator
3
4 Please read Documentation/hw_random.txt for details on use.
5
6 ----------------------------------------------------------
7 This software may be used and distributed according to the terms
8 of the GNU General Public License, incorporated herein by reference.
9
10 */
11
12#ifndef LINUX_HWRANDOM_H_
13#define LINUX_HWRANDOM_H_
14#ifdef __KERNEL__
15
16#include <linux/types.h>
17#include <linux/list.h>
18
19/**
20 * struct hwrng - Hardware Random Number Generator driver
21 * @name: Unique RNG name.
22 * @init: Initialization callback (can be NULL).
23 * @cleanup: Cleanup callback (can be NULL).
24 * @data_present: Callback to determine if data is available
25 * on the RNG. If NULL, it is assumed that
26 * there is always data available.
27 * @data_read: Read data from the RNG device.
28 * Returns the number of lower random bytes in "data".
29 * Must not be NULL.
30 * @priv: Private data, for use by the RNG driver.
31 */
32struct hwrng {
33 const char *name;
34 int (*init)(struct hwrng *rng);
35 void (*cleanup)(struct hwrng *rng);
36 int (*data_present)(struct hwrng *rng);
37 int (*data_read)(struct hwrng *rng, u32 *data);
38 unsigned long priv;
39
40 /* internal. */
41 struct list_head list;
42};
43
44/** Register a new Hardware Random Number Generator driver. */
45extern int hwrng_register(struct hwrng *rng);
46/** Unregister a Hardware Random Number Generator driver. */
47extern void hwrng_unregister(struct hwrng *rng);
48
49#endif /* __KERNEL__ */
50#endif /* LINUX_HWRANDOM_H_ */
diff --git a/include/linux/idr.h b/include/linux/idr.h
index d37c8d808b0f..f559a719dbe8 100644
--- a/include/linux/idr.h
+++ b/include/linux/idr.h
@@ -78,6 +78,7 @@ void *idr_find(struct idr *idp, int id);
78int idr_pre_get(struct idr *idp, gfp_t gfp_mask); 78int idr_pre_get(struct idr *idp, gfp_t gfp_mask);
79int idr_get_new(struct idr *idp, void *ptr, int *id); 79int idr_get_new(struct idr *idp, void *ptr, int *id);
80int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); 80int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id);
81void *idr_replace(struct idr *idp, void *ptr, int id);
81void idr_remove(struct idr *idp, int id); 82void idr_remove(struct idr *idp, int id);
82void idr_destroy(struct idr *idp); 83void idr_destroy(struct idr *idp);
83void idr_init(struct idr *idp); 84void idr_init(struct idr *idp);
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 41ecbb847f32..e127ef7e8da8 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -119,7 +119,6 @@ extern struct group_info init_groups;
119 .signal = {{0}}}, \ 119 .signal = {{0}}}, \
120 .blocked = {{0}}, \ 120 .blocked = {{0}}, \
121 .alloc_lock = SPIN_LOCK_UNLOCKED, \ 121 .alloc_lock = SPIN_LOCK_UNLOCKED, \
122 .proc_lock = SPIN_LOCK_UNLOCKED, \
123 .journal_info = NULL, \ 122 .journal_info = NULL, \
124 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ 123 .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \
125 .fs_excl = ATOMIC_INIT(0), \ 124 .fs_excl = ATOMIC_INIT(0), \
diff --git a/include/linux/input.h b/include/linux/input.h
index b32c2b6e53f6..56f1e0e1e598 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -232,7 +232,8 @@ struct input_absinfo {
232#define KEY_PAUSE 119 232#define KEY_PAUSE 119
233 233
234#define KEY_KPCOMMA 121 234#define KEY_KPCOMMA 121
235#define KEY_HANGUEL 122 235#define KEY_HANGEUL 122
236#define KEY_HANGUEL KEY_HANGEUL
236#define KEY_HANJA 123 237#define KEY_HANJA 123
237#define KEY_YEN 124 238#define KEY_YEN 124
238#define KEY_LEFTMETA 125 239#define KEY_LEFTMETA 125
@@ -1005,6 +1006,7 @@ static inline void init_input_dev(struct input_dev *dev)
1005} 1006}
1006 1007
1007struct input_dev *input_allocate_device(void); 1008struct input_dev *input_allocate_device(void);
1009void input_free_device(struct input_dev *dev);
1008 1010
1009static inline struct input_dev *input_get_device(struct input_dev *dev) 1011static inline struct input_dev *input_get_device(struct input_dev *dev)
1010{ 1012{
@@ -1016,12 +1018,6 @@ static inline void input_put_device(struct input_dev *dev)
1016 class_device_put(&dev->cdev); 1018 class_device_put(&dev->cdev);
1017} 1019}
1018 1020
1019static inline void input_free_device(struct input_dev *dev)
1020{
1021 if (dev)
1022 input_put_device(dev);
1023}
1024
1025int input_register_device(struct input_dev *); 1021int input_register_device(struct input_dev *);
1026void input_unregister_device(struct input_dev *); 1022void input_unregister_device(struct input_dev *);
1027 1023
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 3c5e4c2e517d..5c1ec1f84eab 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -32,6 +32,7 @@ extern const char linux_banner[];
32 32
33#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) 33#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
34#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) 34#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
35#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
35 36
36#define KERN_EMERG "<0>" /* system is unusable */ 37#define KERN_EMERG "<0>" /* system is unusable */
37#define KERN_ALERT "<1>" /* action must be taken immediately */ 38#define KERN_ALERT "<1>" /* action must be taken immediately */
@@ -336,6 +337,12 @@ struct sysinfo {
336/* Force a compilation error if condition is true */ 337/* Force a compilation error if condition is true */
337#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) 338#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
338 339
340/* Force a compilation error if condition is true, but also produce a
341 result (of value 0 and type size_t), so the expression can be used
342 e.g. in a structure initializer (or where-ever else comma expressions
343 aren't permitted). */
344#define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1)
345
339/* Trap pasters of __FUNCTION__ at compile-time */ 346/* Trap pasters of __FUNCTION__ at compile-time */
340#define __FUNCTION__ (__func__) 347#define __FUNCTION__ (__func__)
341 348
diff --git a/include/linux/key.h b/include/linux/key.h
index e81ebf910d0b..e693e729bc92 100644
--- a/include/linux/key.h
+++ b/include/linux/key.h
@@ -248,7 +248,14 @@ extern struct key *key_alloc(struct key_type *type,
248 const char *desc, 248 const char *desc,
249 uid_t uid, gid_t gid, 249 uid_t uid, gid_t gid,
250 struct task_struct *ctx, 250 struct task_struct *ctx,
251 key_perm_t perm, int not_in_quota); 251 key_perm_t perm,
252 unsigned long flags);
253
254
255#define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */
256#define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */
257#define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */
258
252extern int key_payload_reserve(struct key *key, size_t datalen); 259extern int key_payload_reserve(struct key *key, size_t datalen);
253extern int key_instantiate_and_link(struct key *key, 260extern int key_instantiate_and_link(struct key *key,
254 const void *data, 261 const void *data,
@@ -285,7 +292,7 @@ extern key_ref_t key_create_or_update(key_ref_t keyring,
285 const char *description, 292 const char *description,
286 const void *payload, 293 const void *payload,
287 size_t plen, 294 size_t plen,
288 int not_in_quota); 295 unsigned long flags);
289 296
290extern int key_update(key_ref_t key, 297extern int key_update(key_ref_t key,
291 const void *payload, 298 const void *payload,
@@ -299,7 +306,7 @@ extern int key_unlink(struct key *keyring,
299 306
300extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, 307extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid,
301 struct task_struct *ctx, 308 struct task_struct *ctx,
302 int not_in_quota, 309 unsigned long flags,
303 struct key *dest); 310 struct key *dest);
304 311
305extern int keyring_clear(struct key *keyring); 312extern int keyring_clear(struct key *keyring);
diff --git a/include/linux/license.h b/include/linux/license.h
new file mode 100644
index 000000000000..decdbf43cb5c
--- /dev/null
+++ b/include/linux/license.h
@@ -0,0 +1,14 @@
1#ifndef __LICENSE_H
2#define __LICENSE_H
3
4static inline int license_is_gpl_compatible(const char *license)
5{
6 return (strcmp(license, "GPL") == 0
7 || strcmp(license, "GPL v2") == 0
8 || strcmp(license, "GPL and additional rights") == 0
9 || strcmp(license, "Dual BSD/GPL") == 0
10 || strcmp(license, "Dual MIT/GPL") == 0
11 || strcmp(license, "Dual MPL/GPL") == 0);
12}
13
14#endif
diff --git a/include/linux/loop.h b/include/linux/loop.h
index bf3d2345ce99..e76c7611d6cc 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -59,7 +59,7 @@ struct loop_device {
59 struct bio *lo_bio; 59 struct bio *lo_bio;
60 struct bio *lo_biotail; 60 struct bio *lo_biotail;
61 int lo_state; 61 int lo_state;
62 struct task_struct *lo_thread; 62 struct completion lo_done;
63 struct completion lo_bh_done; 63 struct completion lo_bh_done;
64 struct mutex lo_ctl_mutex; 64 struct mutex lo_ctl_mutex;
65 int lo_pending; 65 int lo_pending;
diff --git a/include/linux/module.h b/include/linux/module.h
index 2d366098eab5..9ebbb74b7b72 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -285,6 +285,9 @@ struct module
285 /* The size of the executable code in each section. */ 285 /* The size of the executable code in each section. */
286 unsigned long init_text_size, core_text_size; 286 unsigned long init_text_size, core_text_size;
287 287
288 /* The handle returned from unwind_add_table. */
289 void *unwind_info;
290
288 /* Arch-specific module values */ 291 /* Arch-specific module values */
289 struct mod_arch_specific arch; 292 struct mod_arch_specific arch;
290 293
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index bc747e5d7138..03cd7551a7a1 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -699,7 +699,6 @@ extern int dev_hard_start_xmit(struct sk_buff *skb,
699 699
700extern void dev_init(void); 700extern void dev_init(void);
701 701
702extern int netdev_nit;
703extern int netdev_budget; 702extern int netdev_budget;
704 703
705/* Called by rtnetlink.c:rtnl_unlock() */ 704/* Called by rtnetlink.c:rtnl_unlock() */
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index ca5a8733000f..1efe60c5c00c 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -31,6 +31,7 @@ struct netpoll_info {
31 int rx_flags; 31 int rx_flags;
32 spinlock_t rx_lock; 32 spinlock_t rx_lock;
33 struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 33 struct netpoll *rx_np; /* netpoll that registered an rx_hook */
34 struct sk_buff_head arp_tx; /* list of arp requests to reply to */
34}; 35};
35 36
36void netpoll_poll(struct netpoll *np); 37void netpoll_poll(struct netpoll *np);
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 5810d28fbed9..17e75783e3a5 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -99,9 +99,8 @@ extern void proc_misc_init(void);
99 99
100struct mm_struct; 100struct mm_struct;
101 101
102void proc_flush_task(struct task_struct *task);
102struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); 103struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *);
103struct dentry *proc_pid_unhash(struct task_struct *p);
104void proc_pid_flush(struct dentry *proc_dentry);
105int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); 104int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir);
106unsigned long task_vsize(struct mm_struct *); 105unsigned long task_vsize(struct mm_struct *);
107int task_statm(struct mm_struct *, int *, int *, int *, int *); 106int task_statm(struct mm_struct *, int *, int *, int *, int *);
@@ -211,8 +210,7 @@ static inline void proc_net_remove(const char *name)
211#define proc_net_create(name, mode, info) ({ (void)(mode), NULL; }) 210#define proc_net_create(name, mode, info) ({ (void)(mode), NULL; })
212static inline void proc_net_remove(const char *name) {} 211static inline void proc_net_remove(const char *name) {}
213 212
214static inline struct dentry *proc_pid_unhash(struct task_struct *p) { return NULL; } 213static inline void proc_flush_task(struct task_struct *task) { }
215static inline void proc_pid_flush(struct dentry *proc_dentry) { }
216 214
217static inline struct proc_dir_entry *create_proc_entry(const char *name, 215static inline struct proc_dir_entry *create_proc_entry(const char *name,
218 mode_t mode, struct proc_dir_entry *parent) { return NULL; } 216 mode_t mode, struct proc_dir_entry *parent) { return NULL; }
@@ -248,8 +246,8 @@ extern void kclist_add(struct kcore_list *, void *, size_t);
248#endif 246#endif
249 247
250struct proc_inode { 248struct proc_inode {
251 struct task_struct *task; 249 struct pid *pid;
252 int type; 250 int fd;
253 union { 251 union {
254 int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); 252 int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **);
255 int (*proc_read)(struct task_struct *task, char *page); 253 int (*proc_read)(struct task_struct *task, char *page);
@@ -268,4 +266,10 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode)
268 return PROC_I(inode)->pde; 266 return PROC_I(inode)->pde;
269} 267}
270 268
269struct proc_maps_private {
270 struct pid *pid;
271 struct task_struct *task;
272 struct vm_area_struct *tail_vma;
273};
274
271#endif /* _LINUX_PROC_FS_H */ 275#endif /* _LINUX_PROC_FS_H */
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index ee918bc6e18c..8b2749a259dc 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -88,7 +88,6 @@ extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __us
88extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); 88extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len);
89extern int ptrace_attach(struct task_struct *tsk); 89extern int ptrace_attach(struct task_struct *tsk);
90extern int ptrace_detach(struct task_struct *, unsigned int); 90extern int ptrace_detach(struct task_struct *, unsigned int);
91extern void __ptrace_detach(struct task_struct *, unsigned int);
92extern void ptrace_disable(struct task_struct *); 91extern void ptrace_disable(struct task_struct *);
93extern int ptrace_check_attach(struct task_struct *task, int kill); 92extern int ptrace_check_attach(struct task_struct *task, int kill);
94extern int ptrace_request(struct task_struct *child, long request, long addr, long data); 93extern int ptrace_request(struct task_struct *child, long request, long addr, long data);
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h
index 899437802aea..63df898fe2e9 100644
--- a/include/linux/raid/bitmap.h
+++ b/include/linux/raid/bitmap.h
@@ -140,6 +140,7 @@ typedef __u16 bitmap_counter_t;
140enum bitmap_state { 140enum bitmap_state {
141 BITMAP_ACTIVE = 0x001, /* the bitmap is in use */ 141 BITMAP_ACTIVE = 0x001, /* the bitmap is in use */
142 BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */ 142 BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */
143 BITMAP_WRITE_ERROR = 0x004, /* A write error has occurred */
143 BITMAP_HOSTENDIAN = 0x8000, 144 BITMAP_HOSTENDIAN = 0x8000,
144}; 145};
145 146
@@ -244,15 +245,9 @@ struct bitmap {
244 unsigned long daemon_lastrun; /* jiffies of last run */ 245 unsigned long daemon_lastrun; /* jiffies of last run */
245 unsigned long daemon_sleep; /* how many seconds between updates? */ 246 unsigned long daemon_sleep; /* how many seconds between updates? */
246 247
247 /* 248 atomic_t pending_writes; /* pending writes to the bitmap file */
248 * bitmap_writeback_daemon waits for file-pages that have been written,
249 * as there is no way to get a call-back when a page write completes.
250 */
251 mdk_thread_t *writeback_daemon;
252 spinlock_t write_lock;
253 wait_queue_head_t write_wait; 249 wait_queue_head_t write_wait;
254 struct list_head complete_pages; 250
255 mempool_t *write_pool;
256}; 251};
257 252
258/* the bitmap API */ 253/* the bitmap API */
diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h
index 7eaf290e10e7..ba15469daf11 100644
--- a/include/linux/raid/linear.h
+++ b/include/linux/raid/linear.h
@@ -13,8 +13,10 @@ typedef struct dev_info dev_info_t;
13 13
14struct linear_private_data 14struct linear_private_data
15{ 15{
16 struct linear_private_data *prev; /* earlier version */
16 dev_info_t **hash_table; 17 dev_info_t **hash_table;
17 sector_t hash_spacing; 18 sector_t hash_spacing;
19 sector_t array_size;
18 int preshift; /* shift before dividing by hash_spacing */ 20 int preshift; /* shift before dividing by hash_spacing */
19 dev_info_t disks[0]; 21 dev_info_t disks[0];
20}; 22};
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h
index 66b44e5e0d6e..eb3e547c8fee 100644
--- a/include/linux/raid/md.h
+++ b/include/linux/raid/md.h
@@ -85,8 +85,6 @@ extern void md_done_sync(mddev_t *mddev, int blocks, int ok);
85extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); 85extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev);
86extern void md_unplug_mddev(mddev_t *mddev); 86extern void md_unplug_mddev(mddev_t *mddev);
87 87
88extern void md_print_devices (void);
89
90extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, 88extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev,
91 sector_t sector, int size, struct page *page); 89 sector_t sector, int size, struct page *page);
92extern void md_super_wait(mddev_t *mddev); 90extern void md_super_wait(mddev_t *mddev);
@@ -97,7 +95,5 @@ extern void md_new_event(mddev_t *mddev);
97 95
98extern void md_update_sb(mddev_t * mddev); 96extern void md_update_sb(mddev_t * mddev);
99 97
100#define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); }
101
102#endif 98#endif
103 99
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h
index e2df61f5b09a..c1e0ac55bab5 100644
--- a/include/linux/raid/md_k.h
+++ b/include/linux/raid/md_k.h
@@ -40,7 +40,8 @@ typedef struct mdk_rdev_s mdk_rdev_t;
40 * options passed in raidrun: 40 * options passed in raidrun:
41 */ 41 */
42 42
43#define MAX_CHUNK_SIZE (4096*1024) 43/* Currently this must fix in an 'int' */
44#define MAX_CHUNK_SIZE (1<<30)
44 45
45/* 46/*
46 * MD's 'extended' device 47 * MD's 'extended' device
@@ -57,6 +58,7 @@ struct mdk_rdev_s
57 58
58 struct page *sb_page; 59 struct page *sb_page;
59 int sb_loaded; 60 int sb_loaded;
61 __u64 sb_events;
60 sector_t data_offset; /* start of data in array */ 62 sector_t data_offset; /* start of data in array */
61 sector_t sb_offset; 63 sector_t sb_offset;
62 int sb_size; /* bytes in the superblock */ 64 int sb_size; /* bytes in the superblock */
@@ -87,6 +89,10 @@ struct mdk_rdev_s
87 * array and could again if we did a partial 89 * array and could again if we did a partial
88 * resync from the bitmap 90 * resync from the bitmap
89 */ 91 */
92 sector_t recovery_offset;/* If this device has been partially
93 * recovered, this is where we were
94 * up to.
95 */
90 96
91 atomic_t nr_pending; /* number of pending requests. 97 atomic_t nr_pending; /* number of pending requests.
92 * only maintained for arrays that 98 * only maintained for arrays that
@@ -182,6 +188,8 @@ struct mddev_s
182#define MD_RECOVERY_REQUESTED 6 188#define MD_RECOVERY_REQUESTED 6
183#define MD_RECOVERY_CHECK 7 189#define MD_RECOVERY_CHECK 7
184#define MD_RECOVERY_RESHAPE 8 190#define MD_RECOVERY_RESHAPE 8
191#define MD_RECOVERY_FROZEN 9
192
185 unsigned long recovery; 193 unsigned long recovery;
186 194
187 int in_sync; /* know to not need resync */ 195 int in_sync; /* know to not need resync */
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h
index f1fbae7e390e..b6ebc69bae54 100644
--- a/include/linux/raid/md_p.h
+++ b/include/linux/raid/md_p.h
@@ -265,9 +265,12 @@ struct mdp_superblock_1 {
265 265
266/* feature_map bits */ 266/* feature_map bits */
267#define MD_FEATURE_BITMAP_OFFSET 1 267#define MD_FEATURE_BITMAP_OFFSET 1
268#define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and
269 * must be honoured
270 */
268#define MD_FEATURE_RESHAPE_ACTIVE 4 271#define MD_FEATURE_RESHAPE_ACTIVE 4
269 272
270#define MD_FEATURE_ALL 5 273#define MD_FEATURE_ALL (1|2|4)
271 274
272#endif 275#endif
273 276
diff --git a/include/linux/raid/raid10.h b/include/linux/raid/raid10.h
index b1103298a8c2..c41e56a7c090 100644
--- a/include/linux/raid/raid10.h
+++ b/include/linux/raid/raid10.h
@@ -24,11 +24,16 @@ struct r10_private_data_s {
24 int far_copies; /* number of copies layed out 24 int far_copies; /* number of copies layed out
25 * at large strides across drives 25 * at large strides across drives
26 */ 26 */
27 int far_offset; /* far_copies are offset by 1 stripe
28 * instead of many
29 */
27 int copies; /* near_copies * far_copies. 30 int copies; /* near_copies * far_copies.
28 * must be <= raid_disks 31 * must be <= raid_disks
29 */ 32 */
30 sector_t stride; /* distance between far copies. 33 sector_t stride; /* distance between far copies.
31 * This is size / far_copies 34 * This is size / far_copies unless
35 * far_offset, in which case it is
36 * 1 stripe.
32 */ 37 */
33 38
34 int chunk_shift; /* shift from chunks to sectors */ 39 int chunk_shift; /* shift from chunks to sectors */
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h
index 914af667044f..20ed4c997636 100644
--- a/include/linux/raid/raid5.h
+++ b/include/linux/raid/raid5.h
@@ -212,6 +212,7 @@ struct raid5_private_data {
212 mddev_t *mddev; 212 mddev_t *mddev;
213 struct disk_info *spare; 213 struct disk_info *spare;
214 int chunk_size, level, algorithm; 214 int chunk_size, level, algorithm;
215 int max_degraded;
215 int raid_disks, working_disks, failed_disks; 216 int raid_disks, working_disks, failed_disks;
216 int max_nr_stripes; 217 int max_nr_stripes;
217 218
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8d11d9310db0..122a25c1b997 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -842,8 +842,6 @@ struct task_struct {
842 u32 self_exec_id; 842 u32 self_exec_id;
843/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ 843/* Protection of (de-)allocation: mm, files, fs, tty, keyrings */
844 spinlock_t alloc_lock; 844 spinlock_t alloc_lock;
845/* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */
846 spinlock_t proc_lock;
847 845
848#ifdef CONFIG_DEBUG_MUTEXES 846#ifdef CONFIG_DEBUG_MUTEXES
849 /* mutex deadlock detection */ 847 /* mutex deadlock detection */
@@ -856,7 +854,6 @@ struct task_struct {
856/* VM state */ 854/* VM state */
857 struct reclaim_state *reclaim_state; 855 struct reclaim_state *reclaim_state;
858 856
859 struct dentry *proc_dentry;
860 struct backing_dev_info *backing_dev_info; 857 struct backing_dev_info *backing_dev_info;
861 858
862 struct io_context *io_context; 859 struct io_context *io_context;
diff --git a/include/linux/security.h b/include/linux/security.h
index d2c17bd91a29..51805806f974 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -862,6 +862,7 @@ struct swap_info_struct;
862 * Permit allocation of a key and assign security data. Note that key does 862 * Permit allocation of a key and assign security data. Note that key does
863 * not have a serial number assigned at this point. 863 * not have a serial number assigned at this point.
864 * @key points to the key. 864 * @key points to the key.
865 * @flags is the allocation flags
865 * Return 0 if permission is granted, -ve error otherwise. 866 * Return 0 if permission is granted, -ve error otherwise.
866 * @key_free: 867 * @key_free:
867 * Notification of destruction; free security data. 868 * Notification of destruction; free security data.
@@ -1324,7 +1325,7 @@ struct security_operations {
1324 1325
1325 /* key management security hooks */ 1326 /* key management security hooks */
1326#ifdef CONFIG_KEYS 1327#ifdef CONFIG_KEYS
1327 int (*key_alloc)(struct key *key, struct task_struct *tsk); 1328 int (*key_alloc)(struct key *key, struct task_struct *tsk, unsigned long flags);
1328 void (*key_free)(struct key *key); 1329 void (*key_free)(struct key *key);
1329 int (*key_permission)(key_ref_t key_ref, 1330 int (*key_permission)(key_ref_t key_ref,
1330 struct task_struct *context, 1331 struct task_struct *context,
@@ -3040,9 +3041,10 @@ static inline int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid
3040#ifdef CONFIG_KEYS 3041#ifdef CONFIG_KEYS
3041#ifdef CONFIG_SECURITY 3042#ifdef CONFIG_SECURITY
3042static inline int security_key_alloc(struct key *key, 3043static inline int security_key_alloc(struct key *key,
3043 struct task_struct *tsk) 3044 struct task_struct *tsk,
3045 unsigned long flags)
3044{ 3046{
3045 return security_ops->key_alloc(key, tsk); 3047 return security_ops->key_alloc(key, tsk, flags);
3046} 3048}
3047 3049
3048static inline void security_key_free(struct key *key) 3050static inline void security_key_free(struct key *key)
@@ -3060,7 +3062,8 @@ static inline int security_key_permission(key_ref_t key_ref,
3060#else 3062#else
3061 3063
3062static inline int security_key_alloc(struct key *key, 3064static inline int security_key_alloc(struct key *key,
3063 struct task_struct *tsk) 3065 struct task_struct *tsk,
3066 unsigned long flags)
3064{ 3067{
3065 return 0; 3068 return 0;
3066} 3069}
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h
index 9b8bcf125c18..6e112cc5cdda 100644
--- a/include/linux/sunrpc/gss_api.h
+++ b/include/linux/sunrpc/gss_api.h
@@ -126,7 +126,7 @@ struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32);
126/* Just increments the mechanism's reference count and returns its input: */ 126/* Just increments the mechanism's reference count and returns its input: */
127struct gss_api_mech * gss_mech_get(struct gss_api_mech *); 127struct gss_api_mech * gss_mech_get(struct gss_api_mech *);
128 128
129/* For every succesful gss_mech_get or gss_mech_get_by_* call there must be a 129/* For every successful gss_mech_get or gss_mech_get_by_* call there must be a
130 * corresponding call to gss_mech_put. */ 130 * corresponding call to gss_mech_put. */
131void gss_mech_put(struct gss_api_mech *); 131void gss_mech_put(struct gss_api_mech *);
132 132
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 6a60770984e9..349ef908a222 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -148,9 +148,11 @@ enum
148 KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ 148 KERN_SPIN_RETRY=70, /* int: number of spinlock retries */
149 KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ 149 KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */
150 KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ 150 KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */
151 KERN_COMPAT_LOG=73, /* int: print compat layer messages */
151}; 152};
152 153
153 154
155
154/* CTL_VM names: */ 156/* CTL_VM names: */
155enum 157enum
156{ 158{
diff --git a/include/linux/time.h b/include/linux/time.h
index 0cd696cee998..c05f8bb9a323 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -28,10 +28,13 @@ struct timezone {
28#ifdef __KERNEL__ 28#ifdef __KERNEL__
29 29
30/* Parameters used to convert the timespec values: */ 30/* Parameters used to convert the timespec values: */
31#define MSEC_PER_SEC 1000L 31#define MSEC_PER_SEC 1000L
32#define USEC_PER_SEC 1000000L 32#define USEC_PER_MSEC 1000L
33#define NSEC_PER_SEC 1000000000L 33#define NSEC_PER_USEC 1000L
34#define NSEC_PER_USEC 1000L 34#define NSEC_PER_MSEC 1000000L
35#define USEC_PER_SEC 1000000L
36#define NSEC_PER_SEC 1000000000L
37#define FSEC_PER_SEC 1000000000000000L
35 38
36static inline int timespec_equal(struct timespec *a, struct timespec *b) 39static inline int timespec_equal(struct timespec *a, struct timespec *b)
37{ 40{
@@ -77,6 +80,8 @@ extern struct timespec xtime;
77extern struct timespec wall_to_monotonic; 80extern struct timespec wall_to_monotonic;
78extern seqlock_t xtime_lock; 81extern seqlock_t xtime_lock;
79 82
83void timekeeping_init(void);
84
80static inline unsigned long get_seconds(void) 85static inline unsigned long get_seconds(void)
81{ 86{
82 return xtime.tv_sec; 87 return xtime.tv_sec;
@@ -100,6 +105,7 @@ extern int do_getitimer(int which, struct itimerval *value);
100extern void getnstimeofday(struct timespec *tv); 105extern void getnstimeofday(struct timespec *tv);
101 106
102extern struct timespec timespec_trunc(struct timespec t, unsigned gran); 107extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
108extern int timekeeping_is_continuous(void);
103 109
104/** 110/**
105 * timespec_to_ns - Convert timespec to nanoseconds 111 * timespec_to_ns - Convert timespec to nanoseconds
@@ -142,6 +148,20 @@ extern struct timespec ns_to_timespec(const s64 nsec);
142 */ 148 */
143extern struct timeval ns_to_timeval(const s64 nsec); 149extern struct timeval ns_to_timeval(const s64 nsec);
144 150
151/**
152 * timespec_add_ns - Adds nanoseconds to a timespec
153 * @a: pointer to timespec to be incremented
154 * @ns: unsigned nanoseconds value to be added
155 */
156static inline void timespec_add_ns(struct timespec *a, u64 ns)
157{
158 ns += a->tv_nsec;
159 while(unlikely(ns >= NSEC_PER_SEC)) {
160 ns -= NSEC_PER_SEC;
161 a->tv_sec++;
162 }
163 a->tv_nsec = ns;
164}
145#endif /* __KERNEL__ */ 165#endif /* __KERNEL__ */
146 166
147#define NFDBITS __NFDBITS 167#define NFDBITS __NFDBITS
diff --git a/include/linux/timex.h b/include/linux/timex.h
index 34d3ccff7bbb..19bb6538b49e 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -303,6 +303,8 @@ time_interpolator_reset(void)
303 303
304#endif /* !CONFIG_TIME_INTERPOLATION */ 304#endif /* !CONFIG_TIME_INTERPOLATION */
305 305
306#define TICK_LENGTH_SHIFT 32
307
306/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ 308/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
307extern u64 current_tick_length(void); 309extern u64 current_tick_length(void);
308 310
diff --git a/include/linux/unwind.h b/include/linux/unwind.h
new file mode 100644
index 000000000000..ce48e2cd37a2
--- /dev/null
+++ b/include/linux/unwind.h
@@ -0,0 +1,127 @@
1#ifndef _LINUX_UNWIND_H
2#define _LINUX_UNWIND_H
3
4/*
5 * Copyright (C) 2002-2006 Novell, Inc.
6 * Jan Beulich <jbeulich@novell.com>
7 * This code is released under version 2 of the GNU GPL.
8 *
9 * A simple API for unwinding kernel stacks. This is used for
10 * debugging and error reporting purposes. The kernel doesn't need
11 * full-blown stack unwinding with all the bells and whistles, so there
12 * is not much point in implementing the full Dwarf2 unwind API.
13 */
14
15#include <linux/config.h>
16
17struct module;
18
19#ifdef CONFIG_STACK_UNWIND
20
21#include <asm/unwind.h>
22
23#ifndef ARCH_UNWIND_SECTION_NAME
24#define ARCH_UNWIND_SECTION_NAME ".eh_frame"
25#endif
26
27/*
28 * Initialize unwind support.
29 */
30extern void unwind_init(void);
31
32#ifdef CONFIG_MODULES
33
34extern void *unwind_add_table(struct module *,
35 const void *table_start,
36 unsigned long table_size);
37
38extern void unwind_remove_table(void *handle, int init_only);
39
40#endif
41
42extern int unwind_init_frame_info(struct unwind_frame_info *,
43 struct task_struct *,
44 /*const*/ struct pt_regs *);
45
46/*
47 * Prepare to unwind a blocked task.
48 */
49extern int unwind_init_blocked(struct unwind_frame_info *,
50 struct task_struct *);
51
52/*
53 * Prepare to unwind the currently running thread.
54 */
55extern int unwind_init_running(struct unwind_frame_info *,
56 asmlinkage int (*callback)(struct unwind_frame_info *,
57 void *arg),
58 void *arg);
59
60/*
61 * Unwind to previous to frame. Returns 0 if successful, negative
62 * number in case of an error.
63 */
64extern int unwind(struct unwind_frame_info *);
65
66/*
67 * Unwind until the return pointer is in user-land (or until an error
68 * occurs). Returns 0 if successful, negative number in case of
69 * error.
70 */
71extern int unwind_to_user(struct unwind_frame_info *);
72
73#else
74
75struct unwind_frame_info {};
76
77static inline void unwind_init(void) {}
78
79#ifdef CONFIG_MODULES
80
81static inline void *unwind_add_table(struct module *mod,
82 const void *table_start,
83 unsigned long table_size)
84{
85 return NULL;
86}
87
88#endif
89
90static inline void unwind_remove_table(void *handle, int init_only)
91{
92}
93
94static inline int unwind_init_frame_info(struct unwind_frame_info *info,
95 struct task_struct *tsk,
96 const struct pt_regs *regs)
97{
98 return -ENOSYS;
99}
100
101static inline int unwind_init_blocked(struct unwind_frame_info *info,
102 struct task_struct *tsk)
103{
104 return -ENOSYS;
105}
106
107static inline int unwind_init_running(struct unwind_frame_info *info,
108 asmlinkage int (*cb)(struct unwind_frame_info *,
109 void *arg),
110 void *arg)
111{
112 return -ENOSYS;
113}
114
115static inline int unwind(struct unwind_frame_info *info)
116{
117 return -ENOSYS;
118}
119
120static inline int unwind_to_user(struct unwind_frame_info *info)
121{
122 return -ENOSYS;
123}
124
125#endif
126
127#endif /* _LINUX_UNWIND_H */
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 4f428547ec09..a62673dad76e 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -245,6 +245,7 @@ struct v4l2_pix_format
245#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ 245#define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */
246#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ 246#define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */
247#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ 247#define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */
248#define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:1:1 16x16 macroblocks */
248 249
249/* see http://www.siliconimaging.com/RGB%20Bayer.htm */ 250/* see http://www.siliconimaging.com/RGB%20Bayer.htm */
250#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ 251#define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */
@@ -821,6 +822,11 @@ enum v4l2_mpeg_stream_type {
821#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) 822#define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4)
822#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) 823#define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5)
823#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) 824#define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6)
825#define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7)
826enum v4l2_mpeg_stream_vbi_fmt {
827 V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */
828 V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */
829};
824 830
825/* MPEG audio */ 831/* MPEG audio */
826#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) 832#define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100)