diff options
Diffstat (limited to 'include/linux')
61 files changed, 1318 insertions, 133 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 90d6df1551ed..88b5dfd8ee12 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -528,12 +528,18 @@ static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; } | |||
528 | 528 | ||
529 | #ifdef CONFIG_ACPI_NUMA | 529 | #ifdef CONFIG_ACPI_NUMA |
530 | int acpi_get_pxm(acpi_handle handle); | 530 | int acpi_get_pxm(acpi_handle handle); |
531 | int acpi_get_node(acpi_handle *handle); | ||
531 | #else | 532 | #else |
532 | static inline int acpi_get_pxm(acpi_handle handle) | 533 | static inline int acpi_get_pxm(acpi_handle handle) |
533 | { | 534 | { |
534 | return 0; | 535 | return 0; |
535 | } | 536 | } |
537 | static inline int acpi_get_node(acpi_handle *handle) | ||
538 | { | ||
539 | return 0; | ||
540 | } | ||
536 | #endif | 541 | #endif |
542 | extern int acpi_paddr_to_node(u64 start_addr, u64 size); | ||
537 | 543 | ||
538 | extern int pnpacpi_disabled; | 544 | extern int pnpacpi_disabled; |
539 | 545 | ||
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 | ||
245 | static inline int bitmap_weight(const unsigned long *src, int nbits) | 248 | static 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/buffer_head.h b/include/linux/buffer_head.h index fb7e9b7ccbe3..737e407d0cd1 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -149,7 +149,6 @@ void create_empty_buffers(struct page *, unsigned long, | |||
149 | unsigned long b_state); | 149 | unsigned long b_state); |
150 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); | 150 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); |
151 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); | 151 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); |
152 | void end_buffer_async_write(struct buffer_head *bh, int uptodate); | ||
153 | 152 | ||
154 | /* Things to do with buffers at mapping->private_list */ | 153 | /* Things to do with buffers at mapping->private_list */ |
155 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); | 154 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); |
@@ -214,6 +213,7 @@ int nobh_truncate_page(struct address_space *, loff_t); | |||
214 | int nobh_writepage(struct page *page, get_block_t *get_block, | 213 | int nobh_writepage(struct page *page, get_block_t *get_block, |
215 | struct writeback_control *wbc); | 214 | struct writeback_control *wbc); |
216 | 215 | ||
216 | void buffer_init(void); | ||
217 | 217 | ||
218 | /* | 218 | /* |
219 | * inline definitions | 219 | * inline definitions |
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 */ | ||
19 | typedef 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 | */ | ||
52 | struct 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 | */ | ||
80 | static 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 | */ | ||
106 | static 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 | */ | ||
129 | static 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 | */ | ||
143 | static 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 | */ | ||
161 | static 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 */ | ||
181 | int clocksource_register(struct clocksource*); | ||
182 | void clocksource_reselect(void); | ||
183 | struct 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 | ||
227 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); | 227 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); |
228 | 228 | ||
229 | extern 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) | |||
673 | COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) | 673 | COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) |
674 | COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) | 674 | COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) |
675 | COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) | 675 | COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) |
676 | /* Siemens Gigaset */ | ||
677 | COMPATIBLE_IOCTL(GIGASET_REDIR) | ||
678 | COMPATIBLE_IOCTL(GIGASET_CONFIG) | ||
679 | COMPATIBLE_IOCTL(GIGASET_BRKCHARS) | ||
680 | COMPATIBLE_IOCTL(GIGASET_VERSION) | ||
676 | /* Misc. */ | 681 | /* Misc. */ |
677 | COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ | 682 | COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ |
678 | COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ | 683 | COMPATIBLE_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 */ | |||
63 | extern const struct consw newport_con; /* SGI Newport console */ | 63 | extern const struct consw newport_con; /* SGI Newport console */ |
64 | extern const struct consw prom_con; /* SPARC PROM console */ | 64 | extern const struct consw prom_con; /* SPARC PROM console */ |
65 | 65 | ||
66 | int con_is_bound(const struct consw *csw); | ||
67 | int register_con_driver(const struct consw *csw, int first, int last); | ||
68 | int unregister_con_driver(const struct consw *csw); | ||
66 | int take_over_console(const struct consw *sw, int first, int last, int deflt); | 69 | int take_over_console(const struct consw *sw, int first, int last, int deflt); |
67 | void give_up_console(const struct consw *sw); | 70 | void 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/cpu.h b/include/linux/cpu.h index 08d50c53aab4..a3caf6866bae 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -31,17 +31,23 @@ struct cpu { | |||
31 | struct sys_device sysdev; | 31 | struct sys_device sysdev; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | extern int register_cpu(struct cpu *, int, struct node *); | 34 | extern int register_cpu(struct cpu *cpu, int num); |
35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); | 35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); |
36 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
37 | extern void unregister_cpu(struct cpu *, struct node *); | 37 | extern void unregister_cpu(struct cpu *cpu); |
38 | #endif | 38 | #endif |
39 | struct notifier_block; | 39 | struct notifier_block; |
40 | 40 | ||
41 | #ifdef CONFIG_SMP | 41 | #ifdef CONFIG_SMP |
42 | /* Need to know about CPUs going up/down? */ | 42 | /* Need to know about CPUs going up/down? */ |
43 | extern int register_cpu_notifier(struct notifier_block *nb); | 43 | extern int register_cpu_notifier(struct notifier_block *nb); |
44 | #ifdef CONFIG_HOTPLUG_CPU | ||
44 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 45 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
46 | #else | ||
47 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | ||
48 | { | ||
49 | } | ||
50 | #endif | ||
45 | extern int current_in_cpu_hotplug(void); | 51 | extern int current_in_cpu_hotplug(void); |
46 | 52 | ||
47 | int cpu_up(unsigned int cpu); | 53 | int cpu_up(unsigned int cpu); |
@@ -73,6 +79,8 @@ extern int lock_cpu_hotplug_interruptible(void); | |||
73 | { .notifier_call = fn, .priority = pri }; \ | 79 | { .notifier_call = fn, .priority = pri }; \ |
74 | register_cpu_notifier(&fn##_nb); \ | 80 | register_cpu_notifier(&fn##_nb); \ |
75 | } | 81 | } |
82 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | ||
83 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | ||
76 | int cpu_down(unsigned int cpu); | 84 | int cpu_down(unsigned int cpu); |
77 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | 85 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
78 | #else | 86 | #else |
@@ -80,6 +88,8 @@ int cpu_down(unsigned int cpu); | |||
80 | #define unlock_cpu_hotplug() do { } while (0) | 88 | #define unlock_cpu_hotplug() do { } while (0) |
81 | #define lock_cpu_hotplug_interruptible() 0 | 89 | #define lock_cpu_hotplug_interruptible() 0 |
82 | #define hotcpu_notifier(fn, pri) | 90 | #define hotcpu_notifier(fn, pri) |
91 | #define register_hotcpu_notifier(nb) | ||
92 | #define unregister_hotcpu_notifier(nb) | ||
83 | 93 | ||
84 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ | 94 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ |
85 | static inline int cpu_is_offline(int cpu) { return 0; } | 95 | static inline int cpu_is_offline(int cpu) { return 0; } |
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 | ||
67 | struct cipher_desc { | 67 | struct 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 { | |||
79 | struct cipher_alg { | 79 | struct 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 | ||
101 | struct digest_alg { | 101 | struct 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 | ||
110 | struct compress_alg { | 111 | struct 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 | |||
11 | struct dm_target; | 13 | struct dm_target; |
12 | struct dm_table; | 14 | struct dm_table; |
13 | struct dm_dev; | 15 | struct dm_dev; |
16 | struct mapped_device; | ||
14 | 17 | ||
15 | typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | 18 | typedef 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); | |||
78 | struct target_type { | 81 | struct 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 { | |||
128 | int dm_register_target(struct target_type *t); | 131 | int dm_register_target(struct target_type *t); |
129 | int dm_unregister_target(struct target_type *t); | 132 | int 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) | ||
144 | int dm_create(int minor, struct mapped_device **md); | ||
145 | |||
146 | /* | ||
147 | * Reference counting for md. | ||
148 | */ | ||
149 | struct mapped_device *dm_get_md(dev_t dev); | ||
150 | void dm_get(struct mapped_device *md); | ||
151 | void dm_put(struct mapped_device *md); | ||
152 | |||
153 | /* | ||
154 | * An arbitrary pointer may be stored alongside a mapped device. | ||
155 | */ | ||
156 | void dm_set_mdptr(struct mapped_device *md, void *ptr); | ||
157 | void *dm_get_mdptr(struct mapped_device *md); | ||
158 | |||
159 | /* | ||
160 | * A device can still be used while suspended, but I/O is deferred. | ||
161 | */ | ||
162 | int dm_suspend(struct mapped_device *md, int with_lockfs); | ||
163 | int dm_resume(struct mapped_device *md); | ||
164 | |||
165 | /* | ||
166 | * Event functions. | ||
167 | */ | ||
168 | uint32_t dm_get_event_nr(struct mapped_device *md); | ||
169 | int dm_wait_event(struct mapped_device *md, int event_nr); | ||
170 | |||
171 | /* | ||
172 | * Info functions. | ||
173 | */ | ||
174 | const char *dm_device_name(struct mapped_device *md); | ||
175 | struct gendisk *dm_disk(struct mapped_device *md); | ||
176 | int dm_suspended(struct mapped_device *md); | ||
177 | |||
178 | /* | ||
179 | * Geometry functions. | ||
180 | */ | ||
181 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); | ||
182 | int 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 | */ | ||
192 | int 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 | */ | ||
198 | int 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 | */ | ||
204 | int dm_table_complete(struct dm_table *t); | ||
205 | |||
206 | /* | ||
207 | * Table reference counting. | ||
208 | */ | ||
209 | struct dm_table *dm_get_table(struct mapped_device *md); | ||
210 | void dm_table_get(struct dm_table *t); | ||
211 | void dm_table_put(struct dm_table *t); | ||
212 | |||
213 | /* | ||
214 | * Queries | ||
215 | */ | ||
216 | sector_t dm_table_get_size(struct dm_table *t); | ||
217 | unsigned int dm_table_get_num_targets(struct dm_table *t); | ||
218 | int dm_table_get_mode(struct dm_table *t); | ||
219 | struct mapped_device *dm_table_get_md(struct dm_table *t); | ||
220 | |||
221 | /* | ||
222 | * Trigger an event. | ||
223 | */ | ||
224 | void dm_table_event(struct dm_table *t); | ||
225 | |||
226 | /* | ||
227 | * The device must be suspended before calling this method. | ||
228 | */ | ||
229 | int 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 | */ | ||
235 | int 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/dmaengine.h b/include/linux/dmaengine.h index 78b236ca04f8..272010a6078a 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef DMAENGINE_H | 21 | #ifndef DMAENGINE_H |
22 | #define DMAENGINE_H | 22 | #define DMAENGINE_H |
23 | #include <linux/config.h> | 23 | |
24 | #ifdef CONFIG_DMA_ENGINE | 24 | #ifdef CONFIG_DMA_ENGINE |
25 | 25 | ||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
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 | ||
525 | struct fb_event { | 521 | struct 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); |
893 | extern int fb_get_options(char *name, char **option); | 889 | extern int fb_get_options(char *name, char **option); |
894 | extern int fb_new_modelist(struct fb_info *info); | 890 | extern int fb_new_modelist(struct fb_info *info); |
895 | extern int fb_con_duit(struct fb_info *info, int event, void *data); | ||
896 | 891 | ||
897 | extern struct fb_info *registered_fb[FB_MAX]; | 892 | extern struct fb_info *registered_fb[FB_MAX]; |
898 | extern int num_registered_fb; | 893 | extern int num_registered_fb; |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 966a5b3da439..34c3a215f2cd 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -12,6 +12,9 @@ | |||
12 | #define FUTEX_REQUEUE 3 | 12 | #define FUTEX_REQUEUE 3 |
13 | #define FUTEX_CMP_REQUEUE 4 | 13 | #define FUTEX_CMP_REQUEUE 4 |
14 | #define FUTEX_WAKE_OP 5 | 14 | #define FUTEX_WAKE_OP 5 |
15 | #define FUTEX_LOCK_PI 6 | ||
16 | #define FUTEX_UNLOCK_PI 7 | ||
17 | #define FUTEX_TRYLOCK_PI 8 | ||
15 | 18 | ||
16 | /* | 19 | /* |
17 | * Support for robust futexes: the kernel cleans up held futexes at | 20 | * Support for robust futexes: the kernel cleans up held futexes at |
@@ -90,18 +93,21 @@ struct robust_list_head { | |||
90 | */ | 93 | */ |
91 | #define ROBUST_LIST_LIMIT 2048 | 94 | #define ROBUST_LIST_LIMIT 2048 |
92 | 95 | ||
93 | long do_futex(unsigned long uaddr, int op, int val, | 96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, |
94 | unsigned long timeout, unsigned long uaddr2, int val2, | 97 | u32 __user *uaddr2, u32 val2, u32 val3); |
95 | int val3); | ||
96 | 98 | ||
97 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); | 99 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); |
98 | 100 | ||
99 | #ifdef CONFIG_FUTEX | 101 | #ifdef CONFIG_FUTEX |
100 | extern void exit_robust_list(struct task_struct *curr); | 102 | extern void exit_robust_list(struct task_struct *curr); |
103 | extern void exit_pi_state_list(struct task_struct *curr); | ||
101 | #else | 104 | #else |
102 | static inline void exit_robust_list(struct task_struct *curr) | 105 | static inline void exit_robust_list(struct task_struct *curr) |
103 | { | 106 | { |
104 | } | 107 | } |
108 | static inline void exit_pi_state_list(struct task_struct *curr) | ||
109 | { | ||
110 | } | ||
105 | #endif | 111 | #endif |
106 | 112 | ||
107 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ | 113 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ |
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 | */ | ||
32 | struct 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. */ | ||
45 | extern int hwrng_register(struct hwrng *rng); | ||
46 | /** Unregister a Hardware Random Number Generator driver. */ | ||
47 | extern 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); | |||
78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | 78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); |
79 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 79 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
81 | void *idr_replace(struct idr *idp, void *ptr, int id); | ||
81 | void idr_remove(struct idr *idp, int id); | 82 | void idr_remove(struct idr *idp, int id); |
82 | void idr_destroy(struct idr *idp); | 83 | void idr_destroy(struct idr *idp); |
83 | void idr_init(struct idr *idp); | 84 | void idr_init(struct idr *idp); |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 41ecbb847f32..3a256957fb56 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -87,6 +87,7 @@ extern struct group_info init_groups; | |||
87 | .lock_depth = -1, \ | 87 | .lock_depth = -1, \ |
88 | .prio = MAX_PRIO-20, \ | 88 | .prio = MAX_PRIO-20, \ |
89 | .static_prio = MAX_PRIO-20, \ | 89 | .static_prio = MAX_PRIO-20, \ |
90 | .normal_prio = MAX_PRIO-20, \ | ||
90 | .policy = SCHED_NORMAL, \ | 91 | .policy = SCHED_NORMAL, \ |
91 | .cpus_allowed = CPU_MASK_ALL, \ | 92 | .cpus_allowed = CPU_MASK_ALL, \ |
92 | .mm = NULL, \ | 93 | .mm = NULL, \ |
@@ -119,10 +120,11 @@ extern struct group_info init_groups; | |||
119 | .signal = {{0}}}, \ | 120 | .signal = {{0}}}, \ |
120 | .blocked = {{0}}, \ | 121 | .blocked = {{0}}, \ |
121 | .alloc_lock = SPIN_LOCK_UNLOCKED, \ | 122 | .alloc_lock = SPIN_LOCK_UNLOCKED, \ |
122 | .proc_lock = SPIN_LOCK_UNLOCKED, \ | ||
123 | .journal_info = NULL, \ | 123 | .journal_info = NULL, \ |
124 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ | 124 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ |
125 | .fs_excl = ATOMIC_INIT(0), \ | 125 | .fs_excl = ATOMIC_INIT(0), \ |
126 | .pi_lock = SPIN_LOCK_UNLOCKED, \ | ||
127 | INIT_RT_MUTEXES(tsk) \ | ||
126 | } | 128 | } |
127 | 129 | ||
128 | 130 | ||
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 | ||
1007 | struct input_dev *input_allocate_device(void); | 1008 | struct input_dev *input_allocate_device(void); |
1009 | void input_free_device(struct input_dev *dev); | ||
1008 | 1010 | ||
1009 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1011 | static 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 | ||
1019 | static inline void input_free_device(struct input_dev *dev) | ||
1020 | { | ||
1021 | if (dev) | ||
1022 | input_put_device(dev); | ||
1023 | } | ||
1024 | |||
1025 | int input_register_device(struct input_dev *); | 1021 | int input_register_device(struct input_dev *); |
1026 | void input_unregister_device(struct input_dev *); | 1022 | void input_unregister_device(struct input_dev *); |
1027 | 1023 | ||
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index cd6bd001ba4e..edfc733b1575 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -105,6 +105,9 @@ extern int allocate_resource(struct resource *root, struct resource *new, | |||
105 | int adjust_resource(struct resource *res, unsigned long start, | 105 | int adjust_resource(struct resource *res, unsigned long start, |
106 | unsigned long size); | 106 | unsigned long size); |
107 | 107 | ||
108 | /* get registered SYSTEM_RAM resources in specified area */ | ||
109 | extern int find_next_system_ram(struct resource *res); | ||
110 | |||
108 | /* Convenience shorthand with allocation */ | 111 | /* Convenience shorthand with allocation */ |
109 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) | 112 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) |
110 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) | 113 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 5653b2f23b6a..d09fbeabf1dc 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -210,11 +210,7 @@ struct kernel_ipmi_msg | |||
210 | #include <linux/list.h> | 210 | #include <linux/list.h> |
211 | #include <linux/module.h> | 211 | #include <linux/module.h> |
212 | #include <linux/device.h> | 212 | #include <linux/device.h> |
213 | |||
214 | #ifdef CONFIG_PROC_FS | ||
215 | #include <linux/proc_fs.h> | 213 | #include <linux/proc_fs.h> |
216 | extern struct proc_dir_entry *proc_ipmi_root; | ||
217 | #endif /* CONFIG_PROC_FS */ | ||
218 | 214 | ||
219 | /* Opaque type for a IPMI message user. One of these is needed to | 215 | /* Opaque type for a IPMI message user. One of these is needed to |
220 | send and receive messages. */ | 216 | send and receive messages. */ |
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index c6f70660b371..c9c760700bc3 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
@@ -186,6 +186,7 @@ struct jffs2_raw_xref | |||
186 | jint32_t hdr_crc; | 186 | jint32_t hdr_crc; |
187 | jint32_t ino; /* inode number */ | 187 | jint32_t ino; /* inode number */ |
188 | jint32_t xid; /* XATTR identifier number */ | 188 | jint32_t xid; /* XATTR identifier number */ |
189 | jint32_t xseqno; /* xref sequencial number */ | ||
189 | jint32_t node_crc; | 190 | jint32_t node_crc; |
190 | } __attribute__((packed)); | 191 | } __attribute__((packed)); |
191 | 192 | ||
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 | |||
252 | extern int key_payload_reserve(struct key *key, size_t datalen); | 259 | extern int key_payload_reserve(struct key *key, size_t datalen); |
253 | extern int key_instantiate_and_link(struct key *key, | 260 | extern 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 | ||
290 | extern int key_update(key_ref_t key, | 297 | extern 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 | ||
300 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | 307 | extern 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 | ||
305 | extern int keyring_clear(struct key *keyring); | 312 | extern int keyring_clear(struct key *keyring); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 20b1cf527c60..f4284bf89758 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <asm/scatterlist.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <linux/ata.h> | 35 | #include <linux/ata.h> |
35 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
@@ -887,6 +888,9 @@ static inline unsigned int ata_tag_internal(unsigned int tag) | |||
887 | return tag == ATA_MAX_QUEUE - 1; | 888 | return tag == ATA_MAX_QUEUE - 1; |
888 | } | 889 | } |
889 | 890 | ||
891 | /* | ||
892 | * device helpers | ||
893 | */ | ||
890 | static inline unsigned int ata_class_enabled(unsigned int class) | 894 | static inline unsigned int ata_class_enabled(unsigned int class) |
891 | { | 895 | { |
892 | return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; | 896 | return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; |
@@ -917,6 +921,17 @@ static inline unsigned int ata_dev_absent(const struct ata_device *dev) | |||
917 | return ata_class_absent(dev->class); | 921 | return ata_class_absent(dev->class); |
918 | } | 922 | } |
919 | 923 | ||
924 | /* | ||
925 | * port helpers | ||
926 | */ | ||
927 | static inline int ata_port_max_devices(const struct ata_port *ap) | ||
928 | { | ||
929 | if (ap->flags & ATA_FLAG_SLAVE_POSS) | ||
930 | return 2; | ||
931 | return 1; | ||
932 | } | ||
933 | |||
934 | |||
920 | static inline u8 ata_chk_status(struct ata_port *ap) | 935 | static inline u8 ata_chk_status(struct ata_port *ap) |
921 | { | 936 | { |
922 | return ap->ops->check_status(ap); | 937 | return ap->ops->check_status(ap); |
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 | |||
4 | static 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/list.h b/include/linux/list.h index 37ca31b21bb7..6b74adf5297f 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -4,18 +4,11 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
7 | #include <linux/poison.h> | ||
7 | #include <linux/prefetch.h> | 8 | #include <linux/prefetch.h> |
8 | #include <asm/system.h> | 9 | #include <asm/system.h> |
9 | 10 | ||
10 | /* | 11 | /* |
11 | * These are non-NULL pointers that will result in page faults | ||
12 | * under normal circumstances, used to verify that nobody uses | ||
13 | * non-initialized list entries. | ||
14 | */ | ||
15 | #define LIST_POISON1 ((void *) 0x00100100) | ||
16 | #define LIST_POISON2 ((void *) 0x00200200) | ||
17 | |||
18 | /* | ||
19 | * Simple doubly linked list implementation. | 12 | * Simple doubly linked list implementation. |
20 | * | 13 | * |
21 | * Some of the internal functions ("__xxx") are useful when | 14 | * Some of the internal functions ("__xxx") are useful when |
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/memory_hotplug.h b/include/linux/memory_hotplug.h index 911206386171..218501cfaeb9 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -63,6 +63,76 @@ extern int online_pages(unsigned long, unsigned long); | |||
63 | /* reasonably generic interface to expand the physical pages in a zone */ | 63 | /* reasonably generic interface to expand the physical pages in a zone */ |
64 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, | 64 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, |
65 | unsigned long nr_pages); | 65 | unsigned long nr_pages); |
66 | |||
67 | #ifdef CONFIG_NUMA | ||
68 | extern int memory_add_physaddr_to_nid(u64 start); | ||
69 | #else | ||
70 | static inline int memory_add_physaddr_to_nid(u64 start) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | #endif | ||
75 | |||
76 | #ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION | ||
77 | /* | ||
78 | * For supporting node-hotadd, we have to allocate a new pgdat. | ||
79 | * | ||
80 | * If an arch has generic style NODE_DATA(), | ||
81 | * node_data[nid] = kzalloc() works well. But it depends on the architecture. | ||
82 | * | ||
83 | * In general, generic_alloc_nodedata() is used. | ||
84 | * Now, arch_free_nodedata() is just defined for error path of node_hot_add. | ||
85 | * | ||
86 | */ | ||
87 | extern pg_data_t *arch_alloc_nodedata(int nid); | ||
88 | extern void arch_free_nodedata(pg_data_t *pgdat); | ||
89 | extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat); | ||
90 | |||
91 | #else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ | ||
92 | |||
93 | #define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid) | ||
94 | #define arch_free_nodedata(pgdat) generic_free_nodedata(pgdat) | ||
95 | |||
96 | #ifdef CONFIG_NUMA | ||
97 | /* | ||
98 | * If ARCH_HAS_NODEDATA_EXTENSION=n, this func is used to allocate pgdat. | ||
99 | * XXX: kmalloc_node() can't work well to get new node's memory at this time. | ||
100 | * Because, pgdat for the new node is not allocated/initialized yet itself. | ||
101 | * To use new node's memory, more consideration will be necessary. | ||
102 | */ | ||
103 | #define generic_alloc_nodedata(nid) \ | ||
104 | ({ \ | ||
105 | kzalloc(sizeof(pg_data_t), GFP_KERNEL); \ | ||
106 | }) | ||
107 | /* | ||
108 | * This definition is just for error path in node hotadd. | ||
109 | * For node hotremove, we have to replace this. | ||
110 | */ | ||
111 | #define generic_free_nodedata(pgdat) kfree(pgdat) | ||
112 | |||
113 | extern pg_data_t *node_data[]; | ||
114 | static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) | ||
115 | { | ||
116 | node_data[nid] = pgdat; | ||
117 | } | ||
118 | |||
119 | #else /* !CONFIG_NUMA */ | ||
120 | |||
121 | /* never called */ | ||
122 | static inline pg_data_t *generic_alloc_nodedata(int nid) | ||
123 | { | ||
124 | BUG(); | ||
125 | return NULL; | ||
126 | } | ||
127 | static inline void generic_free_nodedata(pg_data_t *pgdat) | ||
128 | { | ||
129 | } | ||
130 | static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) | ||
131 | { | ||
132 | } | ||
133 | #endif /* CONFIG_NUMA */ | ||
134 | #endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ | ||
135 | |||
66 | #else /* ! CONFIG_MEMORY_HOTPLUG */ | 136 | #else /* ! CONFIG_MEMORY_HOTPLUG */ |
67 | /* | 137 | /* |
68 | * Stub functions for when hotplug is off | 138 | * Stub functions for when hotplug is off |
@@ -99,7 +169,8 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | |||
99 | return -ENOSYS; | 169 | return -ENOSYS; |
100 | } | 170 | } |
101 | 171 | ||
102 | extern int add_memory(u64 start, u64 size); | 172 | extern int add_memory(int nid, u64 start, u64 size); |
173 | extern int arch_add_memory(int nid, u64 start, u64 size); | ||
103 | extern int remove_memory(u64 start, u64 size); | 174 | extern int remove_memory(u64 start, u64 size); |
104 | 175 | ||
105 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 176 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a929ea197e48..c41a1299b8cf 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1030,13 +1030,20 @@ static inline void vm_stat_account(struct mm_struct *mm, | |||
1030 | } | 1030 | } |
1031 | #endif /* CONFIG_PROC_FS */ | 1031 | #endif /* CONFIG_PROC_FS */ |
1032 | 1032 | ||
1033 | static inline void | ||
1034 | debug_check_no_locks_freed(const void *from, unsigned long len) | ||
1035 | { | ||
1036 | mutex_debug_check_no_locks_freed(from, len); | ||
1037 | rt_mutex_debug_check_no_locks_freed(from, len); | ||
1038 | } | ||
1039 | |||
1033 | #ifndef CONFIG_DEBUG_PAGEALLOC | 1040 | #ifndef CONFIG_DEBUG_PAGEALLOC |
1034 | static inline void | 1041 | static inline void |
1035 | kernel_map_pages(struct page *page, int numpages, int enable) | 1042 | kernel_map_pages(struct page *page, int numpages, int enable) |
1036 | { | 1043 | { |
1037 | if (!PageHighMem(page) && !enable) | 1044 | if (!PageHighMem(page) && !enable) |
1038 | mutex_debug_check_no_locks_freed(page_address(page), | 1045 | debug_check_no_locks_freed(page_address(page), |
1039 | numpages * PAGE_SIZE); | 1046 | numpages * PAGE_SIZE); |
1040 | } | 1047 | } |
1041 | #endif | 1048 | #endif |
1042 | 1049 | ||
@@ -1065,5 +1072,7 @@ void drop_slab(void); | |||
1065 | extern int randomize_va_space; | 1072 | extern int randomize_va_space; |
1066 | #endif | 1073 | #endif |
1067 | 1074 | ||
1075 | const char *arch_vma_name(struct vm_area_struct *vma); | ||
1076 | |||
1068 | #endif /* __KERNEL__ */ | 1077 | #endif /* __KERNEL__ */ |
1069 | #endif /* _LINUX_MM_H */ | 1078 | #endif /* _LINUX_MM_H */ |
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 | ||
700 | extern void dev_init(void); | 700 | extern void dev_init(void); |
701 | 701 | ||
702 | extern int netdev_nit; | ||
703 | extern int netdev_budget; | 702 | extern 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 | ||
36 | void netpoll_poll(struct netpoll *np); | 37 | void netpoll_poll(struct netpoll *np); |
diff --git a/include/linux/node.h b/include/linux/node.h index 254dc3de650b..81dcec84cd8f 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -26,8 +26,25 @@ struct node { | |||
26 | struct sys_device sysdev; | 26 | struct sys_device sysdev; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | extern struct node node_devices[]; | ||
30 | |||
29 | extern int register_node(struct node *, int, struct node *); | 31 | extern int register_node(struct node *, int, struct node *); |
30 | extern void unregister_node(struct node *node); | 32 | extern void unregister_node(struct node *node); |
33 | extern int register_one_node(int nid); | ||
34 | extern void unregister_one_node(int nid); | ||
35 | #ifdef CONFIG_NUMA | ||
36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | ||
37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | ||
38 | #else | ||
39 | static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | #endif | ||
31 | 48 | ||
32 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 49 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
33 | 50 | ||
diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h new file mode 100644 index 000000000000..135742cfada5 --- /dev/null +++ b/include/linux/nsc_gpio.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /** | ||
2 | nsc_gpio.c | ||
3 | |||
4 | National Semiconductor GPIO common access methods. | ||
5 | |||
6 | struct nsc_gpio_ops abstracts the low-level access | ||
7 | operations for the GPIO units on 2 NSC chip families; the GEODE | ||
8 | integrated CPU, and the PC-8736[03456] integrated PC-peripheral | ||
9 | chips. | ||
10 | |||
11 | The GPIO units on these chips have the same pin architecture, but | ||
12 | the access methods differ. Thus, scx200_gpio and pc8736x_gpio | ||
13 | implement their own versions of these routines; and use the common | ||
14 | file-operations routines implemented in nsc_gpio module. | ||
15 | |||
16 | Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com> | ||
17 | |||
18 | NB: this work was tested on the Geode SC-1100 and PC-87366 chips. | ||
19 | NSC sold the GEODE line to AMD, and the PC-8736x line to Winbond. | ||
20 | */ | ||
21 | |||
22 | struct nsc_gpio_ops { | ||
23 | struct module* owner; | ||
24 | u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); | ||
25 | void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); | ||
26 | int (*gpio_get) (unsigned iminor); | ||
27 | void (*gpio_set) (unsigned iminor, int state); | ||
28 | void (*gpio_set_high)(unsigned iminor); | ||
29 | void (*gpio_set_low) (unsigned iminor); | ||
30 | void (*gpio_change) (unsigned iminor); | ||
31 | int (*gpio_current) (unsigned iminor); | ||
32 | struct device* dev; /* for dev_dbg() support, set in init */ | ||
33 | }; | ||
34 | |||
35 | extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, | ||
36 | size_t len, loff_t *ppos); | ||
37 | |||
38 | extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, | ||
39 | size_t len, loff_t *ppos); | ||
40 | |||
41 | extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index); | ||
42 | |||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c2fd2d19938b..9ae6b1a75366 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1202,6 +1202,7 @@ | |||
1202 | #define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF | 1202 | #define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF |
1203 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 | 1203 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 |
1204 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 | 1204 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 |
1205 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448 | ||
1205 | #define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 | 1206 | #define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 |
1206 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 | 1207 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 |
1207 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 | 1208 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 |
@@ -2170,7 +2171,6 @@ | |||
2170 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 | 2171 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 |
2171 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e | 2172 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e |
2172 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 | 2173 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 |
2173 | #define PCI_DEVICE_ID_INTEL_GD31244 0x3200 | ||
2174 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2174 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2175 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2175 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2176 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2176 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
diff --git a/include/linux/plist.h b/include/linux/plist.h new file mode 100644 index 000000000000..3404faef542c --- /dev/null +++ b/include/linux/plist.h | |||
@@ -0,0 +1,247 @@ | |||
1 | /* | ||
2 | * Descending-priority-sorted double-linked list | ||
3 | * | ||
4 | * (C) 2002-2003 Intel Corp | ||
5 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>. | ||
6 | * | ||
7 | * 2001-2005 (c) MontaVista Software, Inc. | ||
8 | * Daniel Walker <dwalker@mvista.com> | ||
9 | * | ||
10 | * (C) 2005 Thomas Gleixner <tglx@linutronix.de> | ||
11 | * | ||
12 | * Simplifications of the original code by | ||
13 | * Oleg Nesterov <oleg@tv-sign.ru> | ||
14 | * | ||
15 | * Licensed under the FSF's GNU Public License v2 or later. | ||
16 | * | ||
17 | * Based on simple lists (include/linux/list.h). | ||
18 | * | ||
19 | * This is a priority-sorted list of nodes; each node has a | ||
20 | * priority from INT_MIN (highest) to INT_MAX (lowest). | ||
21 | * | ||
22 | * Addition is O(K), removal is O(1), change of priority of a node is | ||
23 | * O(K) and K is the number of RT priority levels used in the system. | ||
24 | * (1 <= K <= 99) | ||
25 | * | ||
26 | * This list is really a list of lists: | ||
27 | * | ||
28 | * - The tier 1 list is the prio_list, different priority nodes. | ||
29 | * | ||
30 | * - The tier 2 list is the node_list, serialized nodes. | ||
31 | * | ||
32 | * Simple ASCII art explanation: | ||
33 | * | ||
34 | * |HEAD | | ||
35 | * | | | ||
36 | * |prio_list.prev|<------------------------------------| | ||
37 | * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-| | ||
38 | * |10 | |10| |21| |21| |21| |40| (prio) | ||
39 | * | | | | | | | | | | | | | ||
40 | * | | | | | | | | | | | | | ||
41 | * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-| | ||
42 | * |node_list.prev|<------------------------------------| | ||
43 | * | ||
44 | * The nodes on the prio_list list are sorted by priority to simplify | ||
45 | * the insertion of new nodes. There are no nodes with duplicate | ||
46 | * priorites on the list. | ||
47 | * | ||
48 | * The nodes on the node_list is ordered by priority and can contain | ||
49 | * entries which have the same priority. Those entries are ordered | ||
50 | * FIFO | ||
51 | * | ||
52 | * Addition means: look for the prio_list node in the prio_list | ||
53 | * for the priority of the node and insert it before the node_list | ||
54 | * entry of the next prio_list node. If it is the first node of | ||
55 | * that priority, add it to the prio_list in the right position and | ||
56 | * insert it into the serialized node_list list | ||
57 | * | ||
58 | * Removal means remove it from the node_list and remove it from | ||
59 | * the prio_list if the node_list list_head is non empty. In case | ||
60 | * of removal from the prio_list it must be checked whether other | ||
61 | * entries of the same priority are on the list or not. If there | ||
62 | * is another entry of the same priority then this entry has to | ||
63 | * replace the removed entry on the prio_list. If the entry which | ||
64 | * is removed is the only entry of this priority then a simple | ||
65 | * remove from both list is sufficient. | ||
66 | * | ||
67 | * INT_MIN is the highest priority, 0 is the medium highest, INT_MAX | ||
68 | * is lowest priority. | ||
69 | * | ||
70 | * No locking is done, up to the caller. | ||
71 | * | ||
72 | */ | ||
73 | #ifndef _LINUX_PLIST_H_ | ||
74 | #define _LINUX_PLIST_H_ | ||
75 | |||
76 | #include <linux/list.h> | ||
77 | #include <linux/spinlock_types.h> | ||
78 | |||
79 | struct plist_head { | ||
80 | struct list_head prio_list; | ||
81 | struct list_head node_list; | ||
82 | #ifdef CONFIG_DEBUG_PI_LIST | ||
83 | spinlock_t *lock; | ||
84 | #endif | ||
85 | }; | ||
86 | |||
87 | struct plist_node { | ||
88 | int prio; | ||
89 | struct plist_head plist; | ||
90 | }; | ||
91 | |||
92 | #ifdef CONFIG_DEBUG_PI_LIST | ||
93 | # define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock | ||
94 | #else | ||
95 | # define PLIST_HEAD_LOCK_INIT(_lock) | ||
96 | #endif | ||
97 | |||
98 | /** | ||
99 | * #PLIST_HEAD_INIT - static struct plist_head initializer | ||
100 | * | ||
101 | * @head: struct plist_head variable name | ||
102 | */ | ||
103 | #define PLIST_HEAD_INIT(head, _lock) \ | ||
104 | { \ | ||
105 | .prio_list = LIST_HEAD_INIT((head).prio_list), \ | ||
106 | .node_list = LIST_HEAD_INIT((head).node_list), \ | ||
107 | PLIST_HEAD_LOCK_INIT(&(_lock)) \ | ||
108 | } | ||
109 | |||
110 | /** | ||
111 | * #PLIST_NODE_INIT - static struct plist_node initializer | ||
112 | * | ||
113 | * @node: struct plist_node variable name | ||
114 | * @__prio: initial node priority | ||
115 | */ | ||
116 | #define PLIST_NODE_INIT(node, __prio) \ | ||
117 | { \ | ||
118 | .prio = (__prio), \ | ||
119 | .plist = PLIST_HEAD_INIT((node).plist, NULL), \ | ||
120 | } | ||
121 | |||
122 | /** | ||
123 | * plist_head_init - dynamic struct plist_head initializer | ||
124 | * | ||
125 | * @head: &struct plist_head pointer | ||
126 | */ | ||
127 | static inline void | ||
128 | plist_head_init(struct plist_head *head, spinlock_t *lock) | ||
129 | { | ||
130 | INIT_LIST_HEAD(&head->prio_list); | ||
131 | INIT_LIST_HEAD(&head->node_list); | ||
132 | #ifdef CONFIG_DEBUG_PI_LIST | ||
133 | head->lock = lock; | ||
134 | #endif | ||
135 | } | ||
136 | |||
137 | /** | ||
138 | * plist_node_init - Dynamic struct plist_node initializer | ||
139 | * | ||
140 | * @node: &struct plist_node pointer | ||
141 | * @prio: initial node priority | ||
142 | */ | ||
143 | static inline void plist_node_init(struct plist_node *node, int prio) | ||
144 | { | ||
145 | node->prio = prio; | ||
146 | plist_head_init(&node->plist, NULL); | ||
147 | } | ||
148 | |||
149 | extern void plist_add(struct plist_node *node, struct plist_head *head); | ||
150 | extern void plist_del(struct plist_node *node, struct plist_head *head); | ||
151 | |||
152 | /** | ||
153 | * plist_for_each - iterate over the plist | ||
154 | * | ||
155 | * @pos1: the type * to use as a loop counter. | ||
156 | * @head: the head for your list. | ||
157 | */ | ||
158 | #define plist_for_each(pos, head) \ | ||
159 | list_for_each_entry(pos, &(head)->node_list, plist.node_list) | ||
160 | |||
161 | /** | ||
162 | * plist_for_each_entry_safe - iterate over a plist of given type safe | ||
163 | * against removal of list entry | ||
164 | * | ||
165 | * @pos1: the type * to use as a loop counter. | ||
166 | * @n1: another type * to use as temporary storage | ||
167 | * @head: the head for your list. | ||
168 | */ | ||
169 | #define plist_for_each_safe(pos, n, head) \ | ||
170 | list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) | ||
171 | |||
172 | /** | ||
173 | * plist_for_each_entry - iterate over list of given type | ||
174 | * | ||
175 | * @pos: the type * to use as a loop counter. | ||
176 | * @head: the head for your list. | ||
177 | * @member: the name of the list_struct within the struct. | ||
178 | */ | ||
179 | #define plist_for_each_entry(pos, head, mem) \ | ||
180 | list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) | ||
181 | |||
182 | /** | ||
183 | * plist_for_each_entry_safe - iterate over list of given type safe against | ||
184 | * removal of list entry | ||
185 | * | ||
186 | * @pos: the type * to use as a loop counter. | ||
187 | * @n: another type * to use as temporary storage | ||
188 | * @head: the head for your list. | ||
189 | * @m: the name of the list_struct within the struct. | ||
190 | */ | ||
191 | #define plist_for_each_entry_safe(pos, n, head, m) \ | ||
192 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) | ||
193 | |||
194 | /** | ||
195 | * plist_head_empty - return !0 if a plist_head is empty | ||
196 | * | ||
197 | * @head: &struct plist_head pointer | ||
198 | */ | ||
199 | static inline int plist_head_empty(const struct plist_head *head) | ||
200 | { | ||
201 | return list_empty(&head->node_list); | ||
202 | } | ||
203 | |||
204 | /** | ||
205 | * plist_node_empty - return !0 if plist_node is not on a list | ||
206 | * | ||
207 | * @node: &struct plist_node pointer | ||
208 | */ | ||
209 | static inline int plist_node_empty(const struct plist_node *node) | ||
210 | { | ||
211 | return plist_head_empty(&node->plist); | ||
212 | } | ||
213 | |||
214 | /* All functions below assume the plist_head is not empty. */ | ||
215 | |||
216 | /** | ||
217 | * plist_first_entry - get the struct for the first entry | ||
218 | * | ||
219 | * @ptr: the &struct plist_head pointer. | ||
220 | * @type: the type of the struct this is embedded in. | ||
221 | * @member: the name of the list_struct within the struct. | ||
222 | */ | ||
223 | #ifdef CONFIG_DEBUG_PI_LIST | ||
224 | # define plist_first_entry(head, type, member) \ | ||
225 | ({ \ | ||
226 | WARN_ON(plist_head_empty(head)); \ | ||
227 | container_of(plist_first(head), type, member); \ | ||
228 | }) | ||
229 | #else | ||
230 | # define plist_first_entry(head, type, member) \ | ||
231 | container_of(plist_first(head), type, member) | ||
232 | #endif | ||
233 | |||
234 | /** | ||
235 | * plist_first - return the first node (and thus, highest priority) | ||
236 | * | ||
237 | * @head: the &struct plist_head pointer | ||
238 | * | ||
239 | * Assumes the plist is _not_ empty. | ||
240 | */ | ||
241 | static inline struct plist_node* plist_first(const struct plist_head *head) | ||
242 | { | ||
243 | return list_entry(head->node_list.next, | ||
244 | struct plist_node, plist.node_list); | ||
245 | } | ||
246 | |||
247 | #endif | ||
diff --git a/include/linux/poison.h b/include/linux/poison.h new file mode 100644 index 000000000000..a5347c02432e --- /dev/null +++ b/include/linux/poison.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _LINUX_POISON_H | ||
2 | #define _LINUX_POISON_H | ||
3 | |||
4 | /********** include/linux/list.h **********/ | ||
5 | /* | ||
6 | * These are non-NULL pointers that will result in page faults | ||
7 | * under normal circumstances, used to verify that nobody uses | ||
8 | * non-initialized list entries. | ||
9 | */ | ||
10 | #define LIST_POISON1 ((void *) 0x00100100) | ||
11 | #define LIST_POISON2 ((void *) 0x00200200) | ||
12 | |||
13 | /********** mm/slab.c **********/ | ||
14 | /* | ||
15 | * Magic nums for obj red zoning. | ||
16 | * Placed in the first word before and the first word after an obj. | ||
17 | */ | ||
18 | #define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */ | ||
19 | #define RED_ACTIVE 0x170FC2A5UL /* when obj is active */ | ||
20 | |||
21 | /* ...and for poisoning */ | ||
22 | #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ | ||
23 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | ||
24 | #define POISON_END 0xa5 /* end-byte of poisoning */ | ||
25 | |||
26 | /********** arch/$ARCH/mm/init.c **********/ | ||
27 | #define POISON_FREE_INITMEM 0xcc | ||
28 | |||
29 | /********** arch/x86_64/mm/init.c **********/ | ||
30 | #define POISON_FREE_INITDATA 0xba | ||
31 | |||
32 | /********** arch/ia64/hp/common/sba_iommu.c **********/ | ||
33 | /* | ||
34 | * arch/ia64/hp/common/sba_iommu.c uses a 16-byte poison string with a | ||
35 | * value of "SBAIOMMU POISON\0" for spill-over poisoning. | ||
36 | */ | ||
37 | |||
38 | /********** fs/jbd/journal.c **********/ | ||
39 | #define JBD_POISON_FREE 0x5b | ||
40 | |||
41 | /********** drivers/base/dmapool.c **********/ | ||
42 | #define POOL_POISON_FREED 0xa7 /* !inuse */ | ||
43 | #define POOL_POISON_ALLOCATED 0xa9 /* !initted */ | ||
44 | |||
45 | /********** drivers/atm/ **********/ | ||
46 | #define ATM_POISON_FREE 0x12 | ||
47 | |||
48 | /********** kernel/mutexes **********/ | ||
49 | #define MUTEX_DEBUG_INIT 0x11 | ||
50 | #define MUTEX_DEBUG_FREE 0x22 | ||
51 | |||
52 | /********** security/ **********/ | ||
53 | #define KEY_DESTROY 0xbd | ||
54 | |||
55 | /********** sound/oss/ **********/ | ||
56 | #define OSS_POISON_FREE 0xAB | ||
57 | |||
58 | #endif | ||
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 | ||
100 | struct mm_struct; | 100 | struct mm_struct; |
101 | 101 | ||
102 | void proc_flush_task(struct task_struct *task); | ||
102 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 103 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); |
103 | struct dentry *proc_pid_unhash(struct task_struct *p); | ||
104 | void proc_pid_flush(struct dentry *proc_dentry); | ||
105 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 104 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
106 | unsigned long task_vsize(struct mm_struct *); | 105 | unsigned long task_vsize(struct mm_struct *); |
107 | int task_statm(struct mm_struct *, int *, int *, int *, int *); | 106 | int 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; }) |
212 | static inline void proc_net_remove(const char *name) {} | 211 | static inline void proc_net_remove(const char *name) {} |
213 | 212 | ||
214 | static inline struct dentry *proc_pid_unhash(struct task_struct *p) { return NULL; } | 213 | static inline void proc_flush_task(struct task_struct *task) { } |
215 | static inline void proc_pid_flush(struct dentry *proc_dentry) { } | ||
216 | 214 | ||
217 | static inline struct proc_dir_entry *create_proc_entry(const char *name, | 215 | static 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 | ||
250 | struct proc_inode { | 248 | struct 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 | ||
269 | struct 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 | |||
88 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 88 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
89 | extern int ptrace_attach(struct task_struct *tsk); | 89 | extern int ptrace_attach(struct task_struct *tsk); |
90 | extern int ptrace_detach(struct task_struct *, unsigned int); | 90 | extern int ptrace_detach(struct task_struct *, unsigned int); |
91 | extern void __ptrace_detach(struct task_struct *, unsigned int); | ||
92 | extern void ptrace_disable(struct task_struct *); | 91 | extern void ptrace_disable(struct task_struct *); |
93 | extern int ptrace_check_attach(struct task_struct *task, int kill); | 92 | extern int ptrace_check_attach(struct task_struct *task, int kill); |
94 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); | 93 | extern 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; | |||
140 | enum bitmap_state { | 140 | enum 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 | ||
14 | struct linear_private_data | 14 | struct 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); | |||
85 | extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); | 85 | extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); |
86 | extern void md_unplug_mddev(mddev_t *mddev); | 86 | extern void md_unplug_mddev(mddev_t *mddev); |
87 | 87 | ||
88 | extern void md_print_devices (void); | ||
89 | |||
90 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | 88 | extern 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); |
92 | extern void md_super_wait(mddev_t *mddev); | 90 | extern void md_super_wait(mddev_t *mddev); |
@@ -97,7 +95,5 @@ extern void md_new_event(mddev_t *mddev); | |||
97 | 95 | ||
98 | extern void md_update_sb(mddev_t * mddev); | 96 | extern 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/rcupdate.h b/include/linux/rcupdate.h index 6312758393b6..48dfe00070c7 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -258,6 +258,7 @@ extern void rcu_init(void); | |||
258 | extern void rcu_check_callbacks(int cpu, int user); | 258 | extern void rcu_check_callbacks(int cpu, int user); |
259 | extern void rcu_restart_cpu(int cpu); | 259 | extern void rcu_restart_cpu(int cpu); |
260 | extern long rcu_batches_completed(void); | 260 | extern long rcu_batches_completed(void); |
261 | extern long rcu_batches_completed_bh(void); | ||
261 | 262 | ||
262 | /* Exported interfaces */ | 263 | /* Exported interfaces */ |
263 | extern void FASTCALL(call_rcu(struct rcu_head *head, | 264 | extern void FASTCALL(call_rcu(struct rcu_head *head, |
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h new file mode 100644 index 000000000000..fa4a3b82ba70 --- /dev/null +++ b/include/linux/rtmutex.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * RT Mutexes: blocking mutual exclusion locks with PI support | ||
3 | * | ||
4 | * started by Ingo Molnar and Thomas Gleixner: | ||
5 | * | ||
6 | * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | ||
7 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> | ||
8 | * | ||
9 | * This file contains the public data structure and API definitions. | ||
10 | */ | ||
11 | |||
12 | #ifndef __LINUX_RT_MUTEX_H | ||
13 | #define __LINUX_RT_MUTEX_H | ||
14 | |||
15 | #include <linux/linkage.h> | ||
16 | #include <linux/plist.h> | ||
17 | #include <linux/spinlock_types.h> | ||
18 | |||
19 | /* | ||
20 | * The rt_mutex structure | ||
21 | * | ||
22 | * @wait_lock: spinlock to protect the structure | ||
23 | * @wait_list: pilist head to enqueue waiters in priority order | ||
24 | * @owner: the mutex owner | ||
25 | */ | ||
26 | struct rt_mutex { | ||
27 | spinlock_t wait_lock; | ||
28 | struct plist_head wait_list; | ||
29 | struct task_struct *owner; | ||
30 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
31 | int save_state; | ||
32 | struct list_head held_list_entry; | ||
33 | unsigned long acquire_ip; | ||
34 | const char *name, *file; | ||
35 | int line; | ||
36 | void *magic; | ||
37 | #endif | ||
38 | }; | ||
39 | |||
40 | struct rt_mutex_waiter; | ||
41 | struct hrtimer_sleeper; | ||
42 | |||
43 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
44 | extern int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
45 | unsigned long len); | ||
46 | extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); | ||
47 | #else | ||
48 | static inline int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
49 | unsigned long len) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | # define rt_mutex_debug_check_no_locks_held(task) do { } while (0) | ||
54 | #endif | ||
55 | |||
56 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
57 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ | ||
58 | , .name = #mutexname, .file = __FILE__, .line = __LINE__ | ||
59 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) | ||
60 | extern void rt_mutex_debug_task_free(struct task_struct *tsk); | ||
61 | #else | ||
62 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) | ||
63 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) | ||
64 | # define rt_mutex_debug_task_free(t) do { } while (0) | ||
65 | #endif | ||
66 | |||
67 | #define __RT_MUTEX_INITIALIZER(mutexname) \ | ||
68 | { .wait_lock = SPIN_LOCK_UNLOCKED \ | ||
69 | , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list, mutexname.wait_lock) \ | ||
70 | , .owner = NULL \ | ||
71 | __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} | ||
72 | |||
73 | #define DEFINE_RT_MUTEX(mutexname) \ | ||
74 | struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) | ||
75 | |||
76 | /*** | ||
77 | * rt_mutex_is_locked - is the mutex locked | ||
78 | * @lock: the mutex to be queried | ||
79 | * | ||
80 | * Returns 1 if the mutex is locked, 0 if unlocked. | ||
81 | */ | ||
82 | static inline int rt_mutex_is_locked(struct rt_mutex *lock) | ||
83 | { | ||
84 | return lock->owner != NULL; | ||
85 | } | ||
86 | |||
87 | extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); | ||
88 | extern void rt_mutex_destroy(struct rt_mutex *lock); | ||
89 | |||
90 | extern void rt_mutex_lock(struct rt_mutex *lock); | ||
91 | extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, | ||
92 | int detect_deadlock); | ||
93 | extern int rt_mutex_timed_lock(struct rt_mutex *lock, | ||
94 | struct hrtimer_sleeper *timeout, | ||
95 | int detect_deadlock); | ||
96 | |||
97 | extern int rt_mutex_trylock(struct rt_mutex *lock); | ||
98 | |||
99 | extern void rt_mutex_unlock(struct rt_mutex *lock); | ||
100 | |||
101 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
102 | # define INIT_RT_MUTEX_DEBUG(tsk) \ | ||
103 | .held_list_head = LIST_HEAD_INIT(tsk.held_list_head), \ | ||
104 | .held_list_lock = SPIN_LOCK_UNLOCKED | ||
105 | #else | ||
106 | # define INIT_RT_MUTEX_DEBUG(tsk) | ||
107 | #endif | ||
108 | |||
109 | #ifdef CONFIG_RT_MUTEXES | ||
110 | # define INIT_RT_MUTEXES(tsk) \ | ||
111 | .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters, tsk.pi_lock), \ | ||
112 | INIT_RT_MUTEX_DEBUG(tsk) | ||
113 | #else | ||
114 | # define INIT_RT_MUTEXES(tsk) | ||
115 | #endif | ||
116 | |||
117 | #endif | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8d11d9310db0..821f0481ebe1 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -73,6 +73,7 @@ struct sched_param { | |||
73 | #include <linux/seccomp.h> | 73 | #include <linux/seccomp.h> |
74 | #include <linux/rcupdate.h> | 74 | #include <linux/rcupdate.h> |
75 | #include <linux/futex.h> | 75 | #include <linux/futex.h> |
76 | #include <linux/rtmutex.h> | ||
76 | 77 | ||
77 | #include <linux/time.h> | 78 | #include <linux/time.h> |
78 | #include <linux/param.h> | 79 | #include <linux/param.h> |
@@ -83,6 +84,7 @@ struct sched_param { | |||
83 | #include <asm/processor.h> | 84 | #include <asm/processor.h> |
84 | 85 | ||
85 | struct exec_domain; | 86 | struct exec_domain; |
87 | struct futex_pi_state; | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * List of flags we want to share for kernel threads, | 90 | * List of flags we want to share for kernel threads, |
@@ -123,6 +125,7 @@ extern unsigned long nr_running(void); | |||
123 | extern unsigned long nr_uninterruptible(void); | 125 | extern unsigned long nr_uninterruptible(void); |
124 | extern unsigned long nr_active(void); | 126 | extern unsigned long nr_active(void); |
125 | extern unsigned long nr_iowait(void); | 127 | extern unsigned long nr_iowait(void); |
128 | extern unsigned long weighted_cpuload(const int cpu); | ||
126 | 129 | ||
127 | 130 | ||
128 | /* | 131 | /* |
@@ -494,8 +497,11 @@ struct signal_struct { | |||
494 | 497 | ||
495 | #define MAX_PRIO (MAX_RT_PRIO + 40) | 498 | #define MAX_PRIO (MAX_RT_PRIO + 40) |
496 | 499 | ||
497 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) | 500 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) |
501 | #define rt_task(p) rt_prio((p)->prio) | ||
498 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | 502 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) |
503 | #define has_rt_policy(p) \ | ||
504 | unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH) | ||
499 | 505 | ||
500 | /* | 506 | /* |
501 | * Some day this will be a full-fledged user tracking system.. | 507 | * Some day this will be a full-fledged user tracking system.. |
@@ -558,9 +564,9 @@ enum idle_type | |||
558 | /* | 564 | /* |
559 | * sched-domains (multiprocessor balancing) declarations: | 565 | * sched-domains (multiprocessor balancing) declarations: |
560 | */ | 566 | */ |
561 | #ifdef CONFIG_SMP | ||
562 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ | 567 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ |
563 | 568 | ||
569 | #ifdef CONFIG_SMP | ||
564 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 570 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
565 | #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ | 571 | #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ |
566 | #define SD_BALANCE_EXEC 4 /* Balance on exec */ | 572 | #define SD_BALANCE_EXEC 4 /* Balance on exec */ |
@@ -569,6 +575,11 @@ enum idle_type | |||
569 | #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ | 575 | #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ |
570 | #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ | 576 | #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ |
571 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ | 577 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ |
578 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ | ||
579 | |||
580 | #define BALANCE_FOR_POWER ((sched_mc_power_savings || sched_smt_power_savings) \ | ||
581 | ? SD_POWERSAVINGS_BALANCE : 0) | ||
582 | |||
572 | 583 | ||
573 | struct sched_group { | 584 | struct sched_group { |
574 | struct sched_group *next; /* Must be a circular list */ | 585 | struct sched_group *next; /* Must be a circular list */ |
@@ -638,7 +649,7 @@ struct sched_domain { | |||
638 | #endif | 649 | #endif |
639 | }; | 650 | }; |
640 | 651 | ||
641 | extern void partition_sched_domains(cpumask_t *partition1, | 652 | extern int partition_sched_domains(cpumask_t *partition1, |
642 | cpumask_t *partition2); | 653 | cpumask_t *partition2); |
643 | 654 | ||
644 | /* | 655 | /* |
@@ -713,10 +724,13 @@ struct task_struct { | |||
713 | 724 | ||
714 | int lock_depth; /* BKL lock depth */ | 725 | int lock_depth; /* BKL lock depth */ |
715 | 726 | ||
716 | #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) | 727 | #ifdef CONFIG_SMP |
728 | #ifdef __ARCH_WANT_UNLOCKED_CTXSW | ||
717 | int oncpu; | 729 | int oncpu; |
718 | #endif | 730 | #endif |
719 | int prio, static_prio; | 731 | #endif |
732 | int load_weight; /* for niceness load balancing purposes */ | ||
733 | int prio, static_prio, normal_prio; | ||
720 | struct list_head run_list; | 734 | struct list_head run_list; |
721 | prio_array_t *array; | 735 | prio_array_t *array; |
722 | 736 | ||
@@ -842,8 +856,20 @@ struct task_struct { | |||
842 | u32 self_exec_id; | 856 | u32 self_exec_id; |
843 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ | 857 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ |
844 | spinlock_t alloc_lock; | 858 | spinlock_t alloc_lock; |
845 | /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */ | 859 | |
846 | spinlock_t proc_lock; | 860 | /* Protection of the PI data structures: */ |
861 | spinlock_t pi_lock; | ||
862 | |||
863 | #ifdef CONFIG_RT_MUTEXES | ||
864 | /* PI waiters blocked on a rt_mutex held by this task */ | ||
865 | struct plist_head pi_waiters; | ||
866 | /* Deadlock detection and priority inheritance handling */ | ||
867 | struct rt_mutex_waiter *pi_blocked_on; | ||
868 | # ifdef CONFIG_DEBUG_RT_MUTEXES | ||
869 | spinlock_t held_list_lock; | ||
870 | struct list_head held_list_head; | ||
871 | # endif | ||
872 | #endif | ||
847 | 873 | ||
848 | #ifdef CONFIG_DEBUG_MUTEXES | 874 | #ifdef CONFIG_DEBUG_MUTEXES |
849 | /* mutex deadlock detection */ | 875 | /* mutex deadlock detection */ |
@@ -856,7 +882,6 @@ struct task_struct { | |||
856 | /* VM state */ | 882 | /* VM state */ |
857 | struct reclaim_state *reclaim_state; | 883 | struct reclaim_state *reclaim_state; |
858 | 884 | ||
859 | struct dentry *proc_dentry; | ||
860 | struct backing_dev_info *backing_dev_info; | 885 | struct backing_dev_info *backing_dev_info; |
861 | 886 | ||
862 | struct io_context *io_context; | 887 | struct io_context *io_context; |
@@ -891,6 +916,8 @@ struct task_struct { | |||
891 | #ifdef CONFIG_COMPAT | 916 | #ifdef CONFIG_COMPAT |
892 | struct compat_robust_list_head __user *compat_robust_list; | 917 | struct compat_robust_list_head __user *compat_robust_list; |
893 | #endif | 918 | #endif |
919 | struct list_head pi_state_list; | ||
920 | struct futex_pi_state *pi_state_cache; | ||
894 | 921 | ||
895 | atomic_t fs_excl; /* holding fs exclusive resources */ | 922 | atomic_t fs_excl; /* holding fs exclusive resources */ |
896 | struct rcu_head rcu; | 923 | struct rcu_head rcu; |
@@ -958,6 +985,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
958 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 985 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
959 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 986 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
960 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 987 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
988 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | ||
961 | 989 | ||
962 | /* | 990 | /* |
963 | * Only the _current_ task can read/write to tsk->flags, but other | 991 | * Only the _current_ task can read/write to tsk->flags, but other |
@@ -1012,6 +1040,19 @@ static inline void idle_task_exit(void) {} | |||
1012 | #endif | 1040 | #endif |
1013 | 1041 | ||
1014 | extern void sched_idle_next(void); | 1042 | extern void sched_idle_next(void); |
1043 | |||
1044 | #ifdef CONFIG_RT_MUTEXES | ||
1045 | extern int rt_mutex_getprio(task_t *p); | ||
1046 | extern void rt_mutex_setprio(task_t *p, int prio); | ||
1047 | extern void rt_mutex_adjust_pi(task_t *p); | ||
1048 | #else | ||
1049 | static inline int rt_mutex_getprio(task_t *p) | ||
1050 | { | ||
1051 | return p->normal_prio; | ||
1052 | } | ||
1053 | # define rt_mutex_adjust_pi(p) do { } while (0) | ||
1054 | #endif | ||
1055 | |||
1015 | extern void set_user_nice(task_t *p, long nice); | 1056 | extern void set_user_nice(task_t *p, long nice); |
1016 | extern int task_prio(const task_t *p); | 1057 | extern int task_prio(const task_t *p); |
1017 | extern int task_nice(const task_t *p); | 1058 | extern int task_nice(const task_t *p); |
@@ -1411,6 +1452,11 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) | |||
1411 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); | 1452 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); |
1412 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); | 1453 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); |
1413 | 1454 | ||
1455 | #include <linux/sysdev.h> | ||
1456 | extern int sched_mc_power_savings, sched_smt_power_savings; | ||
1457 | extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; | ||
1458 | extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | ||
1459 | |||
1414 | extern void normalize_rt_tasks(void); | 1460 | extern void normalize_rt_tasks(void); |
1415 | 1461 | ||
1416 | #ifdef CONFIG_PM | 1462 | #ifdef CONFIG_PM |
diff --git a/include/linux/scx200.h b/include/linux/scx200.h index a22f9e173ad2..693c0557e70b 100644 --- a/include/linux/scx200.h +++ b/include/linux/scx200.h | |||
@@ -49,10 +49,3 @@ extern unsigned scx200_cb_base; | |||
49 | #define SCx200_REV 0x3d /* Revision Register */ | 49 | #define SCx200_REV 0x3d /* Revision Register */ |
50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ | 50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ |
51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ | 51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ |
52 | |||
53 | /* | ||
54 | Local variables: | ||
55 | compile-command: "make -C ../.. bzImage modules" | ||
56 | c-basic-offset: 8 | ||
57 | End: | ||
58 | */ | ||
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 30cdd648ba79..90dd069cc145 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/spinlock.h> | 1 | #include <linux/spinlock.h> |
2 | 2 | ||
3 | u32 scx200_gpio_configure(int index, u32 set, u32 clear); | 3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
4 | 4 | ||
5 | extern unsigned scx200_gpio_base; | 5 | extern unsigned scx200_gpio_base; |
6 | extern long scx200_gpio_shadow[2]; | 6 | extern long scx200_gpio_shadow[2]; |
@@ -17,7 +17,7 @@ extern long scx200_gpio_shadow[2]; | |||
17 | 17 | ||
18 | /* returns the value of the GPIO pin */ | 18 | /* returns the value of the GPIO pin */ |
19 | 19 | ||
20 | static inline int scx200_gpio_get(int index) { | 20 | static inline int scx200_gpio_get(unsigned index) { |
21 | __SCx200_GPIO_BANK; | 21 | __SCx200_GPIO_BANK; |
22 | __SCx200_GPIO_IOADDR + 0x04; | 22 | __SCx200_GPIO_IOADDR + 0x04; |
23 | __SCx200_GPIO_INDEX; | 23 | __SCx200_GPIO_INDEX; |
@@ -29,7 +29,7 @@ static inline int scx200_gpio_get(int index) { | |||
29 | driven if the GPIO is configured as an output, it might not be the | 29 | driven if the GPIO is configured as an output, it might not be the |
30 | state of the GPIO right now if the GPIO is configured as an input) */ | 30 | state of the GPIO right now if the GPIO is configured as an input) */ |
31 | 31 | ||
32 | static inline int scx200_gpio_current(int index) { | 32 | static inline int scx200_gpio_current(unsigned index) { |
33 | __SCx200_GPIO_BANK; | 33 | __SCx200_GPIO_BANK; |
34 | __SCx200_GPIO_INDEX; | 34 | __SCx200_GPIO_INDEX; |
35 | 35 | ||
@@ -38,7 +38,7 @@ static inline int scx200_gpio_current(int index) { | |||
38 | 38 | ||
39 | /* drive the GPIO signal high */ | 39 | /* drive the GPIO signal high */ |
40 | 40 | ||
41 | static inline void scx200_gpio_set_high(int index) { | 41 | static inline void scx200_gpio_set_high(unsigned index) { |
42 | __SCx200_GPIO_BANK; | 42 | __SCx200_GPIO_BANK; |
43 | __SCx200_GPIO_IOADDR; | 43 | __SCx200_GPIO_IOADDR; |
44 | __SCx200_GPIO_SHADOW; | 44 | __SCx200_GPIO_SHADOW; |
@@ -49,7 +49,7 @@ static inline void scx200_gpio_set_high(int index) { | |||
49 | 49 | ||
50 | /* drive the GPIO signal low */ | 50 | /* drive the GPIO signal low */ |
51 | 51 | ||
52 | static inline void scx200_gpio_set_low(int index) { | 52 | static inline void scx200_gpio_set_low(unsigned index) { |
53 | __SCx200_GPIO_BANK; | 53 | __SCx200_GPIO_BANK; |
54 | __SCx200_GPIO_IOADDR; | 54 | __SCx200_GPIO_IOADDR; |
55 | __SCx200_GPIO_SHADOW; | 55 | __SCx200_GPIO_SHADOW; |
@@ -60,7 +60,7 @@ static inline void scx200_gpio_set_low(int index) { | |||
60 | 60 | ||
61 | /* drive the GPIO signal to state */ | 61 | /* drive the GPIO signal to state */ |
62 | 62 | ||
63 | static inline void scx200_gpio_set(int index, int state) { | 63 | static inline void scx200_gpio_set(unsigned index, int state) { |
64 | __SCx200_GPIO_BANK; | 64 | __SCx200_GPIO_BANK; |
65 | __SCx200_GPIO_IOADDR; | 65 | __SCx200_GPIO_IOADDR; |
66 | __SCx200_GPIO_SHADOW; | 66 | __SCx200_GPIO_SHADOW; |
@@ -73,7 +73,7 @@ static inline void scx200_gpio_set(int index, int state) { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* toggle the GPIO signal */ | 75 | /* toggle the GPIO signal */ |
76 | static inline void scx200_gpio_change(int index) { | 76 | static inline void scx200_gpio_change(unsigned index) { |
77 | __SCx200_GPIO_BANK; | 77 | __SCx200_GPIO_BANK; |
78 | __SCx200_GPIO_IOADDR; | 78 | __SCx200_GPIO_IOADDR; |
79 | __SCx200_GPIO_SHADOW; | 79 | __SCx200_GPIO_SHADOW; |
@@ -87,10 +87,3 @@ static inline void scx200_gpio_change(int index) { | |||
87 | #undef __SCx200_GPIO_SHADOW | 87 | #undef __SCx200_GPIO_SHADOW |
88 | #undef __SCx200_GPIO_INDEX | 88 | #undef __SCx200_GPIO_INDEX |
89 | #undef __SCx200_GPIO_OUT | 89 | #undef __SCx200_GPIO_OUT |
90 | |||
91 | /* | ||
92 | Local variables: | ||
93 | compile-command: "make -C ../.. bzImage modules" | ||
94 | c-basic-offset: 8 | ||
95 | End: | ||
96 | */ | ||
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 |
3042 | static inline int security_key_alloc(struct key *key, | 3043 | static 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 | ||
3048 | static inline void security_key_free(struct key *key) | 3050 | static 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 | ||
3062 | static inline int security_key_alloc(struct key *key, | 3064 | static 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: */ |
127 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); | 127 | struct 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. */ |
131 | void gss_mech_put(struct gss_api_mech *); | 131 | void gss_mech_put(struct gss_api_mech *); |
132 | 132 | ||
diff --git a/include/linux/swap.h b/include/linux/swap.h index dc3f3aa0c83e..c41e2d6d1acc 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -199,6 +199,8 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
199 | } | 199 | } |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | extern int kswapd_run(int nid); | ||
203 | |||
202 | #ifdef CONFIG_MMU | 204 | #ifdef CONFIG_MMU |
203 | /* linux/mm/shmem.c */ | 205 | /* linux/mm/shmem.c */ |
204 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 206 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 33785b79d548..008f04c56737 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -174,9 +174,9 @@ asmlinkage long sys_waitid(int which, pid_t pid, | |||
174 | int options, struct rusage __user *ru); | 174 | int options, struct rusage __user *ru); |
175 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); | 175 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); |
176 | asmlinkage long sys_set_tid_address(int __user *tidptr); | 176 | asmlinkage long sys_set_tid_address(int __user *tidptr); |
177 | asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, | 177 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, |
178 | struct timespec __user *utime, u32 __user *uaddr2, | 178 | struct timespec __user *utime, u32 __user *uaddr2, |
179 | int val3); | 179 | u32 val3); |
180 | 180 | ||
181 | asmlinkage long sys_init_module(void __user *umod, unsigned long len, | 181 | asmlinkage long sys_init_module(void __user *umod, unsigned long len, |
182 | const char __user *uargs); | 182 | const char __user *uargs); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 6a60770984e9..46e4d8f2771f 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -148,9 +148,12 @@ 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 */ | ||
152 | KERN_MAX_LOCK_DEPTH=74, | ||
151 | }; | 153 | }; |
152 | 154 | ||
153 | 155 | ||
156 | |||
154 | /* CTL_VM names: */ | 157 | /* CTL_VM names: */ |
155 | enum | 158 | enum |
156 | { | 159 | { |
@@ -187,6 +190,7 @@ enum | |||
187 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ | 190 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ |
188 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ | 191 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ |
189 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 192 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
193 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | ||
190 | }; | 194 | }; |
191 | 195 | ||
192 | 196 | ||
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 | ||
36 | static inline int timespec_equal(struct timespec *a, struct timespec *b) | 39 | static inline int timespec_equal(struct timespec *a, struct timespec *b) |
37 | { | 40 | { |
@@ -77,6 +80,8 @@ extern struct timespec xtime; | |||
77 | extern struct timespec wall_to_monotonic; | 80 | extern struct timespec wall_to_monotonic; |
78 | extern seqlock_t xtime_lock; | 81 | extern seqlock_t xtime_lock; |
79 | 82 | ||
83 | void timekeeping_init(void); | ||
84 | |||
80 | static inline unsigned long get_seconds(void) | 85 | static 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); | |||
100 | extern void getnstimeofday(struct timespec *tv); | 105 | extern void getnstimeofday(struct timespec *tv); |
101 | 106 | ||
102 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 107 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
108 | extern 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 | */ |
143 | extern struct timeval ns_to_timeval(const s64 nsec); | 149 | extern 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 | */ | ||
156 | static 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). */ |
307 | extern u64 current_tick_length(void); | 309 | extern u64 current_tick_length(void); |
308 | 310 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index a305ae2e44b6..ec1eca85290a 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -134,7 +134,8 @@ | |||
134 | .flags = SD_LOAD_BALANCE \ | 134 | .flags = SD_LOAD_BALANCE \ |
135 | | SD_BALANCE_NEWIDLE \ | 135 | | SD_BALANCE_NEWIDLE \ |
136 | | SD_BALANCE_EXEC \ | 136 | | SD_BALANCE_EXEC \ |
137 | | SD_WAKE_AFFINE, \ | 137 | | SD_WAKE_AFFINE \ |
138 | | BALANCE_FOR_POWER, \ | ||
138 | .last_balance = jiffies, \ | 139 | .last_balance = jiffies, \ |
139 | .balance_interval = 1, \ | 140 | .balance_interval = 1, \ |
140 | .nr_balance_failed = 0, \ | 141 | .nr_balance_failed = 0, \ |
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 | |||
17 | struct 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 | */ | ||
30 | extern void unwind_init(void); | ||
31 | |||
32 | #ifdef CONFIG_MODULES | ||
33 | |||
34 | extern void *unwind_add_table(struct module *, | ||
35 | const void *table_start, | ||
36 | unsigned long table_size); | ||
37 | |||
38 | extern void unwind_remove_table(void *handle, int init_only); | ||
39 | |||
40 | #endif | ||
41 | |||
42 | extern 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 | */ | ||
49 | extern int unwind_init_blocked(struct unwind_frame_info *, | ||
50 | struct task_struct *); | ||
51 | |||
52 | /* | ||
53 | * Prepare to unwind the currently running thread. | ||
54 | */ | ||
55 | extern 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 | */ | ||
64 | extern 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 | */ | ||
71 | extern int unwind_to_user(struct unwind_frame_info *); | ||
72 | |||
73 | #else | ||
74 | |||
75 | struct unwind_frame_info {}; | ||
76 | |||
77 | static inline void unwind_init(void) {} | ||
78 | |||
79 | #ifdef CONFIG_MODULES | ||
80 | |||
81 | static 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 | |||
90 | static inline void unwind_remove_table(void *handle, int init_only) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | static 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 | |||
101 | static inline int unwind_init_blocked(struct unwind_frame_info *info, | ||
102 | struct task_struct *tsk) | ||
103 | { | ||
104 | return -ENOSYS; | ||
105 | } | ||
106 | |||
107 | static 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 | |||
115 | static inline int unwind(struct unwind_frame_info *info) | ||
116 | { | ||
117 | return -ENOSYS; | ||
118 | } | ||
119 | |||
120 | static 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) | ||
826 | enum 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) |