diff options
Diffstat (limited to 'arch')
122 files changed, 1014 insertions, 745 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 9bef61b30367..8290b69da202 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -549,6 +549,11 @@ config NUMA | |||
549 | Access). This option is for configuring high-end multiprocessor | 549 | Access). This option is for configuring high-end multiprocessor |
550 | server machines. If in doubt, say N. | 550 | server machines. If in doubt, say N. |
551 | 551 | ||
552 | config NODES_SHIFT | ||
553 | int | ||
554 | default "7" | ||
555 | depends on NEED_MULTIPLE_NODES | ||
556 | |||
552 | # LARGE_VMALLOC is racy, if you *really* need it then fix it first | 557 | # LARGE_VMALLOC is racy, if you *really* need it then fix it first |
553 | config ALPHA_LARGE_VMALLOC | 558 | config ALPHA_LARGE_VMALLOC |
554 | bool | 559 | bool |
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c index 9d6186d50245..c645c5e14786 100644 --- a/arch/alpha/kernel/alpha_ksyms.c +++ b/arch/alpha/kernel/alpha_ksyms.c | |||
@@ -76,7 +76,6 @@ EXPORT_SYMBOL(strncpy); | |||
76 | EXPORT_SYMBOL(strnlen); | 76 | EXPORT_SYMBOL(strnlen); |
77 | EXPORT_SYMBOL(strncat); | 77 | EXPORT_SYMBOL(strncat); |
78 | EXPORT_SYMBOL(strstr); | 78 | EXPORT_SYMBOL(strstr); |
79 | EXPORT_SYMBOL(strpbrk); | ||
80 | EXPORT_SYMBOL(strchr); | 79 | EXPORT_SYMBOL(strchr); |
81 | EXPORT_SYMBOL(strrchr); | 80 | EXPORT_SYMBOL(strrchr); |
82 | EXPORT_SYMBOL(memcmp); | 81 | EXPORT_SYMBOL(memcmp); |
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c index a15e18a00258..558b83368559 100644 --- a/arch/alpha/kernel/setup.c +++ b/arch/alpha/kernel/setup.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/config.h> /* CONFIG_ALPHA_LCA etc */ | 24 | #include <linux/config.h> /* CONFIG_ALPHA_LCA etc */ |
25 | #include <linux/mc146818rtc.h> | 25 | #include <linux/mc146818rtc.h> |
26 | #include <linux/console.h> | 26 | #include <linux/console.h> |
27 | #include <linux/cpu.h> | ||
27 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
28 | #include <linux/init.h> | 29 | #include <linux/init.h> |
29 | #include <linux/string.h> | 30 | #include <linux/string.h> |
@@ -471,6 +472,22 @@ page_is_ram(unsigned long pfn) | |||
471 | return 0; | 472 | return 0; |
472 | } | 473 | } |
473 | 474 | ||
475 | static int __init | ||
476 | register_cpus(void) | ||
477 | { | ||
478 | int i; | ||
479 | |||
480 | for_each_possible_cpu(i) { | ||
481 | struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); | ||
482 | if (!p) | ||
483 | return -ENOMEM; | ||
484 | register_cpu(p, i, NULL); | ||
485 | } | ||
486 | return 0; | ||
487 | } | ||
488 | |||
489 | arch_initcall(register_cpus); | ||
490 | |||
474 | void __init | 491 | void __init |
475 | setup_arch(char **cmdline_p) | 492 | setup_arch(char **cmdline_p) |
476 | { | 493 | { |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 02c2db08114a..185255416e85 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -439,7 +439,7 @@ setup_smp(void) | |||
439 | if ((cpu->flags & 0x1cc) == 0x1cc) { | 439 | if ((cpu->flags & 0x1cc) == 0x1cc) { |
440 | smp_num_probed++; | 440 | smp_num_probed++; |
441 | /* Assume here that "whami" == index */ | 441 | /* Assume here that "whami" == index */ |
442 | cpu_set(i, cpu_possible_map); | 442 | cpu_set(i, cpu_present_mask); |
443 | cpu->pal_revision = boot_cpu_palrev; | 443 | cpu->pal_revision = boot_cpu_palrev; |
444 | } | 444 | } |
445 | 445 | ||
@@ -450,9 +450,8 @@ setup_smp(void) | |||
450 | } | 450 | } |
451 | } else { | 451 | } else { |
452 | smp_num_probed = 1; | 452 | smp_num_probed = 1; |
453 | cpu_set(boot_cpuid, cpu_possible_map); | 453 | cpu_set(boot_cpuid, cpu_present_mask); |
454 | } | 454 | } |
455 | cpu_present_mask = cpumask_of_cpu(boot_cpuid); | ||
456 | 455 | ||
457 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", | 456 | printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", |
458 | smp_num_probed, cpu_possible_map.bits[0]); | 457 | smp_num_probed, cpu_possible_map.bits[0]); |
@@ -488,9 +487,8 @@ void __devinit | |||
488 | smp_prepare_boot_cpu(void) | 487 | smp_prepare_boot_cpu(void) |
489 | { | 488 | { |
490 | /* | 489 | /* |
491 | * Mark the boot cpu (current cpu) as both present and online | 490 | * Mark the boot cpu (current cpu) as online |
492 | */ | 491 | */ |
493 | cpu_set(smp_processor_id(), cpu_present_mask); | ||
494 | cpu_set(smp_processor_id(), cpu_online_map); | 492 | cpu_set(smp_processor_id(), cpu_online_map); |
495 | } | 493 | } |
496 | 494 | ||
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index dc5a9332c915..1dbf6ddb300d 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -512,6 +512,12 @@ config ARCH_DISCONTIGMEM_ENABLE | |||
512 | or have huge holes in the physical address space for other reasons. | 512 | or have huge holes in the physical address space for other reasons. |
513 | See <file:Documentation/vm/numa> for more. | 513 | See <file:Documentation/vm/numa> for more. |
514 | 514 | ||
515 | config NODES_SHIFT | ||
516 | int | ||
517 | default "4" if ARCH_LH7A40X | ||
518 | default "2" | ||
519 | depends on NEED_MULTIPLE_NODES | ||
520 | |||
515 | source "mm/Kconfig" | 521 | source "mm/Kconfig" |
516 | 522 | ||
517 | config LEDS | 523 | config LEDS |
diff --git a/arch/arm/boot/compressed/vmlinux.lds.in b/arch/arm/boot/compressed/vmlinux.lds.in index eed616113e47..153a07e7222b 100644 --- a/arch/arm/boot/compressed/vmlinux.lds.in +++ b/arch/arm/boot/compressed/vmlinux.lds.in | |||
@@ -18,6 +18,7 @@ SECTIONS | |||
18 | _start = .; | 18 | _start = .; |
19 | *(.start) | 19 | *(.start) |
20 | *(.text) | 20 | *(.text) |
21 | *(.text.*) | ||
21 | *(.fixup) | 22 | *(.fixup) |
22 | *(.gnu.warning) | 23 | *(.gnu.warning) |
23 | *(.rodata) | 24 | *(.rodata) |
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c index ee083b3f0522..c49b5d4d7fca 100644 --- a/arch/arm/kernel/armksyms.c +++ b/arch/arm/kernel/armksyms.c | |||
@@ -101,7 +101,6 @@ EXPORT_SYMBOL(__raw_writesl); | |||
101 | 101 | ||
102 | /* string / mem functions */ | 102 | /* string / mem functions */ |
103 | EXPORT_SYMBOL(strchr); | 103 | EXPORT_SYMBOL(strchr); |
104 | EXPORT_SYMBOL(strpbrk); | ||
105 | EXPORT_SYMBOL(strrchr); | 104 | EXPORT_SYMBOL(strrchr); |
106 | EXPORT_SYMBOL(memset); | 105 | EXPORT_SYMBOL(memset); |
107 | EXPORT_SYMBOL(memcpy); | 106 | EXPORT_SYMBOL(memcpy); |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 437528403959..8cff73e668b3 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -322,6 +322,12 @@ static void __init setup_processor(void) | |||
322 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); | 322 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); |
323 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); | 323 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); |
324 | elf_hwcap = list->elf_hwcap; | 324 | elf_hwcap = list->elf_hwcap; |
325 | #ifndef CONFIG_ARM_THUMB | ||
326 | elf_hwcap &= ~HWCAP_THUMB; | ||
327 | #endif | ||
328 | #ifndef CONFIG_VFP | ||
329 | elf_hwcap &= ~HWCAP_VFP; | ||
330 | #endif | ||
325 | 331 | ||
326 | cpu_proc_init(); | 332 | cpu_proc_init(); |
327 | } | 333 | } |
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 876c38da14f7..847329cafc5c 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -25,10 +25,6 @@ | |||
25 | #include <asm/arch/mux.h> | 25 | #include <asm/arch/mux.h> |
26 | #include <asm/arch/gpio.h> | 26 | #include <asm/arch/gpio.h> |
27 | 27 | ||
28 | extern void omap_nop_release(struct device *dev); | ||
29 | |||
30 | /*-------------------------------------------------------------------------*/ | ||
31 | |||
32 | #if defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE) | 28 | #if defined(CONFIG_OMAP1610_IR) || defined(CONFIG_OMAP161O_IR_MODULE) |
33 | 29 | ||
34 | static u64 irda_dmamask = 0xffffffff; | 30 | static u64 irda_dmamask = 0xffffffff; |
@@ -37,7 +33,6 @@ static struct platform_device omap1610ir_device = { | |||
37 | .name = "omap1610-ir", | 33 | .name = "omap1610-ir", |
38 | .id = -1, | 34 | .id = -1, |
39 | .dev = { | 35 | .dev = { |
40 | .release = omap_nop_release, | ||
41 | .dma_mask = &irda_dmamask, | 36 | .dma_mask = &irda_dmamask, |
42 | }, | 37 | }, |
43 | }; | 38 | }; |
@@ -84,9 +79,6 @@ static struct resource rtc_resources[] = { | |||
84 | static struct platform_device omap_rtc_device = { | 79 | static struct platform_device omap_rtc_device = { |
85 | .name = "omap_rtc", | 80 | .name = "omap_rtc", |
86 | .id = -1, | 81 | .id = -1, |
87 | .dev = { | ||
88 | .release = omap_nop_release, | ||
89 | }, | ||
90 | .num_resources = ARRAY_SIZE(rtc_resources), | 82 | .num_resources = ARRAY_SIZE(rtc_resources), |
91 | .resource = rtc_resources, | 83 | .resource = rtc_resources, |
92 | }; | 84 | }; |
@@ -124,9 +116,6 @@ static struct resource sti_resources[] = { | |||
124 | static struct platform_device sti_device = { | 116 | static struct platform_device sti_device = { |
125 | .name = "sti", | 117 | .name = "sti", |
126 | .id = -1, | 118 | .id = -1, |
127 | .dev = { | ||
128 | .release = omap_nop_release, | ||
129 | }, | ||
130 | .num_resources = ARRAY_SIZE(sti_resources), | 119 | .num_resources = ARRAY_SIZE(sti_resources), |
131 | .resource = sti_resources, | 120 | .resource = sti_resources, |
132 | }; | 121 | }; |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index def9e5370edf..fb7f91da1aad 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -25,10 +25,6 @@ | |||
25 | #include <asm/arch/mux.h> | 25 | #include <asm/arch/mux.h> |
26 | #include <asm/arch/gpio.h> | 26 | #include <asm/arch/gpio.h> |
27 | 27 | ||
28 | extern void omap_nop_release(struct device *dev); | ||
29 | |||
30 | /*-------------------------------------------------------------------------*/ | ||
31 | |||
32 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | 28 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) |
33 | 29 | ||
34 | #define OMAP2_I2C_BASE2 0x48072000 | 30 | #define OMAP2_I2C_BASE2 0x48072000 |
@@ -49,9 +45,6 @@ static struct resource i2c_resources2[] = { | |||
49 | static struct platform_device omap_i2c_device2 = { | 45 | static struct platform_device omap_i2c_device2 = { |
50 | .name = "i2c_omap", | 46 | .name = "i2c_omap", |
51 | .id = 2, | 47 | .id = 2, |
52 | .dev = { | ||
53 | .release = omap_nop_release, | ||
54 | }, | ||
55 | .num_resources = ARRAY_SIZE(i2c_resources2), | 48 | .num_resources = ARRAY_SIZE(i2c_resources2), |
56 | .resource = i2c_resources2, | 49 | .resource = i2c_resources2, |
57 | }; | 50 | }; |
@@ -100,9 +93,6 @@ static struct resource sti_resources[] = { | |||
100 | static struct platform_device sti_device = { | 93 | static struct platform_device sti_device = { |
101 | .name = "sti", | 94 | .name = "sti", |
102 | .id = -1, | 95 | .id = -1, |
103 | .dev = { | ||
104 | .release = omap_nop_release, | ||
105 | }, | ||
106 | .num_resources = ARRAY_SIZE(sti_resources), | 96 | .num_resources = ARRAY_SIZE(sti_resources), |
107 | .resource = sti_resources, | 97 | .resource = sti_resources, |
108 | }; | 98 | }; |
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index b7f85e6d6b76..6de713ad319a 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c | |||
@@ -367,6 +367,8 @@ static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) | |||
367 | source = S3C2410_MISCCR_CLK0_UPLL; | 367 | source = S3C2410_MISCCR_CLK0_UPLL; |
368 | else if (parent == &clk_f) | 368 | else if (parent == &clk_f) |
369 | source = S3C2410_MISCCR_CLK0_FCLK; | 369 | source = S3C2410_MISCCR_CLK0_FCLK; |
370 | else if (parent == &clk_h) | ||
371 | source = S3C2410_MISCCR_CLK0_HCLK; | ||
370 | else if (parent == &clk_p) | 372 | else if (parent == &clk_p) |
371 | source = S3C2410_MISCCR_CLK0_PCLK; | 373 | source = S3C2410_MISCCR_CLK0_PCLK; |
372 | else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0) | 374 | else if (clk == &s3c24xx_clkout0 && parent == &s3c24xx_dclk0) |
@@ -376,6 +378,8 @@ static int s3c24xx_clkout_setparent(struct clk *clk, struct clk *parent) | |||
376 | else | 378 | else |
377 | return -EINVAL; | 379 | return -EINVAL; |
378 | 380 | ||
381 | clk->parent = parent; | ||
382 | |||
379 | if (clk == &s3c24xx_dclk0) | 383 | if (clk == &s3c24xx_dclk0) |
380 | mask = S3C2410_MISCCR_CLK0_MASK; | 384 | mask = S3C2410_MISCCR_CLK0_MASK; |
381 | else { | 385 | else { |
diff --git a/arch/arm/mach-s3c2410/common-smdk.c b/arch/arm/mach-s3c2410/common-smdk.c index 36b8291b5e03..f372fbda124e 100644 --- a/arch/arm/mach-s3c2410/common-smdk.c +++ b/arch/arm/mach-s3c2410/common-smdk.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #include <asm/arch/nand.h> | 38 | #include <asm/arch/nand.h> |
39 | 39 | ||
40 | #include "common-smdk.h" | ||
40 | #include "devs.h" | 41 | #include "devs.h" |
41 | #include "pm.h" | 42 | #include "pm.h" |
42 | 43 | ||
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 5c4055b62d97..54e3c5bb5186 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/linkage.h> | 11 | #include <linux/linkage.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <asm/hardware.h> | 13 | #include <asm/memory.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page.h> |
15 | #include "proc-macros.S" | 15 | #include "proc-macros.S" |
16 | 16 | ||
@@ -46,6 +46,11 @@ | |||
46 | */ | 46 | */ |
47 | #define CACHE_DLIMIT (CACHE_DSIZE * 4) | 47 | #define CACHE_DLIMIT (CACHE_DSIZE * 4) |
48 | 48 | ||
49 | .data | ||
50 | flush_base: | ||
51 | .long FLUSH_BASE | ||
52 | .text | ||
53 | |||
49 | /* | 54 | /* |
50 | * flush_user_cache_all() | 55 | * flush_user_cache_all() |
51 | * | 56 | * |
@@ -63,11 +68,21 @@ ENTRY(v4wb_flush_kern_cache_all) | |||
63 | mov ip, #0 | 68 | mov ip, #0 |
64 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | 69 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache |
65 | __flush_whole_cache: | 70 | __flush_whole_cache: |
66 | mov r0, #FLUSH_BASE | 71 | ldr r3, =flush_base |
67 | add r1, r0, #CACHE_DSIZE | 72 | ldr r1, [r3, #0] |
68 | 1: ldr r2, [r0], #32 | 73 | eor r1, r1, #CACHE_DSIZE |
69 | cmp r0, r1 | 74 | str r1, [r3, #0] |
75 | add r2, r1, #CACHE_DSIZE | ||
76 | 1: ldr r3, [r1], #32 | ||
77 | cmp r1, r2 | ||
78 | blo 1b | ||
79 | #ifdef FLUSH_BASE_MINICACHE | ||
80 | add r2, r2, #FLUSH_BASE_MINICACHE - FLUSH_BASE | ||
81 | sub r1, r2, #512 @ only 512 bytes | ||
82 | 1: ldr r3, [r1], #32 | ||
83 | cmp r1, r2 | ||
70 | blo 1b | 84 | blo 1b |
85 | #endif | ||
71 | mcr p15, 0, ip, c7, c10, 4 @ drain write buffer | 86 | mcr p15, 0, ip, c7, c10, 4 @ drain write buffer |
72 | mov pc, lr | 87 | mov pc, lr |
73 | 88 | ||
@@ -82,6 +97,7 @@ __flush_whole_cache: | |||
82 | * - flags - vma_area_struct flags describing address space | 97 | * - flags - vma_area_struct flags describing address space |
83 | */ | 98 | */ |
84 | ENTRY(v4wb_flush_user_cache_range) | 99 | ENTRY(v4wb_flush_user_cache_range) |
100 | mov ip, #0 | ||
85 | sub r3, r1, r0 @ calculate total size | 101 | sub r3, r1, r0 @ calculate total size |
86 | tst r2, #VM_EXEC @ executable region? | 102 | tst r2, #VM_EXEC @ executable region? |
87 | mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache | 103 | mcrne p15, 0, ip, c7, c5, 0 @ invalidate I cache |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 88279124317a..9ea1f87a7079 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -20,6 +20,7 @@ | |||
20 | 20 | ||
21 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
22 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
23 | #include <asm/sizes.h> | ||
23 | #include <asm/tlb.h> | 24 | #include <asm/tlb.h> |
24 | 25 | ||
25 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
@@ -455,14 +456,14 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
455 | #ifdef FLUSH_BASE | 456 | #ifdef FLUSH_BASE |
456 | map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS); | 457 | map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS); |
457 | map.virtual = FLUSH_BASE; | 458 | map.virtual = FLUSH_BASE; |
458 | map.length = PGDIR_SIZE; | 459 | map.length = SZ_1M; |
459 | map.type = MT_CACHECLEAN; | 460 | map.type = MT_CACHECLEAN; |
460 | create_mapping(&map); | 461 | create_mapping(&map); |
461 | #endif | 462 | #endif |
462 | #ifdef FLUSH_BASE_MINICACHE | 463 | #ifdef FLUSH_BASE_MINICACHE |
463 | map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS + PGDIR_SIZE); | 464 | map.pfn = __phys_to_pfn(FLUSH_BASE_PHYS + SZ_1M); |
464 | map.virtual = FLUSH_BASE_MINICACHE; | 465 | map.virtual = FLUSH_BASE_MINICACHE; |
465 | map.length = PGDIR_SIZE; | 466 | map.length = SZ_1M; |
466 | map.type = MT_MINICLEAN; | 467 | map.type = MT_MINICLEAN; |
467 | create_mapping(&map); | 468 | create_mapping(&map); |
468 | #endif | 469 | #endif |
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S index c916a6cae404..a2dd5ae1077d 100644 --- a/arch/arm/mm/proc-sa110.S +++ b/arch/arm/mm/proc-sa110.S | |||
@@ -26,22 +26,7 @@ | |||
26 | * the cache line size of the I and D cache | 26 | * the cache line size of the I and D cache |
27 | */ | 27 | */ |
28 | #define DCACHELINESIZE 32 | 28 | #define DCACHELINESIZE 32 |
29 | #define FLUSH_OFFSET 32768 | ||
30 | 29 | ||
31 | .macro flush_110_dcache rd, ra, re | ||
32 | ldr \rd, =flush_base | ||
33 | ldr \ra, [\rd] | ||
34 | eor \ra, \ra, #FLUSH_OFFSET | ||
35 | str \ra, [\rd] | ||
36 | add \re, \ra, #16384 @ only necessary for 16k | ||
37 | 1001: ldr \rd, [\ra], #DCACHELINESIZE | ||
38 | teq \re, \ra | ||
39 | bne 1001b | ||
40 | .endm | ||
41 | |||
42 | .data | ||
43 | flush_base: | ||
44 | .long FLUSH_BASE | ||
45 | .text | 30 | .text |
46 | 31 | ||
47 | /* | 32 | /* |
@@ -145,13 +130,11 @@ ENTRY(cpu_sa110_dcache_clean_area) | |||
145 | */ | 130 | */ |
146 | .align 5 | 131 | .align 5 |
147 | ENTRY(cpu_sa110_switch_mm) | 132 | ENTRY(cpu_sa110_switch_mm) |
148 | flush_110_dcache r3, ip, r1 | 133 | str lr, [sp, #-4]! |
149 | mov r1, #0 | 134 | bl v4wb_flush_kern_cache_all @ clears IP |
150 | mcr p15, 0, r1, c7, c5, 0 @ invalidate I cache | ||
151 | mcr p15, 0, r1, c7, c10, 4 @ drain WB | ||
152 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer | 135 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer |
153 | mcr p15, 0, r1, c8, c7, 0 @ invalidate I & D TLBs | 136 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs |
154 | mov pc, lr | 137 | ldr pc, [sp], #4 |
155 | 138 | ||
156 | /* | 139 | /* |
157 | * cpu_sa110_set_pte(ptep, pte) | 140 | * cpu_sa110_set_pte(ptep, pte) |
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S index 41f21f2dd8ff..777ad99c1439 100644 --- a/arch/arm/mm/proc-sa1100.S +++ b/arch/arm/mm/proc-sa1100.S | |||
@@ -30,30 +30,6 @@ | |||
30 | * the cache line size of the I and D cache | 30 | * the cache line size of the I and D cache |
31 | */ | 31 | */ |
32 | #define DCACHELINESIZE 32 | 32 | #define DCACHELINESIZE 32 |
33 | #define FLUSH_OFFSET 32768 | ||
34 | |||
35 | .macro flush_1100_dcache rd, ra, re | ||
36 | ldr \rd, =flush_base | ||
37 | ldr \ra, [\rd] | ||
38 | eor \ra, \ra, #FLUSH_OFFSET | ||
39 | str \ra, [\rd] | ||
40 | add \re, \ra, #8192 @ only necessary for 8k | ||
41 | 1001: ldr \rd, [\ra], #DCACHELINESIZE | ||
42 | teq \re, \ra | ||
43 | bne 1001b | ||
44 | #ifdef FLUSH_BASE_MINICACHE | ||
45 | add \ra, \ra, #FLUSH_BASE_MINICACHE - FLUSH_BASE | ||
46 | add \re, \ra, #512 @ only 512 bytes | ||
47 | 1002: ldr \rd, [\ra], #DCACHELINESIZE | ||
48 | teq \re, \ra | ||
49 | bne 1002b | ||
50 | #endif | ||
51 | .endm | ||
52 | |||
53 | .data | ||
54 | flush_base: | ||
55 | .long FLUSH_BASE | ||
56 | .text | ||
57 | 33 | ||
58 | __INIT | 34 | __INIT |
59 | 35 | ||
@@ -79,9 +55,8 @@ ENTRY(cpu_sa1100_proc_fin) | |||
79 | stmfd sp!, {lr} | 55 | stmfd sp!, {lr} |
80 | mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE | 56 | mov ip, #PSR_F_BIT | PSR_I_BIT | SVC_MODE |
81 | msr cpsr_c, ip | 57 | msr cpsr_c, ip |
82 | flush_1100_dcache r0, r1, r2 @ clean caches | 58 | bl v4wb_flush_kern_cache_all |
83 | mov r0, #0 | 59 | mcr p15, 0, ip, c15, c2, 2 @ Disable clock switching |
84 | mcr p15, 0, r0, c15, c2, 2 @ Disable clock switching | ||
85 | mrc p15, 0, r0, c1, c0, 0 @ ctrl register | 60 | mrc p15, 0, r0, c1, c0, 0 @ ctrl register |
86 | bic r0, r0, #0x1000 @ ...i............ | 61 | bic r0, r0, #0x1000 @ ...i............ |
87 | bic r0, r0, #0x000e @ ............wca. | 62 | bic r0, r0, #0x000e @ ............wca. |
@@ -167,14 +142,12 @@ ENTRY(cpu_sa1100_dcache_clean_area) | |||
167 | */ | 142 | */ |
168 | .align 5 | 143 | .align 5 |
169 | ENTRY(cpu_sa1100_switch_mm) | 144 | ENTRY(cpu_sa1100_switch_mm) |
170 | flush_1100_dcache r3, ip, r1 | 145 | str lr, [sp, #-4]! |
171 | mov ip, #0 | 146 | bl v4wb_flush_kern_cache_all @ clears IP |
172 | mcr p15, 0, ip, c7, c5, 0 @ invalidate I cache | ||
173 | mcr p15, 0, ip, c9, c0, 0 @ invalidate RB | 147 | mcr p15, 0, ip, c9, c0, 0 @ invalidate RB |
174 | mcr p15, 0, ip, c7, c10, 4 @ drain WB | ||
175 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer | 148 | mcr p15, 0, r0, c2, c0, 0 @ load page table pointer |
176 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs | 149 | mcr p15, 0, ip, c8, c7, 0 @ invalidate I & D TLBs |
177 | mov pc, lr | 150 | ldr pc, [sp], #4 |
178 | 151 | ||
179 | /* | 152 | /* |
180 | * cpu_sa1100_set_pte(ptep, pte) | 153 | * cpu_sa1100_set_pte(ptep, pte) |
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 06485c193ee3..32ec04c58bcd 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c | |||
@@ -58,7 +58,7 @@ struct clk * clk_get(struct device *dev, const char *id) | |||
58 | if (p->id == idno && | 58 | if (p->id == idno && |
59 | strcmp(id, p->name) == 0 && try_module_get(p->owner)) { | 59 | strcmp(id, p->name) == 0 && try_module_get(p->owner)) { |
60 | clk = p; | 60 | clk = p; |
61 | break; | 61 | goto found; |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
@@ -69,6 +69,7 @@ struct clk * clk_get(struct device *dev, const char *id) | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | 71 | ||
72 | found: | ||
72 | mutex_unlock(&clocks_mutex); | 73 | mutex_unlock(&clocks_mutex); |
73 | 74 | ||
74 | return clk; | 75 | return clk; |
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index 079b67deac0f..5d5d6eb222dd 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -26,14 +26,6 @@ | |||
26 | #include <asm/arch/gpio.h> | 26 | #include <asm/arch/gpio.h> |
27 | #include <asm/arch/menelaus.h> | 27 | #include <asm/arch/menelaus.h> |
28 | 28 | ||
29 | |||
30 | void omap_nop_release(struct device *dev) | ||
31 | { | ||
32 | /* Nothing */ | ||
33 | } | ||
34 | |||
35 | /*-------------------------------------------------------------------------*/ | ||
36 | |||
37 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | 29 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) |
38 | 30 | ||
39 | #define OMAP1_I2C_BASE 0xfffb3800 | 31 | #define OMAP1_I2C_BASE 0xfffb3800 |
@@ -59,9 +51,6 @@ static struct resource i2c_resources1[] = { | |||
59 | static struct platform_device omap_i2c_device1 = { | 51 | static struct platform_device omap_i2c_device1 = { |
60 | .name = "i2c_omap", | 52 | .name = "i2c_omap", |
61 | .id = 1, | 53 | .id = 1, |
62 | .dev = { | ||
63 | .release = omap_nop_release, | ||
64 | }, | ||
65 | .num_resources = ARRAY_SIZE(i2c_resources1), | 54 | .num_resources = ARRAY_SIZE(i2c_resources1), |
66 | .resource = i2c_resources1, | 55 | .resource = i2c_resources1, |
67 | }; | 56 | }; |
@@ -187,7 +176,6 @@ static struct platform_device mmc_omap_device1 = { | |||
187 | .name = "mmci-omap", | 176 | .name = "mmci-omap", |
188 | .id = 1, | 177 | .id = 1, |
189 | .dev = { | 178 | .dev = { |
190 | .release = omap_nop_release, | ||
191 | .dma_mask = &mmc1_dmamask, | 179 | .dma_mask = &mmc1_dmamask, |
192 | .platform_data = &mmc1_conf, | 180 | .platform_data = &mmc1_conf, |
193 | }, | 181 | }, |
@@ -217,7 +205,6 @@ static struct platform_device mmc_omap_device2 = { | |||
217 | .name = "mmci-omap", | 205 | .name = "mmci-omap", |
218 | .id = 2, | 206 | .id = 2, |
219 | .dev = { | 207 | .dev = { |
220 | .release = omap_nop_release, | ||
221 | .dma_mask = &mmc2_dmamask, | 208 | .dma_mask = &mmc2_dmamask, |
222 | .platform_data = &mmc2_conf, | 209 | .platform_data = &mmc2_conf, |
223 | }, | 210 | }, |
@@ -321,9 +308,6 @@ static struct resource uwire_resources[] = { | |||
321 | static struct platform_device omap_uwire_device = { | 308 | static struct platform_device omap_uwire_device = { |
322 | .name = "omap_uwire", | 309 | .name = "omap_uwire", |
323 | .id = -1, | 310 | .id = -1, |
324 | .dev = { | ||
325 | .release = omap_nop_release, | ||
326 | }, | ||
327 | .num_resources = ARRAY_SIZE(uwire_resources), | 311 | .num_resources = ARRAY_SIZE(uwire_resources), |
328 | .resource = uwire_resources, | 312 | .resource = uwire_resources, |
329 | }; | 313 | }; |
@@ -365,9 +349,6 @@ static struct resource wdt_resources[] = { | |||
365 | static struct platform_device omap_wdt_device = { | 349 | static struct platform_device omap_wdt_device = { |
366 | .name = "omap_wdt", | 350 | .name = "omap_wdt", |
367 | .id = -1, | 351 | .id = -1, |
368 | .dev = { | ||
369 | .release = omap_nop_release, | ||
370 | }, | ||
371 | .num_resources = ARRAY_SIZE(wdt_resources), | 352 | .num_resources = ARRAY_SIZE(wdt_resources), |
372 | .resource = wdt_resources, | 353 | .resource = wdt_resources, |
373 | }; | 354 | }; |
@@ -401,9 +382,6 @@ static struct resource rng_resources[] = { | |||
401 | static struct platform_device omap_rng_device = { | 382 | static struct platform_device omap_rng_device = { |
402 | .name = "omap_rng", | 383 | .name = "omap_rng", |
403 | .id = -1, | 384 | .id = -1, |
404 | .dev = { | ||
405 | .release = omap_nop_release, | ||
406 | }, | ||
407 | .num_resources = ARRAY_SIZE(rng_resources), | 385 | .num_resources = ARRAY_SIZE(rng_resources), |
408 | .resource = rng_resources, | 386 | .resource = rng_resources, |
409 | }; | 387 | }; |
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index 9b367a65cb4d..febd115dba28 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c | |||
@@ -588,6 +588,7 @@ static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr) | |||
588 | struct vfp_double vdm; | 588 | struct vfp_double vdm; |
589 | u32 d, exceptions = 0; | 589 | u32 d, exceptions = 0; |
590 | int rmode = fpscr & FPSCR_RMODE_MASK; | 590 | int rmode = fpscr & FPSCR_RMODE_MASK; |
591 | int tm; | ||
591 | 592 | ||
592 | vfp_double_unpack(&vdm, vfp_get_double(dm)); | 593 | vfp_double_unpack(&vdm, vfp_get_double(dm)); |
593 | vfp_double_dump("VDM", &vdm); | 594 | vfp_double_dump("VDM", &vdm); |
@@ -595,10 +596,14 @@ static u32 vfp_double_ftosi(int sd, int unused, int dm, u32 fpscr) | |||
595 | /* | 596 | /* |
596 | * Do we have denormalised number? | 597 | * Do we have denormalised number? |
597 | */ | 598 | */ |
598 | if (vfp_double_type(&vdm) & VFP_DENORMAL) | 599 | tm = vfp_double_type(&vdm); |
600 | if (tm & VFP_DENORMAL) | ||
599 | exceptions |= FPSCR_IDC; | 601 | exceptions |= FPSCR_IDC; |
600 | 602 | ||
601 | if (vdm.exponent >= 1023 + 32) { | 603 | if (tm & VFP_NAN) { |
604 | d = 0; | ||
605 | exceptions |= FPSCR_IOC; | ||
606 | } else if (vdm.exponent >= 1023 + 32) { | ||
602 | d = 0x7fffffff; | 607 | d = 0x7fffffff; |
603 | if (vdm.sign) | 608 | if (vdm.sign) |
604 | d = ~d; | 609 | d = ~d; |
@@ -1122,9 +1127,9 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1122 | { | 1127 | { |
1123 | u32 op = inst & FOP_MASK; | 1128 | u32 op = inst & FOP_MASK; |
1124 | u32 exceptions = 0; | 1129 | u32 exceptions = 0; |
1125 | unsigned int dd = vfp_get_sd(inst); | 1130 | unsigned int dd = vfp_get_dd(inst); |
1126 | unsigned int dn = vfp_get_sn(inst); | 1131 | unsigned int dn = vfp_get_dn(inst); |
1127 | unsigned int dm = vfp_get_sm(inst); | 1132 | unsigned int dm = vfp_get_dm(inst); |
1128 | unsigned int vecitr, veclen, vecstride; | 1133 | unsigned int vecitr, veclen, vecstride; |
1129 | u32 (*fop)(int, int, s32, u32); | 1134 | u32 (*fop)(int, int, s32, u32); |
1130 | 1135 | ||
@@ -1141,7 +1146,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1141 | pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, | 1146 | pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, |
1142 | (veclen >> FPSCR_LENGTH_BIT) + 1); | 1147 | (veclen >> FPSCR_LENGTH_BIT) + 1); |
1143 | 1148 | ||
1144 | fop = (op == FOP_EXT) ? fop_extfns[dn] : fop_fns[FOP_TO_IDX(op)]; | 1149 | fop = (op == FOP_EXT) ? fop_extfns[FEXT_TO_IDX(inst)] : fop_fns[FOP_TO_IDX(op)]; |
1145 | if (!fop) | 1150 | if (!fop) |
1146 | goto invalid; | 1151 | goto invalid; |
1147 | 1152 | ||
@@ -1149,17 +1154,13 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1149 | u32 except; | 1154 | u32 except; |
1150 | 1155 | ||
1151 | if (op == FOP_EXT) | 1156 | if (op == FOP_EXT) |
1152 | pr_debug("VFP: itr%d (d%u.%u) = op[%u] (d%u.%u)\n", | 1157 | pr_debug("VFP: itr%d (d%u) = op[%u] (d%u)\n", |
1153 | vecitr >> FPSCR_LENGTH_BIT, | 1158 | vecitr >> FPSCR_LENGTH_BIT, |
1154 | dd >> 1, dd & 1, dn, | 1159 | dd, dn, dm); |
1155 | dm >> 1, dm & 1); | ||
1156 | else | 1160 | else |
1157 | pr_debug("VFP: itr%d (d%u.%u) = (d%u.%u) op[%u] (d%u.%u)\n", | 1161 | pr_debug("VFP: itr%d (d%u) = (d%u) op[%u] (d%u)\n", |
1158 | vecitr >> FPSCR_LENGTH_BIT, | 1162 | vecitr >> FPSCR_LENGTH_BIT, |
1159 | dd >> 1, dd & 1, | 1163 | dd, dn, FOP_TO_IDX(op), dm); |
1160 | dn >> 1, dn & 1, | ||
1161 | FOP_TO_IDX(op), | ||
1162 | dm >> 1, dm & 1); | ||
1163 | 1164 | ||
1164 | except = fop(dd, dn, dm, fpscr); | 1165 | except = fop(dd, dn, dm, fpscr); |
1165 | pr_debug("VFP: itr%d: exceptions=%08x\n", | 1166 | pr_debug("VFP: itr%d: exceptions=%08x\n", |
diff --git a/arch/arm/vfp/vfphw.S b/arch/arm/vfp/vfphw.S index b7ed57e00cd4..a3f65b47aea9 100644 --- a/arch/arm/vfp/vfphw.S +++ b/arch/arm/vfp/vfphw.S | |||
@@ -189,11 +189,10 @@ vfp_put_float: | |||
189 | 189 | ||
190 | .globl vfp_get_double | 190 | .globl vfp_get_double |
191 | vfp_get_double: | 191 | vfp_get_double: |
192 | mov r0, r0, lsr #1 | ||
193 | add pc, pc, r0, lsl #3 | 192 | add pc, pc, r0, lsl #3 |
194 | mov r0, r0 | 193 | mov r0, r0 |
195 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | 194 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
196 | mrrc p10, 1, r0, r1, c\dr @ fmrrd r0, r1, d\dr | 195 | mrrc p11, 1, r0, r1, c\dr @ fmrrd r0, r1, d\dr |
197 | mov pc, lr | 196 | mov pc, lr |
198 | .endr | 197 | .endr |
199 | 198 | ||
@@ -204,10 +203,9 @@ vfp_get_double: | |||
204 | 203 | ||
205 | .globl vfp_put_double | 204 | .globl vfp_put_double |
206 | vfp_put_double: | 205 | vfp_put_double: |
207 | mov r0, r0, lsr #1 | ||
208 | add pc, pc, r0, lsl #3 | 206 | add pc, pc, r0, lsl #3 |
209 | mov r0, r0 | 207 | mov r0, r0 |
210 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 | 208 | .irp dr,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 |
211 | mcrr p10, 1, r1, r2, c\dr @ fmrrd r1, r2, d\dr | 209 | mcrr p11, 1, r1, r2, c\dr @ fmdrr r1, r2, d\dr |
212 | mov pc, lr | 210 | mov pc, lr |
213 | .endr | 211 | .endr |
diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c index 14dd696ddeb1..4ac27f193934 100644 --- a/arch/arm/vfp/vfpsingle.c +++ b/arch/arm/vfp/vfpsingle.c | |||
@@ -632,6 +632,7 @@ static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr) | |||
632 | struct vfp_single vsm; | 632 | struct vfp_single vsm; |
633 | u32 d, exceptions = 0; | 633 | u32 d, exceptions = 0; |
634 | int rmode = fpscr & FPSCR_RMODE_MASK; | 634 | int rmode = fpscr & FPSCR_RMODE_MASK; |
635 | int tm; | ||
635 | 636 | ||
636 | vfp_single_unpack(&vsm, m); | 637 | vfp_single_unpack(&vsm, m); |
637 | vfp_single_dump("VSM", &vsm); | 638 | vfp_single_dump("VSM", &vsm); |
@@ -639,10 +640,14 @@ static u32 vfp_single_ftosi(int sd, int unused, s32 m, u32 fpscr) | |||
639 | /* | 640 | /* |
640 | * Do we have a denormalised number? | 641 | * Do we have a denormalised number? |
641 | */ | 642 | */ |
643 | tm = vfp_single_type(&vsm); | ||
642 | if (vfp_single_type(&vsm) & VFP_DENORMAL) | 644 | if (vfp_single_type(&vsm) & VFP_DENORMAL) |
643 | exceptions |= FPSCR_IDC; | 645 | exceptions |= FPSCR_IDC; |
644 | 646 | ||
645 | if (vsm.exponent >= 127 + 32) { | 647 | if (tm & VFP_NAN) { |
648 | d = 0; | ||
649 | exceptions |= FPSCR_IOC; | ||
650 | } else if (vsm.exponent >= 127 + 32) { | ||
646 | /* | 651 | /* |
647 | * m >= 2^31-2^7: invalid | 652 | * m >= 2^31-2^7: invalid |
648 | */ | 653 | */ |
@@ -1188,7 +1193,7 @@ u32 vfp_single_cpdo(u32 inst, u32 fpscr) | |||
1188 | pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, | 1193 | pr_debug("VFP: vecstride=%u veclen=%u\n", vecstride, |
1189 | (veclen >> FPSCR_LENGTH_BIT) + 1); | 1194 | (veclen >> FPSCR_LENGTH_BIT) + 1); |
1190 | 1195 | ||
1191 | fop = (op == FOP_EXT) ? fop_extfns[sn] : fop_fns[FOP_TO_IDX(op)]; | 1196 | fop = (op == FOP_EXT) ? fop_extfns[FEXT_TO_IDX(inst)] : fop_fns[FOP_TO_IDX(op)]; |
1192 | if (!fop) | 1197 | if (!fop) |
1193 | goto invalid; | 1198 | goto invalid; |
1194 | 1199 | ||
diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c index a6a1b3373444..9d66c27f2724 100644 --- a/arch/arm26/kernel/armksyms.c +++ b/arch/arm26/kernel/armksyms.c | |||
@@ -152,7 +152,6 @@ EXPORT_SYMBOL(strncmp); | |||
152 | EXPORT_SYMBOL(strchr); | 152 | EXPORT_SYMBOL(strchr); |
153 | EXPORT_SYMBOL(strlen); | 153 | EXPORT_SYMBOL(strlen); |
154 | EXPORT_SYMBOL(strnlen); | 154 | EXPORT_SYMBOL(strnlen); |
155 | EXPORT_SYMBOL(strpbrk); | ||
156 | EXPORT_SYMBOL(strrchr); | 155 | EXPORT_SYMBOL(strrchr); |
157 | EXPORT_SYMBOL(strstr); | 156 | EXPORT_SYMBOL(strstr); |
158 | EXPORT_SYMBOL(memset); | 157 | EXPORT_SYMBOL(memset); |
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c index de39725da920..d57859053ce7 100644 --- a/arch/cris/kernel/crisksyms.c +++ b/arch/cris/kernel/crisksyms.c | |||
@@ -39,7 +39,6 @@ EXPORT_SYMBOL(loops_per_usec); | |||
39 | /* String functions */ | 39 | /* String functions */ |
40 | EXPORT_SYMBOL(memcmp); | 40 | EXPORT_SYMBOL(memcmp); |
41 | EXPORT_SYMBOL(memmove); | 41 | EXPORT_SYMBOL(memmove); |
42 | EXPORT_SYMBOL(strpbrk); | ||
43 | EXPORT_SYMBOL(strstr); | 42 | EXPORT_SYMBOL(strstr); |
44 | EXPORT_SYMBOL(strcpy); | 43 | EXPORT_SYMBOL(strcpy); |
45 | EXPORT_SYMBOL(strchr); | 44 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 1d21c8d34d8a..a9b59527a741 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -1170,12 +1170,6 @@ __syscall_badsys: | |||
1170 | # syscall vector table | 1170 | # syscall vector table |
1171 | # | 1171 | # |
1172 | ############################################################################### | 1172 | ############################################################################### |
1173 | #ifdef CONFIG_MMU | ||
1174 | #define __MMU(X) X | ||
1175 | #else | ||
1176 | #define __MMU(X) sys_ni_syscall | ||
1177 | #endif | ||
1178 | |||
1179 | .section .rodata | 1173 | .section .rodata |
1180 | ALIGN | 1174 | ALIGN |
1181 | .globl sys_call_table | 1175 | .globl sys_call_table |
@@ -1305,7 +1299,7 @@ sys_call_table: | |||
1305 | .long sys_newuname | 1299 | .long sys_newuname |
1306 | .long sys_ni_syscall /* old "cacheflush" */ | 1300 | .long sys_ni_syscall /* old "cacheflush" */ |
1307 | .long sys_adjtimex | 1301 | .long sys_adjtimex |
1308 | .long __MMU(sys_mprotect) /* 125 */ | 1302 | .long sys_mprotect /* 125 */ |
1309 | .long sys_sigprocmask | 1303 | .long sys_sigprocmask |
1310 | .long sys_ni_syscall /* old "create_module" */ | 1304 | .long sys_ni_syscall /* old "create_module" */ |
1311 | .long sys_init_module | 1305 | .long sys_init_module |
@@ -1324,16 +1318,16 @@ sys_call_table: | |||
1324 | .long sys_getdents | 1318 | .long sys_getdents |
1325 | .long sys_select | 1319 | .long sys_select |
1326 | .long sys_flock | 1320 | .long sys_flock |
1327 | .long __MMU(sys_msync) | 1321 | .long sys_msync |
1328 | .long sys_readv /* 145 */ | 1322 | .long sys_readv /* 145 */ |
1329 | .long sys_writev | 1323 | .long sys_writev |
1330 | .long sys_getsid | 1324 | .long sys_getsid |
1331 | .long sys_fdatasync | 1325 | .long sys_fdatasync |
1332 | .long sys_sysctl | 1326 | .long sys_sysctl |
1333 | .long __MMU(sys_mlock) /* 150 */ | 1327 | .long sys_mlock /* 150 */ |
1334 | .long __MMU(sys_munlock) | 1328 | .long sys_munlock |
1335 | .long __MMU(sys_mlockall) | 1329 | .long sys_mlockall |
1336 | .long __MMU(sys_munlockall) | 1330 | .long sys_munlockall |
1337 | .long sys_sched_setparam | 1331 | .long sys_sched_setparam |
1338 | .long sys_sched_getparam /* 155 */ | 1332 | .long sys_sched_getparam /* 155 */ |
1339 | .long sys_sched_setscheduler | 1333 | .long sys_sched_setscheduler |
@@ -1343,7 +1337,7 @@ sys_call_table: | |||
1343 | .long sys_sched_get_priority_min /* 160 */ | 1337 | .long sys_sched_get_priority_min /* 160 */ |
1344 | .long sys_sched_rr_get_interval | 1338 | .long sys_sched_rr_get_interval |
1345 | .long sys_nanosleep | 1339 | .long sys_nanosleep |
1346 | .long __MMU(sys_mremap) | 1340 | .long sys_mremap |
1347 | .long sys_setresuid16 | 1341 | .long sys_setresuid16 |
1348 | .long sys_getresuid16 /* 165 */ | 1342 | .long sys_getresuid16 /* 165 */ |
1349 | .long sys_ni_syscall /* for vm86 */ | 1343 | .long sys_ni_syscall /* for vm86 */ |
@@ -1398,8 +1392,8 @@ sys_call_table: | |||
1398 | .long sys_setfsuid /* 215 */ | 1392 | .long sys_setfsuid /* 215 */ |
1399 | .long sys_setfsgid | 1393 | .long sys_setfsgid |
1400 | .long sys_pivot_root | 1394 | .long sys_pivot_root |
1401 | .long __MMU(sys_mincore) | 1395 | .long sys_mincore |
1402 | .long __MMU(sys_madvise) | 1396 | .long sys_madvise |
1403 | .long sys_getdents64 /* 220 */ | 1397 | .long sys_getdents64 /* 220 */ |
1404 | .long sys_fcntl64 | 1398 | .long sys_fcntl64 |
1405 | .long sys_ni_syscall /* reserved for TUX */ | 1399 | .long sys_ni_syscall /* reserved for TUX */ |
@@ -1437,7 +1431,7 @@ sys_call_table: | |||
1437 | .long sys_epoll_create | 1431 | .long sys_epoll_create |
1438 | .long sys_epoll_ctl /* 255 */ | 1432 | .long sys_epoll_ctl /* 255 */ |
1439 | .long sys_epoll_wait | 1433 | .long sys_epoll_wait |
1440 | .long __MMU(sys_remap_file_pages) | 1434 | .long sys_remap_file_pages |
1441 | .long sys_set_tid_address | 1435 | .long sys_set_tid_address |
1442 | .long sys_timer_create | 1436 | .long sys_timer_create |
1443 | .long sys_timer_settime /* 260 */ | 1437 | .long sys_timer_settime /* 260 */ |
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c index 07c8ffa0dd39..0f273a7aca5a 100644 --- a/arch/frv/kernel/frv_ksyms.c +++ b/arch/frv/kernel/frv_ksyms.c | |||
@@ -27,7 +27,6 @@ EXPORT_SYMBOL(__ioremap); | |||
27 | EXPORT_SYMBOL(iounmap); | 27 | EXPORT_SYMBOL(iounmap); |
28 | 28 | ||
29 | EXPORT_SYMBOL(strnlen); | 29 | EXPORT_SYMBOL(strnlen); |
30 | EXPORT_SYMBOL(strpbrk); | ||
31 | EXPORT_SYMBOL(strrchr); | 30 | EXPORT_SYMBOL(strrchr); |
32 | EXPORT_SYMBOL(strstr); | 31 | EXPORT_SYMBOL(strstr); |
33 | EXPORT_SYMBOL(strchr); | 32 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/h8300/kernel/h8300_ksyms.c b/arch/h8300/kernel/h8300_ksyms.c index b6cd78c972bb..f8d6dee84781 100644 --- a/arch/h8300/kernel/h8300_ksyms.c +++ b/arch/h8300/kernel/h8300_ksyms.c | |||
@@ -25,7 +25,6 @@ extern char h8300_debug_device[]; | |||
25 | /* platform dependent support */ | 25 | /* platform dependent support */ |
26 | 26 | ||
27 | EXPORT_SYMBOL(strnlen); | 27 | EXPORT_SYMBOL(strnlen); |
28 | EXPORT_SYMBOL(strpbrk); | ||
29 | EXPORT_SYMBOL(strrchr); | 28 | EXPORT_SYMBOL(strrchr); |
30 | EXPORT_SYMBOL(strstr); | 29 | EXPORT_SYMBOL(strstr); |
31 | EXPORT_SYMBOL(strchr); | 30 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index f17bd1d2707e..18ec9fe6deb6 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -53,6 +53,35 @@ source "init/Kconfig" | |||
53 | 53 | ||
54 | menu "Processor type and features" | 54 | menu "Processor type and features" |
55 | 55 | ||
56 | config SMP | ||
57 | bool "Symmetric multi-processing support" | ||
58 | ---help--- | ||
59 | This enables support for systems with more than one CPU. If you have | ||
60 | a system with only one CPU, like most personal computers, say N. If | ||
61 | you have a system with more than one CPU, say Y. | ||
62 | |||
63 | If you say N here, the kernel will run on single and multiprocessor | ||
64 | machines, but will use only one CPU of a multiprocessor machine. If | ||
65 | you say Y here, the kernel will run on many, but not all, | ||
66 | singleprocessor machines. On a singleprocessor machine, the kernel | ||
67 | will run faster if you say N here. | ||
68 | |||
69 | Note that if you say Y here and choose architecture "586" or | ||
70 | "Pentium" under "Processor family", the kernel will not work on 486 | ||
71 | architectures. Similarly, multiprocessor kernels for the "PPro" | ||
72 | architecture may not work on all Pentium based boards. | ||
73 | |||
74 | People using multiprocessor machines who say Y here should also say | ||
75 | Y to "Enhanced Real Time Clock Support", below. The "Advanced Power | ||
76 | Management" code will be disabled if you say Y here. | ||
77 | |||
78 | See also the <file:Documentation/smp.txt>, | ||
79 | <file:Documentation/i386/IO-APIC.txt>, | ||
80 | <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at | ||
81 | <http://www.tldp.org/docs.html#howto>. | ||
82 | |||
83 | If you don't know what to do here, say N. | ||
84 | |||
56 | choice | 85 | choice |
57 | prompt "Subarchitecture Type" | 86 | prompt "Subarchitecture Type" |
58 | default X86_PC | 87 | default X86_PC |
@@ -178,35 +207,6 @@ config HPET_EMULATE_RTC | |||
178 | depends on HPET_TIMER && RTC=y | 207 | depends on HPET_TIMER && RTC=y |
179 | default y | 208 | default y |
180 | 209 | ||
181 | config SMP | ||
182 | bool "Symmetric multi-processing support" | ||
183 | ---help--- | ||
184 | This enables support for systems with more than one CPU. If you have | ||
185 | a system with only one CPU, like most personal computers, say N. If | ||
186 | you have a system with more than one CPU, say Y. | ||
187 | |||
188 | If you say N here, the kernel will run on single and multiprocessor | ||
189 | machines, but will use only one CPU of a multiprocessor machine. If | ||
190 | you say Y here, the kernel will run on many, but not all, | ||
191 | singleprocessor machines. On a singleprocessor machine, the kernel | ||
192 | will run faster if you say N here. | ||
193 | |||
194 | Note that if you say Y here and choose architecture "586" or | ||
195 | "Pentium" under "Processor family", the kernel will not work on 486 | ||
196 | architectures. Similarly, multiprocessor kernels for the "PPro" | ||
197 | architecture may not work on all Pentium based boards. | ||
198 | |||
199 | People using multiprocessor machines who say Y here should also say | ||
200 | Y to "Enhanced Real Time Clock Support", below. The "Advanced Power | ||
201 | Management" code will be disabled if you say Y here. | ||
202 | |||
203 | See also the <file:Documentation/smp.txt>, | ||
204 | <file:Documentation/i386/IO-APIC.txt>, | ||
205 | <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at | ||
206 | <http://www.tldp.org/docs.html#howto>. | ||
207 | |||
208 | If you don't know what to do here, say N. | ||
209 | |||
210 | config NR_CPUS | 210 | config NR_CPUS |
211 | int "Maximum number of CPUs (2-255)" | 211 | int "Maximum number of CPUs (2-255)" |
212 | range 2 255 | 212 | range 2 255 |
@@ -522,6 +522,12 @@ config NUMA | |||
522 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" | 522 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" |
523 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) | 523 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) |
524 | 524 | ||
525 | config NODES_SHIFT | ||
526 | int | ||
527 | default "4" if X86_NUMAQ | ||
528 | default "3" | ||
529 | depends on NEED_MULTIPLE_NODES | ||
530 | |||
525 | config HAVE_ARCH_BOOTMEM_NODE | 531 | config HAVE_ARCH_BOOTMEM_NODE |
526 | bool | 532 | bool |
527 | depends on NUMA | 533 | depends on NUMA |
@@ -757,15 +763,6 @@ config HOTPLUG_CPU | |||
757 | 763 | ||
758 | Say N. | 764 | Say N. |
759 | 765 | ||
760 | config DOUBLEFAULT | ||
761 | default y | ||
762 | bool "Enable doublefault exception handler" if EMBEDDED | ||
763 | help | ||
764 | This option allows trapping of rare doublefault exceptions that | ||
765 | would otherwise cause a system to silently reboot. Disabling this | ||
766 | option saves about 4k and might cause you much additional grey | ||
767 | hair. | ||
768 | |||
769 | endmenu | 766 | endmenu |
770 | 767 | ||
771 | 768 | ||
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu index 79603b3471f9..eb130482ba18 100644 --- a/arch/i386/Kconfig.cpu +++ b/arch/i386/Kconfig.cpu | |||
@@ -311,5 +311,5 @@ config X86_OOSTORE | |||
311 | 311 | ||
312 | config X86_TSC | 312 | config X86_TSC |
313 | bool | 313 | bool |
314 | depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1) && !X86_NUMAQ | 314 | depends on (MWINCHIP3D || MWINCHIP2 || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MGEODEGX1 || MGEODE_LX) && !X86_NUMAQ |
315 | default y | 315 | default y |
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index 0000a2674537..c9343c3a8082 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S | |||
@@ -97,6 +97,7 @@ | |||
97 | #define PARAM_VESAPM_OFF 0x30 | 97 | #define PARAM_VESAPM_OFF 0x30 |
98 | #define PARAM_LFB_PAGES 0x32 | 98 | #define PARAM_LFB_PAGES 0x32 |
99 | #define PARAM_VESA_ATTRIB 0x34 | 99 | #define PARAM_VESA_ATTRIB 0x34 |
100 | #define PARAM_CAPABILITIES 0x36 | ||
100 | 101 | ||
101 | /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ | 102 | /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ |
102 | #ifdef CONFIG_VIDEO_RETAIN | 103 | #ifdef CONFIG_VIDEO_RETAIN |
@@ -233,6 +234,10 @@ mopar_gr: | |||
233 | movw 18(%di), %ax | 234 | movw 18(%di), %ax |
234 | movl %eax, %fs:(PARAM_LFB_SIZE) | 235 | movl %eax, %fs:(PARAM_LFB_SIZE) |
235 | 236 | ||
237 | # store mode capabilities | ||
238 | movl 10(%di), %eax | ||
239 | movl %eax, %fs:(PARAM_CAPABILITIES) | ||
240 | |||
236 | # switching the DAC to 8-bit is for <= 8 bpp only | 241 | # switching the DAC to 8-bit is for <= 8 bpp only |
237 | movw %fs:(PARAM_LFB_DEPTH), %ax | 242 | movw %fs:(PARAM_LFB_DEPTH), %ax |
238 | cmpw $8, %ax | 243 | cmpw $8, %ax |
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index 033066176b3e..030a0007a4e0 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -168,7 +168,7 @@ int __init acpi_parse_mcfg(unsigned long phys_addr, unsigned long size) | |||
168 | unsigned long i; | 168 | unsigned long i; |
169 | int config_size; | 169 | int config_size; |
170 | 170 | ||
171 | if (!phys_addr || !size) | 171 | if (!phys_addr || !size || !cpu_has_apic) |
172 | return -EINVAL; | 172 | return -EINVAL; |
173 | 173 | ||
174 | mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); | 174 | mcfg = (struct acpi_table_mcfg *)__acpi_map_table(phys_addr, size); |
@@ -215,7 +215,7 @@ static int __init acpi_parse_madt(unsigned long phys_addr, unsigned long size) | |||
215 | { | 215 | { |
216 | struct acpi_table_madt *madt = NULL; | 216 | struct acpi_table_madt *madt = NULL; |
217 | 217 | ||
218 | if (!phys_addr || !size) | 218 | if (!phys_addr || !size || !cpu_has_apic) |
219 | return -EINVAL; | 219 | return -EINVAL; |
220 | 220 | ||
221 | madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); | 221 | madt = (struct acpi_table_madt *)__acpi_map_table(phys_addr, size); |
@@ -693,6 +693,9 @@ static int __init acpi_parse_madt_lapic_entries(void) | |||
693 | { | 693 | { |
694 | int count; | 694 | int count; |
695 | 695 | ||
696 | if (!cpu_has_apic) | ||
697 | return -ENODEV; | ||
698 | |||
696 | /* | 699 | /* |
697 | * Note that the LAPIC address is obtained from the MADT (32-bit value) | 700 | * Note that the LAPIC address is obtained from the MADT (32-bit value) |
698 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). | 701 | * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). |
@@ -751,6 +754,9 @@ static int __init acpi_parse_madt_ioapic_entries(void) | |||
751 | return -ENODEV; | 754 | return -ENODEV; |
752 | } | 755 | } |
753 | 756 | ||
757 | if (!cpu_has_apic) | ||
758 | return -ENODEV; | ||
759 | |||
754 | /* | 760 | /* |
755 | * if "noapic" boot option, don't look for IO-APICs | 761 | * if "noapic" boot option, don't look for IO-APICs |
756 | */ | 762 | */ |
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index 6273bf74c203..254cee9f0b7b 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -62,6 +62,18 @@ int apic_verbosity; | |||
62 | 62 | ||
63 | static void apic_pm_activate(void); | 63 | static void apic_pm_activate(void); |
64 | 64 | ||
65 | int modern_apic(void) | ||
66 | { | ||
67 | unsigned int lvr, version; | ||
68 | /* AMD systems use old APIC versions, so check the CPU */ | ||
69 | if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && | ||
70 | boot_cpu_data.x86 >= 0xf) | ||
71 | return 1; | ||
72 | lvr = apic_read(APIC_LVR); | ||
73 | version = GET_APIC_VERSION(lvr); | ||
74 | return version >= 0x14; | ||
75 | } | ||
76 | |||
65 | /* | 77 | /* |
66 | * 'what should we do if we get a hw irq event on an illegal vector'. | 78 | * 'what should we do if we get a hw irq event on an illegal vector'. |
67 | * each architecture has to answer this themselves. | 79 | * each architecture has to answer this themselves. |
@@ -119,10 +131,7 @@ void enable_NMI_through_LVT0 (void * dummy) | |||
119 | 131 | ||
120 | int get_physical_broadcast(void) | 132 | int get_physical_broadcast(void) |
121 | { | 133 | { |
122 | unsigned int lvr, version; | 134 | if (modern_apic()) |
123 | lvr = apic_read(APIC_LVR); | ||
124 | version = GET_APIC_VERSION(lvr); | ||
125 | if (!APIC_INTEGRATED(version) || version >= 0x14) | ||
126 | return 0xff; | 135 | return 0xff; |
127 | else | 136 | else |
128 | return 0xf; | 137 | return 0xf; |
@@ -349,9 +358,9 @@ int __init verify_local_APIC(void) | |||
349 | 358 | ||
350 | void __init sync_Arb_IDs(void) | 359 | void __init sync_Arb_IDs(void) |
351 | { | 360 | { |
352 | /* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 */ | 361 | /* Unsupported on P4 - see Intel Dev. Manual Vol. 3, Ch. 8.6.1 |
353 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); | 362 | And not needed on AMD */ |
354 | if (ver >= 0x14) /* P4 or higher */ | 363 | if (modern_apic()) |
355 | return; | 364 | return; |
356 | /* | 365 | /* |
357 | * Wait for idle. | 366 | * Wait for idle. |
diff --git a/arch/i386/kernel/cpu/amd.c b/arch/i386/kernel/cpu/amd.c index 0810f81f2a05..ff2b2154ac1b 100644 --- a/arch/i386/kernel/cpu/amd.c +++ b/arch/i386/kernel/cpu/amd.c | |||
@@ -212,8 +212,6 @@ static void __init init_amd(struct cpuinfo_x86 *c) | |||
212 | 212 | ||
213 | if (cpuid_eax(0x80000000) >= 0x80000008) { | 213 | if (cpuid_eax(0x80000000) >= 0x80000008) { |
214 | c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; | 214 | c->x86_max_cores = (cpuid_ecx(0x80000008) & 0xff) + 1; |
215 | if (c->x86_max_cores & (c->x86_max_cores - 1)) | ||
216 | c->x86_max_cores = 1; | ||
217 | } | 215 | } |
218 | 216 | ||
219 | if (cpuid_eax(0x80000000) >= 0x80000007) { | 217 | if (cpuid_eax(0x80000000) >= 0x80000007) { |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index 712a26bd4457..7c0e160a2145 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | #define PFX "powernow-k8: " | 47 | #define PFX "powernow-k8: " |
48 | #define BFX PFX "BIOS error: " | 48 | #define BFX PFX "BIOS error: " |
49 | #define VERSION "version 1.60.1" | 49 | #define VERSION "version 1.60.2" |
50 | #include "powernow-k8.h" | 50 | #include "powernow-k8.h" |
51 | 51 | ||
52 | /* serialize freq changes */ | 52 | /* serialize freq changes */ |
@@ -55,7 +55,7 @@ static DEFINE_MUTEX(fidvid_mutex); | |||
55 | static struct powernow_k8_data *powernow_data[NR_CPUS]; | 55 | static struct powernow_k8_data *powernow_data[NR_CPUS]; |
56 | 56 | ||
57 | #ifndef CONFIG_SMP | 57 | #ifndef CONFIG_SMP |
58 | static cpumask_t cpu_core_map[1] = { CPU_MASK_ALL }; | 58 | static cpumask_t cpu_core_map[1]; |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | /* Return a frequency in MHz, given an input fid */ | 61 | /* Return a frequency in MHz, given an input fid */ |
@@ -910,6 +910,9 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
910 | unsigned int newstate; | 910 | unsigned int newstate; |
911 | int ret = -EIO; | 911 | int ret = -EIO; |
912 | 912 | ||
913 | if (!data) | ||
914 | return -EINVAL; | ||
915 | |||
913 | /* only run on specific CPU from here on */ | 916 | /* only run on specific CPU from here on */ |
914 | oldmask = current->cpus_allowed; | 917 | oldmask = current->cpus_allowed; |
915 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); | 918 | set_cpus_allowed(current, cpumask_of_cpu(pol->cpu)); |
@@ -969,6 +972,9 @@ static int powernowk8_verify(struct cpufreq_policy *pol) | |||
969 | { | 972 | { |
970 | struct powernow_k8_data *data = powernow_data[pol->cpu]; | 973 | struct powernow_k8_data *data = powernow_data[pol->cpu]; |
971 | 974 | ||
975 | if (!data) | ||
976 | return -EINVAL; | ||
977 | |||
972 | return cpufreq_frequency_table_verify(pol, data->powernow_table); | 978 | return cpufreq_frequency_table_verify(pol, data->powernow_table); |
973 | } | 979 | } |
974 | 980 | ||
@@ -977,7 +983,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
977 | { | 983 | { |
978 | struct powernow_k8_data *data; | 984 | struct powernow_k8_data *data; |
979 | cpumask_t oldmask = CPU_MASK_ALL; | 985 | cpumask_t oldmask = CPU_MASK_ALL; |
980 | int rc, i; | 986 | int rc; |
981 | 987 | ||
982 | if (!cpu_online(pol->cpu)) | 988 | if (!cpu_online(pol->cpu)) |
983 | return -ENODEV; | 989 | return -ENODEV; |
@@ -1063,8 +1069,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1063 | printk("cpu_init done, current fid 0x%x, vid 0x%x\n", | 1069 | printk("cpu_init done, current fid 0x%x, vid 0x%x\n", |
1064 | data->currfid, data->currvid); | 1070 | data->currfid, data->currvid); |
1065 | 1071 | ||
1066 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) | 1072 | powernow_data[pol->cpu] = data; |
1067 | powernow_data[i] = data; | ||
1068 | 1073 | ||
1069 | return 0; | 1074 | return 0; |
1070 | 1075 | ||
@@ -1104,6 +1109,9 @@ static unsigned int powernowk8_get (unsigned int cpu) | |||
1104 | if (!data) | 1109 | if (!data) |
1105 | return -EINVAL; | 1110 | return -EINVAL; |
1106 | 1111 | ||
1112 | if (!data) | ||
1113 | return -EINVAL; | ||
1114 | |||
1107 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 1115 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); |
1108 | if (smp_processor_id() != cpu) { | 1116 | if (smp_processor_id() != cpu) { |
1109 | printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); | 1117 | printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); |
diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c index 055325056a74..036a9857936f 100644 --- a/arch/i386/kernel/i386_ksyms.c +++ b/arch/i386/kernel/i386_ksyms.c | |||
@@ -19,7 +19,6 @@ EXPORT_SYMBOL(__put_user_2); | |||
19 | EXPORT_SYMBOL(__put_user_4); | 19 | EXPORT_SYMBOL(__put_user_4); |
20 | EXPORT_SYMBOL(__put_user_8); | 20 | EXPORT_SYMBOL(__put_user_8); |
21 | 21 | ||
22 | EXPORT_SYMBOL(strpbrk); | ||
23 | EXPORT_SYMBOL(strstr); | 22 | EXPORT_SYMBOL(strstr); |
24 | 23 | ||
25 | #ifdef CONFIG_SMP | 24 | #ifdef CONFIG_SMP |
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 8d8aa9d1796d..34d21e21e012 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -38,12 +38,6 @@ | |||
38 | int smp_found_config; | 38 | int smp_found_config; |
39 | unsigned int __initdata maxcpus = NR_CPUS; | 39 | unsigned int __initdata maxcpus = NR_CPUS; |
40 | 40 | ||
41 | #ifdef CONFIG_HOTPLUG_CPU | ||
42 | #define CPU_HOTPLUG_ENABLED (1) | ||
43 | #else | ||
44 | #define CPU_HOTPLUG_ENABLED (0) | ||
45 | #endif | ||
46 | |||
47 | /* | 41 | /* |
48 | * Various Linux-internal data structures created from the | 42 | * Various Linux-internal data structures created from the |
49 | * MP-table. | 43 | * MP-table. |
@@ -110,21 +104,6 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
110 | static int mpc_record; | 104 | static int mpc_record; |
111 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata; | 105 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] __initdata; |
112 | 106 | ||
113 | #ifdef CONFIG_X86_NUMAQ | ||
114 | static int MP_valid_apicid(int apicid, int version) | ||
115 | { | ||
116 | return hweight_long(apicid & 0xf) == 1 && (apicid >> 4) != 0xf; | ||
117 | } | ||
118 | #else | ||
119 | static int MP_valid_apicid(int apicid, int version) | ||
120 | { | ||
121 | if (version >= 0x14) | ||
122 | return apicid < 0xff; | ||
123 | else | ||
124 | return apicid < 0xf; | ||
125 | } | ||
126 | #endif | ||
127 | |||
128 | static void __devinit MP_processor_info (struct mpc_config_processor *m) | 107 | static void __devinit MP_processor_info (struct mpc_config_processor *m) |
129 | { | 108 | { |
130 | int ver, apicid; | 109 | int ver, apicid; |
@@ -190,12 +169,6 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
190 | 169 | ||
191 | ver = m->mpc_apicver; | 170 | ver = m->mpc_apicver; |
192 | 171 | ||
193 | if (!MP_valid_apicid(apicid, ver)) { | ||
194 | printk(KERN_WARNING "Processor #%d INVALID. (Max ID: %d).\n", | ||
195 | m->mpc_apicid, MAX_APICS); | ||
196 | return; | ||
197 | } | ||
198 | |||
199 | /* | 172 | /* |
200 | * Validate version | 173 | * Validate version |
201 | */ | 174 | */ |
@@ -225,7 +198,14 @@ static void __devinit MP_processor_info (struct mpc_config_processor *m) | |||
225 | cpu_set(num_processors, cpu_possible_map); | 198 | cpu_set(num_processors, cpu_possible_map); |
226 | num_processors++; | 199 | num_processors++; |
227 | 200 | ||
228 | if (CPU_HOTPLUG_ENABLED || (num_processors > 8)) { | 201 | /* |
202 | * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y | ||
203 | * but we need to work other dependencies like SMP_SUSPEND etc | ||
204 | * before this can be done without some confusion. | ||
205 | * if (CPU_HOTPLUG_ENABLED || num_processors > 8) | ||
206 | * - Ashok Raj <ashok.raj@intel.com> | ||
207 | */ | ||
208 | if (num_processors > 8) { | ||
229 | switch (boot_cpu_data.x86_vendor) { | 209 | switch (boot_cpu_data.x86_vendor) { |
230 | case X86_VENDOR_INTEL: | 210 | case X86_VENDOR_INTEL: |
231 | if (!APIC_XAPIC(ver)) { | 211 | if (!APIC_XAPIC(ver)) { |
@@ -249,6 +229,13 @@ static void __init MP_bus_info (struct mpc_config_bus *m) | |||
249 | 229 | ||
250 | mpc_oem_bus_info(m, str, translation_table[mpc_record]); | 230 | mpc_oem_bus_info(m, str, translation_table[mpc_record]); |
251 | 231 | ||
232 | if (m->mpc_busid >= MAX_MP_BUSSES) { | ||
233 | printk(KERN_WARNING "MP table busid value (%d) for bustype %s " | ||
234 | " is too large, max. supported is %d\n", | ||
235 | m->mpc_busid, str, MAX_MP_BUSSES - 1); | ||
236 | return; | ||
237 | } | ||
238 | |||
252 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) { | 239 | if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) { |
253 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; | 240 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; |
254 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) { | 241 | } else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) { |
diff --git a/arch/i386/kernel/reboot_fixups.c b/arch/i386/kernel/reboot_fixups.c index 10e21a4773dd..99aab41a05b0 100644 --- a/arch/i386/kernel/reboot_fixups.c +++ b/arch/i386/kernel/reboot_fixups.c | |||
@@ -51,7 +51,5 @@ void mach_reboot_fixups(void) | |||
51 | 51 | ||
52 | cur->reboot_fixup(dev); | 52 | cur->reboot_fixup(dev); |
53 | } | 53 | } |
54 | |||
55 | printk(KERN_WARNING "No reboot fixup found for your hardware\n"); | ||
56 | } | 54 | } |
57 | 55 | ||
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index eacc3f0a2ea4..80cb3b2d0997 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -963,6 +963,36 @@ efi_memory_present_wrapper(unsigned long start, unsigned long end, void *arg) | |||
963 | return 0; | 963 | return 0; |
964 | } | 964 | } |
965 | 965 | ||
966 | /* | ||
967 | * This function checks if the entire range <start,end> is mapped with type. | ||
968 | * | ||
969 | * Note: this function only works correct if the e820 table is sorted and | ||
970 | * not-overlapping, which is the case | ||
971 | */ | ||
972 | int __init | ||
973 | e820_all_mapped(unsigned long start, unsigned long end, unsigned type) | ||
974 | { | ||
975 | int i; | ||
976 | for (i = 0; i < e820.nr_map; i++) { | ||
977 | struct e820entry *ei = &e820.map[i]; | ||
978 | if (type && ei->type != type) | ||
979 | continue; | ||
980 | /* is the region (part) in overlap with the current region ?*/ | ||
981 | if (ei->addr >= end || ei->addr + ei->size <= start) | ||
982 | continue; | ||
983 | /* if the region is at the beginning of <start,end> we move | ||
984 | * start to the end of the region since it's ok until there | ||
985 | */ | ||
986 | if (ei->addr <= start) | ||
987 | start = ei->addr + ei->size; | ||
988 | /* if start is now at or beyond end, we're done, full | ||
989 | * coverage */ | ||
990 | if (start >= end) | ||
991 | return 1; /* we're done */ | ||
992 | } | ||
993 | return 0; | ||
994 | } | ||
995 | |||
966 | /* | 996 | /* |
967 | * Find the highest page frame number we have available | 997 | * Find the highest page frame number we have available |
968 | */ | 998 | */ |
@@ -1317,8 +1347,8 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
1317 | /* | 1347 | /* |
1318 | * Request address space for all standard resources | 1348 | * Request address space for all standard resources |
1319 | * | 1349 | * |
1320 | * This is called just before pcibios_assign_resources(), which is also | 1350 | * This is called just before pcibios_init(), which is also a |
1321 | * an fs_initcall, but is linked in later (in arch/i386/pci/i386.c). | 1351 | * subsys_initcall, but is linked in later (in arch/i386/pci/common.c). |
1322 | */ | 1352 | */ |
1323 | static int __init request_standard_resources(void) | 1353 | static int __init request_standard_resources(void) |
1324 | { | 1354 | { |
@@ -1339,7 +1369,7 @@ static int __init request_standard_resources(void) | |||
1339 | return 0; | 1369 | return 0; |
1340 | } | 1370 | } |
1341 | 1371 | ||
1342 | fs_initcall(request_standard_resources); | 1372 | subsys_initcall(request_standard_resources); |
1343 | 1373 | ||
1344 | static void __init register_memory(void) | 1374 | static void __init register_memory(void) |
1345 | { | 1375 | { |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index e38527994590..2d22f5761b1d 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -365,6 +365,9 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
365 | 365 | ||
366 | if (++die.lock_owner_depth < 3) { | 366 | if (++die.lock_owner_depth < 3) { |
367 | int nl = 0; | 367 | int nl = 0; |
368 | unsigned long esp; | ||
369 | unsigned short ss; | ||
370 | |||
368 | handle_BUG(regs); | 371 | handle_BUG(regs); |
369 | printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); | 372 | printk(KERN_EMERG "%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); |
370 | #ifdef CONFIG_PREEMPT | 373 | #ifdef CONFIG_PREEMPT |
@@ -387,8 +390,19 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
387 | printk("\n"); | 390 | printk("\n"); |
388 | if (notify_die(DIE_OOPS, str, regs, err, | 391 | if (notify_die(DIE_OOPS, str, regs, err, |
389 | current->thread.trap_no, SIGSEGV) != | 392 | current->thread.trap_no, SIGSEGV) != |
390 | NOTIFY_STOP) | 393 | NOTIFY_STOP) { |
391 | show_registers(regs); | 394 | show_registers(regs); |
395 | /* Executive summary in case the oops scrolled away */ | ||
396 | esp = (unsigned long) (®s->esp); | ||
397 | savesegment(ss, ss); | ||
398 | if (user_mode(regs)) { | ||
399 | esp = regs->esp; | ||
400 | ss = regs->xss & 0xffff; | ||
401 | } | ||
402 | printk(KERN_EMERG "EIP: [<%08lx>] ", regs->eip); | ||
403 | print_symbol("%s", regs->eip); | ||
404 | printk(" SS:ESP %04x:%08lx\n", ss, esp); | ||
405 | } | ||
392 | else | 406 | else |
393 | regs = NULL; | 407 | regs = NULL; |
394 | } else | 408 | } else |
diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c index 23967fe658d3..3039539de51e 100644 --- a/arch/i386/mach-voyager/voyager_cat.c +++ b/arch/i386/mach-voyager/voyager_cat.c | |||
@@ -106,9 +106,15 @@ voyager_module_t *voyager_cat_list; | |||
106 | 106 | ||
107 | /* the I/O port assignments for the VIC and QIC */ | 107 | /* the I/O port assignments for the VIC and QIC */ |
108 | static struct resource vic_res = { | 108 | static struct resource vic_res = { |
109 | "Voyager Interrupt Controller", 0xFC00, 0xFC6F }; | 109 | .name = "Voyager Interrupt Controller", |
110 | .start = 0xFC00, | ||
111 | .end = 0xFC6F | ||
112 | }; | ||
110 | static struct resource qic_res = { | 113 | static struct resource qic_res = { |
111 | "Quad Interrupt Controller", 0xFC70, 0xFCFF }; | 114 | .name = "Quad Interrupt Controller", |
115 | .start = 0xFC70, | ||
116 | .end = 0xFCFF | ||
117 | }; | ||
112 | 118 | ||
113 | /* This function is used to pack a data bit stream inside a message. | 119 | /* This function is used to pack a data bit stream inside a message. |
114 | * It writes num_bits of the data buffer in msg starting at start_bit. | 120 | * It writes num_bits of the data buffer in msg starting at start_bit. |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 9f66ac582a8b..ae6534ad8161 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -651,6 +651,7 @@ void __init mem_init(void) | |||
651 | * Specifically, in the case of x86, we will always add | 651 | * Specifically, in the case of x86, we will always add |
652 | * memory to the highmem for now. | 652 | * memory to the highmem for now. |
653 | */ | 653 | */ |
654 | #ifdef CONFIG_HOTPLUG_MEMORY | ||
654 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 655 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
655 | int add_memory(u64 start, u64 size) | 656 | int add_memory(u64 start, u64 size) |
656 | { | 657 | { |
@@ -667,6 +668,7 @@ int remove_memory(u64 start, u64 size) | |||
667 | return -EINVAL; | 668 | return -EINVAL; |
668 | } | 669 | } |
669 | #endif | 670 | #endif |
671 | #endif | ||
670 | 672 | ||
671 | kmem_cache_t *pgd_cache; | 673 | kmem_cache_t *pgd_cache; |
672 | kmem_cache_t *pmd_cache; | 674 | kmem_cache_t *pmd_cache; |
diff --git a/arch/i386/pci/direct.c b/arch/i386/pci/direct.c index 99012b93bd12..5d81fb510375 100644 --- a/arch/i386/pci/direct.c +++ b/arch/i386/pci/direct.c | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | #include <linux/pci.h> | 5 | #include <linux/pci.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/dmi.h> | ||
7 | #include "pci.h" | 8 | #include "pci.h" |
8 | 9 | ||
9 | /* | 10 | /* |
@@ -18,8 +19,10 @@ int pci_conf1_read(unsigned int seg, unsigned int bus, | |||
18 | { | 19 | { |
19 | unsigned long flags; | 20 | unsigned long flags; |
20 | 21 | ||
21 | if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) | 22 | if ((bus > 255) || (devfn > 255) || (reg > 255)) { |
23 | *value = -1; | ||
22 | return -EINVAL; | 24 | return -EINVAL; |
25 | } | ||
23 | 26 | ||
24 | spin_lock_irqsave(&pci_config_lock, flags); | 27 | spin_lock_irqsave(&pci_config_lock, flags); |
25 | 28 | ||
@@ -91,8 +94,10 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus, | |||
91 | unsigned long flags; | 94 | unsigned long flags; |
92 | int dev, fn; | 95 | int dev, fn; |
93 | 96 | ||
94 | if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) | 97 | if ((bus > 255) || (devfn > 255) || (reg > 255)) { |
98 | *value = -1; | ||
95 | return -EINVAL; | 99 | return -EINVAL; |
100 | } | ||
96 | 101 | ||
97 | dev = PCI_SLOT(devfn); | 102 | dev = PCI_SLOT(devfn); |
98 | fn = PCI_FUNC(devfn); | 103 | fn = PCI_FUNC(devfn); |
@@ -188,6 +193,10 @@ static int __init pci_sanity_check(struct pci_raw_ops *o) | |||
188 | 193 | ||
189 | if (pci_probe & PCI_NO_CHECKS) | 194 | if (pci_probe & PCI_NO_CHECKS) |
190 | return 1; | 195 | return 1; |
196 | /* Assume Type 1 works for newer systems. | ||
197 | This handles machines that don't have anything on PCI Bus 0. */ | ||
198 | if (dmi_get_year(DMI_BIOS_DATE) >= 2001) | ||
199 | return 1; | ||
191 | 200 | ||
192 | for (devfn = 0; devfn < 0x100; devfn++) { | 201 | for (devfn = 0; devfn < 0x100; devfn++) { |
193 | if (o->read(0, 0, devfn, PCI_CLASS_DEVICE, 2, &x)) | 202 | if (o->read(0, 0, devfn, PCI_CLASS_DEVICE, 2, &x)) |
diff --git a/arch/i386/pci/mmconfig.c b/arch/i386/pci/mmconfig.c index 613789071f30..6b1ea0c9a570 100644 --- a/arch/i386/pci/mmconfig.c +++ b/arch/i386/pci/mmconfig.c | |||
@@ -12,14 +12,20 @@ | |||
12 | #include <linux/pci.h> | 12 | #include <linux/pci.h> |
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | #include <linux/acpi.h> | 14 | #include <linux/acpi.h> |
15 | #include <asm/e820.h> | ||
15 | #include "pci.h" | 16 | #include "pci.h" |
16 | 17 | ||
18 | #define MMCONFIG_APER_SIZE (256*1024*1024) | ||
19 | |||
20 | /* Assume systems with more busses have correct MCFG */ | ||
21 | #define MAX_CHECK_BUS 16 | ||
22 | |||
17 | #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG)) | 23 | #define mmcfg_virt_addr ((void __iomem *) fix_to_virt(FIX_PCIE_MCFG)) |
18 | 24 | ||
19 | /* The base address of the last MMCONFIG device accessed */ | 25 | /* The base address of the last MMCONFIG device accessed */ |
20 | static u32 mmcfg_last_accessed_device; | 26 | static u32 mmcfg_last_accessed_device; |
21 | 27 | ||
22 | static DECLARE_BITMAP(fallback_slots, 32); | 28 | static DECLARE_BITMAP(fallback_slots, MAX_CHECK_BUS*32); |
23 | 29 | ||
24 | /* | 30 | /* |
25 | * Functions for accessing PCI configuration space with MMCONFIG accesses | 31 | * Functions for accessing PCI configuration space with MMCONFIG accesses |
@@ -29,8 +35,8 @@ static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn) | |||
29 | int cfg_num = -1; | 35 | int cfg_num = -1; |
30 | struct acpi_table_mcfg_config *cfg; | 36 | struct acpi_table_mcfg_config *cfg; |
31 | 37 | ||
32 | if (seg == 0 && bus == 0 && | 38 | if (seg == 0 && bus < MAX_CHECK_BUS && |
33 | test_bit(PCI_SLOT(devfn), fallback_slots)) | 39 | test_bit(PCI_SLOT(devfn) + 32*bus, fallback_slots)) |
34 | return 0; | 40 | return 0; |
35 | 41 | ||
36 | while (1) { | 42 | while (1) { |
@@ -74,8 +80,10 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, | |||
74 | unsigned long flags; | 80 | unsigned long flags; |
75 | u32 base; | 81 | u32 base; |
76 | 82 | ||
77 | if (!value || (bus > 255) || (devfn > 255) || (reg > 4095)) | 83 | if ((bus > 255) || (devfn > 255) || (reg > 4095)) { |
84 | *value = -1; | ||
78 | return -EINVAL; | 85 | return -EINVAL; |
86 | } | ||
79 | 87 | ||
80 | base = get_base_addr(seg, bus, devfn); | 88 | base = get_base_addr(seg, bus, devfn); |
81 | if (!base) | 89 | if (!base) |
@@ -146,29 +154,34 @@ static struct pci_raw_ops pci_mmcfg = { | |||
146 | Normally this can be expressed in the MCFG by not listing them | 154 | Normally this can be expressed in the MCFG by not listing them |
147 | and assigning suitable _SEGs, but this isn't implemented in some BIOS. | 155 | and assigning suitable _SEGs, but this isn't implemented in some BIOS. |
148 | Instead try to discover all devices on bus 0 that are unreachable using MM | 156 | Instead try to discover all devices on bus 0 that are unreachable using MM |
149 | and fallback for them. | 157 | and fallback for them. */ |
150 | We only do this for bus 0/seg 0 */ | ||
151 | static __init void unreachable_devices(void) | 158 | static __init void unreachable_devices(void) |
152 | { | 159 | { |
153 | int i; | 160 | int i, k; |
154 | unsigned long flags; | 161 | unsigned long flags; |
155 | 162 | ||
156 | for (i = 0; i < 32; i++) { | 163 | for (k = 0; k < MAX_CHECK_BUS; k++) { |
157 | u32 val1; | 164 | for (i = 0; i < 32; i++) { |
158 | u32 addr; | 165 | u32 val1; |
159 | 166 | u32 addr; | |
160 | pci_conf1_read(0, 0, PCI_DEVFN(i, 0), 0, 4, &val1); | 167 | |
161 | if (val1 == 0xffffffff) | 168 | pci_conf1_read(0, k, PCI_DEVFN(i, 0), 0, 4, &val1); |
162 | continue; | 169 | if (val1 == 0xffffffff) |
163 | 170 | continue; | |
164 | /* Locking probably not needed, but safer */ | 171 | |
165 | spin_lock_irqsave(&pci_config_lock, flags); | 172 | /* Locking probably not needed, but safer */ |
166 | addr = get_base_addr(0, 0, PCI_DEVFN(i, 0)); | 173 | spin_lock_irqsave(&pci_config_lock, flags); |
167 | if (addr != 0) | 174 | addr = get_base_addr(0, k, PCI_DEVFN(i, 0)); |
168 | pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0)); | 175 | if (addr != 0) |
169 | if (addr == 0 || readl((u32 __iomem *)mmcfg_virt_addr) != val1) | 176 | pci_exp_set_dev_base(addr, k, PCI_DEVFN(i, 0)); |
170 | set_bit(i, fallback_slots); | 177 | if (addr == 0 || |
171 | spin_unlock_irqrestore(&pci_config_lock, flags); | 178 | readl((u32 __iomem *)mmcfg_virt_addr) != val1) { |
179 | set_bit(i, fallback_slots); | ||
180 | printk(KERN_NOTICE | ||
181 | "PCI: No mmconfig possible on %x:%x\n", k, i); | ||
182 | } | ||
183 | spin_unlock_irqrestore(&pci_config_lock, flags); | ||
184 | } | ||
172 | } | 185 | } |
173 | } | 186 | } |
174 | 187 | ||
@@ -183,6 +196,14 @@ void __init pci_mmcfg_init(void) | |||
183 | (pci_mmcfg_config[0].base_address == 0)) | 196 | (pci_mmcfg_config[0].base_address == 0)) |
184 | return; | 197 | return; |
185 | 198 | ||
199 | if (!e820_all_mapped(pci_mmcfg_config[0].base_address, | ||
200 | pci_mmcfg_config[0].base_address + MMCONFIG_APER_SIZE, | ||
201 | E820_RESERVED)) { | ||
202 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area is not E820-reserved\n"); | ||
203 | printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); | ||
204 | return; | ||
205 | } | ||
206 | |||
186 | printk(KERN_INFO "PCI: Using MMCONFIG\n"); | 207 | printk(KERN_INFO "PCI: Using MMCONFIG\n"); |
187 | raw_pci_ops = &pci_mmcfg; | 208 | raw_pci_ops = &pci_mmcfg; |
188 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; | 209 | pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF; |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index edffe25a477a..9f40eeff0b5c 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -260,15 +260,6 @@ config NR_CPUS | |||
260 | than 64 will cause the use of a CPU mask array, causing a small | 260 | than 64 will cause the use of a CPU mask array, causing a small |
261 | performance hit. | 261 | performance hit. |
262 | 262 | ||
263 | config IA64_NR_NODES | ||
264 | int "Maximum number of NODEs (256-1024)" if (IA64_SGI_SN2 || IA64_GENERIC) | ||
265 | range 256 1024 | ||
266 | depends on IA64_SGI_SN2 || IA64_GENERIC | ||
267 | default "256" | ||
268 | help | ||
269 | This option specifies the maximum number of nodes in your SSI system. | ||
270 | If in doubt, use the default. | ||
271 | |||
272 | config HOTPLUG_CPU | 263 | config HOTPLUG_CPU |
273 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" | 264 | bool "Support for hot-pluggable CPUs (EXPERIMENTAL)" |
274 | depends on SMP && EXPERIMENTAL | 265 | depends on SMP && EXPERIMENTAL |
@@ -352,6 +343,16 @@ config NUMA | |||
352 | Access). This option is for configuring high-end multiprocessor | 343 | Access). This option is for configuring high-end multiprocessor |
353 | server systems. If in doubt, say N. | 344 | server systems. If in doubt, say N. |
354 | 345 | ||
346 | config NODES_SHIFT | ||
347 | int "Max num nodes shift(3-10)" | ||
348 | range 3 10 | ||
349 | default "8" | ||
350 | depends on NEED_MULTIPLE_NODES | ||
351 | help | ||
352 | This option specifies the maximum number of nodes in your SSI system. | ||
353 | MAX_NUMNODES will be 2^(This value). | ||
354 | If in doubt, use the default. | ||
355 | |||
355 | # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. | 356 | # VIRTUAL_MEM_MAP and FLAT_NODE_MEM_MAP are functionally equivalent. |
356 | # VIRTUAL_MEM_MAP has been retained for historical reasons. | 357 | # VIRTUAL_MEM_MAP has been retained for historical reasons. |
357 | config VIRTUAL_MEM_MAP | 358 | config VIRTUAL_MEM_MAP |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index 05c864c6c2d9..41fd490af3b4 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
@@ -285,6 +285,11 @@ config NUMA | |||
285 | depends on SMP && BROKEN | 285 | depends on SMP && BROKEN |
286 | default n | 286 | default n |
287 | 287 | ||
288 | config NODES_SHIFT | ||
289 | int | ||
290 | default "1" | ||
291 | depends on NEED_MULTIPLE_NODES | ||
292 | |||
288 | # turning this on wastes a bunch of space. | 293 | # turning this on wastes a bunch of space. |
289 | # Summit needs it only when NUMA is on | 294 | # Summit needs it only when NUMA is on |
290 | config BOOT_IOREMAP | 295 | config BOOT_IOREMAP |
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c index be8b711367ec..c50330fa83b9 100644 --- a/arch/m32r/kernel/m32r_ksyms.c +++ b/arch/m32r/kernel/m32r_ksyms.c | |||
@@ -23,9 +23,6 @@ EXPORT_SYMBOL(boot_cpu_data); | |||
23 | EXPORT_SYMBOL(dump_fpu); | 23 | EXPORT_SYMBOL(dump_fpu); |
24 | EXPORT_SYMBOL(__ioremap); | 24 | EXPORT_SYMBOL(__ioremap); |
25 | EXPORT_SYMBOL(iounmap); | 25 | EXPORT_SYMBOL(iounmap); |
26 | EXPORT_SYMBOL(enable_irq); | ||
27 | EXPORT_SYMBOL(disable_irq); | ||
28 | EXPORT_SYMBOL(disable_irq_nosync); | ||
29 | EXPORT_SYMBOL(kernel_thread); | 26 | EXPORT_SYMBOL(kernel_thread); |
30 | EXPORT_SYMBOL(__down); | 27 | EXPORT_SYMBOL(__down); |
31 | EXPORT_SYMBOL(__down_interruptible); | 28 | EXPORT_SYMBOL(__down_interruptible); |
@@ -38,13 +35,6 @@ EXPORT_SYMBOL(__udelay); | |||
38 | EXPORT_SYMBOL(__delay); | 35 | EXPORT_SYMBOL(__delay); |
39 | EXPORT_SYMBOL(__const_udelay); | 36 | EXPORT_SYMBOL(__const_udelay); |
40 | 37 | ||
41 | EXPORT_SYMBOL(__get_user_1); | ||
42 | EXPORT_SYMBOL(__get_user_2); | ||
43 | EXPORT_SYMBOL(__get_user_4); | ||
44 | |||
45 | EXPORT_SYMBOL(strpbrk); | ||
46 | EXPORT_SYMBOL(strstr); | ||
47 | |||
48 | EXPORT_SYMBOL(strncpy_from_user); | 38 | EXPORT_SYMBOL(strncpy_from_user); |
49 | EXPORT_SYMBOL(__strncpy_from_user); | 39 | EXPORT_SYMBOL(__strncpy_from_user); |
50 | EXPORT_SYMBOL(clear_user); | 40 | EXPORT_SYMBOL(clear_user); |
@@ -59,11 +49,8 @@ extern void *dcache_dummy; | |||
59 | EXPORT_SYMBOL(dcache_dummy); | 49 | EXPORT_SYMBOL(dcache_dummy); |
60 | #endif | 50 | #endif |
61 | EXPORT_SYMBOL(cpu_data); | 51 | EXPORT_SYMBOL(cpu_data); |
62 | EXPORT_SYMBOL(cpu_online_map); | ||
63 | EXPORT_SYMBOL(cpu_callout_map); | ||
64 | 52 | ||
65 | /* Global SMP stuff */ | 53 | /* Global SMP stuff */ |
66 | EXPORT_SYMBOL(synchronize_irq); | ||
67 | EXPORT_SYMBOL(smp_call_function); | 54 | EXPORT_SYMBOL(smp_call_function); |
68 | 55 | ||
69 | /* TLB flushing */ | 56 | /* TLB flushing */ |
@@ -83,27 +70,11 @@ EXPORT_SYMBOL(__lshrdi3); | |||
83 | EXPORT_SYMBOL(__muldi3); | 70 | EXPORT_SYMBOL(__muldi3); |
84 | 71 | ||
85 | /* memory and string operations */ | 72 | /* memory and string operations */ |
86 | EXPORT_SYMBOL(memchr); | ||
87 | EXPORT_SYMBOL(memcpy); | 73 | EXPORT_SYMBOL(memcpy); |
88 | /* EXPORT_SYMBOL(memcpy_fromio); // not implement yet */ | ||
89 | /* EXPORT_SYMBOL(memcpy_toio); // not implement yet */ | ||
90 | EXPORT_SYMBOL(memset); | 74 | EXPORT_SYMBOL(memset); |
91 | /* EXPORT_SYMBOL(memset_io); // not implement yet */ | ||
92 | EXPORT_SYMBOL(memmove); | ||
93 | EXPORT_SYMBOL(memcmp); | ||
94 | EXPORT_SYMBOL(memscan); | ||
95 | EXPORT_SYMBOL(copy_page); | 75 | EXPORT_SYMBOL(copy_page); |
96 | EXPORT_SYMBOL(clear_page); | 76 | EXPORT_SYMBOL(clear_page); |
97 | |||
98 | EXPORT_SYMBOL(strcat); | ||
99 | EXPORT_SYMBOL(strchr); | ||
100 | EXPORT_SYMBOL(strcmp); | ||
101 | EXPORT_SYMBOL(strcpy); | ||
102 | EXPORT_SYMBOL(strlen); | 77 | EXPORT_SYMBOL(strlen); |
103 | EXPORT_SYMBOL(strncat); | ||
104 | EXPORT_SYMBOL(strncmp); | ||
105 | EXPORT_SYMBOL(strnlen); | ||
106 | EXPORT_SYMBOL(strncpy); | ||
107 | 78 | ||
108 | EXPORT_SYMBOL(_inb); | 79 | EXPORT_SYMBOL(_inb); |
109 | EXPORT_SYMBOL(_inw); | 80 | EXPORT_SYMBOL(_inw); |
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c index 0d78942b4c76..3cd3c2988a48 100644 --- a/arch/m32r/kernel/setup.c +++ b/arch/m32r/kernel/setup.c | |||
@@ -9,6 +9,7 @@ | |||
9 | 9 | ||
10 | #include <linux/config.h> | 10 | #include <linux/config.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/kernel.h> | ||
12 | #include <linux/stddef.h> | 13 | #include <linux/stddef.h> |
13 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
14 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
@@ -219,8 +220,6 @@ static unsigned long __init setup_memory(void) | |||
219 | extern unsigned long setup_memory(void); | 220 | extern unsigned long setup_memory(void); |
220 | #endif /* CONFIG_DISCONTIGMEM */ | 221 | #endif /* CONFIG_DISCONTIGMEM */ |
221 | 222 | ||
222 | #define M32R_PCC_PCATCR 0x00ef7014 /* will move to m32r.h */ | ||
223 | |||
224 | void __init setup_arch(char **cmdline_p) | 223 | void __init setup_arch(char **cmdline_p) |
225 | { | 224 | { |
226 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 225 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); |
@@ -269,15 +268,14 @@ void __init setup_arch(char **cmdline_p) | |||
269 | paging_init(); | 268 | paging_init(); |
270 | } | 269 | } |
271 | 270 | ||
272 | static struct cpu cpu[NR_CPUS]; | 271 | static struct cpu cpu_devices[NR_CPUS]; |
273 | 272 | ||
274 | static int __init topology_init(void) | 273 | static int __init topology_init(void) |
275 | { | 274 | { |
276 | int cpu_id; | 275 | int i; |
277 | 276 | ||
278 | for (cpu_id = 0; cpu_id < NR_CPUS; cpu_id++) | 277 | for_each_present_cpu(i) |
279 | if (cpu_possible(cpu_id)) | 278 | register_cpu(&cpu_devices[i], i, NULL); |
280 | register_cpu(&cpu[cpu_id], cpu_id, NULL); | ||
281 | 279 | ||
282 | return 0; | 280 | return 0; |
283 | } | 281 | } |
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c index d7ec16e7fb25..840b4348bf0c 100644 --- a/arch/m32r/kernel/smpboot.c +++ b/arch/m32r/kernel/smpboot.c | |||
@@ -39,8 +39,10 @@ | |||
39 | * Martin J. Bligh : Added support for multi-quad systems | 39 | * Martin J. Bligh : Added support for multi-quad systems |
40 | */ | 40 | */ |
41 | 41 | ||
42 | #include <linux/module.h> | ||
42 | #include <linux/config.h> | 43 | #include <linux/config.h> |
43 | #include <linux/init.h> | 44 | #include <linux/init.h> |
45 | #include <linux/kernel.h> | ||
44 | #include <linux/mm.h> | 46 | #include <linux/mm.h> |
45 | #include <linux/smp_lock.h> | 47 | #include <linux/smp_lock.h> |
46 | #include <linux/irq.h> | 48 | #include <linux/irq.h> |
@@ -72,11 +74,15 @@ physid_mask_t phys_cpu_present_map; | |||
72 | 74 | ||
73 | /* Bitmask of currently online CPUs */ | 75 | /* Bitmask of currently online CPUs */ |
74 | cpumask_t cpu_online_map; | 76 | cpumask_t cpu_online_map; |
77 | EXPORT_SYMBOL(cpu_online_map); | ||
75 | 78 | ||
76 | cpumask_t cpu_bootout_map; | 79 | cpumask_t cpu_bootout_map; |
77 | cpumask_t cpu_bootin_map; | 80 | cpumask_t cpu_bootin_map; |
78 | cpumask_t cpu_callout_map; | ||
79 | static cpumask_t cpu_callin_map; | 81 | static cpumask_t cpu_callin_map; |
82 | cpumask_t cpu_callout_map; | ||
83 | EXPORT_SYMBOL(cpu_callout_map); | ||
84 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | ||
85 | EXPORT_SYMBOL(cpu_possible_map); | ||
80 | 86 | ||
81 | /* Per CPU bogomips and other parameters */ | 87 | /* Per CPU bogomips and other parameters */ |
82 | struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned; | 88 | struct cpuinfo_m32r cpu_data[NR_CPUS] __cacheline_aligned; |
@@ -110,7 +116,6 @@ static unsigned int calibration_result; | |||
110 | 116 | ||
111 | void smp_prepare_boot_cpu(void); | 117 | void smp_prepare_boot_cpu(void); |
112 | void smp_prepare_cpus(unsigned int); | 118 | void smp_prepare_cpus(unsigned int); |
113 | static void smp_tune_scheduling(void); | ||
114 | static void init_ipi_lock(void); | 119 | static void init_ipi_lock(void); |
115 | static void do_boot_cpu(int); | 120 | static void do_boot_cpu(int); |
116 | int __cpu_up(unsigned int); | 121 | int __cpu_up(unsigned int); |
@@ -177,6 +182,9 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
177 | } | 182 | } |
178 | for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) | 183 | for (phys_id = 0 ; phys_id < nr_cpu ; phys_id++) |
179 | physid_set(phys_id, phys_cpu_present_map); | 184 | physid_set(phys_id, phys_cpu_present_map); |
185 | #ifndef CONFIG_HOTPLUG_CPU | ||
186 | cpu_present_map = cpu_possible_map; | ||
187 | #endif | ||
180 | 188 | ||
181 | show_mp_info(nr_cpu); | 189 | show_mp_info(nr_cpu); |
182 | 190 | ||
@@ -186,7 +194,6 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
186 | * Setup boot CPU information | 194 | * Setup boot CPU information |
187 | */ | 195 | */ |
188 | smp_store_cpu_info(0); /* Final full version of the data */ | 196 | smp_store_cpu_info(0); /* Final full version of the data */ |
189 | smp_tune_scheduling(); | ||
190 | 197 | ||
191 | /* | 198 | /* |
192 | * If SMP should be disabled, then really disable it! | 199 | * If SMP should be disabled, then really disable it! |
@@ -230,11 +237,6 @@ smp_done: | |||
230 | Dprintk("Boot done.\n"); | 237 | Dprintk("Boot done.\n"); |
231 | } | 238 | } |
232 | 239 | ||
233 | static void __init smp_tune_scheduling(void) | ||
234 | { | ||
235 | /* Nothing to do. */ | ||
236 | } | ||
237 | |||
238 | /* | 240 | /* |
239 | * init_ipi_lock : Initialize IPI locks. | 241 | * init_ipi_lock : Initialize IPI locks. |
240 | */ | 242 | */ |
@@ -629,4 +631,3 @@ static void __init unmap_cpu_to_physid(int cpu_id, int phys_id) | |||
629 | physid_2_cpu[phys_id] = -1; | 631 | physid_2_cpu[phys_id] = -1; |
630 | cpu_2_physid[cpu_id] = -1; | 632 | cpu_2_physid[cpu_id] = -1; |
631 | } | 633 | } |
632 | |||
diff --git a/arch/m32r/lib/Makefile b/arch/m32r/lib/Makefile index e632d10c7d78..d16b4e40d1ae 100644 --- a/arch/m32r/lib/Makefile +++ b/arch/m32r/lib/Makefile | |||
@@ -2,6 +2,6 @@ | |||
2 | # Makefile for M32R-specific library files.. | 2 | # Makefile for M32R-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y := checksum.o ashxdi3.o memset.o memcpy.o getuser.o \ | 5 | lib-y := checksum.o ashxdi3.o memset.o memcpy.o \ |
6 | putuser.o delay.o strlen.o usercopy.o csum_partial_copy.o | 6 | delay.o strlen.o usercopy.o csum_partial_copy.o |
7 | 7 | ||
diff --git a/arch/m32r/lib/getuser.S b/arch/m32r/lib/getuser.S deleted file mode 100644 index 58a0db055c5c..000000000000 --- a/arch/m32r/lib/getuser.S +++ /dev/null | |||
@@ -1,88 +0,0 @@ | |||
1 | /* | ||
2 | * __get_user functions. | ||
3 | * | ||
4 | * (C) Copyright 2001 Hirokazu Takata | ||
5 | * | ||
6 | * These functions have a non-standard call interface | ||
7 | * to make them more efficient, especially as they | ||
8 | * return an error value in addition to the "real" | ||
9 | * return value. | ||
10 | */ | ||
11 | |||
12 | #include <linux/config.h> | ||
13 | |||
14 | /* | ||
15 | * __get_user_X | ||
16 | * | ||
17 | * Inputs: r0 contains the address | ||
18 | * | ||
19 | * Outputs: r0 is error code (0 or -EFAULT) | ||
20 | * r1 contains zero-extended value | ||
21 | * | ||
22 | * These functions should not modify any other registers, | ||
23 | * as they get called from within inline assembly. | ||
24 | */ | ||
25 | |||
26 | #ifdef CONFIG_ISA_DUAL_ISSUE | ||
27 | |||
28 | .text | ||
29 | .balign 4 | ||
30 | .globl __get_user_1 | ||
31 | __get_user_1: | ||
32 | 1: ldub r1, @r0 || ldi r0, #0 | ||
33 | jmp r14 | ||
34 | |||
35 | .balign 4 | ||
36 | .globl __get_user_2 | ||
37 | __get_user_2: | ||
38 | 2: lduh r1, @r0 || ldi r0, #0 | ||
39 | jmp r14 | ||
40 | |||
41 | .balign 4 | ||
42 | .globl __get_user_4 | ||
43 | __get_user_4: | ||
44 | 3: ld r1, @r0 || ldi r0, #0 | ||
45 | jmp r14 | ||
46 | |||
47 | bad_get_user: | ||
48 | ldi r1, #0 || ldi r0, #-14 | ||
49 | jmp r14 | ||
50 | |||
51 | #else /* not CONFIG_ISA_DUAL_ISSUE */ | ||
52 | |||
53 | .text | ||
54 | .balign 4 | ||
55 | .globl __get_user_1 | ||
56 | __get_user_1: | ||
57 | 1: ldub r1, @r0 | ||
58 | ldi r0, #0 | ||
59 | jmp r14 | ||
60 | |||
61 | .balign 4 | ||
62 | .globl __get_user_2 | ||
63 | __get_user_2: | ||
64 | 2: lduh r1, @r0 | ||
65 | ldi r0, #0 | ||
66 | jmp r14 | ||
67 | |||
68 | .balign 4 | ||
69 | .globl __get_user_4 | ||
70 | __get_user_4: | ||
71 | 3: ld r1, @r0 | ||
72 | ldi r0, #0 | ||
73 | jmp r14 | ||
74 | |||
75 | bad_get_user: | ||
76 | ldi r1, #0 | ||
77 | ldi r0, #-14 | ||
78 | jmp r14 | ||
79 | |||
80 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ | ||
81 | |||
82 | .section __ex_table,"a" | ||
83 | .long 1b,bad_get_user | ||
84 | .long 2b,bad_get_user | ||
85 | .long 3b,bad_get_user | ||
86 | .previous | ||
87 | |||
88 | .end | ||
diff --git a/arch/m32r/lib/putuser.S b/arch/m32r/lib/putuser.S deleted file mode 100644 index 218154cc3890..000000000000 --- a/arch/m32r/lib/putuser.S +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | /* | ||
2 | * __put_user functions. | ||
3 | * | ||
4 | * (C) Copyright 1998 Linus Torvalds | ||
5 | * (C) Copyright 2001 Hirokazu Takata | ||
6 | * | ||
7 | * These functions have a non-standard call interface | ||
8 | * to make them more efficient. | ||
9 | */ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | |||
13 | /* | ||
14 | * __put_user_X | ||
15 | * | ||
16 | * Inputs: r0 contains the address | ||
17 | * r1 contains the value | ||
18 | * | ||
19 | * Outputs: r0 is error code (0 or -EFAULT) | ||
20 | * r1 is corrupted (will contain "current_task"). | ||
21 | * | ||
22 | * These functions should not modify any other registers, | ||
23 | * as they get called from within inline assembly. | ||
24 | */ | ||
25 | |||
26 | #ifdef CONFIG_ISA_DUAL_ISSUE | ||
27 | |||
28 | .text | ||
29 | .balign 4 | ||
30 | .globl __put_user_1 | ||
31 | __put_user_1: | ||
32 | 1: stb r1, @r0 || ldi r0, #0 | ||
33 | jmp r14 | ||
34 | |||
35 | .balign 4 | ||
36 | .globl __put_user_2 | ||
37 | __put_user_2: | ||
38 | 2: sth r1, @r0 || ldi r0, #0 | ||
39 | jmp r14 | ||
40 | |||
41 | .balign 4 | ||
42 | .globl __put_user_4 | ||
43 | __put_user_4: | ||
44 | 3: st r1, @r0 || ldi r0, #0 | ||
45 | jmp r14 | ||
46 | |||
47 | bad_put_user: | ||
48 | ldi r0, #-14 || jmp r14 | ||
49 | |||
50 | #else /* not CONFIG_ISA_DUAL_ISSUE */ | ||
51 | |||
52 | .text | ||
53 | .balign 4 | ||
54 | .globl __put_user_1 | ||
55 | __put_user_1: | ||
56 | 1: stb r1, @r0 | ||
57 | ldi r0, #0 | ||
58 | jmp r14 | ||
59 | |||
60 | .balign 4 | ||
61 | .globl __put_user_2 | ||
62 | __put_user_2: | ||
63 | 2: sth r1, @r0 | ||
64 | ldi r0, #0 | ||
65 | jmp r14 | ||
66 | |||
67 | .balign 4 | ||
68 | .globl __put_user_4 | ||
69 | __put_user_4: | ||
70 | 3: st r1, @r0 | ||
71 | ldi r0, #0 | ||
72 | jmp r14 | ||
73 | |||
74 | bad_put_user: | ||
75 | ldi r0, #-14 | ||
76 | jmp r14 | ||
77 | |||
78 | #endif /* not CONFIG_ISA_DUAL_ISSUE */ | ||
79 | |||
80 | .section __ex_table,"a" | ||
81 | .long 1b,bad_put_user | ||
82 | .long 2b,bad_put_user | ||
83 | .long 3b,bad_put_user | ||
84 | .previous | ||
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index c3319514a85e..5b7952ea2bae 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c | |||
@@ -57,7 +57,6 @@ EXPORT_SYMBOL(dump_thread); | |||
57 | EXPORT_SYMBOL(strnlen); | 57 | EXPORT_SYMBOL(strnlen); |
58 | EXPORT_SYMBOL(strrchr); | 58 | EXPORT_SYMBOL(strrchr); |
59 | EXPORT_SYMBOL(strstr); | 59 | EXPORT_SYMBOL(strstr); |
60 | EXPORT_SYMBOL(strpbrk); | ||
61 | EXPORT_SYMBOL(enable_irq); | 60 | EXPORT_SYMBOL(enable_irq); |
62 | EXPORT_SYMBOL(disable_irq); | 61 | EXPORT_SYMBOL(disable_irq); |
63 | EXPORT_SYMBOL(kernel_thread); | 62 | EXPORT_SYMBOL(kernel_thread); |
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c index f9b4ea16c099..4320d5dcc9cb 100644 --- a/arch/m68knommu/kernel/m68k_ksyms.c +++ b/arch/m68knommu/kernel/m68k_ksyms.c | |||
@@ -26,7 +26,6 @@ EXPORT_SYMBOL(__ioremap); | |||
26 | EXPORT_SYMBOL(iounmap); | 26 | EXPORT_SYMBOL(iounmap); |
27 | EXPORT_SYMBOL(dump_fpu); | 27 | EXPORT_SYMBOL(dump_fpu); |
28 | EXPORT_SYMBOL(strnlen); | 28 | EXPORT_SYMBOL(strnlen); |
29 | EXPORT_SYMBOL(strpbrk); | ||
30 | EXPORT_SYMBOL(strrchr); | 29 | EXPORT_SYMBOL(strrchr); |
31 | EXPORT_SYMBOL(strstr); | 30 | EXPORT_SYMBOL(strstr); |
32 | EXPORT_SYMBOL(strchr); | 31 | EXPORT_SYMBOL(strchr); |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e15709ce8866..7aec60d40420 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1590,6 +1590,11 @@ config ARCH_FLATMEM_ENABLE | |||
1590 | def_bool y | 1590 | def_bool y |
1591 | depends on !NUMA | 1591 | depends on !NUMA |
1592 | 1592 | ||
1593 | config NODES_SHIFT | ||
1594 | int | ||
1595 | default "6" | ||
1596 | depends on NEED_MULTIPLE_NODES | ||
1597 | |||
1593 | source "mm/Kconfig" | 1598 | source "mm/Kconfig" |
1594 | 1599 | ||
1595 | config SMP | 1600 | config SMP |
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index 86e42c633f73..e042f9d2ba31 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c | |||
@@ -39,7 +39,6 @@ EXPORT_SYMBOL(strchr); | |||
39 | EXPORT_SYMBOL(strncmp); | 39 | EXPORT_SYMBOL(strncmp); |
40 | #endif | 40 | #endif |
41 | EXPORT_SYMBOL(strlen); | 41 | EXPORT_SYMBOL(strlen); |
42 | EXPORT_SYMBOL(strpbrk); | ||
43 | EXPORT_SYMBOL(strncat); | 42 | EXPORT_SYMBOL(strncat); |
44 | EXPORT_SYMBOL(strnlen); | 43 | EXPORT_SYMBOL(strnlen); |
45 | EXPORT_SYMBOL(strrchr); | 44 | EXPORT_SYMBOL(strrchr); |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 2fdf21989dc2..19f911c5dd58 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
@@ -177,6 +177,11 @@ config ARCH_DISCONTIGMEM_DEFAULT | |||
177 | def_bool y | 177 | def_bool y |
178 | depends on ARCH_DISCONTIGMEM_ENABLE | 178 | depends on ARCH_DISCONTIGMEM_ENABLE |
179 | 179 | ||
180 | config NODES_SHIFT | ||
181 | int | ||
182 | default "3" | ||
183 | depends on NEED_MULTIPLE_NODES | ||
184 | |||
180 | source "kernel/Kconfig.preempt" | 185 | source "kernel/Kconfig.preempt" |
181 | source "kernel/Kconfig.hz" | 186 | source "kernel/Kconfig.hz" |
182 | source "mm/Kconfig" | 187 | source "mm/Kconfig" |
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index 47ca5c0a323b..fc107add627c 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c | |||
@@ -31,7 +31,6 @@ | |||
31 | 31 | ||
32 | #include <linux/string.h> | 32 | #include <linux/string.h> |
33 | EXPORT_SYMBOL(memset); | 33 | EXPORT_SYMBOL(memset); |
34 | EXPORT_SYMBOL(strpbrk); | ||
35 | 34 | ||
36 | #include <asm/atomic.h> | 35 | #include <asm/atomic.h> |
37 | EXPORT_SYMBOL(__xchg8); | 36 | EXPORT_SYMBOL(__xchg8); |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2cdc35ce8045..167e70e95556 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -649,6 +649,11 @@ config NUMA | |||
649 | depends on PPC64 | 649 | depends on PPC64 |
650 | default y if SMP && PPC_PSERIES | 650 | default y if SMP && PPC_PSERIES |
651 | 651 | ||
652 | config NODES_SHIFT | ||
653 | int | ||
654 | default "4" | ||
655 | depends on NEED_MULTIPLE_NODES | ||
656 | |||
652 | config ARCH_SELECT_MEMORY_MODEL | 657 | config ARCH_SELECT_MEMORY_MODEL |
653 | def_bool y | 658 | def_bool y |
654 | depends on PPC64 | 659 | depends on PPC64 |
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index 6c6b197898d0..7bb16fb97d4f 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile | |||
@@ -67,7 +67,6 @@ cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE) | |||
67 | endif | 67 | endif |
68 | 68 | ||
69 | CFLAGS += -mbackchain -msoft-float $(cflags-y) | 69 | CFLAGS += -mbackchain -msoft-float $(cflags-y) |
70 | CFLAGS += $(call cc-option,-finline-limit=10000) | ||
71 | CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare | 70 | CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare |
72 | AFLAGS += $(aflags-y) | 71 | AFLAGS += $(aflags-y) |
73 | 72 | ||
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index f8d0cd540a06..f4dfc10026d2 100644 --- a/arch/s390/defconfig +++ b/arch/s390/defconfig | |||
@@ -1,10 +1,11 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-rc2 | 3 | # Linux kernel version: 2.6.17-rc1 |
4 | # Wed Feb 8 10:44:39 2006 | 4 | # Mon Apr 3 14:34:15 2006 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 7 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
8 | CONFIG_GENERIC_HWEIGHT=y | ||
8 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 9 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
9 | CONFIG_S390=y | 10 | CONFIG_S390=y |
10 | 11 | ||
@@ -30,8 +31,8 @@ CONFIG_AUDIT=y | |||
30 | CONFIG_IKCONFIG=y | 31 | CONFIG_IKCONFIG=y |
31 | CONFIG_IKCONFIG_PROC=y | 32 | CONFIG_IKCONFIG_PROC=y |
32 | # CONFIG_CPUSETS is not set | 33 | # CONFIG_CPUSETS is not set |
34 | # CONFIG_RELAY is not set | ||
33 | CONFIG_INITRAMFS_SOURCE="" | 35 | CONFIG_INITRAMFS_SOURCE="" |
34 | CONFIG_UID16=y | ||
35 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
36 | # CONFIG_EMBEDDED is not set | 37 | # CONFIG_EMBEDDED is not set |
37 | CONFIG_KALLSYMS=y | 38 | CONFIG_KALLSYMS=y |
@@ -45,10 +46,6 @@ CONFIG_BASE_FULL=y | |||
45 | CONFIG_FUTEX=y | 46 | CONFIG_FUTEX=y |
46 | CONFIG_EPOLL=y | 47 | CONFIG_EPOLL=y |
47 | CONFIG_SHMEM=y | 48 | CONFIG_SHMEM=y |
48 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
49 | CONFIG_CC_ALIGN_LABELS=0 | ||
50 | CONFIG_CC_ALIGN_LOOPS=0 | ||
51 | CONFIG_CC_ALIGN_JUMPS=0 | ||
52 | CONFIG_SLAB=y | 49 | CONFIG_SLAB=y |
53 | # CONFIG_TINY_SHMEM is not set | 50 | # CONFIG_TINY_SHMEM is not set |
54 | CONFIG_BASE_SMALL=0 | 51 | CONFIG_BASE_SMALL=0 |
@@ -60,7 +57,6 @@ CONFIG_BASE_SMALL=0 | |||
60 | CONFIG_MODULES=y | 57 | CONFIG_MODULES=y |
61 | CONFIG_MODULE_UNLOAD=y | 58 | CONFIG_MODULE_UNLOAD=y |
62 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 59 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
63 | CONFIG_OBSOLETE_MODPARM=y | ||
64 | CONFIG_MODVERSIONS=y | 60 | CONFIG_MODVERSIONS=y |
65 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 61 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
66 | CONFIG_KMOD=y | 62 | CONFIG_KMOD=y |
@@ -69,7 +65,7 @@ CONFIG_STOP_MACHINE=y | |||
69 | # | 65 | # |
70 | # Block layer | 66 | # Block layer |
71 | # | 67 | # |
72 | # CONFIG_LBD is not set | 68 | # CONFIG_BLK_DEV_IO_TRACE is not set |
73 | 69 | ||
74 | # | 70 | # |
75 | # IO Schedulers | 71 | # IO Schedulers |
@@ -91,17 +87,20 @@ CONFIG_DEFAULT_IOSCHED="deadline" | |||
91 | # | 87 | # |
92 | # Processor type and features | 88 | # Processor type and features |
93 | # | 89 | # |
94 | # CONFIG_64BIT is not set | 90 | CONFIG_64BIT=y |
95 | CONFIG_SMP=y | 91 | CONFIG_SMP=y |
96 | CONFIG_NR_CPUS=32 | 92 | CONFIG_NR_CPUS=32 |
97 | CONFIG_HOTPLUG_CPU=y | 93 | CONFIG_HOTPLUG_CPU=y |
98 | CONFIG_MATHEMU=y | 94 | CONFIG_DEFAULT_MIGRATION_COST=1000000 |
95 | CONFIG_COMPAT=y | ||
96 | CONFIG_SYSVIPC_COMPAT=y | ||
97 | CONFIG_BINFMT_ELF32=y | ||
99 | 98 | ||
100 | # | 99 | # |
101 | # Code generation options | 100 | # Code generation options |
102 | # | 101 | # |
103 | CONFIG_MARCH_G5=y | 102 | # CONFIG_MARCH_G5 is not set |
104 | # CONFIG_MARCH_Z900 is not set | 103 | CONFIG_MARCH_Z900=y |
105 | # CONFIG_MARCH_Z990 is not set | 104 | # CONFIG_MARCH_Z990 is not set |
106 | CONFIG_PACK_STACK=y | 105 | CONFIG_PACK_STACK=y |
107 | # CONFIG_SMALL_STACK is not set | 106 | # CONFIG_SMALL_STACK is not set |
@@ -143,7 +142,7 @@ CONFIG_VIRT_CPU_ACCOUNTING=y | |||
143 | # CONFIG_APPLDATA_BASE is not set | 142 | # CONFIG_APPLDATA_BASE is not set |
144 | CONFIG_NO_IDLE_HZ=y | 143 | CONFIG_NO_IDLE_HZ=y |
145 | CONFIG_NO_IDLE_HZ_INIT=y | 144 | CONFIG_NO_IDLE_HZ_INIT=y |
146 | # CONFIG_KEXEC is not set | 145 | CONFIG_KEXEC=y |
147 | 146 | ||
148 | # | 147 | # |
149 | # Networking | 148 | # Networking |
@@ -173,6 +172,7 @@ CONFIG_IP_FIB_HASH=y | |||
173 | # CONFIG_INET_AH is not set | 172 | # CONFIG_INET_AH is not set |
174 | # CONFIG_INET_ESP is not set | 173 | # CONFIG_INET_ESP is not set |
175 | # CONFIG_INET_IPCOMP is not set | 174 | # CONFIG_INET_IPCOMP is not set |
175 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
176 | # CONFIG_INET_TUNNEL is not set | 176 | # CONFIG_INET_TUNNEL is not set |
177 | CONFIG_INET_DIAG=y | 177 | CONFIG_INET_DIAG=y |
178 | CONFIG_INET_TCP_DIAG=y | 178 | CONFIG_INET_TCP_DIAG=y |
@@ -180,9 +180,11 @@ CONFIG_INET_TCP_DIAG=y | |||
180 | CONFIG_TCP_CONG_BIC=y | 180 | CONFIG_TCP_CONG_BIC=y |
181 | CONFIG_IPV6=y | 181 | CONFIG_IPV6=y |
182 | # CONFIG_IPV6_PRIVACY is not set | 182 | # CONFIG_IPV6_PRIVACY is not set |
183 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
183 | # CONFIG_INET6_AH is not set | 184 | # CONFIG_INET6_AH is not set |
184 | # CONFIG_INET6_ESP is not set | 185 | # CONFIG_INET6_ESP is not set |
185 | # CONFIG_INET6_IPCOMP is not set | 186 | # CONFIG_INET6_IPCOMP is not set |
187 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
186 | # CONFIG_INET6_TUNNEL is not set | 188 | # CONFIG_INET6_TUNNEL is not set |
187 | # CONFIG_IPV6_TUNNEL is not set | 189 | # CONFIG_IPV6_TUNNEL is not set |
188 | # CONFIG_NETFILTER is not set | 190 | # CONFIG_NETFILTER is not set |
@@ -276,6 +278,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
276 | # CONFIG_DEBUG_DRIVER is not set | 278 | # CONFIG_DEBUG_DRIVER is not set |
277 | 279 | ||
278 | # | 280 | # |
281 | # Connector - unified userspace <-> kernelspace linker | ||
282 | # | ||
283 | # CONFIG_CONNECTOR is not set | ||
284 | |||
285 | # | ||
279 | # SCSI device support | 286 | # SCSI device support |
280 | # | 287 | # |
281 | # CONFIG_RAID_ATTRS is not set | 288 | # CONFIG_RAID_ATTRS is not set |
@@ -340,8 +347,7 @@ CONFIG_DASD_PROFILE=y | |||
340 | CONFIG_DASD_ECKD=y | 347 | CONFIG_DASD_ECKD=y |
341 | CONFIG_DASD_FBA=y | 348 | CONFIG_DASD_FBA=y |
342 | CONFIG_DASD_DIAG=y | 349 | CONFIG_DASD_DIAG=y |
343 | CONFIG_DASD_EER=m | 350 | CONFIG_DASD_EER=y |
344 | # CONFIG_DASD_CMB is not set | ||
345 | # CONFIG_ATA_OVER_ETH is not set | 351 | # CONFIG_ATA_OVER_ETH is not set |
346 | 352 | ||
347 | # | 353 | # |
@@ -354,6 +360,7 @@ CONFIG_MD_RAID0=m | |||
354 | CONFIG_MD_RAID1=m | 360 | CONFIG_MD_RAID1=m |
355 | # CONFIG_MD_RAID10 is not set | 361 | # CONFIG_MD_RAID10 is not set |
356 | CONFIG_MD_RAID5=m | 362 | CONFIG_MD_RAID5=m |
363 | # CONFIG_MD_RAID5_RESHAPE is not set | ||
357 | # CONFIG_MD_RAID6 is not set | 364 | # CONFIG_MD_RAID6 is not set |
358 | CONFIG_MD_MULTIPATH=m | 365 | CONFIG_MD_MULTIPATH=m |
359 | # CONFIG_MD_FAULTY is not set | 366 | # CONFIG_MD_FAULTY is not set |
@@ -404,6 +411,7 @@ CONFIG_S390_TAPE_BLOCK=y | |||
404 | # S/390 tape hardware support | 411 | # S/390 tape hardware support |
405 | # | 412 | # |
406 | CONFIG_S390_TAPE_34XX=m | 413 | CONFIG_S390_TAPE_34XX=m |
414 | # CONFIG_S390_TAPE_3590 is not set | ||
407 | # CONFIG_VMLOGRDR is not set | 415 | # CONFIG_VMLOGRDR is not set |
408 | # CONFIG_VMCP is not set | 416 | # CONFIG_VMCP is not set |
409 | # CONFIG_MONREADER is not set | 417 | # CONFIG_MONREADER is not set |
@@ -529,7 +537,6 @@ CONFIG_SYSFS=y | |||
529 | CONFIG_TMPFS=y | 537 | CONFIG_TMPFS=y |
530 | # CONFIG_HUGETLB_PAGE is not set | 538 | # CONFIG_HUGETLB_PAGE is not set |
531 | CONFIG_RAMFS=y | 539 | CONFIG_RAMFS=y |
532 | # CONFIG_RELAYFS_FS is not set | ||
533 | # CONFIG_CONFIGFS_FS is not set | 540 | # CONFIG_CONFIGFS_FS is not set |
534 | 541 | ||
535 | # | 542 | # |
@@ -619,14 +626,15 @@ CONFIG_LOG_BUF_SHIFT=17 | |||
619 | # CONFIG_DETECT_SOFTLOCKUP is not set | 626 | # CONFIG_DETECT_SOFTLOCKUP is not set |
620 | # CONFIG_SCHEDSTATS is not set | 627 | # CONFIG_SCHEDSTATS is not set |
621 | # CONFIG_DEBUG_SLAB is not set | 628 | # CONFIG_DEBUG_SLAB is not set |
622 | # CONFIG_DEBUG_PREEMPT is not set | 629 | CONFIG_DEBUG_PREEMPT=y |
623 | CONFIG_DEBUG_MUTEXES=y | 630 | CONFIG_DEBUG_MUTEXES=y |
624 | # CONFIG_DEBUG_SPINLOCK is not set | 631 | CONFIG_DEBUG_SPINLOCK=y |
625 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 632 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
626 | # CONFIG_DEBUG_KOBJECT is not set | 633 | # CONFIG_DEBUG_KOBJECT is not set |
627 | # CONFIG_DEBUG_INFO is not set | 634 | # CONFIG_DEBUG_INFO is not set |
628 | CONFIG_DEBUG_FS=y | 635 | CONFIG_DEBUG_FS=y |
629 | # CONFIG_DEBUG_VM is not set | 636 | # CONFIG_DEBUG_VM is not set |
637 | # CONFIG_UNWIND_INFO is not set | ||
630 | CONFIG_FORCED_INLINING=y | 638 | CONFIG_FORCED_INLINING=y |
631 | # CONFIG_RCU_TORTURE_TEST is not set | 639 | # CONFIG_RCU_TORTURE_TEST is not set |
632 | 640 | ||
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 58583f459471..2bcecf422573 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -527,6 +527,11 @@ config CPU_HAS_SR_RB | |||
527 | See <file:Documentation/sh/register-banks.txt> for further | 527 | See <file:Documentation/sh/register-banks.txt> for further |
528 | information on SR.RB and register banking in the kernel in general. | 528 | information on SR.RB and register banking in the kernel in general. |
529 | 529 | ||
530 | config NODES_SHIFT | ||
531 | int | ||
532 | default "1" | ||
533 | depends on NEED_MULTIPLE_NODES | ||
534 | |||
530 | endmenu | 535 | endmenu |
531 | 536 | ||
532 | menu "Boot options" | 537 | menu "Boot options" |
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c index 1cf94a618be3..d5d032533a8b 100644 --- a/arch/sh/kernel/sh_ksyms.c +++ b/arch/sh/kernel/sh_ksyms.c | |||
@@ -37,7 +37,6 @@ EXPORT_SYMBOL(disable_irq_nosync); | |||
37 | EXPORT_SYMBOL(irq_desc); | 37 | EXPORT_SYMBOL(irq_desc); |
38 | EXPORT_SYMBOL(no_irq_type); | 38 | EXPORT_SYMBOL(no_irq_type); |
39 | 39 | ||
40 | EXPORT_SYMBOL(strpbrk); | ||
41 | EXPORT_SYMBOL(strstr); | 40 | EXPORT_SYMBOL(strstr); |
42 | EXPORT_SYMBOL(strlen); | 41 | EXPORT_SYMBOL(strlen); |
43 | EXPORT_SYMBOL(strnlen); | 42 | EXPORT_SYMBOL(strnlen); |
diff --git a/arch/sh64/kernel/sh_ksyms.c b/arch/sh64/kernel/sh_ksyms.c index de29c45f23a7..6f3a1c946339 100644 --- a/arch/sh64/kernel/sh_ksyms.c +++ b/arch/sh64/kernel/sh_ksyms.c | |||
@@ -41,7 +41,6 @@ EXPORT_SYMBOL(kernel_thread); | |||
41 | /* Networking helper routines. */ | 41 | /* Networking helper routines. */ |
42 | EXPORT_SYMBOL(csum_partial_copy); | 42 | EXPORT_SYMBOL(csum_partial_copy); |
43 | 43 | ||
44 | EXPORT_SYMBOL(strpbrk); | ||
45 | EXPORT_SYMBOL(strstr); | 44 | EXPORT_SYMBOL(strstr); |
46 | 45 | ||
47 | #ifdef CONFIG_VT | 46 | #ifdef CONFIG_VT |
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 2be812115197..a93f5da6855d 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -244,7 +244,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
244 | return -EINVAL; | 244 | return -EINVAL; |
245 | 245 | ||
246 | spin_lock_irqsave(&prof_setup_lock, flags); | 246 | spin_lock_irqsave(&prof_setup_lock, flags); |
247 | for_each_cpu(i) { | 247 | for_each_possible_cpu(i) { |
248 | load_profile_irq(i, lvl14_resolution / multiplier); | 248 | load_profile_irq(i, lvl14_resolution / multiplier); |
249 | prof_multiplier(i) = multiplier; | 249 | prof_multiplier(i) = multiplier; |
250 | } | 250 | } |
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 2c21d7907635..ec1c9687d679 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -263,7 +263,6 @@ EXPORT_SYMBOL(strcmp); | |||
263 | EXPORT_SYMBOL(strncmp); | 263 | EXPORT_SYMBOL(strncmp); |
264 | EXPORT_SYMBOL(strchr); | 264 | EXPORT_SYMBOL(strchr); |
265 | EXPORT_SYMBOL(strrchr); | 265 | EXPORT_SYMBOL(strrchr); |
266 | EXPORT_SYMBOL(strpbrk); | ||
267 | EXPORT_SYMBOL(strstr); | 266 | EXPORT_SYMBOL(strstr); |
268 | EXPORT_SYMBOL(page_kernel); | 267 | EXPORT_SYMBOL(page_kernel); |
269 | 268 | ||
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index d1e2fc566486..648047a0bce3 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -194,6 +194,9 @@ endchoice | |||
194 | 194 | ||
195 | endmenu | 195 | endmenu |
196 | 196 | ||
197 | config ARCH_SELECT_MEMORY_MODEL | ||
198 | def_bool y | ||
199 | |||
197 | config ARCH_SPARSEMEM_ENABLE | 200 | config ARCH_SPARSEMEM_ENABLE |
198 | def_bool y | 201 | def_bool y |
199 | 202 | ||
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 30389085a359..1317380fa937 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16 | 3 | # Linux kernel version: 2.6.16 |
4 | # Fri Mar 31 01:40:57 2006 | 4 | # Sun Apr 2 19:31:04 2006 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
@@ -838,7 +838,6 @@ CONFIG_FB_TILEBLITTING=y | |||
838 | # CONFIG_FB_NVIDIA is not set | 838 | # CONFIG_FB_NVIDIA is not set |
839 | # CONFIG_FB_RIVA is not set | 839 | # CONFIG_FB_RIVA is not set |
840 | # CONFIG_FB_MATROX is not set | 840 | # CONFIG_FB_MATROX is not set |
841 | # CONFIG_FB_RADEON_OLD is not set | ||
842 | CONFIG_FB_RADEON=y | 841 | CONFIG_FB_RADEON=y |
843 | CONFIG_FB_RADEON_I2C=y | 842 | CONFIG_FB_RADEON_I2C=y |
844 | # CONFIG_FB_RADEON_DEBUG is not set | 843 | # CONFIG_FB_RADEON_DEBUG is not set |
@@ -924,6 +923,7 @@ CONFIG_SND_MTPAV=m | |||
924 | # PCI devices | 923 | # PCI devices |
925 | # | 924 | # |
926 | # CONFIG_SND_AD1889 is not set | 925 | # CONFIG_SND_AD1889 is not set |
926 | # CONFIG_SND_ALS300 is not set | ||
927 | CONFIG_SND_ALI5451=m | 927 | CONFIG_SND_ALI5451=m |
928 | # CONFIG_SND_ATIIXP is not set | 928 | # CONFIG_SND_ATIIXP is not set |
929 | # CONFIG_SND_ATIIXP_MODEM is not set | 929 | # CONFIG_SND_ATIIXP_MODEM is not set |
@@ -955,6 +955,7 @@ CONFIG_SND_ALI5451=m | |||
955 | # CONFIG_SND_MIXART is not set | 955 | # CONFIG_SND_MIXART is not set |
956 | # CONFIG_SND_NM256 is not set | 956 | # CONFIG_SND_NM256 is not set |
957 | # CONFIG_SND_PCXHR is not set | 957 | # CONFIG_SND_PCXHR is not set |
958 | # CONFIG_SND_RIPTIDE is not set | ||
958 | # CONFIG_SND_RME32 is not set | 959 | # CONFIG_SND_RME32 is not set |
959 | # CONFIG_SND_RME96 is not set | 960 | # CONFIG_SND_RME96 is not set |
960 | # CONFIG_SND_RME9652 is not set | 961 | # CONFIG_SND_RME9652 is not set |
@@ -1109,6 +1110,11 @@ CONFIG_USB_HIDDEV=y | |||
1109 | # CONFIG_MMC is not set | 1110 | # CONFIG_MMC is not set |
1110 | 1111 | ||
1111 | # | 1112 | # |
1113 | # LED devices | ||
1114 | # | ||
1115 | # CONFIG_NEW_LEDS is not set | ||
1116 | |||
1117 | # | ||
1112 | # InfiniBand support | 1118 | # InfiniBand support |
1113 | # | 1119 | # |
1114 | # CONFIG_INFINIBAND is not set | 1120 | # CONFIG_INFINIBAND is not set |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index 9372d4f376d5..9e94db2573a2 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -1092,7 +1092,7 @@ void sun4v_pci_init(int node, char *model_name) | |||
1092 | } | 1092 | } |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | for_each_cpu(i) { | 1095 | for_each_possible_cpu(i) { |
1096 | unsigned long page = get_zeroed_page(GFP_ATOMIC); | 1096 | unsigned long page = get_zeroed_page(GFP_ATOMIC); |
1097 | 1097 | ||
1098 | if (!page) | 1098 | if (!page) |
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index eb93e9c52846..49e6dedd027d 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -244,6 +244,13 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
244 | } | 244 | } |
245 | 245 | ||
246 | switch(request) { | 246 | switch(request) { |
247 | case PTRACE_PEEKUSR: | ||
248 | if (addr != 0) | ||
249 | pt_error_return(regs, EIO); | ||
250 | else | ||
251 | pt_succ_return(regs, 0); | ||
252 | goto out_tsk; | ||
253 | |||
247 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | 254 | case PTRACE_PEEKTEXT: /* read word at location addr. */ |
248 | case PTRACE_PEEKDATA: { | 255 | case PTRACE_PEEKDATA: { |
249 | unsigned long tmp64; | 256 | unsigned long tmp64; |
@@ -602,6 +609,22 @@ asmlinkage void do_ptrace(struct pt_regs *regs) | |||
602 | 609 | ||
603 | /* PTRACE_DUMPCORE unsupported... */ | 610 | /* PTRACE_DUMPCORE unsupported... */ |
604 | 611 | ||
612 | case PTRACE_GETEVENTMSG: { | ||
613 | int err; | ||
614 | |||
615 | if (test_thread_flag(TIF_32BIT)) | ||
616 | err = put_user(child->ptrace_message, | ||
617 | (unsigned int __user *) data); | ||
618 | else | ||
619 | err = put_user(child->ptrace_message, | ||
620 | (unsigned long __user *) data); | ||
621 | if (err) | ||
622 | pt_error_return(regs, -err); | ||
623 | else | ||
624 | pt_succ_return(regs, 0); | ||
625 | break; | ||
626 | } | ||
627 | |||
605 | default: { | 628 | default: { |
606 | int err = ptrace_request(child, request, addr, data); | 629 | int err = ptrace_request(child, request, addr, data); |
607 | if (err) | 630 | if (err) |
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 7d0e67c1ce50..005167f82419 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -535,7 +535,7 @@ static int __init topology_init(void) | |||
535 | while (!cpu_find_by_instance(ncpus_probed, NULL, NULL)) | 535 | while (!cpu_find_by_instance(ncpus_probed, NULL, NULL)) |
536 | ncpus_probed++; | 536 | ncpus_probed++; |
537 | 537 | ||
538 | for_each_cpu(i) { | 538 | for_each_possible_cpu(i) { |
539 | struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); | 539 | struct cpu *p = kzalloc(sizeof(*p), GFP_KERNEL); |
540 | if (p) { | 540 | if (p) { |
541 | register_cpu(p, i, NULL); | 541 | register_cpu(p, i, NULL); |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 8175a6968c6b..90eaca3ec9a6 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -745,12 +745,21 @@ struct call_data_struct { | |||
745 | int wait; | 745 | int wait; |
746 | }; | 746 | }; |
747 | 747 | ||
748 | static DEFINE_SPINLOCK(call_lock); | 748 | static __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock); |
749 | static struct call_data_struct *call_data; | 749 | static struct call_data_struct *call_data; |
750 | 750 | ||
751 | extern unsigned long xcall_call_function; | 751 | extern unsigned long xcall_call_function; |
752 | 752 | ||
753 | /* | 753 | /** |
754 | * smp_call_function(): Run a function on all other CPUs. | ||
755 | * @func: The function to run. This must be fast and non-blocking. | ||
756 | * @info: An arbitrary pointer to pass to the function. | ||
757 | * @nonatomic: currently unused. | ||
758 | * @wait: If true, wait (atomically) until function has completed on other CPUs. | ||
759 | * | ||
760 | * Returns 0 on success, else a negative status code. Does not return until | ||
761 | * remote CPUs are nearly ready to execute <<func>> or are or have executed. | ||
762 | * | ||
754 | * You must not call this function with disabled interrupts or from a | 763 | * You must not call this function with disabled interrupts or from a |
755 | * hardware interrupt handler or from a bottom half handler. | 764 | * hardware interrupt handler or from a bottom half handler. |
756 | */ | 765 | */ |
@@ -759,7 +768,6 @@ static int smp_call_function_mask(void (*func)(void *info), void *info, | |||
759 | { | 768 | { |
760 | struct call_data_struct data; | 769 | struct call_data_struct data; |
761 | int cpus; | 770 | int cpus; |
762 | long timeout; | ||
763 | 771 | ||
764 | /* Can deadlock when called with interrupts disabled */ | 772 | /* Can deadlock when called with interrupts disabled */ |
765 | WARN_ON(irqs_disabled()); | 773 | WARN_ON(irqs_disabled()); |
@@ -777,31 +785,18 @@ static int smp_call_function_mask(void (*func)(void *info), void *info, | |||
777 | goto out_unlock; | 785 | goto out_unlock; |
778 | 786 | ||
779 | call_data = &data; | 787 | call_data = &data; |
788 | mb(); | ||
780 | 789 | ||
781 | smp_cross_call_masked(&xcall_call_function, 0, 0, 0, mask); | 790 | smp_cross_call_masked(&xcall_call_function, 0, 0, 0, mask); |
782 | 791 | ||
783 | /* | 792 | /* Wait for response */ |
784 | * Wait for other cpus to complete function or at | 793 | while (atomic_read(&data.finished) != cpus) |
785 | * least snap the call data. | 794 | cpu_relax(); |
786 | */ | ||
787 | timeout = 1000000; | ||
788 | while (atomic_read(&data.finished) != cpus) { | ||
789 | if (--timeout <= 0) | ||
790 | goto out_timeout; | ||
791 | barrier(); | ||
792 | udelay(1); | ||
793 | } | ||
794 | 795 | ||
795 | out_unlock: | 796 | out_unlock: |
796 | spin_unlock(&call_lock); | 797 | spin_unlock(&call_lock); |
797 | 798 | ||
798 | return 0; | 799 | return 0; |
799 | |||
800 | out_timeout: | ||
801 | spin_unlock(&call_lock); | ||
802 | printk("XCALL: Remote cpus not responding, ncpus=%d finished=%d\n", | ||
803 | cpus, atomic_read(&data.finished)); | ||
804 | return 0; | ||
805 | } | 800 | } |
806 | 801 | ||
807 | int smp_call_function(void (*func)(void *info), void *info, | 802 | int smp_call_function(void (*func)(void *info), void *info, |
@@ -1285,7 +1280,7 @@ int setup_profiling_timer(unsigned int multiplier) | |||
1285 | return -EINVAL; | 1280 | return -EINVAL; |
1286 | 1281 | ||
1287 | spin_lock_irqsave(&prof_setup_lock, flags); | 1282 | spin_lock_irqsave(&prof_setup_lock, flags); |
1288 | for_each_cpu(i) | 1283 | for_each_possible_cpu(i) |
1289 | prof_multiplier(i) = multiplier; | 1284 | prof_multiplier(i) = multiplier; |
1290 | current_tick_offset = (timer_tick_offset / multiplier); | 1285 | current_tick_offset = (timer_tick_offset / multiplier); |
1291 | spin_unlock_irqrestore(&prof_setup_lock, flags); | 1286 | spin_unlock_irqrestore(&prof_setup_lock, flags); |
@@ -1313,12 +1308,12 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
1313 | } | 1308 | } |
1314 | } | 1309 | } |
1315 | 1310 | ||
1316 | for_each_cpu(i) { | 1311 | for_each_possible_cpu(i) { |
1317 | if (tlb_type == hypervisor) { | 1312 | if (tlb_type == hypervisor) { |
1318 | int j; | 1313 | int j; |
1319 | 1314 | ||
1320 | /* XXX get this mapping from machine description */ | 1315 | /* XXX get this mapping from machine description */ |
1321 | for_each_cpu(j) { | 1316 | for_each_possible_cpu(j) { |
1322 | if ((j >> 2) == (i >> 2)) | 1317 | if ((j >> 2) == (i >> 2)) |
1323 | cpu_set(j, cpu_sibling_map[i]); | 1318 | cpu_set(j, cpu_sibling_map[i]); |
1324 | } | 1319 | } |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index f5e8db1de76b..62d8a99271ea 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -276,7 +276,6 @@ EXPORT_SYMBOL(__prom_getsibling); | |||
276 | EXPORT_SYMBOL(strlen); | 276 | EXPORT_SYMBOL(strlen); |
277 | EXPORT_SYMBOL(__strlen_user); | 277 | EXPORT_SYMBOL(__strlen_user); |
278 | EXPORT_SYMBOL(__strnlen_user); | 278 | EXPORT_SYMBOL(__strnlen_user); |
279 | EXPORT_SYMBOL(strpbrk); | ||
280 | 279 | ||
281 | #ifdef CONFIG_SOLARIS_EMUL_MODULE | 280 | #ifdef CONFIG_SOLARIS_EMUL_MODULE |
282 | EXPORT_SYMBOL(linux_sparc_syscall); | 281 | EXPORT_SYMBOL(linux_sparc_syscall); |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index ff090bb9734b..2793a5d82380 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -1130,9 +1130,9 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in | |||
1130 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1130 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1131 | afsr, afar, | 1131 | afsr, afar, |
1132 | (afsr & CHAFSR_TL1) ? 1 : 0); | 1132 | (afsr & CHAFSR_TL1) ? 1 : 0); |
1133 | printk("%s" "ERROR(%d): TPC[%016lx] TNPC[%016lx] TSTATE[%016lx]\n", | 1133 | printk("%s" "ERROR(%d): TPC[%lx] TNPC[%lx] O7[%lx] TSTATE[%lx]\n", |
1134 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1134 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1135 | regs->tpc, regs->tnpc, regs->tstate); | 1135 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
1136 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1136 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
1137 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1137 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1138 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1138 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
diff --git a/arch/um/Makefile b/arch/um/Makefile index 24790bed2054..a508e7a02891 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -159,6 +159,7 @@ archclean: | |||
159 | $(SYMLINK_HEADERS): | 159 | $(SYMLINK_HEADERS): |
160 | @echo ' SYMLINK $@' | 160 | @echo ' SYMLINK $@' |
161 | ifneq ($(KBUILD_SRC),) | 161 | ifneq ($(KBUILD_SRC),) |
162 | $(Q)mkdir -p $(objtree)/include/asm-um | ||
162 | $(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ | 163 | $(Q)ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ |
163 | else | 164 | else |
164 | $(Q)cd $(TOPDIR)/$(dir $@) ; \ | 165 | $(Q)cd $(TOPDIR)/$(dir $@) ; \ |
@@ -168,7 +169,7 @@ endif | |||
168 | include/asm-um/arch: | 169 | include/asm-um/arch: |
169 | @echo ' SYMLINK $@' | 170 | @echo ' SYMLINK $@' |
170 | ifneq ($(KBUILD_SRC),) | 171 | ifneq ($(KBUILD_SRC),) |
171 | $(Q)mkdir -p include/asm-um | 172 | $(Q)mkdir -p $(objtree)/include/asm-um |
172 | $(Q)ln -fsn $(srctree)/include/asm-$(SUBARCH) include/asm-um/arch | 173 | $(Q)ln -fsn $(srctree)/include/asm-$(SUBARCH) include/asm-um/arch |
173 | else | 174 | else |
174 | $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch | 175 | $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch |
diff --git a/arch/um/drivers/cow.h b/arch/um/drivers/cow.h index 04e3958266e0..dc36b222100b 100644 --- a/arch/um/drivers/cow.h +++ b/arch/um/drivers/cow.h | |||
@@ -46,7 +46,7 @@ extern int file_reader(__u64 offset, char *buf, int len, void *arg); | |||
46 | extern int read_cow_header(int (*reader)(__u64, char *, int, void *), | 46 | extern int read_cow_header(int (*reader)(__u64, char *, int, void *), |
47 | void *arg, __u32 *version_out, | 47 | void *arg, __u32 *version_out, |
48 | char **backing_file_out, time_t *mtime_out, | 48 | char **backing_file_out, time_t *mtime_out, |
49 | __u64 *size_out, int *sectorsize_out, | 49 | unsigned long long *size_out, int *sectorsize_out, |
50 | __u32 *align_out, int *bitmap_offset_out); | 50 | __u32 *align_out, int *bitmap_offset_out); |
51 | 51 | ||
52 | extern int write_cow_header(char *cow_file, int fd, char *backing_file, | 52 | extern int write_cow_header(char *cow_file, int fd, char *backing_file, |
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h index 94de4ead4f7a..7a5b4afde692 100644 --- a/arch/um/drivers/cow_sys.h +++ b/arch/um/drivers/cow_sys.h | |||
@@ -28,7 +28,7 @@ static inline int cow_seek_file(int fd, __u64 offset) | |||
28 | return(os_seek_file(fd, offset)); | 28 | return(os_seek_file(fd, offset)); |
29 | } | 29 | } |
30 | 30 | ||
31 | static inline int cow_file_size(char *file, __u64 *size_out) | 31 | static inline int cow_file_size(char *file, unsigned long long *size_out) |
32 | { | 32 | { |
33 | return(os_file_size(file, size_out)); | 33 | return(os_file_size(file, size_out)); |
34 | } | 34 | } |
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index 61951b721268..0ec4052db9c5 100644 --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c | |||
@@ -17,30 +17,34 @@ | |||
17 | 17 | ||
18 | #define PATH_LEN_V1 256 | 18 | #define PATH_LEN_V1 256 |
19 | 19 | ||
20 | typedef __u32 time32_t; | ||
21 | |||
20 | struct cow_header_v1 { | 22 | struct cow_header_v1 { |
21 | int magic; | 23 | __s32 magic; |
22 | int version; | 24 | __s32 version; |
23 | char backing_file[PATH_LEN_V1]; | 25 | char backing_file[PATH_LEN_V1]; |
24 | time_t mtime; | 26 | time32_t mtime; |
25 | __u64 size; | 27 | __u64 size; |
26 | int sectorsize; | 28 | __s32 sectorsize; |
27 | }; | 29 | } __attribute__((packed)); |
28 | 30 | ||
29 | #define PATH_LEN_V2 MAXPATHLEN | 31 | /* Define PATH_LEN_V3 as the usual value of MAXPATHLEN, just hard-code it in |
32 | * case other systems have different values for MAXPATHLEN. | ||
33 | * | ||
34 | * The same must hold for V2 - we want file format compatibility, not anything | ||
35 | * else. | ||
36 | */ | ||
37 | #define PATH_LEN_V3 4096 | ||
38 | #define PATH_LEN_V2 PATH_LEN_V3 | ||
30 | 39 | ||
31 | struct cow_header_v2 { | 40 | struct cow_header_v2 { |
32 | __u32 magic; | 41 | __u32 magic; |
33 | __u32 version; | 42 | __u32 version; |
34 | char backing_file[PATH_LEN_V2]; | 43 | char backing_file[PATH_LEN_V2]; |
35 | time_t mtime; | 44 | time32_t mtime; |
36 | __u64 size; | 45 | __u64 size; |
37 | int sectorsize; | 46 | __s32 sectorsize; |
38 | }; | 47 | } __attribute__((packed)); |
39 | |||
40 | /* Define PATH_LEN_V3 as the usual value of MAXPATHLEN, just hard-code it in | ||
41 | * case other systems have different values for MAXPATHLEN | ||
42 | */ | ||
43 | #define PATH_LEN_V3 4096 | ||
44 | 48 | ||
45 | /* Changes from V2 - | 49 | /* Changes from V2 - |
46 | * PATH_LEN_V3 as described above | 50 | * PATH_LEN_V3 as described above |
@@ -66,6 +70,15 @@ struct cow_header_v2 { | |||
66 | * Fixed (finally!) the rounding bug | 70 | * Fixed (finally!) the rounding bug |
67 | */ | 71 | */ |
68 | 72 | ||
73 | /* Until Dec2005, __attribute__((packed)) was left out from the below | ||
74 | * definition, leading on 64-bit systems to 4 bytes of padding after mtime, to | ||
75 | * align size to 8-byte alignment. This shifted all fields above (no padding | ||
76 | * was present on 32-bit, no other padding was added). | ||
77 | * | ||
78 | * However, this _can be detected_: it means that cow_format (always 0 until | ||
79 | * now) is shifted onto the first 4 bytes of backing_file, where it is otherwise | ||
80 | * impossible to find 4 zeros. -bb */ | ||
81 | |||
69 | struct cow_header_v3 { | 82 | struct cow_header_v3 { |
70 | __u32 magic; | 83 | __u32 magic; |
71 | __u32 version; | 84 | __u32 version; |
@@ -75,6 +88,18 @@ struct cow_header_v3 { | |||
75 | __u32 alignment; | 88 | __u32 alignment; |
76 | __u32 cow_format; | 89 | __u32 cow_format; |
77 | char backing_file[PATH_LEN_V3]; | 90 | char backing_file[PATH_LEN_V3]; |
91 | } __attribute__((packed)); | ||
92 | |||
93 | /* This is the broken layout used by some 64-bit binaries. */ | ||
94 | struct cow_header_v3_broken { | ||
95 | __u32 magic; | ||
96 | __u32 version; | ||
97 | __s64 mtime; | ||
98 | __u64 size; | ||
99 | __u32 sectorsize; | ||
100 | __u32 alignment; | ||
101 | __u32 cow_format; | ||
102 | char backing_file[PATH_LEN_V3]; | ||
78 | }; | 103 | }; |
79 | 104 | ||
80 | /* COW format definitions - for now, we have only the usual COW bitmap */ | 105 | /* COW format definitions - for now, we have only the usual COW bitmap */ |
@@ -84,6 +109,7 @@ union cow_header { | |||
84 | struct cow_header_v1 v1; | 109 | struct cow_header_v1 v1; |
85 | struct cow_header_v2 v2; | 110 | struct cow_header_v2 v2; |
86 | struct cow_header_v3 v3; | 111 | struct cow_header_v3 v3; |
112 | struct cow_header_v3_broken v3_b; | ||
87 | }; | 113 | }; |
88 | 114 | ||
89 | #define COW_MAGIC 0x4f4f4f4d /* MOOO */ | 115 | #define COW_MAGIC 0x4f4f4f4d /* MOOO */ |
@@ -184,8 +210,9 @@ int write_cow_header(char *cow_file, int fd, char *backing_file, | |||
184 | 210 | ||
185 | err = -EINVAL; | 211 | err = -EINVAL; |
186 | if(strlen(backing_file) > sizeof(header->backing_file) - 1){ | 212 | if(strlen(backing_file) > sizeof(header->backing_file) - 1){ |
213 | /* Below, %zd is for a size_t value */ | ||
187 | cow_printf("Backing file name \"%s\" is too long - names are " | 214 | cow_printf("Backing file name \"%s\" is too long - names are " |
188 | "limited to %d characters\n", backing_file, | 215 | "limited to %zd characters\n", backing_file, |
189 | sizeof(header->backing_file) - 1); | 216 | sizeof(header->backing_file) - 1); |
190 | goto out_free; | 217 | goto out_free; |
191 | } | 218 | } |
@@ -300,7 +327,8 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg, | |||
300 | *align_out = *sectorsize_out; | 327 | *align_out = *sectorsize_out; |
301 | file = header->v2.backing_file; | 328 | file = header->v2.backing_file; |
302 | } | 329 | } |
303 | else if(version == 3){ | 330 | /* This is very subtle - see above at union cow_header definition */ |
331 | else if(version == 3 && (*((int*)header->v3.backing_file) != 0)){ | ||
304 | if(n < sizeof(header->v3)){ | 332 | if(n < sizeof(header->v3)){ |
305 | cow_printf("read_cow_header - failed to read V3 " | 333 | cow_printf("read_cow_header - failed to read V3 " |
306 | "header\n"); | 334 | "header\n"); |
@@ -310,9 +338,43 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg, | |||
310 | *size_out = ntohll(header->v3.size); | 338 | *size_out = ntohll(header->v3.size); |
311 | *sectorsize_out = ntohl(header->v3.sectorsize); | 339 | *sectorsize_out = ntohl(header->v3.sectorsize); |
312 | *align_out = ntohl(header->v3.alignment); | 340 | *align_out = ntohl(header->v3.alignment); |
341 | if (*align_out == 0) { | ||
342 | cow_printf("read_cow_header - invalid COW header, " | ||
343 | "align == 0\n"); | ||
344 | } | ||
313 | *bitmap_offset_out = ROUND_UP(sizeof(header->v3), *align_out); | 345 | *bitmap_offset_out = ROUND_UP(sizeof(header->v3), *align_out); |
314 | file = header->v3.backing_file; | 346 | file = header->v3.backing_file; |
315 | } | 347 | } |
348 | else if(version == 3){ | ||
349 | cow_printf("read_cow_header - broken V3 file with" | ||
350 | " 64-bit layout - recovering content.\n"); | ||
351 | |||
352 | if(n < sizeof(header->v3_b)){ | ||
353 | cow_printf("read_cow_header - failed to read V3 " | ||
354 | "header\n"); | ||
355 | goto out; | ||
356 | } | ||
357 | |||
358 | /* this was used until Dec2005 - 64bits are needed to represent | ||
359 | * 2038+. I.e. we can safely do this truncating cast. | ||
360 | * | ||
361 | * Additionally, we must use ntohl() instead of ntohll(), since | ||
362 | * the program used to use the former (tested - I got mtime | ||
363 | * mismatch "0 vs whatever"). | ||
364 | * | ||
365 | * Ever heard about bug-to-bug-compatibility ? ;-) */ | ||
366 | *mtime_out = (time32_t) ntohl(header->v3_b.mtime); | ||
367 | |||
368 | *size_out = ntohll(header->v3_b.size); | ||
369 | *sectorsize_out = ntohl(header->v3_b.sectorsize); | ||
370 | *align_out = ntohl(header->v3_b.alignment); | ||
371 | if (*align_out == 0) { | ||
372 | cow_printf("read_cow_header - invalid COW header, " | ||
373 | "align == 0\n"); | ||
374 | } | ||
375 | *bitmap_offset_out = ROUND_UP(sizeof(header->v3_b), *align_out); | ||
376 | file = header->v3_b.backing_file; | ||
377 | } | ||
316 | else { | 378 | else { |
317 | cow_printf("read_cow_header - invalid COW version\n"); | 379 | cow_printf("read_cow_header - invalid COW version\n"); |
318 | goto out; | 380 | goto out; |
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 28e3760e8b98..6d7173fc55a3 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -62,7 +62,7 @@ static void mc_work_proc(void *unused) | |||
62 | unsigned long flags; | 62 | unsigned long flags; |
63 | 63 | ||
64 | while(!list_empty(&mc_requests)){ | 64 | while(!list_empty(&mc_requests)){ |
65 | local_save_flags(flags); | 65 | local_irq_save(flags); |
66 | req = list_entry(mc_requests.next, struct mconsole_entry, | 66 | req = list_entry(mc_requests.next, struct mconsole_entry, |
67 | list); | 67 | list); |
68 | list_del(&req->list); | 68 | list_del(&req->list); |
@@ -87,7 +87,7 @@ static irqreturn_t mconsole_interrupt(int irq, void *dev_id, | |||
87 | if(req.cmd->context == MCONSOLE_INTR) | 87 | if(req.cmd->context == MCONSOLE_INTR) |
88 | (*req.cmd->handler)(&req); | 88 | (*req.cmd->handler)(&req); |
89 | else { | 89 | else { |
90 | new = kmalloc(sizeof(*new), GFP_ATOMIC); | 90 | new = kmalloc(sizeof(*new), GFP_NOWAIT); |
91 | if(new == NULL) | 91 | if(new == NULL) |
92 | mconsole_reply(&req, "Out of memory", 1, 0); | 92 | mconsole_reply(&req, "Out of memory", 1, 0); |
93 | else { | 93 | else { |
@@ -415,7 +415,6 @@ static int mem_config(char *str) | |||
415 | 415 | ||
416 | unplugged = page_address(page); | 416 | unplugged = page_address(page); |
417 | if(unplug_index == UNPLUGGED_PER_PAGE){ | 417 | if(unplug_index == UNPLUGGED_PER_PAGE){ |
418 | INIT_LIST_HEAD(&unplugged->list); | ||
419 | list_add(&unplugged->list, &unplugged_pages); | 418 | list_add(&unplugged->list, &unplugged_pages); |
420 | unplug_index = 0; | 419 | unplug_index = 0; |
421 | } | 420 | } |
@@ -616,7 +615,7 @@ static void console_write(struct console *console, const char *string, | |||
616 | return; | 615 | return; |
617 | 616 | ||
618 | while(1){ | 617 | while(1){ |
619 | n = min((size_t)len, ARRAY_SIZE(console_buf) - console_index); | 618 | n = min((size_t) len, ARRAY_SIZE(console_buf) - console_index); |
620 | strncpy(&console_buf[console_index], string, n); | 619 | strncpy(&console_buf[console_index], string, n); |
621 | console_index += n; | 620 | console_index += n; |
622 | string += n; | 621 | string += n; |
@@ -655,7 +654,6 @@ static void with_console(struct mc_request *req, void (*proc)(void *), | |||
655 | struct mconsole_entry entry; | 654 | struct mconsole_entry entry; |
656 | unsigned long flags; | 655 | unsigned long flags; |
657 | 656 | ||
658 | INIT_LIST_HEAD(&entry.list); | ||
659 | entry.request = *req; | 657 | entry.request = *req; |
660 | list_add(&entry.list, &clients); | 658 | list_add(&entry.list, &clients); |
661 | spin_lock_irqsave(&console_lock, flags); | 659 | spin_lock_irqsave(&console_lock, flags); |
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 0e2f06187ea7..0a7786e00cfb 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c | |||
@@ -182,7 +182,9 @@ static int change_tramp(char **argv, char *output, int output_len) | |||
182 | pe_data.stdout = fds[1]; | 182 | pe_data.stdout = fds[1]; |
183 | pid = run_helper(change_pre_exec, &pe_data, argv, NULL); | 183 | pid = run_helper(change_pre_exec, &pe_data, argv, NULL); |
184 | 184 | ||
185 | read_output(fds[0], output, output_len); | 185 | if (pid > 0) /* Avoid hang as we won't get data in failure case. */ |
186 | read_output(fds[0], output, output_len); | ||
187 | |||
186 | os_close_file(fds[0]); | 188 | os_close_file(fds[0]); |
187 | os_close_file(fds[1]); | 189 | os_close_file(fds[1]); |
188 | 190 | ||
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c index b94c66114bc8..33c5f6e625e8 100644 --- a/arch/um/drivers/slirp_user.c +++ b/arch/um/drivers/slirp_user.c | |||
@@ -104,7 +104,7 @@ static void slirp_close(int fd, void *data) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | if(err == 0) { | 106 | if(err == 0) { |
107 | printk("slirp_close: process %d has not exited\n"); | 107 | printk("slirp_close: process %d has not exited\n", pri->pid); |
108 | return; | 108 | return; |
109 | } | 109 | } |
110 | 110 | ||
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 42557130a408..efa3d33c0be6 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -117,10 +117,6 @@ extern struct task_struct *get_task(int pid, int require); | |||
117 | extern void machine_halt(void); | 117 | extern void machine_halt(void); |
118 | extern int is_syscall(unsigned long addr); | 118 | extern int is_syscall(unsigned long addr); |
119 | 119 | ||
120 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); | ||
121 | |||
122 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); | ||
123 | |||
124 | extern void free_irq(unsigned int, void *); | 120 | extern void free_irq(unsigned int, void *); |
125 | extern int cpu(void); | 121 | extern int cpu(void); |
126 | 122 | ||
diff --git a/arch/um/include/tt/tt.h b/arch/um/include/tt/tt.h index 808521980186..acb8356e1f98 100644 --- a/arch/um/include/tt/tt.h +++ b/arch/um/include/tt/tt.h | |||
@@ -19,7 +19,8 @@ extern int fork_tramp(void *sig_stack); | |||
19 | extern int do_proc_op(void *t, int proc_id); | 19 | extern int do_proc_op(void *t, int proc_id); |
20 | extern int tracer(int (*init_proc)(void *), void *sp); | 20 | extern int tracer(int (*init_proc)(void *), void *sp); |
21 | extern void attach_process(int pid); | 21 | extern void attach_process(int pid); |
22 | extern void tracer_panic(char *format, ...); | 22 | extern void tracer_panic(char *format, ...) |
23 | __attribute__ ((format (printf, 1, 2))); | ||
23 | extern void set_init_pid(int pid); | 24 | extern void set_init_pid(int pid); |
24 | extern int set_user_mode(void *task); | 25 | extern int set_user_mode(void *task); |
25 | extern void set_tracing(void *t, int tracing); | 26 | extern void set_tracing(void *t, int tracing); |
diff --git a/arch/um/include/user.h b/arch/um/include/user.h index 91b0ac4ad88c..39f8c8801076 100644 --- a/arch/um/include/user.h +++ b/arch/um/include/user.h | |||
@@ -6,8 +6,10 @@ | |||
6 | #ifndef __USER_H__ | 6 | #ifndef __USER_H__ |
7 | #define __USER_H__ | 7 | #define __USER_H__ |
8 | 8 | ||
9 | extern void panic(const char *fmt, ...); | 9 | extern void panic(const char *fmt, ...) |
10 | extern int printk(const char *fmt, ...); | 10 | __attribute__ ((format (printf, 1, 2))); |
11 | extern int printk(const char *fmt, ...) | ||
12 | __attribute__ ((format (printf, 1, 2))); | ||
11 | extern void schedule(void); | 13 | extern void schedule(void); |
12 | extern void *um_kmalloc(int size); | 14 | extern void *um_kmalloc(int size); |
13 | extern void *um_kmalloc_atomic(int size); | 15 | extern void *um_kmalloc_atomic(int size); |
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index fe0c29b5144d..802d7842514d 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -55,7 +55,8 @@ extern int get_pty(void); | |||
55 | extern void *um_kmalloc(int size); | 55 | extern void *um_kmalloc(int size); |
56 | extern int switcheroo(int fd, int prot, void *from, void *to, int size); | 56 | extern int switcheroo(int fd, int prot, void *from, void *to, int size); |
57 | extern void do_exec(int old_pid, int new_pid); | 57 | extern void do_exec(int old_pid, int new_pid); |
58 | extern void tracer_panic(char *msg, ...); | 58 | extern void tracer_panic(char *msg, ...) |
59 | __attribute__ ((format (printf, 1, 2))); | ||
59 | extern int detach(int pid, int sig); | 60 | extern int detach(int pid, int sig); |
60 | extern int attach(int pid); | 61 | extern int attach(int pid); |
61 | extern void kill_child_dead(int pid); | 62 | extern void kill_child_dead(int pid); |
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index 7713e7a6f476..432cf0b97a13 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -39,7 +39,6 @@ EXPORT_SYMBOL(um_virt_to_phys); | |||
39 | EXPORT_SYMBOL(mode_tt); | 39 | EXPORT_SYMBOL(mode_tt); |
40 | EXPORT_SYMBOL(handle_page_fault); | 40 | EXPORT_SYMBOL(handle_page_fault); |
41 | EXPORT_SYMBOL(find_iomem); | 41 | EXPORT_SYMBOL(find_iomem); |
42 | EXPORT_SYMBOL(end_iomem); | ||
43 | 42 | ||
44 | #ifdef CONFIG_MODE_TT | 43 | #ifdef CONFIG_MODE_TT |
45 | EXPORT_SYMBOL(strncpy_from_user_tt); | 44 | EXPORT_SYMBOL(strncpy_from_user_tt); |
@@ -89,12 +88,10 @@ EXPORT_SYMBOL(dump_thread); | |||
89 | EXPORT_SYMBOL(do_gettimeofday); | 88 | EXPORT_SYMBOL(do_gettimeofday); |
90 | EXPORT_SYMBOL(do_settimeofday); | 89 | EXPORT_SYMBOL(do_settimeofday); |
91 | 90 | ||
92 | /* This is here because UML expands open to sys_open, not to a system | 91 | /* This is here because UML expands lseek to sys_lseek, not to a system |
93 | * call instruction. | 92 | * call instruction. |
94 | */ | 93 | */ |
95 | EXPORT_SYMBOL(sys_open); | ||
96 | EXPORT_SYMBOL(sys_lseek); | 94 | EXPORT_SYMBOL(sys_lseek); |
97 | EXPORT_SYMBOL(sys_read); | ||
98 | EXPORT_SYMBOL(sys_wait4); | 95 | EXPORT_SYMBOL(sys_wait4); |
99 | 96 | ||
100 | #ifdef CONFIG_SMP | 97 | #ifdef CONFIG_SMP |
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c index 901b85e8a1c6..8f49507e64ef 100644 --- a/arch/um/os-Linux/drivers/ethertap_user.c +++ b/arch/um/os-Linux/drivers/ethertap_user.c | |||
@@ -40,7 +40,7 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask, | |||
40 | int fd) | 40 | int fd) |
41 | { | 41 | { |
42 | struct addr_change change; | 42 | struct addr_change change; |
43 | void *output; | 43 | char *output; |
44 | int n; | 44 | int n; |
45 | 45 | ||
46 | change.what = op; | 46 | change.what = op; |
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c index 6490a4ff40ac..6987d1d247a2 100644 --- a/arch/um/os-Linux/helper.c +++ b/arch/um/os-Linux/helper.c | |||
@@ -43,7 +43,7 @@ static int helper_child(void *arg) | |||
43 | (*data->pre_exec)(data->pre_data); | 43 | (*data->pre_exec)(data->pre_data); |
44 | execvp(argv[0], argv); | 44 | execvp(argv[0], argv); |
45 | errval = errno; | 45 | errval = errno; |
46 | printk("execvp of '%s' failed - errno = %d\n", argv[0], errno); | 46 | printk("helper_child - execve of '%s' failed - errno = %d\n", argv[0], errno); |
47 | os_write_file(data->fd, &errval, sizeof(errval)); | 47 | os_write_file(data->fd, &errval, sizeof(errval)); |
48 | kill(os_getpid(), SIGKILL); | 48 | kill(os_getpid(), SIGKILL); |
49 | return(0); | 49 | return(0); |
@@ -92,15 +92,15 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv, | |||
92 | close(fds[1]); | 92 | close(fds[1]); |
93 | fds[1] = -1; | 93 | fds[1] = -1; |
94 | 94 | ||
95 | /*Read the errno value from the child.*/ | 95 | /* Read the errno value from the child, if the exec failed, or get 0 if |
96 | * the exec succeeded because the pipe fd was set as close-on-exec. */ | ||
96 | n = os_read_file(fds[0], &ret, sizeof(ret)); | 97 | n = os_read_file(fds[0], &ret, sizeof(ret)); |
97 | if(n < 0){ | 98 | if (n < 0) { |
98 | printk("run_helper : read on pipe failed, ret = %d\n", -n); | 99 | printk("run_helper : read on pipe failed, ret = %d\n", -n); |
99 | ret = n; | 100 | ret = n; |
100 | kill(pid, SIGKILL); | 101 | kill(pid, SIGKILL); |
101 | CATCH_EINTR(waitpid(pid, NULL, 0)); | 102 | CATCH_EINTR(waitpid(pid, NULL, 0)); |
102 | } | 103 | } else if(n != 0){ |
103 | else if(n != 0){ | ||
104 | CATCH_EINTR(n = waitpid(pid, NULL, 0)); | 104 | CATCH_EINTR(n = waitpid(pid, NULL, 0)); |
105 | ret = -errno; | 105 | ret = -errno; |
106 | } else { | 106 | } else { |
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c index 6ab372da9657..71bb90a7606d 100644 --- a/arch/um/os-Linux/mem.c +++ b/arch/um/os-Linux/mem.c | |||
@@ -53,33 +53,36 @@ static void __init find_tempdir(void) | |||
53 | */ | 53 | */ |
54 | int make_tempfile(const char *template, char **out_tempname, int do_unlink) | 54 | int make_tempfile(const char *template, char **out_tempname, int do_unlink) |
55 | { | 55 | { |
56 | char tempname[MAXPATHLEN]; | 56 | char *tempname; |
57 | int fd; | 57 | int fd; |
58 | 58 | ||
59 | tempname = malloc(MAXPATHLEN); | ||
60 | |||
59 | find_tempdir(); | 61 | find_tempdir(); |
60 | if (*template != '/') | 62 | if (template[0] != '/') |
61 | strcpy(tempname, tempdir); | 63 | strcpy(tempname, tempdir); |
62 | else | 64 | else |
63 | *tempname = 0; | 65 | tempname[0] = '\0'; |
64 | strcat(tempname, template); | 66 | strcat(tempname, template); |
65 | fd = mkstemp(tempname); | 67 | fd = mkstemp(tempname); |
66 | if(fd < 0){ | 68 | if(fd < 0){ |
67 | fprintf(stderr, "open - cannot create %s: %s\n", tempname, | 69 | fprintf(stderr, "open - cannot create %s: %s\n", tempname, |
68 | strerror(errno)); | 70 | strerror(errno)); |
69 | return -1; | 71 | goto out; |
70 | } | 72 | } |
71 | if(do_unlink && (unlink(tempname) < 0)){ | 73 | if(do_unlink && (unlink(tempname) < 0)){ |
72 | perror("unlink"); | 74 | perror("unlink"); |
73 | return -1; | 75 | goto out; |
74 | } | 76 | } |
75 | if(out_tempname){ | 77 | if(out_tempname){ |
76 | *out_tempname = strdup(tempname); | 78 | *out_tempname = tempname; |
77 | if(*out_tempname == NULL){ | 79 | } else { |
78 | perror("strdup"); | 80 | free(tempname); |
79 | return -1; | ||
80 | } | ||
81 | } | 81 | } |
82 | return(fd); | 82 | return(fd); |
83 | out: | ||
84 | free(tempname); | ||
85 | return -1; | ||
83 | } | 86 | } |
84 | 87 | ||
85 | #define TEMPNAME_TEMPLATE "vm_file-XXXXXX" | 88 | #define TEMPNAME_TEMPLATE "vm_file-XXXXXX" |
diff --git a/arch/um/os-Linux/sigio.c b/arch/um/os-Linux/sigio.c index 9ba942947146..00e9388e947a 100644 --- a/arch/um/os-Linux/sigio.c +++ b/arch/um/os-Linux/sigio.c | |||
@@ -304,8 +304,8 @@ out_clear_poll: | |||
304 | .size = 0, | 304 | .size = 0, |
305 | .used = 0 }); | 305 | .used = 0 }); |
306 | out_free: | 306 | out_free: |
307 | kfree(p); | ||
308 | sigio_unlock(); | 307 | sigio_unlock(); |
308 | kfree(p); | ||
309 | out_close2: | 309 | out_close2: |
310 | close(l_sigio_private[0]); | 310 | close(l_sigio_private[0]); |
311 | close(l_sigio_private[1]); | 311 | close(l_sigio_private[1]); |
diff --git a/arch/um/os-Linux/skas/mem.c b/arch/um/os-Linux/skas/mem.c index fbb080c2fc26..b3c11cfa995a 100644 --- a/arch/um/os-Linux/skas/mem.c +++ b/arch/um/os-Linux/skas/mem.c | |||
@@ -82,8 +82,8 @@ static inline long do_syscall_stub(struct mm_id * mm_idp, void **addr) | |||
82 | if (offset) { | 82 | if (offset) { |
83 | data = (unsigned long *)(mm_idp->stack + | 83 | data = (unsigned long *)(mm_idp->stack + |
84 | offset - UML_CONFIG_STUB_DATA); | 84 | offset - UML_CONFIG_STUB_DATA); |
85 | printk("do_syscall_stub : ret = %d, offset = %d, " | 85 | printk("do_syscall_stub : ret = %ld, offset = %ld, " |
86 | "data = 0x%x\n", ret, offset, data); | 86 | "data = %p\n", ret, offset, data); |
87 | syscall = (unsigned long *)((unsigned long)data + data[0]); | 87 | syscall = (unsigned long *)((unsigned long)data + data[0]); |
88 | printk("do_syscall_stub: syscall %ld failed, return value = " | 88 | printk("do_syscall_stub: syscall %ld failed, return value = " |
89 | "0x%lx, expected return value = 0x%lx\n", | 89 | "0x%lx, expected return value = 0x%lx\n", |
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c index bbf34cb91ce1..045ae0037456 100644 --- a/arch/um/os-Linux/skas/process.c +++ b/arch/um/os-Linux/skas/process.c | |||
@@ -265,7 +265,7 @@ void userspace(union uml_pt_regs *regs) | |||
265 | if(err) | 265 | if(err) |
266 | panic("userspace - could not resume userspace process, " | 266 | panic("userspace - could not resume userspace process, " |
267 | "pid=%d, ptrace operation = %d, errno = %d\n", | 267 | "pid=%d, ptrace operation = %d, errno = %d\n", |
268 | op, errno); | 268 | pid, op, errno); |
269 | 269 | ||
270 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); | 270 | CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED)); |
271 | if(err < 0) | 271 | if(err < 0) |
@@ -369,7 +369,7 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
369 | */ | 369 | */ |
370 | wait_stub_done(pid, -1, "copy_context_skas0"); | 370 | wait_stub_done(pid, -1, "copy_context_skas0"); |
371 | if (child_data->err != UML_CONFIG_STUB_DATA) | 371 | if (child_data->err != UML_CONFIG_STUB_DATA) |
372 | panic("copy_context_skas0 - stub-child reports error %d\n", | 372 | panic("copy_context_skas0 - stub-child reports error %ld\n", |
373 | child_data->err); | 373 | child_data->err); |
374 | 374 | ||
375 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, | 375 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, |
diff --git a/arch/um/os-Linux/sys-i386/tls.c b/arch/um/os-Linux/sys-i386/tls.c index ba21f0e04a2f..120abbe4e3ce 100644 --- a/arch/um/os-Linux/sys-i386/tls.c +++ b/arch/um/os-Linux/sys-i386/tls.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #include <errno.h> | ||
1 | #include <linux/unistd.h> | 2 | #include <linux/unistd.h> |
2 | #include "sysdep/tls.h" | 3 | #include "sysdep/tls.h" |
3 | #include "user_util.h" | 4 | #include "user_util.h" |
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c index 198e59163288..34bfc1bb9e38 100644 --- a/arch/um/os-Linux/umid.c +++ b/arch/um/os-Linux/umid.c | |||
@@ -120,7 +120,8 @@ static int not_dead_yet(char *dir) | |||
120 | 120 | ||
121 | dead = 0; | 121 | dead = 0; |
122 | fd = open(file, O_RDONLY); | 122 | fd = open(file, O_RDONLY); |
123 | if(fd < 0){ | 123 | if(fd < 0) { |
124 | fd = -errno; | ||
124 | if(fd != -ENOENT){ | 125 | if(fd != -ENOENT){ |
125 | printk("not_dead_yet : couldn't open pid file '%s', " | 126 | printk("not_dead_yet : couldn't open pid file '%s', " |
126 | "err = %d\n", file, -fd); | 127 | "err = %d\n", file, -fd); |
@@ -130,9 +131,13 @@ static int not_dead_yet(char *dir) | |||
130 | 131 | ||
131 | err = 0; | 132 | err = 0; |
132 | n = read(fd, pid, sizeof(pid)); | 133 | n = read(fd, pid, sizeof(pid)); |
133 | if(n <= 0){ | 134 | if(n < 0){ |
135 | printk("not_dead_yet : couldn't read pid file '%s', " | ||
136 | "err = %d\n", file, errno); | ||
137 | goto out_close; | ||
138 | } else if(n == 0){ | ||
134 | printk("not_dead_yet : couldn't read pid file '%s', " | 139 | printk("not_dead_yet : couldn't read pid file '%s', " |
135 | "err = %d\n", file, -n); | 140 | "0-byte read\n", file); |
136 | goto out_close; | 141 | goto out_close; |
137 | } | 142 | } |
138 | 143 | ||
@@ -155,9 +160,9 @@ static int not_dead_yet(char *dir) | |||
155 | 160 | ||
156 | return err; | 161 | return err; |
157 | 162 | ||
158 | out_close: | 163 | out_close: |
159 | close(fd); | 164 | close(fd); |
160 | out: | 165 | out: |
161 | return 0; | 166 | return 0; |
162 | } | 167 | } |
163 | 168 | ||
diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 8da6ab31152a..2598158e1f53 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c | |||
@@ -18,14 +18,19 @@ extern void *memmove(void *, const void *, size_t); | |||
18 | extern void *memset(void *, int, size_t); | 18 | extern void *memset(void *, int, size_t); |
19 | extern int printf(const char *, ...); | 19 | extern int printf(const char *, ...); |
20 | 20 | ||
21 | /* If they're not defined, the export is included in lib/string.c.*/ | ||
22 | #ifdef __HAVE_ARCH_STRLEN | ||
21 | EXPORT_SYMBOL(strlen); | 23 | EXPORT_SYMBOL(strlen); |
24 | #endif | ||
25 | #ifdef __HAVE_ARCH_STRSTR | ||
26 | EXPORT_SYMBOL(strstr); | ||
27 | #endif | ||
28 | |||
22 | EXPORT_SYMBOL(memcpy); | 29 | EXPORT_SYMBOL(memcpy); |
23 | EXPORT_SYMBOL(memmove); | 30 | EXPORT_SYMBOL(memmove); |
24 | EXPORT_SYMBOL(memset); | 31 | EXPORT_SYMBOL(memset); |
25 | EXPORT_SYMBOL(printf); | 32 | EXPORT_SYMBOL(printf); |
26 | 33 | ||
27 | EXPORT_SYMBOL(strstr); | ||
28 | |||
29 | /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms. | 34 | /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms. |
30 | * However, the modules will use the CRC defined *here*, no matter if it is | 35 | * However, the modules will use the CRC defined *here*, no matter if it is |
31 | * good; so the versions of these symbols will always match | 36 | * good; so the versions of these symbols will always match |
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index b696b451774c..5e7a9c310aa5 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -9,10 +9,8 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) | |||
9 | 9 | ||
10 | $(USER_OBJS) $(USER_OBJS:.o=.i) $(USER_OBJS:.o=.s) $(USER_OBJS:.o=.lst): \ | 10 | $(USER_OBJS) $(USER_OBJS:.o=.i) $(USER_OBJS:.o=.s) $(USER_OBJS:.o=.lst): \ |
11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) | 11 | c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) |
12 | $(USER_OBJS): cmd_checksrc = | 12 | $(USER_OBJS) : CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ \ |
13 | $(USER_OBJS): quiet_cmd_checksrc = | 13 | -Dunix -D__unix__ -D__$(SUBARCH)__ |
14 | $(USER_OBJS): cmd_force_checksrc = | ||
15 | $(USER_OBJS): quiet_cmd_force_checksrc = | ||
16 | 14 | ||
17 | 15 | ||
18 | # The stubs and unmap.o can't try to call mcount or update basic block data | 16 | # The stubs and unmap.o can't try to call mcount or update basic block data |
diff --git a/arch/um/sys-i386/ksyms.c b/arch/um/sys-i386/ksyms.c index db524ab3f743..2a1eac1859ce 100644 --- a/arch/um/sys-i386/ksyms.c +++ b/arch/um/sys-i386/ksyms.c | |||
@@ -15,7 +15,3 @@ EXPORT_SYMBOL(__up_wakeup); | |||
15 | 15 | ||
16 | /* Networking helper routines. */ | 16 | /* Networking helper routines. */ |
17 | EXPORT_SYMBOL(csum_partial); | 17 | EXPORT_SYMBOL(csum_partial); |
18 | |||
19 | /* delay core functions */ | ||
20 | EXPORT_SYMBOL(__const_udelay); | ||
21 | EXPORT_SYMBOL(__udelay); | ||
diff --git a/arch/um/sys-i386/ptrace_user.c b/arch/um/sys-i386/ptrace_user.c index 9f3bd8ed78f5..40aa88531446 100644 --- a/arch/um/sys-i386/ptrace_user.c +++ b/arch/um/sys-i386/ptrace_user.c | |||
@@ -57,7 +57,7 @@ static void write_debugregs(int pid, unsigned long *regs) | |||
57 | if(ptrace(PTRACE_POKEUSR, pid, &dummy->u_debugreg[i], | 57 | if(ptrace(PTRACE_POKEUSR, pid, &dummy->u_debugreg[i], |
58 | regs[i]) < 0) | 58 | regs[i]) < 0) |
59 | printk("write_debugregs - ptrace failed on " | 59 | printk("write_debugregs - ptrace failed on " |
60 | "register %d, value = 0x%x, errno = %d\n", i, | 60 | "register %d, value = 0x%lx, errno = %d\n", i, |
61 | regs[i], errno); | 61 | regs[i], errno); |
62 | } | 62 | } |
63 | } | 63 | } |
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index f5d0e1c37ea2..618fd8594643 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c | |||
@@ -147,7 +147,7 @@ int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate __user *fp, | |||
147 | * delivery. The sp passed in is the original, and this needs | 147 | * delivery. The sp passed in is the original, and this needs |
148 | * to be restored, so we stick it in separately. | 148 | * to be restored, so we stick it in separately. |
149 | */ | 149 | */ |
150 | err |= copy_to_user(&SC_SP(to), sp, sizeof(sp)); | 150 | err |= copy_to_user(&SC_SP(to), &sp, sizeof(sp)); |
151 | 151 | ||
152 | if(from_fp != NULL){ | 152 | if(from_fp != NULL){ |
153 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); | 153 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); |
diff --git a/arch/um/sys-i386/tls.c b/arch/um/sys-i386/tls.c index a3188e861cc7..71b9796258ef 100644 --- a/arch/um/sys-i386/tls.c +++ b/arch/um/sys-i386/tls.c | |||
@@ -378,7 +378,7 @@ static int __init __setup_host_supports_tls(void) { | |||
378 | } else | 378 | } else |
379 | printk(KERN_ERR " Host TLS support NOT detected! " | 379 | printk(KERN_ERR " Host TLS support NOT detected! " |
380 | "TLS support inside UML will not work\n"); | 380 | "TLS support inside UML will not work\n"); |
381 | return 1; | 381 | return 0; |
382 | } | 382 | } |
383 | 383 | ||
384 | __initcall(__setup_host_supports_tls); | 384 | __initcall(__setup_host_supports_tls); |
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index e75c4e1838b0..a4c46a8af008 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -137,7 +137,7 @@ int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, | |||
137 | * delivery. The sp passed in is the original, and this needs | 137 | * delivery. The sp passed in is the original, and this needs |
138 | * to be restored, so we stick it in separately. | 138 | * to be restored, so we stick it in separately. |
139 | */ | 139 | */ |
140 | err |= copy_to_user(&SC_SP(to), sp, sizeof(sp)); | 140 | err |= copy_to_user(&SC_SP(to), &sp, sizeof(sp)); |
141 | 141 | ||
142 | if(from_fp != NULL){ | 142 | if(from_fp != NULL){ |
143 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); | 143 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); |
diff --git a/arch/v850/kernel/v850_ksyms.c b/arch/v850/kernel/v850_ksyms.c index 8ffc29c1c89d..6bcfcfe88384 100644 --- a/arch/v850/kernel/v850_ksyms.c +++ b/arch/v850/kernel/v850_ksyms.c | |||
@@ -43,7 +43,6 @@ EXPORT_SYMBOL (strncmp); | |||
43 | EXPORT_SYMBOL (strchr); | 43 | EXPORT_SYMBOL (strchr); |
44 | EXPORT_SYMBOL (strlen); | 44 | EXPORT_SYMBOL (strlen); |
45 | EXPORT_SYMBOL (strnlen); | 45 | EXPORT_SYMBOL (strnlen); |
46 | EXPORT_SYMBOL (strpbrk); | ||
47 | EXPORT_SYMBOL (strrchr); | 46 | EXPORT_SYMBOL (strrchr); |
48 | EXPORT_SYMBOL (strstr); | 47 | EXPORT_SYMBOL (strstr); |
49 | EXPORT_SYMBOL (memset); | 48 | EXPORT_SYMBOL (memset); |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 4310b4a311a5..408d44a59756 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -136,6 +136,11 @@ config X86_L1_CACHE_SHIFT | |||
136 | default "7" if GENERIC_CPU || MPSC | 136 | default "7" if GENERIC_CPU || MPSC |
137 | default "6" if MK8 | 137 | default "6" if MK8 |
138 | 138 | ||
139 | config X86_INTERNODE_CACHE_BYTES | ||
140 | int | ||
141 | default "4096" if X86_VSMP | ||
142 | default X86_L1_CACHE_BYTES if !X86_VSMP | ||
143 | |||
139 | config X86_TSC | 144 | config X86_TSC |
140 | bool | 145 | bool |
141 | default y | 146 | default y |
@@ -283,6 +288,11 @@ config K8_NUMA | |||
283 | Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA | 288 | Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA |
284 | instead, which also takes priority if both are compiled in. | 289 | instead, which also takes priority if both are compiled in. |
285 | 290 | ||
291 | config NODES_SHIFT | ||
292 | int | ||
293 | default "6" | ||
294 | depends on NEED_MULTIPLE_NODES | ||
295 | |||
286 | # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. | 296 | # Dummy CONFIG option to select ACPI_NUMA from drivers/acpi/Kconfig. |
287 | 297 | ||
288 | config X86_64_ACPI_NUMA | 298 | config X86_64_ACPI_NUMA |
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index 585fd4a559c8..e573e2ab5510 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -24,37 +24,37 @@ | |||
24 | LDFLAGS := -m elf_x86_64 | 24 | LDFLAGS := -m elf_x86_64 |
25 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 25 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
26 | LDFLAGS_vmlinux := | 26 | LDFLAGS_vmlinux := |
27 | |||
28 | CHECKFLAGS += -D__x86_64__ -m64 | 27 | CHECKFLAGS += -D__x86_64__ -m64 |
29 | 28 | ||
29 | cflags-y := | ||
30 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) | 30 | cflags-$(CONFIG_MK8) += $(call cc-option,-march=k8) |
31 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) | 31 | cflags-$(CONFIG_MPSC) += $(call cc-option,-march=nocona) |
32 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) | 32 | cflags-$(CONFIG_GENERIC_CPU) += $(call cc-option,-mtune=generic) |
33 | CFLAGS += $(cflags-y) | ||
34 | 33 | ||
35 | CFLAGS += -m64 | 34 | cflags-y += -m64 |
36 | CFLAGS += -mno-red-zone | 35 | cflags-y += -mno-red-zone |
37 | CFLAGS += -mcmodel=kernel | 36 | cflags-y += -mcmodel=kernel |
38 | CFLAGS += -pipe | 37 | cflags-y += -pipe |
39 | cflags-$(CONFIG_REORDER) += -ffunction-sections | 38 | cflags-$(CONFIG_REORDER) += -ffunction-sections |
40 | # this makes reading assembly source easier, but produces worse code | 39 | # this makes reading assembly source easier, but produces worse code |
41 | # actually it makes the kernel smaller too. | 40 | # actually it makes the kernel smaller too. |
42 | CFLAGS += -fno-reorder-blocks | 41 | cflags-y += -fno-reorder-blocks |
43 | CFLAGS += -Wno-sign-compare | 42 | cflags-y += -Wno-sign-compare |
44 | ifneq ($(CONFIG_UNWIND_INFO),y) | 43 | ifneq ($(CONFIG_UNWIND_INFO),y) |
45 | CFLAGS += -fno-asynchronous-unwind-tables | 44 | cflags-y += -fno-asynchronous-unwind-tables |
46 | endif | 45 | endif |
47 | ifneq ($(CONFIG_DEBUG_INFO),y) | 46 | ifneq ($(CONFIG_DEBUG_INFO),y) |
48 | # -fweb shrinks the kernel a bit, but the difference is very small | 47 | # -fweb shrinks the kernel a bit, but the difference is very small |
49 | # it also messes up debugging, so don't use it for now. | 48 | # it also messes up debugging, so don't use it for now. |
50 | #CFLAGS += $(call cc-option,-fweb) | 49 | #cflags-y += $(call cc-option,-fweb) |
51 | endif | 50 | endif |
52 | # -funit-at-a-time shrinks the kernel .text considerably | 51 | # -funit-at-a-time shrinks the kernel .text considerably |
53 | # unfortunately it makes reading oopses harder. | 52 | # unfortunately it makes reading oopses harder. |
54 | CFLAGS += $(call cc-option,-funit-at-a-time) | 53 | cflags-y += $(call cc-option,-funit-at-a-time) |
55 | # prevent gcc from generating any FP code by mistake | 54 | # prevent gcc from generating any FP code by mistake |
56 | CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) | 55 | cflags-y += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) |
57 | 56 | ||
57 | CFLAGS += $(cflags-y) | ||
58 | AFLAGS += -m64 | 58 | AFLAGS += -m64 |
59 | 59 | ||
60 | head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o | 60 | head-y := arch/x86_64/kernel/head.o arch/x86_64/kernel/head64.o arch/x86_64/kernel/init_task.o |
diff --git a/arch/x86_64/boot/video.S b/arch/x86_64/boot/video.S index 0587477c99f2..32327bb37aff 100644 --- a/arch/x86_64/boot/video.S +++ b/arch/x86_64/boot/video.S | |||
@@ -97,6 +97,7 @@ | |||
97 | #define PARAM_VESAPM_OFF 0x30 | 97 | #define PARAM_VESAPM_OFF 0x30 |
98 | #define PARAM_LFB_PAGES 0x32 | 98 | #define PARAM_LFB_PAGES 0x32 |
99 | #define PARAM_VESA_ATTRIB 0x34 | 99 | #define PARAM_VESA_ATTRIB 0x34 |
100 | #define PARAM_CAPABILITIES 0x36 | ||
100 | 101 | ||
101 | /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ | 102 | /* Define DO_STORE according to CONFIG_VIDEO_RETAIN */ |
102 | #ifdef CONFIG_VIDEO_RETAIN | 103 | #ifdef CONFIG_VIDEO_RETAIN |
@@ -233,6 +234,10 @@ mopar_gr: | |||
233 | movw 18(%di), %ax | 234 | movw 18(%di), %ax |
234 | movl %eax, %fs:(PARAM_LFB_SIZE) | 235 | movl %eax, %fs:(PARAM_LFB_SIZE) |
235 | 236 | ||
237 | # store mode capabilities | ||
238 | movl 10(%di), %eax | ||
239 | movl %eax, %fs:(PARAM_CAPABILITIES) | ||
240 | |||
236 | # switching the DAC to 8-bit is for <= 8 bpp only | 241 | # switching the DAC to 8-bit is for <= 8 bpp only |
237 | movw %fs:(PARAM_LFB_DEPTH), %ax | 242 | movw %fs:(PARAM_LFB_DEPTH), %ax |
238 | cmpw $8, %ax | 243 | cmpw $8, %ax |
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 566ecc97ee5a..3c45ec22b3fe 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.16-git9 | 3 | # Linux kernel version: 2.6.17-rc1 |
4 | # Sat Mar 25 15:18:40 2006 | 4 | # Mon Apr 3 16:11:14 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -9,6 +9,7 @@ CONFIG_X86=y | |||
9 | CONFIG_SEMAPHORE_SLEEPERS=y | 9 | CONFIG_SEMAPHORE_SLEEPERS=y |
10 | CONFIG_MMU=y | 10 | CONFIG_MMU=y |
11 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 11 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
12 | CONFIG_GENERIC_HWEIGHT=y | ||
12 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 13 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
13 | CONFIG_X86_CMPXCHG=y | 14 | CONFIG_X86_CMPXCHG=y |
14 | CONFIG_EARLY_PRINTK=y | 15 | CONFIG_EARLY_PRINTK=y |
@@ -55,10 +56,6 @@ CONFIG_BASE_FULL=y | |||
55 | CONFIG_FUTEX=y | 56 | CONFIG_FUTEX=y |
56 | CONFIG_EPOLL=y | 57 | CONFIG_EPOLL=y |
57 | CONFIG_SHMEM=y | 58 | CONFIG_SHMEM=y |
58 | CONFIG_CC_ALIGN_FUNCTIONS=0 | ||
59 | CONFIG_CC_ALIGN_LABELS=0 | ||
60 | CONFIG_CC_ALIGN_LOOPS=0 | ||
61 | CONFIG_CC_ALIGN_JUMPS=0 | ||
62 | CONFIG_SLAB=y | 59 | CONFIG_SLAB=y |
63 | # CONFIG_TINY_SHMEM is not set | 60 | # CONFIG_TINY_SHMEM is not set |
64 | CONFIG_BASE_SMALL=0 | 61 | CONFIG_BASE_SMALL=0 |
@@ -70,7 +67,6 @@ CONFIG_BASE_SMALL=0 | |||
70 | CONFIG_MODULES=y | 67 | CONFIG_MODULES=y |
71 | CONFIG_MODULE_UNLOAD=y | 68 | CONFIG_MODULE_UNLOAD=y |
72 | CONFIG_MODULE_FORCE_UNLOAD=y | 69 | CONFIG_MODULE_FORCE_UNLOAD=y |
73 | CONFIG_OBSOLETE_MODPARM=y | ||
74 | # CONFIG_MODVERSIONS is not set | 70 | # CONFIG_MODVERSIONS is not set |
75 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 71 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
76 | # CONFIG_KMOD is not set | 72 | # CONFIG_KMOD is not set |
@@ -81,6 +77,7 @@ CONFIG_STOP_MACHINE=y | |||
81 | # | 77 | # |
82 | CONFIG_LBD=y | 78 | CONFIG_LBD=y |
83 | # CONFIG_BLK_DEV_IO_TRACE is not set | 79 | # CONFIG_BLK_DEV_IO_TRACE is not set |
80 | # CONFIG_LSF is not set | ||
84 | 81 | ||
85 | # | 82 | # |
86 | # IO Schedulers | 83 | # IO Schedulers |
@@ -105,6 +102,7 @@ CONFIG_X86_PC=y | |||
105 | CONFIG_GENERIC_CPU=y | 102 | CONFIG_GENERIC_CPU=y |
106 | CONFIG_X86_L1_CACHE_BYTES=128 | 103 | CONFIG_X86_L1_CACHE_BYTES=128 |
107 | CONFIG_X86_L1_CACHE_SHIFT=7 | 104 | CONFIG_X86_L1_CACHE_SHIFT=7 |
105 | CONFIG_X86_INTERNODE_CACHE_BYTES=128 | ||
108 | CONFIG_X86_TSC=y | 106 | CONFIG_X86_TSC=y |
109 | CONFIG_X86_GOOD_APIC=y | 107 | CONFIG_X86_GOOD_APIC=y |
110 | # CONFIG_MICROCODE is not set | 108 | # CONFIG_MICROCODE is not set |
@@ -116,6 +114,7 @@ CONFIG_X86_LOCAL_APIC=y | |||
116 | CONFIG_MTRR=y | 114 | CONFIG_MTRR=y |
117 | CONFIG_SMP=y | 115 | CONFIG_SMP=y |
118 | CONFIG_SCHED_SMT=y | 116 | CONFIG_SCHED_SMT=y |
117 | CONFIG_SCHED_MC=y | ||
119 | # CONFIG_PREEMPT_NONE is not set | 118 | # CONFIG_PREEMPT_NONE is not set |
120 | CONFIG_PREEMPT_VOLUNTARY=y | 119 | CONFIG_PREEMPT_VOLUNTARY=y |
121 | # CONFIG_PREEMPT is not set | 120 | # CONFIG_PREEMPT is not set |
@@ -138,6 +137,7 @@ CONFIG_NEED_MULTIPLE_NODES=y | |||
138 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 137 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
139 | CONFIG_MIGRATION=y | 138 | CONFIG_MIGRATION=y |
140 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | 139 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y |
140 | CONFIG_OUT_OF_LINE_PFN_TO_PAGE=y | ||
141 | CONFIG_NR_CPUS=32 | 141 | CONFIG_NR_CPUS=32 |
142 | CONFIG_HOTPLUG_CPU=y | 142 | CONFIG_HOTPLUG_CPU=y |
143 | CONFIG_HPET_TIMER=y | 143 | CONFIG_HPET_TIMER=y |
@@ -289,6 +289,7 @@ CONFIG_IP_PNP_DHCP=y | |||
289 | # CONFIG_INET_AH is not set | 289 | # CONFIG_INET_AH is not set |
290 | # CONFIG_INET_ESP is not set | 290 | # CONFIG_INET_ESP is not set |
291 | # CONFIG_INET_IPCOMP is not set | 291 | # CONFIG_INET_IPCOMP is not set |
292 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
292 | # CONFIG_INET_TUNNEL is not set | 293 | # CONFIG_INET_TUNNEL is not set |
293 | CONFIG_INET_DIAG=y | 294 | CONFIG_INET_DIAG=y |
294 | CONFIG_INET_TCP_DIAG=y | 295 | CONFIG_INET_TCP_DIAG=y |
@@ -300,6 +301,7 @@ CONFIG_IPV6=y | |||
300 | # CONFIG_INET6_AH is not set | 301 | # CONFIG_INET6_AH is not set |
301 | # CONFIG_INET6_ESP is not set | 302 | # CONFIG_INET6_ESP is not set |
302 | # CONFIG_INET6_IPCOMP is not set | 303 | # CONFIG_INET6_IPCOMP is not set |
304 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
303 | # CONFIG_INET6_TUNNEL is not set | 305 | # CONFIG_INET6_TUNNEL is not set |
304 | # CONFIG_IPV6_TUNNEL is not set | 306 | # CONFIG_IPV6_TUNNEL is not set |
305 | # CONFIG_NETFILTER is not set | 307 | # CONFIG_NETFILTER is not set |
@@ -704,7 +706,6 @@ CONFIG_S2IO=m | |||
704 | # Wireless LAN (non-hamradio) | 706 | # Wireless LAN (non-hamradio) |
705 | # | 707 | # |
706 | # CONFIG_NET_RADIO is not set | 708 | # CONFIG_NET_RADIO is not set |
707 | # CONFIG_NET_WIRELESS_RTNETLINK is not set | ||
708 | 709 | ||
709 | # | 710 | # |
710 | # Wan interfaces | 711 | # Wan interfaces |
@@ -791,7 +792,7 @@ CONFIG_HW_CONSOLE=y | |||
791 | # | 792 | # |
792 | CONFIG_SERIAL_8250=y | 793 | CONFIG_SERIAL_8250=y |
793 | CONFIG_SERIAL_8250_CONSOLE=y | 794 | CONFIG_SERIAL_8250_CONSOLE=y |
794 | # CONFIG_SERIAL_8250_ACPI is not set | 795 | CONFIG_SERIAL_8250_PCI=y |
795 | CONFIG_SERIAL_8250_NR_UARTS=4 | 796 | CONFIG_SERIAL_8250_NR_UARTS=4 |
796 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | 797 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 |
797 | # CONFIG_SERIAL_8250_EXTENDED is not set | 798 | # CONFIG_SERIAL_8250_EXTENDED is not set |
@@ -921,6 +922,7 @@ CONFIG_HWMON=y | |||
921 | # Digital Video Broadcasting Devices | 922 | # Digital Video Broadcasting Devices |
922 | # | 923 | # |
923 | # CONFIG_DVB is not set | 924 | # CONFIG_DVB is not set |
925 | # CONFIG_USB_DABUSB is not set | ||
924 | 926 | ||
925 | # | 927 | # |
926 | # Graphics support | 928 | # Graphics support |
@@ -932,6 +934,8 @@ CONFIG_VIDEO_SELECT=y | |||
932 | # Console display driver support | 934 | # Console display driver support |
933 | # | 935 | # |
934 | CONFIG_VGA_CONSOLE=y | 936 | CONFIG_VGA_CONSOLE=y |
937 | CONFIG_VGACON_SOFT_SCROLLBACK=y | ||
938 | CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 | ||
935 | CONFIG_DUMMY_CONSOLE=y | 939 | CONFIG_DUMMY_CONSOLE=y |
936 | 940 | ||
937 | # | 941 | # |
@@ -1058,15 +1062,6 @@ CONFIG_USB_HIDINPUT=y | |||
1058 | # CONFIG_USB_MICROTEK is not set | 1062 | # CONFIG_USB_MICROTEK is not set |
1059 | 1063 | ||
1060 | # | 1064 | # |
1061 | # USB Multimedia devices | ||
1062 | # | ||
1063 | # CONFIG_USB_DABUSB is not set | ||
1064 | |||
1065 | # | ||
1066 | # Video4Linux support is needed for USB Multimedia device support | ||
1067 | # | ||
1068 | |||
1069 | # | ||
1070 | # USB Network Adapters | 1065 | # USB Network Adapters |
1071 | # | 1066 | # |
1072 | # CONFIG_USB_CATC is not set | 1067 | # CONFIG_USB_CATC is not set |
@@ -1118,9 +1113,15 @@ CONFIG_USB_MON=y | |||
1118 | # CONFIG_MMC is not set | 1113 | # CONFIG_MMC is not set |
1119 | 1114 | ||
1120 | # | 1115 | # |
1116 | # LED devices | ||
1117 | # | ||
1118 | # CONFIG_NEW_LEDS is not set | ||
1119 | |||
1120 | # | ||
1121 | # InfiniBand support | 1121 | # InfiniBand support |
1122 | # | 1122 | # |
1123 | # CONFIG_INFINIBAND is not set | 1123 | # CONFIG_INFINIBAND is not set |
1124 | # CONFIG_IPATH_CORE is not set | ||
1124 | 1125 | ||
1125 | # | 1126 | # |
1126 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | 1127 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) |
@@ -1128,6 +1129,11 @@ CONFIG_USB_MON=y | |||
1128 | # CONFIG_EDAC is not set | 1129 | # CONFIG_EDAC is not set |
1129 | 1130 | ||
1130 | # | 1131 | # |
1132 | # Real Time Clock | ||
1133 | # | ||
1134 | # CONFIG_RTC_CLASS is not set | ||
1135 | |||
1136 | # | ||
1131 | # Firmware Drivers | 1137 | # Firmware Drivers |
1132 | # | 1138 | # |
1133 | # CONFIG_EDD is not set | 1139 | # CONFIG_EDD is not set |
diff --git a/arch/x86_64/ia32/ia32entry.S b/arch/x86_64/ia32/ia32entry.S index 35b2faccdc6c..5a9802676689 100644 --- a/arch/x86_64/ia32/ia32entry.S +++ b/arch/x86_64/ia32/ia32entry.S | |||
@@ -15,6 +15,8 @@ | |||
15 | #include <asm/vsyscall32.h> | 15 | #include <asm/vsyscall32.h> |
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | 17 | ||
18 | #define IA32_NR_syscalls ((ia32_syscall_end - ia32_sys_call_table)/8) | ||
19 | |||
18 | .macro IA32_ARG_FIXUP noebp=0 | 20 | .macro IA32_ARG_FIXUP noebp=0 |
19 | movl %edi,%r8d | 21 | movl %edi,%r8d |
20 | .if \noebp | 22 | .if \noebp |
@@ -109,8 +111,8 @@ ENTRY(ia32_sysenter_target) | |||
109 | CFI_REMEMBER_STATE | 111 | CFI_REMEMBER_STATE |
110 | jnz sysenter_tracesys | 112 | jnz sysenter_tracesys |
111 | sysenter_do_call: | 113 | sysenter_do_call: |
112 | cmpl $(IA32_NR_syscalls),%eax | 114 | cmpl $(IA32_NR_syscalls-1),%eax |
113 | jae ia32_badsys | 115 | ja ia32_badsys |
114 | IA32_ARG_FIXUP 1 | 116 | IA32_ARG_FIXUP 1 |
115 | call *ia32_sys_call_table(,%rax,8) | 117 | call *ia32_sys_call_table(,%rax,8) |
116 | movq %rax,RAX-ARGOFFSET(%rsp) | 118 | movq %rax,RAX-ARGOFFSET(%rsp) |
@@ -210,8 +212,8 @@ ENTRY(ia32_cstar_target) | |||
210 | CFI_REMEMBER_STATE | 212 | CFI_REMEMBER_STATE |
211 | jnz cstar_tracesys | 213 | jnz cstar_tracesys |
212 | cstar_do_call: | 214 | cstar_do_call: |
213 | cmpl $IA32_NR_syscalls,%eax | 215 | cmpl $IA32_NR_syscalls-1,%eax |
214 | jae ia32_badsys | 216 | ja ia32_badsys |
215 | IA32_ARG_FIXUP 1 | 217 | IA32_ARG_FIXUP 1 |
216 | call *ia32_sys_call_table(,%rax,8) | 218 | call *ia32_sys_call_table(,%rax,8) |
217 | movq %rax,RAX-ARGOFFSET(%rsp) | 219 | movq %rax,RAX-ARGOFFSET(%rsp) |
@@ -296,8 +298,8 @@ ENTRY(ia32_syscall) | |||
296 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10) | 298 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),threadinfo_flags(%r10) |
297 | jnz ia32_tracesys | 299 | jnz ia32_tracesys |
298 | ia32_do_syscall: | 300 | ia32_do_syscall: |
299 | cmpl $(IA32_NR_syscalls),%eax | 301 | cmpl $(IA32_NR_syscalls-1),%eax |
300 | jae ia32_badsys | 302 | ja ia32_badsys |
301 | IA32_ARG_FIXUP | 303 | IA32_ARG_FIXUP |
302 | call *ia32_sys_call_table(,%rax,8) # xxx: rip relative | 304 | call *ia32_sys_call_table(,%rax,8) # xxx: rip relative |
303 | ia32_sysret: | 305 | ia32_sysret: |
@@ -685,12 +687,11 @@ ia32_sys_call_table: | |||
685 | .quad sys_readlinkat /* 305 */ | 687 | .quad sys_readlinkat /* 305 */ |
686 | .quad sys_fchmodat | 688 | .quad sys_fchmodat |
687 | .quad sys_faccessat | 689 | .quad sys_faccessat |
688 | .quad sys_ni_syscall /* pselect6 for now */ | 690 | .quad quiet_ni_syscall /* pselect6 for now */ |
689 | .quad sys_ni_syscall /* ppoll for now */ | 691 | .quad quiet_ni_syscall /* ppoll for now */ |
690 | .quad sys_unshare /* 310 */ | 692 | .quad sys_unshare /* 310 */ |
691 | .quad compat_sys_set_robust_list | 693 | .quad compat_sys_set_robust_list |
692 | .quad compat_sys_get_robust_list | 694 | .quad compat_sys_get_robust_list |
695 | .quad sys_splice | ||
696 | .quad sys_sync_file_range | ||
693 | ia32_syscall_end: | 697 | ia32_syscall_end: |
694 | .rept IA32_NR_syscalls-(ia32_syscall_end-ia32_sys_call_table)/8 | ||
695 | .quad ni_syscall | ||
696 | .endr | ||
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index fffd6b0a2fab..70b9d21ed675 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c | |||
@@ -80,7 +80,7 @@ static int __init aperture_valid(char *name, u64 aper_base, u32 aper_size) | |||
80 | printk("Aperture from %s beyond 4GB. Ignoring.\n",name); | 80 | printk("Aperture from %s beyond 4GB. Ignoring.\n",name); |
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
83 | if (e820_mapped(aper_base, aper_base + aper_size, E820_RAM)) { | 83 | if (e820_any_mapped(aper_base, aper_base + aper_size, E820_RAM)) { |
84 | printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); | 84 | printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); |
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index 293cd71a266a..62776c07cff1 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -80,7 +80,12 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) | |||
80 | return 0; | 80 | return 0; |
81 | } | 81 | } |
82 | 82 | ||
83 | int __init e820_mapped(unsigned long start, unsigned long end, unsigned type) | 83 | /* |
84 | * This function checks if any part of the range <start,end> is mapped | ||
85 | * with type. | ||
86 | */ | ||
87 | int __meminit | ||
88 | e820_any_mapped(unsigned long start, unsigned long end, unsigned type) | ||
84 | { | 89 | { |
85 | int i; | 90 | int i; |
86 | for (i = 0; i < e820.nr_map; i++) { | 91 | for (i = 0; i < e820.nr_map; i++) { |
@@ -94,6 +99,35 @@ int __init e820_mapped(unsigned long start, unsigned long end, unsigned type) | |||
94 | return 0; | 99 | return 0; |
95 | } | 100 | } |
96 | 101 | ||
102 | /* | ||
103 | * This function checks if the entire range <start,end> is mapped with type. | ||
104 | * | ||
105 | * Note: this function only works correct if the e820 table is sorted and | ||
106 | * not-overlapping, which is the case | ||
107 | */ | ||
108 | int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type) | ||
109 | { | ||
110 | int i; | ||
111 | for (i = 0; i < e820.nr_map; i++) { | ||
112 | struct e820entry *ei = &e820.map[i]; | ||
113 | if (type && ei->type != type) | ||
114 | continue; | ||
115 | /* is the region (part) in overlap with the current region ?*/ | ||
116 | if (ei->addr >= end || ei->addr + ei->size <= start) | ||
117 | continue; | ||
118 | |||
119 | /* if the region is at the beginning of <start,end> we move | ||
120 | * start to the end of the region since it's ok until there | ||
121 | */ | ||
122 | if (ei->addr <= start) | ||
123 | start = ei->addr + ei->size; | ||
124 | /* if start is now at or beyond end, we're done, full coverage */ | ||
125 | if (start >= end) | ||
126 | return 1; /* we're done */ | ||
127 | } | ||
128 | return 0; | ||
129 | } | ||
130 | |||
97 | /* | 131 | /* |
98 | * Find a free area in a specific range. | 132 | * Find a free area in a specific range. |
99 | */ | 133 | */ |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 8538bfea30e6..c946e4fe67a7 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -180,6 +180,10 @@ rff_trace: | |||
180 | * | 180 | * |
181 | * XXX if we had a free scratch register we could save the RSP into the stack frame | 181 | * XXX if we had a free scratch register we could save the RSP into the stack frame |
182 | * and report it properly in ps. Unfortunately we haven't. | 182 | * and report it properly in ps. Unfortunately we haven't. |
183 | * | ||
184 | * When user can change the frames always force IRET. That is because | ||
185 | * it deals with uncanonical addresses better. SYSRET has trouble | ||
186 | * with them due to bugs in both AMD and Intel CPUs. | ||
183 | */ | 187 | */ |
184 | 188 | ||
185 | ENTRY(system_call) | 189 | ENTRY(system_call) |
@@ -254,7 +258,10 @@ sysret_signal: | |||
254 | xorl %esi,%esi # oldset -> arg2 | 258 | xorl %esi,%esi # oldset -> arg2 |
255 | call ptregscall_common | 259 | call ptregscall_common |
256 | 1: movl $_TIF_NEED_RESCHED,%edi | 260 | 1: movl $_TIF_NEED_RESCHED,%edi |
257 | jmp sysret_check | 261 | /* Use IRET because user could have changed frame. This |
262 | works because ptregscall_common has called FIXUP_TOP_OF_STACK. */ | ||
263 | cli | ||
264 | jmp int_with_check | ||
258 | 265 | ||
259 | badsys: | 266 | badsys: |
260 | movq $-ENOSYS,RAX-ARGOFFSET(%rsp) | 267 | movq $-ENOSYS,RAX-ARGOFFSET(%rsp) |
@@ -280,7 +287,8 @@ tracesys: | |||
280 | call syscall_trace_leave | 287 | call syscall_trace_leave |
281 | RESTORE_TOP_OF_STACK %rbx | 288 | RESTORE_TOP_OF_STACK %rbx |
282 | RESTORE_REST | 289 | RESTORE_REST |
283 | jmp ret_from_sys_call | 290 | /* Use IRET because user could have changed frame */ |
291 | jmp int_ret_from_sys_call | ||
284 | CFI_ENDPROC | 292 | CFI_ENDPROC |
285 | 293 | ||
286 | /* | 294 | /* |
@@ -408,25 +416,9 @@ ENTRY(stub_execve) | |||
408 | CFI_ADJUST_CFA_OFFSET -8 | 416 | CFI_ADJUST_CFA_OFFSET -8 |
409 | CFI_REGISTER rip, r11 | 417 | CFI_REGISTER rip, r11 |
410 | SAVE_REST | 418 | SAVE_REST |
411 | movq %r11, %r15 | ||
412 | CFI_REGISTER rip, r15 | ||
413 | FIXUP_TOP_OF_STACK %r11 | 419 | FIXUP_TOP_OF_STACK %r11 |
414 | call sys_execve | 420 | call sys_execve |
415 | GET_THREAD_INFO(%rcx) | ||
416 | bt $TIF_IA32,threadinfo_flags(%rcx) | ||
417 | CFI_REMEMBER_STATE | ||
418 | jc exec_32bit | ||
419 | RESTORE_TOP_OF_STACK %r11 | 421 | RESTORE_TOP_OF_STACK %r11 |
420 | movq %r15, %r11 | ||
421 | CFI_REGISTER rip, r11 | ||
422 | RESTORE_REST | ||
423 | pushq %r11 | ||
424 | CFI_ADJUST_CFA_OFFSET 8 | ||
425 | CFI_REL_OFFSET rip, 0 | ||
426 | ret | ||
427 | |||
428 | exec_32bit: | ||
429 | CFI_RESTORE_STATE | ||
430 | movq %rax,RAX(%rsp) | 422 | movq %rax,RAX(%rsp) |
431 | RESTORE_REST | 423 | RESTORE_REST |
432 | jmp int_ret_from_sys_call | 424 | jmp int_ret_from_sys_call |
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index 10b3e348fc99..6f0790e8b6d3 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c | |||
@@ -29,6 +29,8 @@ | |||
29 | #define MISC_MCELOG_MINOR 227 | 29 | #define MISC_MCELOG_MINOR 227 |
30 | #define NR_BANKS 6 | 30 | #define NR_BANKS 6 |
31 | 31 | ||
32 | atomic_t mce_entry; | ||
33 | |||
32 | static int mce_dont_init; | 34 | static int mce_dont_init; |
33 | 35 | ||
34 | /* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic, | 36 | /* 0: always panic, 1: panic if deadlock possible, 2: try to avoid panic, |
@@ -172,10 +174,12 @@ void do_machine_check(struct pt_regs * regs, long error_code) | |||
172 | int i; | 174 | int i; |
173 | int panicm_found = 0; | 175 | int panicm_found = 0; |
174 | 176 | ||
177 | atomic_inc(&mce_entry); | ||
178 | |||
175 | if (regs) | 179 | if (regs) |
176 | notify_die(DIE_NMI, "machine check", regs, error_code, 18, SIGKILL); | 180 | notify_die(DIE_NMI, "machine check", regs, error_code, 18, SIGKILL); |
177 | if (!banks) | 181 | if (!banks) |
178 | return; | 182 | goto out2; |
179 | 183 | ||
180 | memset(&m, 0, sizeof(struct mce)); | 184 | memset(&m, 0, sizeof(struct mce)); |
181 | m.cpu = safe_smp_processor_id(); | 185 | m.cpu = safe_smp_processor_id(); |
@@ -266,6 +270,8 @@ void do_machine_check(struct pt_regs * regs, long error_code) | |||
266 | out: | 270 | out: |
267 | /* Last thing done in the machine check exception to clear state. */ | 271 | /* Last thing done in the machine check exception to clear state. */ |
268 | wrmsrl(MSR_IA32_MCG_STATUS, 0); | 272 | wrmsrl(MSR_IA32_MCG_STATUS, 0); |
273 | out2: | ||
274 | atomic_dec(&mce_entry); | ||
269 | } | 275 | } |
270 | 276 | ||
271 | /* | 277 | /* |
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index d9e4067faf05..4e6357fe0ec3 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <asm/proto.h> | 34 | #include <asm/proto.h> |
35 | #include <asm/kdebug.h> | 35 | #include <asm/kdebug.h> |
36 | #include <asm/local.h> | 36 | #include <asm/local.h> |
37 | #include <asm/mce.h> | ||
37 | 38 | ||
38 | /* | 39 | /* |
39 | * lapic_nmi_owner tracks the ownership of the lapic NMI hardware: | 40 | * lapic_nmi_owner tracks the ownership of the lapic NMI hardware: |
@@ -480,6 +481,12 @@ void __kprobes nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) | |||
480 | __get_cpu_var(nmi_touch) = 0; | 481 | __get_cpu_var(nmi_touch) = 0; |
481 | touched = 1; | 482 | touched = 1; |
482 | } | 483 | } |
484 | #ifdef CONFIG_X86_MCE | ||
485 | /* Could check oops_in_progress here too, but it's safer | ||
486 | not too */ | ||
487 | if (atomic_read(&mce_entry) > 0) | ||
488 | touched = 1; | ||
489 | #endif | ||
483 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { | 490 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { |
484 | /* | 491 | /* |
485 | * Ayiee, looks like this CPU is stuck ... | 492 | * Ayiee, looks like this CPU is stuck ... |
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index 03c9eeedb0f3..af035ede70cd 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -48,9 +48,11 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) | |||
48 | { | 48 | { |
49 | struct page *page; | 49 | struct page *page; |
50 | int node; | 50 | int node; |
51 | #ifdef CONFIG_PCI | ||
51 | if (dev->bus == &pci_bus_type) | 52 | if (dev->bus == &pci_bus_type) |
52 | node = pcibus_to_node(to_pci_dev(dev)->bus); | 53 | node = pcibus_to_node(to_pci_dev(dev)->bus); |
53 | else | 54 | else |
55 | #endif | ||
54 | node = numa_node_id(); | 56 | node = numa_node_id(); |
55 | page = alloc_pages_node(node, gfp, order); | 57 | page = alloc_pages_node(node, gfp, order); |
56 | return page ? page_address(page) : NULL; | 58 | return page ? page_address(page) : NULL; |
diff --git a/arch/x86_64/kernel/process.c b/arch/x86_64/kernel/process.c index 70dd8e5c6889..1c44b53cb15b 100644 --- a/arch/x86_64/kernel/process.c +++ b/arch/x86_64/kernel/process.c | |||
@@ -781,10 +781,16 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr) | |||
781 | } | 781 | } |
782 | case ARCH_GET_GS: { | 782 | case ARCH_GET_GS: { |
783 | unsigned long base; | 783 | unsigned long base; |
784 | unsigned gsindex; | ||
784 | if (task->thread.gsindex == GS_TLS_SEL) | 785 | if (task->thread.gsindex == GS_TLS_SEL) |
785 | base = read_32bit_tls(task, GS_TLS); | 786 | base = read_32bit_tls(task, GS_TLS); |
786 | else if (doit) | 787 | else if (doit) { |
787 | rdmsrl(MSR_KERNEL_GS_BASE, base); | 788 | asm("movl %%gs,%0" : "=r" (gsindex)); |
789 | if (gsindex) | ||
790 | rdmsrl(MSR_KERNEL_GS_BASE, base); | ||
791 | else | ||
792 | base = task->thread.gs; | ||
793 | } | ||
788 | else | 794 | else |
789 | base = task->thread.gs; | 795 | base = task->thread.gs; |
790 | ret = put_user(base, (unsigned long __user *)addr); | 796 | ret = put_user(base, (unsigned long __user *)addr); |
diff --git a/arch/x86_64/kernel/ptrace.c b/arch/x86_64/kernel/ptrace.c index d44b2c1e63a6..da8e7903d817 100644 --- a/arch/x86_64/kernel/ptrace.c +++ b/arch/x86_64/kernel/ptrace.c | |||
@@ -274,11 +274,6 @@ static int putreg(struct task_struct *child, | |||
274 | return -EIO; | 274 | return -EIO; |
275 | value &= 0xffff; | 275 | value &= 0xffff; |
276 | break; | 276 | break; |
277 | case offsetof(struct user_regs_struct, rip): | ||
278 | /* Check if the new RIP address is canonical */ | ||
279 | if (value >= TASK_SIZE_OF(child)) | ||
280 | return -EIO; | ||
281 | break; | ||
282 | } | 277 | } |
283 | put_stack_long(child, regno - sizeof(struct pt_regs), value); | 278 | put_stack_long(child, regno - sizeof(struct pt_regs), value); |
284 | return 0; | 279 | return 0; |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 0856ad444f90..c50b06765a80 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -353,8 +353,10 @@ static __init void parse_cmdline_early (char ** cmdline_p) | |||
353 | if (fullarg(from, "enable_timer_pin_1")) | 353 | if (fullarg(from, "enable_timer_pin_1")) |
354 | disable_timer_pin_1 = -1; | 354 | disable_timer_pin_1 = -1; |
355 | 355 | ||
356 | if (fullarg(from, "nolapic") || fullarg(from, "disableapic")) | 356 | if (fullarg(from, "nolapic") || fullarg(from, "disableapic")) { |
357 | clear_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability); | ||
357 | disable_apic = 1; | 358 | disable_apic = 1; |
359 | } | ||
358 | 360 | ||
359 | if (fullarg(from, "noapic")) | 361 | if (fullarg(from, "noapic")) |
360 | skip_ioapic_setup = 1; | 362 | skip_ioapic_setup = 1; |
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index ef8bc46dc140..7392570f975d 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -726,7 +726,7 @@ static __init int late_hpet_init(void) | |||
726 | unsigned int ntimer; | 726 | unsigned int ntimer; |
727 | 727 | ||
728 | if (!vxtime.hpet_address) | 728 | if (!vxtime.hpet_address) |
729 | return -1; | 729 | return 0; |
730 | 730 | ||
731 | memset(&hd, 0, sizeof (hd)); | 731 | memset(&hd, 0, sizeof (hd)); |
732 | 732 | ||
@@ -917,6 +917,8 @@ void __init time_init(void) | |||
917 | vxtime.hpet_address = 0; | 917 | vxtime.hpet_address = 0; |
918 | 918 | ||
919 | if (hpet_use_timer) { | 919 | if (hpet_use_timer) { |
920 | /* set tick_nsec to use the proper rate for HPET */ | ||
921 | tick_nsec = TICK_NSEC_HPET; | ||
920 | cpu_khz = hpet_calibrate_tsc(); | 922 | cpu_khz = hpet_calibrate_tsc(); |
921 | timename = "HPET"; | 923 | timename = "HPET"; |
922 | #ifdef CONFIG_X86_PM_TIMER | 924 | #ifdef CONFIG_X86_PM_TIMER |
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S index 39ff0708f803..b81f473c4a19 100644 --- a/arch/x86_64/kernel/vmlinux.lds.S +++ b/arch/x86_64/kernel/vmlinux.lds.S | |||
@@ -65,7 +65,7 @@ SECTIONS | |||
65 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { | 65 | .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET) { |
66 | *(.data.cacheline_aligned) | 66 | *(.data.cacheline_aligned) |
67 | } | 67 | } |
68 | . = ALIGN(CONFIG_X86_L1_CACHE_BYTES); | 68 | . = ALIGN(CONFIG_X86_INTERNODE_CACHE_BYTES); |
69 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { | 69 | .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET) { |
70 | *(.data.read_mostly) | 70 | *(.data.read_mostly) |
71 | } | 71 | } |
diff --git a/arch/x86_64/kernel/x8664_ksyms.c b/arch/x86_64/kernel/x8664_ksyms.c index d78f46056bda..1def21c9f7cd 100644 --- a/arch/x86_64/kernel/x8664_ksyms.c +++ b/arch/x86_64/kernel/x8664_ksyms.c | |||
@@ -112,7 +112,6 @@ EXPORT_SYMBOL_GPL(unset_nmi_callback); | |||
112 | #undef memcpy | 112 | #undef memcpy |
113 | #undef memset | 113 | #undef memset |
114 | #undef memmove | 114 | #undef memmove |
115 | #undef strlen | ||
116 | 115 | ||
117 | extern void * memset(void *,int,__kernel_size_t); | 116 | extern void * memset(void *,int,__kernel_size_t); |
118 | extern size_t strlen(const char *); | 117 | extern size_t strlen(const char *); |
@@ -121,8 +120,6 @@ extern void * memcpy(void *,const void *,__kernel_size_t); | |||
121 | extern void * __memcpy(void *,const void *,__kernel_size_t); | 120 | extern void * __memcpy(void *,const void *,__kernel_size_t); |
122 | 121 | ||
123 | EXPORT_SYMBOL(memset); | 122 | EXPORT_SYMBOL(memset); |
124 | EXPORT_SYMBOL(strlen); | ||
125 | EXPORT_SYMBOL(strpbrk); | ||
126 | EXPORT_SYMBOL(memmove); | 123 | EXPORT_SYMBOL(memmove); |
127 | EXPORT_SYMBOL(memcpy); | 124 | EXPORT_SYMBOL(memcpy); |
128 | EXPORT_SYMBOL(__memcpy); | 125 | EXPORT_SYMBOL(__memcpy); |
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index e5f7f1c34462..4ba34e95d835 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -305,7 +305,7 @@ static void __meminit phys_pud_init(pud_t *pud, unsigned long address, unsigned | |||
305 | if (paddr >= end) | 305 | if (paddr >= end) |
306 | break; | 306 | break; |
307 | 307 | ||
308 | if (!after_bootmem && !e820_mapped(paddr, paddr+PUD_SIZE, 0)) { | 308 | if (!after_bootmem && !e820_any_mapped(paddr, paddr+PUD_SIZE, 0)) { |
309 | set_pud(pud, __pud(0)); | 309 | set_pud(pud, __pud(0)); |
310 | continue; | 310 | continue; |
311 | } | 311 | } |
@@ -507,9 +507,8 @@ void __init clear_kernel_mapping(unsigned long address, unsigned long size) | |||
507 | 507 | ||
508 | /* | 508 | /* |
509 | * Memory hotplug specific functions | 509 | * Memory hotplug specific functions |
510 | * These are only for non-NUMA machines right now. | ||
511 | */ | 510 | */ |
512 | #ifdef CONFIG_MEMORY_HOTPLUG | 511 | #if defined(CONFIG_ACPI_HOTPLUG_MEMORY) || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE) |
513 | 512 | ||
514 | void online_page(struct page *page) | 513 | void online_page(struct page *page) |
515 | { | 514 | { |
@@ -520,6 +519,38 @@ void online_page(struct page *page) | |||
520 | num_physpages++; | 519 | num_physpages++; |
521 | } | 520 | } |
522 | 521 | ||
522 | #ifndef CONFIG_MEMORY_HOTPLUG | ||
523 | /* | ||
524 | * Memory Hotadd without sparsemem. The mem_maps have been allocated in advance, | ||
525 | * just online the pages. | ||
526 | */ | ||
527 | int __add_pages(struct zone *z, unsigned long start_pfn, unsigned long nr_pages) | ||
528 | { | ||
529 | int err = -EIO; | ||
530 | unsigned long pfn; | ||
531 | unsigned long total = 0, mem = 0; | ||
532 | for (pfn = start_pfn; pfn < start_pfn + nr_pages; pfn++) { | ||
533 | if (pfn_valid(pfn)) { | ||
534 | online_page(pfn_to_page(pfn)); | ||
535 | err = 0; | ||
536 | mem++; | ||
537 | } | ||
538 | total++; | ||
539 | } | ||
540 | if (!err) { | ||
541 | z->spanned_pages += total; | ||
542 | z->present_pages += mem; | ||
543 | z->zone_pgdat->node_spanned_pages += total; | ||
544 | z->zone_pgdat->node_present_pages += mem; | ||
545 | } | ||
546 | return err; | ||
547 | } | ||
548 | #endif | ||
549 | |||
550 | /* | ||
551 | * Memory is added always to NORMAL zone. This means you will never get | ||
552 | * additional DMA/DMA32 memory. | ||
553 | */ | ||
523 | int add_memory(u64 start, u64 size) | 554 | int add_memory(u64 start, u64 size) |
524 | { | 555 | { |
525 | struct pglist_data *pgdat = NODE_DATA(0); | 556 | struct pglist_data *pgdat = NODE_DATA(0); |
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index 4be82d6e2b48..cc02573a3271 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -100,11 +100,30 @@ int early_pfn_to_nid(unsigned long pfn) | |||
100 | } | 100 | } |
101 | #endif | 101 | #endif |
102 | 102 | ||
103 | static void * __init | ||
104 | early_node_mem(int nodeid, unsigned long start, unsigned long end, | ||
105 | unsigned long size) | ||
106 | { | ||
107 | unsigned long mem = find_e820_area(start, end, size); | ||
108 | void *ptr; | ||
109 | if (mem != -1L) | ||
110 | return __va(mem); | ||
111 | ptr = __alloc_bootmem_nopanic(size, | ||
112 | SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)); | ||
113 | if (ptr == 0) { | ||
114 | printk(KERN_ERR "Cannot find %lu bytes in node %d\n", | ||
115 | size, nodeid); | ||
116 | return NULL; | ||
117 | } | ||
118 | return ptr; | ||
119 | } | ||
120 | |||
103 | /* Initialize bootmem allocator for a node */ | 121 | /* Initialize bootmem allocator for a node */ |
104 | void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) | 122 | void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long end) |
105 | { | 123 | { |
106 | unsigned long start_pfn, end_pfn, bootmap_pages, bootmap_size, bootmap_start; | 124 | unsigned long start_pfn, end_pfn, bootmap_pages, bootmap_size, bootmap_start; |
107 | unsigned long nodedata_phys; | 125 | unsigned long nodedata_phys; |
126 | void *bootmap; | ||
108 | const int pgdat_size = round_up(sizeof(pg_data_t), PAGE_SIZE); | 127 | const int pgdat_size = round_up(sizeof(pg_data_t), PAGE_SIZE); |
109 | 128 | ||
110 | start = round_up(start, ZONE_ALIGN); | 129 | start = round_up(start, ZONE_ALIGN); |
@@ -114,13 +133,11 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en | |||
114 | start_pfn = start >> PAGE_SHIFT; | 133 | start_pfn = start >> PAGE_SHIFT; |
115 | end_pfn = end >> PAGE_SHIFT; | 134 | end_pfn = end >> PAGE_SHIFT; |
116 | 135 | ||
117 | nodedata_phys = find_e820_area(start, end, pgdat_size); | 136 | node_data[nodeid] = early_node_mem(nodeid, start, end, pgdat_size); |
118 | if (nodedata_phys == -1L) | 137 | if (node_data[nodeid] == NULL) |
119 | panic("Cannot find memory pgdat in node %d\n", nodeid); | 138 | return; |
120 | 139 | nodedata_phys = __pa(node_data[nodeid]); | |
121 | Dprintk("nodedata_phys %lx\n", nodedata_phys); | ||
122 | 140 | ||
123 | node_data[nodeid] = phys_to_virt(nodedata_phys); | ||
124 | memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); | 141 | memset(NODE_DATA(nodeid), 0, sizeof(pg_data_t)); |
125 | NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid]; | 142 | NODE_DATA(nodeid)->bdata = &plat_node_bdata[nodeid]; |
126 | NODE_DATA(nodeid)->node_start_pfn = start_pfn; | 143 | NODE_DATA(nodeid)->node_start_pfn = start_pfn; |
@@ -129,9 +146,15 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en | |||
129 | /* Find a place for the bootmem map */ | 146 | /* Find a place for the bootmem map */ |
130 | bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); | 147 | bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn); |
131 | bootmap_start = round_up(nodedata_phys + pgdat_size, PAGE_SIZE); | 148 | bootmap_start = round_up(nodedata_phys + pgdat_size, PAGE_SIZE); |
132 | bootmap_start = find_e820_area(bootmap_start, end, bootmap_pages<<PAGE_SHIFT); | 149 | bootmap = early_node_mem(nodeid, bootmap_start, end, |
133 | if (bootmap_start == -1L) | 150 | bootmap_pages<<PAGE_SHIFT); |
134 | panic("Not enough continuous space for bootmap on node %d", nodeid); | 151 | if (bootmap == NULL) { |
152 | if (nodedata_phys < start || nodedata_phys >= end) | ||
153 | free_bootmem((unsigned long)node_data[nodeid],pgdat_size); | ||
154 | node_data[nodeid] = NULL; | ||
155 | return; | ||
156 | } | ||
157 | bootmap_start = __pa(bootmap); | ||
135 | Dprintk("bootmap start %lu pages %lu\n", bootmap_start, bootmap_pages); | 158 | Dprintk("bootmap start %lu pages %lu\n", bootmap_start, bootmap_pages); |
136 | 159 | ||
137 | bootmap_size = init_bootmem_node(NODE_DATA(nodeid), | 160 | bootmap_size = init_bootmem_node(NODE_DATA(nodeid), |
@@ -142,6 +165,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start, unsigned long en | |||
142 | 165 | ||
143 | reserve_bootmem_node(NODE_DATA(nodeid), nodedata_phys, pgdat_size); | 166 | reserve_bootmem_node(NODE_DATA(nodeid), nodedata_phys, pgdat_size); |
144 | reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT); | 167 | reserve_bootmem_node(NODE_DATA(nodeid), bootmap_start, bootmap_pages<<PAGE_SHIFT); |
168 | #ifdef CONFIG_ACPI_NUMA | ||
169 | srat_reserve_add_area(nodeid); | ||
170 | #endif | ||
145 | node_set_online(nodeid); | 171 | node_set_online(nodeid); |
146 | } | 172 | } |
147 | 173 | ||
@@ -335,6 +361,8 @@ __init int numa_setup(char *opt) | |||
335 | #ifdef CONFIG_ACPI_NUMA | 361 | #ifdef CONFIG_ACPI_NUMA |
336 | if (!strncmp(opt,"noacpi",6)) | 362 | if (!strncmp(opt,"noacpi",6)) |
337 | acpi_numa = -1; | 363 | acpi_numa = -1; |
364 | if (!strncmp(opt,"hotadd=", 7)) | ||
365 | hotadd_percent = simple_strtoul(opt+7, NULL, 10); | ||
338 | #endif | 366 | #endif |
339 | return 1; | 367 | return 1; |
340 | } | 368 | } |
diff --git a/arch/x86_64/mm/srat.c b/arch/x86_64/mm/srat.c index 2eb879590dc4..15ae9fcd65a7 100644 --- a/arch/x86_64/mm/srat.c +++ b/arch/x86_64/mm/srat.c | |||
@@ -15,15 +15,26 @@ | |||
15 | #include <linux/bitmap.h> | 15 | #include <linux/bitmap.h> |
16 | #include <linux/module.h> | 16 | #include <linux/module.h> |
17 | #include <linux/topology.h> | 17 | #include <linux/topology.h> |
18 | #include <linux/bootmem.h> | ||
19 | #include <linux/mm.h> | ||
18 | #include <asm/proto.h> | 20 | #include <asm/proto.h> |
19 | #include <asm/numa.h> | 21 | #include <asm/numa.h> |
20 | #include <asm/e820.h> | 22 | #include <asm/e820.h> |
21 | 23 | ||
24 | #if (defined(CONFIG_ACPI_HOTPLUG_MEMORY) || \ | ||
25 | defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)) \ | ||
26 | && !defined(CONFIG_MEMORY_HOTPLUG) | ||
27 | #define RESERVE_HOTADD 1 | ||
28 | #endif | ||
29 | |||
22 | static struct acpi_table_slit *acpi_slit; | 30 | static struct acpi_table_slit *acpi_slit; |
23 | 31 | ||
24 | static nodemask_t nodes_parsed __initdata; | 32 | static nodemask_t nodes_parsed __initdata; |
25 | static nodemask_t nodes_found __initdata; | 33 | static nodemask_t nodes_found __initdata; |
26 | static struct bootnode nodes[MAX_NUMNODES] __initdata; | 34 | static struct bootnode nodes[MAX_NUMNODES] __initdata; |
35 | static struct bootnode nodes_add[MAX_NUMNODES] __initdata; | ||
36 | static int found_add_area __initdata; | ||
37 | int hotadd_percent __initdata = 10; | ||
27 | static u8 pxm2node[256] = { [0 ... 255] = 0xff }; | 38 | static u8 pxm2node[256] = { [0 ... 255] = 0xff }; |
28 | 39 | ||
29 | /* Too small nodes confuse the VM badly. Usually they result | 40 | /* Too small nodes confuse the VM badly. Usually they result |
@@ -71,6 +82,10 @@ static __init int conflicting_nodes(unsigned long start, unsigned long end) | |||
71 | static __init void cutoff_node(int i, unsigned long start, unsigned long end) | 82 | static __init void cutoff_node(int i, unsigned long start, unsigned long end) |
72 | { | 83 | { |
73 | struct bootnode *nd = &nodes[i]; | 84 | struct bootnode *nd = &nodes[i]; |
85 | |||
86 | if (found_add_area) | ||
87 | return; | ||
88 | |||
74 | if (nd->start < start) { | 89 | if (nd->start < start) { |
75 | nd->start = start; | 90 | nd->start = start; |
76 | if (nd->end < nd->start) | 91 | if (nd->end < nd->start) |
@@ -90,6 +105,8 @@ static __init void bad_srat(void) | |||
90 | acpi_numa = -1; | 105 | acpi_numa = -1; |
91 | for (i = 0; i < MAX_LOCAL_APIC; i++) | 106 | for (i = 0; i < MAX_LOCAL_APIC; i++) |
92 | apicid_to_node[i] = NUMA_NO_NODE; | 107 | apicid_to_node[i] = NUMA_NO_NODE; |
108 | for (i = 0; i < MAX_NUMNODES; i++) | ||
109 | nodes_add[i].start = nodes[i].end = 0; | ||
93 | } | 110 | } |
94 | 111 | ||
95 | static __init inline int srat_disabled(void) | 112 | static __init inline int srat_disabled(void) |
@@ -155,11 +172,114 @@ acpi_numa_processor_affinity_init(struct acpi_table_processor_affinity *pa) | |||
155 | pxm, pa->apic_id, node); | 172 | pxm, pa->apic_id, node); |
156 | } | 173 | } |
157 | 174 | ||
175 | #ifdef RESERVE_HOTADD | ||
176 | /* | ||
177 | * Protect against too large hotadd areas that would fill up memory. | ||
178 | */ | ||
179 | static int hotadd_enough_memory(struct bootnode *nd) | ||
180 | { | ||
181 | static unsigned long allocated; | ||
182 | static unsigned long last_area_end; | ||
183 | unsigned long pages = (nd->end - nd->start) >> PAGE_SHIFT; | ||
184 | long mem = pages * sizeof(struct page); | ||
185 | unsigned long addr; | ||
186 | unsigned long allowed; | ||
187 | unsigned long oldpages = pages; | ||
188 | |||
189 | if (mem < 0) | ||
190 | return 0; | ||
191 | allowed = (end_pfn - e820_hole_size(0, end_pfn)) * PAGE_SIZE; | ||
192 | allowed = (allowed / 100) * hotadd_percent; | ||
193 | if (allocated + mem > allowed) { | ||
194 | /* Give them at least part of their hotadd memory upto hotadd_percent | ||
195 | It would be better to spread the limit out | ||
196 | over multiple hotplug areas, but that is too complicated | ||
197 | right now */ | ||
198 | if (allocated >= allowed) | ||
199 | return 0; | ||
200 | pages = (allowed - allocated + mem) / sizeof(struct page); | ||
201 | mem = pages * sizeof(struct page); | ||
202 | nd->end = nd->start + pages*PAGE_SIZE; | ||
203 | } | ||
204 | /* Not completely fool proof, but a good sanity check */ | ||
205 | addr = find_e820_area(last_area_end, end_pfn<<PAGE_SHIFT, mem); | ||
206 | if (addr == -1UL) | ||
207 | return 0; | ||
208 | if (pages != oldpages) | ||
209 | printk(KERN_NOTICE "SRAT: Hotadd area limited to %lu bytes\n", | ||
210 | pages << PAGE_SHIFT); | ||
211 | last_area_end = addr + mem; | ||
212 | allocated += mem; | ||
213 | return 1; | ||
214 | } | ||
215 | |||
216 | /* | ||
217 | * It is fine to add this area to the nodes data it will be used later | ||
218 | * This code supports one contigious hot add area per node. | ||
219 | */ | ||
220 | static int reserve_hotadd(int node, unsigned long start, unsigned long end) | ||
221 | { | ||
222 | unsigned long s_pfn = start >> PAGE_SHIFT; | ||
223 | unsigned long e_pfn = end >> PAGE_SHIFT; | ||
224 | int changed = 0; | ||
225 | struct bootnode *nd = &nodes_add[node]; | ||
226 | |||
227 | /* I had some trouble with strange memory hotadd regions breaking | ||
228 | the boot. Be very strict here and reject anything unexpected. | ||
229 | If you want working memory hotadd write correct SRATs. | ||
230 | |||
231 | The node size check is a basic sanity check to guard against | ||
232 | mistakes */ | ||
233 | if ((signed long)(end - start) < NODE_MIN_SIZE) { | ||
234 | printk(KERN_ERR "SRAT: Hotplug area too small\n"); | ||
235 | return -1; | ||
236 | } | ||
237 | |||
238 | /* This check might be a bit too strict, but I'm keeping it for now. */ | ||
239 | if (e820_hole_size(s_pfn, e_pfn) != e_pfn - s_pfn) { | ||
240 | printk(KERN_ERR "SRAT: Hotplug area has existing memory\n"); | ||
241 | return -1; | ||
242 | } | ||
243 | |||
244 | if (!hotadd_enough_memory(&nodes_add[node])) { | ||
245 | printk(KERN_ERR "SRAT: Hotplug area too large\n"); | ||
246 | return -1; | ||
247 | } | ||
248 | |||
249 | /* Looks good */ | ||
250 | |||
251 | found_add_area = 1; | ||
252 | if (nd->start == nd->end) { | ||
253 | nd->start = start; | ||
254 | nd->end = end; | ||
255 | changed = 1; | ||
256 | } else { | ||
257 | if (nd->start == end) { | ||
258 | nd->start = start; | ||
259 | changed = 1; | ||
260 | } | ||
261 | if (nd->end == start) { | ||
262 | nd->end = end; | ||
263 | changed = 1; | ||
264 | } | ||
265 | if (!changed) | ||
266 | printk(KERN_ERR "SRAT: Hotplug zone not continuous. Partly ignored\n"); | ||
267 | } | ||
268 | |||
269 | if ((nd->end >> PAGE_SHIFT) > end_pfn) | ||
270 | end_pfn = nd->end >> PAGE_SHIFT; | ||
271 | |||
272 | if (changed) | ||
273 | printk(KERN_INFO "SRAT: hot plug zone found %Lx - %Lx\n", nd->start, nd->end); | ||
274 | return 0; | ||
275 | } | ||
276 | #endif | ||
277 | |||
158 | /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ | 278 | /* Callback for parsing of the Proximity Domain <-> Memory Area mappings */ |
159 | void __init | 279 | void __init |
160 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | 280 | acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) |
161 | { | 281 | { |
162 | struct bootnode *nd; | 282 | struct bootnode *nd, oldnode; |
163 | unsigned long start, end; | 283 | unsigned long start, end; |
164 | int node, pxm; | 284 | int node, pxm; |
165 | int i; | 285 | int i; |
@@ -172,6 +292,8 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
172 | } | 292 | } |
173 | if (ma->flags.enabled == 0) | 293 | if (ma->flags.enabled == 0) |
174 | return; | 294 | return; |
295 | if (ma->flags.hot_pluggable && hotadd_percent == 0) | ||
296 | return; | ||
175 | start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); | 297 | start = ma->base_addr_lo | ((u64)ma->base_addr_hi << 32); |
176 | end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); | 298 | end = start + (ma->length_lo | ((u64)ma->length_hi << 32)); |
177 | pxm = ma->proximity_domain; | 299 | pxm = ma->proximity_domain; |
@@ -181,10 +303,6 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
181 | bad_srat(); | 303 | bad_srat(); |
182 | return; | 304 | return; |
183 | } | 305 | } |
184 | /* It is fine to add this area to the nodes data it will be used later*/ | ||
185 | if (ma->flags.hot_pluggable == 1) | ||
186 | printk(KERN_INFO "SRAT: hot plug zone found %lx - %lx \n", | ||
187 | start, end); | ||
188 | i = conflicting_nodes(start, end); | 306 | i = conflicting_nodes(start, end); |
189 | if (i == node) { | 307 | if (i == node) { |
190 | printk(KERN_WARNING | 308 | printk(KERN_WARNING |
@@ -199,6 +317,7 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
199 | return; | 317 | return; |
200 | } | 318 | } |
201 | nd = &nodes[node]; | 319 | nd = &nodes[node]; |
320 | oldnode = *nd; | ||
202 | if (!node_test_and_set(node, nodes_parsed)) { | 321 | if (!node_test_and_set(node, nodes_parsed)) { |
203 | nd->start = start; | 322 | nd->start = start; |
204 | nd->end = end; | 323 | nd->end = end; |
@@ -208,8 +327,19 @@ acpi_numa_memory_affinity_init(struct acpi_table_memory_affinity *ma) | |||
208 | if (nd->end < end) | 327 | if (nd->end < end) |
209 | nd->end = end; | 328 | nd->end = end; |
210 | } | 329 | } |
330 | |||
211 | printk(KERN_INFO "SRAT: Node %u PXM %u %Lx-%Lx\n", node, pxm, | 331 | printk(KERN_INFO "SRAT: Node %u PXM %u %Lx-%Lx\n", node, pxm, |
212 | nd->start, nd->end); | 332 | nd->start, nd->end); |
333 | |||
334 | #ifdef RESERVE_HOTADD | ||
335 | if (ma->flags.hot_pluggable && reserve_hotadd(node, start, end) < 0) { | ||
336 | /* Ignore hotadd region. Undo damage */ | ||
337 | printk(KERN_NOTICE "SRAT: Hotplug region ignored\n"); | ||
338 | *nd = oldnode; | ||
339 | if ((nd->start | nd->end) == 0) | ||
340 | node_clear(node, nodes_parsed); | ||
341 | } | ||
342 | #endif | ||
213 | } | 343 | } |
214 | 344 | ||
215 | /* Sanity check to catch more bad SRATs (they are amazingly common). | 345 | /* Sanity check to catch more bad SRATs (they are amazingly common). |
@@ -225,6 +355,9 @@ static int nodes_cover_memory(void) | |||
225 | unsigned long e = nodes[i].end >> PAGE_SHIFT; | 355 | unsigned long e = nodes[i].end >> PAGE_SHIFT; |
226 | pxmram += e - s; | 356 | pxmram += e - s; |
227 | pxmram -= e820_hole_size(s, e); | 357 | pxmram -= e820_hole_size(s, e); |
358 | pxmram -= nodes_add[i].end - nodes_add[i].start; | ||
359 | if ((long)pxmram < 0) | ||
360 | pxmram = 0; | ||
228 | } | 361 | } |
229 | 362 | ||
230 | e820ram = end_pfn - e820_hole_size(0, end_pfn); | 363 | e820ram = end_pfn - e820_hole_size(0, end_pfn); |
@@ -258,7 +391,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
258 | 391 | ||
259 | /* First clean up the node list */ | 392 | /* First clean up the node list */ |
260 | for (i = 0; i < MAX_NUMNODES; i++) { | 393 | for (i = 0; i < MAX_NUMNODES; i++) { |
261 | cutoff_node(i, start, end); | 394 | cutoff_node(i, start, end); |
262 | if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) | 395 | if ((nodes[i].end - nodes[i].start) < NODE_MIN_SIZE) |
263 | unparse_node(i); | 396 | unparse_node(i); |
264 | } | 397 | } |
@@ -282,6 +415,12 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) | |||
282 | /* Finally register nodes */ | 415 | /* Finally register nodes */ |
283 | for_each_node_mask(i, nodes_parsed) | 416 | for_each_node_mask(i, nodes_parsed) |
284 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | 417 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); |
418 | /* Try again in case setup_node_bootmem missed one due | ||
419 | to missing bootmem */ | ||
420 | for_each_node_mask(i, nodes_parsed) | ||
421 | if (!node_online(i)) | ||
422 | setup_node_bootmem(i, nodes[i].start, nodes[i].end); | ||
423 | |||
285 | for (i = 0; i < NR_CPUS; i++) { | 424 | for (i = 0; i < NR_CPUS; i++) { |
286 | if (cpu_to_node[i] == NUMA_NO_NODE) | 425 | if (cpu_to_node[i] == NUMA_NO_NODE) |
287 | continue; | 426 | continue; |
@@ -303,6 +442,25 @@ static int node_to_pxm(int n) | |||
303 | return 0; | 442 | return 0; |
304 | } | 443 | } |
305 | 444 | ||
445 | void __init srat_reserve_add_area(int nodeid) | ||
446 | { | ||
447 | if (found_add_area && nodes_add[nodeid].end) { | ||
448 | u64 total_mb; | ||
449 | |||
450 | printk(KERN_INFO "SRAT: Reserving hot-add memory space " | ||
451 | "for node %d at %Lx-%Lx\n", | ||
452 | nodeid, nodes_add[nodeid].start, nodes_add[nodeid].end); | ||
453 | total_mb = (nodes_add[nodeid].end - nodes_add[nodeid].start) | ||
454 | >> PAGE_SHIFT; | ||
455 | total_mb *= sizeof(struct page); | ||
456 | total_mb >>= 20; | ||
457 | printk(KERN_INFO "SRAT: This will cost you %Lu MB of " | ||
458 | "pre-allocated memory.\n", (unsigned long long)total_mb); | ||
459 | reserve_bootmem_node(NODE_DATA(nodeid), nodes_add[nodeid].start, | ||
460 | nodes_add[nodeid].end - nodes_add[nodeid].start); | ||
461 | } | ||
462 | } | ||
463 | |||
306 | int __node_distance(int a, int b) | 464 | int __node_distance(int a, int b) |
307 | { | 465 | { |
308 | int index; | 466 | int index; |
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index e616500207e4..a2060e4d5de6 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -9,11 +9,16 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/acpi.h> | 10 | #include <linux/acpi.h> |
11 | #include <linux/bitmap.h> | 11 | #include <linux/bitmap.h> |
12 | #include <asm/e820.h> | ||
13 | |||
12 | #include "pci.h" | 14 | #include "pci.h" |
13 | 15 | ||
14 | #define MMCONFIG_APER_SIZE (256*1024*1024) | 16 | #define MMCONFIG_APER_SIZE (256*1024*1024) |
17 | /* Verify the first 16 busses. We assume that systems with more busses | ||
18 | get MCFG right. */ | ||
19 | #define MAX_CHECK_BUS 16 | ||
15 | 20 | ||
16 | static DECLARE_BITMAP(fallback_slots, 32); | 21 | static DECLARE_BITMAP(fallback_slots, 32*MAX_CHECK_BUS); |
17 | 22 | ||
18 | /* Static virtual mapping of the MMCONFIG aperture */ | 23 | /* Static virtual mapping of the MMCONFIG aperture */ |
19 | struct mmcfg_virt { | 24 | struct mmcfg_virt { |
@@ -55,7 +60,8 @@ static char __iomem *get_virt(unsigned int seg, unsigned bus) | |||
55 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) | 60 | static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn) |
56 | { | 61 | { |
57 | char __iomem *addr; | 62 | char __iomem *addr; |
58 | if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), fallback_slots)) | 63 | if (seg == 0 && bus < MAX_CHECK_BUS && |
64 | test_bit(32*bus + PCI_SLOT(devfn), fallback_slots)) | ||
59 | return NULL; | 65 | return NULL; |
60 | addr = get_virt(seg, bus); | 66 | addr = get_virt(seg, bus); |
61 | if (!addr) | 67 | if (!addr) |
@@ -69,8 +75,10 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus, | |||
69 | char __iomem *addr; | 75 | char __iomem *addr; |
70 | 76 | ||
71 | /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ | 77 | /* Why do we have this when nobody checks it. How about a BUG()!? -AK */ |
72 | if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095))) | 78 | if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095))) { |
79 | *value = -1; | ||
73 | return -EINVAL; | 80 | return -EINVAL; |
81 | } | ||
74 | 82 | ||
75 | addr = pci_dev_base(seg, bus, devfn); | 83 | addr = pci_dev_base(seg, bus, devfn); |
76 | if (!addr) | 84 | if (!addr) |
@@ -129,21 +137,26 @@ static struct pci_raw_ops pci_mmcfg = { | |||
129 | Normally this can be expressed in the MCFG by not listing them | 137 | Normally this can be expressed in the MCFG by not listing them |
130 | and assigning suitable _SEGs, but this isn't implemented in some BIOS. | 138 | and assigning suitable _SEGs, but this isn't implemented in some BIOS. |
131 | Instead try to discover all devices on bus 0 that are unreachable using MM | 139 | Instead try to discover all devices on bus 0 that are unreachable using MM |
132 | and fallback for them. | 140 | and fallback for them. */ |
133 | We only do this for bus 0/seg 0 */ | ||
134 | static __init void unreachable_devices(void) | 141 | static __init void unreachable_devices(void) |
135 | { | 142 | { |
136 | int i; | 143 | int i, k; |
137 | for (i = 0; i < 32; i++) { | 144 | /* Use the max bus number from ACPI here? */ |
138 | u32 val1; | 145 | for (k = 0; k < MAX_CHECK_BUS; k++) { |
139 | char __iomem *addr; | 146 | for (i = 0; i < 32; i++) { |
140 | 147 | u32 val1; | |
141 | pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1); | 148 | char __iomem *addr; |
142 | if (val1 == 0xffffffff) | 149 | |
143 | continue; | 150 | pci_conf1_read(0, k, PCI_DEVFN(i,0), 0, 4, &val1); |
144 | addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0)); | 151 | if (val1 == 0xffffffff) |
145 | if (addr == NULL|| readl(addr) != val1) { | 152 | continue; |
146 | set_bit(i, fallback_slots); | 153 | addr = pci_dev_base(0, k, PCI_DEVFN(i, 0)); |
154 | if (addr == NULL|| readl(addr) != val1) { | ||
155 | set_bit(i + 32*k, fallback_slots); | ||
156 | printk(KERN_NOTICE | ||
157 | "PCI: No mmconfig possible on device %x:%x\n", | ||
158 | k, i); | ||
159 | } | ||
147 | } | 160 | } |
148 | } | 161 | } |
149 | } | 162 | } |
@@ -161,6 +174,14 @@ void __init pci_mmcfg_init(void) | |||
161 | (pci_mmcfg_config[0].base_address == 0)) | 174 | (pci_mmcfg_config[0].base_address == 0)) |
162 | return; | 175 | return; |
163 | 176 | ||
177 | if (!e820_all_mapped(pci_mmcfg_config[0].base_address, | ||
178 | pci_mmcfg_config[0].base_address + MMCONFIG_APER_SIZE, | ||
179 | E820_RESERVED)) { | ||
180 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area is not E820-reserved\n"); | ||
181 | printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); | ||
182 | return; | ||
183 | } | ||
184 | |||
164 | /* RED-PEN i386 doesn't do _nocache right now */ | 185 | /* RED-PEN i386 doesn't do _nocache right now */ |
165 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); | 186 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); |
166 | if (pci_mmcfg_virt == NULL) { | 187 | if (pci_mmcfg_virt == NULL) { |
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c index 152b9370789b..a15b6e3e72c8 100644 --- a/arch/xtensa/kernel/xtensa_ksyms.c +++ b/arch/xtensa/kernel/xtensa_ksyms.c | |||
@@ -48,7 +48,6 @@ EXPORT_SYMBOL(memchr); | |||
48 | EXPORT_SYMBOL(strcat); | 48 | EXPORT_SYMBOL(strcat); |
49 | EXPORT_SYMBOL(strchr); | 49 | EXPORT_SYMBOL(strchr); |
50 | EXPORT_SYMBOL(strlen); | 50 | EXPORT_SYMBOL(strlen); |
51 | EXPORT_SYMBOL(strpbrk); | ||
52 | EXPORT_SYMBOL(strncat); | 51 | EXPORT_SYMBOL(strncat); |
53 | EXPORT_SYMBOL(strnlen); | 52 | EXPORT_SYMBOL(strnlen); |
54 | EXPORT_SYMBOL(strrchr); | 53 | EXPORT_SYMBOL(strrchr); |