diff options
Diffstat (limited to 'arch')
33 files changed, 148 insertions, 472 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 6093c0be58b0..b0fabfa864ff 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -27,6 +27,25 @@ config KPROBES | |||
27 | for kernel debugging, non-intrusive instrumentation and testing. | 27 | for kernel debugging, non-intrusive instrumentation and testing. |
28 | If in doubt, say "N". | 28 | If in doubt, say "N". |
29 | 29 | ||
30 | config HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
31 | def_bool n | ||
32 | help | ||
33 | Some architectures are unable to perform unaligned accesses | ||
34 | without the use of get_unaligned/put_unaligned. Others are | ||
35 | unable to perform such accesses efficiently (e.g. trap on | ||
36 | unaligned access and require fixing it up in the exception | ||
37 | handler.) | ||
38 | |||
39 | This symbol should be selected by an architecture if it can | ||
40 | perform unaligned accesses efficiently to allow different | ||
41 | code paths to be selected for these cases. Some network | ||
42 | drivers, for example, could opt to not fix up alignment | ||
43 | problems with received packets if doing so would not help | ||
44 | much. | ||
45 | |||
46 | See Documentation/unaligned-memory-access.txt for more | ||
47 | information on the topic of unaligned memory accesses. | ||
48 | |||
30 | config KRETPROBES | 49 | config KRETPROBES |
31 | def_bool y | 50 | def_bool y |
32 | depends on KPROBES && HAVE_KRETPROBES | 51 | depends on KPROBES && HAVE_KRETPROBES |
diff --git a/arch/alpha/boot/misc.c b/arch/alpha/boot/misc.c index c00646b25f6e..3047a1b3a517 100644 --- a/arch/alpha/boot/misc.c +++ b/arch/alpha/boot/misc.c | |||
@@ -78,8 +78,6 @@ static unsigned outcnt; /* bytes in output buffer */ | |||
78 | static int fill_inbuf(void); | 78 | static int fill_inbuf(void); |
79 | static void flush_window(void); | 79 | static void flush_window(void); |
80 | static void error(char *m); | 80 | static void error(char *m); |
81 | static void gzip_mark(void **); | ||
82 | static void gzip_release(void **); | ||
83 | 81 | ||
84 | static char *input_data; | 82 | static char *input_data; |
85 | static int input_data_size; | 83 | static int input_data_size; |
@@ -88,51 +86,18 @@ static uch *output_data; | |||
88 | static ulg output_ptr; | 86 | static ulg output_ptr; |
89 | static ulg bytes_out; | 87 | static ulg bytes_out; |
90 | 88 | ||
91 | static void *malloc(int size); | ||
92 | static void free(void *where); | ||
93 | static void error(char *m); | 89 | static void error(char *m); |
94 | static void gzip_mark(void **); | 90 | static void gzip_mark(void **); |
95 | static void gzip_release(void **); | 91 | static void gzip_release(void **); |
96 | 92 | ||
97 | extern int end; | 93 | extern int end; |
98 | static ulg free_mem_ptr; | 94 | static ulg free_mem_ptr; |
99 | static ulg free_mem_ptr_end; | 95 | static ulg free_mem_end_ptr; |
100 | 96 | ||
101 | #define HEAP_SIZE 0x3000 | 97 | #define HEAP_SIZE 0x3000 |
102 | 98 | ||
103 | #include "../../../lib/inflate.c" | 99 | #include "../../../lib/inflate.c" |
104 | 100 | ||
105 | static void *malloc(int size) | ||
106 | { | ||
107 | void *p; | ||
108 | |||
109 | if (size <0) error("Malloc error"); | ||
110 | if (free_mem_ptr <= 0) error("Memory error"); | ||
111 | |||
112 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
113 | |||
114 | p = (void *)free_mem_ptr; | ||
115 | free_mem_ptr += size; | ||
116 | |||
117 | if (free_mem_ptr >= free_mem_ptr_end) | ||
118 | error("Out of memory"); | ||
119 | return p; | ||
120 | } | ||
121 | |||
122 | static void free(void *where) | ||
123 | { /* gzip_mark & gzip_release do the free */ | ||
124 | } | ||
125 | |||
126 | static void gzip_mark(void **ptr) | ||
127 | { | ||
128 | *ptr = (void *) free_mem_ptr; | ||
129 | } | ||
130 | |||
131 | static void gzip_release(void **ptr) | ||
132 | { | ||
133 | free_mem_ptr = (long) *ptr; | ||
134 | } | ||
135 | |||
136 | /* =========================================================================== | 101 | /* =========================================================================== |
137 | * Fill the input buffer. This is called only when the buffer is empty | 102 | * Fill the input buffer. This is called only when the buffer is empty |
138 | * and at least one byte is really needed. | 103 | * and at least one byte is really needed. |
@@ -193,7 +158,7 @@ decompress_kernel(void *output_start, | |||
193 | 158 | ||
194 | /* FIXME FIXME FIXME */ | 159 | /* FIXME FIXME FIXME */ |
195 | free_mem_ptr = (ulg)output_start + ksize; | 160 | free_mem_ptr = (ulg)output_start + ksize; |
196 | free_mem_ptr_end = (ulg)output_start + ksize + 0x200000; | 161 | free_mem_end_ptr = (ulg)output_start + ksize + 0x200000; |
197 | /* FIXME FIXME FIXME */ | 162 | /* FIXME FIXME FIXME */ |
198 | 163 | ||
199 | /* put in temp area to reduce initial footprint */ | 164 | /* put in temp area to reduce initial footprint */ |
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 6fb4f03369f2..dabb015aa40b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -268,7 +268,7 @@ config ARCH_EP93XX | |||
268 | select GENERIC_GPIO | 268 | select GENERIC_GPIO |
269 | select HAVE_CLK | 269 | select HAVE_CLK |
270 | select HAVE_CLK | 270 | select HAVE_CLK |
271 | select HAVE_GPIO_LIB | 271 | select ARCH_REQUIRE_GPIOLIB |
272 | help | 272 | help |
273 | This enables support for the Cirrus EP93xx series of CPUs. | 273 | This enables support for the Cirrus EP93xx series of CPUs. |
274 | 274 | ||
@@ -447,7 +447,7 @@ config ARCH_PXA | |||
447 | select ARCH_MTD_XIP | 447 | select ARCH_MTD_XIP |
448 | select GENERIC_GPIO | 448 | select GENERIC_GPIO |
449 | select HAVE_CLK | 449 | select HAVE_CLK |
450 | select HAVE_GPIO_LIB | 450 | select ARCH_REQUIRE_GPIOLIB |
451 | select GENERIC_TIME | 451 | select GENERIC_TIME |
452 | select GENERIC_CLOCKEVENTS | 452 | select GENERIC_CLOCKEVENTS |
453 | select TICK_ONESHOT | 453 | select TICK_ONESHOT |
@@ -479,7 +479,7 @@ config ARCH_SA1100 | |||
479 | select GENERIC_CLOCKEVENTS | 479 | select GENERIC_CLOCKEVENTS |
480 | select HAVE_CLK | 480 | select HAVE_CLK |
481 | select TICK_ONESHOT | 481 | select TICK_ONESHOT |
482 | select HAVE_GPIO_LIB | 482 | select ARCH_REQUIRE_GPIOLIB |
483 | help | 483 | help |
484 | Support for StrongARM 11x0 based boards. | 484 | Support for StrongARM 11x0 based boards. |
485 | 485 | ||
@@ -522,7 +522,7 @@ config ARCH_OMAP | |||
522 | bool "TI OMAP" | 522 | bool "TI OMAP" |
523 | select GENERIC_GPIO | 523 | select GENERIC_GPIO |
524 | select HAVE_CLK | 524 | select HAVE_CLK |
525 | select HAVE_GPIO_LIB | 525 | select ARCH_REQUIRE_GPIOLIB |
526 | select GENERIC_TIME | 526 | select GENERIC_TIME |
527 | select GENERIC_CLOCKEVENTS | 527 | select GENERIC_CLOCKEVENTS |
528 | help | 528 | help |
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 9b444022cb9b..7145cc7c04f0 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -217,8 +217,6 @@ static unsigned outcnt; /* bytes in output buffer */ | |||
217 | static int fill_inbuf(void); | 217 | static int fill_inbuf(void); |
218 | static void flush_window(void); | 218 | static void flush_window(void); |
219 | static void error(char *m); | 219 | static void error(char *m); |
220 | static void gzip_mark(void **); | ||
221 | static void gzip_release(void **); | ||
222 | 220 | ||
223 | extern char input_data[]; | 221 | extern char input_data[]; |
224 | extern char input_data_end[]; | 222 | extern char input_data_end[]; |
@@ -227,64 +225,21 @@ static uch *output_data; | |||
227 | static ulg output_ptr; | 225 | static ulg output_ptr; |
228 | static ulg bytes_out; | 226 | static ulg bytes_out; |
229 | 227 | ||
230 | static void *malloc(int size); | ||
231 | static void free(void *where); | ||
232 | static void error(char *m); | 228 | static void error(char *m); |
233 | static void gzip_mark(void **); | ||
234 | static void gzip_release(void **); | ||
235 | 229 | ||
236 | static void putstr(const char *); | 230 | static void putstr(const char *); |
237 | 231 | ||
238 | extern int end; | 232 | extern int end; |
239 | static ulg free_mem_ptr; | 233 | static ulg free_mem_ptr; |
240 | static ulg free_mem_ptr_end; | 234 | static ulg free_mem_end_ptr; |
241 | 235 | ||
242 | #define HEAP_SIZE 0x3000 | 236 | #ifdef STANDALONE_DEBUG |
243 | 237 | #define NO_INFLATE_MALLOC | |
244 | #include "../../../../lib/inflate.c" | 238 | #endif |
245 | |||
246 | #ifndef STANDALONE_DEBUG | ||
247 | static void *malloc(int size) | ||
248 | { | ||
249 | void *p; | ||
250 | |||
251 | if (size <0) error("Malloc error"); | ||
252 | if (free_mem_ptr <= 0) error("Memory error"); | ||
253 | |||
254 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
255 | |||
256 | p = (void *)free_mem_ptr; | ||
257 | free_mem_ptr += size; | ||
258 | |||
259 | if (free_mem_ptr >= free_mem_ptr_end) | ||
260 | error("Out of memory"); | ||
261 | return p; | ||
262 | } | ||
263 | |||
264 | static void free(void *where) | ||
265 | { /* gzip_mark & gzip_release do the free */ | ||
266 | } | ||
267 | |||
268 | static void gzip_mark(void **ptr) | ||
269 | { | ||
270 | arch_decomp_wdog(); | ||
271 | *ptr = (void *) free_mem_ptr; | ||
272 | } | ||
273 | 239 | ||
274 | static void gzip_release(void **ptr) | 240 | #define ARCH_HAS_DECOMP_WDOG |
275 | { | ||
276 | arch_decomp_wdog(); | ||
277 | free_mem_ptr = (long) *ptr; | ||
278 | } | ||
279 | #else | ||
280 | static void gzip_mark(void **ptr) | ||
281 | { | ||
282 | } | ||
283 | 241 | ||
284 | static void gzip_release(void **ptr) | 242 | #include "../../../../lib/inflate.c" |
285 | { | ||
286 | } | ||
287 | #endif | ||
288 | 243 | ||
289 | /* =========================================================================== | 244 | /* =========================================================================== |
290 | * Fill the input buffer. This is called only when the buffer is empty | 245 | * Fill the input buffer. This is called only when the buffer is empty |
@@ -348,7 +303,7 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p, | |||
348 | { | 303 | { |
349 | output_data = (uch *)output_start; /* Points to kernel start */ | 304 | output_data = (uch *)output_start; /* Points to kernel start */ |
350 | free_mem_ptr = free_mem_ptr_p; | 305 | free_mem_ptr = free_mem_ptr_p; |
351 | free_mem_ptr_end = free_mem_ptr_end_p; | 306 | free_mem_end_ptr = free_mem_ptr_end_p; |
352 | __machine_arch_type = arch_id; | 307 | __machine_arch_type = arch_id; |
353 | 308 | ||
354 | arch_decomp_setup(); | 309 | arch_decomp_setup(); |
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 5ee39e10c8d1..d28513f14d05 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c | |||
@@ -296,8 +296,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
296 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; | 296 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; |
297 | 297 | ||
298 | INIT_HLIST_HEAD(&empty_rp); | 298 | INIT_HLIST_HEAD(&empty_rp); |
299 | spin_lock_irqsave(&kretprobe_lock, flags); | 299 | kretprobe_hash_lock(current, &head, &flags); |
300 | head = kretprobe_inst_table_head(current); | ||
301 | 300 | ||
302 | /* | 301 | /* |
303 | * It is possible to have multiple instances associated with a given | 302 | * It is possible to have multiple instances associated with a given |
@@ -337,7 +336,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
337 | } | 336 | } |
338 | 337 | ||
339 | kretprobe_assert(ri, orig_ret_address, trampoline_address); | 338 | kretprobe_assert(ri, orig_ret_address, trampoline_address); |
340 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 339 | kretprobe_hash_unlock(current, &flags); |
341 | 340 | ||
342 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 341 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
343 | hlist_del(&ri->hlist); | 342 | hlist_del(&ri->hlist); |
@@ -347,7 +346,6 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
347 | return (void *)orig_ret_address; | 346 | return (void *)orig_ret_address; |
348 | } | 347 | } |
349 | 348 | ||
350 | /* Called with kretprobe_lock held. */ | ||
351 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 349 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
352 | struct pt_regs *regs) | 350 | struct pt_regs *regs) |
353 | { | 351 | { |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 1903a3491ee9..d8e9c2c3f0f6 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -1488,6 +1488,9 @@ static int __init _omap_gpio_init(void) | |||
1488 | bank->chip.set = gpio_set; | 1488 | bank->chip.set = gpio_set; |
1489 | if (bank_is_mpuio(bank)) { | 1489 | if (bank_is_mpuio(bank)) { |
1490 | bank->chip.label = "mpuio"; | 1490 | bank->chip.label = "mpuio"; |
1491 | #ifdef CONFIG_ARCH_OMAP1 | ||
1492 | bank->chip.dev = &omap_mpuio_device.dev; | ||
1493 | #endif | ||
1491 | bank->chip.base = OMAP_MPUIO(0); | 1494 | bank->chip.base = OMAP_MPUIO(0); |
1492 | } else { | 1495 | } else { |
1493 | bank->chip.label = "gpio"; | 1496 | bank->chip.label = "gpio"; |
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index df4adefedb42..7c239a916275 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig | |||
@@ -88,7 +88,7 @@ config PLATFORM_AT32AP | |||
88 | select SUBARCH_AVR32B | 88 | select SUBARCH_AVR32B |
89 | select MMU | 89 | select MMU |
90 | select PERFORMANCE_COUNTERS | 90 | select PERFORMANCE_COUNTERS |
91 | select HAVE_GPIO_LIB | 91 | select ARCH_REQUIRE_GPIOLIB |
92 | select GENERIC_ALLOCATOR | 92 | select GENERIC_ALLOCATOR |
93 | 93 | ||
94 | # | 94 | # |
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c index 60da03ba7117..296294f8ed81 100644 --- a/arch/avr32/mach-at32ap/pio.c +++ b/arch/avr32/mach-at32ap/pio.c | |||
@@ -360,6 +360,8 @@ static int __init pio_probe(struct platform_device *pdev) | |||
360 | pio->chip.label = pio->name; | 360 | pio->chip.label = pio->name; |
361 | pio->chip.base = pdev->id * 32; | 361 | pio->chip.base = pdev->id * 32; |
362 | pio->chip.ngpio = 32; | 362 | pio->chip.ngpio = 32; |
363 | pio->chip.dev = &pdev->dev; | ||
364 | pio->chip.owner = THIS_MODULE; | ||
363 | 365 | ||
364 | pio->chip.direction_input = direction_input; | 366 | pio->chip.direction_input = direction_input; |
365 | pio->chip.get = gpio_get; | 367 | pio->chip.get = gpio_get; |
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c index 18e13bce1400..d933c89889db 100644 --- a/arch/cris/arch-v10/boot/compressed/misc.c +++ b/arch/cris/arch-v10/boot/compressed/misc.c | |||
@@ -102,50 +102,16 @@ extern char *input_data; /* lives in head.S */ | |||
102 | static long bytes_out = 0; | 102 | static long bytes_out = 0; |
103 | static uch *output_data; | 103 | static uch *output_data; |
104 | static unsigned long output_ptr = 0; | 104 | static unsigned long output_ptr = 0; |
105 | |||
106 | static void *malloc(int size); | ||
107 | static void free(void *where); | ||
108 | static void gzip_mark(void **); | ||
109 | static void gzip_release(void **); | ||
110 | |||
111 | static void puts(const char *); | 105 | static void puts(const char *); |
112 | 106 | ||
113 | /* the "heap" is put directly after the BSS ends, at end */ | 107 | /* the "heap" is put directly after the BSS ends, at end */ |
114 | 108 | ||
115 | extern int _end; | 109 | extern int _end; |
116 | static long free_mem_ptr = (long)&_end; | 110 | static long free_mem_ptr = (long)&_end; |
111 | static long free_mem_end_ptr; | ||
117 | 112 | ||
118 | #include "../../../../../lib/inflate.c" | 113 | #include "../../../../../lib/inflate.c" |
119 | 114 | ||
120 | static void *malloc(int size) | ||
121 | { | ||
122 | void *p; | ||
123 | |||
124 | if (size < 0) | ||
125 | error("Malloc error"); | ||
126 | |||
127 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
128 | |||
129 | p = (void *)free_mem_ptr; | ||
130 | free_mem_ptr += size; | ||
131 | |||
132 | return p; | ||
133 | } | ||
134 | |||
135 | static void free(void *where) | ||
136 | { /* Don't care */ | ||
137 | } | ||
138 | |||
139 | static void gzip_mark(void **ptr) | ||
140 | { | ||
141 | *ptr = (void *) free_mem_ptr; | ||
142 | } | ||
143 | |||
144 | static void gzip_release(void **ptr) | ||
145 | { | ||
146 | free_mem_ptr = (long) *ptr; | ||
147 | } | ||
148 | |||
149 | /* decompressor info and error messages to serial console */ | 115 | /* decompressor info and error messages to serial console */ |
150 | 116 | ||
151 | static void | 117 | static void |
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c index 55b2695c5d70..3595e16e82bc 100644 --- a/arch/cris/arch-v32/boot/compressed/misc.c +++ b/arch/cris/arch-v32/boot/compressed/misc.c | |||
@@ -89,20 +89,14 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
89 | 89 | ||
90 | static void flush_window(void); | 90 | static void flush_window(void); |
91 | static void error(char *m); | 91 | static void error(char *m); |
92 | static void gzip_mark(void **); | ||
93 | static void gzip_release(void **); | ||
94 | 92 | ||
95 | extern char *input_data; /* lives in head.S */ | 93 | extern char *input_data; /* lives in head.S */ |
96 | 94 | ||
97 | static long bytes_out = 0; | 95 | static long bytes_out; |
98 | static uch *output_data; | 96 | static uch *output_data; |
99 | static unsigned long output_ptr = 0; | 97 | static unsigned long output_ptr; |
100 | 98 | ||
101 | static void *malloc(int size); | ||
102 | static void free(void *where); | ||
103 | static void error(char *m); | 99 | static void error(char *m); |
104 | static void gzip_mark(void **); | ||
105 | static void gzip_release(void **); | ||
106 | 100 | ||
107 | static void puts(const char *); | 101 | static void puts(const char *); |
108 | 102 | ||
@@ -110,37 +104,10 @@ static void puts(const char *); | |||
110 | 104 | ||
111 | extern int _end; | 105 | extern int _end; |
112 | static long free_mem_ptr = (long)&_end; | 106 | static long free_mem_ptr = (long)&_end; |
107 | static long free_mem_end_ptr; | ||
113 | 108 | ||
114 | #include "../../../../../lib/inflate.c" | 109 | #include "../../../../../lib/inflate.c" |
115 | 110 | ||
116 | static void *malloc(int size) | ||
117 | { | ||
118 | void *p; | ||
119 | |||
120 | if (size <0) error("Malloc error"); | ||
121 | |||
122 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
123 | |||
124 | p = (void *)free_mem_ptr; | ||
125 | free_mem_ptr += size; | ||
126 | |||
127 | return p; | ||
128 | } | ||
129 | |||
130 | static void free(void *where) | ||
131 | { /* Don't care */ | ||
132 | } | ||
133 | |||
134 | static void gzip_mark(void **ptr) | ||
135 | { | ||
136 | *ptr = (void *) free_mem_ptr; | ||
137 | } | ||
138 | |||
139 | static void gzip_release(void **ptr) | ||
140 | { | ||
141 | free_mem_ptr = (long) *ptr; | ||
142 | } | ||
143 | |||
144 | /* decompressor info and error messages to serial console */ | 111 | /* decompressor info and error messages to serial console */ |
145 | 112 | ||
146 | static inline void | 113 | static inline void |
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig index 085dc6ec152b..396ab059efa3 100644 --- a/arch/h8300/Kconfig +++ b/arch/h8300/Kconfig | |||
@@ -203,20 +203,6 @@ config UNIX98_PTYS | |||
203 | Read the instructions in <file:Documentation/Changes> pertaining to | 203 | Read the instructions in <file:Documentation/Changes> pertaining to |
204 | pseudo terminals. It's safe to say N. | 204 | pseudo terminals. It's safe to say N. |
205 | 205 | ||
206 | config UNIX98_PTY_COUNT | ||
207 | int "Maximum number of Unix98 PTYs in use (0-2048)" | ||
208 | depends on UNIX98_PTYS | ||
209 | default "256" | ||
210 | help | ||
211 | The maximum number of Unix98 PTYs that can be used at any one time. | ||
212 | The default is 256, and should be enough for desktop systems. Server | ||
213 | machines which support incoming telnet/rlogin/ssh connections and/or | ||
214 | serve several X terminals may want to increase this: every incoming | ||
215 | connection and every xterm uses up one PTY. | ||
216 | |||
217 | When not in use, each additional set of 256 PTYs occupy | ||
218 | approximately 8 KB of kernel memory on 32-bit architectures. | ||
219 | |||
220 | source "drivers/char/pcmcia/Kconfig" | 206 | source "drivers/char/pcmcia/Kconfig" |
221 | 207 | ||
222 | source "drivers/serial/Kconfig" | 208 | source "drivers/serial/Kconfig" |
diff --git a/arch/h8300/boot/compressed/misc.c b/arch/h8300/boot/compressed/misc.c index 845074588af0..51ab6cbd030f 100644 --- a/arch/h8300/boot/compressed/misc.c +++ b/arch/h8300/boot/compressed/misc.c | |||
@@ -67,8 +67,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
67 | static int fill_inbuf(void); | 67 | static int fill_inbuf(void); |
68 | static void flush_window(void); | 68 | static void flush_window(void); |
69 | static void error(char *m); | 69 | static void error(char *m); |
70 | static void gzip_mark(void **); | ||
71 | static void gzip_release(void **); | ||
72 | 70 | ||
73 | extern char input_data[]; | 71 | extern char input_data[]; |
74 | extern int input_len; | 72 | extern int input_len; |
@@ -77,11 +75,7 @@ static long bytes_out = 0; | |||
77 | static uch *output_data; | 75 | static uch *output_data; |
78 | static unsigned long output_ptr = 0; | 76 | static unsigned long output_ptr = 0; |
79 | 77 | ||
80 | static void *malloc(int size); | ||
81 | static void free(void *where); | ||
82 | static void error(char *m); | 78 | static void error(char *m); |
83 | static void gzip_mark(void **); | ||
84 | static void gzip_release(void **); | ||
85 | 79 | ||
86 | int puts(const char *); | 80 | int puts(const char *); |
87 | 81 | ||
@@ -98,38 +92,6 @@ static unsigned long free_mem_end_ptr; | |||
98 | #define TDR *((volatile unsigned char *)0xffff8b) | 92 | #define TDR *((volatile unsigned char *)0xffff8b) |
99 | #define SSR *((volatile unsigned char *)0xffff8c) | 93 | #define SSR *((volatile unsigned char *)0xffff8c) |
100 | 94 | ||
101 | static void *malloc(int size) | ||
102 | { | ||
103 | void *p; | ||
104 | |||
105 | if (size <0) error("Malloc error"); | ||
106 | if (free_mem_ptr == 0) error("Memory error"); | ||
107 | |||
108 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
109 | |||
110 | p = (void *)free_mem_ptr; | ||
111 | free_mem_ptr += size; | ||
112 | |||
113 | if (free_mem_ptr >= free_mem_end_ptr) | ||
114 | error("Out of memory"); | ||
115 | |||
116 | return p; | ||
117 | } | ||
118 | |||
119 | static void free(void *where) | ||
120 | { /* Don't care */ | ||
121 | } | ||
122 | |||
123 | static void gzip_mark(void **ptr) | ||
124 | { | ||
125 | *ptr = (void *) free_mem_ptr; | ||
126 | } | ||
127 | |||
128 | static void gzip_release(void **ptr) | ||
129 | { | ||
130 | free_mem_ptr = (long) *ptr; | ||
131 | } | ||
132 | |||
133 | int puts(const char *s) | 95 | int puts(const char *s) |
134 | { | 96 | { |
135 | return 0; | 97 | return 0; |
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c index 233434f4f88f..f07688da947c 100644 --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c | |||
@@ -429,8 +429,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
429 | ((struct fnptr *)kretprobe_trampoline)->ip; | 429 | ((struct fnptr *)kretprobe_trampoline)->ip; |
430 | 430 | ||
431 | INIT_HLIST_HEAD(&empty_rp); | 431 | INIT_HLIST_HEAD(&empty_rp); |
432 | spin_lock_irqsave(&kretprobe_lock, flags); | 432 | kretprobe_hash_lock(current, &head, &flags); |
433 | head = kretprobe_inst_table_head(current); | ||
434 | 433 | ||
435 | /* | 434 | /* |
436 | * It is possible to have multiple instances associated with a given | 435 | * It is possible to have multiple instances associated with a given |
@@ -485,7 +484,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
485 | kretprobe_assert(ri, orig_ret_address, trampoline_address); | 484 | kretprobe_assert(ri, orig_ret_address, trampoline_address); |
486 | 485 | ||
487 | reset_current_kprobe(); | 486 | reset_current_kprobe(); |
488 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 487 | kretprobe_hash_unlock(current, &flags); |
489 | preempt_enable_no_resched(); | 488 | preempt_enable_no_resched(); |
490 | 489 | ||
491 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 490 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
@@ -500,7 +499,6 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
500 | return 1; | 499 | return 1; |
501 | } | 500 | } |
502 | 501 | ||
503 | /* Called with kretprobe_lock held */ | ||
504 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 502 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
505 | struct pt_regs *regs) | 503 | struct pt_regs *regs) |
506 | { | 504 | { |
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c index 600d40e33495..d394292498c0 100644 --- a/arch/m32r/boot/compressed/misc.c +++ b/arch/m32r/boot/compressed/misc.c | |||
@@ -70,8 +70,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
70 | static int fill_inbuf(void); | 70 | static int fill_inbuf(void); |
71 | static void flush_window(void); | 71 | static void flush_window(void); |
72 | static void error(char *m); | 72 | static void error(char *m); |
73 | static void gzip_mark(void **); | ||
74 | static void gzip_release(void **); | ||
75 | 73 | ||
76 | static unsigned char *input_data; | 74 | static unsigned char *input_data; |
77 | static int input_len; | 75 | static int input_len; |
@@ -82,9 +80,6 @@ static unsigned long output_ptr = 0; | |||
82 | 80 | ||
83 | #include "m32r_sio.c" | 81 | #include "m32r_sio.c" |
84 | 82 | ||
85 | static void *malloc(int size); | ||
86 | static void free(void *where); | ||
87 | |||
88 | static unsigned long free_mem_ptr; | 83 | static unsigned long free_mem_ptr; |
89 | static unsigned long free_mem_end_ptr; | 84 | static unsigned long free_mem_end_ptr; |
90 | 85 | ||
@@ -92,38 +87,6 @@ static unsigned long free_mem_end_ptr; | |||
92 | 87 | ||
93 | #include "../../../../lib/inflate.c" | 88 | #include "../../../../lib/inflate.c" |
94 | 89 | ||
95 | static void *malloc(int size) | ||
96 | { | ||
97 | void *p; | ||
98 | |||
99 | if (size <0) error("Malloc error"); | ||
100 | if (free_mem_ptr == 0) error("Memory error"); | ||
101 | |||
102 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
103 | |||
104 | p = (void *)free_mem_ptr; | ||
105 | free_mem_ptr += size; | ||
106 | |||
107 | if (free_mem_ptr >= free_mem_end_ptr) | ||
108 | error("Out of memory"); | ||
109 | |||
110 | return p; | ||
111 | } | ||
112 | |||
113 | static void free(void *where) | ||
114 | { /* Don't care */ | ||
115 | } | ||
116 | |||
117 | static void gzip_mark(void **ptr) | ||
118 | { | ||
119 | *ptr = (void *) free_mem_ptr; | ||
120 | } | ||
121 | |||
122 | static void gzip_release(void **ptr) | ||
123 | { | ||
124 | free_mem_ptr = (long) *ptr; | ||
125 | } | ||
126 | |||
127 | void* memset(void* s, int c, size_t n) | 90 | void* memset(void* s, int c, size_t n) |
128 | { | 91 | { |
129 | int i; | 92 | int i; |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index b9c754f4070c..b4c4eaa5dd26 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -713,7 +713,7 @@ config CSRC_SB1250 | |||
713 | 713 | ||
714 | config GPIO_TXX9 | 714 | config GPIO_TXX9 |
715 | select GENERIC_GPIO | 715 | select GENERIC_GPIO |
716 | select HAVE_GPIO_LIB | 716 | select ARCH_REQUIRE_GPIOLIB |
717 | bool | 717 | bool |
718 | 718 | ||
719 | config CFE | 719 | config CFE |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index c266211ed653..2fefb14414b7 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/file.h> | 11 | #include <linux/file.h> |
12 | #include <linux/smp_lock.h> | 12 | #include <linux/smp_lock.h> |
13 | #include <linux/highuid.h> | 13 | #include <linux/highuid.h> |
14 | #include <linux/dirent.h> | ||
15 | #include <linux/resource.h> | 14 | #include <linux/resource.h> |
16 | #include <linux/highmem.h> | 15 | #include <linux/highmem.h> |
17 | #include <linux/time.h> | 16 | #include <linux/time.h> |
diff --git a/arch/mn10300/boot/compressed/misc.c b/arch/mn10300/boot/compressed/misc.c index ded207efc97a..f673383518e4 100644 --- a/arch/mn10300/boot/compressed/misc.c +++ b/arch/mn10300/boot/compressed/misc.c | |||
@@ -153,26 +153,9 @@ static uch *output_data; | |||
153 | static unsigned long output_ptr; | 153 | static unsigned long output_ptr; |
154 | 154 | ||
155 | 155 | ||
156 | static void *malloc(int size); | ||
157 | |||
158 | static inline void free(void *where) | ||
159 | { /* Don't care */ | ||
160 | } | ||
161 | |||
162 | static unsigned long free_mem_ptr = (unsigned long) &end; | 156 | static unsigned long free_mem_ptr = (unsigned long) &end; |
163 | static unsigned long free_mem_end_ptr = (unsigned long) &end + 0x90000; | 157 | static unsigned long free_mem_end_ptr = (unsigned long) &end + 0x90000; |
164 | 158 | ||
165 | static inline void gzip_mark(void **ptr) | ||
166 | { | ||
167 | kputs("."); | ||
168 | *ptr = (void *) free_mem_ptr; | ||
169 | } | ||
170 | |||
171 | static inline void gzip_release(void **ptr) | ||
172 | { | ||
173 | free_mem_ptr = (unsigned long) *ptr; | ||
174 | } | ||
175 | |||
176 | #define INPLACE_MOVE_ROUTINE 0x1000 | 159 | #define INPLACE_MOVE_ROUTINE 0x1000 |
177 | #define LOW_BUFFER_START 0x2000 | 160 | #define LOW_BUFFER_START 0x2000 |
178 | #define LOW_BUFFER_END 0x90000 | 161 | #define LOW_BUFFER_END 0x90000 |
@@ -186,26 +169,6 @@ static int lines, cols; | |||
186 | 169 | ||
187 | #include "../../../../lib/inflate.c" | 170 | #include "../../../../lib/inflate.c" |
188 | 171 | ||
189 | static void *malloc(int size) | ||
190 | { | ||
191 | void *p; | ||
192 | |||
193 | if (size < 0) | ||
194 | error("Malloc error\n"); | ||
195 | if (!free_mem_ptr) | ||
196 | error("Memory error\n"); | ||
197 | |||
198 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
199 | |||
200 | p = (void *) free_mem_ptr; | ||
201 | free_mem_ptr += size; | ||
202 | |||
203 | if (free_mem_ptr >= free_mem_end_ptr) | ||
204 | error("\nOut of memory\n"); | ||
205 | |||
206 | return p; | ||
207 | } | ||
208 | |||
209 | static inline void scroll(void) | 172 | static inline void scroll(void) |
210 | { | 173 | { |
211 | int i; | 174 | int i; |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index a487671c282f..fe88418167c5 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -110,8 +110,10 @@ config PPC | |||
110 | default y | 110 | default y |
111 | select HAVE_DYNAMIC_FTRACE | 111 | select HAVE_DYNAMIC_FTRACE |
112 | select HAVE_FTRACE | 112 | select HAVE_FTRACE |
113 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
113 | select HAVE_IDE | 114 | select HAVE_IDE |
114 | select HAVE_IOREMAP_PROT | 115 | select HAVE_IOREMAP_PROT |
116 | select HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
115 | select HAVE_KPROBES | 117 | select HAVE_KPROBES |
116 | select HAVE_ARCH_KGDB | 118 | select HAVE_ARCH_KGDB |
117 | select HAVE_KRETPROBES | 119 | select HAVE_KRETPROBES |
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 4ba2af125450..de79915452c8 100644 --- a/arch/powerpc/kernel/kprobes.c +++ b/arch/powerpc/kernel/kprobes.c | |||
@@ -144,7 +144,6 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
144 | kcb->kprobe_saved_msr = regs->msr; | 144 | kcb->kprobe_saved_msr = regs->msr; |
145 | } | 145 | } |
146 | 146 | ||
147 | /* Called with kretprobe_lock held */ | ||
148 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 147 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
149 | struct pt_regs *regs) | 148 | struct pt_regs *regs) |
150 | { | 149 | { |
@@ -312,8 +311,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
312 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; | 311 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; |
313 | 312 | ||
314 | INIT_HLIST_HEAD(&empty_rp); | 313 | INIT_HLIST_HEAD(&empty_rp); |
315 | spin_lock_irqsave(&kretprobe_lock, flags); | 314 | kretprobe_hash_lock(current, &head, &flags); |
316 | head = kretprobe_inst_table_head(current); | ||
317 | 315 | ||
318 | /* | 316 | /* |
319 | * It is possible to have multiple instances associated with a given | 317 | * It is possible to have multiple instances associated with a given |
@@ -352,7 +350,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
352 | regs->nip = orig_ret_address; | 350 | regs->nip = orig_ret_address; |
353 | 351 | ||
354 | reset_current_kprobe(); | 352 | reset_current_kprobe(); |
355 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 353 | kretprobe_hash_unlock(current, &flags); |
356 | preempt_enable_no_resched(); | 354 | preempt_enable_no_resched(); |
357 | 355 | ||
358 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 356 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index 9a51675beb80..696a5ee4962d 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -47,7 +47,7 @@ config PPC_MPC5200_BUGFIX | |||
47 | config PPC_MPC5200_GPIO | 47 | config PPC_MPC5200_GPIO |
48 | bool "MPC5200 GPIO support" | 48 | bool "MPC5200 GPIO support" |
49 | depends on PPC_MPC52xx | 49 | depends on PPC_MPC52xx |
50 | select ARCH_REQUIRE_GPIOLIB | ||
50 | select GENERIC_GPIO | 51 | select GENERIC_GPIO |
51 | select HAVE_GPIO_LIB | ||
52 | help | 52 | help |
53 | Enable gpiolib support for mpc5200 based boards | 53 | Enable gpiolib support for mpc5200 based boards |
diff --git a/arch/powerpc/sysdev/qe_lib/Kconfig b/arch/powerpc/sysdev/qe_lib/Kconfig index 4bb18f57901e..1ce546462be5 100644 --- a/arch/powerpc/sysdev/qe_lib/Kconfig +++ b/arch/powerpc/sysdev/qe_lib/Kconfig | |||
@@ -29,7 +29,7 @@ config QE_GPIO | |||
29 | bool "QE GPIO support" | 29 | bool "QE GPIO support" |
30 | depends on QUICC_ENGINE | 30 | depends on QUICC_ENGINE |
31 | select GENERIC_GPIO | 31 | select GENERIC_GPIO |
32 | select HAVE_GPIO_LIB | 32 | select ARCH_REQUIRE_GPIOLIB |
33 | help | 33 | help |
34 | Say Y here if you're going to use hardware that connects to the | 34 | Say Y here if you're going to use hardware that connects to the |
35 | QE GPIOs. | 35 | QE GPIOs. |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index eb530b4128ba..2ed88122be93 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -565,6 +565,7 @@ bool "s390 guest support (EXPERIMENTAL)" | |||
565 | depends on 64BIT && EXPERIMENTAL | 565 | depends on 64BIT && EXPERIMENTAL |
566 | select VIRTIO | 566 | select VIRTIO |
567 | select VIRTIO_RING | 567 | select VIRTIO_RING |
568 | select VIRTIO_CONSOLE | ||
568 | help | 569 | help |
569 | Select this option if you want to run the kernel under s390 linux | 570 | Select this option if you want to run the kernel under s390 linux |
570 | endmenu | 571 | endmenu |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 288ad490a6dd..4f82e5b5f879 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -270,7 +270,6 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
270 | __ctl_store(kcb->kprobe_saved_ctl, 9, 11); | 270 | __ctl_store(kcb->kprobe_saved_ctl, 9, 11); |
271 | } | 271 | } |
272 | 272 | ||
273 | /* Called with kretprobe_lock held */ | ||
274 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 273 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
275 | struct pt_regs *regs) | 274 | struct pt_regs *regs) |
276 | { | 275 | { |
@@ -377,8 +376,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
377 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; | 376 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; |
378 | 377 | ||
379 | INIT_HLIST_HEAD(&empty_rp); | 378 | INIT_HLIST_HEAD(&empty_rp); |
380 | spin_lock_irqsave(&kretprobe_lock, flags); | 379 | kretprobe_hash_lock(current, &head, &flags); |
381 | head = kretprobe_inst_table_head(current); | ||
382 | 380 | ||
383 | /* | 381 | /* |
384 | * It is possible to have multiple instances associated with a given | 382 | * It is possible to have multiple instances associated with a given |
@@ -417,7 +415,7 @@ static int __kprobes trampoline_probe_handler(struct kprobe *p, | |||
417 | regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE; | 415 | regs->psw.addr = orig_ret_address | PSW_ADDR_AMODE; |
418 | 416 | ||
419 | reset_current_kprobe(); | 417 | reset_current_kprobe(); |
420 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 418 | kretprobe_hash_unlock(current, &flags); |
421 | preempt_enable_no_resched(); | 419 | preempt_enable_no_resched(); |
422 | 420 | ||
423 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 421 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index b358e18273b0..62122bad1e33 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -54,6 +54,7 @@ | |||
54 | #include <asm/sections.h> | 54 | #include <asm/sections.h> |
55 | #include <asm/ebcdic.h> | 55 | #include <asm/ebcdic.h> |
56 | #include <asm/compat.h> | 56 | #include <asm/compat.h> |
57 | #include <asm/kvm_virtio.h> | ||
57 | 58 | ||
58 | long psw_kernel_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | | 59 | long psw_kernel_bits = (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | |
59 | PSW_MASK_MCHECK | PSW_DEFAULT_KEY); | 60 | PSW_MASK_MCHECK | PSW_DEFAULT_KEY); |
@@ -766,7 +767,8 @@ setup_arch(char **cmdline_p) | |||
766 | printk("We are running under VM (64 bit mode)\n"); | 767 | printk("We are running under VM (64 bit mode)\n"); |
767 | else if (MACHINE_IS_KVM) { | 768 | else if (MACHINE_IS_KVM) { |
768 | printk("We are running under KVM (64 bit mode)\n"); | 769 | printk("We are running under KVM (64 bit mode)\n"); |
769 | add_preferred_console("ttyS", 1, NULL); | 770 | add_preferred_console("hvc", 0, NULL); |
771 | s390_virtio_console_init(); | ||
770 | } else | 772 | } else |
771 | printk("We are running native (64 bit mode)\n"); | 773 | printk("We are running native (64 bit mode)\n"); |
772 | #endif /* CONFIG_64BIT */ | 774 | #endif /* CONFIG_64BIT */ |
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 212d618b0095..632b13e10053 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -9,7 +9,6 @@ | |||
9 | #include <linux/device.h> | 9 | #include <linux/device.h> |
10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
11 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
12 | #include <linux/kthread.h> | ||
13 | #include <linux/workqueue.h> | 12 | #include <linux/workqueue.h> |
14 | #include <linux/cpu.h> | 13 | #include <linux/cpu.h> |
15 | #include <linux/smp.h> | 14 | #include <linux/smp.h> |
@@ -230,20 +229,9 @@ void arch_update_cpu_topology(void) | |||
230 | } | 229 | } |
231 | } | 230 | } |
232 | 231 | ||
233 | static int topology_kthread(void *data) | ||
234 | { | ||
235 | arch_reinit_sched_domains(); | ||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static void topology_work_fn(struct work_struct *work) | 232 | static void topology_work_fn(struct work_struct *work) |
240 | { | 233 | { |
241 | /* We can't call arch_reinit_sched_domains() from a multi-threaded | 234 | arch_reinit_sched_domains(); |
242 | * workqueue context since it may deadlock in case of cpu hotplug. | ||
243 | * So we have to create a kernel thread in order to call | ||
244 | * arch_reinit_sched_domains(). | ||
245 | */ | ||
246 | kthread_run(topology_kthread, NULL, "topology_update"); | ||
247 | } | 235 | } |
248 | 236 | ||
249 | void topology_schedule_update(void) | 237 | void topology_schedule_update(void) |
diff --git a/arch/sh/boot/compressed/misc_32.c b/arch/sh/boot/compressed/misc_32.c index adcea31e663e..f386997e4d9c 100644 --- a/arch/sh/boot/compressed/misc_32.c +++ b/arch/sh/boot/compressed/misc_32.c | |||
@@ -74,8 +74,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
74 | static int fill_inbuf(void); | 74 | static int fill_inbuf(void); |
75 | static void flush_window(void); | 75 | static void flush_window(void); |
76 | static void error(char *m); | 76 | static void error(char *m); |
77 | static void gzip_mark(void **); | ||
78 | static void gzip_release(void **); | ||
79 | 77 | ||
80 | extern char input_data[]; | 78 | extern char input_data[]; |
81 | extern int input_len; | 79 | extern int input_len; |
@@ -84,11 +82,7 @@ static long bytes_out = 0; | |||
84 | static uch *output_data; | 82 | static uch *output_data; |
85 | static unsigned long output_ptr = 0; | 83 | static unsigned long output_ptr = 0; |
86 | 84 | ||
87 | static void *malloc(int size); | ||
88 | static void free(void *where); | ||
89 | static void error(char *m); | 85 | static void error(char *m); |
90 | static void gzip_mark(void **); | ||
91 | static void gzip_release(void **); | ||
92 | 86 | ||
93 | int puts(const char *); | 87 | int puts(const char *); |
94 | 88 | ||
@@ -101,38 +95,6 @@ static unsigned long free_mem_end_ptr; | |||
101 | 95 | ||
102 | #include "../../../../lib/inflate.c" | 96 | #include "../../../../lib/inflate.c" |
103 | 97 | ||
104 | static void *malloc(int size) | ||
105 | { | ||
106 | void *p; | ||
107 | |||
108 | if (size <0) error("Malloc error"); | ||
109 | if (free_mem_ptr == 0) error("Memory error"); | ||
110 | |||
111 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
112 | |||
113 | p = (void *)free_mem_ptr; | ||
114 | free_mem_ptr += size; | ||
115 | |||
116 | if (free_mem_ptr >= free_mem_end_ptr) | ||
117 | error("Out of memory"); | ||
118 | |||
119 | return p; | ||
120 | } | ||
121 | |||
122 | static void free(void *where) | ||
123 | { /* Don't care */ | ||
124 | } | ||
125 | |||
126 | static void gzip_mark(void **ptr) | ||
127 | { | ||
128 | *ptr = (void *) free_mem_ptr; | ||
129 | } | ||
130 | |||
131 | static void gzip_release(void **ptr) | ||
132 | { | ||
133 | free_mem_ptr = (long) *ptr; | ||
134 | } | ||
135 | |||
136 | #ifdef CONFIG_SH_STANDARD_BIOS | 98 | #ifdef CONFIG_SH_STANDARD_BIOS |
137 | size_t strlen(const char *s) | 99 | size_t strlen(const char *s) |
138 | { | 100 | { |
diff --git a/arch/sh/boot/compressed/misc_64.c b/arch/sh/boot/compressed/misc_64.c index a006ef89b9dd..2941657e18aa 100644 --- a/arch/sh/boot/compressed/misc_64.c +++ b/arch/sh/boot/compressed/misc_64.c | |||
@@ -72,8 +72,6 @@ static unsigned outcnt = 0; /* bytes in output buffer */ | |||
72 | static int fill_inbuf(void); | 72 | static int fill_inbuf(void); |
73 | static void flush_window(void); | 73 | static void flush_window(void); |
74 | static void error(char *m); | 74 | static void error(char *m); |
75 | static void gzip_mark(void **); | ||
76 | static void gzip_release(void **); | ||
77 | 75 | ||
78 | extern char input_data[]; | 76 | extern char input_data[]; |
79 | extern int input_len; | 77 | extern int input_len; |
@@ -82,11 +80,7 @@ static long bytes_out = 0; | |||
82 | static uch *output_data; | 80 | static uch *output_data; |
83 | static unsigned long output_ptr = 0; | 81 | static unsigned long output_ptr = 0; |
84 | 82 | ||
85 | static void *malloc(int size); | ||
86 | static void free(void *where); | ||
87 | static void error(char *m); | 83 | static void error(char *m); |
88 | static void gzip_mark(void **); | ||
89 | static void gzip_release(void **); | ||
90 | 84 | ||
91 | static void puts(const char *); | 85 | static void puts(const char *); |
92 | 86 | ||
@@ -99,40 +93,6 @@ static unsigned long free_mem_end_ptr; | |||
99 | 93 | ||
100 | #include "../../../../lib/inflate.c" | 94 | #include "../../../../lib/inflate.c" |
101 | 95 | ||
102 | static void *malloc(int size) | ||
103 | { | ||
104 | void *p; | ||
105 | |||
106 | if (size < 0) | ||
107 | error("Malloc error\n"); | ||
108 | if (free_mem_ptr == 0) | ||
109 | error("Memory error\n"); | ||
110 | |||
111 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
112 | |||
113 | p = (void *) free_mem_ptr; | ||
114 | free_mem_ptr += size; | ||
115 | |||
116 | if (free_mem_ptr >= free_mem_end_ptr) | ||
117 | error("\nOut of memory\n"); | ||
118 | |||
119 | return p; | ||
120 | } | ||
121 | |||
122 | static void free(void *where) | ||
123 | { /* Don't care */ | ||
124 | } | ||
125 | |||
126 | static void gzip_mark(void **ptr) | ||
127 | { | ||
128 | *ptr = (void *) free_mem_ptr; | ||
129 | } | ||
130 | |||
131 | static void gzip_release(void **ptr) | ||
132 | { | ||
133 | free_mem_ptr = (long) *ptr; | ||
134 | } | ||
135 | |||
136 | void puts(const char *s) | 96 | void puts(const char *s) |
137 | { | 97 | { |
138 | } | 98 | } |
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index 789724e61e83..375de7c6d082 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -298,20 +298,6 @@ config UNIX98_PTYS | |||
298 | Read the instructions in <file:Documentation/Changes> pertaining to | 298 | Read the instructions in <file:Documentation/Changes> pertaining to |
299 | pseudo terminals. It's safe to say N. | 299 | pseudo terminals. It's safe to say N. |
300 | 300 | ||
301 | config UNIX98_PTY_COUNT | ||
302 | int "Maximum number of Unix98 PTYs in use (0-2048)" | ||
303 | depends on UNIX98_PTYS | ||
304 | default "256" | ||
305 | help | ||
306 | The maximum number of Unix98 PTYs that can be used at any one time. | ||
307 | The default is 256, and should be enough for desktop systems. Server | ||
308 | machines which support incoming telnet/rlogin/ssh connections and/or | ||
309 | serve several X terminals may want to increase this: every incoming | ||
310 | connection and every xterm uses up one PTY. | ||
311 | |||
312 | When not in use, each additional set of 256 PTYs occupy | ||
313 | approximately 8 KB of kernel memory on 32-bit architectures. | ||
314 | |||
315 | endmenu | 301 | endmenu |
316 | 302 | ||
317 | source "fs/Kconfig" | 303 | source "fs/Kconfig" |
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c index f43b5d755354..201a6e547e4a 100644 --- a/arch/sparc64/kernel/kprobes.c +++ b/arch/sparc64/kernel/kprobes.c | |||
@@ -478,9 +478,9 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
478 | return 0; | 478 | return 0; |
479 | } | 479 | } |
480 | 480 | ||
481 | /* Called with kretprobe_lock held. The value stored in the return | 481 | /* The value stored in the return address register is actually 2 |
482 | * address register is actually 2 instructions before where the | 482 | * instructions before where the callee will return to. |
483 | * callee will return to. Sequences usually look something like this | 483 | * Sequences usually look something like this |
484 | * | 484 | * |
485 | * call some_function <--- return register points here | 485 | * call some_function <--- return register points here |
486 | * nop <--- call delay slot | 486 | * nop <--- call delay slot |
@@ -512,8 +512,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
512 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; | 512 | unsigned long trampoline_address =(unsigned long)&kretprobe_trampoline; |
513 | 513 | ||
514 | INIT_HLIST_HEAD(&empty_rp); | 514 | INIT_HLIST_HEAD(&empty_rp); |
515 | spin_lock_irqsave(&kretprobe_lock, flags); | 515 | kretprobe_hash_lock(current, &head, &flags); |
516 | head = kretprobe_inst_table_head(current); | ||
517 | 516 | ||
518 | /* | 517 | /* |
519 | * It is possible to have multiple instances associated with a given | 518 | * It is possible to have multiple instances associated with a given |
@@ -553,7 +552,7 @@ int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) | |||
553 | regs->tnpc = orig_ret_address + 4; | 552 | regs->tnpc = orig_ret_address + 4; |
554 | 553 | ||
555 | reset_current_kprobe(); | 554 | reset_current_kprobe(); |
556 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 555 | kretprobe_hash_unlock(current, &flags); |
557 | preempt_enable_no_resched(); | 556 | preempt_enable_no_resched(); |
558 | 557 | ||
559 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 558 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index b2ddfcf01728..e3cba0b45600 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -23,11 +23,13 @@ config X86 | |||
23 | select HAVE_OPROFILE | 23 | select HAVE_OPROFILE |
24 | select HAVE_IOREMAP_PROT | 24 | select HAVE_IOREMAP_PROT |
25 | select HAVE_KPROBES | 25 | select HAVE_KPROBES |
26 | select ARCH_WANT_OPTIONAL_GPIOLIB if !X86_RDC321X | ||
26 | select HAVE_KRETPROBES | 27 | select HAVE_KRETPROBES |
27 | select HAVE_DYNAMIC_FTRACE | 28 | select HAVE_DYNAMIC_FTRACE |
28 | select HAVE_FTRACE | 29 | select HAVE_FTRACE |
29 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) | 30 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) |
30 | select HAVE_ARCH_KGDB if !X86_VOYAGER | 31 | select HAVE_ARCH_KGDB if !X86_VOYAGER |
32 | select HAVE_EFFICIENT_UNALIGNED_ACCESS | ||
31 | 33 | ||
32 | config ARCH_DEFCONFIG | 34 | config ARCH_DEFCONFIG |
33 | string | 35 | string |
diff --git a/arch/x86/boot/compressed/misc.c b/arch/x86/boot/compressed/misc.c index bc5553b496f7..9fea73706479 100644 --- a/arch/x86/boot/compressed/misc.c +++ b/arch/x86/boot/compressed/misc.c | |||
@@ -182,8 +182,6 @@ static unsigned outcnt; | |||
182 | static int fill_inbuf(void); | 182 | static int fill_inbuf(void); |
183 | static void flush_window(void); | 183 | static void flush_window(void); |
184 | static void error(char *m); | 184 | static void error(char *m); |
185 | static void gzip_mark(void **); | ||
186 | static void gzip_release(void **); | ||
187 | 185 | ||
188 | /* | 186 | /* |
189 | * This is set up by the setup-routine at boot-time | 187 | * This is set up by the setup-routine at boot-time |
@@ -196,9 +194,6 @@ extern int input_len; | |||
196 | 194 | ||
197 | static long bytes_out; | 195 | static long bytes_out; |
198 | 196 | ||
199 | static void *malloc(int size); | ||
200 | static void free(void *where); | ||
201 | |||
202 | static void *memset(void *s, int c, unsigned n); | 197 | static void *memset(void *s, int c, unsigned n); |
203 | static void *memcpy(void *dest, const void *src, unsigned n); | 198 | static void *memcpy(void *dest, const void *src, unsigned n); |
204 | 199 | ||
@@ -220,40 +215,6 @@ static int lines, cols; | |||
220 | 215 | ||
221 | #include "../../../../lib/inflate.c" | 216 | #include "../../../../lib/inflate.c" |
222 | 217 | ||
223 | static void *malloc(int size) | ||
224 | { | ||
225 | void *p; | ||
226 | |||
227 | if (size < 0) | ||
228 | error("Malloc error"); | ||
229 | if (free_mem_ptr <= 0) | ||
230 | error("Memory error"); | ||
231 | |||
232 | free_mem_ptr = (free_mem_ptr + 3) & ~3; /* Align */ | ||
233 | |||
234 | p = (void *)free_mem_ptr; | ||
235 | free_mem_ptr += size; | ||
236 | |||
237 | if (free_mem_ptr >= free_mem_end_ptr) | ||
238 | error("Out of memory"); | ||
239 | |||
240 | return p; | ||
241 | } | ||
242 | |||
243 | static void free(void *where) | ||
244 | { /* Don't care */ | ||
245 | } | ||
246 | |||
247 | static void gzip_mark(void **ptr) | ||
248 | { | ||
249 | *ptr = (void *) free_mem_ptr; | ||
250 | } | ||
251 | |||
252 | static void gzip_release(void **ptr) | ||
253 | { | ||
254 | free_mem_ptr = (memptr) *ptr; | ||
255 | } | ||
256 | |||
257 | static void scroll(void) | 218 | static void scroll(void) |
258 | { | 219 | { |
259 | int i; | 220 | int i; |
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index 43c019f85f0d..6c27679ec6aa 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
@@ -431,7 +431,6 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) | |||
431 | regs->ip = (unsigned long)p->ainsn.insn; | 431 | regs->ip = (unsigned long)p->ainsn.insn; |
432 | } | 432 | } |
433 | 433 | ||
434 | /* Called with kretprobe_lock held */ | ||
435 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, | 434 | void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri, |
436 | struct pt_regs *regs) | 435 | struct pt_regs *regs) |
437 | { | 436 | { |
@@ -682,8 +681,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
682 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; | 681 | unsigned long trampoline_address = (unsigned long)&kretprobe_trampoline; |
683 | 682 | ||
684 | INIT_HLIST_HEAD(&empty_rp); | 683 | INIT_HLIST_HEAD(&empty_rp); |
685 | spin_lock_irqsave(&kretprobe_lock, flags); | 684 | kretprobe_hash_lock(current, &head, &flags); |
686 | head = kretprobe_inst_table_head(current); | ||
687 | /* fixup registers */ | 685 | /* fixup registers */ |
688 | #ifdef CONFIG_X86_64 | 686 | #ifdef CONFIG_X86_64 |
689 | regs->cs = __KERNEL_CS; | 687 | regs->cs = __KERNEL_CS; |
@@ -732,7 +730,7 @@ static __used __kprobes void *trampoline_handler(struct pt_regs *regs) | |||
732 | 730 | ||
733 | kretprobe_assert(ri, orig_ret_address, trampoline_address); | 731 | kretprobe_assert(ri, orig_ret_address, trampoline_address); |
734 | 732 | ||
735 | spin_unlock_irqrestore(&kretprobe_lock, flags); | 733 | kretprobe_hash_unlock(current, &flags); |
736 | 734 | ||
737 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { | 735 | hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { |
738 | hlist_del(&ri->hlist); | 736 | hlist_del(&ri->hlist); |
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 151f2d171f7c..19e7fc7c2c4f 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/mm.h> | 29 | #include <linux/mm.h> |
30 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/crash_dump.h> | ||
32 | #include <linux/dma-mapping.h> | 33 | #include <linux/dma-mapping.h> |
33 | #include <linux/bitops.h> | 34 | #include <linux/bitops.h> |
34 | #include <linux/pci_ids.h> | 35 | #include <linux/pci_ids.h> |
@@ -167,6 +168,8 @@ static void calgary_dump_error_regs(struct iommu_table *tbl); | |||
167 | static void calioc2_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev); | 168 | static void calioc2_handle_quirks(struct iommu_table *tbl, struct pci_dev *dev); |
168 | static void calioc2_tce_cache_blast(struct iommu_table *tbl); | 169 | static void calioc2_tce_cache_blast(struct iommu_table *tbl); |
169 | static void calioc2_dump_error_regs(struct iommu_table *tbl); | 170 | static void calioc2_dump_error_regs(struct iommu_table *tbl); |
171 | static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl); | ||
172 | static void get_tce_space_from_tar(void); | ||
170 | 173 | ||
171 | static struct cal_chipset_ops calgary_chip_ops = { | 174 | static struct cal_chipset_ops calgary_chip_ops = { |
172 | .handle_quirks = calgary_handle_quirks, | 175 | .handle_quirks = calgary_handle_quirks, |
@@ -830,7 +833,11 @@ static int __init calgary_setup_tar(struct pci_dev *dev, void __iomem *bbar) | |||
830 | 833 | ||
831 | tbl = pci_iommu(dev->bus); | 834 | tbl = pci_iommu(dev->bus); |
832 | tbl->it_base = (unsigned long)bus_info[dev->bus->number].tce_space; | 835 | tbl->it_base = (unsigned long)bus_info[dev->bus->number].tce_space; |
833 | tce_free(tbl, 0, tbl->it_size); | 836 | |
837 | if (is_kdump_kernel()) | ||
838 | calgary_init_bitmap_from_tce_table(tbl); | ||
839 | else | ||
840 | tce_free(tbl, 0, tbl->it_size); | ||
834 | 841 | ||
835 | if (is_calgary(dev->device)) | 842 | if (is_calgary(dev->device)) |
836 | tbl->chip_ops = &calgary_chip_ops; | 843 | tbl->chip_ops = &calgary_chip_ops; |
@@ -1209,6 +1216,10 @@ static int __init calgary_init(void) | |||
1209 | if (ret) | 1216 | if (ret) |
1210 | return ret; | 1217 | return ret; |
1211 | 1218 | ||
1219 | /* Purely for kdump kernel case */ | ||
1220 | if (is_kdump_kernel()) | ||
1221 | get_tce_space_from_tar(); | ||
1222 | |||
1212 | do { | 1223 | do { |
1213 | dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev); | 1224 | dev = pci_get_device(PCI_VENDOR_ID_IBM, PCI_ANY_ID, dev); |
1214 | if (!dev) | 1225 | if (!dev) |
@@ -1339,6 +1350,61 @@ static int __init calgary_bus_has_devices(int bus, unsigned short pci_dev) | |||
1339 | return (val != 0xffffffff); | 1350 | return (val != 0xffffffff); |
1340 | } | 1351 | } |
1341 | 1352 | ||
1353 | /* | ||
1354 | * calgary_init_bitmap_from_tce_table(): | ||
1355 | * Funtion for kdump case. In the second/kdump kernel initialize | ||
1356 | * the bitmap based on the tce table entries obtained from first kernel | ||
1357 | */ | ||
1358 | static void calgary_init_bitmap_from_tce_table(struct iommu_table *tbl) | ||
1359 | { | ||
1360 | u64 *tp; | ||
1361 | unsigned int index; | ||
1362 | tp = ((u64 *)tbl->it_base); | ||
1363 | for (index = 0 ; index < tbl->it_size; index++) { | ||
1364 | if (*tp != 0x0) | ||
1365 | set_bit(index, tbl->it_map); | ||
1366 | tp++; | ||
1367 | } | ||
1368 | } | ||
1369 | |||
1370 | /* | ||
1371 | * get_tce_space_from_tar(): | ||
1372 | * Function for kdump case. Get the tce tables from first kernel | ||
1373 | * by reading the contents of the base adress register of calgary iommu | ||
1374 | */ | ||
1375 | static void get_tce_space_from_tar() | ||
1376 | { | ||
1377 | int bus; | ||
1378 | void __iomem *target; | ||
1379 | unsigned long tce_space; | ||
1380 | |||
1381 | for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { | ||
1382 | struct calgary_bus_info *info = &bus_info[bus]; | ||
1383 | unsigned short pci_device; | ||
1384 | u32 val; | ||
1385 | |||
1386 | val = read_pci_config(bus, 0, 0, 0); | ||
1387 | pci_device = (val & 0xFFFF0000) >> 16; | ||
1388 | |||
1389 | if (!is_cal_pci_dev(pci_device)) | ||
1390 | continue; | ||
1391 | if (info->translation_disabled) | ||
1392 | continue; | ||
1393 | |||
1394 | if (calgary_bus_has_devices(bus, pci_device) || | ||
1395 | translate_empty_slots) { | ||
1396 | target = calgary_reg(bus_info[bus].bbar, | ||
1397 | tar_offset(bus)); | ||
1398 | tce_space = be64_to_cpu(readq(target)); | ||
1399 | tce_space = tce_space & TAR_SW_BITS; | ||
1400 | |||
1401 | tce_space = tce_space & (~specified_table_size); | ||
1402 | info->tce_space = (u64 *)__va(tce_space); | ||
1403 | } | ||
1404 | } | ||
1405 | return; | ||
1406 | } | ||
1407 | |||
1342 | void __init detect_calgary(void) | 1408 | void __init detect_calgary(void) |
1343 | { | 1409 | { |
1344 | int bus; | 1410 | int bus; |
@@ -1394,7 +1460,8 @@ void __init detect_calgary(void) | |||
1394 | return; | 1460 | return; |
1395 | } | 1461 | } |
1396 | 1462 | ||
1397 | specified_table_size = determine_tce_table_size(max_pfn * PAGE_SIZE); | 1463 | specified_table_size = determine_tce_table_size((is_kdump_kernel() ? |
1464 | saved_max_pfn : max_pfn) * PAGE_SIZE); | ||
1398 | 1465 | ||
1399 | for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { | 1466 | for (bus = 0; bus < MAX_PHB_BUS_NUM; bus++) { |
1400 | struct calgary_bus_info *info = &bus_info[bus]; | 1467 | struct calgary_bus_info *info = &bus_info[bus]; |
@@ -1412,10 +1479,16 @@ void __init detect_calgary(void) | |||
1412 | 1479 | ||
1413 | if (calgary_bus_has_devices(bus, pci_device) || | 1480 | if (calgary_bus_has_devices(bus, pci_device) || |
1414 | translate_empty_slots) { | 1481 | translate_empty_slots) { |
1415 | tbl = alloc_tce_table(); | 1482 | /* |
1416 | if (!tbl) | 1483 | * If it is kdump kernel, find and use tce tables |
1417 | goto cleanup; | 1484 | * from first kernel, else allocate tce tables here |
1418 | info->tce_space = tbl; | 1485 | */ |
1486 | if (!is_kdump_kernel()) { | ||
1487 | tbl = alloc_tce_table(); | ||
1488 | if (!tbl) | ||
1489 | goto cleanup; | ||
1490 | info->tce_space = tbl; | ||
1491 | } | ||
1419 | calgary_found = 1; | 1492 | calgary_found = 1; |
1420 | } | 1493 | } |
1421 | } | 1494 | } |