diff options
Diffstat (limited to 'arch')
30 files changed, 164 insertions, 140 deletions
diff --git a/arch/alpha/include/asm/topology.h b/arch/alpha/include/asm/topology.h index 36b3a30ba0e5..9251e13e144f 100644 --- a/arch/alpha/include/asm/topology.h +++ b/arch/alpha/include/asm/topology.h | |||
@@ -28,6 +28,9 @@ static const struct cpumask *cpumask_of_node(int node) | |||
28 | { | 28 | { |
29 | int cpu; | 29 | int cpu; |
30 | 30 | ||
31 | if (node == -1) | ||
32 | return cpu_all_mask; | ||
33 | |||
31 | cpumask_clear(&node_to_cpumask_map[node]); | 34 | cpumask_clear(&node_to_cpumask_map[node]); |
32 | 35 | ||
33 | for_each_online_cpu(cpu) { | 36 | for_each_online_cpu(cpu) { |
diff --git a/arch/arm/mach-davinci/include/mach/keyscan.h b/arch/arm/mach-davinci/include/mach/keyscan.h index b4e21a2976d1..7a560e05bda8 100644 --- a/arch/arm/mach-davinci/include/mach/keyscan.h +++ b/arch/arm/mach-davinci/include/mach/keyscan.h | |||
@@ -29,6 +29,7 @@ enum davinci_matrix_types { | |||
29 | }; | 29 | }; |
30 | 30 | ||
31 | struct davinci_ks_platform_data { | 31 | struct davinci_ks_platform_data { |
32 | int (*device_enable)(struct device *dev); | ||
32 | unsigned short *keymap; | 33 | unsigned short *keymap; |
33 | u32 keymapsize; | 34 | u32 keymapsize; |
34 | u8 rep:1; | 35 | u8 rep:1; |
diff --git a/arch/arm/mach-s3c2440/mach-mini2440.c b/arch/arm/mach-s3c2440/mach-mini2440.c index 547d4fc99131..2068e9096a43 100644 --- a/arch/arm/mach-s3c2440/mach-mini2440.c +++ b/arch/arm/mach-s3c2440/mach-mini2440.c | |||
@@ -288,7 +288,7 @@ static struct s3c2410_platform_nand mini2440_nand_info __initdata = { | |||
288 | 288 | ||
289 | /* DM9000AEP 10/100 ethernet controller */ | 289 | /* DM9000AEP 10/100 ethernet controller */ |
290 | 290 | ||
291 | static struct resource mini2440_dm9k_resource[] __initdata = { | 291 | static struct resource mini2440_dm9k_resource[] = { |
292 | [0] = { | 292 | [0] = { |
293 | .start = MACH_MINI2440_DM9K_BASE, | 293 | .start = MACH_MINI2440_DM9K_BASE, |
294 | .end = MACH_MINI2440_DM9K_BASE + 3, | 294 | .end = MACH_MINI2440_DM9K_BASE + 3, |
@@ -310,11 +310,11 @@ static struct resource mini2440_dm9k_resource[] __initdata = { | |||
310 | * The DM9000 has no eeprom, and it's MAC address is set by | 310 | * The DM9000 has no eeprom, and it's MAC address is set by |
311 | * the bootloader before starting the kernel. | 311 | * the bootloader before starting the kernel. |
312 | */ | 312 | */ |
313 | static struct dm9000_plat_data mini2440_dm9k_pdata __initdata = { | 313 | static struct dm9000_plat_data mini2440_dm9k_pdata = { |
314 | .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), | 314 | .flags = (DM9000_PLATF_16BITONLY | DM9000_PLATF_NO_EEPROM), |
315 | }; | 315 | }; |
316 | 316 | ||
317 | static struct platform_device mini2440_device_eth __initdata = { | 317 | static struct platform_device mini2440_device_eth = { |
318 | .name = "dm9000", | 318 | .name = "dm9000", |
319 | .id = -1, | 319 | .id = -1, |
320 | .num_resources = ARRAY_SIZE(mini2440_dm9k_resource), | 320 | .num_resources = ARRAY_SIZE(mini2440_dm9k_resource), |
@@ -341,7 +341,7 @@ static struct platform_device mini2440_device_eth __initdata = { | |||
341 | * | | +----+ +----+ | 341 | * | | +----+ +----+ |
342 | * ..... | 342 | * ..... |
343 | */ | 343 | */ |
344 | static struct gpio_keys_button mini2440_buttons[] __initdata = { | 344 | static struct gpio_keys_button mini2440_buttons[] = { |
345 | { | 345 | { |
346 | .gpio = S3C2410_GPG(0), /* K1 */ | 346 | .gpio = S3C2410_GPG(0), /* K1 */ |
347 | .code = KEY_F1, | 347 | .code = KEY_F1, |
@@ -384,12 +384,12 @@ static struct gpio_keys_button mini2440_buttons[] __initdata = { | |||
384 | #endif | 384 | #endif |
385 | }; | 385 | }; |
386 | 386 | ||
387 | static struct gpio_keys_platform_data mini2440_button_data __initdata = { | 387 | static struct gpio_keys_platform_data mini2440_button_data = { |
388 | .buttons = mini2440_buttons, | 388 | .buttons = mini2440_buttons, |
389 | .nbuttons = ARRAY_SIZE(mini2440_buttons), | 389 | .nbuttons = ARRAY_SIZE(mini2440_buttons), |
390 | }; | 390 | }; |
391 | 391 | ||
392 | static struct platform_device mini2440_button_device __initdata = { | 392 | static struct platform_device mini2440_button_device = { |
393 | .name = "gpio-keys", | 393 | .name = "gpio-keys", |
394 | .id = -1, | 394 | .id = -1, |
395 | .dev = { | 395 | .dev = { |
@@ -399,41 +399,41 @@ static struct platform_device mini2440_button_device __initdata = { | |||
399 | 399 | ||
400 | /* LEDS */ | 400 | /* LEDS */ |
401 | 401 | ||
402 | static struct s3c24xx_led_platdata mini2440_led1_pdata __initdata = { | 402 | static struct s3c24xx_led_platdata mini2440_led1_pdata = { |
403 | .name = "led1", | 403 | .name = "led1", |
404 | .gpio = S3C2410_GPB(5), | 404 | .gpio = S3C2410_GPB(5), |
405 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 405 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
406 | .def_trigger = "heartbeat", | 406 | .def_trigger = "heartbeat", |
407 | }; | 407 | }; |
408 | 408 | ||
409 | static struct s3c24xx_led_platdata mini2440_led2_pdata __initdata = { | 409 | static struct s3c24xx_led_platdata mini2440_led2_pdata = { |
410 | .name = "led2", | 410 | .name = "led2", |
411 | .gpio = S3C2410_GPB(6), | 411 | .gpio = S3C2410_GPB(6), |
412 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 412 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
413 | .def_trigger = "nand-disk", | 413 | .def_trigger = "nand-disk", |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static struct s3c24xx_led_platdata mini2440_led3_pdata __initdata = { | 416 | static struct s3c24xx_led_platdata mini2440_led3_pdata = { |
417 | .name = "led3", | 417 | .name = "led3", |
418 | .gpio = S3C2410_GPB(7), | 418 | .gpio = S3C2410_GPB(7), |
419 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 419 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
420 | .def_trigger = "mmc0", | 420 | .def_trigger = "mmc0", |
421 | }; | 421 | }; |
422 | 422 | ||
423 | static struct s3c24xx_led_platdata mini2440_led4_pdata __initdata = { | 423 | static struct s3c24xx_led_platdata mini2440_led4_pdata = { |
424 | .name = "led4", | 424 | .name = "led4", |
425 | .gpio = S3C2410_GPB(8), | 425 | .gpio = S3C2410_GPB(8), |
426 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, | 426 | .flags = S3C24XX_LEDF_ACTLOW | S3C24XX_LEDF_TRISTATE, |
427 | .def_trigger = "", | 427 | .def_trigger = "", |
428 | }; | 428 | }; |
429 | 429 | ||
430 | static struct s3c24xx_led_platdata mini2440_led_backlight_pdata __initdata = { | 430 | static struct s3c24xx_led_platdata mini2440_led_backlight_pdata = { |
431 | .name = "backlight", | 431 | .name = "backlight", |
432 | .gpio = S3C2410_GPG(4), | 432 | .gpio = S3C2410_GPG(4), |
433 | .def_trigger = "backlight", | 433 | .def_trigger = "backlight", |
434 | }; | 434 | }; |
435 | 435 | ||
436 | static struct platform_device mini2440_led1 __initdata = { | 436 | static struct platform_device mini2440_led1 = { |
437 | .name = "s3c24xx_led", | 437 | .name = "s3c24xx_led", |
438 | .id = 1, | 438 | .id = 1, |
439 | .dev = { | 439 | .dev = { |
@@ -441,7 +441,7 @@ static struct platform_device mini2440_led1 __initdata = { | |||
441 | }, | 441 | }, |
442 | }; | 442 | }; |
443 | 443 | ||
444 | static struct platform_device mini2440_led2 __initdata = { | 444 | static struct platform_device mini2440_led2 = { |
445 | .name = "s3c24xx_led", | 445 | .name = "s3c24xx_led", |
446 | .id = 2, | 446 | .id = 2, |
447 | .dev = { | 447 | .dev = { |
@@ -449,7 +449,7 @@ static struct platform_device mini2440_led2 __initdata = { | |||
449 | }, | 449 | }, |
450 | }; | 450 | }; |
451 | 451 | ||
452 | static struct platform_device mini2440_led3 __initdata = { | 452 | static struct platform_device mini2440_led3 = { |
453 | .name = "s3c24xx_led", | 453 | .name = "s3c24xx_led", |
454 | .id = 3, | 454 | .id = 3, |
455 | .dev = { | 455 | .dev = { |
@@ -457,7 +457,7 @@ static struct platform_device mini2440_led3 __initdata = { | |||
457 | }, | 457 | }, |
458 | }; | 458 | }; |
459 | 459 | ||
460 | static struct platform_device mini2440_led4 __initdata = { | 460 | static struct platform_device mini2440_led4 = { |
461 | .name = "s3c24xx_led", | 461 | .name = "s3c24xx_led", |
462 | .id = 4, | 462 | .id = 4, |
463 | .dev = { | 463 | .dev = { |
@@ -465,7 +465,7 @@ static struct platform_device mini2440_led4 __initdata = { | |||
465 | }, | 465 | }, |
466 | }; | 466 | }; |
467 | 467 | ||
468 | static struct platform_device mini2440_led_backlight __initdata = { | 468 | static struct platform_device mini2440_led_backlight = { |
469 | .name = "s3c24xx_led", | 469 | .name = "s3c24xx_led", |
470 | .id = 5, | 470 | .id = 5, |
471 | .dev = { | 471 | .dev = { |
@@ -475,14 +475,14 @@ static struct platform_device mini2440_led_backlight __initdata = { | |||
475 | 475 | ||
476 | /* AUDIO */ | 476 | /* AUDIO */ |
477 | 477 | ||
478 | static struct s3c24xx_uda134x_platform_data mini2440_audio_pins __initdata = { | 478 | static struct s3c24xx_uda134x_platform_data mini2440_audio_pins = { |
479 | .l3_clk = S3C2410_GPB(4), | 479 | .l3_clk = S3C2410_GPB(4), |
480 | .l3_mode = S3C2410_GPB(2), | 480 | .l3_mode = S3C2410_GPB(2), |
481 | .l3_data = S3C2410_GPB(3), | 481 | .l3_data = S3C2410_GPB(3), |
482 | .model = UDA134X_UDA1341 | 482 | .model = UDA134X_UDA1341 |
483 | }; | 483 | }; |
484 | 484 | ||
485 | static struct platform_device mini2440_audio __initdata = { | 485 | static struct platform_device mini2440_audio = { |
486 | .name = "s3c24xx_uda134x", | 486 | .name = "s3c24xx_uda134x", |
487 | .id = 0, | 487 | .id = 0, |
488 | .dev = { | 488 | .dev = { |
diff --git a/arch/arm/mach-s3c6410/mach-smdk6410.c b/arch/arm/mach-s3c6410/mach-smdk6410.c index 480d297c1de2..8969fe73b83f 100644 --- a/arch/arm/mach-s3c6410/mach-smdk6410.c +++ b/arch/arm/mach-s3c6410/mach-smdk6410.c | |||
@@ -211,6 +211,7 @@ static struct fixed_voltage_config smdk6410_b_pwr_5v_pdata = { | |||
211 | .supply_name = "B_PWR_5V", | 211 | .supply_name = "B_PWR_5V", |
212 | .microvolts = 5000000, | 212 | .microvolts = 5000000, |
213 | .init_data = &smdk6410_b_pwr_5v_data, | 213 | .init_data = &smdk6410_b_pwr_5v_data, |
214 | .gpio = -EINVAL, | ||
214 | }; | 215 | }; |
215 | 216 | ||
216 | static struct platform_device smdk6410_b_pwr_5v = { | 217 | static struct platform_device smdk6410_b_pwr_5v = { |
diff --git a/arch/arm/plat-s3c/dev-nand.c b/arch/arm/plat-s3c/dev-nand.c index 84808ccda70e..a52fb6cf618f 100644 --- a/arch/arm/plat-s3c/dev-nand.c +++ b/arch/arm/plat-s3c/dev-nand.c | |||
@@ -58,8 +58,8 @@ static int __init s3c_nand_copy_set(struct s3c2410_nand_set *set) | |||
58 | return -ENOMEM; | 58 | return -ENOMEM; |
59 | } | 59 | } |
60 | 60 | ||
61 | size = sizeof(int) * set->nr_chips; | 61 | if (set->nr_map && set->nr_chips) { |
62 | if (size) { | 62 | size = sizeof(int) * set->nr_chips; |
63 | ptr = kmemdup(set->nr_map, size, GFP_KERNEL); | 63 | ptr = kmemdup(set->nr_map, size, GFP_KERNEL); |
64 | set->nr_map = ptr; | 64 | set->nr_map = ptr; |
65 | 65 | ||
diff --git a/arch/m68knommu/platform/coldfire/pit.c b/arch/m68knommu/platform/coldfire/pit.c index d8720ee34510..aebea19abd78 100644 --- a/arch/m68knommu/platform/coldfire/pit.c +++ b/arch/m68knommu/platform/coldfire/pit.c | |||
@@ -146,7 +146,6 @@ static struct clocksource pit_clk = { | |||
146 | .read = pit_read_clk, | 146 | .read = pit_read_clk, |
147 | .shift = 20, | 147 | .shift = 20, |
148 | .mask = CLOCKSOURCE_MASK(32), | 148 | .mask = CLOCKSOURCE_MASK(32), |
149 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
150 | }; | 149 | }; |
151 | 150 | ||
152 | /***************************************************************************/ | 151 | /***************************************************************************/ |
diff --git a/arch/s390/include/asm/bug.h b/arch/s390/include/asm/bug.h index efb74fd5156e..b1066b9fb5f8 100644 --- a/arch/s390/include/asm/bug.h +++ b/arch/s390/include/asm/bug.h | |||
@@ -52,6 +52,10 @@ | |||
52 | unreachable(); \ | 52 | unreachable(); \ |
53 | } while (0) | 53 | } while (0) |
54 | 54 | ||
55 | #define __WARN() do { \ | ||
56 | __EMIT_BUG(BUGFLAG_WARNING); \ | ||
57 | } while (0) | ||
58 | |||
55 | #define WARN_ON(x) ({ \ | 59 | #define WARN_ON(x) ({ \ |
56 | int __ret_warn_on = !!(x); \ | 60 | int __ret_warn_on = !!(x); \ |
57 | if (__builtin_constant_p(__ret_warn_on)) { \ | 61 | if (__builtin_constant_p(__ret_warn_on)) { \ |
diff --git a/arch/s390/include/asm/sigp.h b/arch/s390/include/asm/sigp.h index ec403d4304f8..f72d611f7e13 100644 --- a/arch/s390/include/asm/sigp.h +++ b/arch/s390/include/asm/sigp.h | |||
@@ -15,11 +15,19 @@ | |||
15 | #ifndef __SIGP__ | 15 | #ifndef __SIGP__ |
16 | #define __SIGP__ | 16 | #define __SIGP__ |
17 | 17 | ||
18 | #include <asm/ptrace.h> | 18 | #include <asm/system.h> |
19 | #include <asm/atomic.h> | ||
20 | 19 | ||
21 | /* get real cpu address from logical cpu number */ | 20 | /* get real cpu address from logical cpu number */ |
22 | extern volatile int __cpu_logical_map[]; | 21 | extern int __cpu_logical_map[]; |
22 | |||
23 | static inline int cpu_logical_map(int cpu) | ||
24 | { | ||
25 | #ifdef CONFIG_SMP | ||
26 | return __cpu_logical_map[cpu]; | ||
27 | #else | ||
28 | return stap(); | ||
29 | #endif | ||
30 | } | ||
23 | 31 | ||
24 | typedef enum | 32 | typedef enum |
25 | { | 33 | { |
@@ -79,7 +87,7 @@ signal_processor(__u16 cpu_addr, sigp_order_code order_code) | |||
79 | " ipm %0\n" | 87 | " ipm %0\n" |
80 | " srl %0,28\n" | 88 | " srl %0,28\n" |
81 | : "=d" (ccode) | 89 | : "=d" (ccode) |
82 | : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), | 90 | : "d" (reg1), "d" (cpu_logical_map(cpu_addr)), |
83 | "a" (order_code) : "cc" , "memory"); | 91 | "a" (order_code) : "cc" , "memory"); |
84 | return ccode; | 92 | return ccode; |
85 | } | 93 | } |
@@ -98,7 +106,7 @@ signal_processor_p(__u32 parameter, __u16 cpu_addr, sigp_order_code order_code) | |||
98 | " ipm %0\n" | 106 | " ipm %0\n" |
99 | " srl %0,28\n" | 107 | " srl %0,28\n" |
100 | : "=d" (ccode) | 108 | : "=d" (ccode) |
101 | : "d" (reg1), "d" (__cpu_logical_map[cpu_addr]), | 109 | : "d" (reg1), "d" (cpu_logical_map(cpu_addr)), |
102 | "a" (order_code) : "cc" , "memory"); | 110 | "a" (order_code) : "cc" , "memory"); |
103 | return ccode; | 111 | return ccode; |
104 | } | 112 | } |
@@ -118,7 +126,7 @@ signal_processor_ps(__u32 *statusptr, __u32 parameter, __u16 cpu_addr, | |||
118 | " ipm %0\n" | 126 | " ipm %0\n" |
119 | " srl %0,28\n" | 127 | " srl %0,28\n" |
120 | : "=d" (ccode), "+d" (reg1) | 128 | : "=d" (ccode), "+d" (reg1) |
121 | : "d" (__cpu_logical_map[cpu_addr]), "a" (order_code) | 129 | : "d" (cpu_logical_map(cpu_addr)), "a" (order_code) |
122 | : "cc" , "memory"); | 130 | : "cc" , "memory"); |
123 | *statusptr = reg1; | 131 | *statusptr = reg1; |
124 | return ccode; | 132 | return ccode; |
diff --git a/arch/s390/include/asm/thread_info.h b/arch/s390/include/asm/thread_info.h index 07eb61b2fb3a..66069e736842 100644 --- a/arch/s390/include/asm/thread_info.h +++ b/arch/s390/include/asm/thread_info.h | |||
@@ -93,13 +93,12 @@ static inline struct thread_info *current_thread_info(void) | |||
93 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ | 93 | #define TIF_SYSCALL_AUDIT 9 /* syscall auditing active */ |
94 | #define TIF_SECCOMP 10 /* secure computing */ | 94 | #define TIF_SECCOMP 10 /* secure computing */ |
95 | #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ | 95 | #define TIF_SYSCALL_TRACEPOINT 11 /* syscall tracepoint instrumentation */ |
96 | #define TIF_USEDFPU 16 /* FPU was used by this task this quantum (SMP) */ | 96 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling |
97 | #define TIF_POLLING_NRFLAG 17 /* true if poll_idle() is polling | ||
98 | TIF_NEED_RESCHED */ | 97 | TIF_NEED_RESCHED */ |
99 | #define TIF_31BIT 18 /* 32bit process */ | 98 | #define TIF_31BIT 17 /* 32bit process */ |
100 | #define TIF_MEMDIE 19 | 99 | #define TIF_MEMDIE 18 |
101 | #define TIF_RESTORE_SIGMASK 20 /* restore signal mask in do_signal() */ | 100 | #define TIF_RESTORE_SIGMASK 19 /* restore signal mask in do_signal() */ |
102 | #define TIF_FREEZE 21 /* thread is freezing for suspend */ | 101 | #define TIF_FREEZE 20 /* thread is freezing for suspend */ |
103 | 102 | ||
104 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 103 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
105 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 104 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
@@ -112,7 +111,6 @@ static inline struct thread_info *current_thread_info(void) | |||
112 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 111 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
113 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 112 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
114 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) | 113 | #define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT) |
115 | #define _TIF_USEDFPU (1<<TIF_USEDFPU) | ||
116 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 114 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
117 | #define _TIF_31BIT (1<<TIF_31BIT) | 115 | #define _TIF_31BIT (1<<TIF_31BIT) |
118 | #define _TIF_FREEZE (1<<TIF_FREEZE) | 116 | #define _TIF_FREEZE (1<<TIF_FREEZE) |
diff --git a/arch/s390/include/asm/unistd.h b/arch/s390/include/asm/unistd.h index 192a7203a14f..6e9f049fa823 100644 --- a/arch/s390/include/asm/unistd.h +++ b/arch/s390/include/asm/unistd.h | |||
@@ -269,8 +269,7 @@ | |||
269 | #define __NR_pwritev 329 | 269 | #define __NR_pwritev 329 |
270 | #define __NR_rt_tgsigqueueinfo 330 | 270 | #define __NR_rt_tgsigqueueinfo 330 |
271 | #define __NR_perf_event_open 331 | 271 | #define __NR_perf_event_open 331 |
272 | #define __NR_recvmmsg 332 | 272 | #define NR_syscalls 332 |
273 | #define NR_syscalls 333 | ||
274 | 273 | ||
275 | /* | 274 | /* |
276 | * There are some system calls that are not present on 64 bit, some | 275 | * There are some system calls that are not present on 64 bit, some |
@@ -377,6 +376,9 @@ | |||
377 | #define __IGNORE_migrate_pages | 376 | #define __IGNORE_migrate_pages |
378 | #define __IGNORE_move_pages | 377 | #define __IGNORE_move_pages |
379 | 378 | ||
379 | /* Ignore system calls that are also reachable via sys_socket */ | ||
380 | #define __IGNORE_recvmmsg | ||
381 | |||
380 | #define __ARCH_WANT_IPC_PARSE_VERSION | 382 | #define __ARCH_WANT_IPC_PARSE_VERSION |
381 | #define __ARCH_WANT_OLD_READDIR | 383 | #define __ARCH_WANT_OLD_READDIR |
382 | #define __ARCH_WANT_SYS_ALARM | 384 | #define __ARCH_WANT_SYS_ALARM |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 22c9e557bb22..11c3aba664ea 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -616,44 +616,35 @@ asmlinkage long sys32_fstatat64(unsigned int dfd, char __user *filename, | |||
616 | */ | 616 | */ |
617 | 617 | ||
618 | struct mmap_arg_struct_emu31 { | 618 | struct mmap_arg_struct_emu31 { |
619 | u32 addr; | 619 | compat_ulong_t addr; |
620 | u32 len; | 620 | compat_ulong_t len; |
621 | u32 prot; | 621 | compat_ulong_t prot; |
622 | u32 flags; | 622 | compat_ulong_t flags; |
623 | u32 fd; | 623 | compat_ulong_t fd; |
624 | u32 offset; | 624 | compat_ulong_t offset; |
625 | }; | 625 | }; |
626 | 626 | ||
627 | asmlinkage unsigned long | 627 | asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) |
628 | old32_mmap(struct mmap_arg_struct_emu31 __user *arg) | ||
629 | { | 628 | { |
630 | struct mmap_arg_struct_emu31 a; | 629 | struct mmap_arg_struct_emu31 a; |
631 | int error = -EFAULT; | ||
632 | 630 | ||
633 | if (copy_from_user(&a, arg, sizeof(a))) | 631 | if (copy_from_user(&a, arg, sizeof(a))) |
634 | goto out; | 632 | return -EFAULT; |
635 | |||
636 | error = -EINVAL; | ||
637 | if (a.offset & ~PAGE_MASK) | 633 | if (a.offset & ~PAGE_MASK) |
638 | goto out; | 634 | return -EINVAL; |
639 | 635 | a.addr = (unsigned long) compat_ptr(a.addr); | |
640 | error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, | 636 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, |
641 | a.offset >> PAGE_SHIFT); | 637 | a.offset >> PAGE_SHIFT); |
642 | out: | ||
643 | return error; | ||
644 | } | 638 | } |
645 | 639 | ||
646 | asmlinkage long | 640 | asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) |
647 | sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) | ||
648 | { | 641 | { |
649 | struct mmap_arg_struct_emu31 a; | 642 | struct mmap_arg_struct_emu31 a; |
650 | int error = -EFAULT; | ||
651 | 643 | ||
652 | if (copy_from_user(&a, arg, sizeof(a))) | 644 | if (copy_from_user(&a, arg, sizeof(a))) |
653 | goto out; | 645 | return -EFAULT; |
654 | error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); | 646 | a.addr = (unsigned long) compat_ptr(a.addr); |
655 | out: | 647 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); |
656 | return error; | ||
657 | } | 648 | } |
658 | 649 | ||
659 | asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count) | 650 | asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count) |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index faeaccc7d7d9..30de2d0e52bb 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1853,12 +1853,3 @@ sys32_execve_wrapper: | |||
1853 | llgtr %r3,%r3 # compat_uptr_t * | 1853 | llgtr %r3,%r3 # compat_uptr_t * |
1854 | llgtr %r4,%r4 # compat_uptr_t * | 1854 | llgtr %r4,%r4 # compat_uptr_t * |
1855 | jg sys32_execve # branch to system call | 1855 | jg sys32_execve # branch to system call |
1856 | |||
1857 | .globl compat_sys_recvmmsg_wrapper | ||
1858 | compat_sys_recvmmsg_wrapper: | ||
1859 | lgfr %r2,%r2 # int | ||
1860 | llgtr %r3,%r3 # struct compat_mmsghdr * | ||
1861 | llgfr %r4,%r4 # unsigned int | ||
1862 | llgfr %r5,%r5 # unsigned int | ||
1863 | llgtr %r6,%r6 # struct compat_timespec * | ||
1864 | jg compat_sys_recvmmsg | ||
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 5417eb57271a..00b6d1d292f2 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -153,8 +153,6 @@ void exit_thread(void) | |||
153 | 153 | ||
154 | void flush_thread(void) | 154 | void flush_thread(void) |
155 | { | 155 | { |
156 | clear_used_math(); | ||
157 | clear_tsk_thread_flag(current, TIF_USEDFPU); | ||
158 | } | 156 | } |
159 | 157 | ||
160 | void release_thread(struct task_struct *dead_task) | 158 | void release_thread(struct task_struct *dead_task) |
@@ -217,6 +215,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp, | |||
217 | p->thread.mm_segment = get_fs(); | 215 | p->thread.mm_segment = get_fs(); |
218 | /* Don't copy debug registers */ | 216 | /* Don't copy debug registers */ |
219 | memset(&p->thread.per_info, 0, sizeof(p->thread.per_info)); | 217 | memset(&p->thread.per_info, 0, sizeof(p->thread.per_info)); |
218 | clear_tsk_thread_flag(p, TIF_SINGLE_STEP); | ||
220 | /* Initialize per thread user and system timer values */ | 219 | /* Initialize per thread user and system timer values */ |
221 | ti = task_thread_info(p); | 220 | ti = task_thread_info(p); |
222 | ti->user_timer = 0; | 221 | ti->user_timer = 0; |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 13815d39f7dd..7cf464234419 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -65,6 +65,7 @@ FixPerRegisters(struct task_struct *task) | |||
65 | { | 65 | { |
66 | struct pt_regs *regs; | 66 | struct pt_regs *regs; |
67 | per_struct *per_info; | 67 | per_struct *per_info; |
68 | per_cr_words cr_words; | ||
68 | 69 | ||
69 | regs = task_pt_regs(task); | 70 | regs = task_pt_regs(task); |
70 | per_info = (per_struct *) &task->thread.per_info; | 71 | per_info = (per_struct *) &task->thread.per_info; |
@@ -98,6 +99,13 @@ FixPerRegisters(struct task_struct *task) | |||
98 | per_info->control_regs.bits.storage_alt_space_ctl = 1; | 99 | per_info->control_regs.bits.storage_alt_space_ctl = 1; |
99 | else | 100 | else |
100 | per_info->control_regs.bits.storage_alt_space_ctl = 0; | 101 | per_info->control_regs.bits.storage_alt_space_ctl = 0; |
102 | |||
103 | if (task == current) { | ||
104 | __ctl_store(cr_words, 9, 11); | ||
105 | if (memcmp(&cr_words, &per_info->control_regs.words, | ||
106 | sizeof(cr_words)) != 0) | ||
107 | __ctl_load(per_info->control_regs.words, 9, 11); | ||
108 | } | ||
101 | } | 109 | } |
102 | 110 | ||
103 | void user_enable_single_step(struct task_struct *task) | 111 | void user_enable_single_step(struct task_struct *task) |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 0663287fa1b3..8d8957b38ab3 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -87,7 +87,6 @@ unsigned long elf_hwcap = 0; | |||
87 | char elf_platform[ELF_PLATFORM_SIZE]; | 87 | char elf_platform[ELF_PLATFORM_SIZE]; |
88 | 88 | ||
89 | struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; | 89 | struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; |
90 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ | ||
91 | 90 | ||
92 | int __initdata memory_end_set; | 91 | int __initdata memory_end_set; |
93 | unsigned long __initdata memory_end; | 92 | unsigned long __initdata memory_end; |
@@ -124,12 +123,6 @@ void __cpuinit cpu_init(void) | |||
124 | */ | 123 | */ |
125 | get_cpu_id(&S390_lowcore.cpu_id); | 124 | get_cpu_id(&S390_lowcore.cpu_id); |
126 | 125 | ||
127 | /* | ||
128 | * Force FPU initialization: | ||
129 | */ | ||
130 | clear_thread_flag(TIF_USEDFPU); | ||
131 | clear_used_math(); | ||
132 | |||
133 | atomic_inc(&init_mm.mm_count); | 126 | atomic_inc(&init_mm.mm_count); |
134 | current->active_mm = &init_mm; | 127 | current->active_mm = &init_mm; |
135 | BUG_ON(current->mm); | 128 | BUG_ON(current->mm); |
@@ -855,7 +848,6 @@ setup_arch(char **cmdline_p) | |||
855 | setup_lowcore(); | 848 | setup_lowcore(); |
856 | 849 | ||
857 | cpu_init(); | 850 | cpu_init(); |
858 | __cpu_logical_map[0] = stap(); | ||
859 | s390_init_cpu_topology(); | 851 | s390_init_cpu_topology(); |
860 | 852 | ||
861 | /* | 853 | /* |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 6b4fef877f9d..1675c48b9145 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
@@ -500,18 +500,10 @@ void do_signal(struct pt_regs *regs) | |||
500 | clear_thread_flag(TIF_RESTORE_SIGMASK); | 500 | clear_thread_flag(TIF_RESTORE_SIGMASK); |
501 | 501 | ||
502 | /* | 502 | /* |
503 | * If we would have taken a single-step trap | ||
504 | * for a normal instruction, act like we took | ||
505 | * one for the handler setup. | ||
506 | */ | ||
507 | if (current->thread.per_info.single_step) | ||
508 | set_thread_flag(TIF_SINGLE_STEP); | ||
509 | |||
510 | /* | ||
511 | * Let tracing know that we've done the handler setup. | 503 | * Let tracing know that we've done the handler setup. |
512 | */ | 504 | */ |
513 | tracehook_signal_handler(signr, &info, &ka, regs, | 505 | tracehook_signal_handler(signr, &info, &ka, regs, |
514 | test_thread_flag(TIF_SINGLE_STEP)); | 506 | current->thread.per_info.single_step); |
515 | } | 507 | } |
516 | return; | 508 | return; |
517 | } | 509 | } |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 93e52039321b..76a6fdd46c45 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -52,6 +52,9 @@ | |||
52 | #include <asm/cpu.h> | 52 | #include <asm/cpu.h> |
53 | #include "entry.h" | 53 | #include "entry.h" |
54 | 54 | ||
55 | /* logical cpu to cpu address */ | ||
56 | int __cpu_logical_map[NR_CPUS]; | ||
57 | |||
55 | static struct task_struct *current_set[NR_CPUS]; | 58 | static struct task_struct *current_set[NR_CPUS]; |
56 | 59 | ||
57 | static u8 smp_cpu_type; | 60 | static u8 smp_cpu_type; |
@@ -717,6 +720,12 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
717 | { | 720 | { |
718 | } | 721 | } |
719 | 722 | ||
723 | void __init smp_setup_processor_id(void) | ||
724 | { | ||
725 | S390_lowcore.cpu_nr = 0; | ||
726 | __cpu_logical_map[0] = stap(); | ||
727 | } | ||
728 | |||
720 | /* | 729 | /* |
721 | * the frequency of the profiling timer can be changed | 730 | * the frequency of the profiling timer can be changed |
722 | * by writing a multiplier value into /proc/profile. | 731 | * by writing a multiplier value into /proc/profile. |
diff --git a/arch/s390/kernel/syscalls.S b/arch/s390/kernel/syscalls.S index 4f292c936872..30eca070d426 100644 --- a/arch/s390/kernel/syscalls.S +++ b/arch/s390/kernel/syscalls.S | |||
@@ -340,4 +340,3 @@ SYSCALL(sys_preadv,sys_preadv,compat_sys_preadv_wrapper) | |||
340 | SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper) | 340 | SYSCALL(sys_pwritev,sys_pwritev,compat_sys_pwritev_wrapper) |
341 | SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */ | 341 | SYSCALL(sys_rt_tgsigqueueinfo,sys_rt_tgsigqueueinfo,compat_sys_rt_tgsigqueueinfo_wrapper) /* 330 */ |
342 | SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper) | 342 | SYSCALL(sys_perf_event_open,sys_perf_event_open,sys_perf_event_open_wrapper) |
343 | SYSCALL(sys_recvmmsg,sys_recvmmsg,compat_sys_recvmmsg_wrapper) | ||
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c index 3c72c9cf22b6..14ef6f05e432 100644 --- a/arch/s390/kernel/topology.c +++ b/arch/s390/kernel/topology.c | |||
@@ -114,7 +114,7 @@ static void add_cpus_to_core(struct tl_cpu *tl_cpu, struct core_info *core) | |||
114 | 114 | ||
115 | rcpu = CPU_BITS - 1 - cpu + tl_cpu->origin; | 115 | rcpu = CPU_BITS - 1 - cpu + tl_cpu->origin; |
116 | for_each_present_cpu(lcpu) { | 116 | for_each_present_cpu(lcpu) { |
117 | if (__cpu_logical_map[lcpu] == rcpu) { | 117 | if (cpu_logical_map(lcpu) == rcpu) { |
118 | cpu_set(lcpu, core->mask); | 118 | cpu_set(lcpu, core->mask); |
119 | smp_cpu_polarization[lcpu] = tl_cpu->pp; | 119 | smp_cpu_polarization[lcpu] = tl_cpu->pp; |
120 | } | 120 | } |
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c index 10754a375668..cff327f109a8 100644 --- a/arch/s390/lib/spinlock.c +++ b/arch/s390/lib/spinlock.c | |||
@@ -34,7 +34,7 @@ static inline void _raw_yield_cpu(int cpu) | |||
34 | { | 34 | { |
35 | if (MACHINE_HAS_DIAG9C) | 35 | if (MACHINE_HAS_DIAG9C) |
36 | asm volatile("diag %0,0,0x9c" | 36 | asm volatile("diag %0,0,0x9c" |
37 | : : "d" (__cpu_logical_map[cpu])); | 37 | : : "d" (cpu_logical_map(cpu))); |
38 | else | 38 | else |
39 | _raw_yield(); | 39 | _raw_yield(); |
40 | } | 40 | } |
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c index f4558ccf02b9..869efbaed3ea 100644 --- a/arch/s390/mm/mmap.c +++ b/arch/s390/mm/mmap.c | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | static inline unsigned long mmap_base(void) | 41 | static inline unsigned long mmap_base(void) |
42 | { | 42 | { |
43 | unsigned long gap = current->signal->rlim[RLIMIT_STACK].rlim_cur; | 43 | unsigned long gap = rlimit(RLIMIT_STACK); |
44 | 44 | ||
45 | if (gap < MIN_GAP) | 45 | if (gap < MIN_GAP) |
46 | gap = MIN_GAP; | 46 | gap = MIN_GAP; |
@@ -61,7 +61,7 @@ static inline int mmap_is_legacy(void) | |||
61 | #endif | 61 | #endif |
62 | return sysctl_legacy_va_layout || | 62 | return sysctl_legacy_va_layout || |
63 | (current->personality & ADDR_COMPAT_LAYOUT) || | 63 | (current->personality & ADDR_COMPAT_LAYOUT) || |
64 | current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY; | 64 | rlimit(RLIMIT_STACK) == RLIM_INFINITY; |
65 | } | 65 | } |
66 | 66 | ||
67 | #ifndef CONFIG_64BIT | 67 | #ifndef CONFIG_64BIT |
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 6a8861b39f05..5c246289b4f0 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -353,6 +353,10 @@ static struct i2c_board_info i2c1_devices[] = { | |||
353 | { | 353 | { |
354 | I2C_BOARD_INFO("r2025sd", 0x32), | 354 | I2C_BOARD_INFO("r2025sd", 0x32), |
355 | }, | 355 | }, |
356 | { | ||
357 | I2C_BOARD_INFO("lis3lv02d", 0x1c), | ||
358 | .irq = 33, | ||
359 | } | ||
356 | }; | 360 | }; |
357 | 361 | ||
358 | /* KEYSC */ | 362 | /* KEYSC */ |
@@ -1115,6 +1119,10 @@ static int __init arch_setup(void) | |||
1115 | gpio_direction_output(GPIO_PTU0, 0); | 1119 | gpio_direction_output(GPIO_PTU0, 0); |
1116 | mdelay(20); | 1120 | mdelay(20); |
1117 | 1121 | ||
1122 | /* enable motion sensor */ | ||
1123 | gpio_request(GPIO_FN_INTC_IRQ1, NULL); | ||
1124 | gpio_direction_input(GPIO_FN_INTC_IRQ1); | ||
1125 | |||
1118 | /* enable I2C device */ | 1126 | /* enable I2C device */ |
1119 | i2c_register_board_info(0, i2c0_devices, | 1127 | i2c_register_board_info(0, i2c0_devices, |
1120 | ARRAY_SIZE(i2c0_devices)); | 1128 | ARRAY_SIZE(i2c0_devices)); |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 51069245b79a..3b3c36601a7b 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -125,50 +125,36 @@ void mconsole_log(struct mc_request *req) | |||
125 | void mconsole_proc(struct mc_request *req) | 125 | void mconsole_proc(struct mc_request *req) |
126 | { | 126 | { |
127 | struct nameidata nd; | 127 | struct nameidata nd; |
128 | struct file_system_type *proc; | 128 | struct vfsmount *mnt = current->nsproxy->pid_ns->proc_mnt; |
129 | struct super_block *super; | ||
130 | struct file *file; | 129 | struct file *file; |
131 | int n, err; | 130 | int n, err; |
132 | char *ptr = req->request.data, *buf; | 131 | char *ptr = req->request.data, *buf; |
132 | mm_segment_t old_fs = get_fs(); | ||
133 | 133 | ||
134 | ptr += strlen("proc"); | 134 | ptr += strlen("proc"); |
135 | ptr = skip_spaces(ptr); | 135 | ptr = skip_spaces(ptr); |
136 | 136 | ||
137 | proc = get_fs_type("proc"); | 137 | err = vfs_path_lookup(mnt->mnt_root, mnt, ptr, LOOKUP_FOLLOW, &nd); |
138 | if (proc == NULL) { | 138 | if (err) { |
139 | mconsole_reply(req, "procfs not registered", 1, 0); | 139 | mconsole_reply(req, "Failed to look up file", 1, 0); |
140 | goto out; | 140 | goto out; |
141 | } | 141 | } |
142 | 142 | ||
143 | super = (*proc->get_sb)(proc, 0, NULL, NULL); | 143 | err = may_open(&nd.path, MAY_READ, FMODE_READ); |
144 | put_filesystem(proc); | 144 | if (result) { |
145 | if (super == NULL) { | 145 | mconsole_reply(req, "Failed to open file", 1, 0); |
146 | mconsole_reply(req, "Failed to get procfs superblock", 1, 0); | 146 | path_put(&nd.path); |
147 | goto out; | 147 | goto out; |
148 | } | 148 | } |
149 | up_write(&super->s_umount); | ||
150 | |||
151 | nd.path.dentry = super->s_root; | ||
152 | nd.path.mnt = NULL; | ||
153 | nd.flags = O_RDONLY + 1; | ||
154 | nd.last_type = LAST_ROOT; | ||
155 | |||
156 | /* START: it was experienced that the stability problems are closed | ||
157 | * if commenting out these two calls + the below read cycle. To | ||
158 | * make UML crash again, it was enough to readd either one.*/ | ||
159 | err = link_path_walk(ptr, &nd); | ||
160 | if (err) { | ||
161 | mconsole_reply(req, "Failed to look up file", 1, 0); | ||
162 | goto out_kill; | ||
163 | } | ||
164 | 149 | ||
165 | file = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY, | 150 | file = dentry_open(nd.path.dentry, nd.path.mnt, O_RDONLY, |
166 | current_cred()); | 151 | current_cred()); |
152 | err = PTR_ERR(file); | ||
167 | if (IS_ERR(file)) { | 153 | if (IS_ERR(file)) { |
168 | mconsole_reply(req, "Failed to open file", 1, 0); | 154 | mconsole_reply(req, "Failed to open file", 1, 0); |
169 | goto out_kill; | 155 | path_put(&nd.path); |
156 | goto out; | ||
170 | } | 157 | } |
171 | /*END*/ | ||
172 | 158 | ||
173 | buf = kmalloc(PAGE_SIZE, GFP_KERNEL); | 159 | buf = kmalloc(PAGE_SIZE, GFP_KERNEL); |
174 | if (buf == NULL) { | 160 | if (buf == NULL) { |
@@ -176,10 +162,13 @@ void mconsole_proc(struct mc_request *req) | |||
176 | goto out_fput; | 162 | goto out_fput; |
177 | } | 163 | } |
178 | 164 | ||
179 | if ((file->f_op != NULL) && (file->f_op->read != NULL)) { | 165 | if (file->f_op->read) { |
180 | do { | 166 | do { |
181 | n = (*file->f_op->read)(file, buf, PAGE_SIZE - 1, | 167 | loff_t pos; |
182 | &file->f_pos); | 168 | set_fs(KERNEL_DS); |
169 | n = vfs_read(file, buf, PAGE_SIZE - 1, &pos); | ||
170 | file_pos_write(file, pos); | ||
171 | set_fs(old_fs); | ||
183 | if (n >= 0) { | 172 | if (n >= 0) { |
184 | buf[n] = '\0'; | 173 | buf[n] = '\0'; |
185 | mconsole_reply(req, buf, 0, (n > 0)); | 174 | mconsole_reply(req, buf, 0, (n > 0)); |
@@ -197,8 +186,6 @@ void mconsole_proc(struct mc_request *req) | |||
197 | kfree(buf); | 186 | kfree(buf); |
198 | out_fput: | 187 | out_fput: |
199 | fput(file); | 188 | fput(file); |
200 | out_kill: | ||
201 | deactivate_super(super); | ||
202 | out: ; | 189 | out: ; |
203 | } | 190 | } |
204 | #endif | 191 | #endif |
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 858baa061cfc..6c3fdd631ed3 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -108,10 +108,11 @@ struct mce_log { | |||
108 | #define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) | 108 | #define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) |
109 | #define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) | 109 | #define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) |
110 | 110 | ||
111 | extern struct atomic_notifier_head x86_mce_decoder_chain; | ||
112 | 111 | ||
113 | #ifdef __KERNEL__ | 112 | #ifdef __KERNEL__ |
114 | 113 | ||
114 | extern struct atomic_notifier_head x86_mce_decoder_chain; | ||
115 | |||
115 | #include <linux/percpu.h> | 116 | #include <linux/percpu.h> |
116 | #include <linux/init.h> | 117 | #include <linux/init.h> |
117 | #include <asm/atomic.h> | 118 | #include <asm/atomic.h> |
diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h index bc54fa965af3..40be813fefb1 100644 --- a/arch/x86/include/asm/uv/uv_hub.h +++ b/arch/x86/include/asm/uv/uv_hub.h | |||
@@ -495,5 +495,17 @@ static inline void uv_hub_send_ipi(int pnode, int apicid, int vector) | |||
495 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); | 495 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); |
496 | } | 496 | } |
497 | 497 | ||
498 | /* | ||
499 | * Get the minimum revision number of the hub chips within the partition. | ||
500 | * 1 - initial rev 1.0 silicon | ||
501 | * 2 - rev 2.0 production silicon | ||
502 | */ | ||
503 | static inline int uv_get_min_hub_revision_id(void) | ||
504 | { | ||
505 | extern int uv_min_hub_revision_id; | ||
506 | |||
507 | return uv_min_hub_revision_id; | ||
508 | } | ||
509 | |||
498 | #endif /* CONFIG_X86_64 */ | 510 | #endif /* CONFIG_X86_64 */ |
499 | #endif /* _ASM_X86_UV_UV_HUB_H */ | 511 | #endif /* _ASM_X86_UV_UV_HUB_H */ |
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 3704997e8b25..f147a95fd84a 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/x86_init.h> | 31 | #include <asm/x86_init.h> |
32 | 32 | ||
33 | int gart_iommu_aperture; | 33 | int gart_iommu_aperture; |
34 | EXPORT_SYMBOL_GPL(gart_iommu_aperture); | ||
34 | int gart_iommu_aperture_disabled __initdata; | 35 | int gart_iommu_aperture_disabled __initdata; |
35 | int gart_iommu_aperture_allowed __initdata; | 36 | int gart_iommu_aperture_allowed __initdata; |
36 | 37 | ||
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 5f92494dab61..21db3cbea7dc 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -36,6 +36,8 @@ DEFINE_PER_CPU(int, x2apic_extra_bits); | |||
36 | 36 | ||
37 | static enum uv_system_type uv_system_type; | 37 | static enum uv_system_type uv_system_type; |
38 | static u64 gru_start_paddr, gru_end_paddr; | 38 | static u64 gru_start_paddr, gru_end_paddr; |
39 | int uv_min_hub_revision_id; | ||
40 | EXPORT_SYMBOL_GPL(uv_min_hub_revision_id); | ||
39 | 41 | ||
40 | static inline bool is_GRU_range(u64 start, u64 end) | 42 | static inline bool is_GRU_range(u64 start, u64 end) |
41 | { | 43 | { |
@@ -55,12 +57,19 @@ static int early_get_nodeid(void) | |||
55 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); | 57 | mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr)); |
56 | node_id.v = *mmr; | 58 | node_id.v = *mmr; |
57 | early_iounmap(mmr, sizeof(*mmr)); | 59 | early_iounmap(mmr, sizeof(*mmr)); |
60 | |||
61 | /* Currently, all blades have same revision number */ | ||
62 | uv_min_hub_revision_id = node_id.s.revision; | ||
63 | |||
58 | return node_id.s.node_id; | 64 | return node_id.s.node_id; |
59 | } | 65 | } |
60 | 66 | ||
61 | static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 67 | static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
62 | { | 68 | { |
69 | int nodeid; | ||
70 | |||
63 | if (!strcmp(oem_id, "SGI")) { | 71 | if (!strcmp(oem_id, "SGI")) { |
72 | nodeid = early_get_nodeid(); | ||
64 | x86_platform.is_untracked_pat_range = uv_is_untracked_pat_range; | 73 | x86_platform.is_untracked_pat_range = uv_is_untracked_pat_range; |
65 | if (!strcmp(oem_table_id, "UVL")) | 74 | if (!strcmp(oem_table_id, "UVL")) |
66 | uv_system_type = UV_LEGACY_APIC; | 75 | uv_system_type = UV_LEGACY_APIC; |
@@ -68,7 +77,7 @@ static int __init uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
68 | uv_system_type = UV_X2APIC; | 77 | uv_system_type = UV_X2APIC; |
69 | else if (!strcmp(oem_table_id, "UVH")) { | 78 | else if (!strcmp(oem_table_id, "UVH")) { |
70 | __get_cpu_var(x2apic_extra_bits) = | 79 | __get_cpu_var(x2apic_extra_bits) = |
71 | early_get_nodeid() << (UV_APIC_PNODE_SHIFT - 1); | 80 | nodeid << (UV_APIC_PNODE_SHIFT - 1); |
72 | uv_system_type = UV_NON_UNIQUE_APIC; | 81 | uv_system_type = UV_NON_UNIQUE_APIC; |
73 | return 1; | 82 | return 1; |
74 | } | 83 | } |
@@ -374,13 +383,13 @@ static __init void get_lowmem_redirect(unsigned long *base, unsigned long *size) | |||
374 | 383 | ||
375 | enum map_type {map_wb, map_uc}; | 384 | enum map_type {map_wb, map_uc}; |
376 | 385 | ||
377 | static __init void map_high(char *id, unsigned long base, int shift, | 386 | static __init void map_high(char *id, unsigned long base, int pshift, |
378 | int max_pnode, enum map_type map_type) | 387 | int bshift, int max_pnode, enum map_type map_type) |
379 | { | 388 | { |
380 | unsigned long bytes, paddr; | 389 | unsigned long bytes, paddr; |
381 | 390 | ||
382 | paddr = base << shift; | 391 | paddr = base << pshift; |
383 | bytes = (1UL << shift) * (max_pnode + 1); | 392 | bytes = (1UL << bshift) * (max_pnode + 1); |
384 | printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, | 393 | printk(KERN_INFO "UV: Map %s_HI 0x%lx - 0x%lx\n", id, paddr, |
385 | paddr + bytes); | 394 | paddr + bytes); |
386 | if (map_type == map_uc) | 395 | if (map_type == map_uc) |
@@ -396,7 +405,7 @@ static __init void map_gru_high(int max_pnode) | |||
396 | 405 | ||
397 | gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); | 406 | gru.v = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR); |
398 | if (gru.s.enable) { | 407 | if (gru.s.enable) { |
399 | map_high("GRU", gru.s.base, shift, max_pnode, map_wb); | 408 | map_high("GRU", gru.s.base, shift, shift, max_pnode, map_wb); |
400 | gru_start_paddr = ((u64)gru.s.base << shift); | 409 | gru_start_paddr = ((u64)gru.s.base << shift); |
401 | gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1); | 410 | gru_end_paddr = gru_start_paddr + (1UL << shift) * (max_pnode + 1); |
402 | 411 | ||
@@ -410,7 +419,7 @@ static __init void map_mmr_high(int max_pnode) | |||
410 | 419 | ||
411 | mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); | 420 | mmr.v = uv_read_local_mmr(UVH_RH_GAM_MMR_OVERLAY_CONFIG_MMR); |
412 | if (mmr.s.enable) | 421 | if (mmr.s.enable) |
413 | map_high("MMR", mmr.s.base, shift, max_pnode, map_uc); | 422 | map_high("MMR", mmr.s.base, shift, shift, max_pnode, map_uc); |
414 | } | 423 | } |
415 | 424 | ||
416 | static __init void map_mmioh_high(int max_pnode) | 425 | static __init void map_mmioh_high(int max_pnode) |
@@ -420,7 +429,8 @@ static __init void map_mmioh_high(int max_pnode) | |||
420 | 429 | ||
421 | mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); | 430 | mmioh.v = uv_read_local_mmr(UVH_RH_GAM_MMIOH_OVERLAY_CONFIG_MMR); |
422 | if (mmioh.s.enable) | 431 | if (mmioh.s.enable) |
423 | map_high("MMIOH", mmioh.s.base, shift, max_pnode, map_uc); | 432 | map_high("MMIOH", mmioh.s.base, shift, mmioh.s.m_io, |
433 | max_pnode, map_uc); | ||
424 | } | 434 | } |
425 | 435 | ||
426 | static __init void map_low_mmrs(void) | 436 | static __init void map_low_mmrs(void) |
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index c56bc2873030..6d817554780a 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -123,13 +123,15 @@ print_context_stack_bp(struct thread_info *tinfo, | |||
123 | while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) { | 123 | while (valid_stack_ptr(tinfo, ret_addr, sizeof(*ret_addr), end)) { |
124 | unsigned long addr = *ret_addr; | 124 | unsigned long addr = *ret_addr; |
125 | 125 | ||
126 | if (__kernel_text_address(addr)) { | 126 | if (!__kernel_text_address(addr)) |
127 | ops->address(data, addr, 1); | 127 | break; |
128 | frame = frame->next_frame; | 128 | |
129 | ret_addr = &frame->return_address; | 129 | ops->address(data, addr, 1); |
130 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | 130 | frame = frame->next_frame; |
131 | } | 131 | ret_addr = &frame->return_address; |
132 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | ||
132 | } | 133 | } |
134 | |||
133 | return (unsigned long)frame; | 135 | return (unsigned long)frame; |
134 | } | 136 | } |
135 | EXPORT_SYMBOL_GPL(print_context_stack_bp); | 137 | EXPORT_SYMBOL_GPL(print_context_stack_bp); |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index c6ee241c8a98..02c3ee013ccd 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -288,6 +288,8 @@ int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
288 | regs.es = __USER_DS; | 288 | regs.es = __USER_DS; |
289 | regs.fs = __KERNEL_PERCPU; | 289 | regs.fs = __KERNEL_PERCPU; |
290 | regs.gs = __KERNEL_STACK_CANARY; | 290 | regs.gs = __KERNEL_STACK_CANARY; |
291 | #else | ||
292 | regs.ss = __KERNEL_DS; | ||
291 | #endif | 293 | #endif |
292 | 294 | ||
293 | regs.orig_ax = -1; | 295 | regs.orig_ax = -1; |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 2b26dd5930c6..36daccb68642 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1151,9 +1151,13 @@ asmlinkage void __init xen_start_kernel(void) | |||
1151 | 1151 | ||
1152 | /* keep using Xen gdt for now; no urgent need to change it */ | 1152 | /* keep using Xen gdt for now; no urgent need to change it */ |
1153 | 1153 | ||
1154 | #ifdef CONFIG_X86_32 | ||
1154 | pv_info.kernel_rpl = 1; | 1155 | pv_info.kernel_rpl = 1; |
1155 | if (xen_feature(XENFEAT_supervisor_mode_kernel)) | 1156 | if (xen_feature(XENFEAT_supervisor_mode_kernel)) |
1156 | pv_info.kernel_rpl = 0; | 1157 | pv_info.kernel_rpl = 0; |
1158 | #else | ||
1159 | pv_info.kernel_rpl = 0; | ||
1160 | #endif | ||
1157 | 1161 | ||
1158 | /* set the limit of our address space */ | 1162 | /* set the limit of our address space */ |
1159 | xen_reserve_top(); | 1163 | xen_reserve_top(); |