diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-24 15:52:27 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-24 15:52:27 -0500 |
commit | 87b203079ed949de52f0d92aeae20e5e0116c12f (patch) | |
tree | 1878756f936963822ed2d51a15db1da5814973e7 /arch | |
parent | 58105ef1857112a186696c9b8957020090226a28 (diff) | |
parent | a852cbfaaf8122827602027b1614971cfd832304 (diff) |
Merge branch 'x86/core' into core/percpu
Diffstat (limited to 'arch')
378 files changed, 9791 insertions, 12436 deletions
diff --git a/arch/alpha/include/asm/statfs.h b/arch/alpha/include/asm/statfs.h index de35cd438a10..ccd2e186bfd8 100644 --- a/arch/alpha/include/asm/statfs.h +++ b/arch/alpha/include/asm/statfs.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ALPHA_STATFS_H | 1 | #ifndef _ALPHA_STATFS_H |
2 | #define _ALPHA_STATFS_H | 2 | #define _ALPHA_STATFS_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't | 6 | /* Alpha is the only 64-bit platform with 32-bit statfs. And doesn't |
5 | even seem to implement statfs64 */ | 7 | even seem to implement statfs64 */ |
6 | #define __statfs_word __u32 | 8 | #define __statfs_word __u32 |
diff --git a/arch/alpha/include/asm/swab.h b/arch/alpha/include/asm/swab.h index 68e7089e02d5..4d682b16c7c4 100644 --- a/arch/alpha/include/asm/swab.h +++ b/arch/alpha/include/asm/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ALPHA_SWAB_H | 1 | #ifndef _ALPHA_SWAB_H |
2 | #define _ALPHA_SWAB_H | 2 | #define _ALPHA_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | #include <asm/compiler.h> | 6 | #include <asm/compiler.h> |
7 | 7 | ||
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c index f238370c907d..8d0097f10208 100644 --- a/arch/alpha/kernel/process.c +++ b/arch/alpha/kernel/process.c | |||
@@ -93,8 +93,8 @@ common_shutdown_1(void *generic_ptr) | |||
93 | if (cpuid != boot_cpuid) { | 93 | if (cpuid != boot_cpuid) { |
94 | flags |= 0x00040000UL; /* "remain halted" */ | 94 | flags |= 0x00040000UL; /* "remain halted" */ |
95 | *pflags = flags; | 95 | *pflags = flags; |
96 | cpu_clear(cpuid, cpu_present_map); | 96 | set_cpu_present(cpuid, false); |
97 | cpu_clear(cpuid, cpu_possible_map); | 97 | set_cpu_possible(cpuid, false); |
98 | halt(); | 98 | halt(); |
99 | } | 99 | } |
100 | #endif | 100 | #endif |
@@ -120,8 +120,8 @@ common_shutdown_1(void *generic_ptr) | |||
120 | 120 | ||
121 | #ifdef CONFIG_SMP | 121 | #ifdef CONFIG_SMP |
122 | /* Wait for the secondaries to halt. */ | 122 | /* Wait for the secondaries to halt. */ |
123 | cpu_clear(boot_cpuid, cpu_present_map); | 123 | set_cpu_present(boot_cpuid, false); |
124 | cpu_clear(boot_cpuid, cpu_possible_map); | 124 | set_cpu_possible(boot_cpuid, false); |
125 | while (cpus_weight(cpu_present_map)) | 125 | while (cpus_weight(cpu_present_map)) |
126 | barrier(); | 126 | barrier(); |
127 | #endif | 127 | #endif |
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 00f1dc3dfd5f..b1fe5674c3a1 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c | |||
@@ -120,12 +120,12 @@ void __cpuinit | |||
120 | smp_callin(void) | 120 | smp_callin(void) |
121 | { | 121 | { |
122 | int cpuid = hard_smp_processor_id(); | 122 | int cpuid = hard_smp_processor_id(); |
123 | cpumask_t mask = cpu_online_map; | ||
124 | 123 | ||
125 | if (cpu_test_and_set(cpuid, mask)) { | 124 | if (cpu_online(cpuid)) { |
126 | printk("??, cpu 0x%x already present??\n", cpuid); | 125 | printk("??, cpu 0x%x already present??\n", cpuid); |
127 | BUG(); | 126 | BUG(); |
128 | } | 127 | } |
128 | set_cpu_online(cpuid, true); | ||
129 | 129 | ||
130 | /* Turn on machine checks. */ | 130 | /* Turn on machine checks. */ |
131 | wrmces(7); | 131 | wrmces(7); |
@@ -436,8 +436,8 @@ setup_smp(void) | |||
436 | ((char *)cpubase + i*hwrpb->processor_size); | 436 | ((char *)cpubase + i*hwrpb->processor_size); |
437 | if ((cpu->flags & 0x1cc) == 0x1cc) { | 437 | if ((cpu->flags & 0x1cc) == 0x1cc) { |
438 | smp_num_probed++; | 438 | smp_num_probed++; |
439 | cpu_set(i, cpu_possible_map); | 439 | set_cpu_possible(i, true); |
440 | cpu_set(i, cpu_present_map); | 440 | set_cpu_present(i, true); |
441 | cpu->pal_revision = boot_cpu_palrev; | 441 | cpu->pal_revision = boot_cpu_palrev; |
442 | } | 442 | } |
443 | 443 | ||
@@ -470,8 +470,8 @@ smp_prepare_cpus(unsigned int max_cpus) | |||
470 | 470 | ||
471 | /* Nothing to do on a UP box, or when told not to. */ | 471 | /* Nothing to do on a UP box, or when told not to. */ |
472 | if (smp_num_probed == 1 || max_cpus == 0) { | 472 | if (smp_num_probed == 1 || max_cpus == 0) { |
473 | cpu_possible_map = cpumask_of_cpu(boot_cpuid); | 473 | init_cpu_possible(cpumask_of(boot_cpuid)); |
474 | cpu_present_map = cpumask_of_cpu(boot_cpuid); | 474 | init_cpu_present(cpumask_of(boot_cpuid)); |
475 | printk(KERN_INFO "SMP mode deactivated.\n"); | 475 | printk(KERN_INFO "SMP mode deactivated.\n"); |
476 | return; | 476 | return; |
477 | } | 477 | } |
diff --git a/arch/arm/configs/at91sam9260ek_defconfig b/arch/arm/configs/at91sam9260ek_defconfig index e0ee7060f9aa..98e2f3de4bc5 100644 --- a/arch/arm/configs/at91sam9260ek_defconfig +++ b/arch/arm/configs/at91sam9260ek_defconfig | |||
@@ -608,7 +608,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
608 | # Watchdog Device Drivers | 608 | # Watchdog Device Drivers |
609 | # | 609 | # |
610 | # CONFIG_SOFT_WATCHDOG is not set | 610 | # CONFIG_SOFT_WATCHDOG is not set |
611 | CONFIG_AT91SAM9_WATCHDOG=y | 611 | CONFIG_AT91SAM9X_WATCHDOG=y |
612 | 612 | ||
613 | # | 613 | # |
614 | # USB-based Watchdog Cards | 614 | # USB-based Watchdog Cards |
diff --git a/arch/arm/configs/at91sam9261ek_defconfig b/arch/arm/configs/at91sam9261ek_defconfig index 01d1ef97d8be..149456142392 100644 --- a/arch/arm/configs/at91sam9261ek_defconfig +++ b/arch/arm/configs/at91sam9261ek_defconfig | |||
@@ -700,7 +700,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
700 | # Watchdog Device Drivers | 700 | # Watchdog Device Drivers |
701 | # | 701 | # |
702 | # CONFIG_SOFT_WATCHDOG is not set | 702 | # CONFIG_SOFT_WATCHDOG is not set |
703 | CONFIG_AT91SAM9_WATCHDOG=y | 703 | CONFIG_AT91SAM9X_WATCHDOG=y |
704 | 704 | ||
705 | # | 705 | # |
706 | # USB-based Watchdog Cards | 706 | # USB-based Watchdog Cards |
diff --git a/arch/arm/configs/at91sam9263ek_defconfig b/arch/arm/configs/at91sam9263ek_defconfig index 036a126725c1..21599f3c6275 100644 --- a/arch/arm/configs/at91sam9263ek_defconfig +++ b/arch/arm/configs/at91sam9263ek_defconfig | |||
@@ -710,7 +710,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
710 | # Watchdog Device Drivers | 710 | # Watchdog Device Drivers |
711 | # | 711 | # |
712 | # CONFIG_SOFT_WATCHDOG is not set | 712 | # CONFIG_SOFT_WATCHDOG is not set |
713 | CONFIG_AT91SAM9_WATCHDOG=y | 713 | CONFIG_AT91SAM9X_WATCHDOG=y |
714 | 714 | ||
715 | # | 715 | # |
716 | # USB-based Watchdog Cards | 716 | # USB-based Watchdog Cards |
diff --git a/arch/arm/configs/at91sam9rlek_defconfig b/arch/arm/configs/at91sam9rlek_defconfig index 237a2a6a8517..e2df81a3e804 100644 --- a/arch/arm/configs/at91sam9rlek_defconfig +++ b/arch/arm/configs/at91sam9rlek_defconfig | |||
@@ -606,7 +606,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
606 | # Watchdog Device Drivers | 606 | # Watchdog Device Drivers |
607 | # | 607 | # |
608 | # CONFIG_SOFT_WATCHDOG is not set | 608 | # CONFIG_SOFT_WATCHDOG is not set |
609 | CONFIG_AT91SAM9_WATCHDOG=y | 609 | CONFIG_AT91SAM9X_WATCHDOG=y |
610 | 610 | ||
611 | # | 611 | # |
612 | # Sonics Silicon Backplane | 612 | # Sonics Silicon Backplane |
diff --git a/arch/arm/configs/qil-a9260_defconfig b/arch/arm/configs/qil-a9260_defconfig index cd1d717903ac..9b32d0eb89ba 100644 --- a/arch/arm/configs/qil-a9260_defconfig +++ b/arch/arm/configs/qil-a9260_defconfig | |||
@@ -727,7 +727,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y | |||
727 | # Watchdog Device Drivers | 727 | # Watchdog Device Drivers |
728 | # | 728 | # |
729 | # CONFIG_SOFT_WATCHDOG is not set | 729 | # CONFIG_SOFT_WATCHDOG is not set |
730 | # CONFIG_AT91SAM9_WATCHDOG is not set | 730 | # CONFIG_AT91SAM9X_WATCHDOG is not set |
731 | 731 | ||
732 | # | 732 | # |
733 | # USB-based Watchdog Cards | 733 | # USB-based Watchdog Cards |
diff --git a/arch/arm/include/asm/a.out.h b/arch/arm/include/asm/a.out.h index 79489fdcc8b8..083894b2e3bc 100644 --- a/arch/arm/include/asm/a.out.h +++ b/arch/arm/include/asm/a.out.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define __ARM_A_OUT_H__ | 2 | #define __ARM_A_OUT_H__ |
3 | 3 | ||
4 | #include <linux/personality.h> | 4 | #include <linux/personality.h> |
5 | #include <asm/types.h> | 5 | #include <linux/types.h> |
6 | 6 | ||
7 | struct exec | 7 | struct exec |
8 | { | 8 | { |
diff --git a/arch/arm/include/asm/setup.h b/arch/arm/include/asm/setup.h index f2cd18a0932b..ee1304f22f94 100644 --- a/arch/arm/include/asm/setup.h +++ b/arch/arm/include/asm/setup.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #ifndef __ASMARM_SETUP_H | 14 | #ifndef __ASMARM_SETUP_H |
15 | #define __ASMARM_SETUP_H | 15 | #define __ASMARM_SETUP_H |
16 | 16 | ||
17 | #include <asm/types.h> | 17 | #include <linux/types.h> |
18 | 18 | ||
19 | #define COMMAND_LINE_SIZE 1024 | 19 | #define COMMAND_LINE_SIZE 1024 |
20 | 20 | ||
diff --git a/arch/arm/include/asm/swab.h b/arch/arm/include/asm/swab.h index 27a689be0856..ca2bf2f6d6ea 100644 --- a/arch/arm/include/asm/swab.h +++ b/arch/arm/include/asm/swab.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define __ASM_ARM_SWAB_H | 16 | #define __ASM_ARM_SWAB_H |
17 | 17 | ||
18 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
19 | #include <asm/types.h> | 19 | #include <linux/types.h> |
20 | 20 | ||
21 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 21 | #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
22 | # define __SWAB_64_THRU_32__ | 22 | # define __SWAB_64_THRU_32__ |
diff --git a/arch/arm/kernel/elf.c b/arch/arm/kernel/elf.c index 84849098c8e8..d4a0da1e48f4 100644 --- a/arch/arm/kernel/elf.c +++ b/arch/arm/kernel/elf.c | |||
@@ -74,9 +74,9 @@ EXPORT_SYMBOL(elf_set_personality); | |||
74 | */ | 74 | */ |
75 | int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack) | 75 | int arm_elf_read_implies_exec(const struct elf32_hdr *x, int executable_stack) |
76 | { | 76 | { |
77 | if (executable_stack != EXSTACK_ENABLE_X) | 77 | if (executable_stack != EXSTACK_DISABLE_X) |
78 | return 1; | 78 | return 1; |
79 | if (cpu_architecture() <= CPU_ARCH_ARMv6) | 79 | if (cpu_architecture() < CPU_ARCH_ARMv6) |
80 | return 1; | 80 | return 1; |
81 | return 0; | 81 | return 0; |
82 | } | 82 | } |
diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c index 440dc62cdc3a..598ca61e7bca 100644 --- a/arch/arm/kernel/machine_kexec.c +++ b/arch/arm/kernel/machine_kexec.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <asm/cacheflush.h> | 13 | #include <asm/cacheflush.h> |
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | 15 | ||
16 | const extern unsigned char relocate_new_kernel[]; | 16 | extern const unsigned char relocate_new_kernel[]; |
17 | const extern unsigned int relocate_new_kernel_size; | 17 | extern const unsigned int relocate_new_kernel_size; |
18 | 18 | ||
19 | extern void setup_mm_for_reboot(char mode); | 19 | extern void setup_mm_for_reboot(char mode); |
20 | 20 | ||
diff --git a/arch/arm/mach-at91/at91cap9_devices.c b/arch/arm/mach-at91/at91cap9_devices.c index 9eca2209cde6..412aa49ad2fb 100644 --- a/arch/arm/mach-at91/at91cap9_devices.c +++ b/arch/arm/mach-at91/at91cap9_devices.c | |||
@@ -697,7 +697,7 @@ static void __init at91_add_device_rtt(void) | |||
697 | * Watchdog | 697 | * Watchdog |
698 | * -------------------------------------------------------------------- */ | 698 | * -------------------------------------------------------------------- */ |
699 | 699 | ||
700 | #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | 700 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
701 | static struct platform_device at91cap9_wdt_device = { | 701 | static struct platform_device at91cap9_wdt_device = { |
702 | .name = "at91_wdt", | 702 | .name = "at91_wdt", |
703 | .id = -1, | 703 | .id = -1, |
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c index fdde1ea21b07..d74c9ac007e7 100644 --- a/arch/arm/mach-at91/at91sam9260_devices.c +++ b/arch/arm/mach-at91/at91sam9260_devices.c | |||
@@ -643,7 +643,7 @@ static void __init at91_add_device_rtt(void) | |||
643 | * Watchdog | 643 | * Watchdog |
644 | * -------------------------------------------------------------------- */ | 644 | * -------------------------------------------------------------------- */ |
645 | 645 | ||
646 | #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | 646 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
647 | static struct platform_device at91sam9260_wdt_device = { | 647 | static struct platform_device at91sam9260_wdt_device = { |
648 | .name = "at91_wdt", | 648 | .name = "at91_wdt", |
649 | .id = -1, | 649 | .id = -1, |
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c index 17289756f80f..59fc48311fb0 100644 --- a/arch/arm/mach-at91/at91sam9261_devices.c +++ b/arch/arm/mach-at91/at91sam9261_devices.c | |||
@@ -621,7 +621,7 @@ static void __init at91_add_device_rtt(void) | |||
621 | * Watchdog | 621 | * Watchdog |
622 | * -------------------------------------------------------------------- */ | 622 | * -------------------------------------------------------------------- */ |
623 | 623 | ||
624 | #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | 624 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
625 | static struct platform_device at91sam9261_wdt_device = { | 625 | static struct platform_device at91sam9261_wdt_device = { |
626 | .name = "at91_wdt", | 626 | .name = "at91_wdt", |
627 | .id = -1, | 627 | .id = -1, |
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index b753cb879d8e..134af97ff340 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -854,7 +854,7 @@ static void __init at91_add_device_rtt(void) | |||
854 | * Watchdog | 854 | * Watchdog |
855 | * -------------------------------------------------------------------- */ | 855 | * -------------------------------------------------------------------- */ |
856 | 856 | ||
857 | #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | 857 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
858 | static struct platform_device at91sam9263_wdt_device = { | 858 | static struct platform_device at91sam9263_wdt_device = { |
859 | .name = "at91_wdt", | 859 | .name = "at91_wdt", |
860 | .id = -1, | 860 | .id = -1, |
diff --git a/arch/arm/mach-at91/at91sam9rl_devices.c b/arch/arm/mach-at91/at91sam9rl_devices.c index 145324f4ec56..728186515cdf 100644 --- a/arch/arm/mach-at91/at91sam9rl_devices.c +++ b/arch/arm/mach-at91/at91sam9rl_devices.c | |||
@@ -609,7 +609,7 @@ static void __init at91_add_device_rtt(void) | |||
609 | * Watchdog | 609 | * Watchdog |
610 | * -------------------------------------------------------------------- */ | 610 | * -------------------------------------------------------------------- */ |
611 | 611 | ||
612 | #if defined(CONFIG_AT91SAM9_WATCHDOG) || defined(CONFIG_AT91SAM9_WATCHDOG_MODULE) | 612 | #if defined(CONFIG_AT91SAM9X_WATCHDOG) || defined(CONFIG_AT91SAM9X_WATCHDOG_MODULE) |
613 | static struct platform_device at91sam9rl_wdt_device = { | 613 | static struct platform_device at91sam9rl_wdt_device = { |
614 | .name = "at91_wdt", | 614 | .name = "at91_wdt", |
615 | .id = -1, | 615 | .id = -1, |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index 9b0447c3d59b..2f7d4977dce9 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -490,7 +490,8 @@ postcore_initcall(at91_gpio_debugfs_init); | |||
490 | 490 | ||
491 | /*--------------------------------------------------------------------------*/ | 491 | /*--------------------------------------------------------------------------*/ |
492 | 492 | ||
493 | /* This lock class tells lockdep that GPIO irqs are in a different | 493 | /* |
494 | * This lock class tells lockdep that GPIO irqs are in a different | ||
494 | * category than their parents, so it won't report false recursion. | 495 | * category than their parents, so it won't report false recursion. |
495 | */ | 496 | */ |
496 | static struct lock_class_key gpio_lock_class; | 497 | static struct lock_class_key gpio_lock_class; |
@@ -509,9 +510,6 @@ void __init at91_gpio_irq_setup(void) | |||
509 | unsigned id = this->id; | 510 | unsigned id = this->id; |
510 | unsigned i; | 511 | unsigned i; |
511 | 512 | ||
512 | /* enable PIO controller's clock */ | ||
513 | clk_enable(this->clock); | ||
514 | |||
515 | __raw_writel(~0, this->regbase + PIO_IDR); | 513 | __raw_writel(~0, this->regbase + PIO_IDR); |
516 | 514 | ||
517 | for (i = 0, pin = this->chipbase; i < 32; i++, pin++) { | 515 | for (i = 0, pin = this->chipbase; i < 32; i++, pin++) { |
@@ -556,7 +554,14 @@ void __init at91_gpio_init(struct at91_gpio_bank *data, int nr_banks) | |||
556 | data->chipbase = PIN_BASE + i * 32; | 554 | data->chipbase = PIN_BASE + i * 32; |
557 | data->regbase = data->offset + (void __iomem *)AT91_VA_BASE_SYS; | 555 | data->regbase = data->offset + (void __iomem *)AT91_VA_BASE_SYS; |
558 | 556 | ||
559 | /* AT91SAM9263_ID_PIOCDE groups PIOC, PIOD, PIOE */ | 557 | /* enable PIO controller's clock */ |
558 | clk_enable(data->clock); | ||
559 | |||
560 | /* | ||
561 | * Some processors share peripheral ID between multiple GPIO banks. | ||
562 | * SAM9263 (PIOC, PIOD, PIOE) | ||
563 | * CAP9 (PIOA, PIOB, PIOC, PIOD) | ||
564 | */ | ||
560 | if (last && last->id == data->id) | 565 | if (last && last->id == data->id) |
561 | last->next = data; | 566 | last->next = data; |
562 | } | 567 | } |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index fb51f0e0a83f..0b3ae21b4565 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -93,6 +93,7 @@ struct atmel_nand_data { | |||
93 | u8 enable_pin; /* chip enable */ | 93 | u8 enable_pin; /* chip enable */ |
94 | u8 det_pin; /* card detect */ | 94 | u8 det_pin; /* card detect */ |
95 | u8 rdy_pin; /* ready/busy */ | 95 | u8 rdy_pin; /* ready/busy */ |
96 | u8 rdy_pin_active_low; /* rdy_pin value is inverted */ | ||
96 | u8 ale; /* address line number connected to ALE */ | 97 | u8 ale; /* address line number connected to ALE */ |
97 | u8 cle; /* address line number connected to CLE */ | 98 | u8 cle; /* address line number connected to CLE */ |
98 | u8 bus_width_16; /* buswidth is 16 bit */ | 99 | u8 bus_width_16; /* buswidth is 16 bit */ |
diff --git a/arch/arm/mach-ep93xx/include/mach/gesbc9312.h b/arch/arm/mach-ep93xx/include/mach/gesbc9312.h deleted file mode 100644 index 21fe2b922aa5..000000000000 --- a/arch/arm/mach-ep93xx/include/mach/gesbc9312.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/include/mach/gesbc9312.h | ||
3 | */ | ||
diff --git a/arch/arm/mach-ep93xx/include/mach/hardware.h b/arch/arm/mach-ep93xx/include/mach/hardware.h index 529807d182bf..2866297310b7 100644 --- a/arch/arm/mach-ep93xx/include/mach/hardware.h +++ b/arch/arm/mach-ep93xx/include/mach/hardware.h | |||
@@ -10,7 +10,6 @@ | |||
10 | 10 | ||
11 | #include "platform.h" | 11 | #include "platform.h" |
12 | 12 | ||
13 | #include "gesbc9312.h" | ||
14 | #include "ts72xx.h" | 13 | #include "ts72xx.h" |
15 | 14 | ||
16 | #endif | 15 | #endif |
diff --git a/arch/arm/mach-kirkwood/irq.c b/arch/arm/mach-kirkwood/irq.c index efb86b700276..06083b23bb44 100644 --- a/arch/arm/mach-kirkwood/irq.c +++ b/arch/arm/mach-kirkwood/irq.c | |||
@@ -42,7 +42,7 @@ void __init kirkwood_init_irq(void) | |||
42 | writel(0, GPIO_EDGE_CAUSE(32)); | 42 | writel(0, GPIO_EDGE_CAUSE(32)); |
43 | 43 | ||
44 | for (i = IRQ_KIRKWOOD_GPIO_START; i < NR_IRQS; i++) { | 44 | for (i = IRQ_KIRKWOOD_GPIO_START; i < NR_IRQS; i++) { |
45 | set_irq_chip(i, &orion_gpio_irq_level_chip); | 45 | set_irq_chip(i, &orion_gpio_irq_chip); |
46 | set_irq_handler(i, handle_level_irq); | 46 | set_irq_handler(i, handle_level_irq); |
47 | irq_desc[i].status |= IRQ_LEVEL; | 47 | irq_desc[i].status |= IRQ_LEVEL; |
48 | set_irq_flags(i, IRQF_VALID); | 48 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/mach-mv78xx0/irq.c b/arch/arm/mach-mv78xx0/irq.c index e273418797b4..30b7e4bcdbc7 100644 --- a/arch/arm/mach-mv78xx0/irq.c +++ b/arch/arm/mach-mv78xx0/irq.c | |||
@@ -40,7 +40,7 @@ void __init mv78xx0_init_irq(void) | |||
40 | writel(0, GPIO_EDGE_CAUSE(0)); | 40 | writel(0, GPIO_EDGE_CAUSE(0)); |
41 | 41 | ||
42 | for (i = IRQ_MV78XX0_GPIO_START; i < NR_IRQS; i++) { | 42 | for (i = IRQ_MV78XX0_GPIO_START; i < NR_IRQS; i++) { |
43 | set_irq_chip(i, &orion_gpio_irq_level_chip); | 43 | set_irq_chip(i, &orion_gpio_irq_chip); |
44 | set_irq_handler(i, handle_level_irq); | 44 | set_irq_handler(i, handle_level_irq); |
45 | irq_desc[i].status |= IRQ_LEVEL; | 45 | irq_desc[i].status |= IRQ_LEVEL; |
46 | set_irq_flags(i, IRQF_VALID); | 46 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index ad721e0cbf7a..ce4d46a4a838 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -565,7 +565,7 @@ u32 omap2_clksel_to_divisor(struct clk *clk, u32 field_val) | |||
565 | * | 565 | * |
566 | * Given a struct clk of a rate-selectable clksel clock, and a clock divisor, | 566 | * Given a struct clk of a rate-selectable clksel clock, and a clock divisor, |
567 | * find the corresponding register field value. The return register value is | 567 | * find the corresponding register field value. The return register value is |
568 | * the value before left-shifting. Returns 0xffffffff on error | 568 | * the value before left-shifting. Returns ~0 on error |
569 | */ | 569 | */ |
570 | u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | 570 | u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) |
571 | { | 571 | { |
@@ -577,7 +577,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | |||
577 | 577 | ||
578 | clks = omap2_get_clksel_by_parent(clk, clk->parent); | 578 | clks = omap2_get_clksel_by_parent(clk, clk->parent); |
579 | if (clks == NULL) | 579 | if (clks == NULL) |
580 | return 0; | 580 | return ~0; |
581 | 581 | ||
582 | for (clkr = clks->rates; clkr->div; clkr++) { | 582 | for (clkr = clks->rates; clkr->div; clkr++) { |
583 | if ((clkr->flags & cpu_mask) && (clkr->div == div)) | 583 | if ((clkr->flags & cpu_mask) && (clkr->div == div)) |
@@ -588,7 +588,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | |||
588 | printk(KERN_ERR "clock: Could not find divisor %d for " | 588 | printk(KERN_ERR "clock: Could not find divisor %d for " |
589 | "clock %s parent %s\n", div, clk->name, | 589 | "clock %s parent %s\n", div, clk->name, |
590 | clk->parent->name); | 590 | clk->parent->name); |
591 | return 0; | 591 | return ~0; |
592 | } | 592 | } |
593 | 593 | ||
594 | return clkr->val; | 594 | return clkr->val; |
@@ -708,7 +708,7 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr, | |||
708 | return 0; | 708 | return 0; |
709 | 709 | ||
710 | for (clkr = clks->rates; clkr->div; clkr++) { | 710 | for (clkr = clks->rates; clkr->div; clkr++) { |
711 | if (clkr->flags & (cpu_mask | DEFAULT_RATE)) | 711 | if (clkr->flags & cpu_mask && clkr->flags & DEFAULT_RATE) |
712 | break; /* Found the default rate for this platform */ | 712 | break; /* Found the default rate for this platform */ |
713 | } | 713 | } |
714 | 714 | ||
@@ -746,7 +746,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
746 | return -EINVAL; | 746 | return -EINVAL; |
747 | 747 | ||
748 | if (clk->usecount > 0) | 748 | if (clk->usecount > 0) |
749 | _omap2_clk_disable(clk); | 749 | omap2_clk_disable(clk); |
750 | 750 | ||
751 | /* Set new source value (previous dividers if any in effect) */ | 751 | /* Set new source value (previous dividers if any in effect) */ |
752 | reg_val = __raw_readl(src_addr) & ~field_mask; | 752 | reg_val = __raw_readl(src_addr) & ~field_mask; |
@@ -759,11 +759,11 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
759 | wmb(); | 759 | wmb(); |
760 | } | 760 | } |
761 | 761 | ||
762 | if (clk->usecount > 0) | ||
763 | _omap2_clk_enable(clk); | ||
764 | |||
765 | clk->parent = new_parent; | 762 | clk->parent = new_parent; |
766 | 763 | ||
764 | if (clk->usecount > 0) | ||
765 | omap2_clk_enable(clk); | ||
766 | |||
767 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ | 767 | /* CLKSEL clocks follow their parents' rates, divided by a divisor */ |
768 | clk->rate = new_parent->rate; | 768 | clk->rate = new_parent->rate; |
769 | 769 | ||
diff --git a/arch/arm/mach-orion5x/irq.c b/arch/arm/mach-orion5x/irq.c index 0caae43301e5..e03f7b45cb0d 100644 --- a/arch/arm/mach-orion5x/irq.c +++ b/arch/arm/mach-orion5x/irq.c | |||
@@ -44,7 +44,7 @@ void __init orion5x_init_irq(void) | |||
44 | * User can use set_type() if he wants to use edge types handlers. | 44 | * User can use set_type() if he wants to use edge types handlers. |
45 | */ | 45 | */ |
46 | for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) { | 46 | for (i = IRQ_ORION5X_GPIO_START; i < NR_IRQS; i++) { |
47 | set_irq_chip(i, &orion_gpio_irq_level_chip); | 47 | set_irq_chip(i, &orion_gpio_irq_chip); |
48 | set_irq_handler(i, handle_level_irq); | 48 | set_irq_handler(i, handle_level_irq); |
49 | irq_desc[i].status |= IRQ_LEVEL; | 49 | irq_desc[i].status |= IRQ_LEVEL; |
50 | set_irq_flags(i, IRQF_VALID); | 50 | set_irq_flags(i, IRQF_VALID); |
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index b1514fb20d3a..7de17fc5d54b 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c | |||
@@ -121,20 +121,22 @@ int __init pxa_init_dma(int num_ch) | |||
121 | if (dma_channels == NULL) | 121 | if (dma_channels == NULL) |
122 | return -ENOMEM; | 122 | return -ENOMEM; |
123 | 123 | ||
124 | ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); | ||
125 | if (ret) { | ||
126 | printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | ||
127 | kfree(dma_channels); | ||
128 | return ret; | ||
129 | } | ||
130 | |||
131 | /* dma channel priorities on pxa2xx processors: | 124 | /* dma channel priorities on pxa2xx processors: |
132 | * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH | 125 | * ch 0 - 3, 16 - 19 <--> (0) DMA_PRIO_HIGH |
133 | * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM | 126 | * ch 4 - 7, 20 - 23 <--> (1) DMA_PRIO_MEDIUM |
134 | * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW | 127 | * ch 8 - 15, 24 - 31 <--> (2) DMA_PRIO_LOW |
135 | */ | 128 | */ |
136 | for (i = 0; i < num_ch; i++) | 129 | for (i = 0; i < num_ch; i++) { |
130 | DCSR(i) = 0; | ||
137 | dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW); | 131 | dma_channels[i].prio = min((i & 0xf) >> 2, DMA_PRIO_LOW); |
132 | } | ||
133 | |||
134 | ret = request_irq(IRQ_DMA, dma_irq_handler, IRQF_DISABLED, "DMA", NULL); | ||
135 | if (ret) { | ||
136 | printk (KERN_CRIT "Wow! Can't register IRQ for DMA\n"); | ||
137 | kfree(dma_channels); | ||
138 | return ret; | ||
139 | } | ||
138 | 140 | ||
139 | num_dma_channels = num_ch; | 141 | num_dma_channels = num_ch; |
140 | return 0; | 142 | return 0; |
diff --git a/arch/arm/mach-pxa/include/mach/regs-ac97.h b/arch/arm/mach-pxa/include/mach/regs-ac97.h index e41b9d202b8c..b8d14bd9ae59 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ac97.h +++ b/arch/arm/mach-pxa/include/mach/regs-ac97.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_ARCH_REGS_AC97_H | 1 | #ifndef __ASM_ARCH_REGS_AC97_H |
2 | #define __ASM_ARCH_REGS_AC97_H | 2 | #define __ASM_ARCH_REGS_AC97_H |
3 | 3 | ||
4 | #include <mach/hardware.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * AC97 Controller registers | 7 | * AC97 Controller registers |
6 | */ | 8 | */ |
diff --git a/arch/arm/mach-pxa/include/mach/regs-ssp.h b/arch/arm/mach-pxa/include/mach/regs-ssp.h index 3c04cde2cf1f..cf31986f6f05 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ssp.h +++ b/arch/arm/mach-pxa/include/mach/regs-ssp.h | |||
@@ -41,6 +41,9 @@ | |||
41 | #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | 41 | #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) |
42 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ | 42 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ |
43 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ | 43 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ |
44 | #endif | ||
45 | |||
46 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | ||
44 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | 47 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ |
45 | #define SSCR0_NCS (1 << 21) /* Network clock select */ | 48 | #define SSCR0_NCS (1 << 21) /* Network clock select */ |
46 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | 49 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ |
diff --git a/arch/arm/mach-pxa/pxa300.c b/arch/arm/mach-pxa/pxa300.c index f735e58e6669..83fb609b6eb7 100644 --- a/arch/arm/mach-pxa/pxa300.c +++ b/arch/arm/mach-pxa/pxa300.c | |||
@@ -88,13 +88,13 @@ static struct pxa3xx_mfp_addr_map pxa310_mfp_addr_map[] __initdata = { | |||
88 | static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); | 88 | static DEFINE_PXA3_CKEN(common_nand, NAND, 156000000, 0); |
89 | 89 | ||
90 | static struct clk_lookup common_clkregs[] = { | 90 | static struct clk_lookup common_clkregs[] = { |
91 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", "NANDCLK"), | 91 | INIT_CLKREG(&clk_common_nand, "pxa3xx-nand", NULL), |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); | 94 | static DEFINE_PXA3_CKEN(pxa310_mmc3, MMC3, 19500000, 0); |
95 | 95 | ||
96 | static struct clk_lookup pxa310_clkregs[] = { | 96 | static struct clk_lookup pxa310_clkregs[] = { |
97 | INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", "MMCCLK"), | 97 | INIT_CLKREG(&clk_pxa310_mmc3, "pxa2xx-mci.2", NULL), |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static int __init pxa300_init(void) | 100 | static int __init pxa300_init(void) |
diff --git a/arch/arm/mach-pxa/pxa320.c b/arch/arm/mach-pxa/pxa320.c index effe408c186f..36f066196fa2 100644 --- a/arch/arm/mach-pxa/pxa320.c +++ b/arch/arm/mach-pxa/pxa320.c | |||
@@ -83,7 +83,7 @@ static struct pxa3xx_mfp_addr_map pxa320_mfp_addr_map[] __initdata = { | |||
83 | static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); | 83 | static DEFINE_PXA3_CKEN(pxa320_nand, NAND, 104000000, 0); |
84 | 84 | ||
85 | static struct clk_lookup pxa320_clkregs[] = { | 85 | static struct clk_lookup pxa320_clkregs[] = { |
86 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", "NANDCLK"), | 86 | INIT_CLKREG(&clk_pxa320_nand, "pxa3xx-nand", NULL), |
87 | }; | 87 | }; |
88 | 88 | ||
89 | static int __init pxa320_init(void) | 89 | static int __init pxa320_init(void) |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 9b36c5cb5e9f..d4d082c5c2d4 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -693,7 +693,8 @@ static void __init sanity_check_meminfo(void) | |||
693 | * Check whether this memory bank would entirely overlap | 693 | * Check whether this memory bank would entirely overlap |
694 | * the vmalloc area. | 694 | * the vmalloc area. |
695 | */ | 695 | */ |
696 | if (__va(bank->start) >= VMALLOC_MIN) { | 696 | if (__va(bank->start) >= VMALLOC_MIN || |
697 | __va(bank->start) < PAGE_OFFSET) { | ||
697 | printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " | 698 | printk(KERN_NOTICE "Ignoring RAM at %.8lx-%.8lx " |
698 | "(vmalloc region overlap).\n", | 699 | "(vmalloc region overlap).\n", |
699 | bank->start, bank->start + bank->size - 1); | 700 | bank->start, bank->start + bank->size - 1); |
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 967186425ca1..0d12c2164766 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
@@ -265,51 +265,36 @@ EXPORT_SYMBOL(orion_gpio_set_blink); | |||
265 | * polarity LEVEL mask | 265 | * polarity LEVEL mask |
266 | * | 266 | * |
267 | ****************************************************************************/ | 267 | ****************************************************************************/ |
268 | static void gpio_irq_edge_ack(u32 irq) | ||
269 | { | ||
270 | int pin = irq_to_gpio(irq); | ||
271 | |||
272 | writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); | ||
273 | } | ||
274 | |||
275 | static void gpio_irq_edge_mask(u32 irq) | ||
276 | { | ||
277 | int pin = irq_to_gpio(irq); | ||
278 | u32 u; | ||
279 | |||
280 | u = readl(GPIO_EDGE_MASK(pin)); | ||
281 | u &= ~(1 << (pin & 31)); | ||
282 | writel(u, GPIO_EDGE_MASK(pin)); | ||
283 | } | ||
284 | 268 | ||
285 | static void gpio_irq_edge_unmask(u32 irq) | 269 | static void gpio_irq_ack(u32 irq) |
286 | { | 270 | { |
287 | int pin = irq_to_gpio(irq); | 271 | int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; |
288 | u32 u; | 272 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { |
289 | 273 | int pin = irq_to_gpio(irq); | |
290 | u = readl(GPIO_EDGE_MASK(pin)); | 274 | writel(~(1 << (pin & 31)), GPIO_EDGE_CAUSE(pin)); |
291 | u |= 1 << (pin & 31); | 275 | } |
292 | writel(u, GPIO_EDGE_MASK(pin)); | ||
293 | } | 276 | } |
294 | 277 | ||
295 | static void gpio_irq_level_mask(u32 irq) | 278 | static void gpio_irq_mask(u32 irq) |
296 | { | 279 | { |
297 | int pin = irq_to_gpio(irq); | 280 | int pin = irq_to_gpio(irq); |
298 | u32 u; | 281 | int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; |
299 | 282 | u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? | |
300 | u = readl(GPIO_LEVEL_MASK(pin)); | 283 | GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); |
284 | u32 u = readl(reg); | ||
301 | u &= ~(1 << (pin & 31)); | 285 | u &= ~(1 << (pin & 31)); |
302 | writel(u, GPIO_LEVEL_MASK(pin)); | 286 | writel(u, reg); |
303 | } | 287 | } |
304 | 288 | ||
305 | static void gpio_irq_level_unmask(u32 irq) | 289 | static void gpio_irq_unmask(u32 irq) |
306 | { | 290 | { |
307 | int pin = irq_to_gpio(irq); | 291 | int pin = irq_to_gpio(irq); |
308 | u32 u; | 292 | int type = irq_desc[irq].status & IRQ_TYPE_SENSE_MASK; |
309 | 293 | u32 reg = (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) ? | |
310 | u = readl(GPIO_LEVEL_MASK(pin)); | 294 | GPIO_EDGE_MASK(pin) : GPIO_LEVEL_MASK(pin); |
295 | u32 u = readl(reg); | ||
311 | u |= 1 << (pin & 31); | 296 | u |= 1 << (pin & 31); |
312 | writel(u, GPIO_LEVEL_MASK(pin)); | 297 | writel(u, reg); |
313 | } | 298 | } |
314 | 299 | ||
315 | static int gpio_irq_set_type(u32 irq, u32 type) | 300 | static int gpio_irq_set_type(u32 irq, u32 type) |
@@ -331,9 +316,9 @@ static int gpio_irq_set_type(u32 irq, u32 type) | |||
331 | * Set edge/level type. | 316 | * Set edge/level type. |
332 | */ | 317 | */ |
333 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { | 318 | if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) { |
334 | desc->chip = &orion_gpio_irq_edge_chip; | 319 | desc->handle_irq = handle_edge_irq; |
335 | } else if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { | 320 | } else if (type & (IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) { |
336 | desc->chip = &orion_gpio_irq_level_chip; | 321 | desc->handle_irq = handle_level_irq; |
337 | } else { | 322 | } else { |
338 | printk(KERN_ERR "failed to set irq=%d (type=%d)\n", irq, type); | 323 | printk(KERN_ERR "failed to set irq=%d (type=%d)\n", irq, type); |
339 | return -EINVAL; | 324 | return -EINVAL; |
@@ -371,19 +356,11 @@ static int gpio_irq_set_type(u32 irq, u32 type) | |||
371 | return 0; | 356 | return 0; |
372 | } | 357 | } |
373 | 358 | ||
374 | struct irq_chip orion_gpio_irq_edge_chip = { | 359 | struct irq_chip orion_gpio_irq_chip = { |
375 | .name = "orion_gpio_irq_edge", | 360 | .name = "orion_gpio", |
376 | .ack = gpio_irq_edge_ack, | 361 | .ack = gpio_irq_ack, |
377 | .mask = gpio_irq_edge_mask, | 362 | .mask = gpio_irq_mask, |
378 | .unmask = gpio_irq_edge_unmask, | 363 | .unmask = gpio_irq_unmask, |
379 | .set_type = gpio_irq_set_type, | ||
380 | }; | ||
381 | |||
382 | struct irq_chip orion_gpio_irq_level_chip = { | ||
383 | .name = "orion_gpio_irq_level", | ||
384 | .mask = gpio_irq_level_mask, | ||
385 | .mask_ack = gpio_irq_level_mask, | ||
386 | .unmask = gpio_irq_level_unmask, | ||
387 | .set_type = gpio_irq_set_type, | 364 | .set_type = gpio_irq_set_type, |
388 | }; | 365 | }; |
389 | 366 | ||
diff --git a/arch/arm/plat-orion/include/plat/gpio.h b/arch/arm/plat-orion/include/plat/gpio.h index 54deaf274b52..ec743e82c876 100644 --- a/arch/arm/plat-orion/include/plat/gpio.h +++ b/arch/arm/plat-orion/include/plat/gpio.h | |||
@@ -31,8 +31,7 @@ void orion_gpio_set_blink(unsigned pin, int blink); | |||
31 | /* | 31 | /* |
32 | * GPIO interrupt handling. | 32 | * GPIO interrupt handling. |
33 | */ | 33 | */ |
34 | extern struct irq_chip orion_gpio_irq_edge_chip; | 34 | extern struct irq_chip orion_gpio_irq_chip; |
35 | extern struct irq_chip orion_gpio_irq_level_chip; | ||
36 | void orion_gpio_irq_handler(int irqoff); | 35 | void orion_gpio_irq_handler(int irqoff); |
37 | 36 | ||
38 | 37 | ||
diff --git a/arch/avr32/include/asm/swab.h b/arch/avr32/include/asm/swab.h index a14aa5b46d98..14cc737bbca6 100644 --- a/arch/avr32/include/asm/swab.h +++ b/arch/avr32/include/asm/swab.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #ifndef __ASM_AVR32_SWAB_H | 4 | #ifndef __ASM_AVR32_SWAB_H |
5 | #define __ASM_AVR32_SWAB_H | 5 | #define __ASM_AVR32_SWAB_H |
6 | 6 | ||
7 | #include <asm/types.h> | 7 | #include <linux/types.h> |
8 | #include <linux/compiler.h> | 8 | #include <linux/compiler.h> |
9 | 9 | ||
10 | #define __SWAB_64_THRU_32__ | 10 | #define __SWAB_64_THRU_32__ |
diff --git a/arch/avr32/mach-at32ap/include/mach/board.h b/arch/avr32/mach-at32ap/include/mach/board.h index aafaf7a78886..cff8e84f78f2 100644 --- a/arch/avr32/mach-at32ap/include/mach/board.h +++ b/arch/avr32/mach-at32ap/include/mach/board.h | |||
@@ -116,6 +116,7 @@ struct atmel_nand_data { | |||
116 | int enable_pin; /* chip enable */ | 116 | int enable_pin; /* chip enable */ |
117 | int det_pin; /* card detect */ | 117 | int det_pin; /* card detect */ |
118 | int rdy_pin; /* ready/busy */ | 118 | int rdy_pin; /* ready/busy */ |
119 | u8 rdy_pin_active_low; /* rdy_pin value is inverted */ | ||
119 | u8 ale; /* address line number connected to ALE */ | 120 | u8 ale; /* address line number connected to ALE */ |
120 | u8 cle; /* address line number connected to CLE */ | 121 | u8 cle; /* address line number connected to CLE */ |
121 | u8 bus_width_16; /* buswidth is 16 bit */ | 122 | u8 bus_width_16; /* buswidth is 16 bit */ |
diff --git a/arch/blackfin/include/asm/swab.h b/arch/blackfin/include/asm/swab.h index 69a051b612bd..6403ad2932eb 100644 --- a/arch/blackfin/include/asm/swab.h +++ b/arch/blackfin/include/asm/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _BLACKFIN_SWAB_H | 1 | #ifndef _BLACKFIN_SWAB_H |
2 | #define _BLACKFIN_SWAB_H | 2 | #define _BLACKFIN_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | 6 | ||
7 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 7 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c index dc6522c464d4..44840e73e907 100644 --- a/arch/frv/mm/dma-alloc.c +++ b/arch/frv/mm/dma-alloc.c | |||
@@ -36,10 +36,10 @@ | |||
36 | #include <linux/vmalloc.h> | 36 | #include <linux/vmalloc.h> |
37 | #include <linux/init.h> | 37 | #include <linux/init.h> |
38 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
39 | #include <linux/hardirq.h> | ||
39 | 40 | ||
40 | #include <asm/pgalloc.h> | 41 | #include <asm/pgalloc.h> |
41 | #include <asm/io.h> | 42 | #include <asm/io.h> |
42 | #include <asm/hardirq.h> | ||
43 | #include <asm/mmu_context.h> | 43 | #include <asm/mmu_context.h> |
44 | #include <asm/pgtable.h> | 44 | #include <asm/pgtable.h> |
45 | #include <asm/mmu.h> | 45 | #include <asm/mmu.h> |
diff --git a/arch/h8300/include/asm/swab.h b/arch/h8300/include/asm/swab.h index c108f39b8bc4..39abbf52807d 100644 --- a/arch/h8300/include/asm/swab.h +++ b/arch/h8300/include/asm/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _H8300_SWAB_H | 1 | #ifndef _H8300_SWAB_H |
2 | #define _H8300_SWAB_H | 2 | #define _H8300_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | 5 | ||
6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) | 6 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) |
7 | # define __SWAB_64_THRU_32__ | 7 | # define __SWAB_64_THRU_32__ |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 6183aeccecf1..4eb45c012498 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -221,7 +221,11 @@ config IA64_HP_SIM | |||
221 | 221 | ||
222 | config IA64_XEN_GUEST | 222 | config IA64_XEN_GUEST |
223 | bool "Xen guest" | 223 | bool "Xen guest" |
224 | select SWIOTLB | ||
224 | depends on XEN | 225 | depends on XEN |
226 | help | ||
227 | Build a kernel that runs on Xen guest domain. At this moment only | ||
228 | 16KB page size in supported. | ||
225 | 229 | ||
226 | endchoice | 230 | endchoice |
227 | 231 | ||
@@ -479,8 +483,7 @@ config HOLES_IN_ZONE | |||
479 | default y if VIRTUAL_MEM_MAP | 483 | default y if VIRTUAL_MEM_MAP |
480 | 484 | ||
481 | config HAVE_ARCH_EARLY_PFN_TO_NID | 485 | config HAVE_ARCH_EARLY_PFN_TO_NID |
482 | def_bool y | 486 | def_bool NUMA && SPARSEMEM |
483 | depends on NEED_MULTIPLE_NODES | ||
484 | 487 | ||
485 | config HAVE_ARCH_NODEDATA_EXTENSION | 488 | config HAVE_ARCH_NODEDATA_EXTENSION |
486 | def_bool y | 489 | def_bool y |
diff --git a/arch/ia64/configs/xen_domu_defconfig b/arch/ia64/configs/xen_domu_defconfig new file mode 100644 index 000000000000..0bb0714dc19d --- /dev/null +++ b/arch/ia64/configs/xen_domu_defconfig | |||
@@ -0,0 +1,1601 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.29-rc1 | ||
4 | # Fri Jan 16 11:49:59 2009 | ||
5 | # | ||
6 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
7 | |||
8 | # | ||
9 | # General setup | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | CONFIG_LOCK_KERNEL=y | ||
13 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
14 | CONFIG_LOCALVERSION="" | ||
15 | CONFIG_LOCALVERSION_AUTO=y | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | CONFIG_SYSVIPC_SYSCTL=y | ||
19 | CONFIG_POSIX_MQUEUE=y | ||
20 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
21 | # CONFIG_TASKSTATS is not set | ||
22 | # CONFIG_AUDIT is not set | ||
23 | CONFIG_IKCONFIG=y | ||
24 | CONFIG_IKCONFIG_PROC=y | ||
25 | CONFIG_LOG_BUF_SHIFT=20 | ||
26 | CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y | ||
27 | # CONFIG_GROUP_SCHED is not set | ||
28 | |||
29 | # | ||
30 | # Control Group support | ||
31 | # | ||
32 | # CONFIG_CGROUPS is not set | ||
33 | CONFIG_SYSFS_DEPRECATED=y | ||
34 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
35 | # CONFIG_RELAY is not set | ||
36 | CONFIG_NAMESPACES=y | ||
37 | # CONFIG_UTS_NS is not set | ||
38 | # CONFIG_IPC_NS is not set | ||
39 | # CONFIG_USER_NS is not set | ||
40 | # CONFIG_PID_NS is not set | ||
41 | CONFIG_BLK_DEV_INITRD=y | ||
42 | CONFIG_INITRAMFS_SOURCE="" | ||
43 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
44 | CONFIG_SYSCTL=y | ||
45 | # CONFIG_EMBEDDED is not set | ||
46 | CONFIG_SYSCTL_SYSCALL=y | ||
47 | CONFIG_KALLSYMS=y | ||
48 | CONFIG_KALLSYMS_ALL=y | ||
49 | CONFIG_KALLSYMS_STRIP_GENERATED=y | ||
50 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
51 | CONFIG_HOTPLUG=y | ||
52 | CONFIG_PRINTK=y | ||
53 | CONFIG_BUG=y | ||
54 | CONFIG_ELF_CORE=y | ||
55 | CONFIG_COMPAT_BRK=y | ||
56 | CONFIG_BASE_FULL=y | ||
57 | CONFIG_FUTEX=y | ||
58 | CONFIG_ANON_INODES=y | ||
59 | CONFIG_EPOLL=y | ||
60 | CONFIG_SIGNALFD=y | ||
61 | CONFIG_TIMERFD=y | ||
62 | CONFIG_EVENTFD=y | ||
63 | CONFIG_SHMEM=y | ||
64 | CONFIG_AIO=y | ||
65 | CONFIG_VM_EVENT_COUNTERS=y | ||
66 | CONFIG_PCI_QUIRKS=y | ||
67 | CONFIG_SLUB_DEBUG=y | ||
68 | # CONFIG_SLAB is not set | ||
69 | CONFIG_SLUB=y | ||
70 | # CONFIG_SLOB is not set | ||
71 | # CONFIG_PROFILING is not set | ||
72 | CONFIG_HAVE_OPROFILE=y | ||
73 | # CONFIG_KPROBES is not set | ||
74 | CONFIG_HAVE_KPROBES=y | ||
75 | CONFIG_HAVE_KRETPROBES=y | ||
76 | CONFIG_HAVE_ARCH_TRACEHOOK=y | ||
77 | CONFIG_HAVE_DMA_ATTRS=y | ||
78 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
79 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | ||
80 | CONFIG_SLABINFO=y | ||
81 | CONFIG_RT_MUTEXES=y | ||
82 | CONFIG_BASE_SMALL=0 | ||
83 | CONFIG_MODULES=y | ||
84 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
85 | CONFIG_MODULE_UNLOAD=y | ||
86 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
87 | CONFIG_MODVERSIONS=y | ||
88 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
89 | CONFIG_STOP_MACHINE=y | ||
90 | CONFIG_BLOCK=y | ||
91 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
92 | # CONFIG_BLK_DEV_BSG is not set | ||
93 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
94 | |||
95 | # | ||
96 | # IO Schedulers | ||
97 | # | ||
98 | CONFIG_IOSCHED_NOOP=y | ||
99 | CONFIG_IOSCHED_AS=y | ||
100 | CONFIG_IOSCHED_DEADLINE=y | ||
101 | CONFIG_IOSCHED_CFQ=y | ||
102 | CONFIG_DEFAULT_AS=y | ||
103 | # CONFIG_DEFAULT_DEADLINE is not set | ||
104 | # CONFIG_DEFAULT_CFQ is not set | ||
105 | # CONFIG_DEFAULT_NOOP is not set | ||
106 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
107 | CONFIG_CLASSIC_RCU=y | ||
108 | # CONFIG_TREE_RCU is not set | ||
109 | # CONFIG_PREEMPT_RCU is not set | ||
110 | # CONFIG_TREE_RCU_TRACE is not set | ||
111 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
112 | CONFIG_FREEZER=y | ||
113 | |||
114 | # | ||
115 | # Processor type and features | ||
116 | # | ||
117 | CONFIG_IA64=y | ||
118 | CONFIG_64BIT=y | ||
119 | CONFIG_ZONE_DMA=y | ||
120 | CONFIG_QUICKLIST=y | ||
121 | CONFIG_MMU=y | ||
122 | CONFIG_SWIOTLB=y | ||
123 | CONFIG_IOMMU_HELPER=y | ||
124 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
125 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | ||
126 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
127 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
128 | CONFIG_GENERIC_TIME=y | ||
129 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
130 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | ||
131 | CONFIG_DMI=y | ||
132 | CONFIG_EFI=y | ||
133 | CONFIG_GENERIC_IOMAP=y | ||
134 | CONFIG_SCHED_OMIT_FRAME_POINTER=y | ||
135 | CONFIG_AUDIT_ARCH=y | ||
136 | CONFIG_PARAVIRT_GUEST=y | ||
137 | CONFIG_PARAVIRT=y | ||
138 | CONFIG_XEN=y | ||
139 | CONFIG_XEN_XENCOMM=y | ||
140 | CONFIG_NO_IDLE_HZ=y | ||
141 | # CONFIG_IA64_GENERIC is not set | ||
142 | # CONFIG_IA64_DIG is not set | ||
143 | # CONFIG_IA64_DIG_VTD is not set | ||
144 | # CONFIG_IA64_HP_ZX1 is not set | ||
145 | # CONFIG_IA64_HP_ZX1_SWIOTLB is not set | ||
146 | # CONFIG_IA64_SGI_SN2 is not set | ||
147 | # CONFIG_IA64_SGI_UV is not set | ||
148 | # CONFIG_IA64_HP_SIM is not set | ||
149 | CONFIG_IA64_XEN_GUEST=y | ||
150 | # CONFIG_ITANIUM is not set | ||
151 | CONFIG_MCKINLEY=y | ||
152 | # CONFIG_IA64_PAGE_SIZE_4KB is not set | ||
153 | # CONFIG_IA64_PAGE_SIZE_8KB is not set | ||
154 | CONFIG_IA64_PAGE_SIZE_16KB=y | ||
155 | # CONFIG_IA64_PAGE_SIZE_64KB is not set | ||
156 | CONFIG_PGTABLE_3=y | ||
157 | # CONFIG_PGTABLE_4 is not set | ||
158 | CONFIG_HZ=250 | ||
159 | # CONFIG_HZ_100 is not set | ||
160 | CONFIG_HZ_250=y | ||
161 | # CONFIG_HZ_300 is not set | ||
162 | # CONFIG_HZ_1000 is not set | ||
163 | # CONFIG_SCHED_HRTICK is not set | ||
164 | CONFIG_IA64_L1_CACHE_SHIFT=7 | ||
165 | CONFIG_IA64_CYCLONE=y | ||
166 | CONFIG_IOSAPIC=y | ||
167 | CONFIG_FORCE_MAX_ZONEORDER=17 | ||
168 | # CONFIG_VIRT_CPU_ACCOUNTING is not set | ||
169 | CONFIG_SMP=y | ||
170 | CONFIG_NR_CPUS=16 | ||
171 | CONFIG_HOTPLUG_CPU=y | ||
172 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
173 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
174 | # CONFIG_SCHED_SMT is not set | ||
175 | CONFIG_PERMIT_BSP_REMOVE=y | ||
176 | CONFIG_FORCE_CPEI_RETARGET=y | ||
177 | CONFIG_PREEMPT_NONE=y | ||
178 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
179 | # CONFIG_PREEMPT is not set | ||
180 | CONFIG_SELECT_MEMORY_MODEL=y | ||
181 | CONFIG_FLATMEM_MANUAL=y | ||
182 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
183 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
184 | CONFIG_FLATMEM=y | ||
185 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
186 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | ||
187 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
188 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
189 | CONFIG_MIGRATION=y | ||
190 | CONFIG_PHYS_ADDR_T_64BIT=y | ||
191 | CONFIG_ZONE_DMA_FLAG=1 | ||
192 | CONFIG_BOUNCE=y | ||
193 | CONFIG_NR_QUICK=1 | ||
194 | CONFIG_VIRT_TO_BUS=y | ||
195 | CONFIG_UNEVICTABLE_LRU=y | ||
196 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
197 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
198 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
199 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
200 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
201 | CONFIG_VIRTUAL_MEM_MAP=y | ||
202 | CONFIG_HOLES_IN_ZONE=y | ||
203 | # CONFIG_IA32_SUPPORT is not set | ||
204 | # CONFIG_COMPAT_FOR_U64_ALIGNMENT is not set | ||
205 | CONFIG_IA64_MCA_RECOVERY=y | ||
206 | CONFIG_PERFMON=y | ||
207 | CONFIG_IA64_PALINFO=y | ||
208 | # CONFIG_IA64_MC_ERR_INJECT is not set | ||
209 | # CONFIG_IA64_ESI is not set | ||
210 | # CONFIG_IA64_HP_AML_NFW is not set | ||
211 | CONFIG_KEXEC=y | ||
212 | # CONFIG_CRASH_DUMP is not set | ||
213 | |||
214 | # | ||
215 | # Firmware Drivers | ||
216 | # | ||
217 | # CONFIG_FIRMWARE_MEMMAP is not set | ||
218 | CONFIG_EFI_VARS=y | ||
219 | CONFIG_EFI_PCDP=y | ||
220 | CONFIG_DMIID=y | ||
221 | CONFIG_BINFMT_ELF=y | ||
222 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
223 | # CONFIG_HAVE_AOUT is not set | ||
224 | CONFIG_BINFMT_MISC=m | ||
225 | |||
226 | # | ||
227 | # Power management and ACPI options | ||
228 | # | ||
229 | CONFIG_PM=y | ||
230 | # CONFIG_PM_DEBUG is not set | ||
231 | CONFIG_PM_SLEEP=y | ||
232 | CONFIG_SUSPEND=y | ||
233 | CONFIG_SUSPEND_FREEZER=y | ||
234 | CONFIG_ACPI=y | ||
235 | CONFIG_ACPI_SLEEP=y | ||
236 | CONFIG_ACPI_PROCFS=y | ||
237 | CONFIG_ACPI_PROCFS_POWER=y | ||
238 | CONFIG_ACPI_SYSFS_POWER=y | ||
239 | CONFIG_ACPI_PROC_EVENT=y | ||
240 | CONFIG_ACPI_BUTTON=m | ||
241 | CONFIG_ACPI_FAN=m | ||
242 | # CONFIG_ACPI_DOCK is not set | ||
243 | CONFIG_ACPI_PROCESSOR=m | ||
244 | CONFIG_ACPI_HOTPLUG_CPU=y | ||
245 | CONFIG_ACPI_THERMAL=m | ||
246 | # CONFIG_ACPI_CUSTOM_DSDT is not set | ||
247 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
248 | # CONFIG_ACPI_DEBUG is not set | ||
249 | # CONFIG_ACPI_PCI_SLOT is not set | ||
250 | CONFIG_ACPI_SYSTEM=y | ||
251 | CONFIG_ACPI_CONTAINER=m | ||
252 | |||
253 | # | ||
254 | # CPU Frequency scaling | ||
255 | # | ||
256 | # CONFIG_CPU_FREQ is not set | ||
257 | |||
258 | # | ||
259 | # Bus options (PCI, PCMCIA) | ||
260 | # | ||
261 | CONFIG_PCI=y | ||
262 | CONFIG_PCI_DOMAINS=y | ||
263 | CONFIG_PCI_SYSCALL=y | ||
264 | # CONFIG_PCIEPORTBUS is not set | ||
265 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
266 | # CONFIG_PCI_MSI is not set | ||
267 | CONFIG_PCI_LEGACY=y | ||
268 | # CONFIG_PCI_DEBUG is not set | ||
269 | # CONFIG_PCI_STUB is not set | ||
270 | CONFIG_HOTPLUG_PCI=m | ||
271 | # CONFIG_HOTPLUG_PCI_FAKE is not set | ||
272 | CONFIG_HOTPLUG_PCI_ACPI=m | ||
273 | # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set | ||
274 | # CONFIG_HOTPLUG_PCI_CPCI is not set | ||
275 | # CONFIG_HOTPLUG_PCI_SHPC is not set | ||
276 | # CONFIG_PCCARD is not set | ||
277 | CONFIG_NET=y | ||
278 | |||
279 | # | ||
280 | # Networking options | ||
281 | # | ||
282 | # CONFIG_NET_NS is not set | ||
283 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
284 | CONFIG_PACKET=y | ||
285 | # CONFIG_PACKET_MMAP is not set | ||
286 | CONFIG_UNIX=y | ||
287 | CONFIG_XFRM=y | ||
288 | # CONFIG_XFRM_USER is not set | ||
289 | # CONFIG_XFRM_SUB_POLICY is not set | ||
290 | # CONFIG_XFRM_MIGRATE is not set | ||
291 | # CONFIG_XFRM_STATISTICS is not set | ||
292 | # CONFIG_NET_KEY is not set | ||
293 | CONFIG_INET=y | ||
294 | CONFIG_IP_MULTICAST=y | ||
295 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
296 | CONFIG_IP_FIB_HASH=y | ||
297 | # CONFIG_IP_PNP is not set | ||
298 | # CONFIG_NET_IPIP is not set | ||
299 | # CONFIG_NET_IPGRE is not set | ||
300 | # CONFIG_IP_MROUTE is not set | ||
301 | CONFIG_ARPD=y | ||
302 | CONFIG_SYN_COOKIES=y | ||
303 | # CONFIG_INET_AH is not set | ||
304 | # CONFIG_INET_ESP is not set | ||
305 | # CONFIG_INET_IPCOMP is not set | ||
306 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
307 | # CONFIG_INET_TUNNEL is not set | ||
308 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
309 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
310 | CONFIG_INET_XFRM_MODE_BEET=y | ||
311 | # CONFIG_INET_LRO is not set | ||
312 | CONFIG_INET_DIAG=y | ||
313 | CONFIG_INET_TCP_DIAG=y | ||
314 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
315 | CONFIG_TCP_CONG_CUBIC=y | ||
316 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
317 | # CONFIG_TCP_MD5SIG is not set | ||
318 | # CONFIG_IPV6 is not set | ||
319 | # CONFIG_NETWORK_SECMARK is not set | ||
320 | # CONFIG_NETFILTER is not set | ||
321 | # CONFIG_IP_DCCP is not set | ||
322 | # CONFIG_IP_SCTP is not set | ||
323 | # CONFIG_TIPC is not set | ||
324 | # CONFIG_ATM is not set | ||
325 | # CONFIG_BRIDGE is not set | ||
326 | # CONFIG_NET_DSA is not set | ||
327 | # CONFIG_VLAN_8021Q is not set | ||
328 | # CONFIG_DECNET is not set | ||
329 | # CONFIG_LLC2 is not set | ||
330 | # CONFIG_IPX is not set | ||
331 | # CONFIG_ATALK is not set | ||
332 | # CONFIG_X25 is not set | ||
333 | # CONFIG_LAPB is not set | ||
334 | # CONFIG_ECONET is not set | ||
335 | # CONFIG_WAN_ROUTER is not set | ||
336 | # CONFIG_NET_SCHED is not set | ||
337 | # CONFIG_DCB is not set | ||
338 | |||
339 | # | ||
340 | # Network testing | ||
341 | # | ||
342 | # CONFIG_NET_PKTGEN is not set | ||
343 | # CONFIG_HAMRADIO is not set | ||
344 | # CONFIG_CAN is not set | ||
345 | # CONFIG_IRDA is not set | ||
346 | # CONFIG_BT is not set | ||
347 | # CONFIG_AF_RXRPC is not set | ||
348 | # CONFIG_PHONET is not set | ||
349 | # CONFIG_WIRELESS is not set | ||
350 | # CONFIG_WIMAX is not set | ||
351 | # CONFIG_RFKILL is not set | ||
352 | # CONFIG_NET_9P is not set | ||
353 | |||
354 | # | ||
355 | # Device Drivers | ||
356 | # | ||
357 | |||
358 | # | ||
359 | # Generic Driver Options | ||
360 | # | ||
361 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
362 | CONFIG_STANDALONE=y | ||
363 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
364 | CONFIG_FW_LOADER=y | ||
365 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
366 | CONFIG_EXTRA_FIRMWARE="" | ||
367 | # CONFIG_DEBUG_DRIVER is not set | ||
368 | # CONFIG_DEBUG_DEVRES is not set | ||
369 | # CONFIG_SYS_HYPERVISOR is not set | ||
370 | # CONFIG_CONNECTOR is not set | ||
371 | # CONFIG_MTD is not set | ||
372 | # CONFIG_PARPORT is not set | ||
373 | CONFIG_PNP=y | ||
374 | CONFIG_PNP_DEBUG_MESSAGES=y | ||
375 | |||
376 | # | ||
377 | # Protocols | ||
378 | # | ||
379 | CONFIG_PNPACPI=y | ||
380 | CONFIG_BLK_DEV=y | ||
381 | # CONFIG_BLK_CPQ_DA is not set | ||
382 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
383 | # CONFIG_BLK_DEV_DAC960 is not set | ||
384 | # CONFIG_BLK_DEV_UMEM is not set | ||
385 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
386 | CONFIG_BLK_DEV_LOOP=m | ||
387 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
388 | CONFIG_BLK_DEV_NBD=m | ||
389 | # CONFIG_BLK_DEV_SX8 is not set | ||
390 | # CONFIG_BLK_DEV_UB is not set | ||
391 | CONFIG_BLK_DEV_RAM=y | ||
392 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
393 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
394 | # CONFIG_BLK_DEV_XIP is not set | ||
395 | # CONFIG_CDROM_PKTCDVD is not set | ||
396 | # CONFIG_ATA_OVER_ETH is not set | ||
397 | CONFIG_XEN_BLKDEV_FRONTEND=y | ||
398 | # CONFIG_BLK_DEV_HD is not set | ||
399 | CONFIG_MISC_DEVICES=y | ||
400 | # CONFIG_PHANTOM is not set | ||
401 | # CONFIG_EEPROM_93CX6 is not set | ||
402 | # CONFIG_SGI_IOC4 is not set | ||
403 | # CONFIG_TIFM_CORE is not set | ||
404 | # CONFIG_ICS932S401 is not set | ||
405 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
406 | # CONFIG_HP_ILO is not set | ||
407 | # CONFIG_C2PORT is not set | ||
408 | CONFIG_HAVE_IDE=y | ||
409 | CONFIG_IDE=y | ||
410 | |||
411 | # | ||
412 | # Please see Documentation/ide/ide.txt for help/info on IDE drives | ||
413 | # | ||
414 | CONFIG_IDE_TIMINGS=y | ||
415 | CONFIG_IDE_ATAPI=y | ||
416 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
417 | CONFIG_IDE_GD=y | ||
418 | CONFIG_IDE_GD_ATA=y | ||
419 | # CONFIG_IDE_GD_ATAPI is not set | ||
420 | CONFIG_BLK_DEV_IDECD=y | ||
421 | CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y | ||
422 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
423 | # CONFIG_BLK_DEV_IDEACPI is not set | ||
424 | # CONFIG_IDE_TASK_IOCTL is not set | ||
425 | CONFIG_IDE_PROC_FS=y | ||
426 | |||
427 | # | ||
428 | # IDE chipset support/bugfixes | ||
429 | # | ||
430 | # CONFIG_IDE_GENERIC is not set | ||
431 | # CONFIG_BLK_DEV_PLATFORM is not set | ||
432 | # CONFIG_BLK_DEV_IDEPNP is not set | ||
433 | CONFIG_BLK_DEV_IDEDMA_SFF=y | ||
434 | |||
435 | # | ||
436 | # PCI IDE chipsets support | ||
437 | # | ||
438 | CONFIG_BLK_DEV_IDEPCI=y | ||
439 | CONFIG_IDEPCI_PCIBUS_ORDER=y | ||
440 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
441 | CONFIG_BLK_DEV_GENERIC=y | ||
442 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
443 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
444 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
445 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
446 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
447 | CONFIG_BLK_DEV_CMD64X=y | ||
448 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
449 | # CONFIG_BLK_DEV_CS5520 is not set | ||
450 | # CONFIG_BLK_DEV_CS5530 is not set | ||
451 | # CONFIG_BLK_DEV_HPT366 is not set | ||
452 | # CONFIG_BLK_DEV_JMICRON is not set | ||
453 | # CONFIG_BLK_DEV_SC1200 is not set | ||
454 | CONFIG_BLK_DEV_PIIX=y | ||
455 | # CONFIG_BLK_DEV_IT8172 is not set | ||
456 | # CONFIG_BLK_DEV_IT8213 is not set | ||
457 | # CONFIG_BLK_DEV_IT821X is not set | ||
458 | # CONFIG_BLK_DEV_NS87415 is not set | ||
459 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
460 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
461 | # CONFIG_BLK_DEV_SVWKS is not set | ||
462 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
463 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
464 | # CONFIG_BLK_DEV_TRM290 is not set | ||
465 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
466 | # CONFIG_BLK_DEV_TC86C001 is not set | ||
467 | CONFIG_BLK_DEV_IDEDMA=y | ||
468 | |||
469 | # | ||
470 | # SCSI device support | ||
471 | # | ||
472 | # CONFIG_RAID_ATTRS is not set | ||
473 | CONFIG_SCSI=y | ||
474 | CONFIG_SCSI_DMA=y | ||
475 | # CONFIG_SCSI_TGT is not set | ||
476 | CONFIG_SCSI_NETLINK=y | ||
477 | CONFIG_SCSI_PROC_FS=y | ||
478 | |||
479 | # | ||
480 | # SCSI support type (disk, tape, CD-ROM) | ||
481 | # | ||
482 | CONFIG_BLK_DEV_SD=y | ||
483 | CONFIG_CHR_DEV_ST=m | ||
484 | # CONFIG_CHR_DEV_OSST is not set | ||
485 | CONFIG_BLK_DEV_SR=m | ||
486 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
487 | CONFIG_CHR_DEV_SG=m | ||
488 | # CONFIG_CHR_DEV_SCH is not set | ||
489 | |||
490 | # | ||
491 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
492 | # | ||
493 | # CONFIG_SCSI_MULTI_LUN is not set | ||
494 | # CONFIG_SCSI_CONSTANTS is not set | ||
495 | # CONFIG_SCSI_LOGGING is not set | ||
496 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
497 | CONFIG_SCSI_WAIT_SCAN=m | ||
498 | |||
499 | # | ||
500 | # SCSI Transports | ||
501 | # | ||
502 | CONFIG_SCSI_SPI_ATTRS=y | ||
503 | CONFIG_SCSI_FC_ATTRS=y | ||
504 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
505 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
506 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
507 | CONFIG_SCSI_LOWLEVEL=y | ||
508 | # CONFIG_ISCSI_TCP is not set | ||
509 | # CONFIG_SCSI_CXGB3_ISCSI is not set | ||
510 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
511 | # CONFIG_SCSI_3W_9XXX is not set | ||
512 | # CONFIG_SCSI_ACARD is not set | ||
513 | # CONFIG_SCSI_AACRAID is not set | ||
514 | # CONFIG_SCSI_AIC7XXX is not set | ||
515 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
516 | # CONFIG_SCSI_AIC79XX is not set | ||
517 | # CONFIG_SCSI_AIC94XX is not set | ||
518 | # CONFIG_SCSI_DPT_I2O is not set | ||
519 | # CONFIG_SCSI_ADVANSYS is not set | ||
520 | # CONFIG_SCSI_ARCMSR is not set | ||
521 | # CONFIG_MEGARAID_NEWGEN is not set | ||
522 | # CONFIG_MEGARAID_LEGACY is not set | ||
523 | # CONFIG_MEGARAID_SAS is not set | ||
524 | # CONFIG_SCSI_HPTIOP is not set | ||
525 | # CONFIG_LIBFC is not set | ||
526 | # CONFIG_FCOE is not set | ||
527 | # CONFIG_SCSI_DMX3191D is not set | ||
528 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
529 | # CONFIG_SCSI_IPS is not set | ||
530 | # CONFIG_SCSI_INITIO is not set | ||
531 | # CONFIG_SCSI_INIA100 is not set | ||
532 | # CONFIG_SCSI_MVSAS is not set | ||
533 | # CONFIG_SCSI_STEX is not set | ||
534 | CONFIG_SCSI_SYM53C8XX_2=y | ||
535 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 | ||
536 | CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 | ||
537 | CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | ||
538 | CONFIG_SCSI_SYM53C8XX_MMIO=y | ||
539 | CONFIG_SCSI_QLOGIC_1280=y | ||
540 | # CONFIG_SCSI_QLA_FC is not set | ||
541 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
542 | # CONFIG_SCSI_LPFC is not set | ||
543 | # CONFIG_SCSI_DC395x is not set | ||
544 | # CONFIG_SCSI_DC390T is not set | ||
545 | # CONFIG_SCSI_DEBUG is not set | ||
546 | # CONFIG_SCSI_SRP is not set | ||
547 | # CONFIG_SCSI_DH is not set | ||
548 | # CONFIG_ATA is not set | ||
549 | CONFIG_MD=y | ||
550 | CONFIG_BLK_DEV_MD=m | ||
551 | CONFIG_MD_LINEAR=m | ||
552 | CONFIG_MD_RAID0=m | ||
553 | CONFIG_MD_RAID1=m | ||
554 | # CONFIG_MD_RAID10 is not set | ||
555 | # CONFIG_MD_RAID456 is not set | ||
556 | CONFIG_MD_MULTIPATH=m | ||
557 | # CONFIG_MD_FAULTY is not set | ||
558 | CONFIG_BLK_DEV_DM=m | ||
559 | # CONFIG_DM_DEBUG is not set | ||
560 | CONFIG_DM_CRYPT=m | ||
561 | CONFIG_DM_SNAPSHOT=m | ||
562 | CONFIG_DM_MIRROR=m | ||
563 | CONFIG_DM_ZERO=m | ||
564 | # CONFIG_DM_MULTIPATH is not set | ||
565 | # CONFIG_DM_DELAY is not set | ||
566 | # CONFIG_DM_UEVENT is not set | ||
567 | CONFIG_FUSION=y | ||
568 | CONFIG_FUSION_SPI=y | ||
569 | CONFIG_FUSION_FC=y | ||
570 | # CONFIG_FUSION_SAS is not set | ||
571 | CONFIG_FUSION_MAX_SGE=128 | ||
572 | CONFIG_FUSION_CTL=y | ||
573 | # CONFIG_FUSION_LOGGING is not set | ||
574 | |||
575 | # | ||
576 | # IEEE 1394 (FireWire) support | ||
577 | # | ||
578 | |||
579 | # | ||
580 | # Enable only one of the two stacks, unless you know what you are doing | ||
581 | # | ||
582 | # CONFIG_FIREWIRE is not set | ||
583 | # CONFIG_IEEE1394 is not set | ||
584 | # CONFIG_I2O is not set | ||
585 | CONFIG_NETDEVICES=y | ||
586 | CONFIG_DUMMY=m | ||
587 | # CONFIG_BONDING is not set | ||
588 | # CONFIG_MACVLAN is not set | ||
589 | # CONFIG_EQUALIZER is not set | ||
590 | # CONFIG_TUN is not set | ||
591 | # CONFIG_VETH is not set | ||
592 | # CONFIG_NET_SB1000 is not set | ||
593 | # CONFIG_ARCNET is not set | ||
594 | CONFIG_PHYLIB=y | ||
595 | |||
596 | # | ||
597 | # MII PHY device drivers | ||
598 | # | ||
599 | # CONFIG_MARVELL_PHY is not set | ||
600 | # CONFIG_DAVICOM_PHY is not set | ||
601 | # CONFIG_QSEMI_PHY is not set | ||
602 | # CONFIG_LXT_PHY is not set | ||
603 | # CONFIG_CICADA_PHY is not set | ||
604 | # CONFIG_VITESSE_PHY is not set | ||
605 | # CONFIG_SMSC_PHY is not set | ||
606 | # CONFIG_BROADCOM_PHY is not set | ||
607 | # CONFIG_ICPLUS_PHY is not set | ||
608 | # CONFIG_REALTEK_PHY is not set | ||
609 | # CONFIG_NATIONAL_PHY is not set | ||
610 | # CONFIG_STE10XP is not set | ||
611 | # CONFIG_LSI_ET1011C_PHY is not set | ||
612 | # CONFIG_FIXED_PHY is not set | ||
613 | # CONFIG_MDIO_BITBANG is not set | ||
614 | CONFIG_NET_ETHERNET=y | ||
615 | CONFIG_MII=m | ||
616 | # CONFIG_HAPPYMEAL is not set | ||
617 | # CONFIG_SUNGEM is not set | ||
618 | # CONFIG_CASSINI is not set | ||
619 | # CONFIG_NET_VENDOR_3COM is not set | ||
620 | CONFIG_NET_TULIP=y | ||
621 | # CONFIG_DE2104X is not set | ||
622 | CONFIG_TULIP=m | ||
623 | # CONFIG_TULIP_MWI is not set | ||
624 | # CONFIG_TULIP_MMIO is not set | ||
625 | # CONFIG_TULIP_NAPI is not set | ||
626 | # CONFIG_DE4X5 is not set | ||
627 | # CONFIG_WINBOND_840 is not set | ||
628 | # CONFIG_DM9102 is not set | ||
629 | # CONFIG_ULI526X is not set | ||
630 | # CONFIG_HP100 is not set | ||
631 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
632 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
633 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
634 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
635 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
636 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
637 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
638 | CONFIG_NET_PCI=y | ||
639 | # CONFIG_PCNET32 is not set | ||
640 | # CONFIG_AMD8111_ETH is not set | ||
641 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
642 | # CONFIG_B44 is not set | ||
643 | # CONFIG_FORCEDETH is not set | ||
644 | CONFIG_E100=m | ||
645 | # CONFIG_FEALNX is not set | ||
646 | # CONFIG_NATSEMI is not set | ||
647 | # CONFIG_NE2K_PCI is not set | ||
648 | # CONFIG_8139CP is not set | ||
649 | # CONFIG_8139TOO is not set | ||
650 | # CONFIG_R6040 is not set | ||
651 | # CONFIG_SIS900 is not set | ||
652 | # CONFIG_EPIC100 is not set | ||
653 | # CONFIG_SMSC9420 is not set | ||
654 | # CONFIG_SUNDANCE is not set | ||
655 | # CONFIG_TLAN is not set | ||
656 | # CONFIG_VIA_RHINE is not set | ||
657 | # CONFIG_SC92031 is not set | ||
658 | # CONFIG_ATL2 is not set | ||
659 | CONFIG_NETDEV_1000=y | ||
660 | # CONFIG_ACENIC is not set | ||
661 | # CONFIG_DL2K is not set | ||
662 | CONFIG_E1000=y | ||
663 | # CONFIG_E1000E is not set | ||
664 | # CONFIG_IP1000 is not set | ||
665 | # CONFIG_IGB is not set | ||
666 | # CONFIG_NS83820 is not set | ||
667 | # CONFIG_HAMACHI is not set | ||
668 | # CONFIG_YELLOWFIN is not set | ||
669 | # CONFIG_R8169 is not set | ||
670 | # CONFIG_SIS190 is not set | ||
671 | # CONFIG_SKGE is not set | ||
672 | # CONFIG_SKY2 is not set | ||
673 | # CONFIG_VIA_VELOCITY is not set | ||
674 | CONFIG_TIGON3=y | ||
675 | # CONFIG_BNX2 is not set | ||
676 | # CONFIG_QLA3XXX is not set | ||
677 | # CONFIG_ATL1 is not set | ||
678 | # CONFIG_ATL1E is not set | ||
679 | # CONFIG_JME is not set | ||
680 | CONFIG_NETDEV_10000=y | ||
681 | # CONFIG_CHELSIO_T1 is not set | ||
682 | CONFIG_CHELSIO_T3_DEPENDS=y | ||
683 | # CONFIG_CHELSIO_T3 is not set | ||
684 | # CONFIG_ENIC is not set | ||
685 | # CONFIG_IXGBE is not set | ||
686 | # CONFIG_IXGB is not set | ||
687 | # CONFIG_S2IO is not set | ||
688 | # CONFIG_MYRI10GE is not set | ||
689 | # CONFIG_NETXEN_NIC is not set | ||
690 | # CONFIG_NIU is not set | ||
691 | # CONFIG_MLX4_EN is not set | ||
692 | # CONFIG_MLX4_CORE is not set | ||
693 | # CONFIG_TEHUTI is not set | ||
694 | # CONFIG_BNX2X is not set | ||
695 | # CONFIG_QLGE is not set | ||
696 | # CONFIG_SFC is not set | ||
697 | # CONFIG_TR is not set | ||
698 | |||
699 | # | ||
700 | # Wireless LAN | ||
701 | # | ||
702 | # CONFIG_WLAN_PRE80211 is not set | ||
703 | # CONFIG_WLAN_80211 is not set | ||
704 | # CONFIG_IWLWIFI_LEDS is not set | ||
705 | |||
706 | # | ||
707 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
708 | # | ||
709 | |||
710 | # | ||
711 | # USB Network Adapters | ||
712 | # | ||
713 | # CONFIG_USB_CATC is not set | ||
714 | # CONFIG_USB_KAWETH is not set | ||
715 | # CONFIG_USB_PEGASUS is not set | ||
716 | # CONFIG_USB_RTL8150 is not set | ||
717 | # CONFIG_USB_USBNET is not set | ||
718 | # CONFIG_WAN is not set | ||
719 | CONFIG_XEN_NETDEV_FRONTEND=y | ||
720 | # CONFIG_FDDI is not set | ||
721 | # CONFIG_HIPPI is not set | ||
722 | # CONFIG_PPP is not set | ||
723 | # CONFIG_SLIP is not set | ||
724 | # CONFIG_NET_FC is not set | ||
725 | CONFIG_NETCONSOLE=y | ||
726 | # CONFIG_NETCONSOLE_DYNAMIC is not set | ||
727 | CONFIG_NETPOLL=y | ||
728 | # CONFIG_NETPOLL_TRAP is not set | ||
729 | CONFIG_NET_POLL_CONTROLLER=y | ||
730 | # CONFIG_ISDN is not set | ||
731 | # CONFIG_PHONE is not set | ||
732 | |||
733 | # | ||
734 | # Input device support | ||
735 | # | ||
736 | CONFIG_INPUT=y | ||
737 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
738 | # CONFIG_INPUT_POLLDEV is not set | ||
739 | |||
740 | # | ||
741 | # Userland interfaces | ||
742 | # | ||
743 | CONFIG_INPUT_MOUSEDEV=y | ||
744 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
745 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
746 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
747 | # CONFIG_INPUT_JOYDEV is not set | ||
748 | # CONFIG_INPUT_EVDEV is not set | ||
749 | # CONFIG_INPUT_EVBUG is not set | ||
750 | |||
751 | # | ||
752 | # Input Device Drivers | ||
753 | # | ||
754 | CONFIG_INPUT_KEYBOARD=y | ||
755 | CONFIG_KEYBOARD_ATKBD=y | ||
756 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
757 | # CONFIG_KEYBOARD_LKKBD is not set | ||
758 | # CONFIG_KEYBOARD_XTKBD is not set | ||
759 | # CONFIG_KEYBOARD_NEWTON is not set | ||
760 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
761 | CONFIG_INPUT_MOUSE=y | ||
762 | CONFIG_MOUSE_PS2=y | ||
763 | CONFIG_MOUSE_PS2_ALPS=y | ||
764 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
765 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
766 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
767 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
768 | # CONFIG_MOUSE_PS2_ELANTECH is not set | ||
769 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
770 | # CONFIG_MOUSE_SERIAL is not set | ||
771 | # CONFIG_MOUSE_APPLETOUCH is not set | ||
772 | # CONFIG_MOUSE_BCM5974 is not set | ||
773 | # CONFIG_MOUSE_VSXXXAA is not set | ||
774 | # CONFIG_INPUT_JOYSTICK is not set | ||
775 | # CONFIG_INPUT_TABLET is not set | ||
776 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
777 | # CONFIG_INPUT_MISC is not set | ||
778 | |||
779 | # | ||
780 | # Hardware I/O ports | ||
781 | # | ||
782 | CONFIG_SERIO=y | ||
783 | CONFIG_SERIO_I8042=y | ||
784 | # CONFIG_SERIO_SERPORT is not set | ||
785 | # CONFIG_SERIO_PCIPS2 is not set | ||
786 | CONFIG_SERIO_LIBPS2=y | ||
787 | # CONFIG_SERIO_RAW is not set | ||
788 | CONFIG_GAMEPORT=m | ||
789 | # CONFIG_GAMEPORT_NS558 is not set | ||
790 | # CONFIG_GAMEPORT_L4 is not set | ||
791 | # CONFIG_GAMEPORT_EMU10K1 is not set | ||
792 | # CONFIG_GAMEPORT_FM801 is not set | ||
793 | |||
794 | # | ||
795 | # Character devices | ||
796 | # | ||
797 | CONFIG_VT=y | ||
798 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
799 | CONFIG_VT_CONSOLE=y | ||
800 | CONFIG_HW_CONSOLE=y | ||
801 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
802 | CONFIG_DEVKMEM=y | ||
803 | CONFIG_SERIAL_NONSTANDARD=y | ||
804 | # CONFIG_COMPUTONE is not set | ||
805 | # CONFIG_ROCKETPORT is not set | ||
806 | # CONFIG_CYCLADES is not set | ||
807 | # CONFIG_DIGIEPCA is not set | ||
808 | # CONFIG_MOXA_INTELLIO is not set | ||
809 | # CONFIG_MOXA_SMARTIO is not set | ||
810 | # CONFIG_ISI is not set | ||
811 | # CONFIG_SYNCLINKMP is not set | ||
812 | # CONFIG_SYNCLINK_GT is not set | ||
813 | # CONFIG_N_HDLC is not set | ||
814 | # CONFIG_RISCOM8 is not set | ||
815 | # CONFIG_SPECIALIX is not set | ||
816 | # CONFIG_SX is not set | ||
817 | # CONFIG_RIO is not set | ||
818 | # CONFIG_STALDRV is not set | ||
819 | # CONFIG_NOZOMI is not set | ||
820 | |||
821 | # | ||
822 | # Serial drivers | ||
823 | # | ||
824 | CONFIG_SERIAL_8250=y | ||
825 | CONFIG_SERIAL_8250_CONSOLE=y | ||
826 | CONFIG_SERIAL_8250_PCI=y | ||
827 | CONFIG_SERIAL_8250_PNP=y | ||
828 | CONFIG_SERIAL_8250_NR_UARTS=6 | ||
829 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
830 | CONFIG_SERIAL_8250_EXTENDED=y | ||
831 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
832 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
833 | # CONFIG_SERIAL_8250_RSA is not set | ||
834 | |||
835 | # | ||
836 | # Non-8250 serial port support | ||
837 | # | ||
838 | CONFIG_SERIAL_CORE=y | ||
839 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
840 | # CONFIG_SERIAL_JSM is not set | ||
841 | CONFIG_UNIX98_PTYS=y | ||
842 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
843 | CONFIG_LEGACY_PTYS=y | ||
844 | CONFIG_LEGACY_PTY_COUNT=256 | ||
845 | CONFIG_HVC_DRIVER=y | ||
846 | CONFIG_HVC_IRQ=y | ||
847 | CONFIG_HVC_XEN=y | ||
848 | # CONFIG_IPMI_HANDLER is not set | ||
849 | # CONFIG_HW_RANDOM is not set | ||
850 | CONFIG_EFI_RTC=y | ||
851 | # CONFIG_R3964 is not set | ||
852 | # CONFIG_APPLICOM is not set | ||
853 | CONFIG_RAW_DRIVER=m | ||
854 | CONFIG_MAX_RAW_DEVS=256 | ||
855 | CONFIG_HPET=y | ||
856 | CONFIG_HPET_MMAP=y | ||
857 | # CONFIG_HANGCHECK_TIMER is not set | ||
858 | # CONFIG_TCG_TPM is not set | ||
859 | CONFIG_DEVPORT=y | ||
860 | CONFIG_I2C=m | ||
861 | CONFIG_I2C_BOARDINFO=y | ||
862 | # CONFIG_I2C_CHARDEV is not set | ||
863 | CONFIG_I2C_HELPER_AUTO=y | ||
864 | CONFIG_I2C_ALGOBIT=m | ||
865 | |||
866 | # | ||
867 | # I2C Hardware Bus support | ||
868 | # | ||
869 | |||
870 | # | ||
871 | # PC SMBus host controller drivers | ||
872 | # | ||
873 | # CONFIG_I2C_ALI1535 is not set | ||
874 | # CONFIG_I2C_ALI1563 is not set | ||
875 | # CONFIG_I2C_ALI15X3 is not set | ||
876 | # CONFIG_I2C_AMD756 is not set | ||
877 | # CONFIG_I2C_AMD8111 is not set | ||
878 | # CONFIG_I2C_I801 is not set | ||
879 | # CONFIG_I2C_ISCH is not set | ||
880 | # CONFIG_I2C_PIIX4 is not set | ||
881 | # CONFIG_I2C_NFORCE2 is not set | ||
882 | # CONFIG_I2C_SIS5595 is not set | ||
883 | # CONFIG_I2C_SIS630 is not set | ||
884 | # CONFIG_I2C_SIS96X is not set | ||
885 | # CONFIG_I2C_VIA is not set | ||
886 | # CONFIG_I2C_VIAPRO is not set | ||
887 | |||
888 | # | ||
889 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
890 | # | ||
891 | # CONFIG_I2C_OCORES is not set | ||
892 | # CONFIG_I2C_SIMTEC is not set | ||
893 | |||
894 | # | ||
895 | # External I2C/SMBus adapter drivers | ||
896 | # | ||
897 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
898 | # CONFIG_I2C_TAOS_EVM is not set | ||
899 | # CONFIG_I2C_TINY_USB is not set | ||
900 | |||
901 | # | ||
902 | # Graphics adapter I2C/DDC channel drivers | ||
903 | # | ||
904 | # CONFIG_I2C_VOODOO3 is not set | ||
905 | |||
906 | # | ||
907 | # Other I2C/SMBus bus drivers | ||
908 | # | ||
909 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
910 | # CONFIG_I2C_STUB is not set | ||
911 | |||
912 | # | ||
913 | # Miscellaneous I2C Chip support | ||
914 | # | ||
915 | # CONFIG_DS1682 is not set | ||
916 | # CONFIG_AT24 is not set | ||
917 | # CONFIG_SENSORS_EEPROM is not set | ||
918 | # CONFIG_SENSORS_PCF8574 is not set | ||
919 | # CONFIG_PCF8575 is not set | ||
920 | # CONFIG_SENSORS_PCA9539 is not set | ||
921 | # CONFIG_SENSORS_PCF8591 is not set | ||
922 | # CONFIG_SENSORS_MAX6875 is not set | ||
923 | # CONFIG_SENSORS_TSL2550 is not set | ||
924 | # CONFIG_I2C_DEBUG_CORE is not set | ||
925 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
926 | # CONFIG_I2C_DEBUG_BUS is not set | ||
927 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
928 | # CONFIG_SPI is not set | ||
929 | # CONFIG_W1 is not set | ||
930 | CONFIG_POWER_SUPPLY=y | ||
931 | # CONFIG_POWER_SUPPLY_DEBUG is not set | ||
932 | # CONFIG_PDA_POWER is not set | ||
933 | # CONFIG_BATTERY_DS2760 is not set | ||
934 | # CONFIG_BATTERY_BQ27x00 is not set | ||
935 | CONFIG_HWMON=y | ||
936 | # CONFIG_HWMON_VID is not set | ||
937 | # CONFIG_SENSORS_AD7414 is not set | ||
938 | # CONFIG_SENSORS_AD7418 is not set | ||
939 | # CONFIG_SENSORS_ADM1021 is not set | ||
940 | # CONFIG_SENSORS_ADM1025 is not set | ||
941 | # CONFIG_SENSORS_ADM1026 is not set | ||
942 | # CONFIG_SENSORS_ADM1029 is not set | ||
943 | # CONFIG_SENSORS_ADM1031 is not set | ||
944 | # CONFIG_SENSORS_ADM9240 is not set | ||
945 | # CONFIG_SENSORS_ADT7462 is not set | ||
946 | # CONFIG_SENSORS_ADT7470 is not set | ||
947 | # CONFIG_SENSORS_ADT7473 is not set | ||
948 | # CONFIG_SENSORS_ATXP1 is not set | ||
949 | # CONFIG_SENSORS_DS1621 is not set | ||
950 | # CONFIG_SENSORS_I5K_AMB is not set | ||
951 | # CONFIG_SENSORS_F71805F is not set | ||
952 | # CONFIG_SENSORS_F71882FG is not set | ||
953 | # CONFIG_SENSORS_F75375S is not set | ||
954 | # CONFIG_SENSORS_GL518SM is not set | ||
955 | # CONFIG_SENSORS_GL520SM is not set | ||
956 | # CONFIG_SENSORS_IT87 is not set | ||
957 | # CONFIG_SENSORS_LM63 is not set | ||
958 | # CONFIG_SENSORS_LM75 is not set | ||
959 | # CONFIG_SENSORS_LM77 is not set | ||
960 | # CONFIG_SENSORS_LM78 is not set | ||
961 | # CONFIG_SENSORS_LM80 is not set | ||
962 | # CONFIG_SENSORS_LM83 is not set | ||
963 | # CONFIG_SENSORS_LM85 is not set | ||
964 | # CONFIG_SENSORS_LM87 is not set | ||
965 | # CONFIG_SENSORS_LM90 is not set | ||
966 | # CONFIG_SENSORS_LM92 is not set | ||
967 | # CONFIG_SENSORS_LM93 is not set | ||
968 | # CONFIG_SENSORS_LTC4245 is not set | ||
969 | # CONFIG_SENSORS_MAX1619 is not set | ||
970 | # CONFIG_SENSORS_MAX6650 is not set | ||
971 | # CONFIG_SENSORS_PC87360 is not set | ||
972 | # CONFIG_SENSORS_PC87427 is not set | ||
973 | # CONFIG_SENSORS_SIS5595 is not set | ||
974 | # CONFIG_SENSORS_DME1737 is not set | ||
975 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
976 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
977 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
978 | # CONFIG_SENSORS_ADS7828 is not set | ||
979 | # CONFIG_SENSORS_THMC50 is not set | ||
980 | # CONFIG_SENSORS_VIA686A is not set | ||
981 | # CONFIG_SENSORS_VT1211 is not set | ||
982 | # CONFIG_SENSORS_VT8231 is not set | ||
983 | # CONFIG_SENSORS_W83781D is not set | ||
984 | # CONFIG_SENSORS_W83791D is not set | ||
985 | # CONFIG_SENSORS_W83792D is not set | ||
986 | # CONFIG_SENSORS_W83793 is not set | ||
987 | # CONFIG_SENSORS_W83L785TS is not set | ||
988 | # CONFIG_SENSORS_W83L786NG is not set | ||
989 | # CONFIG_SENSORS_W83627HF is not set | ||
990 | # CONFIG_SENSORS_W83627EHF is not set | ||
991 | # CONFIG_SENSORS_LIS3LV02D is not set | ||
992 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
993 | CONFIG_THERMAL=m | ||
994 | # CONFIG_THERMAL_HWMON is not set | ||
995 | # CONFIG_WATCHDOG is not set | ||
996 | CONFIG_SSB_POSSIBLE=y | ||
997 | |||
998 | # | ||
999 | # Sonics Silicon Backplane | ||
1000 | # | ||
1001 | # CONFIG_SSB is not set | ||
1002 | |||
1003 | # | ||
1004 | # Multifunction device drivers | ||
1005 | # | ||
1006 | # CONFIG_MFD_CORE is not set | ||
1007 | # CONFIG_MFD_SM501 is not set | ||
1008 | # CONFIG_HTC_PASIC3 is not set | ||
1009 | # CONFIG_MFD_TMIO is not set | ||
1010 | # CONFIG_MFD_WM8400 is not set | ||
1011 | # CONFIG_MFD_WM8350_I2C is not set | ||
1012 | # CONFIG_MFD_PCF50633 is not set | ||
1013 | # CONFIG_REGULATOR is not set | ||
1014 | |||
1015 | # | ||
1016 | # Multimedia devices | ||
1017 | # | ||
1018 | |||
1019 | # | ||
1020 | # Multimedia core support | ||
1021 | # | ||
1022 | # CONFIG_VIDEO_DEV is not set | ||
1023 | # CONFIG_DVB_CORE is not set | ||
1024 | # CONFIG_VIDEO_MEDIA is not set | ||
1025 | |||
1026 | # | ||
1027 | # Multimedia drivers | ||
1028 | # | ||
1029 | CONFIG_DAB=y | ||
1030 | # CONFIG_USB_DABUSB is not set | ||
1031 | |||
1032 | # | ||
1033 | # Graphics support | ||
1034 | # | ||
1035 | CONFIG_AGP=m | ||
1036 | CONFIG_DRM=m | ||
1037 | CONFIG_DRM_TDFX=m | ||
1038 | CONFIG_DRM_R128=m | ||
1039 | CONFIG_DRM_RADEON=m | ||
1040 | CONFIG_DRM_MGA=m | ||
1041 | CONFIG_DRM_SIS=m | ||
1042 | # CONFIG_DRM_VIA is not set | ||
1043 | # CONFIG_DRM_SAVAGE is not set | ||
1044 | # CONFIG_VGASTATE is not set | ||
1045 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
1046 | # CONFIG_FB is not set | ||
1047 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
1048 | |||
1049 | # | ||
1050 | # Display device support | ||
1051 | # | ||
1052 | # CONFIG_DISPLAY_SUPPORT is not set | ||
1053 | |||
1054 | # | ||
1055 | # Console display driver support | ||
1056 | # | ||
1057 | CONFIG_VGA_CONSOLE=y | ||
1058 | # CONFIG_VGACON_SOFT_SCROLLBACK is not set | ||
1059 | CONFIG_DUMMY_CONSOLE=y | ||
1060 | # CONFIG_SOUND is not set | ||
1061 | CONFIG_HID_SUPPORT=y | ||
1062 | CONFIG_HID=y | ||
1063 | # CONFIG_HID_DEBUG is not set | ||
1064 | # CONFIG_HIDRAW is not set | ||
1065 | |||
1066 | # | ||
1067 | # USB Input Devices | ||
1068 | # | ||
1069 | CONFIG_USB_HID=y | ||
1070 | # CONFIG_HID_PID is not set | ||
1071 | # CONFIG_USB_HIDDEV is not set | ||
1072 | |||
1073 | # | ||
1074 | # Special HID drivers | ||
1075 | # | ||
1076 | CONFIG_HID_COMPAT=y | ||
1077 | CONFIG_HID_A4TECH=y | ||
1078 | CONFIG_HID_APPLE=y | ||
1079 | CONFIG_HID_BELKIN=y | ||
1080 | CONFIG_HID_CHERRY=y | ||
1081 | CONFIG_HID_CHICONY=y | ||
1082 | CONFIG_HID_CYPRESS=y | ||
1083 | CONFIG_HID_EZKEY=y | ||
1084 | CONFIG_HID_GYRATION=y | ||
1085 | CONFIG_HID_LOGITECH=y | ||
1086 | # CONFIG_LOGITECH_FF is not set | ||
1087 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | ||
1088 | CONFIG_HID_MICROSOFT=y | ||
1089 | CONFIG_HID_MONTEREY=y | ||
1090 | CONFIG_HID_NTRIG=y | ||
1091 | CONFIG_HID_PANTHERLORD=y | ||
1092 | # CONFIG_PANTHERLORD_FF is not set | ||
1093 | CONFIG_HID_PETALYNX=y | ||
1094 | CONFIG_HID_SAMSUNG=y | ||
1095 | CONFIG_HID_SONY=y | ||
1096 | CONFIG_HID_SUNPLUS=y | ||
1097 | # CONFIG_GREENASIA_FF is not set | ||
1098 | CONFIG_HID_TOPSEED=y | ||
1099 | # CONFIG_THRUSTMASTER_FF is not set | ||
1100 | # CONFIG_ZEROPLUS_FF is not set | ||
1101 | CONFIG_USB_SUPPORT=y | ||
1102 | CONFIG_USB_ARCH_HAS_HCD=y | ||
1103 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
1104 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
1105 | CONFIG_USB=y | ||
1106 | # CONFIG_USB_DEBUG is not set | ||
1107 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
1108 | |||
1109 | # | ||
1110 | # Miscellaneous USB options | ||
1111 | # | ||
1112 | CONFIG_USB_DEVICEFS=y | ||
1113 | CONFIG_USB_DEVICE_CLASS=y | ||
1114 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
1115 | # CONFIG_USB_SUSPEND is not set | ||
1116 | # CONFIG_USB_OTG is not set | ||
1117 | # CONFIG_USB_MON is not set | ||
1118 | # CONFIG_USB_WUSB is not set | ||
1119 | # CONFIG_USB_WUSB_CBAF is not set | ||
1120 | |||
1121 | # | ||
1122 | # USB Host Controller Drivers | ||
1123 | # | ||
1124 | # CONFIG_USB_C67X00_HCD is not set | ||
1125 | CONFIG_USB_EHCI_HCD=m | ||
1126 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
1127 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
1128 | # CONFIG_USB_OXU210HP_HCD is not set | ||
1129 | # CONFIG_USB_ISP116X_HCD is not set | ||
1130 | # CONFIG_USB_ISP1760_HCD is not set | ||
1131 | CONFIG_USB_OHCI_HCD=m | ||
1132 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
1133 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
1134 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
1135 | CONFIG_USB_UHCI_HCD=y | ||
1136 | # CONFIG_USB_SL811_HCD is not set | ||
1137 | # CONFIG_USB_R8A66597_HCD is not set | ||
1138 | # CONFIG_USB_WHCI_HCD is not set | ||
1139 | # CONFIG_USB_HWA_HCD is not set | ||
1140 | |||
1141 | # | ||
1142 | # USB Device Class drivers | ||
1143 | # | ||
1144 | # CONFIG_USB_ACM is not set | ||
1145 | # CONFIG_USB_PRINTER is not set | ||
1146 | # CONFIG_USB_WDM is not set | ||
1147 | # CONFIG_USB_TMC is not set | ||
1148 | |||
1149 | # | ||
1150 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; | ||
1151 | # | ||
1152 | |||
1153 | # | ||
1154 | # see USB_STORAGE Help for more information | ||
1155 | # | ||
1156 | CONFIG_USB_STORAGE=m | ||
1157 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
1158 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
1159 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
1160 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
1161 | # CONFIG_USB_STORAGE_USBAT is not set | ||
1162 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
1163 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
1164 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
1165 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
1166 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
1167 | # CONFIG_USB_STORAGE_KARMA is not set | ||
1168 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
1169 | # CONFIG_USB_LIBUSUAL is not set | ||
1170 | |||
1171 | # | ||
1172 | # USB Imaging devices | ||
1173 | # | ||
1174 | # CONFIG_USB_MDC800 is not set | ||
1175 | # CONFIG_USB_MICROTEK is not set | ||
1176 | |||
1177 | # | ||
1178 | # USB port drivers | ||
1179 | # | ||
1180 | # CONFIG_USB_SERIAL is not set | ||
1181 | |||
1182 | # | ||
1183 | # USB Miscellaneous drivers | ||
1184 | # | ||
1185 | # CONFIG_USB_EMI62 is not set | ||
1186 | # CONFIG_USB_EMI26 is not set | ||
1187 | # CONFIG_USB_ADUTUX is not set | ||
1188 | # CONFIG_USB_SEVSEG is not set | ||
1189 | # CONFIG_USB_RIO500 is not set | ||
1190 | # CONFIG_USB_LEGOTOWER is not set | ||
1191 | # CONFIG_USB_LCD is not set | ||
1192 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1193 | # CONFIG_USB_LED is not set | ||
1194 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
1195 | # CONFIG_USB_CYTHERM is not set | ||
1196 | # CONFIG_USB_PHIDGET is not set | ||
1197 | # CONFIG_USB_IDMOUSE is not set | ||
1198 | # CONFIG_USB_FTDI_ELAN is not set | ||
1199 | # CONFIG_USB_APPLEDISPLAY is not set | ||
1200 | # CONFIG_USB_SISUSBVGA is not set | ||
1201 | # CONFIG_USB_LD is not set | ||
1202 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
1203 | # CONFIG_USB_IOWARRIOR is not set | ||
1204 | # CONFIG_USB_TEST is not set | ||
1205 | # CONFIG_USB_ISIGHTFW is not set | ||
1206 | # CONFIG_USB_VST is not set | ||
1207 | # CONFIG_USB_GADGET is not set | ||
1208 | |||
1209 | # | ||
1210 | # OTG and related infrastructure | ||
1211 | # | ||
1212 | # CONFIG_UWB is not set | ||
1213 | # CONFIG_MMC is not set | ||
1214 | # CONFIG_MEMSTICK is not set | ||
1215 | # CONFIG_NEW_LEDS is not set | ||
1216 | # CONFIG_ACCESSIBILITY is not set | ||
1217 | # CONFIG_INFINIBAND is not set | ||
1218 | # CONFIG_RTC_CLASS is not set | ||
1219 | # CONFIG_DMADEVICES is not set | ||
1220 | # CONFIG_UIO is not set | ||
1221 | CONFIG_XEN_BALLOON=y | ||
1222 | CONFIG_XEN_SCRUB_PAGES=y | ||
1223 | CONFIG_XENFS=y | ||
1224 | CONFIG_XEN_COMPAT_XENFS=y | ||
1225 | # CONFIG_STAGING is not set | ||
1226 | # CONFIG_MSPEC is not set | ||
1227 | |||
1228 | # | ||
1229 | # File systems | ||
1230 | # | ||
1231 | CONFIG_EXT2_FS=y | ||
1232 | CONFIG_EXT2_FS_XATTR=y | ||
1233 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
1234 | CONFIG_EXT2_FS_SECURITY=y | ||
1235 | # CONFIG_EXT2_FS_XIP is not set | ||
1236 | CONFIG_EXT3_FS=y | ||
1237 | CONFIG_EXT3_FS_XATTR=y | ||
1238 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
1239 | CONFIG_EXT3_FS_SECURITY=y | ||
1240 | # CONFIG_EXT4_FS is not set | ||
1241 | CONFIG_JBD=y | ||
1242 | CONFIG_FS_MBCACHE=y | ||
1243 | CONFIG_REISERFS_FS=y | ||
1244 | # CONFIG_REISERFS_CHECK is not set | ||
1245 | # CONFIG_REISERFS_PROC_INFO is not set | ||
1246 | CONFIG_REISERFS_FS_XATTR=y | ||
1247 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
1248 | CONFIG_REISERFS_FS_SECURITY=y | ||
1249 | # CONFIG_JFS_FS is not set | ||
1250 | CONFIG_FS_POSIX_ACL=y | ||
1251 | CONFIG_FILE_LOCKING=y | ||
1252 | CONFIG_XFS_FS=y | ||
1253 | # CONFIG_XFS_QUOTA is not set | ||
1254 | # CONFIG_XFS_POSIX_ACL is not set | ||
1255 | # CONFIG_XFS_RT is not set | ||
1256 | # CONFIG_XFS_DEBUG is not set | ||
1257 | # CONFIG_GFS2_FS is not set | ||
1258 | # CONFIG_OCFS2_FS is not set | ||
1259 | # CONFIG_BTRFS_FS is not set | ||
1260 | CONFIG_DNOTIFY=y | ||
1261 | CONFIG_INOTIFY=y | ||
1262 | CONFIG_INOTIFY_USER=y | ||
1263 | # CONFIG_QUOTA is not set | ||
1264 | CONFIG_AUTOFS_FS=y | ||
1265 | CONFIG_AUTOFS4_FS=y | ||
1266 | # CONFIG_FUSE_FS is not set | ||
1267 | |||
1268 | # | ||
1269 | # CD-ROM/DVD Filesystems | ||
1270 | # | ||
1271 | CONFIG_ISO9660_FS=m | ||
1272 | CONFIG_JOLIET=y | ||
1273 | # CONFIG_ZISOFS is not set | ||
1274 | CONFIG_UDF_FS=m | ||
1275 | CONFIG_UDF_NLS=y | ||
1276 | |||
1277 | # | ||
1278 | # DOS/FAT/NT Filesystems | ||
1279 | # | ||
1280 | CONFIG_FAT_FS=y | ||
1281 | # CONFIG_MSDOS_FS is not set | ||
1282 | CONFIG_VFAT_FS=y | ||
1283 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1284 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1285 | CONFIG_NTFS_FS=m | ||
1286 | # CONFIG_NTFS_DEBUG is not set | ||
1287 | # CONFIG_NTFS_RW is not set | ||
1288 | |||
1289 | # | ||
1290 | # Pseudo filesystems | ||
1291 | # | ||
1292 | CONFIG_PROC_FS=y | ||
1293 | CONFIG_PROC_KCORE=y | ||
1294 | CONFIG_PROC_SYSCTL=y | ||
1295 | CONFIG_PROC_PAGE_MONITOR=y | ||
1296 | CONFIG_SYSFS=y | ||
1297 | CONFIG_TMPFS=y | ||
1298 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1299 | CONFIG_HUGETLBFS=y | ||
1300 | CONFIG_HUGETLB_PAGE=y | ||
1301 | # CONFIG_CONFIGFS_FS is not set | ||
1302 | CONFIG_MISC_FILESYSTEMS=y | ||
1303 | # CONFIG_ADFS_FS is not set | ||
1304 | # CONFIG_AFFS_FS is not set | ||
1305 | # CONFIG_HFS_FS is not set | ||
1306 | # CONFIG_HFSPLUS_FS is not set | ||
1307 | # CONFIG_BEFS_FS is not set | ||
1308 | # CONFIG_BFS_FS is not set | ||
1309 | # CONFIG_EFS_FS is not set | ||
1310 | # CONFIG_CRAMFS is not set | ||
1311 | # CONFIG_SQUASHFS is not set | ||
1312 | # CONFIG_VXFS_FS is not set | ||
1313 | # CONFIG_MINIX_FS is not set | ||
1314 | # CONFIG_OMFS_FS is not set | ||
1315 | # CONFIG_HPFS_FS is not set | ||
1316 | # CONFIG_QNX4FS_FS is not set | ||
1317 | # CONFIG_ROMFS_FS is not set | ||
1318 | # CONFIG_SYSV_FS is not set | ||
1319 | # CONFIG_UFS_FS is not set | ||
1320 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1321 | CONFIG_NFS_FS=m | ||
1322 | CONFIG_NFS_V3=y | ||
1323 | # CONFIG_NFS_V3_ACL is not set | ||
1324 | CONFIG_NFS_V4=y | ||
1325 | CONFIG_NFSD=m | ||
1326 | CONFIG_NFSD_V3=y | ||
1327 | # CONFIG_NFSD_V3_ACL is not set | ||
1328 | CONFIG_NFSD_V4=y | ||
1329 | CONFIG_LOCKD=m | ||
1330 | CONFIG_LOCKD_V4=y | ||
1331 | CONFIG_EXPORTFS=m | ||
1332 | CONFIG_NFS_COMMON=y | ||
1333 | CONFIG_SUNRPC=m | ||
1334 | CONFIG_SUNRPC_GSS=m | ||
1335 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
1336 | CONFIG_RPCSEC_GSS_KRB5=m | ||
1337 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1338 | CONFIG_SMB_FS=m | ||
1339 | CONFIG_SMB_NLS_DEFAULT=y | ||
1340 | CONFIG_SMB_NLS_REMOTE="cp437" | ||
1341 | CONFIG_CIFS=m | ||
1342 | # CONFIG_CIFS_STATS is not set | ||
1343 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
1344 | # CONFIG_CIFS_XATTR is not set | ||
1345 | # CONFIG_CIFS_DEBUG2 is not set | ||
1346 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1347 | # CONFIG_NCP_FS is not set | ||
1348 | # CONFIG_CODA_FS is not set | ||
1349 | # CONFIG_AFS_FS is not set | ||
1350 | |||
1351 | # | ||
1352 | # Partition Types | ||
1353 | # | ||
1354 | CONFIG_PARTITION_ADVANCED=y | ||
1355 | # CONFIG_ACORN_PARTITION is not set | ||
1356 | # CONFIG_OSF_PARTITION is not set | ||
1357 | # CONFIG_AMIGA_PARTITION is not set | ||
1358 | # CONFIG_ATARI_PARTITION is not set | ||
1359 | # CONFIG_MAC_PARTITION is not set | ||
1360 | CONFIG_MSDOS_PARTITION=y | ||
1361 | # CONFIG_BSD_DISKLABEL is not set | ||
1362 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1363 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1364 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1365 | # CONFIG_LDM_PARTITION is not set | ||
1366 | CONFIG_SGI_PARTITION=y | ||
1367 | # CONFIG_ULTRIX_PARTITION is not set | ||
1368 | # CONFIG_SUN_PARTITION is not set | ||
1369 | # CONFIG_KARMA_PARTITION is not set | ||
1370 | CONFIG_EFI_PARTITION=y | ||
1371 | # CONFIG_SYSV68_PARTITION is not set | ||
1372 | CONFIG_NLS=y | ||
1373 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1374 | CONFIG_NLS_CODEPAGE_437=y | ||
1375 | CONFIG_NLS_CODEPAGE_737=m | ||
1376 | CONFIG_NLS_CODEPAGE_775=m | ||
1377 | CONFIG_NLS_CODEPAGE_850=m | ||
1378 | CONFIG_NLS_CODEPAGE_852=m | ||
1379 | CONFIG_NLS_CODEPAGE_855=m | ||
1380 | CONFIG_NLS_CODEPAGE_857=m | ||
1381 | CONFIG_NLS_CODEPAGE_860=m | ||
1382 | CONFIG_NLS_CODEPAGE_861=m | ||
1383 | CONFIG_NLS_CODEPAGE_862=m | ||
1384 | CONFIG_NLS_CODEPAGE_863=m | ||
1385 | CONFIG_NLS_CODEPAGE_864=m | ||
1386 | CONFIG_NLS_CODEPAGE_865=m | ||
1387 | CONFIG_NLS_CODEPAGE_866=m | ||
1388 | CONFIG_NLS_CODEPAGE_869=m | ||
1389 | CONFIG_NLS_CODEPAGE_936=m | ||
1390 | CONFIG_NLS_CODEPAGE_950=m | ||
1391 | CONFIG_NLS_CODEPAGE_932=m | ||
1392 | CONFIG_NLS_CODEPAGE_949=m | ||
1393 | CONFIG_NLS_CODEPAGE_874=m | ||
1394 | CONFIG_NLS_ISO8859_8=m | ||
1395 | CONFIG_NLS_CODEPAGE_1250=m | ||
1396 | CONFIG_NLS_CODEPAGE_1251=m | ||
1397 | # CONFIG_NLS_ASCII is not set | ||
1398 | CONFIG_NLS_ISO8859_1=y | ||
1399 | CONFIG_NLS_ISO8859_2=m | ||
1400 | CONFIG_NLS_ISO8859_3=m | ||
1401 | CONFIG_NLS_ISO8859_4=m | ||
1402 | CONFIG_NLS_ISO8859_5=m | ||
1403 | CONFIG_NLS_ISO8859_6=m | ||
1404 | CONFIG_NLS_ISO8859_7=m | ||
1405 | CONFIG_NLS_ISO8859_9=m | ||
1406 | CONFIG_NLS_ISO8859_13=m | ||
1407 | CONFIG_NLS_ISO8859_14=m | ||
1408 | CONFIG_NLS_ISO8859_15=m | ||
1409 | CONFIG_NLS_KOI8_R=m | ||
1410 | CONFIG_NLS_KOI8_U=m | ||
1411 | CONFIG_NLS_UTF8=m | ||
1412 | # CONFIG_DLM is not set | ||
1413 | |||
1414 | # | ||
1415 | # Kernel hacking | ||
1416 | # | ||
1417 | # CONFIG_PRINTK_TIME is not set | ||
1418 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1419 | CONFIG_ENABLE_MUST_CHECK=y | ||
1420 | CONFIG_FRAME_WARN=2048 | ||
1421 | CONFIG_MAGIC_SYSRQ=y | ||
1422 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1423 | # CONFIG_DEBUG_FS is not set | ||
1424 | # CONFIG_HEADERS_CHECK is not set | ||
1425 | CONFIG_DEBUG_KERNEL=y | ||
1426 | # CONFIG_DEBUG_SHIRQ is not set | ||
1427 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1428 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
1429 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
1430 | CONFIG_SCHED_DEBUG=y | ||
1431 | # CONFIG_SCHEDSTATS is not set | ||
1432 | # CONFIG_TIMER_STATS is not set | ||
1433 | # CONFIG_DEBUG_OBJECTS is not set | ||
1434 | # CONFIG_SLUB_DEBUG_ON is not set | ||
1435 | # CONFIG_SLUB_STATS is not set | ||
1436 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1437 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1438 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1439 | CONFIG_DEBUG_MUTEXES=y | ||
1440 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1441 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1442 | # CONFIG_DEBUG_KOBJECT is not set | ||
1443 | # CONFIG_DEBUG_INFO is not set | ||
1444 | # CONFIG_DEBUG_VM is not set | ||
1445 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1446 | CONFIG_DEBUG_MEMORY_INIT=y | ||
1447 | # CONFIG_DEBUG_LIST is not set | ||
1448 | # CONFIG_DEBUG_SG is not set | ||
1449 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1450 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1451 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1452 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1453 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1454 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1455 | # CONFIG_FAULT_INJECTION is not set | ||
1456 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
1457 | |||
1458 | # | ||
1459 | # Tracers | ||
1460 | # | ||
1461 | # CONFIG_SCHED_TRACER is not set | ||
1462 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1463 | # CONFIG_BOOT_TRACER is not set | ||
1464 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1465 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
1466 | # CONFIG_SAMPLES is not set | ||
1467 | CONFIG_IA64_GRANULE_16MB=y | ||
1468 | # CONFIG_IA64_GRANULE_64MB is not set | ||
1469 | # CONFIG_IA64_PRINT_HAZARDS is not set | ||
1470 | # CONFIG_DISABLE_VHPT is not set | ||
1471 | # CONFIG_IA64_DEBUG_CMPXCHG is not set | ||
1472 | # CONFIG_IA64_DEBUG_IRQ is not set | ||
1473 | |||
1474 | # | ||
1475 | # Security options | ||
1476 | # | ||
1477 | # CONFIG_KEYS is not set | ||
1478 | # CONFIG_SECURITY is not set | ||
1479 | # CONFIG_SECURITYFS is not set | ||
1480 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1481 | CONFIG_CRYPTO=y | ||
1482 | |||
1483 | # | ||
1484 | # Crypto core or helper | ||
1485 | # | ||
1486 | # CONFIG_CRYPTO_FIPS is not set | ||
1487 | CONFIG_CRYPTO_ALGAPI=y | ||
1488 | CONFIG_CRYPTO_ALGAPI2=y | ||
1489 | CONFIG_CRYPTO_AEAD2=y | ||
1490 | CONFIG_CRYPTO_BLKCIPHER=m | ||
1491 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1492 | CONFIG_CRYPTO_HASH=y | ||
1493 | CONFIG_CRYPTO_HASH2=y | ||
1494 | CONFIG_CRYPTO_RNG2=y | ||
1495 | CONFIG_CRYPTO_MANAGER=m | ||
1496 | CONFIG_CRYPTO_MANAGER2=y | ||
1497 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1498 | # CONFIG_CRYPTO_NULL is not set | ||
1499 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1500 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1501 | # CONFIG_CRYPTO_TEST is not set | ||
1502 | |||
1503 | # | ||
1504 | # Authenticated Encryption with Associated Data | ||
1505 | # | ||
1506 | # CONFIG_CRYPTO_CCM is not set | ||
1507 | # CONFIG_CRYPTO_GCM is not set | ||
1508 | # CONFIG_CRYPTO_SEQIV is not set | ||
1509 | |||
1510 | # | ||
1511 | # Block modes | ||
1512 | # | ||
1513 | CONFIG_CRYPTO_CBC=m | ||
1514 | # CONFIG_CRYPTO_CTR is not set | ||
1515 | # CONFIG_CRYPTO_CTS is not set | ||
1516 | CONFIG_CRYPTO_ECB=m | ||
1517 | # CONFIG_CRYPTO_LRW is not set | ||
1518 | CONFIG_CRYPTO_PCBC=m | ||
1519 | # CONFIG_CRYPTO_XTS is not set | ||
1520 | |||
1521 | # | ||
1522 | # Hash modes | ||
1523 | # | ||
1524 | # CONFIG_CRYPTO_HMAC is not set | ||
1525 | # CONFIG_CRYPTO_XCBC is not set | ||
1526 | |||
1527 | # | ||
1528 | # Digest | ||
1529 | # | ||
1530 | # CONFIG_CRYPTO_CRC32C is not set | ||
1531 | # CONFIG_CRYPTO_MD4 is not set | ||
1532 | CONFIG_CRYPTO_MD5=y | ||
1533 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1534 | # CONFIG_CRYPTO_RMD128 is not set | ||
1535 | # CONFIG_CRYPTO_RMD160 is not set | ||
1536 | # CONFIG_CRYPTO_RMD256 is not set | ||
1537 | # CONFIG_CRYPTO_RMD320 is not set | ||
1538 | # CONFIG_CRYPTO_SHA1 is not set | ||
1539 | # CONFIG_CRYPTO_SHA256 is not set | ||
1540 | # CONFIG_CRYPTO_SHA512 is not set | ||
1541 | # CONFIG_CRYPTO_TGR192 is not set | ||
1542 | # CONFIG_CRYPTO_WP512 is not set | ||
1543 | |||
1544 | # | ||
1545 | # Ciphers | ||
1546 | # | ||
1547 | # CONFIG_CRYPTO_AES is not set | ||
1548 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1549 | # CONFIG_CRYPTO_ARC4 is not set | ||
1550 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1551 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1552 | # CONFIG_CRYPTO_CAST5 is not set | ||
1553 | # CONFIG_CRYPTO_CAST6 is not set | ||
1554 | CONFIG_CRYPTO_DES=m | ||
1555 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1556 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1557 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1558 | # CONFIG_CRYPTO_SEED is not set | ||
1559 | # CONFIG_CRYPTO_SERPENT is not set | ||
1560 | # CONFIG_CRYPTO_TEA is not set | ||
1561 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1562 | |||
1563 | # | ||
1564 | # Compression | ||
1565 | # | ||
1566 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1567 | # CONFIG_CRYPTO_LZO is not set | ||
1568 | |||
1569 | # | ||
1570 | # Random Number Generation | ||
1571 | # | ||
1572 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1573 | CONFIG_CRYPTO_HW=y | ||
1574 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | ||
1575 | CONFIG_HAVE_KVM=y | ||
1576 | CONFIG_VIRTUALIZATION=y | ||
1577 | # CONFIG_KVM is not set | ||
1578 | # CONFIG_VIRTIO_PCI is not set | ||
1579 | # CONFIG_VIRTIO_BALLOON is not set | ||
1580 | |||
1581 | # | ||
1582 | # Library routines | ||
1583 | # | ||
1584 | CONFIG_BITREVERSE=y | ||
1585 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1586 | # CONFIG_CRC_CCITT is not set | ||
1587 | # CONFIG_CRC16 is not set | ||
1588 | # CONFIG_CRC_T10DIF is not set | ||
1589 | CONFIG_CRC_ITU_T=m | ||
1590 | CONFIG_CRC32=y | ||
1591 | # CONFIG_CRC7 is not set | ||
1592 | # CONFIG_LIBCRC32C is not set | ||
1593 | CONFIG_PLIST=y | ||
1594 | CONFIG_HAS_IOMEM=y | ||
1595 | CONFIG_HAS_IOPORT=y | ||
1596 | CONFIG_HAS_DMA=y | ||
1597 | CONFIG_GENERIC_HARDIRQS=y | ||
1598 | CONFIG_GENERIC_IRQ_PROBE=y | ||
1599 | CONFIG_GENERIC_PENDING_IRQ=y | ||
1600 | CONFIG_IRQ_PER_CPU=y | ||
1601 | # CONFIG_IOMMU_API is not set | ||
diff --git a/arch/ia64/include/asm/fpu.h b/arch/ia64/include/asm/fpu.h index 3859558ff0a4..0c26157cffa5 100644 --- a/arch/ia64/include/asm/fpu.h +++ b/arch/ia64/include/asm/fpu.h | |||
@@ -6,8 +6,6 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com> | 6 | * David Mosberger-Tang <davidm@hpl.hp.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/types.h> | ||
10 | |||
11 | /* floating point status register: */ | 9 | /* floating point status register: */ |
12 | #define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ | 10 | #define FPSR_TRAP_VD (1 << 0) /* invalid op trap disabled */ |
13 | #define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ | 11 | #define FPSR_TRAP_DD (1 << 1) /* denormal trap disabled */ |
diff --git a/arch/ia64/include/asm/gcc_intrin.h b/arch/ia64/include/asm/gcc_intrin.h index 0f5b55921758..c2c5fd8fcac4 100644 --- a/arch/ia64/include/asm/gcc_intrin.h +++ b/arch/ia64/include/asm/gcc_intrin.h | |||
@@ -6,6 +6,7 @@ | |||
6 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> | 6 | * Copyright (C) 2002,2003 Suresh Siddha <suresh.b.siddha@intel.com> |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/types.h> | ||
9 | #include <linux/compiler.h> | 10 | #include <linux/compiler.h> |
10 | 11 | ||
11 | /* define this macro to get some asm stmts included in 'c' files */ | 12 | /* define this macro to get some asm stmts included in 'c' files */ |
diff --git a/arch/ia64/include/asm/intrinsics.h b/arch/ia64/include/asm/intrinsics.h index a3e44a5ed497..c47830e26cb7 100644 --- a/arch/ia64/include/asm/intrinsics.h +++ b/arch/ia64/include/asm/intrinsics.h | |||
@@ -10,6 +10,7 @@ | |||
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | 12 | ||
13 | #include <linux/types.h> | ||
13 | /* include compiler specific intrinsics */ | 14 | /* include compiler specific intrinsics */ |
14 | #include <asm/ia64regs.h> | 15 | #include <asm/ia64regs.h> |
15 | #ifdef __INTEL_COMPILER | 16 | #ifdef __INTEL_COMPILER |
diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/asm/kvm.h index 68aa6da807c1..2b0a38e84705 100644 --- a/arch/ia64/include/asm/kvm.h +++ b/arch/ia64/include/asm/kvm.h | |||
@@ -21,10 +21,13 @@ | |||
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <asm/types.h> | 24 | #include <linux/types.h> |
25 | |||
26 | #include <linux/ioctl.h> | 25 | #include <linux/ioctl.h> |
27 | 26 | ||
27 | /* Select x86 specific features in <linux/kvm.h> */ | ||
28 | #define __KVM_HAVE_IOAPIC | ||
29 | #define __KVM_HAVE_DEVICE_ASSIGNMENT | ||
30 | |||
28 | /* Architectural interrupt line count. */ | 31 | /* Architectural interrupt line count. */ |
29 | #define KVM_NR_INTERRUPTS 256 | 32 | #define KVM_NR_INTERRUPTS 256 |
30 | 33 | ||
diff --git a/arch/ia64/include/asm/mmzone.h b/arch/ia64/include/asm/mmzone.h index 34efe88eb849..f2ca32069b3f 100644 --- a/arch/ia64/include/asm/mmzone.h +++ b/arch/ia64/include/asm/mmzone.h | |||
@@ -31,10 +31,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
31 | #endif | 31 | #endif |
32 | } | 32 | } |
33 | 33 | ||
34 | #ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID | ||
35 | extern int early_pfn_to_nid(unsigned long pfn); | ||
36 | #endif | ||
37 | |||
38 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ | 34 | #ifdef CONFIG_IA64_DIG /* DIG systems are small */ |
39 | # define MAX_PHYSNODE_ID 8 | 35 | # define MAX_PHYSNODE_ID 8 |
40 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) | 36 | # define NR_NODE_MEMBLKS (MAX_NUMNODES * 8) |
diff --git a/arch/ia64/include/asm/sn/bte.h b/arch/ia64/include/asm/sn/bte.h index 5efecf06c9a4..96798d2da7c2 100644 --- a/arch/ia64/include/asm/sn/bte.h +++ b/arch/ia64/include/asm/sn/bte.h | |||
@@ -39,7 +39,7 @@ | |||
39 | /* BTE status register only supports 16 bits for length field */ | 39 | /* BTE status register only supports 16 bits for length field */ |
40 | #define BTE_LEN_BITS (16) | 40 | #define BTE_LEN_BITS (16) |
41 | #define BTE_LEN_MASK ((1 << BTE_LEN_BITS) - 1) | 41 | #define BTE_LEN_MASK ((1 << BTE_LEN_BITS) - 1) |
42 | #define BTE_MAX_XFER ((1 << BTE_LEN_BITS) * L1_CACHE_BYTES) | 42 | #define BTE_MAX_XFER (BTE_LEN_MASK << L1_CACHE_SHIFT) |
43 | 43 | ||
44 | 44 | ||
45 | /* Define hardware */ | 45 | /* Define hardware */ |
diff --git a/arch/ia64/include/asm/swab.h b/arch/ia64/include/asm/swab.h index 6aa58b699eea..c89a8cb5d8a5 100644 --- a/arch/ia64/include/asm/swab.h +++ b/arch/ia64/include/asm/swab.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co. | 6 | * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/types.h> | 9 | #include <linux/types.h> |
10 | #include <asm/intrinsics.h> | 10 | #include <asm/intrinsics.h> |
11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
12 | 12 | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index d541671caf4a..bdef2ce38c8b 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -199,6 +199,10 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size) | |||
199 | return __va(phys_addr); | 199 | return __va(phys_addr); |
200 | } | 200 | } |
201 | 201 | ||
202 | void __init __acpi_unmap_table(char *map, unsigned long size) | ||
203 | { | ||
204 | } | ||
205 | |||
202 | /* -------------------------------------------------------------------------- | 206 | /* -------------------------------------------------------------------------- |
203 | Boot-time Table Parsing | 207 | Boot-time Table Parsing |
204 | -------------------------------------------------------------------------- */ | 208 | -------------------------------------------------------------------------- */ |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 11463994a7d5..52290547c85b 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -736,14 +736,15 @@ int __cpu_disable(void) | |||
736 | return -EBUSY; | 736 | return -EBUSY; |
737 | } | 737 | } |
738 | 738 | ||
739 | cpu_clear(cpu, cpu_online_map); | ||
740 | |||
739 | if (migrate_platform_irqs(cpu)) { | 741 | if (migrate_platform_irqs(cpu)) { |
740 | cpu_set(cpu, cpu_online_map); | 742 | cpu_set(cpu, cpu_online_map); |
741 | return (-EBUSY); | 743 | return -EBUSY; |
742 | } | 744 | } |
743 | 745 | ||
744 | remove_siblinginfo(cpu); | 746 | remove_siblinginfo(cpu); |
745 | fixup_irqs(); | 747 | fixup_irqs(); |
746 | cpu_clear(cpu, cpu_online_map); | ||
747 | local_flush_tlb_all(); | 748 | local_flush_tlb_all(); |
748 | cpu_clear(cpu, cpu_callin_map); | 749 | cpu_clear(cpu, cpu_callin_map); |
749 | return 0; | 750 | return 0; |
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index 4e586f6110aa..28f982045f29 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -1337,6 +1337,10 @@ static void kvm_release_vm_pages(struct kvm *kvm) | |||
1337 | } | 1337 | } |
1338 | } | 1338 | } |
1339 | 1339 | ||
1340 | void kvm_arch_sync_events(struct kvm *kvm) | ||
1341 | { | ||
1342 | } | ||
1343 | |||
1340 | void kvm_arch_destroy_vm(struct kvm *kvm) | 1344 | void kvm_arch_destroy_vm(struct kvm *kvm) |
1341 | { | 1345 | { |
1342 | kvm_iommu_unmap_guest(kvm); | 1346 | kvm_iommu_unmap_guest(kvm); |
diff --git a/arch/ia64/kvm/process.c b/arch/ia64/kvm/process.c index 552d07724207..230eae482f32 100644 --- a/arch/ia64/kvm/process.c +++ b/arch/ia64/kvm/process.c | |||
@@ -455,13 +455,18 @@ fpswa_ret_t vmm_fp_emulate(int fp_fault, void *bundle, unsigned long *ipsr, | |||
455 | if (!vmm_fpswa_interface) | 455 | if (!vmm_fpswa_interface) |
456 | return (fpswa_ret_t) {-1, 0, 0, 0}; | 456 | return (fpswa_ret_t) {-1, 0, 0, 0}; |
457 | 457 | ||
458 | /* | ||
459 | * Just let fpswa driver to use hardware fp registers. | ||
460 | * No fp register is valid in memory. | ||
461 | */ | ||
462 | memset(&fp_state, 0, sizeof(fp_state_t)); | 458 | memset(&fp_state, 0, sizeof(fp_state_t)); |
463 | 459 | ||
464 | /* | 460 | /* |
461 | * compute fp_state. only FP registers f6 - f11 are used by the | ||
462 | * vmm, so set those bits in the mask and set the low volatile | ||
463 | * pointer to point to these registers. | ||
464 | */ | ||
465 | fp_state.bitmask_low64 = 0xfc0; /* bit6..bit11 */ | ||
466 | |||
467 | fp_state.fp_state_low_volatile = (fp_state_low_volatile_t *) ®s->f6; | ||
468 | |||
469 | /* | ||
465 | * unsigned long (*EFI_FPSWA) ( | 470 | * unsigned long (*EFI_FPSWA) ( |
466 | * unsigned long trap_type, | 471 | * unsigned long trap_type, |
467 | * void *Bundle, | 472 | * void *Bundle, |
@@ -545,10 +550,6 @@ void reflect_interruption(u64 ifa, u64 isr, u64 iim, | |||
545 | status = vmm_handle_fpu_swa(0, regs, isr); | 550 | status = vmm_handle_fpu_swa(0, regs, isr); |
546 | if (!status) | 551 | if (!status) |
547 | return ; | 552 | return ; |
548 | else if (-EAGAIN == status) { | ||
549 | vcpu_decrement_iip(vcpu); | ||
550 | return ; | ||
551 | } | ||
552 | break; | 553 | break; |
553 | } | 554 | } |
554 | 555 | ||
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c index b73bf1838e57..3efea7d0a351 100644 --- a/arch/ia64/mm/numa.c +++ b/arch/ia64/mm/numa.c | |||
@@ -58,7 +58,7 @@ paddr_to_nid(unsigned long paddr) | |||
58 | * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where | 58 | * SPARSEMEM to allocate the SPARSEMEM sectionmap on the NUMA node where |
59 | * the section resides. | 59 | * the section resides. |
60 | */ | 60 | */ |
61 | int early_pfn_to_nid(unsigned long pfn) | 61 | int __meminit __early_pfn_to_nid(unsigned long pfn) |
62 | { | 62 | { |
63 | int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec; | 63 | int i, section = pfn >> PFN_SECTION_SHIFT, ssec, esec; |
64 | 64 | ||
@@ -70,7 +70,7 @@ int early_pfn_to_nid(unsigned long pfn) | |||
70 | return node_memblk[i].nid; | 70 | return node_memblk[i].nid; |
71 | } | 71 | } |
72 | 72 | ||
73 | return 0; | 73 | return -1; |
74 | } | 74 | } |
75 | 75 | ||
76 | #ifdef CONFIG_MEMORY_HOTPLUG | 76 | #ifdef CONFIG_MEMORY_HOTPLUG |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index 9456d4034024..c6d6b62db66c 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
@@ -97,9 +97,10 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) | |||
97 | return BTE_SUCCESS; | 97 | return BTE_SUCCESS; |
98 | } | 98 | } |
99 | 99 | ||
100 | BUG_ON((len & L1_CACHE_MASK) || | 100 | BUG_ON(len & L1_CACHE_MASK); |
101 | (src & L1_CACHE_MASK) || (dest & L1_CACHE_MASK)); | 101 | BUG_ON(src & L1_CACHE_MASK); |
102 | BUG_ON(!(len < ((BTE_LEN_MASK + 1) << L1_CACHE_SHIFT))); | 102 | BUG_ON(dest & L1_CACHE_MASK); |
103 | BUG_ON(len > BTE_MAX_XFER); | ||
103 | 104 | ||
104 | /* | 105 | /* |
105 | * Start with interface corresponding to cpu number | 106 | * Start with interface corresponding to cpu number |
diff --git a/arch/ia64/xen/Kconfig b/arch/ia64/xen/Kconfig index f1683a20275b..515e0826803a 100644 --- a/arch/ia64/xen/Kconfig +++ b/arch/ia64/xen/Kconfig | |||
@@ -8,8 +8,7 @@ config XEN | |||
8 | depends on PARAVIRT && MCKINLEY && IA64_PAGE_SIZE_16KB && EXPERIMENTAL | 8 | depends on PARAVIRT && MCKINLEY && IA64_PAGE_SIZE_16KB && EXPERIMENTAL |
9 | select XEN_XENCOMM | 9 | select XEN_XENCOMM |
10 | select NO_IDLE_HZ | 10 | select NO_IDLE_HZ |
11 | 11 | # followings are required to save/restore. | |
12 | # those are required to save/restore. | ||
13 | select ARCH_SUSPEND_POSSIBLE | 12 | select ARCH_SUSPEND_POSSIBLE |
14 | select SUSPEND | 13 | select SUSPEND |
15 | select PM_SLEEP | 14 | select PM_SLEEP |
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c index 04cd12350455..936cff3c96e0 100644 --- a/arch/ia64/xen/xen_pv_ops.c +++ b/arch/ia64/xen/xen_pv_ops.c | |||
@@ -153,7 +153,7 @@ xen_post_smp_prepare_boot_cpu(void) | |||
153 | xen_setup_vcpu_info_placement(); | 153 | xen_setup_vcpu_info_placement(); |
154 | } | 154 | } |
155 | 155 | ||
156 | static const struct pv_init_ops xen_init_ops __initdata = { | 156 | static const struct pv_init_ops xen_init_ops __initconst = { |
157 | .banner = xen_banner, | 157 | .banner = xen_banner, |
158 | 158 | ||
159 | .reserve_memory = xen_reserve_memory, | 159 | .reserve_memory = xen_reserve_memory, |
@@ -337,7 +337,7 @@ xen_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val) | |||
337 | HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); | 337 | HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); |
338 | } | 338 | } |
339 | 339 | ||
340 | static const struct pv_iosapic_ops xen_iosapic_ops __initdata = { | 340 | static const struct pv_iosapic_ops xen_iosapic_ops __initconst = { |
341 | .pcat_compat_init = xen_pcat_compat_init, | 341 | .pcat_compat_init = xen_pcat_compat_init, |
342 | .__get_irq_chip = xen_iosapic_get_irq_chip, | 342 | .__get_irq_chip = xen_iosapic_get_irq_chip, |
343 | 343 | ||
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index dba4afabb444..39478dd08e67 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
@@ -187,8 +187,8 @@ __asm__ (__ALIGN_STR "\n" \ | |||
187 | " jbra ret_from_interrupt\n" \ | 187 | " jbra ret_from_interrupt\n" \ |
188 | : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \ | 188 | : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \ |
189 | "n" (PT_OFF_SR), "n" (n), \ | 189 | "n" (PT_OFF_SR), "n" (n), \ |
190 | "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &mfp.int_mk_a) \ | 190 | "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &st_mfp.int_mk_a) \ |
191 | : (n & 16 ? &tt_mfp.int_mk_b : &mfp.int_mk_b)), \ | 191 | : (n & 16 ? &tt_mfp.int_mk_b : &st_mfp.int_mk_b)), \ |
192 | "m" (preempt_count()), "di" (HARDIRQ_OFFSET) \ | 192 | "m" (preempt_count()), "di" (HARDIRQ_OFFSET) \ |
193 | ); \ | 193 | ); \ |
194 | for (;;); /* fake noreturn */ \ | 194 | for (;;); /* fake noreturn */ \ |
@@ -366,14 +366,14 @@ void __init atari_init_IRQ(void) | |||
366 | /* Initialize the MFP(s) */ | 366 | /* Initialize the MFP(s) */ |
367 | 367 | ||
368 | #ifdef ATARI_USE_SOFTWARE_EOI | 368 | #ifdef ATARI_USE_SOFTWARE_EOI |
369 | mfp.vec_adr = 0x48; /* Software EOI-Mode */ | 369 | st_mfp.vec_adr = 0x48; /* Software EOI-Mode */ |
370 | #else | 370 | #else |
371 | mfp.vec_adr = 0x40; /* Automatic EOI-Mode */ | 371 | st_mfp.vec_adr = 0x40; /* Automatic EOI-Mode */ |
372 | #endif | 372 | #endif |
373 | mfp.int_en_a = 0x00; /* turn off MFP-Ints */ | 373 | st_mfp.int_en_a = 0x00; /* turn off MFP-Ints */ |
374 | mfp.int_en_b = 0x00; | 374 | st_mfp.int_en_b = 0x00; |
375 | mfp.int_mk_a = 0xff; /* no Masking */ | 375 | st_mfp.int_mk_a = 0xff; /* no Masking */ |
376 | mfp.int_mk_b = 0xff; | 376 | st_mfp.int_mk_b = 0xff; |
377 | 377 | ||
378 | if (ATARIHW_PRESENT(TT_MFP)) { | 378 | if (ATARIHW_PRESENT(TT_MFP)) { |
379 | #ifdef ATARI_USE_SOFTWARE_EOI | 379 | #ifdef ATARI_USE_SOFTWARE_EOI |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index a5f33c059979..4add96d13b19 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
@@ -609,10 +609,10 @@ int atari_keyb_init(void) | |||
609 | ACIA_RHTID : 0); | 609 | ACIA_RHTID : 0); |
610 | 610 | ||
611 | /* make sure the interrupt line is up */ | 611 | /* make sure the interrupt line is up */ |
612 | } while ((mfp.par_dt_reg & 0x10) == 0); | 612 | } while ((st_mfp.par_dt_reg & 0x10) == 0); |
613 | 613 | ||
614 | /* enable ACIA Interrupts */ | 614 | /* enable ACIA Interrupts */ |
615 | mfp.active_edge &= ~0x10; | 615 | st_mfp.active_edge &= ~0x10; |
616 | atari_turnon_irq(IRQ_MFP_ACIA); | 616 | atari_turnon_irq(IRQ_MFP_ACIA); |
617 | 617 | ||
618 | ikbd_self_test = 1; | 618 | ikbd_self_test = 1; |
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index 49c28cdbea5c..ae2d96e5d618 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c | |||
@@ -258,7 +258,7 @@ void __init config_atari(void) | |||
258 | printk("STND_SHIFTER "); | 258 | printk("STND_SHIFTER "); |
259 | } | 259 | } |
260 | } | 260 | } |
261 | if (hwreg_present(&mfp.par_dt_reg)) { | 261 | if (hwreg_present(&st_mfp.par_dt_reg)) { |
262 | ATARIHW_SET(ST_MFP); | 262 | ATARIHW_SET(ST_MFP); |
263 | printk("ST_MFP "); | 263 | printk("ST_MFP "); |
264 | } | 264 | } |
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c index 702b15ccfab7..28efdc33c1ae 100644 --- a/arch/m68k/atari/debug.c +++ b/arch/m68k/atari/debug.c | |||
@@ -34,9 +34,9 @@ static struct console atari_console_driver = { | |||
34 | 34 | ||
35 | static inline void ata_mfp_out(char c) | 35 | static inline void ata_mfp_out(char c) |
36 | { | 36 | { |
37 | while (!(mfp.trn_stat & 0x80)) /* wait for tx buf empty */ | 37 | while (!(st_mfp.trn_stat & 0x80)) /* wait for tx buf empty */ |
38 | barrier(); | 38 | barrier(); |
39 | mfp.usart_dta = c; | 39 | st_mfp.usart_dta = c; |
40 | } | 40 | } |
41 | 41 | ||
42 | static void atari_mfp_console_write(struct console *co, const char *str, | 42 | static void atari_mfp_console_write(struct console *co, const char *str, |
@@ -91,7 +91,7 @@ static int ata_par_out(char c) | |||
91 | /* This a some-seconds timeout in case no printer is connected */ | 91 | /* This a some-seconds timeout in case no printer is connected */ |
92 | unsigned long i = loops_per_jiffy > 1 ? loops_per_jiffy : 10000000/HZ; | 92 | unsigned long i = loops_per_jiffy > 1 ? loops_per_jiffy : 10000000/HZ; |
93 | 93 | ||
94 | while ((mfp.par_dt_reg & 1) && --i) /* wait for BUSY == L */ | 94 | while ((st_mfp.par_dt_reg & 1) && --i) /* wait for BUSY == L */ |
95 | ; | 95 | ; |
96 | if (!i) | 96 | if (!i) |
97 | return 0; | 97 | return 0; |
@@ -131,9 +131,9 @@ static void atari_par_console_write(struct console *co, const char *str, | |||
131 | #if 0 | 131 | #if 0 |
132 | int atari_mfp_console_wait_key(struct console *co) | 132 | int atari_mfp_console_wait_key(struct console *co) |
133 | { | 133 | { |
134 | while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */ | 134 | while (!(st_mfp.rcv_stat & 0x80)) /* wait for rx buf filled */ |
135 | barrier(); | 135 | barrier(); |
136 | return mfp.usart_dta; | 136 | return st_mfp.usart_dta; |
137 | } | 137 | } |
138 | 138 | ||
139 | int atari_scc_console_wait_key(struct console *co) | 139 | int atari_scc_console_wait_key(struct console *co) |
@@ -175,12 +175,12 @@ static void __init atari_init_mfp_port(int cflag) | |||
175 | baud = B9600; /* use default 9600bps for non-implemented rates */ | 175 | baud = B9600; /* use default 9600bps for non-implemented rates */ |
176 | baud -= B1200; /* baud_table[] starts at 1200bps */ | 176 | baud -= B1200; /* baud_table[] starts at 1200bps */ |
177 | 177 | ||
178 | mfp.trn_stat &= ~0x01; /* disable TX */ | 178 | st_mfp.trn_stat &= ~0x01; /* disable TX */ |
179 | mfp.usart_ctr = parity | csize | 0x88; /* 1:16 clk mode, 1 stop bit */ | 179 | st_mfp.usart_ctr = parity | csize | 0x88; /* 1:16 clk mode, 1 stop bit */ |
180 | mfp.tim_ct_cd &= 0x70; /* stop timer D */ | 180 | st_mfp.tim_ct_cd &= 0x70; /* stop timer D */ |
181 | mfp.tim_dt_d = baud_table[baud]; | 181 | st_mfp.tim_dt_d = baud_table[baud]; |
182 | mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */ | 182 | st_mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */ |
183 | mfp.trn_stat |= 0x01; /* enable TX */ | 183 | st_mfp.trn_stat |= 0x01; /* enable TX */ |
184 | } | 184 | } |
185 | 185 | ||
186 | #define SCC_WRITE(reg, val) \ | 186 | #define SCC_WRITE(reg, val) \ |
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index d076ff8d1b39..a0531f34c617 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c | |||
@@ -27,9 +27,9 @@ void __init | |||
27 | atari_sched_init(irq_handler_t timer_routine) | 27 | atari_sched_init(irq_handler_t timer_routine) |
28 | { | 28 | { |
29 | /* set Timer C data Register */ | 29 | /* set Timer C data Register */ |
30 | mfp.tim_dt_c = INT_TICKS; | 30 | st_mfp.tim_dt_c = INT_TICKS; |
31 | /* start timer C, div = 1:100 */ | 31 | /* start timer C, div = 1:100 */ |
32 | mfp.tim_ct_cd = (mfp.tim_ct_cd & 15) | 0x60; | 32 | st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60; |
33 | /* install interrupt service routine for MFP Timer C */ | 33 | /* install interrupt service routine for MFP Timer C */ |
34 | if (request_irq(IRQ_MFP_TIMC, timer_routine, IRQ_TYPE_SLOW, | 34 | if (request_irq(IRQ_MFP_TIMC, timer_routine, IRQ_TYPE_SLOW, |
35 | "timer", timer_routine)) | 35 | "timer", timer_routine)) |
@@ -46,11 +46,11 @@ unsigned long atari_gettimeoffset (void) | |||
46 | unsigned long ticks, offset = 0; | 46 | unsigned long ticks, offset = 0; |
47 | 47 | ||
48 | /* read MFP timer C current value */ | 48 | /* read MFP timer C current value */ |
49 | ticks = mfp.tim_dt_c; | 49 | ticks = st_mfp.tim_dt_c; |
50 | /* The probability of underflow is less than 2% */ | 50 | /* The probability of underflow is less than 2% */ |
51 | if (ticks > INT_TICKS - INT_TICKS / 50) | 51 | if (ticks > INT_TICKS - INT_TICKS / 50) |
52 | /* Check for pending timer interrupt */ | 52 | /* Check for pending timer interrupt */ |
53 | if (mfp.int_pn_b & (1 << 5)) | 53 | if (st_mfp.int_pn_b & (1 << 5)) |
54 | offset = TICK_SIZE; | 54 | offset = TICK_SIZE; |
55 | 55 | ||
56 | ticks = INT_TICKS - ticks; | 56 | ticks = INT_TICKS - ticks; |
diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index 1412b4ab202f..a714e1aa072a 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h | |||
@@ -113,7 +113,7 @@ extern struct atari_hw_present atari_hw_present; | |||
113 | * of nops on various machines. Somebody claimed that the tstb takes 600 ns. | 113 | * of nops on various machines. Somebody claimed that the tstb takes 600 ns. |
114 | */ | 114 | */ |
115 | #define MFPDELAY() \ | 115 | #define MFPDELAY() \ |
116 | __asm__ __volatile__ ( "tstb %0" : : "m" (mfp.par_dt_reg) : "cc" ); | 116 | __asm__ __volatile__ ( "tstb %0" : : "m" (st_mfp.par_dt_reg) : "cc" ); |
117 | 117 | ||
118 | /* Do cache push/invalidate for DMA read/write. This function obeys the | 118 | /* Do cache push/invalidate for DMA read/write. This function obeys the |
119 | * snooping on some machines (Medusa) and processors: The Medusa itself can | 119 | * snooping on some machines (Medusa) and processors: The Medusa itself can |
@@ -565,7 +565,7 @@ struct MFP | |||
565 | u_char char_dummy23; | 565 | u_char char_dummy23; |
566 | u_char usart_dta; | 566 | u_char usart_dta; |
567 | }; | 567 | }; |
568 | # define mfp ((*(volatile struct MFP*)MFP_BAS)) | 568 | # define st_mfp ((*(volatile struct MFP*)MFP_BAS)) |
569 | 569 | ||
570 | /* TT's second MFP */ | 570 | /* TT's second MFP */ |
571 | 571 | ||
diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h index 5748e99f4e26..f597892e43a0 100644 --- a/arch/m68k/include/asm/atariints.h +++ b/arch/m68k/include/asm/atariints.h | |||
@@ -113,7 +113,7 @@ static inline int get_mfp_bit( unsigned irq, int type ) | |||
113 | { unsigned char mask, *reg; | 113 | { unsigned char mask, *reg; |
114 | 114 | ||
115 | mask = 1 << (irq & 7); | 115 | mask = 1 << (irq & 7); |
116 | reg = (unsigned char *)&mfp.int_en_a + type*4 + | 116 | reg = (unsigned char *)&st_mfp.int_en_a + type*4 + |
117 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); | 117 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); |
118 | return( *reg & mask ); | 118 | return( *reg & mask ); |
119 | } | 119 | } |
@@ -123,7 +123,7 @@ static inline void set_mfp_bit( unsigned irq, int type ) | |||
123 | { unsigned char mask, *reg; | 123 | { unsigned char mask, *reg; |
124 | 124 | ||
125 | mask = 1 << (irq & 7); | 125 | mask = 1 << (irq & 7); |
126 | reg = (unsigned char *)&mfp.int_en_a + type*4 + | 126 | reg = (unsigned char *)&st_mfp.int_en_a + type*4 + |
127 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); | 127 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); |
128 | __asm__ __volatile__ ( "orb %0,%1" | 128 | __asm__ __volatile__ ( "orb %0,%1" |
129 | : : "di" (mask), "m" (*reg) : "memory" ); | 129 | : : "di" (mask), "m" (*reg) : "memory" ); |
@@ -134,7 +134,7 @@ static inline void clear_mfp_bit( unsigned irq, int type ) | |||
134 | { unsigned char mask, *reg; | 134 | { unsigned char mask, *reg; |
135 | 135 | ||
136 | mask = ~(1 << (irq & 7)); | 136 | mask = ~(1 << (irq & 7)); |
137 | reg = (unsigned char *)&mfp.int_en_a + type*4 + | 137 | reg = (unsigned char *)&st_mfp.int_en_a + type*4 + |
138 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); | 138 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); |
139 | if (type == MFP_PENDING || type == MFP_SERVICE) | 139 | if (type == MFP_PENDING || type == MFP_SERVICE) |
140 | __asm__ __volatile__ ( "moveb %0,%1" | 140 | __asm__ __volatile__ ( "moveb %0,%1" |
diff --git a/arch/mips/include/asm/sigcontext.h b/arch/mips/include/asm/sigcontext.h index 9ce0607d7a4e..9e89cf99d4e4 100644 --- a/arch/mips/include/asm/sigcontext.h +++ b/arch/mips/include/asm/sigcontext.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef _ASM_SIGCONTEXT_H | 9 | #ifndef _ASM_SIGCONTEXT_H |
10 | #define _ASM_SIGCONTEXT_H | 10 | #define _ASM_SIGCONTEXT_H |
11 | 11 | ||
12 | #include <linux/types.h> | ||
12 | #include <asm/sgidefs.h> | 13 | #include <asm/sgidefs.h> |
13 | 14 | ||
14 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | 15 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
diff --git a/arch/mips/include/asm/spinlock.h b/arch/mips/include/asm/spinlock.h index 1a1f320c30d8..0884947ebe27 100644 --- a/arch/mips/include/asm/spinlock.h +++ b/arch/mips/include/asm/spinlock.h | |||
@@ -51,6 +51,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) | |||
51 | 51 | ||
52 | return (((counters >> 14) - counters) & 0x1fff) > 1; | 52 | return (((counters >> 14) - counters) & 0x1fff) > 1; |
53 | } | 53 | } |
54 | #define __raw_spin_is_contended __raw_spin_is_contended | ||
54 | 55 | ||
55 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 56 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
56 | { | 57 | { |
diff --git a/arch/mips/include/asm/swab.h b/arch/mips/include/asm/swab.h index 88f1f7d555cb..99993c0d6c12 100644 --- a/arch/mips/include/asm/swab.h +++ b/arch/mips/include/asm/swab.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #define _ASM_SWAB_H | 9 | #define _ASM_SWAB_H |
10 | 10 | ||
11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
12 | #include <asm/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | #define __SWAB_64_THRU_32__ | 14 | #define __SWAB_64_THRU_32__ |
15 | 15 | ||
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 9a9f43358879..41d16822e616 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
@@ -7,6 +7,7 @@ mainmenu "Linux Kernel Configuration" | |||
7 | 7 | ||
8 | config MN10300 | 8 | config MN10300 |
9 | def_bool y | 9 | def_bool y |
10 | select HAVE_OPROFILE | ||
10 | 11 | ||
11 | config AM33 | 12 | config AM33 |
12 | def_bool y | 13 | def_bool y |
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index 1a86425fec42..07dbbcda3b2e 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c | |||
@@ -173,7 +173,7 @@ static int pci_ampci_write_config_byte(struct pci_bus *bus, unsigned int devfn, | |||
173 | BRIDGEREGB(where) = value; | 173 | BRIDGEREGB(where) = value; |
174 | } else { | 174 | } else { |
175 | if (bus->number == 0 && | 175 | if (bus->number == 0 && |
176 | (devfn == PCI_DEVFN(2, 0) && devfn == PCI_DEVFN(3, 0)) | 176 | (devfn == PCI_DEVFN(2, 0) || devfn == PCI_DEVFN(3, 0)) |
177 | ) | 177 | ) |
178 | __pcidebug("<= %02x", bus, devfn, where, value); | 178 | __pcidebug("<= %02x", bus, devfn, where, value); |
179 | CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); | 179 | CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); |
diff --git a/arch/parisc/include/asm/pdc.h b/arch/parisc/include/asm/pdc.h index c584b00c6074..430f1aeea0b8 100644 --- a/arch/parisc/include/asm/pdc.h +++ b/arch/parisc/include/asm/pdc.h | |||
@@ -336,10 +336,11 @@ | |||
336 | #define NUM_PDC_RESULT 32 | 336 | #define NUM_PDC_RESULT 32 |
337 | 337 | ||
338 | #if !defined(__ASSEMBLY__) | 338 | #if !defined(__ASSEMBLY__) |
339 | #ifdef __KERNEL__ | ||
340 | 339 | ||
341 | #include <linux/types.h> | 340 | #include <linux/types.h> |
342 | 341 | ||
342 | #ifdef __KERNEL__ | ||
343 | |||
343 | extern int pdc_type; | 344 | extern int pdc_type; |
344 | 345 | ||
345 | /* Values for pdc_type */ | 346 | /* Values for pdc_type */ |
diff --git a/arch/parisc/include/asm/swab.h b/arch/parisc/include/asm/swab.h index 3ff16c5a3358..e78403b129ef 100644 --- a/arch/parisc/include/asm/swab.h +++ b/arch/parisc/include/asm/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _PARISC_SWAB_H | 1 | #ifndef _PARISC_SWAB_H |
2 | #define _PARISC_SWAB_H | 2 | #define _PARISC_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | 6 | ||
7 | #define __SWAB_64_THRU_32__ | 7 | #define __SWAB_64_THRU_32__ |
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 909a89cab9ac..3ebf7ec0484c 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts | |||
@@ -191,7 +191,8 @@ | |||
191 | interrupts = <37 0x8 36 0x8 35 0x8>; | 191 | interrupts = <37 0x8 36 0x8 35 0x8>; |
192 | interrupt-parent = <&ipic>; | 192 | interrupt-parent = <&ipic>; |
193 | tbi-handle = < &tbi0 >; | 193 | tbi-handle = < &tbi0 >; |
194 | phy-handle = < &phy1 >; | 194 | /* Vitesse 7385 isn't on the MDIO bus */ |
195 | fixed-link = <1 1 1000 0 0>; | ||
195 | fsl,magic-packet; | 196 | fsl,magic-packet; |
196 | 197 | ||
197 | mdio@24520 { | 198 | mdio@24520 { |
@@ -199,12 +200,6 @@ | |||
199 | #size-cells = <0>; | 200 | #size-cells = <0>; |
200 | compatible = "fsl,gianfar-mdio"; | 201 | compatible = "fsl,gianfar-mdio"; |
201 | reg = <0x24520 0x20>; | 202 | reg = <0x24520 0x20>; |
202 | phy1: ethernet-phy@1 { | ||
203 | interrupt-parent = <&ipic>; | ||
204 | interrupts = <19 0x8>; | ||
205 | reg = <0x1>; | ||
206 | device_type = "ethernet-phy"; | ||
207 | }; | ||
208 | phy4: ethernet-phy@4 { | 203 | phy4: ethernet-phy@4 { |
209 | interrupt-parent = <&ipic>; | 204 | interrupt-parent = <&ipic>; |
210 | interrupts = <20 0x8>; | 205 | interrupts = <20 0x8>; |
@@ -219,6 +214,8 @@ | |||
219 | }; | 214 | }; |
220 | 215 | ||
221 | enet1: ethernet@25000 { | 216 | enet1: ethernet@25000 { |
217 | #address-cells = <1>; | ||
218 | #size-cells = <1>; | ||
222 | cell-index = <1>; | 219 | cell-index = <1>; |
223 | device_type = "network"; | 220 | device_type = "network"; |
224 | model = "eTSEC"; | 221 | model = "eTSEC"; |
diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig index 9e47ae957e2e..409d017621a8 100644 --- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | |||
@@ -651,7 +651,7 @@ CONFIG_CICADA_PHY=y | |||
651 | # CONFIG_NATIONAL_PHY is not set | 651 | # CONFIG_NATIONAL_PHY is not set |
652 | # CONFIG_STE10XP is not set | 652 | # CONFIG_STE10XP is not set |
653 | # CONFIG_LSI_ET1011C_PHY is not set | 653 | # CONFIG_LSI_ET1011C_PHY is not set |
654 | # CONFIG_FIXED_PHY is not set | 654 | CONFIG_FIXED_PHY=y |
655 | # CONFIG_MDIO_BITBANG is not set | 655 | # CONFIG_MDIO_BITBANG is not set |
656 | CONFIG_NET_ETHERNET=y | 656 | CONFIG_NET_ETHERNET=y |
657 | CONFIG_MII=y | 657 | CONFIG_MII=y |
diff --git a/arch/powerpc/include/asm/bootx.h b/arch/powerpc/include/asm/bootx.h index 57b82e3f89ce..60a3c9ef3017 100644 --- a/arch/powerpc/include/asm/bootx.h +++ b/arch/powerpc/include/asm/bootx.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #ifndef __ASM_BOOTX_H__ | 9 | #ifndef __ASM_BOOTX_H__ |
10 | #define __ASM_BOOTX_H__ | 10 | #define __ASM_BOOTX_H__ |
11 | 11 | ||
12 | #include <asm/types.h> | 12 | #include <linux/types.h> |
13 | 13 | ||
14 | #ifdef macintosh | 14 | #ifdef macintosh |
15 | #include <Types.h> | 15 | #include <Types.h> |
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index cd46f023ec6d..b5600ce6055e 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <asm/string.h> | 7 | #include <asm/string.h> |
8 | #endif | 8 | #endif |
9 | 9 | ||
10 | #include <asm/types.h> | 10 | #include <linux/types.h> |
11 | #include <asm/ptrace.h> | 11 | #include <asm/ptrace.h> |
12 | #include <asm/cputable.h> | 12 | #include <asm/cputable.h> |
13 | #include <asm/auxvec.h> | 13 | #include <asm/auxvec.h> |
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index f993e4198d5c..4e0cf65f7f5a 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h | |||
@@ -20,7 +20,7 @@ | |||
20 | #ifndef __LINUX_KVM_POWERPC_H | 20 | #ifndef __LINUX_KVM_POWERPC_H |
21 | #define __LINUX_KVM_POWERPC_H | 21 | #define __LINUX_KVM_POWERPC_H |
22 | 22 | ||
23 | #include <asm/types.h> | 23 | #include <linux/types.h> |
24 | 24 | ||
25 | struct kvm_regs { | 25 | struct kvm_regs { |
26 | __u64 pc; | 26 | __u64 pc; |
diff --git a/arch/powerpc/include/asm/pgtable-4k.h b/arch/powerpc/include/asm/pgtable-4k.h index 6b18ba9d2d85..1dbca4e7de67 100644 --- a/arch/powerpc/include/asm/pgtable-4k.h +++ b/arch/powerpc/include/asm/pgtable-4k.h | |||
@@ -60,7 +60,7 @@ | |||
60 | /* It should be preserving the high 48 bits and then specifically */ | 60 | /* It should be preserving the high 48 bits and then specifically */ |
61 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ | 61 | /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */ |
62 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \ | 62 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \ |
63 | _PAGE_HPTEFLAGS) | 63 | _PAGE_HPTEFLAGS | _PAGE_SPECIAL) |
64 | 64 | ||
65 | /* Bits to mask out from a PMD to get to the PTE page */ | 65 | /* Bits to mask out from a PMD to get to the PTE page */ |
66 | #define PMD_MASKED_BITS 0 | 66 | #define PMD_MASKED_BITS 0 |
diff --git a/arch/powerpc/include/asm/pgtable-64k.h b/arch/powerpc/include/asm/pgtable-64k.h index 07b0d8f09cb6..7389003349a6 100644 --- a/arch/powerpc/include/asm/pgtable-64k.h +++ b/arch/powerpc/include/asm/pgtable-64k.h | |||
@@ -114,7 +114,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd) | |||
114 | * pgprot changes | 114 | * pgprot changes |
115 | */ | 115 | */ |
116 | #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ | 116 | #define _PAGE_CHG_MASK (PTE_RPN_MASK | _PAGE_HPTEFLAGS | _PAGE_DIRTY | \ |
117 | _PAGE_ACCESSED) | 117 | _PAGE_ACCESSED | _PAGE_SPECIAL) |
118 | 118 | ||
119 | /* Bits to mask out from a PMD to get to the PTE page */ | 119 | /* Bits to mask out from a PMD to get to the PTE page */ |
120 | #define PMD_MASKED_BITS 0x1ff | 120 | #define PMD_MASKED_BITS 0x1ff |
diff --git a/arch/powerpc/include/asm/pgtable-ppc32.h b/arch/powerpc/include/asm/pgtable-ppc32.h index f69a4d977729..820b5f0a35ce 100644 --- a/arch/powerpc/include/asm/pgtable-ppc32.h +++ b/arch/powerpc/include/asm/pgtable-ppc32.h | |||
@@ -429,7 +429,8 @@ extern int icache_44x_need_flush; | |||
429 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() | 429 | #define PMD_PAGE_SIZE(pmd) bad_call_to_PMD_PAGE_SIZE() |
430 | #endif | 430 | #endif |
431 | 431 | ||
432 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY) | 432 | #define _PAGE_CHG_MASK (PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | \ |
433 | _PAGE_SPECIAL) | ||
433 | 434 | ||
434 | 435 | ||
435 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ | 436 | #define PAGE_PROT_BITS (_PAGE_GUARDED | _PAGE_COHERENT | _PAGE_NO_CACHE | \ |
diff --git a/arch/powerpc/include/asm/ps3fb.h b/arch/powerpc/include/asm/ps3fb.h index 3f121fe4010d..e7233a849680 100644 --- a/arch/powerpc/include/asm/ps3fb.h +++ b/arch/powerpc/include/asm/ps3fb.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef _ASM_POWERPC_PS3FB_H_ | 19 | #ifndef _ASM_POWERPC_PS3FB_H_ |
20 | #define _ASM_POWERPC_PS3FB_H_ | 20 | #define _ASM_POWERPC_PS3FB_H_ |
21 | 21 | ||
22 | #include <linux/types.h> | ||
22 | #include <linux/ioctl.h> | 23 | #include <linux/ioctl.h> |
23 | 24 | ||
24 | /* ioctl */ | 25 | /* ioctl */ |
diff --git a/arch/powerpc/include/asm/spu_info.h b/arch/powerpc/include/asm/spu_info.h index 3545efbf9891..1286c823f0d8 100644 --- a/arch/powerpc/include/asm/spu_info.h +++ b/arch/powerpc/include/asm/spu_info.h | |||
@@ -23,9 +23,10 @@ | |||
23 | #ifndef _SPU_INFO_H | 23 | #ifndef _SPU_INFO_H |
24 | #define _SPU_INFO_H | 24 | #define _SPU_INFO_H |
25 | 25 | ||
26 | #include <linux/types.h> | ||
27 | |||
26 | #ifdef __KERNEL__ | 28 | #ifdef __KERNEL__ |
27 | #include <asm/spu.h> | 29 | #include <asm/spu.h> |
28 | #include <linux/types.h> | ||
29 | #else | 30 | #else |
30 | struct mfc_cq_sr { | 31 | struct mfc_cq_sr { |
31 | __u64 mfc_cq_data0_RW; | 32 | __u64 mfc_cq_data0_RW; |
diff --git a/arch/powerpc/include/asm/swab.h b/arch/powerpc/include/asm/swab.h index ef824ae4b79c..c581e3ef73ed 100644 --- a/arch/powerpc/include/asm/swab.h +++ b/arch/powerpc/include/asm/swab.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * 2 of the License, or (at your option) any later version. | 8 | * 2 of the License, or (at your option) any later version. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/types.h> | 11 | #include <linux/types.h> |
12 | #include <linux/compiler.h> | 12 | #include <linux/compiler.h> |
13 | 13 | ||
14 | #ifdef __GNUC__ | 14 | #ifdef __GNUC__ |
diff --git a/arch/powerpc/kernel/align.c b/arch/powerpc/kernel/align.c index 5af4e9b2dbe2..ada06924a423 100644 --- a/arch/powerpc/kernel/align.c +++ b/arch/powerpc/kernel/align.c | |||
@@ -646,11 +646,16 @@ static int emulate_vsx(unsigned char __user *addr, unsigned int reg, | |||
646 | unsigned int areg, struct pt_regs *regs, | 646 | unsigned int areg, struct pt_regs *regs, |
647 | unsigned int flags, unsigned int length) | 647 | unsigned int flags, unsigned int length) |
648 | { | 648 | { |
649 | char *ptr = (char *) ¤t->thread.TS_FPR(reg); | 649 | char *ptr; |
650 | int ret = 0; | 650 | int ret = 0; |
651 | 651 | ||
652 | flush_vsx_to_thread(current); | 652 | flush_vsx_to_thread(current); |
653 | 653 | ||
654 | if (reg < 32) | ||
655 | ptr = (char *) ¤t->thread.TS_FPR(reg); | ||
656 | else | ||
657 | ptr = (char *) ¤t->thread.vr[reg - 32]; | ||
658 | |||
654 | if (flags & ST) | 659 | if (flags & ST) |
655 | ret = __copy_to_user(addr, ptr, length); | 660 | ret = __copy_to_user(addr, ptr, length); |
656 | else { | 661 | else { |
diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c index 5355244c99ff..60c60ccf5e3c 100644 --- a/arch/powerpc/kernel/ftrace.c +++ b/arch/powerpc/kernel/ftrace.c | |||
@@ -195,8 +195,9 @@ __ftrace_make_nop(struct module *mod, | |||
195 | return -EINVAL; | 195 | return -EINVAL; |
196 | } | 196 | } |
197 | 197 | ||
198 | offset = (unsigned)((unsigned short)jmp[0]) << 16 | | 198 | /* The bottom half is signed extended */ |
199 | (unsigned)((unsigned short)jmp[1]); | 199 | offset = ((unsigned)((unsigned short)jmp[0]) << 16) + |
200 | (int)((short)jmp[1]); | ||
200 | 201 | ||
201 | DEBUGP(" %x ", offset); | 202 | DEBUGP(" %x ", offset); |
202 | 203 | ||
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 19b12d2cbb4b..0f4181272311 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -561,8 +561,21 @@ int pci_mmap_legacy_page_range(struct pci_bus *bus, | |||
561 | (unsigned long long)(offset + size - 1)); | 561 | (unsigned long long)(offset + size - 1)); |
562 | 562 | ||
563 | if (mmap_state == pci_mmap_mem) { | 563 | if (mmap_state == pci_mmap_mem) { |
564 | if ((offset + size) > hose->isa_mem_size) | 564 | /* Hack alert ! |
565 | return -ENXIO; | 565 | * |
566 | * Because X is lame and can fail starting if it gets an error trying | ||
567 | * to mmap legacy_mem (instead of just moving on without legacy memory | ||
568 | * access) we fake it here by giving it anonymous memory, effectively | ||
569 | * behaving just like /dev/zero | ||
570 | */ | ||
571 | if ((offset + size) > hose->isa_mem_size) { | ||
572 | printk(KERN_DEBUG | ||
573 | "Process %s (pid:%d) mapped non-existing PCI legacy memory for 0%04x:%02x\n", | ||
574 | current->comm, current->pid, pci_domain_nr(bus), bus->number); | ||
575 | if (vma->vm_flags & VM_SHARED) | ||
576 | return shmem_zero_setup(vma); | ||
577 | return 0; | ||
578 | } | ||
566 | offset += hose->isa_mem_phys; | 579 | offset += hose->isa_mem_phys; |
567 | } else { | 580 | } else { |
568 | unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE; | 581 | unsigned long io_offset = (unsigned long)hose->io_base_virt - _IO_BASE; |
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 2822c8ccfaaf..5f81256287f5 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -125,6 +125,10 @@ static void kvmppc_free_vcpus(struct kvm *kvm) | |||
125 | } | 125 | } |
126 | } | 126 | } |
127 | 127 | ||
128 | void kvm_arch_sync_events(struct kvm *kvm) | ||
129 | { | ||
130 | } | ||
131 | |||
128 | void kvm_arch_destroy_vm(struct kvm *kvm) | 132 | void kvm_arch_destroy_vm(struct kvm *kvm) |
129 | { | 133 | { |
130 | kvmppc_free_vcpus(kvm); | 134 | kvmppc_free_vcpus(kvm); |
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c index 4aae0c387645..13b7d54f185b 100644 --- a/arch/powerpc/lib/sstep.c +++ b/arch/powerpc/lib/sstep.c | |||
@@ -172,6 +172,8 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr) | |||
172 | } | 172 | } |
173 | break; | 173 | break; |
174 | case 0x378: /* orx */ | 174 | case 0x378: /* orx */ |
175 | if (instr & 1) | ||
176 | break; | ||
175 | rs = (instr >> 21) & 0x1f; | 177 | rs = (instr >> 21) & 0x1f; |
176 | rb = (instr >> 11) & 0x1f; | 178 | rb = (instr >> 11) & 0x1f; |
177 | if (rs == rb) { /* mr */ | 179 | if (rs == rb) { /* mr */ |
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index 1971e4ee3d6e..ea6e41e39d9f 100644 --- a/arch/powerpc/mm/fsl_booke_mmu.c +++ b/arch/powerpc/mm/fsl_booke_mmu.c | |||
@@ -73,7 +73,7 @@ extern unsigned int tlbcam_index; | |||
73 | /* | 73 | /* |
74 | * Return PA for this VA if it is mapped by a CAM, or 0 | 74 | * Return PA for this VA if it is mapped by a CAM, or 0 |
75 | */ | 75 | */ |
76 | unsigned long v_mapped_by_tlbcam(unsigned long va) | 76 | phys_addr_t v_mapped_by_tlbcam(unsigned long va) |
77 | { | 77 | { |
78 | int b; | 78 | int b; |
79 | for (b = 0; b < tlbcam_index; ++b) | 79 | for (b = 0; b < tlbcam_index; ++b) |
@@ -85,7 +85,7 @@ unsigned long v_mapped_by_tlbcam(unsigned long va) | |||
85 | /* | 85 | /* |
86 | * Return VA for a given PA or 0 if not mapped | 86 | * Return VA for a given PA or 0 if not mapped |
87 | */ | 87 | */ |
88 | unsigned long p_mapped_by_tlbcam(unsigned long pa) | 88 | unsigned long p_mapped_by_tlbcam(phys_addr_t pa) |
89 | { | 89 | { |
90 | int b; | 90 | int b; |
91 | for (b = 0; b < tlbcam_index; ++b) | 91 | for (b = 0; b < tlbcam_index; ++b) |
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S index 67850ec9feb3..14af8cedab70 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/arch/powerpc/mm/hash_low_32.S | |||
@@ -320,7 +320,7 @@ _GLOBAL(create_hpte) | |||
320 | and r8,r8,r0 /* writable if _RW & _DIRTY */ | 320 | and r8,r8,r0 /* writable if _RW & _DIRTY */ |
321 | rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ | 321 | rlwimi r5,r5,32-1,30,30 /* _PAGE_USER -> PP msb */ |
322 | rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ | 322 | rlwimi r5,r5,32-2,31,31 /* _PAGE_USER -> PP lsb */ |
323 | ori r8,r8,0xe14 /* clear out reserved bits and M */ | 323 | ori r8,r8,0xe04 /* clear out reserved bits */ |
324 | andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ | 324 | andc r8,r5,r8 /* PP = user? (rw&dirty? 2: 3): 0 */ |
325 | BEGIN_FTR_SECTION | 325 | BEGIN_FTR_SECTION |
326 | rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ | 326 | rlwinm r8,r8,0,~_PAGE_COHERENT /* clear M (coherence not required) */ |
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 7393bd76d698..5ac08b8ab654 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/notifier.h> | 19 | #include <linux/notifier.h> |
20 | #include <linux/lmb.h> | 20 | #include <linux/lmb.h> |
21 | #include <linux/of.h> | 21 | #include <linux/of.h> |
22 | #include <linux/pfn.h> | ||
22 | #include <asm/sparsemem.h> | 23 | #include <asm/sparsemem.h> |
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
@@ -882,7 +883,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
882 | unsigned long physbase = lmb.reserved.region[i].base; | 883 | unsigned long physbase = lmb.reserved.region[i].base; |
883 | unsigned long size = lmb.reserved.region[i].size; | 884 | unsigned long size = lmb.reserved.region[i].size; |
884 | unsigned long start_pfn = physbase >> PAGE_SHIFT; | 885 | unsigned long start_pfn = physbase >> PAGE_SHIFT; |
885 | unsigned long end_pfn = ((physbase + size) >> PAGE_SHIFT); | 886 | unsigned long end_pfn = PFN_UP(physbase + size); |
886 | struct node_active_region node_ar; | 887 | struct node_active_region node_ar; |
887 | unsigned long node_end_pfn = node->node_start_pfn + | 888 | unsigned long node_end_pfn = node->node_start_pfn + |
888 | node->node_spanned_pages; | 889 | node->node_spanned_pages; |
@@ -908,7 +909,7 @@ static void mark_reserved_regions_for_nid(int nid) | |||
908 | */ | 909 | */ |
909 | if (end_pfn > node_ar.end_pfn) | 910 | if (end_pfn > node_ar.end_pfn) |
910 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) | 911 | reserve_size = (node_ar.end_pfn << PAGE_SHIFT) |
911 | - (start_pfn << PAGE_SHIFT); | 912 | - physbase; |
912 | /* | 913 | /* |
913 | * Only worry about *this* node, others may not | 914 | * Only worry about *this* node, others may not |
914 | * yet have valid NODE_DATA(). | 915 | * yet have valid NODE_DATA(). |
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 22972cd83cc9..58bcaeba728d 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -61,8 +61,8 @@ void setbat(int index, unsigned long virt, phys_addr_t phys, | |||
61 | 61 | ||
62 | #ifdef HAVE_TLBCAM | 62 | #ifdef HAVE_TLBCAM |
63 | extern unsigned int tlbcam_index; | 63 | extern unsigned int tlbcam_index; |
64 | extern unsigned long v_mapped_by_tlbcam(unsigned long va); | 64 | extern phys_addr_t v_mapped_by_tlbcam(unsigned long va); |
65 | extern unsigned long p_mapped_by_tlbcam(unsigned long pa); | 65 | extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa); |
66 | #else /* !HAVE_TLBCAM */ | 66 | #else /* !HAVE_TLBCAM */ |
67 | #define v_mapped_by_tlbcam(x) (0UL) | 67 | #define v_mapped_by_tlbcam(x) (0UL) |
68 | #define p_mapped_by_tlbcam(x) (0UL) | 68 | #define p_mapped_by_tlbcam(x) (0UL) |
diff --git a/arch/powerpc/oprofile/cell/spu_profiler.c b/arch/powerpc/oprofile/cell/spu_profiler.c index 9305ddaac512..b129d007e7fe 100644 --- a/arch/powerpc/oprofile/cell/spu_profiler.c +++ b/arch/powerpc/oprofile/cell/spu_profiler.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/smp.h> | 16 | #include <linux/smp.h> |
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <asm/cell-pmu.h> | 18 | #include <asm/cell-pmu.h> |
19 | #include <asm/time.h> | ||
19 | #include "pr_util.h" | 20 | #include "pr_util.h" |
20 | 21 | ||
21 | #define SCALE_SHIFT 14 | 22 | #define SCALE_SHIFT 14 |
diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c index 9876d7e072f4..ddf0bdc0fc8b 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | |||
@@ -186,7 +186,7 @@ out_unmap_regs: | |||
186 | iounmap(priv->regs); | 186 | iounmap(priv->regs); |
187 | out_free_bootmem: | 187 | out_free_bootmem: |
188 | free_bootmem((unsigned long)priv, | 188 | free_bootmem((unsigned long)priv, |
189 | sizeof(sizeof(struct pq2ads_pci_pic))); | 189 | sizeof(struct pq2ads_pci_pic)); |
190 | of_node_put(np); | 190 | of_node_put(np); |
191 | out_unmap_irq: | 191 | out_unmap_irq: |
192 | irq_dispose_mapping(irq); | 192 | irq_dispose_mapping(irq); |
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 67de6bf3db3d..d281cc0bca71 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -328,7 +328,7 @@ static int __init ps3_mm_add_memory(void) | |||
328 | return result; | 328 | return result; |
329 | } | 329 | } |
330 | 330 | ||
331 | core_initcall(ps3_mm_add_memory); | 331 | device_initcall(ps3_mm_add_memory); |
332 | 332 | ||
333 | /*============================================================================*/ | 333 | /*============================================================================*/ |
334 | /* dma routines */ | 334 | /* dma routines */ |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index a623ad256e9e..9b21ee68ea50 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/firmware.h> | 14 | #include <asm/firmware.h> |
15 | #include <asm/machdep.h> | 15 | #include <asm/machdep.h> |
16 | #include <asm/pSeries_reconfig.h> | 16 | #include <asm/pSeries_reconfig.h> |
17 | #include <asm/sparsemem.h> | ||
17 | 18 | ||
18 | static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) | 19 | static int pseries_remove_lmb(unsigned long base, unsigned int lmb_size) |
19 | { | 20 | { |
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c index b16ca3ed65d2..78f1f7cca0a0 100644 --- a/arch/powerpc/sysdev/cpm2_pic.c +++ b/arch/powerpc/sysdev/cpm2_pic.c | |||
@@ -165,7 +165,7 @@ static int cpm2_set_irq_type(unsigned int virq, unsigned int flow_type) | |||
165 | edibit = (14 - (src - CPM2_IRQ_EXT1)); | 165 | edibit = (14 - (src - CPM2_IRQ_EXT1)); |
166 | else | 166 | else |
167 | if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0) | 167 | if (src >= CPM2_IRQ_PORTC15 && src <= CPM2_IRQ_PORTC0) |
168 | edibit = (31 - (src - CPM2_IRQ_PORTC15)); | 168 | edibit = (31 - (CPM2_IRQ_PORTC0 - src)); |
169 | else | 169 | else |
170 | return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL; | 170 | return (flow_type & IRQ_TYPE_LEVEL_LOW) ? 0 : -EINVAL; |
171 | 171 | ||
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index 88a983ece5c9..9a89cd3e80a2 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -890,7 +890,7 @@ unsigned int ipic_get_irq(void) | |||
890 | return irq_linear_revmap(primary_ipic->irqhost, irq); | 890 | return irq_linear_revmap(primary_ipic->irqhost, irq); |
891 | } | 891 | } |
892 | 892 | ||
893 | #ifdef CONFIG_PM | 893 | #ifdef CONFIG_SUSPEND |
894 | static struct { | 894 | static struct { |
895 | u32 sicfr; | 895 | u32 sicfr; |
896 | u32 siprr[2]; | 896 | u32 siprr[2]; |
diff --git a/arch/s390/defconfig b/arch/s390/defconfig index a0e748da9909..31e809c77790 100644 --- a/arch/s390/defconfig +++ b/arch/s390/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.28-rc6 | 3 | # Linux kernel version: 2.6.29-rc4 |
4 | # Thu Nov 27 11:00:49 2008 | 4 | # Wed Feb 11 10:07:16 2009 |
5 | # | 5 | # |
6 | CONFIG_SCHED_MC=y | 6 | CONFIG_SCHED_MC=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -14,12 +14,14 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y | |||
14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 14 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
15 | CONFIG_GENERIC_HWEIGHT=y | 15 | CONFIG_GENERIC_HWEIGHT=y |
16 | CONFIG_GENERIC_TIME=y | 16 | CONFIG_GENERIC_TIME=y |
17 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
17 | CONFIG_GENERIC_CLOCKEVENTS=y | 18 | CONFIG_GENERIC_CLOCKEVENTS=y |
18 | CONFIG_GENERIC_BUG=y | 19 | CONFIG_GENERIC_BUG=y |
19 | CONFIG_NO_IOMEM=y | 20 | CONFIG_NO_IOMEM=y |
20 | CONFIG_NO_DMA=y | 21 | CONFIG_NO_DMA=y |
21 | CONFIG_GENERIC_LOCKBREAK=y | 22 | CONFIG_GENERIC_LOCKBREAK=y |
22 | CONFIG_PGSTE=y | 23 | CONFIG_PGSTE=y |
24 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
23 | CONFIG_S390=y | 25 | CONFIG_S390=y |
24 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
25 | 27 | ||
@@ -39,20 +41,29 @@ CONFIG_POSIX_MQUEUE=y | |||
39 | # CONFIG_TASKSTATS is not set | 41 | # CONFIG_TASKSTATS is not set |
40 | CONFIG_AUDIT=y | 42 | CONFIG_AUDIT=y |
41 | # CONFIG_AUDITSYSCALL is not set | 43 | # CONFIG_AUDITSYSCALL is not set |
44 | |||
45 | # | ||
46 | # RCU Subsystem | ||
47 | # | ||
48 | CONFIG_CLASSIC_RCU=y | ||
49 | # CONFIG_TREE_RCU is not set | ||
50 | # CONFIG_PREEMPT_RCU is not set | ||
51 | # CONFIG_TREE_RCU_TRACE is not set | ||
52 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
42 | CONFIG_IKCONFIG=y | 53 | CONFIG_IKCONFIG=y |
43 | CONFIG_IKCONFIG_PROC=y | 54 | CONFIG_IKCONFIG_PROC=y |
44 | CONFIG_LOG_BUF_SHIFT=17 | 55 | CONFIG_LOG_BUF_SHIFT=17 |
56 | CONFIG_GROUP_SCHED=y | ||
57 | CONFIG_FAIR_GROUP_SCHED=y | ||
58 | # CONFIG_RT_GROUP_SCHED is not set | ||
59 | CONFIG_USER_SCHED=y | ||
60 | # CONFIG_CGROUP_SCHED is not set | ||
45 | CONFIG_CGROUPS=y | 61 | CONFIG_CGROUPS=y |
46 | # CONFIG_CGROUP_DEBUG is not set | 62 | # CONFIG_CGROUP_DEBUG is not set |
47 | CONFIG_CGROUP_NS=y | 63 | CONFIG_CGROUP_NS=y |
48 | # CONFIG_CGROUP_FREEZER is not set | 64 | # CONFIG_CGROUP_FREEZER is not set |
49 | # CONFIG_CGROUP_DEVICE is not set | 65 | # CONFIG_CGROUP_DEVICE is not set |
50 | # CONFIG_CPUSETS is not set | 66 | # CONFIG_CPUSETS is not set |
51 | CONFIG_GROUP_SCHED=y | ||
52 | CONFIG_FAIR_GROUP_SCHED=y | ||
53 | # CONFIG_RT_GROUP_SCHED is not set | ||
54 | CONFIG_USER_SCHED=y | ||
55 | # CONFIG_CGROUP_SCHED is not set | ||
56 | # CONFIG_CGROUP_CPUACCT is not set | 67 | # CONFIG_CGROUP_CPUACCT is not set |
57 | # CONFIG_RESOURCE_COUNTERS is not set | 68 | # CONFIG_RESOURCE_COUNTERS is not set |
58 | CONFIG_SYSFS_DEPRECATED=y | 69 | CONFIG_SYSFS_DEPRECATED=y |
@@ -63,6 +74,7 @@ CONFIG_UTS_NS=y | |||
63 | CONFIG_IPC_NS=y | 74 | CONFIG_IPC_NS=y |
64 | # CONFIG_USER_NS is not set | 75 | # CONFIG_USER_NS is not set |
65 | # CONFIG_PID_NS is not set | 76 | # CONFIG_PID_NS is not set |
77 | # CONFIG_NET_NS is not set | ||
66 | CONFIG_BLK_DEV_INITRD=y | 78 | CONFIG_BLK_DEV_INITRD=y |
67 | CONFIG_INITRAMFS_SOURCE="" | 79 | CONFIG_INITRAMFS_SOURCE="" |
68 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 80 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -91,17 +103,17 @@ CONFIG_SLAB=y | |||
91 | # CONFIG_SLUB is not set | 103 | # CONFIG_SLUB is not set |
92 | # CONFIG_SLOB is not set | 104 | # CONFIG_SLOB is not set |
93 | # CONFIG_PROFILING is not set | 105 | # CONFIG_PROFILING is not set |
94 | # CONFIG_MARKERS is not set | ||
95 | CONFIG_HAVE_OPROFILE=y | 106 | CONFIG_HAVE_OPROFILE=y |
96 | CONFIG_KPROBES=y | 107 | CONFIG_KPROBES=y |
108 | CONFIG_HAVE_SYSCALL_WRAPPERS=y | ||
97 | CONFIG_KRETPROBES=y | 109 | CONFIG_KRETPROBES=y |
98 | CONFIG_HAVE_KPROBES=y | 110 | CONFIG_HAVE_KPROBES=y |
99 | CONFIG_HAVE_KRETPROBES=y | 111 | CONFIG_HAVE_KRETPROBES=y |
100 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 112 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
113 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
101 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 114 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
102 | CONFIG_SLABINFO=y | 115 | CONFIG_SLABINFO=y |
103 | CONFIG_RT_MUTEXES=y | 116 | CONFIG_RT_MUTEXES=y |
104 | # CONFIG_TINY_SHMEM is not set | ||
105 | CONFIG_BASE_SMALL=0 | 117 | CONFIG_BASE_SMALL=0 |
106 | CONFIG_MODULES=y | 118 | CONFIG_MODULES=y |
107 | # CONFIG_MODULE_FORCE_LOAD is not set | 119 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -109,7 +121,7 @@ CONFIG_MODULE_UNLOAD=y | |||
109 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 121 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
110 | CONFIG_MODVERSIONS=y | 122 | CONFIG_MODVERSIONS=y |
111 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 123 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
112 | CONFIG_KMOD=y | 124 | CONFIG_INIT_ALL_POSSIBLE=y |
113 | CONFIG_STOP_MACHINE=y | 125 | CONFIG_STOP_MACHINE=y |
114 | CONFIG_BLOCK=y | 126 | CONFIG_BLOCK=y |
115 | # CONFIG_BLK_DEV_IO_TRACE is not set | 127 | # CONFIG_BLK_DEV_IO_TRACE is not set |
@@ -130,7 +142,6 @@ CONFIG_DEFAULT_DEADLINE=y | |||
130 | # CONFIG_DEFAULT_NOOP is not set | 142 | # CONFIG_DEFAULT_NOOP is not set |
131 | CONFIG_DEFAULT_IOSCHED="deadline" | 143 | CONFIG_DEFAULT_IOSCHED="deadline" |
132 | CONFIG_PREEMPT_NOTIFIERS=y | 144 | CONFIG_PREEMPT_NOTIFIERS=y |
133 | CONFIG_CLASSIC_RCU=y | ||
134 | # CONFIG_FREEZER is not set | 145 | # CONFIG_FREEZER is not set |
135 | 146 | ||
136 | # | 147 | # |
@@ -161,6 +172,7 @@ CONFIG_S390_EXEC_PROTECT=y | |||
161 | CONFIG_MARCH_Z900=y | 172 | CONFIG_MARCH_Z900=y |
162 | # CONFIG_MARCH_Z990 is not set | 173 | # CONFIG_MARCH_Z990 is not set |
163 | # CONFIG_MARCH_Z9_109 is not set | 174 | # CONFIG_MARCH_Z9_109 is not set |
175 | # CONFIG_MARCH_Z10 is not set | ||
164 | CONFIG_PACK_STACK=y | 176 | CONFIG_PACK_STACK=y |
165 | # CONFIG_SMALL_STACK is not set | 177 | # CONFIG_SMALL_STACK is not set |
166 | CONFIG_CHECK_STACK=y | 178 | CONFIG_CHECK_STACK=y |
@@ -174,7 +186,6 @@ CONFIG_ARCH_POPULATES_NODE_MAP=y | |||
174 | # CONFIG_PREEMPT_NONE is not set | 186 | # CONFIG_PREEMPT_NONE is not set |
175 | # CONFIG_PREEMPT_VOLUNTARY is not set | 187 | # CONFIG_PREEMPT_VOLUNTARY is not set |
176 | CONFIG_PREEMPT=y | 188 | CONFIG_PREEMPT=y |
177 | # CONFIG_PREEMPT_RCU is not set | ||
178 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 189 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
179 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y | 190 | CONFIG_ARCH_SPARSEMEM_DEFAULT=y |
180 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 191 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
@@ -195,7 +206,6 @@ CONFIG_MEMORY_HOTREMOVE=y | |||
195 | CONFIG_PAGEFLAGS_EXTENDED=y | 206 | CONFIG_PAGEFLAGS_EXTENDED=y |
196 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 207 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
197 | CONFIG_MIGRATION=y | 208 | CONFIG_MIGRATION=y |
198 | CONFIG_RESOURCES_64BIT=y | ||
199 | CONFIG_PHYS_ADDR_T_64BIT=y | 209 | CONFIG_PHYS_ADDR_T_64BIT=y |
200 | CONFIG_ZONE_DMA_FLAG=1 | 210 | CONFIG_ZONE_DMA_FLAG=1 |
201 | CONFIG_BOUNCE=y | 211 | CONFIG_BOUNCE=y |
@@ -207,7 +217,6 @@ CONFIG_UNEVICTABLE_LRU=y | |||
207 | # | 217 | # |
208 | CONFIG_MACHCHK_WARNING=y | 218 | CONFIG_MACHCHK_WARNING=y |
209 | CONFIG_QDIO=y | 219 | CONFIG_QDIO=y |
210 | # CONFIG_QDIO_DEBUG is not set | ||
211 | CONFIG_CHSC_SCH=m | 220 | CONFIG_CHSC_SCH=m |
212 | 221 | ||
213 | # | 222 | # |
@@ -227,15 +236,13 @@ CONFIG_PFAULT=y | |||
227 | # CONFIG_SHARED_KERNEL is not set | 236 | # CONFIG_SHARED_KERNEL is not set |
228 | # CONFIG_CMM is not set | 237 | # CONFIG_CMM is not set |
229 | # CONFIG_PAGE_STATES is not set | 238 | # CONFIG_PAGE_STATES is not set |
230 | CONFIG_VIRT_TIMER=y | ||
231 | CONFIG_VIRT_CPU_ACCOUNTING=y | ||
232 | # CONFIG_APPLDATA_BASE is not set | 239 | # CONFIG_APPLDATA_BASE is not set |
233 | CONFIG_HZ_100=y | 240 | CONFIG_HZ_100=y |
234 | # CONFIG_HZ_250 is not set | 241 | # CONFIG_HZ_250 is not set |
235 | # CONFIG_HZ_300 is not set | 242 | # CONFIG_HZ_300 is not set |
236 | # CONFIG_HZ_1000 is not set | 243 | # CONFIG_HZ_1000 is not set |
237 | CONFIG_HZ=100 | 244 | CONFIG_HZ=100 |
238 | # CONFIG_SCHED_HRTICK is not set | 245 | CONFIG_SCHED_HRTICK=y |
239 | CONFIG_S390_HYPFS_FS=y | 246 | CONFIG_S390_HYPFS_FS=y |
240 | CONFIG_KEXEC=y | 247 | CONFIG_KEXEC=y |
241 | # CONFIG_ZFCPDUMP is not set | 248 | # CONFIG_ZFCPDUMP is not set |
@@ -245,6 +252,7 @@ CONFIG_NET=y | |||
245 | # | 252 | # |
246 | # Networking options | 253 | # Networking options |
247 | # | 254 | # |
255 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
248 | CONFIG_PACKET=y | 256 | CONFIG_PACKET=y |
249 | # CONFIG_PACKET_MMAP is not set | 257 | # CONFIG_PACKET_MMAP is not set |
250 | CONFIG_UNIX=y | 258 | CONFIG_UNIX=y |
@@ -383,6 +391,7 @@ CONFIG_NET_SCH_TBF=m | |||
383 | CONFIG_NET_SCH_GRED=m | 391 | CONFIG_NET_SCH_GRED=m |
384 | CONFIG_NET_SCH_DSMARK=m | 392 | CONFIG_NET_SCH_DSMARK=m |
385 | # CONFIG_NET_SCH_NETEM is not set | 393 | # CONFIG_NET_SCH_NETEM is not set |
394 | # CONFIG_NET_SCH_DRR is not set | ||
386 | # CONFIG_NET_SCH_INGRESS is not set | 395 | # CONFIG_NET_SCH_INGRESS is not set |
387 | 396 | ||
388 | # | 397 | # |
@@ -400,6 +409,7 @@ CONFIG_CLS_U32_MARK=y | |||
400 | CONFIG_NET_CLS_RSVP=m | 409 | CONFIG_NET_CLS_RSVP=m |
401 | CONFIG_NET_CLS_RSVP6=m | 410 | CONFIG_NET_CLS_RSVP6=m |
402 | CONFIG_NET_CLS_FLOW=m | 411 | CONFIG_NET_CLS_FLOW=m |
412 | # CONFIG_NET_CLS_CGROUP is not set | ||
403 | # CONFIG_NET_EMATCH is not set | 413 | # CONFIG_NET_EMATCH is not set |
404 | CONFIG_NET_CLS_ACT=y | 414 | CONFIG_NET_CLS_ACT=y |
405 | CONFIG_NET_ACT_POLICE=y | 415 | CONFIG_NET_ACT_POLICE=y |
@@ -411,6 +421,7 @@ CONFIG_NET_ACT_NAT=m | |||
411 | # CONFIG_NET_ACT_SKBEDIT is not set | 421 | # CONFIG_NET_ACT_SKBEDIT is not set |
412 | # CONFIG_NET_CLS_IND is not set | 422 | # CONFIG_NET_CLS_IND is not set |
413 | CONFIG_NET_SCH_FIFO=y | 423 | CONFIG_NET_SCH_FIFO=y |
424 | # CONFIG_DCB is not set | ||
414 | 425 | ||
415 | # | 426 | # |
416 | # Network testing | 427 | # Network testing |
@@ -428,6 +439,7 @@ CONFIG_CAN_VCAN=m | |||
428 | # CONFIG_CAN_DEBUG_DEVICES is not set | 439 | # CONFIG_CAN_DEBUG_DEVICES is not set |
429 | # CONFIG_AF_RXRPC is not set | 440 | # CONFIG_AF_RXRPC is not set |
430 | # CONFIG_PHONET is not set | 441 | # CONFIG_PHONET is not set |
442 | # CONFIG_WIMAX is not set | ||
431 | # CONFIG_RFKILL is not set | 443 | # CONFIG_RFKILL is not set |
432 | # CONFIG_NET_9P is not set | 444 | # CONFIG_NET_9P is not set |
433 | # CONFIG_PCMCIA is not set | 445 | # CONFIG_PCMCIA is not set |
@@ -475,11 +487,15 @@ CONFIG_DASD_DIAG=y | |||
475 | CONFIG_DASD_EER=y | 487 | CONFIG_DASD_EER=y |
476 | CONFIG_VIRTIO_BLK=m | 488 | CONFIG_VIRTIO_BLK=m |
477 | CONFIG_MISC_DEVICES=y | 489 | CONFIG_MISC_DEVICES=y |
478 | # CONFIG_EEPROM_93CX6 is not set | ||
479 | # CONFIG_ENCLOSURE_SERVICES is not set | 490 | # CONFIG_ENCLOSURE_SERVICES is not set |
480 | # CONFIG_C2PORT is not set | 491 | # CONFIG_C2PORT is not set |
481 | 492 | ||
482 | # | 493 | # |
494 | # EEPROM support | ||
495 | # | ||
496 | # CONFIG_EEPROM_93CX6 is not set | ||
497 | |||
498 | # | ||
483 | # SCSI device support | 499 | # SCSI device support |
484 | # | 500 | # |
485 | # CONFIG_RAID_ATTRS is not set | 501 | # CONFIG_RAID_ATTRS is not set |
@@ -520,6 +536,7 @@ CONFIG_SCSI_FC_ATTRS=y | |||
520 | # CONFIG_SCSI_SRP_ATTRS is not set | 536 | # CONFIG_SCSI_SRP_ATTRS is not set |
521 | CONFIG_SCSI_LOWLEVEL=y | 537 | CONFIG_SCSI_LOWLEVEL=y |
522 | # CONFIG_ISCSI_TCP is not set | 538 | # CONFIG_ISCSI_TCP is not set |
539 | # CONFIG_LIBFC is not set | ||
523 | # CONFIG_SCSI_DEBUG is not set | 540 | # CONFIG_SCSI_DEBUG is not set |
524 | CONFIG_ZFCP=y | 541 | CONFIG_ZFCP=y |
525 | CONFIG_SCSI_DH=m | 542 | CONFIG_SCSI_DH=m |
@@ -566,6 +583,10 @@ CONFIG_NET_ETHERNET=y | |||
566 | CONFIG_NETDEV_1000=y | 583 | CONFIG_NETDEV_1000=y |
567 | CONFIG_NETDEV_10000=y | 584 | CONFIG_NETDEV_10000=y |
568 | # CONFIG_TR is not set | 585 | # CONFIG_TR is not set |
586 | |||
587 | # | ||
588 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
589 | # | ||
569 | # CONFIG_WAN is not set | 590 | # CONFIG_WAN is not set |
570 | 591 | ||
571 | # | 592 | # |
@@ -593,9 +614,11 @@ CONFIG_VIRTIO_NET=m | |||
593 | # | 614 | # |
594 | CONFIG_DEVKMEM=y | 615 | CONFIG_DEVKMEM=y |
595 | CONFIG_UNIX98_PTYS=y | 616 | CONFIG_UNIX98_PTYS=y |
617 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
596 | CONFIG_LEGACY_PTYS=y | 618 | CONFIG_LEGACY_PTYS=y |
597 | CONFIG_LEGACY_PTY_COUNT=256 | 619 | CONFIG_LEGACY_PTY_COUNT=256 |
598 | CONFIG_HVC_DRIVER=y | 620 | CONFIG_HVC_DRIVER=y |
621 | CONFIG_HVC_IUCV=y | ||
599 | CONFIG_VIRTIO_CONSOLE=y | 622 | CONFIG_VIRTIO_CONSOLE=y |
600 | CONFIG_HW_RANDOM=m | 623 | CONFIG_HW_RANDOM=m |
601 | CONFIG_HW_RANDOM_VIRTIO=m | 624 | CONFIG_HW_RANDOM_VIRTIO=m |
@@ -645,7 +668,6 @@ CONFIG_S390_VMUR=m | |||
645 | # CONFIG_NEW_LEDS is not set | 668 | # CONFIG_NEW_LEDS is not set |
646 | CONFIG_ACCESSIBILITY=y | 669 | CONFIG_ACCESSIBILITY=y |
647 | # CONFIG_STAGING is not set | 670 | # CONFIG_STAGING is not set |
648 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
649 | 671 | ||
650 | # | 672 | # |
651 | # File systems | 673 | # File systems |
@@ -668,6 +690,7 @@ CONFIG_FILE_LOCKING=y | |||
668 | # CONFIG_XFS_FS is not set | 690 | # CONFIG_XFS_FS is not set |
669 | # CONFIG_GFS2_FS is not set | 691 | # CONFIG_GFS2_FS is not set |
670 | # CONFIG_OCFS2_FS is not set | 692 | # CONFIG_OCFS2_FS is not set |
693 | # CONFIG_BTRFS_FS is not set | ||
671 | CONFIG_DNOTIFY=y | 694 | CONFIG_DNOTIFY=y |
672 | CONFIG_INOTIFY=y | 695 | CONFIG_INOTIFY=y |
673 | CONFIG_INOTIFY_USER=y | 696 | CONFIG_INOTIFY_USER=y |
@@ -703,10 +726,7 @@ CONFIG_TMPFS_POSIX_ACL=y | |||
703 | # CONFIG_HUGETLBFS is not set | 726 | # CONFIG_HUGETLBFS is not set |
704 | # CONFIG_HUGETLB_PAGE is not set | 727 | # CONFIG_HUGETLB_PAGE is not set |
705 | CONFIG_CONFIGFS_FS=m | 728 | CONFIG_CONFIGFS_FS=m |
706 | 729 | CONFIG_MISC_FILESYSTEMS=y | |
707 | # | ||
708 | # Miscellaneous filesystems | ||
709 | # | ||
710 | # CONFIG_ADFS_FS is not set | 730 | # CONFIG_ADFS_FS is not set |
711 | # CONFIG_AFFS_FS is not set | 731 | # CONFIG_AFFS_FS is not set |
712 | # CONFIG_HFS_FS is not set | 732 | # CONFIG_HFS_FS is not set |
@@ -715,6 +735,7 @@ CONFIG_CONFIGFS_FS=m | |||
715 | # CONFIG_BFS_FS is not set | 735 | # CONFIG_BFS_FS is not set |
716 | # CONFIG_EFS_FS is not set | 736 | # CONFIG_EFS_FS is not set |
717 | # CONFIG_CRAMFS is not set | 737 | # CONFIG_CRAMFS is not set |
738 | # CONFIG_SQUASHFS is not set | ||
718 | # CONFIG_VXFS_FS is not set | 739 | # CONFIG_VXFS_FS is not set |
719 | # CONFIG_MINIX_FS is not set | 740 | # CONFIG_MINIX_FS is not set |
720 | # CONFIG_OMFS_FS is not set | 741 | # CONFIG_OMFS_FS is not set |
@@ -808,6 +829,7 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
808 | CONFIG_DEBUG_MEMORY_INIT=y | 829 | CONFIG_DEBUG_MEMORY_INIT=y |
809 | # CONFIG_DEBUG_LIST is not set | 830 | # CONFIG_DEBUG_LIST is not set |
810 | # CONFIG_DEBUG_SG is not set | 831 | # CONFIG_DEBUG_SG is not set |
832 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
811 | # CONFIG_FRAME_POINTER is not set | 833 | # CONFIG_FRAME_POINTER is not set |
812 | # CONFIG_RCU_TORTURE_TEST is not set | 834 | # CONFIG_RCU_TORTURE_TEST is not set |
813 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 835 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -818,15 +840,19 @@ CONFIG_DEBUG_MEMORY_INIT=y | |||
818 | # CONFIG_FAULT_INJECTION is not set | 840 | # CONFIG_FAULT_INJECTION is not set |
819 | # CONFIG_LATENCYTOP is not set | 841 | # CONFIG_LATENCYTOP is not set |
820 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 842 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
843 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
821 | 844 | ||
822 | # | 845 | # |
823 | # Tracers | 846 | # Tracers |
824 | # | 847 | # |
848 | # CONFIG_FUNCTION_TRACER is not set | ||
825 | # CONFIG_IRQSOFF_TRACER is not set | 849 | # CONFIG_IRQSOFF_TRACER is not set |
826 | # CONFIG_PREEMPT_TRACER is not set | 850 | # CONFIG_PREEMPT_TRACER is not set |
827 | # CONFIG_SCHED_TRACER is not set | 851 | # CONFIG_SCHED_TRACER is not set |
828 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 852 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
829 | # CONFIG_BOOT_TRACER is not set | 853 | # CONFIG_BOOT_TRACER is not set |
854 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
855 | # CONFIG_STACK_TRACER is not set | ||
830 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 856 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
831 | CONFIG_SAMPLES=y | 857 | CONFIG_SAMPLES=y |
832 | # CONFIG_SAMPLE_KOBJECT is not set | 858 | # CONFIG_SAMPLE_KOBJECT is not set |
@@ -847,11 +873,17 @@ CONFIG_CRYPTO=y | |||
847 | # | 873 | # |
848 | CONFIG_CRYPTO_FIPS=y | 874 | CONFIG_CRYPTO_FIPS=y |
849 | CONFIG_CRYPTO_ALGAPI=y | 875 | CONFIG_CRYPTO_ALGAPI=y |
850 | CONFIG_CRYPTO_AEAD=y | 876 | CONFIG_CRYPTO_ALGAPI2=y |
877 | CONFIG_CRYPTO_AEAD=m | ||
878 | CONFIG_CRYPTO_AEAD2=y | ||
851 | CONFIG_CRYPTO_BLKCIPHER=y | 879 | CONFIG_CRYPTO_BLKCIPHER=y |
852 | CONFIG_CRYPTO_HASH=y | 880 | CONFIG_CRYPTO_BLKCIPHER2=y |
853 | CONFIG_CRYPTO_RNG=y | 881 | CONFIG_CRYPTO_HASH=m |
882 | CONFIG_CRYPTO_HASH2=y | ||
883 | CONFIG_CRYPTO_RNG=m | ||
884 | CONFIG_CRYPTO_RNG2=y | ||
854 | CONFIG_CRYPTO_MANAGER=y | 885 | CONFIG_CRYPTO_MANAGER=y |
886 | CONFIG_CRYPTO_MANAGER2=y | ||
855 | CONFIG_CRYPTO_GF128MUL=m | 887 | CONFIG_CRYPTO_GF128MUL=m |
856 | # CONFIG_CRYPTO_NULL is not set | 888 | # CONFIG_CRYPTO_NULL is not set |
857 | # CONFIG_CRYPTO_CRYPTD is not set | 889 | # CONFIG_CRYPTO_CRYPTD is not set |
@@ -885,7 +917,7 @@ CONFIG_CRYPTO_HMAC=m | |||
885 | # | 917 | # |
886 | # Digest | 918 | # Digest |
887 | # | 919 | # |
888 | # CONFIG_CRYPTO_CRC32C is not set | 920 | CONFIG_CRYPTO_CRC32C=m |
889 | # CONFIG_CRYPTO_MD4 is not set | 921 | # CONFIG_CRYPTO_MD4 is not set |
890 | CONFIG_CRYPTO_MD5=m | 922 | CONFIG_CRYPTO_MD5=m |
891 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 923 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
@@ -942,6 +974,7 @@ CONFIG_S390_PRNG=m | |||
942 | # Library routines | 974 | # Library routines |
943 | # | 975 | # |
944 | CONFIG_BITREVERSE=m | 976 | CONFIG_BITREVERSE=m |
977 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
945 | # CONFIG_CRC_CCITT is not set | 978 | # CONFIG_CRC_CCITT is not set |
946 | # CONFIG_CRC16 is not set | 979 | # CONFIG_CRC16 is not set |
947 | CONFIG_CRC_T10DIF=y | 980 | CONFIG_CRC_T10DIF=y |
diff --git a/arch/s390/include/asm/cputime.h b/arch/s390/include/asm/cputime.h index 521726430afa..95b0f7db3c69 100644 --- a/arch/s390/include/asm/cputime.h +++ b/arch/s390/include/asm/cputime.h | |||
@@ -145,7 +145,7 @@ cputime_to_timeval(const cputime_t cputime, struct timeval *value) | |||
145 | value->tv_usec = rp.subreg.even / 4096; | 145 | value->tv_usec = rp.subreg.even / 4096; |
146 | value->tv_sec = rp.subreg.odd; | 146 | value->tv_sec = rp.subreg.odd; |
147 | #else | 147 | #else |
148 | value->tv_usec = cputime % 4096000000ULL; | 148 | value->tv_usec = (cputime % 4096000000ULL) / 4096; |
149 | value->tv_sec = cputime / 4096000000ULL; | 149 | value->tv_sec = cputime / 4096000000ULL; |
150 | #endif | 150 | #endif |
151 | } | 151 | } |
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index ffdef5fe8587..f3720defdd16 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h | |||
@@ -384,8 +384,8 @@ struct _lowcore | |||
384 | __u32 panic_magic; /* 0xe00 */ | 384 | __u32 panic_magic; /* 0xe00 */ |
385 | 385 | ||
386 | /* Per cpu primary space access list */ | 386 | /* Per cpu primary space access list */ |
387 | __u8 pad_0xe04[0xe3c-0xe04]; /* 0xe04 */ | 387 | __u8 pad_0xe04[0xe38-0xe04]; /* 0xe04 */ |
388 | __u32 vdso_per_cpu_data; /* 0xe3c */ | 388 | __u64 vdso_per_cpu_data; /* 0xe38 */ |
389 | __u32 paste[16]; /* 0xe40 */ | 389 | __u32 paste[16]; /* 0xe40 */ |
390 | 390 | ||
391 | __u8 pad13[0x11b8-0xe80]; /* 0xe80 */ | 391 | __u8 pad13[0x11b8-0xe80]; /* 0xe80 */ |
diff --git a/arch/s390/include/asm/setup.h b/arch/s390/include/asm/setup.h index 2bd9faeb3919..e8bd6ac22c99 100644 --- a/arch/s390/include/asm/setup.h +++ b/arch/s390/include/asm/setup.h | |||
@@ -43,6 +43,8 @@ struct mem_chunk { | |||
43 | 43 | ||
44 | extern struct mem_chunk memory_chunk[]; | 44 | extern struct mem_chunk memory_chunk[]; |
45 | extern unsigned long real_memory_size; | 45 | extern unsigned long real_memory_size; |
46 | extern int memory_end_set; | ||
47 | extern unsigned long memory_end; | ||
46 | 48 | ||
47 | void detect_memory_layout(struct mem_chunk chunk[]); | 49 | void detect_memory_layout(struct mem_chunk chunk[]); |
48 | 50 | ||
diff --git a/arch/s390/kernel/irq.c b/arch/s390/kernel/irq.c index e7c5bfb7c755..026a37a94fc9 100644 --- a/arch/s390/kernel/irq.c +++ b/arch/s390/kernel/irq.c | |||
@@ -95,6 +95,7 @@ asmlinkage void do_softirq(void) | |||
95 | local_irq_restore(flags); | 95 | local_irq_restore(flags); |
96 | } | 96 | } |
97 | 97 | ||
98 | #ifdef CONFIG_PROC_FS | ||
98 | void init_irq_proc(void) | 99 | void init_irq_proc(void) |
99 | { | 100 | { |
100 | struct proc_dir_entry *root_irq_dir; | 101 | struct proc_dir_entry *root_irq_dir; |
@@ -102,3 +103,4 @@ void init_irq_proc(void) | |||
102 | root_irq_dir = proc_mkdir("irq", NULL); | 103 | root_irq_dir = proc_mkdir("irq", NULL); |
103 | create_prof_cpu_mask(root_irq_dir); | 104 | create_prof_cpu_mask(root_irq_dir); |
104 | } | 105 | } |
106 | #endif | ||
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index d825f4950e4e..c5cfb6185eac 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -82,7 +82,9 @@ char elf_platform[ELF_PLATFORM_SIZE]; | |||
82 | 82 | ||
83 | struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; | 83 | struct mem_chunk __initdata memory_chunk[MEMORY_CHUNKS]; |
84 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ | 84 | volatile int __cpu_logical_map[NR_CPUS]; /* logical cpu to cpu address */ |
85 | static unsigned long __initdata memory_end; | 85 | |
86 | int __initdata memory_end_set; | ||
87 | unsigned long __initdata memory_end; | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * This is set up by the setup-routine at boot-time | 90 | * This is set up by the setup-routine at boot-time |
@@ -281,6 +283,7 @@ void (*pm_power_off)(void) = machine_power_off; | |||
281 | static int __init early_parse_mem(char *p) | 283 | static int __init early_parse_mem(char *p) |
282 | { | 284 | { |
283 | memory_end = memparse(p, &p); | 285 | memory_end = memparse(p, &p); |
286 | memory_end_set = 1; | ||
284 | return 0; | 287 | return 0; |
285 | } | 288 | } |
286 | early_param("mem", early_parse_mem); | 289 | early_param("mem", early_parse_mem); |
@@ -508,8 +511,10 @@ static void __init setup_memory_end(void) | |||
508 | int i; | 511 | int i; |
509 | 512 | ||
510 | #if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE) | 513 | #if defined(CONFIG_ZFCPDUMP) || defined(CONFIG_ZFCPDUMP_MODULE) |
511 | if (ipl_info.type == IPL_TYPE_FCP_DUMP) | 514 | if (ipl_info.type == IPL_TYPE_FCP_DUMP) { |
512 | memory_end = ZFCPDUMP_HSA_SIZE; | 515 | memory_end = ZFCPDUMP_HSA_SIZE; |
516 | memory_end_set = 1; | ||
517 | } | ||
513 | #endif | 518 | #endif |
514 | memory_size = 0; | 519 | memory_size = 0; |
515 | memory_end &= PAGE_MASK; | 520 | memory_end &= PAGE_MASK; |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index be8497186b96..0d33893e1e89 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -212,6 +212,10 @@ static void kvm_free_vcpus(struct kvm *kvm) | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | void kvm_arch_sync_events(struct kvm *kvm) | ||
216 | { | ||
217 | } | ||
218 | |||
215 | void kvm_arch_destroy_vm(struct kvm *kvm) | 219 | void kvm_arch_destroy_vm(struct kvm *kvm) |
216 | { | 220 | { |
217 | kvm_free_vcpus(kvm); | 221 | kvm_free_vcpus(kvm); |
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index 8ffee714f932..a46c3a21e26d 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S | |||
@@ -891,10 +891,35 @@ prom_tba: .xword 0 | |||
891 | tlb_type: .word 0 /* Must NOT end up in BSS */ | 891 | tlb_type: .word 0 /* Must NOT end up in BSS */ |
892 | .section ".fixup",#alloc,#execinstr | 892 | .section ".fixup",#alloc,#execinstr |
893 | 893 | ||
894 | .globl __ret_efault, __retl_efault | 894 | .globl __ret_efault, __retl_efault, __ret_one, __retl_one |
895 | __ret_efault: | 895 | ENTRY(__ret_efault) |
896 | ret | 896 | ret |
897 | restore %g0, -EFAULT, %o0 | 897 | restore %g0, -EFAULT, %o0 |
898 | __retl_efault: | 898 | ENDPROC(__ret_efault) |
899 | |||
900 | ENTRY(__retl_efault) | ||
899 | retl | 901 | retl |
900 | mov -EFAULT, %o0 | 902 | mov -EFAULT, %o0 |
903 | ENDPROC(__retl_efault) | ||
904 | |||
905 | ENTRY(__retl_one) | ||
906 | retl | ||
907 | mov 1, %o0 | ||
908 | ENDPROC(__retl_one) | ||
909 | |||
910 | ENTRY(__ret_one_asi) | ||
911 | wr %g0, ASI_AIUS, %asi | ||
912 | ret | ||
913 | restore %g0, 1, %o0 | ||
914 | ENDPROC(__ret_one_asi) | ||
915 | |||
916 | ENTRY(__retl_one_asi) | ||
917 | wr %g0, ASI_AIUS, %asi | ||
918 | retl | ||
919 | mov 1, %o0 | ||
920 | ENDPROC(__retl_one_asi) | ||
921 | |||
922 | ENTRY(__retl_o1) | ||
923 | retl | ||
924 | mov %o1, %o0 | ||
925 | ENDPROC(__retl_o1) | ||
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c index 09f088ed4a64..f3577223c863 100644 --- a/arch/sparc/kernel/nmi.c +++ b/arch/sparc/kernel/nmi.c | |||
@@ -70,6 +70,7 @@ static void die_nmi(const char *str, struct pt_regs *regs, int do_panic) | |||
70 | printk(" on CPU%d, ip %08lx, registers:\n", | 70 | printk(" on CPU%d, ip %08lx, registers:\n", |
71 | smp_processor_id(), regs->tpc); | 71 | smp_processor_id(), regs->tpc); |
72 | show_regs(regs); | 72 | show_regs(regs); |
73 | dump_stack(); | ||
73 | 74 | ||
74 | bust_spinlocks(0); | 75 | bust_spinlocks(0); |
75 | 76 | ||
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c index 92e0dda141a4..1ae8cdd7e703 100644 --- a/arch/sparc/kernel/pcr.c +++ b/arch/sparc/kernel/pcr.c | |||
@@ -133,11 +133,16 @@ int __init pcr_arch_init(void) | |||
133 | 133 | ||
134 | case cheetah: | 134 | case cheetah: |
135 | case cheetah_plus: | 135 | case cheetah_plus: |
136 | case spitfire: | ||
137 | pcr_ops = &direct_pcr_ops; | 136 | pcr_ops = &direct_pcr_ops; |
138 | pcr_enable = PCR_SUN4U_ENABLE; | 137 | pcr_enable = PCR_SUN4U_ENABLE; |
139 | break; | 138 | break; |
140 | 139 | ||
140 | case spitfire: | ||
141 | /* UltraSPARC-I/II and derivatives lack a profile | ||
142 | * counter overflow interrupt so we can't make use of | ||
143 | * their hardware currently. | ||
144 | */ | ||
145 | /* fallthrough */ | ||
141 | default: | 146 | default: |
142 | err = -ENODEV; | 147 | err = -ENODEV; |
143 | goto out_unregister; | 148 | goto out_unregister; |
diff --git a/arch/sparc/lib/GENbzero.S b/arch/sparc/lib/GENbzero.S index 6a4f956a2f7a..8e7a843ddd88 100644 --- a/arch/sparc/lib/GENbzero.S +++ b/arch/sparc/lib/GENbzero.S | |||
@@ -6,13 +6,9 @@ | |||
6 | 6 | ||
7 | #define EX_ST(x,y) \ | 7 | #define EX_ST(x,y) \ |
8 | 98: x,y; \ | 8 | 98: x,y; \ |
9 | .section .fixup; \ | ||
10 | .align 4; \ | ||
11 | 99: retl; \ | ||
12 | mov %o1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 9 | .section __ex_table,"a";\ |
14 | .align 4; \ | 10 | .align 4; \ |
15 | .word 98b, 99b; \ | 11 | .word 98b, __retl_o1; \ |
16 | .text; \ | 12 | .text; \ |
17 | .align 4; | 13 | .align 4; |
18 | 14 | ||
diff --git a/arch/sparc/lib/GENcopy_from_user.S b/arch/sparc/lib/GENcopy_from_user.S index 2b9df99e87f9..b7d0bd6b1406 100644 --- a/arch/sparc/lib/GENcopy_from_user.S +++ b/arch/sparc/lib/GENcopy_from_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop | 27 | nop |
32 | #endif | 28 | #endif |
33 | 29 | ||
diff --git a/arch/sparc/lib/GENcopy_to_user.S b/arch/sparc/lib/GENcopy_to_user.S index bb3f7084daf9..780550e1afc7 100644 --- a/arch/sparc/lib/GENcopy_to_user.S +++ b/arch/sparc/lib/GENcopy_to_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -31,7 +27,7 @@ | |||
31 | #define PREAMBLE \ | 27 | #define PREAMBLE \ |
32 | rd %asi, %g1; \ | 28 | rd %asi, %g1; \ |
33 | cmp %g1, ASI_AIUS; \ | 29 | cmp %g1, ASI_AIUS; \ |
34 | bne,pn %icc, memcpy_user_stub; \ | 30 | bne,pn %icc, ___copy_in_user; \ |
35 | nop | 31 | nop |
36 | #endif | 32 | #endif |
37 | 33 | ||
diff --git a/arch/sparc/lib/NG2copy_from_user.S b/arch/sparc/lib/NG2copy_from_user.S index c77ef5f22102..119ccb9a54f4 100644 --- a/arch/sparc/lib/NG2copy_from_user.S +++ b/arch/sparc/lib/NG2copy_from_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | retl; \ | ||
12 | mov 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -33,7 +28,7 @@ | |||
33 | #define PREAMBLE \ | 28 | #define PREAMBLE \ |
34 | rd %asi, %g1; \ | 29 | rd %asi, %g1; \ |
35 | cmp %g1, ASI_AIUS; \ | 30 | cmp %g1, ASI_AIUS; \ |
36 | bne,pn %icc, memcpy_user_stub; \ | 31 | bne,pn %icc, ___copy_in_user; \ |
37 | nop | 32 | nop |
38 | #endif | 33 | #endif |
39 | 34 | ||
diff --git a/arch/sparc/lib/NG2copy_to_user.S b/arch/sparc/lib/NG2copy_to_user.S index 4bd4093acbbd..7fe1ccefd9d0 100644 --- a/arch/sparc/lib/NG2copy_to_user.S +++ b/arch/sparc/lib/NG2copy_to_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | retl; \ | ||
12 | mov 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -42,7 +37,7 @@ | |||
42 | #define PREAMBLE \ | 37 | #define PREAMBLE \ |
43 | rd %asi, %g1; \ | 38 | rd %asi, %g1; \ |
44 | cmp %g1, ASI_AIUS; \ | 39 | cmp %g1, ASI_AIUS; \ |
45 | bne,pn %icc, memcpy_user_stub; \ | 40 | bne,pn %icc, ___copy_in_user; \ |
46 | nop | 41 | nop |
47 | #endif | 42 | #endif |
48 | 43 | ||
diff --git a/arch/sparc/lib/NGbzero.S b/arch/sparc/lib/NGbzero.S index 814d5f7a45e1..beab29bf419b 100644 --- a/arch/sparc/lib/NGbzero.S +++ b/arch/sparc/lib/NGbzero.S | |||
@@ -6,13 +6,9 @@ | |||
6 | 6 | ||
7 | #define EX_ST(x,y) \ | 7 | #define EX_ST(x,y) \ |
8 | 98: x,y; \ | 8 | 98: x,y; \ |
9 | .section .fixup; \ | ||
10 | .align 4; \ | ||
11 | 99: retl; \ | ||
12 | mov %o1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 9 | .section __ex_table,"a";\ |
14 | .align 4; \ | 10 | .align 4; \ |
15 | .word 98b, 99b; \ | 11 | .word 98b, __retl_o1; \ |
16 | .text; \ | 12 | .text; \ |
17 | .align 4; | 13 | .align 4; |
18 | 14 | ||
diff --git a/arch/sparc/lib/NGcopy_from_user.S b/arch/sparc/lib/NGcopy_from_user.S index e7f433f71b42..5d1e4d1ac21e 100644 --- a/arch/sparc/lib/NGcopy_from_user.S +++ b/arch/sparc/lib/NGcopy_from_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | ret; \ | ||
12 | restore %g0, 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __ret_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -30,7 +25,7 @@ | |||
30 | #define PREAMBLE \ | 25 | #define PREAMBLE \ |
31 | rd %asi, %g1; \ | 26 | rd %asi, %g1; \ |
32 | cmp %g1, ASI_AIUS; \ | 27 | cmp %g1, ASI_AIUS; \ |
33 | bne,pn %icc, memcpy_user_stub; \ | 28 | bne,pn %icc, ___copy_in_user; \ |
34 | nop | 29 | nop |
35 | #endif | 30 | #endif |
36 | 31 | ||
diff --git a/arch/sparc/lib/NGcopy_to_user.S b/arch/sparc/lib/NGcopy_to_user.S index 6ea01c5532a0..ff630dcb273c 100644 --- a/arch/sparc/lib/NGcopy_to_user.S +++ b/arch/sparc/lib/NGcopy_to_user.S | |||
@@ -5,14 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: wr %g0, ASI_AIUS, %asi;\ | ||
11 | ret; \ | ||
12 | restore %g0, 1, %o0; \ | ||
13 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
14 | .align 4; \ | 9 | .align 4; \ |
15 | .word 98b, 99b; \ | 10 | .word 98b, __ret_one_asi;\ |
16 | .text; \ | 11 | .text; \ |
17 | .align 4; | 12 | .align 4; |
18 | 13 | ||
@@ -33,7 +28,7 @@ | |||
33 | #define PREAMBLE \ | 28 | #define PREAMBLE \ |
34 | rd %asi, %g1; \ | 29 | rd %asi, %g1; \ |
35 | cmp %g1, ASI_AIUS; \ | 30 | cmp %g1, ASI_AIUS; \ |
36 | bne,pn %icc, memcpy_user_stub; \ | 31 | bne,pn %icc, ___copy_in_user; \ |
37 | nop | 32 | nop |
38 | #endif | 33 | #endif |
39 | 34 | ||
diff --git a/arch/sparc/lib/U1copy_from_user.S b/arch/sparc/lib/U1copy_from_user.S index 3192b0bf4fab..a6ae2ea04bf5 100644 --- a/arch/sparc/lib/U1copy_from_user.S +++ b/arch/sparc/lib/U1copy_from_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop; \ | 27 | nop; \ |
32 | 28 | ||
33 | #include "U1memcpy.S" | 29 | #include "U1memcpy.S" |
diff --git a/arch/sparc/lib/U1copy_to_user.S b/arch/sparc/lib/U1copy_to_user.S index d1210ffb0b82..f4b970eeb485 100644 --- a/arch/sparc/lib/U1copy_to_user.S +++ b/arch/sparc/lib/U1copy_to_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop; \ | 27 | nop; \ |
32 | 28 | ||
33 | #include "U1memcpy.S" | 29 | #include "U1memcpy.S" |
diff --git a/arch/sparc/lib/U3copy_from_user.S b/arch/sparc/lib/U3copy_from_user.S index f5bfc8d9d216..b1acd1331c33 100644 --- a/arch/sparc/lib/U3copy_from_user.S +++ b/arch/sparc/lib/U3copy_from_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_LD(x) \ | 6 | #define EX_LD(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
diff --git a/arch/sparc/lib/U3copy_to_user.S b/arch/sparc/lib/U3copy_to_user.S index 2334f111bb0c..ef1e493afdfa 100644 --- a/arch/sparc/lib/U3copy_to_user.S +++ b/arch/sparc/lib/U3copy_to_user.S | |||
@@ -5,13 +5,9 @@ | |||
5 | 5 | ||
6 | #define EX_ST(x) \ | 6 | #define EX_ST(x) \ |
7 | 98: x; \ | 7 | 98: x; \ |
8 | .section .fixup; \ | ||
9 | .align 4; \ | ||
10 | 99: retl; \ | ||
11 | mov 1, %o0; \ | ||
12 | .section __ex_table,"a";\ | 8 | .section __ex_table,"a";\ |
13 | .align 4; \ | 9 | .align 4; \ |
14 | .word 98b, 99b; \ | 10 | .word 98b, __retl_one; \ |
15 | .text; \ | 11 | .text; \ |
16 | .align 4; | 12 | .align 4; |
17 | 13 | ||
@@ -27,7 +23,7 @@ | |||
27 | #define PREAMBLE \ | 23 | #define PREAMBLE \ |
28 | rd %asi, %g1; \ | 24 | rd %asi, %g1; \ |
29 | cmp %g1, ASI_AIUS; \ | 25 | cmp %g1, ASI_AIUS; \ |
30 | bne,pn %icc, memcpy_user_stub; \ | 26 | bne,pn %icc, ___copy_in_user; \ |
31 | nop; \ | 27 | nop; \ |
32 | 28 | ||
33 | #include "U3memcpy.S" | 29 | #include "U3memcpy.S" |
diff --git a/arch/sparc/lib/bzero.S b/arch/sparc/lib/bzero.S index c7bbae8c590f..b6557297440f 100644 --- a/arch/sparc/lib/bzero.S +++ b/arch/sparc/lib/bzero.S | |||
@@ -88,13 +88,9 @@ __bzero_done: | |||
88 | 88 | ||
89 | #define EX_ST(x,y) \ | 89 | #define EX_ST(x,y) \ |
90 | 98: x,y; \ | 90 | 98: x,y; \ |
91 | .section .fixup; \ | ||
92 | .align 4; \ | ||
93 | 99: retl; \ | ||
94 | mov %o1, %o0; \ | ||
95 | .section __ex_table,"a";\ | 91 | .section __ex_table,"a";\ |
96 | .align 4; \ | 92 | .align 4; \ |
97 | .word 98b, 99b; \ | 93 | .word 98b, __retl_o1; \ |
98 | .text; \ | 94 | .text; \ |
99 | .align 4; | 95 | .align 4; |
100 | 96 | ||
diff --git a/arch/sparc/lib/copy_in_user.S b/arch/sparc/lib/copy_in_user.S index 650af3f21f78..302c0e60dc2c 100644 --- a/arch/sparc/lib/copy_in_user.S +++ b/arch/sparc/lib/copy_in_user.S | |||
@@ -3,19 +3,16 @@ | |||
3 | * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 1999, 2000, 2004 David S. Miller (davem@redhat.com) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <linux/linkage.h> | ||
6 | #include <asm/asi.h> | 7 | #include <asm/asi.h> |
7 | 8 | ||
8 | #define XCC xcc | 9 | #define XCC xcc |
9 | 10 | ||
10 | #define EX(x,y) \ | 11 | #define EX(x,y) \ |
11 | 98: x,y; \ | 12 | 98: x,y; \ |
12 | .section .fixup; \ | ||
13 | .align 4; \ | ||
14 | 99: retl; \ | ||
15 | mov 1, %o0; \ | ||
16 | .section __ex_table,"a";\ | 13 | .section __ex_table,"a";\ |
17 | .align 4; \ | 14 | .align 4; \ |
18 | .word 98b, 99b; \ | 15 | .word 98b, __retl_one; \ |
19 | .text; \ | 16 | .text; \ |
20 | .align 4; | 17 | .align 4; |
21 | 18 | ||
@@ -31,18 +28,7 @@ | |||
31 | * to copy register windows around during thread cloning. | 28 | * to copy register windows around during thread cloning. |
32 | */ | 29 | */ |
33 | 30 | ||
34 | .globl ___copy_in_user | 31 | ENTRY(___copy_in_user) /* %o0=dst, %o1=src, %o2=len */ |
35 | .type ___copy_in_user,#function | ||
36 | ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | ||
37 | /* Writing to %asi is _expensive_ so we hardcode it. | ||
38 | * Reading %asi to check for KERNEL_DS is comparatively | ||
39 | * cheap. | ||
40 | */ | ||
41 | rd %asi, %g1 | ||
42 | cmp %g1, ASI_AIUS | ||
43 | bne,pn %icc, memcpy_user_stub | ||
44 | nop | ||
45 | |||
46 | cmp %o2, 0 | 32 | cmp %o2, 0 |
47 | be,pn %XCC, 85f | 33 | be,pn %XCC, 85f |
48 | or %o0, %o1, %o3 | 34 | or %o0, %o1, %o3 |
@@ -53,22 +39,24 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | |||
53 | /* 16 < len <= 64 */ | 39 | /* 16 < len <= 64 */ |
54 | andcc %o3, 0x7, %g0 | 40 | andcc %o3, 0x7, %g0 |
55 | bne,pn %XCC, 90f | 41 | bne,pn %XCC, 90f |
56 | sub %o0, %o1, %o3 | 42 | nop |
57 | 43 | ||
58 | andn %o2, 0x7, %o4 | 44 | andn %o2, 0x7, %o4 |
59 | and %o2, 0x7, %o2 | 45 | and %o2, 0x7, %o2 |
60 | 1: subcc %o4, 0x8, %o4 | 46 | 1: subcc %o4, 0x8, %o4 |
61 | EX(ldxa [%o1] %asi, %o5) | 47 | EX(ldxa [%o1] %asi, %o5) |
62 | EX(stxa %o5, [%o1 + %o3] ASI_AIUS) | 48 | EX(stxa %o5, [%o0] %asi) |
49 | add %o1, 0x8, %o1 | ||
63 | bgu,pt %XCC, 1b | 50 | bgu,pt %XCC, 1b |
64 | add %o1, 0x8, %o1 | 51 | add %o0, 0x8, %o0 |
65 | andcc %o2, 0x4, %g0 | 52 | andcc %o2, 0x4, %g0 |
66 | be,pt %XCC, 1f | 53 | be,pt %XCC, 1f |
67 | nop | 54 | nop |
68 | sub %o2, 0x4, %o2 | 55 | sub %o2, 0x4, %o2 |
69 | EX(lduwa [%o1] %asi, %o5) | 56 | EX(lduwa [%o1] %asi, %o5) |
70 | EX(stwa %o5, [%o1 + %o3] ASI_AIUS) | 57 | EX(stwa %o5, [%o0] %asi) |
71 | add %o1, 0x4, %o1 | 58 | add %o1, 0x4, %o1 |
59 | add %o0, 0x4, %o0 | ||
72 | 1: cmp %o2, 0 | 60 | 1: cmp %o2, 0 |
73 | be,pt %XCC, 85f | 61 | be,pt %XCC, 85f |
74 | nop | 62 | nop |
@@ -78,14 +66,15 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | |||
78 | 80: /* 0 < len <= 16 */ | 66 | 80: /* 0 < len <= 16 */ |
79 | andcc %o3, 0x3, %g0 | 67 | andcc %o3, 0x3, %g0 |
80 | bne,pn %XCC, 90f | 68 | bne,pn %XCC, 90f |
81 | sub %o0, %o1, %o3 | 69 | nop |
82 | 70 | ||
83 | 82: | 71 | 82: |
84 | subcc %o2, 4, %o2 | 72 | subcc %o2, 4, %o2 |
85 | EX(lduwa [%o1] %asi, %g1) | 73 | EX(lduwa [%o1] %asi, %g1) |
86 | EX(stwa %g1, [%o1 + %o3] ASI_AIUS) | 74 | EX(stwa %g1, [%o0] %asi) |
75 | add %o1, 4, %o1 | ||
87 | bgu,pt %XCC, 82b | 76 | bgu,pt %XCC, 82b |
88 | add %o1, 4, %o1 | 77 | add %o0, 4, %o0 |
89 | 78 | ||
90 | 85: retl | 79 | 85: retl |
91 | clr %o0 | 80 | clr %o0 |
@@ -94,26 +83,10 @@ ___copy_in_user: /* %o0=dst, %o1=src, %o2=len */ | |||
94 | 90: | 83 | 90: |
95 | subcc %o2, 1, %o2 | 84 | subcc %o2, 1, %o2 |
96 | EX(lduba [%o1] %asi, %g1) | 85 | EX(lduba [%o1] %asi, %g1) |
97 | EX(stba %g1, [%o1 + %o3] ASI_AIUS) | 86 | EX(stba %g1, [%o0] %asi) |
87 | add %o1, 1, %o1 | ||
98 | bgu,pt %XCC, 90b | 88 | bgu,pt %XCC, 90b |
99 | add %o1, 1, %o1 | 89 | add %o0, 1, %o0 |
100 | retl | 90 | retl |
101 | clr %o0 | 91 | clr %o0 |
102 | 92 | ENDPROC(___copy_in_user) | |
103 | .size ___copy_in_user, .-___copy_in_user | ||
104 | |||
105 | /* Act like copy_{to,in}_user(), ie. return zero instead | ||
106 | * of original destination pointer. This is invoked when | ||
107 | * copy_{to,in}_user() finds that %asi is kernel space. | ||
108 | */ | ||
109 | .globl memcpy_user_stub | ||
110 | .type memcpy_user_stub,#function | ||
111 | memcpy_user_stub: | ||
112 | save %sp, -192, %sp | ||
113 | mov %i0, %o0 | ||
114 | mov %i1, %o1 | ||
115 | call memcpy | ||
116 | mov %i2, %o2 | ||
117 | ret | ||
118 | restore %g0, %g0, %o0 | ||
119 | .size memcpy_user_stub, .-memcpy_user_stub | ||
diff --git a/arch/um/drivers/vde_user.c b/arch/um/drivers/vde_user.c index 56533db25343..c5c43253e6ce 100644 --- a/arch/um/drivers/vde_user.c +++ b/arch/um/drivers/vde_user.c | |||
@@ -78,7 +78,7 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init) | |||
78 | { | 78 | { |
79 | struct vde_open_args *args; | 79 | struct vde_open_args *args; |
80 | 80 | ||
81 | vpri->args = kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL); | 81 | vpri->args = uml_kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL); |
82 | if (vpri->args == NULL) { | 82 | if (vpri->args == NULL) { |
83 | printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args " | 83 | printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args " |
84 | "allocation failed"); | 84 | "allocation failed"); |
@@ -91,8 +91,8 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init) | |||
91 | args->group = init->group; | 91 | args->group = init->group; |
92 | args->mode = init->mode ? init->mode : 0700; | 92 | args->mode = init->mode ? init->mode : 0700; |
93 | 93 | ||
94 | args->port ? printk(UM_KERN_INFO "port %d", args->port) : | 94 | args->port ? printk("port %d", args->port) : |
95 | printk(UM_KERN_INFO "undefined port"); | 95 | printk("undefined port"); |
96 | } | 96 | } |
97 | 97 | ||
98 | int vde_user_read(void *conn, void *buf, int len) | 98 | int vde_user_read(void *conn, void *buf, int len) |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f760a22f95dc..5e2919c0ff92 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -5,7 +5,7 @@ mainmenu "Linux Kernel Configuration for x86" | |||
5 | config 64BIT | 5 | config 64BIT |
6 | bool "64-bit kernel" if ARCH = "x86" | 6 | bool "64-bit kernel" if ARCH = "x86" |
7 | default ARCH = "x86_64" | 7 | default ARCH = "x86_64" |
8 | help | 8 | ---help--- |
9 | Say yes to build a 64-bit kernel - formerly known as x86_64 | 9 | Say yes to build a 64-bit kernel - formerly known as x86_64 |
10 | Say no to build a 32-bit kernel - formerly known as i386 | 10 | Say no to build a 32-bit kernel - formerly known as i386 |
11 | 11 | ||
@@ -34,8 +34,8 @@ config X86 | |||
34 | select HAVE_FUNCTION_TRACER | 34 | select HAVE_FUNCTION_TRACER |
35 | select HAVE_FUNCTION_GRAPH_TRACER | 35 | select HAVE_FUNCTION_GRAPH_TRACER |
36 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST | 36 | select HAVE_FUNCTION_TRACE_MCOUNT_TEST |
37 | select HAVE_KVM if ((X86_32 && !X86_VOYAGER && !X86_VISWS && !X86_NUMAQ) || X86_64) | 37 | select HAVE_KVM |
38 | select HAVE_ARCH_KGDB if !X86_VOYAGER | 38 | select HAVE_ARCH_KGDB |
39 | select HAVE_ARCH_TRACEHOOK | 39 | select HAVE_ARCH_TRACEHOOK |
40 | select HAVE_GENERIC_DMA_COHERENT if X86_32 | 40 | select HAVE_GENERIC_DMA_COHERENT if X86_32 |
41 | select HAVE_EFFICIENT_UNALIGNED_ACCESS | 41 | select HAVE_EFFICIENT_UNALIGNED_ACCESS |
@@ -140,11 +140,9 @@ config HAVE_CPUMASK_OF_CPU_MAP | |||
140 | 140 | ||
141 | config ARCH_HIBERNATION_POSSIBLE | 141 | config ARCH_HIBERNATION_POSSIBLE |
142 | def_bool y | 142 | def_bool y |
143 | depends on !SMP || !X86_VOYAGER | ||
144 | 143 | ||
145 | config ARCH_SUSPEND_POSSIBLE | 144 | config ARCH_SUSPEND_POSSIBLE |
146 | def_bool y | 145 | def_bool y |
147 | depends on !X86_VOYAGER | ||
148 | 146 | ||
149 | config ZONE_DMA32 | 147 | config ZONE_DMA32 |
150 | bool | 148 | bool |
@@ -174,11 +172,6 @@ config GENERIC_PENDING_IRQ | |||
174 | depends on GENERIC_HARDIRQS && SMP | 172 | depends on GENERIC_HARDIRQS && SMP |
175 | default y | 173 | default y |
176 | 174 | ||
177 | config X86_SMP | ||
178 | bool | ||
179 | depends on SMP && ((X86_32 && !X86_VOYAGER) || X86_64) | ||
180 | default y | ||
181 | |||
182 | config USE_GENERIC_SMP_HELPERS | 175 | config USE_GENERIC_SMP_HELPERS |
183 | def_bool y | 176 | def_bool y |
184 | depends on SMP | 177 | depends on SMP |
@@ -194,17 +187,11 @@ config X86_64_SMP | |||
194 | config X86_HT | 187 | config X86_HT |
195 | bool | 188 | bool |
196 | depends on SMP | 189 | depends on SMP |
197 | depends on (X86_32 && !X86_VOYAGER) || X86_64 | ||
198 | default y | ||
199 | |||
200 | config X86_BIOS_REBOOT | ||
201 | bool | ||
202 | depends on !X86_VOYAGER | ||
203 | default y | 190 | default y |
204 | 191 | ||
205 | config X86_TRAMPOLINE | 192 | config X86_TRAMPOLINE |
206 | bool | 193 | bool |
207 | depends on X86_SMP || (X86_VOYAGER && SMP) || (64BIT && ACPI_SLEEP) | 194 | depends on SMP || (64BIT && ACPI_SLEEP) |
208 | default y | 195 | default y |
209 | 196 | ||
210 | config X86_32_LAZY_GS | 197 | config X86_32_LAZY_GS |
@@ -248,14 +235,24 @@ config SMP | |||
248 | 235 | ||
249 | If you don't know what to do here, say N. | 236 | If you don't know what to do here, say N. |
250 | 237 | ||
251 | config X86_HAS_BOOT_CPU_ID | 238 | config X86_X2APIC |
252 | def_bool y | 239 | bool "Support x2apic" |
253 | depends on X86_VOYAGER | 240 | depends on X86_LOCAL_APIC && X86_64 |
241 | ---help--- | ||
242 | This enables x2apic support on CPUs that have this feature. | ||
243 | |||
244 | This allows 32-bit apic IDs (so it can support very large systems), | ||
245 | and accesses the local apic via MSRs not via mmio. | ||
246 | |||
247 | ( On certain CPU models you may need to enable INTR_REMAP too, | ||
248 | to get functional x2apic mode. ) | ||
249 | |||
250 | If you don't know what to do here, say N. | ||
254 | 251 | ||
255 | config SPARSE_IRQ | 252 | config SPARSE_IRQ |
256 | bool "Support sparse irq numbering" | 253 | bool "Support sparse irq numbering" |
257 | depends on PCI_MSI || HT_IRQ | 254 | depends on PCI_MSI || HT_IRQ |
258 | help | 255 | ---help--- |
259 | This enables support for sparse irqs. This is useful for distro | 256 | This enables support for sparse irqs. This is useful for distro |
260 | kernels that want to define a high CONFIG_NR_CPUS value but still | 257 | kernels that want to define a high CONFIG_NR_CPUS value but still |
261 | want to have low kernel memory footprint on smaller machines. | 258 | want to have low kernel memory footprint on smaller machines. |
@@ -269,114 +266,140 @@ config NUMA_MIGRATE_IRQ_DESC | |||
269 | bool "Move irq desc when changing irq smp_affinity" | 266 | bool "Move irq desc when changing irq smp_affinity" |
270 | depends on SPARSE_IRQ && NUMA | 267 | depends on SPARSE_IRQ && NUMA |
271 | default n | 268 | default n |
272 | help | 269 | ---help--- |
273 | This enables moving irq_desc to cpu/node that irq will use handled. | 270 | This enables moving irq_desc to cpu/node that irq will use handled. |
274 | 271 | ||
275 | If you don't know what to do here, say N. | 272 | If you don't know what to do here, say N. |
276 | 273 | ||
277 | config X86_FIND_SMP_CONFIG | ||
278 | def_bool y | ||
279 | depends on X86_MPPARSE || X86_VOYAGER | ||
280 | |||
281 | config X86_MPPARSE | 274 | config X86_MPPARSE |
282 | bool "Enable MPS table" if ACPI | 275 | bool "Enable MPS table" if ACPI |
283 | default y | 276 | default y |
284 | depends on X86_LOCAL_APIC | 277 | depends on X86_LOCAL_APIC |
285 | help | 278 | ---help--- |
286 | For old smp systems that do not have proper acpi support. Newer systems | 279 | For old smp systems that do not have proper acpi support. Newer systems |
287 | (esp with 64bit cpus) with acpi support, MADT and DSDT will override it | 280 | (esp with 64bit cpus) with acpi support, MADT and DSDT will override it |
288 | 281 | ||
289 | choice | 282 | config X86_BIGSMP |
290 | prompt "Subarchitecture Type" | 283 | bool "Support for big SMP systems with more than 8 CPUs" |
291 | default X86_PC | 284 | depends on X86_32 && SMP |
285 | ---help--- | ||
286 | This option is needed for the systems that have more than 8 CPUs | ||
292 | 287 | ||
293 | config X86_PC | 288 | if X86_32 |
294 | bool "PC-compatible" | 289 | config X86_EXTENDED_PLATFORM |
295 | help | 290 | bool "Support for extended (non-PC) x86 platforms" |
296 | Choose this option if your computer is a standard PC or compatible. | 291 | default y |
292 | ---help--- | ||
293 | If you disable this option then the kernel will only support | ||
294 | standard PC platforms. (which covers the vast majority of | ||
295 | systems out there.) | ||
296 | |||
297 | If you enable this option then you'll be able to select support | ||
298 | for the following (non-PC) 32 bit x86 platforms: | ||
299 | AMD Elan | ||
300 | NUMAQ (IBM/Sequent) | ||
301 | RDC R-321x SoC | ||
302 | SGI 320/540 (Visual Workstation) | ||
303 | Summit/EXA (IBM x440) | ||
304 | Unisys ES7000 IA32 series | ||
305 | |||
306 | If you have one of these systems, or if you want to build a | ||
307 | generic distribution kernel, say Y here - otherwise say N. | ||
308 | endif | ||
309 | |||
310 | if X86_64 | ||
311 | config X86_EXTENDED_PLATFORM | ||
312 | bool "Support for extended (non-PC) x86 platforms" | ||
313 | default y | ||
314 | ---help--- | ||
315 | If you disable this option then the kernel will only support | ||
316 | standard PC platforms. (which covers the vast majority of | ||
317 | systems out there.) | ||
318 | |||
319 | If you enable this option then you'll be able to select support | ||
320 | for the following (non-PC) 64 bit x86 platforms: | ||
321 | ScaleMP vSMP | ||
322 | SGI Ultraviolet | ||
323 | |||
324 | If you have one of these systems, or if you want to build a | ||
325 | generic distribution kernel, say Y here - otherwise say N. | ||
326 | endif | ||
327 | # This is an alphabetically sorted list of 64 bit extended platforms | ||
328 | # Please maintain the alphabetic order if and when there are additions | ||
329 | |||
330 | config X86_VSMP | ||
331 | bool "ScaleMP vSMP" | ||
332 | select PARAVIRT | ||
333 | depends on X86_64 && PCI | ||
334 | depends on X86_EXTENDED_PLATFORM | ||
335 | ---help--- | ||
336 | Support for ScaleMP vSMP systems. Say 'Y' here if this kernel is | ||
337 | supposed to run on these EM64T-based machines. Only choose this option | ||
338 | if you have one of these machines. | ||
339 | |||
340 | config X86_UV | ||
341 | bool "SGI Ultraviolet" | ||
342 | depends on X86_64 | ||
343 | depends on X86_EXTENDED_PLATFORM | ||
344 | select X86_X2APIC | ||
345 | ---help--- | ||
346 | This option is needed in order to support SGI Ultraviolet systems. | ||
347 | If you don't have one of these, you should say N here. | ||
348 | |||
349 | # Following is an alphabetically sorted list of 32 bit extended platforms | ||
350 | # Please maintain the alphabetic order if and when there are additions | ||
297 | 351 | ||
298 | config X86_ELAN | 352 | config X86_ELAN |
299 | bool "AMD Elan" | 353 | bool "AMD Elan" |
300 | depends on X86_32 | 354 | depends on X86_32 |
301 | help | 355 | depends on X86_EXTENDED_PLATFORM |
356 | ---help--- | ||
302 | Select this for an AMD Elan processor. | 357 | Select this for an AMD Elan processor. |
303 | 358 | ||
304 | Do not use this option for K6/Athlon/Opteron processors! | 359 | Do not use this option for K6/Athlon/Opteron processors! |
305 | 360 | ||
306 | If unsure, choose "PC-compatible" instead. | 361 | If unsure, choose "PC-compatible" instead. |
307 | 362 | ||
308 | config X86_VOYAGER | 363 | config X86_RDC321X |
309 | bool "Voyager (NCR)" | 364 | bool "RDC R-321x SoC" |
310 | depends on X86_32 && (SMP || BROKEN) && !PCI | ||
311 | help | ||
312 | Voyager is an MCA-based 32-way capable SMP architecture proprietary | ||
313 | to NCR Corp. Machine classes 345x/35xx/4100/51xx are Voyager-based. | ||
314 | |||
315 | *** WARNING *** | ||
316 | |||
317 | If you do not specifically know you have a Voyager based machine, | ||
318 | say N here, otherwise the kernel you build will not be bootable. | ||
319 | |||
320 | config X86_GENERICARCH | ||
321 | bool "Generic architecture" | ||
322 | depends on X86_32 | 365 | depends on X86_32 |
323 | help | 366 | depends on X86_EXTENDED_PLATFORM |
324 | This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default | 367 | select M486 |
368 | select X86_REBOOTFIXUPS | ||
369 | ---help--- | ||
370 | This option is needed for RDC R-321x system-on-chip, also known | ||
371 | as R-8610-(G). | ||
372 | If you don't have one of these chips, you should say N here. | ||
373 | |||
374 | config X86_32_NON_STANDARD | ||
375 | bool "Support non-standard 32-bit SMP architectures" | ||
376 | depends on X86_32 && SMP | ||
377 | depends on X86_EXTENDED_PLATFORM | ||
378 | ---help--- | ||
379 | This option compiles in the NUMAQ, Summit, bigsmp, ES7000, default | ||
325 | subarchitectures. It is intended for a generic binary kernel. | 380 | subarchitectures. It is intended for a generic binary kernel. |
326 | if you select them all, kernel will probe it one by one. and will | 381 | if you select them all, kernel will probe it one by one. and will |
327 | fallback to default. | 382 | fallback to default. |
328 | 383 | ||
329 | if X86_GENERICARCH | 384 | # Alphabetically sorted list of Non standard 32 bit platforms |
330 | 385 | ||
331 | config X86_NUMAQ | 386 | config X86_NUMAQ |
332 | bool "NUMAQ (IBM/Sequent)" | 387 | bool "NUMAQ (IBM/Sequent)" |
333 | depends on SMP && X86_32 && PCI && X86_MPPARSE | 388 | depends on X86_32_NON_STANDARD |
334 | select NUMA | 389 | select NUMA |
335 | help | 390 | select X86_MPPARSE |
391 | ---help--- | ||
336 | This option is used for getting Linux to run on a NUMAQ (IBM/Sequent) | 392 | This option is used for getting Linux to run on a NUMAQ (IBM/Sequent) |
337 | NUMA multiquad box. This changes the way that processors are | 393 | NUMA multiquad box. This changes the way that processors are |
338 | bootstrapped, and uses Clustered Logical APIC addressing mode instead | 394 | bootstrapped, and uses Clustered Logical APIC addressing mode instead |
339 | of Flat Logical. You will need a new lynxer.elf file to flash your | 395 | of Flat Logical. You will need a new lynxer.elf file to flash your |
340 | firmware with - send email to <Martin.Bligh@us.ibm.com>. | 396 | firmware with - send email to <Martin.Bligh@us.ibm.com>. |
341 | 397 | ||
342 | config X86_SUMMIT | ||
343 | bool "Summit/EXA (IBM x440)" | ||
344 | depends on X86_32 && SMP | ||
345 | help | ||
346 | This option is needed for IBM systems that use the Summit/EXA chipset. | ||
347 | In particular, it is needed for the x440. | ||
348 | |||
349 | config X86_ES7000 | ||
350 | bool "Support for Unisys ES7000 IA32 series" | ||
351 | depends on X86_32 && SMP | ||
352 | help | ||
353 | Support for Unisys ES7000 systems. Say 'Y' here if this kernel is | ||
354 | supposed to run on an IA32-based Unisys ES7000 system. | ||
355 | |||
356 | config X86_BIGSMP | ||
357 | bool "Support for big SMP systems with more than 8 CPUs" | ||
358 | depends on X86_32 && SMP | ||
359 | help | ||
360 | This option is needed for the systems that have more than 8 CPUs | ||
361 | and if the system is not of any sub-arch type above. | ||
362 | |||
363 | endif | ||
364 | |||
365 | config X86_VSMP | ||
366 | bool "Support for ScaleMP vSMP" | ||
367 | select PARAVIRT | ||
368 | depends on X86_64 && PCI | ||
369 | help | ||
370 | Support for ScaleMP vSMP systems. Say 'Y' here if this kernel is | ||
371 | supposed to run on these EM64T-based machines. Only choose this option | ||
372 | if you have one of these machines. | ||
373 | |||
374 | endchoice | ||
375 | |||
376 | config X86_VISWS | 398 | config X86_VISWS |
377 | bool "SGI 320/540 (Visual Workstation)" | 399 | bool "SGI 320/540 (Visual Workstation)" |
378 | depends on X86_32 && PCI && !X86_VOYAGER && X86_MPPARSE && PCI_GODIRECT | 400 | depends on X86_32 && PCI && X86_MPPARSE && PCI_GODIRECT |
379 | help | 401 | depends on X86_32_NON_STANDARD |
402 | ---help--- | ||
380 | The SGI Visual Workstation series is an IA32-based workstation | 403 | The SGI Visual Workstation series is an IA32-based workstation |
381 | based on SGI systems chips with some legacy PC hardware attached. | 404 | based on SGI systems chips with some legacy PC hardware attached. |
382 | 405 | ||
@@ -385,28 +408,25 @@ config X86_VISWS | |||
385 | A kernel compiled for the Visual Workstation will run on general | 408 | A kernel compiled for the Visual Workstation will run on general |
386 | PCs as well. See <file:Documentation/sgi-visws.txt> for details. | 409 | PCs as well. See <file:Documentation/sgi-visws.txt> for details. |
387 | 410 | ||
388 | config X86_RDC321X | 411 | config X86_SUMMIT |
389 | bool "RDC R-321x SoC" | 412 | bool "Summit/EXA (IBM x440)" |
390 | depends on X86_32 | 413 | depends on X86_32_NON_STANDARD |
391 | select M486 | 414 | ---help--- |
392 | select X86_REBOOTFIXUPS | 415 | This option is needed for IBM systems that use the Summit/EXA chipset. |
393 | help | 416 | In particular, it is needed for the x440. |
394 | This option is needed for RDC R-321x system-on-chip, also known | ||
395 | as R-8610-(G). | ||
396 | If you don't have one of these chips, you should say N here. | ||
397 | 417 | ||
398 | config X86_UV | 418 | config X86_ES7000 |
399 | bool "SGI Ultraviolet" | 419 | bool "Unisys ES7000 IA32 series" |
400 | depends on X86_64 | 420 | depends on X86_32_NON_STANDARD && X86_BIGSMP |
401 | help | 421 | ---help--- |
402 | This option is needed in order to support SGI Ultraviolet systems. | 422 | Support for Unisys ES7000 systems. Say 'Y' here if this kernel is |
403 | If you don't have one of these, you should say N here. | 423 | supposed to run on an IA32-based Unisys ES7000 system. |
404 | 424 | ||
405 | config SCHED_OMIT_FRAME_POINTER | 425 | config SCHED_OMIT_FRAME_POINTER |
406 | def_bool y | 426 | def_bool y |
407 | prompt "Single-depth WCHAN output" | 427 | prompt "Single-depth WCHAN output" |
408 | depends on X86 | 428 | depends on X86 |
409 | help | 429 | ---help--- |
410 | Calculate simpler /proc/<PID>/wchan values. If this option | 430 | Calculate simpler /proc/<PID>/wchan values. If this option |
411 | is disabled then wchan values will recurse back to the | 431 | is disabled then wchan values will recurse back to the |
412 | caller function. This provides more accurate wchan values, | 432 | caller function. This provides more accurate wchan values, |
@@ -416,7 +436,7 @@ config SCHED_OMIT_FRAME_POINTER | |||
416 | 436 | ||
417 | menuconfig PARAVIRT_GUEST | 437 | menuconfig PARAVIRT_GUEST |
418 | bool "Paravirtualized guest support" | 438 | bool "Paravirtualized guest support" |
419 | help | 439 | ---help--- |
420 | Say Y here to get to see options related to running Linux under | 440 | Say Y here to get to see options related to running Linux under |
421 | various hypervisors. This option alone does not add any kernel code. | 441 | various hypervisors. This option alone does not add any kernel code. |
422 | 442 | ||
@@ -430,8 +450,7 @@ config VMI | |||
430 | bool "VMI Guest support" | 450 | bool "VMI Guest support" |
431 | select PARAVIRT | 451 | select PARAVIRT |
432 | depends on X86_32 | 452 | depends on X86_32 |
433 | depends on !X86_VOYAGER | 453 | ---help--- |
434 | help | ||
435 | VMI provides a paravirtualized interface to the VMware ESX server | 454 | VMI provides a paravirtualized interface to the VMware ESX server |
436 | (it could be used by other hypervisors in theory too, but is not | 455 | (it could be used by other hypervisors in theory too, but is not |
437 | at the moment), by linking the kernel to a GPL-ed ROM module | 456 | at the moment), by linking the kernel to a GPL-ed ROM module |
@@ -441,8 +460,7 @@ config KVM_CLOCK | |||
441 | bool "KVM paravirtualized clock" | 460 | bool "KVM paravirtualized clock" |
442 | select PARAVIRT | 461 | select PARAVIRT |
443 | select PARAVIRT_CLOCK | 462 | select PARAVIRT_CLOCK |
444 | depends on !X86_VOYAGER | 463 | ---help--- |
445 | help | ||
446 | Turning on this option will allow you to run a paravirtualized clock | 464 | Turning on this option will allow you to run a paravirtualized clock |
447 | when running over the KVM hypervisor. Instead of relying on a PIT | 465 | when running over the KVM hypervisor. Instead of relying on a PIT |
448 | (or probably other) emulation by the underlying device model, the host | 466 | (or probably other) emulation by the underlying device model, the host |
@@ -452,17 +470,15 @@ config KVM_CLOCK | |||
452 | config KVM_GUEST | 470 | config KVM_GUEST |
453 | bool "KVM Guest support" | 471 | bool "KVM Guest support" |
454 | select PARAVIRT | 472 | select PARAVIRT |
455 | depends on !X86_VOYAGER | 473 | ---help--- |
456 | help | 474 | This option enables various optimizations for running under the KVM |
457 | This option enables various optimizations for running under the KVM | 475 | hypervisor. |
458 | hypervisor. | ||
459 | 476 | ||
460 | source "arch/x86/lguest/Kconfig" | 477 | source "arch/x86/lguest/Kconfig" |
461 | 478 | ||
462 | config PARAVIRT | 479 | config PARAVIRT |
463 | bool "Enable paravirtualization code" | 480 | bool "Enable paravirtualization code" |
464 | depends on !X86_VOYAGER | 481 | ---help--- |
465 | help | ||
466 | This changes the kernel so it can modify itself when it is run | 482 | This changes the kernel so it can modify itself when it is run |
467 | under a hypervisor, potentially improving performance significantly | 483 | under a hypervisor, potentially improving performance significantly |
468 | over full virtualization. However, when run without a hypervisor | 484 | over full virtualization. However, when run without a hypervisor |
@@ -475,51 +491,51 @@ config PARAVIRT_CLOCK | |||
475 | endif | 491 | endif |
476 | 492 | ||
477 | config PARAVIRT_DEBUG | 493 | config PARAVIRT_DEBUG |
478 | bool "paravirt-ops debugging" | 494 | bool "paravirt-ops debugging" |
479 | depends on PARAVIRT && DEBUG_KERNEL | 495 | depends on PARAVIRT && DEBUG_KERNEL |
480 | help | 496 | ---help--- |
481 | Enable to debug paravirt_ops internals. Specifically, BUG if | 497 | Enable to debug paravirt_ops internals. Specifically, BUG if |
482 | a paravirt_op is missing when it is called. | 498 | a paravirt_op is missing when it is called. |
483 | 499 | ||
484 | config MEMTEST | 500 | config MEMTEST |
485 | bool "Memtest" | 501 | bool "Memtest" |
486 | help | 502 | ---help--- |
487 | This option adds a kernel parameter 'memtest', which allows memtest | 503 | This option adds a kernel parameter 'memtest', which allows memtest |
488 | to be set. | 504 | to be set. |
489 | memtest=0, mean disabled; -- default | 505 | memtest=0, mean disabled; -- default |
490 | memtest=1, mean do 1 test pattern; | 506 | memtest=1, mean do 1 test pattern; |
491 | ... | 507 | ... |
492 | memtest=4, mean do 4 test patterns. | 508 | memtest=4, mean do 4 test patterns. |
493 | If you are unsure how to answer this question, answer N. | 509 | If you are unsure how to answer this question, answer N. |
494 | 510 | ||
495 | config X86_SUMMIT_NUMA | 511 | config X86_SUMMIT_NUMA |
496 | def_bool y | 512 | def_bool y |
497 | depends on X86_32 && NUMA && X86_GENERICARCH | 513 | depends on X86_32 && NUMA && X86_32_NON_STANDARD |
498 | 514 | ||
499 | config X86_CYCLONE_TIMER | 515 | config X86_CYCLONE_TIMER |
500 | def_bool y | 516 | def_bool y |
501 | depends on X86_GENERICARCH | 517 | depends on X86_32_NON_STANDARD |
502 | 518 | ||
503 | source "arch/x86/Kconfig.cpu" | 519 | source "arch/x86/Kconfig.cpu" |
504 | 520 | ||
505 | config HPET_TIMER | 521 | config HPET_TIMER |
506 | def_bool X86_64 | 522 | def_bool X86_64 |
507 | prompt "HPET Timer Support" if X86_32 | 523 | prompt "HPET Timer Support" if X86_32 |
508 | help | 524 | ---help--- |
509 | Use the IA-PC HPET (High Precision Event Timer) to manage | 525 | Use the IA-PC HPET (High Precision Event Timer) to manage |
510 | time in preference to the PIT and RTC, if a HPET is | 526 | time in preference to the PIT and RTC, if a HPET is |
511 | present. | 527 | present. |
512 | HPET is the next generation timer replacing legacy 8254s. | 528 | HPET is the next generation timer replacing legacy 8254s. |
513 | The HPET provides a stable time base on SMP | 529 | The HPET provides a stable time base on SMP |
514 | systems, unlike the TSC, but it is more expensive to access, | 530 | systems, unlike the TSC, but it is more expensive to access, |
515 | as it is off-chip. You can find the HPET spec at | 531 | as it is off-chip. You can find the HPET spec at |
516 | <http://www.intel.com/hardwaredesign/hpetspec_1.pdf>. | 532 | <http://www.intel.com/hardwaredesign/hpetspec_1.pdf>. |
517 | 533 | ||
518 | You can safely choose Y here. However, HPET will only be | 534 | You can safely choose Y here. However, HPET will only be |
519 | activated if the platform and the BIOS support this feature. | 535 | activated if the platform and the BIOS support this feature. |
520 | Otherwise the 8254 will be used for timing services. | 536 | Otherwise the 8254 will be used for timing services. |
521 | 537 | ||
522 | Choose N to continue using the legacy 8254 timer. | 538 | Choose N to continue using the legacy 8254 timer. |
523 | 539 | ||
524 | config HPET_EMULATE_RTC | 540 | config HPET_EMULATE_RTC |
525 | def_bool y | 541 | def_bool y |
@@ -530,7 +546,7 @@ config HPET_EMULATE_RTC | |||
530 | config DMI | 546 | config DMI |
531 | default y | 547 | default y |
532 | bool "Enable DMI scanning" if EMBEDDED | 548 | bool "Enable DMI scanning" if EMBEDDED |
533 | help | 549 | ---help--- |
534 | Enabled scanning of DMI to identify machine quirks. Say Y | 550 | Enabled scanning of DMI to identify machine quirks. Say Y |
535 | here unless you have verified that your setup is not | 551 | here unless you have verified that your setup is not |
536 | affected by entries in the DMI blacklist. Required by PNP | 552 | affected by entries in the DMI blacklist. Required by PNP |
@@ -542,7 +558,7 @@ config GART_IOMMU | |||
542 | select SWIOTLB | 558 | select SWIOTLB |
543 | select AGP | 559 | select AGP |
544 | depends on X86_64 && PCI | 560 | depends on X86_64 && PCI |
545 | help | 561 | ---help--- |
546 | Support for full DMA access of devices with 32bit memory access only | 562 | Support for full DMA access of devices with 32bit memory access only |
547 | on systems with more than 3GB. This is usually needed for USB, | 563 | on systems with more than 3GB. This is usually needed for USB, |
548 | sound, many IDE/SATA chipsets and some other devices. | 564 | sound, many IDE/SATA chipsets and some other devices. |
@@ -557,7 +573,7 @@ config CALGARY_IOMMU | |||
557 | bool "IBM Calgary IOMMU support" | 573 | bool "IBM Calgary IOMMU support" |
558 | select SWIOTLB | 574 | select SWIOTLB |
559 | depends on X86_64 && PCI && EXPERIMENTAL | 575 | depends on X86_64 && PCI && EXPERIMENTAL |
560 | help | 576 | ---help--- |
561 | Support for hardware IOMMUs in IBM's xSeries x366 and x460 | 577 | Support for hardware IOMMUs in IBM's xSeries x366 and x460 |
562 | systems. Needed to run systems with more than 3GB of memory | 578 | systems. Needed to run systems with more than 3GB of memory |
563 | properly with 32-bit PCI devices that do not support DAC | 579 | properly with 32-bit PCI devices that do not support DAC |
@@ -575,7 +591,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT | |||
575 | def_bool y | 591 | def_bool y |
576 | prompt "Should Calgary be enabled by default?" | 592 | prompt "Should Calgary be enabled by default?" |
577 | depends on CALGARY_IOMMU | 593 | depends on CALGARY_IOMMU |
578 | help | 594 | ---help--- |
579 | Should Calgary be enabled by default? if you choose 'y', Calgary | 595 | Should Calgary be enabled by default? if you choose 'y', Calgary |
580 | will be used (if it exists). If you choose 'n', Calgary will not be | 596 | will be used (if it exists). If you choose 'n', Calgary will not be |
581 | used even if it exists. If you choose 'n' and would like to use | 597 | used even if it exists. If you choose 'n' and would like to use |
@@ -587,7 +603,7 @@ config AMD_IOMMU | |||
587 | select SWIOTLB | 603 | select SWIOTLB |
588 | select PCI_MSI | 604 | select PCI_MSI |
589 | depends on X86_64 && PCI && ACPI | 605 | depends on X86_64 && PCI && ACPI |
590 | help | 606 | ---help--- |
591 | With this option you can enable support for AMD IOMMU hardware in | 607 | With this option you can enable support for AMD IOMMU hardware in |
592 | your system. An IOMMU is a hardware component which provides | 608 | your system. An IOMMU is a hardware component which provides |
593 | remapping of DMA memory accesses from devices. With an AMD IOMMU you | 609 | remapping of DMA memory accesses from devices. With an AMD IOMMU you |
@@ -602,7 +618,7 @@ config AMD_IOMMU_STATS | |||
602 | bool "Export AMD IOMMU statistics to debugfs" | 618 | bool "Export AMD IOMMU statistics to debugfs" |
603 | depends on AMD_IOMMU | 619 | depends on AMD_IOMMU |
604 | select DEBUG_FS | 620 | select DEBUG_FS |
605 | help | 621 | ---help--- |
606 | This option enables code in the AMD IOMMU driver to collect various | 622 | This option enables code in the AMD IOMMU driver to collect various |
607 | statistics about whats happening in the driver and exports that | 623 | statistics about whats happening in the driver and exports that |
608 | information to userspace via debugfs. | 624 | information to userspace via debugfs. |
@@ -611,7 +627,7 @@ config AMD_IOMMU_STATS | |||
611 | # need this always selected by IOMMU for the VIA workaround | 627 | # need this always selected by IOMMU for the VIA workaround |
612 | config SWIOTLB | 628 | config SWIOTLB |
613 | def_bool y if X86_64 | 629 | def_bool y if X86_64 |
614 | help | 630 | ---help--- |
615 | Support for software bounce buffers used on x86-64 systems | 631 | Support for software bounce buffers used on x86-64 systems |
616 | which don't have a hardware IOMMU (e.g. the current generation | 632 | which don't have a hardware IOMMU (e.g. the current generation |
617 | of Intel's x86-64 CPUs). Using this PCI devices which can only | 633 | of Intel's x86-64 CPUs). Using this PCI devices which can only |
@@ -629,7 +645,7 @@ config MAXSMP | |||
629 | depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL | 645 | depends on X86_64 && SMP && DEBUG_KERNEL && EXPERIMENTAL |
630 | select CPUMASK_OFFSTACK | 646 | select CPUMASK_OFFSTACK |
631 | default n | 647 | default n |
632 | help | 648 | ---help--- |
633 | Configure maximum number of CPUS and NUMA Nodes for this architecture. | 649 | Configure maximum number of CPUS and NUMA Nodes for this architecture. |
634 | If unsure, say N. | 650 | If unsure, say N. |
635 | 651 | ||
@@ -640,7 +656,7 @@ config NR_CPUS | |||
640 | default "4096" if MAXSMP | 656 | default "4096" if MAXSMP |
641 | default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000) | 657 | default "32" if SMP && (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP || X86_ES7000) |
642 | default "8" if SMP | 658 | default "8" if SMP |
643 | help | 659 | ---help--- |
644 | This allows you to specify the maximum number of CPUs which this | 660 | This allows you to specify the maximum number of CPUs which this |
645 | kernel will support. The maximum supported value is 512 and the | 661 | kernel will support. The maximum supported value is 512 and the |
646 | minimum value which makes sense is 2. | 662 | minimum value which makes sense is 2. |
@@ -651,7 +667,7 @@ config NR_CPUS | |||
651 | config SCHED_SMT | 667 | config SCHED_SMT |
652 | bool "SMT (Hyperthreading) scheduler support" | 668 | bool "SMT (Hyperthreading) scheduler support" |
653 | depends on X86_HT | 669 | depends on X86_HT |
654 | help | 670 | ---help--- |
655 | SMT scheduler support improves the CPU scheduler's decision making | 671 | SMT scheduler support improves the CPU scheduler's decision making |
656 | when dealing with Intel Pentium 4 chips with HyperThreading at a | 672 | when dealing with Intel Pentium 4 chips with HyperThreading at a |
657 | cost of slightly increased overhead in some places. If unsure say | 673 | cost of slightly increased overhead in some places. If unsure say |
@@ -661,7 +677,7 @@ config SCHED_MC | |||
661 | def_bool y | 677 | def_bool y |
662 | prompt "Multi-core scheduler support" | 678 | prompt "Multi-core scheduler support" |
663 | depends on X86_HT | 679 | depends on X86_HT |
664 | help | 680 | ---help--- |
665 | Multi-core scheduler support improves the CPU scheduler's decision | 681 | Multi-core scheduler support improves the CPU scheduler's decision |
666 | making when dealing with multi-core CPU chips at a cost of slightly | 682 | making when dealing with multi-core CPU chips at a cost of slightly |
667 | increased overhead in some places. If unsure say N here. | 683 | increased overhead in some places. If unsure say N here. |
@@ -670,8 +686,8 @@ source "kernel/Kconfig.preempt" | |||
670 | 686 | ||
671 | config X86_UP_APIC | 687 | config X86_UP_APIC |
672 | bool "Local APIC support on uniprocessors" | 688 | bool "Local APIC support on uniprocessors" |
673 | depends on X86_32 && !SMP && !(X86_VOYAGER || X86_GENERICARCH) | 689 | depends on X86_32 && !SMP && !X86_32_NON_STANDARD |
674 | help | 690 | ---help--- |
675 | A local APIC (Advanced Programmable Interrupt Controller) is an | 691 | A local APIC (Advanced Programmable Interrupt Controller) is an |
676 | integrated interrupt controller in the CPU. If you have a single-CPU | 692 | integrated interrupt controller in the CPU. If you have a single-CPU |
677 | system which has a processor with a local APIC, you can say Y here to | 693 | system which has a processor with a local APIC, you can say Y here to |
@@ -684,7 +700,7 @@ config X86_UP_APIC | |||
684 | config X86_UP_IOAPIC | 700 | config X86_UP_IOAPIC |
685 | bool "IO-APIC support on uniprocessors" | 701 | bool "IO-APIC support on uniprocessors" |
686 | depends on X86_UP_APIC | 702 | depends on X86_UP_APIC |
687 | help | 703 | ---help--- |
688 | An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an | 704 | An IO-APIC (I/O Advanced Programmable Interrupt Controller) is an |
689 | SMP-capable replacement for PC-style interrupt controllers. Most | 705 | SMP-capable replacement for PC-style interrupt controllers. Most |
690 | SMP systems and many recent uniprocessor systems have one. | 706 | SMP systems and many recent uniprocessor systems have one. |
@@ -695,11 +711,11 @@ config X86_UP_IOAPIC | |||
695 | 711 | ||
696 | config X86_LOCAL_APIC | 712 | config X86_LOCAL_APIC |
697 | def_bool y | 713 | def_bool y |
698 | depends on X86_64 || (X86_32 && (X86_UP_APIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH)) | 714 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC |
699 | 715 | ||
700 | config X86_IO_APIC | 716 | config X86_IO_APIC |
701 | def_bool y | 717 | def_bool y |
702 | depends on X86_64 || (X86_32 && (X86_UP_IOAPIC || (SMP && !X86_VOYAGER) || X86_GENERICARCH)) | 718 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC |
703 | 719 | ||
704 | config X86_VISWS_APIC | 720 | config X86_VISWS_APIC |
705 | def_bool y | 721 | def_bool y |
@@ -709,7 +725,7 @@ config X86_REROUTE_FOR_BROKEN_BOOT_IRQS | |||
709 | bool "Reroute for broken boot IRQs" | 725 | bool "Reroute for broken boot IRQs" |
710 | default n | 726 | default n |
711 | depends on X86_IO_APIC | 727 | depends on X86_IO_APIC |
712 | help | 728 | ---help--- |
713 | This option enables a workaround that fixes a source of | 729 | This option enables a workaround that fixes a source of |
714 | spurious interrupts. This is recommended when threaded | 730 | spurious interrupts. This is recommended when threaded |
715 | interrupt handling is used on systems where the generation of | 731 | interrupt handling is used on systems where the generation of |
@@ -731,7 +747,6 @@ config X86_REROUTE_FOR_BROKEN_BOOT_IRQS | |||
731 | 747 | ||
732 | config X86_MCE | 748 | config X86_MCE |
733 | bool "Machine Check Exception" | 749 | bool "Machine Check Exception" |
734 | depends on !X86_VOYAGER | ||
735 | ---help--- | 750 | ---help--- |
736 | Machine Check Exception support allows the processor to notify the | 751 | Machine Check Exception support allows the processor to notify the |
737 | kernel if it detects a problem (e.g. overheating, component failure). | 752 | kernel if it detects a problem (e.g. overheating, component failure). |
@@ -750,7 +765,7 @@ config X86_MCE_INTEL | |||
750 | def_bool y | 765 | def_bool y |
751 | prompt "Intel MCE features" | 766 | prompt "Intel MCE features" |
752 | depends on X86_64 && X86_MCE && X86_LOCAL_APIC | 767 | depends on X86_64 && X86_MCE && X86_LOCAL_APIC |
753 | help | 768 | ---help--- |
754 | Additional support for intel specific MCE features such as | 769 | Additional support for intel specific MCE features such as |
755 | the thermal monitor. | 770 | the thermal monitor. |
756 | 771 | ||
@@ -758,14 +773,14 @@ config X86_MCE_AMD | |||
758 | def_bool y | 773 | def_bool y |
759 | prompt "AMD MCE features" | 774 | prompt "AMD MCE features" |
760 | depends on X86_64 && X86_MCE && X86_LOCAL_APIC | 775 | depends on X86_64 && X86_MCE && X86_LOCAL_APIC |
761 | help | 776 | ---help--- |
762 | Additional support for AMD specific MCE features such as | 777 | Additional support for AMD specific MCE features such as |
763 | the DRAM Error Threshold. | 778 | the DRAM Error Threshold. |
764 | 779 | ||
765 | config X86_MCE_NONFATAL | 780 | config X86_MCE_NONFATAL |
766 | tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4" | 781 | tristate "Check for non-fatal errors on AMD Athlon/Duron / Intel Pentium 4" |
767 | depends on X86_32 && X86_MCE | 782 | depends on X86_32 && X86_MCE |
768 | help | 783 | ---help--- |
769 | Enabling this feature starts a timer that triggers every 5 seconds which | 784 | Enabling this feature starts a timer that triggers every 5 seconds which |
770 | will look at the machine check registers to see if anything happened. | 785 | will look at the machine check registers to see if anything happened. |
771 | Non-fatal problems automatically get corrected (but still logged). | 786 | Non-fatal problems automatically get corrected (but still logged). |
@@ -778,7 +793,7 @@ config X86_MCE_NONFATAL | |||
778 | config X86_MCE_P4THERMAL | 793 | config X86_MCE_P4THERMAL |
779 | bool "check for P4 thermal throttling interrupt." | 794 | bool "check for P4 thermal throttling interrupt." |
780 | depends on X86_32 && X86_MCE && (X86_UP_APIC || SMP) | 795 | depends on X86_32 && X86_MCE && (X86_UP_APIC || SMP) |
781 | help | 796 | ---help--- |
782 | Enabling this feature will cause a message to be printed when the P4 | 797 | Enabling this feature will cause a message to be printed when the P4 |
783 | enters thermal throttling. | 798 | enters thermal throttling. |
784 | 799 | ||
@@ -786,11 +801,11 @@ config VM86 | |||
786 | bool "Enable VM86 support" if EMBEDDED | 801 | bool "Enable VM86 support" if EMBEDDED |
787 | default y | 802 | default y |
788 | depends on X86_32 | 803 | depends on X86_32 |
789 | help | 804 | ---help--- |
790 | This option is required by programs like DOSEMU to run 16-bit legacy | 805 | This option is required by programs like DOSEMU to run 16-bit legacy |
791 | code on X86 processors. It also may be needed by software like | 806 | code on X86 processors. It also may be needed by software like |
792 | XFree86 to initialize some video cards via BIOS. Disabling this | 807 | XFree86 to initialize some video cards via BIOS. Disabling this |
793 | option saves about 6k. | 808 | option saves about 6k. |
794 | 809 | ||
795 | config TOSHIBA | 810 | config TOSHIBA |
796 | tristate "Toshiba Laptop support" | 811 | tristate "Toshiba Laptop support" |
@@ -864,33 +879,33 @@ config MICROCODE | |||
864 | module will be called microcode. | 879 | module will be called microcode. |
865 | 880 | ||
866 | config MICROCODE_INTEL | 881 | config MICROCODE_INTEL |
867 | bool "Intel microcode patch loading support" | 882 | bool "Intel microcode patch loading support" |
868 | depends on MICROCODE | 883 | depends on MICROCODE |
869 | default MICROCODE | 884 | default MICROCODE |
870 | select FW_LOADER | 885 | select FW_LOADER |
871 | --help--- | 886 | ---help--- |
872 | This options enables microcode patch loading support for Intel | 887 | This options enables microcode patch loading support for Intel |
873 | processors. | 888 | processors. |
874 | 889 | ||
875 | For latest news and information on obtaining all the required | 890 | For latest news and information on obtaining all the required |
876 | Intel ingredients for this driver, check: | 891 | Intel ingredients for this driver, check: |
877 | <http://www.urbanmyth.org/microcode/>. | 892 | <http://www.urbanmyth.org/microcode/>. |
878 | 893 | ||
879 | config MICROCODE_AMD | 894 | config MICROCODE_AMD |
880 | bool "AMD microcode patch loading support" | 895 | bool "AMD microcode patch loading support" |
881 | depends on MICROCODE | 896 | depends on MICROCODE |
882 | select FW_LOADER | 897 | select FW_LOADER |
883 | --help--- | 898 | ---help--- |
884 | If you select this option, microcode patch loading support for AMD | 899 | If you select this option, microcode patch loading support for AMD |
885 | processors will be enabled. | 900 | processors will be enabled. |
886 | 901 | ||
887 | config MICROCODE_OLD_INTERFACE | 902 | config MICROCODE_OLD_INTERFACE |
888 | def_bool y | 903 | def_bool y |
889 | depends on MICROCODE | 904 | depends on MICROCODE |
890 | 905 | ||
891 | config X86_MSR | 906 | config X86_MSR |
892 | tristate "/dev/cpu/*/msr - Model-specific register support" | 907 | tristate "/dev/cpu/*/msr - Model-specific register support" |
893 | help | 908 | ---help--- |
894 | This device gives privileged processes access to the x86 | 909 | This device gives privileged processes access to the x86 |
895 | Model-Specific Registers (MSRs). It is a character device with | 910 | Model-Specific Registers (MSRs). It is a character device with |
896 | major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr. | 911 | major 202 and minors 0 to 31 for /dev/cpu/0/msr to /dev/cpu/31/msr. |
@@ -899,7 +914,7 @@ config X86_MSR | |||
899 | 914 | ||
900 | config X86_CPUID | 915 | config X86_CPUID |
901 | tristate "/dev/cpu/*/cpuid - CPU information support" | 916 | tristate "/dev/cpu/*/cpuid - CPU information support" |
902 | help | 917 | ---help--- |
903 | This device gives processes access to the x86 CPUID instruction to | 918 | This device gives processes access to the x86 CPUID instruction to |
904 | be executed on a specific processor. It is a character device | 919 | be executed on a specific processor. It is a character device |
905 | with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to | 920 | with major 203 and minors 0 to 31 for /dev/cpu/0/cpuid to |
@@ -951,7 +966,7 @@ config NOHIGHMEM | |||
951 | config HIGHMEM4G | 966 | config HIGHMEM4G |
952 | bool "4GB" | 967 | bool "4GB" |
953 | depends on !X86_NUMAQ | 968 | depends on !X86_NUMAQ |
954 | help | 969 | ---help--- |
955 | Select this if you have a 32-bit processor and between 1 and 4 | 970 | Select this if you have a 32-bit processor and between 1 and 4 |
956 | gigabytes of physical RAM. | 971 | gigabytes of physical RAM. |
957 | 972 | ||
@@ -959,7 +974,7 @@ config HIGHMEM64G | |||
959 | bool "64GB" | 974 | bool "64GB" |
960 | depends on !M386 && !M486 | 975 | depends on !M386 && !M486 |
961 | select X86_PAE | 976 | select X86_PAE |
962 | help | 977 | ---help--- |
963 | Select this if you have a 32-bit processor and more than 4 | 978 | Select this if you have a 32-bit processor and more than 4 |
964 | gigabytes of physical RAM. | 979 | gigabytes of physical RAM. |
965 | 980 | ||
@@ -970,7 +985,7 @@ choice | |||
970 | prompt "Memory split" if EMBEDDED | 985 | prompt "Memory split" if EMBEDDED |
971 | default VMSPLIT_3G | 986 | default VMSPLIT_3G |
972 | depends on X86_32 | 987 | depends on X86_32 |
973 | help | 988 | ---help--- |
974 | Select the desired split between kernel and user memory. | 989 | Select the desired split between kernel and user memory. |
975 | 990 | ||
976 | If the address range available to the kernel is less than the | 991 | If the address range available to the kernel is less than the |
@@ -1016,20 +1031,20 @@ config HIGHMEM | |||
1016 | config X86_PAE | 1031 | config X86_PAE |
1017 | bool "PAE (Physical Address Extension) Support" | 1032 | bool "PAE (Physical Address Extension) Support" |
1018 | depends on X86_32 && !HIGHMEM4G | 1033 | depends on X86_32 && !HIGHMEM4G |
1019 | help | 1034 | ---help--- |
1020 | PAE is required for NX support, and furthermore enables | 1035 | PAE is required for NX support, and furthermore enables |
1021 | larger swapspace support for non-overcommit purposes. It | 1036 | larger swapspace support for non-overcommit purposes. It |
1022 | has the cost of more pagetable lookup overhead, and also | 1037 | has the cost of more pagetable lookup overhead, and also |
1023 | consumes more pagetable space per process. | 1038 | consumes more pagetable space per process. |
1024 | 1039 | ||
1025 | config ARCH_PHYS_ADDR_T_64BIT | 1040 | config ARCH_PHYS_ADDR_T_64BIT |
1026 | def_bool X86_64 || X86_PAE | 1041 | def_bool X86_64 || X86_PAE |
1027 | 1042 | ||
1028 | config DIRECT_GBPAGES | 1043 | config DIRECT_GBPAGES |
1029 | bool "Enable 1GB pages for kernel pagetables" if EMBEDDED | 1044 | bool "Enable 1GB pages for kernel pagetables" if EMBEDDED |
1030 | default y | 1045 | default y |
1031 | depends on X86_64 | 1046 | depends on X86_64 |
1032 | help | 1047 | ---help--- |
1033 | Allow the kernel linear mapping to use 1GB pages on CPUs that | 1048 | Allow the kernel linear mapping to use 1GB pages on CPUs that |
1034 | support it. This can improve the kernel's performance a tiny bit by | 1049 | support it. This can improve the kernel's performance a tiny bit by |
1035 | reducing TLB pressure. If in doubt, say "Y". | 1050 | reducing TLB pressure. If in doubt, say "Y". |
@@ -1039,9 +1054,8 @@ config NUMA | |||
1039 | bool "Numa Memory Allocation and Scheduler Support" | 1054 | bool "Numa Memory Allocation and Scheduler Support" |
1040 | depends on SMP | 1055 | depends on SMP |
1041 | depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL) | 1056 | depends on X86_64 || (X86_32 && HIGHMEM64G && (X86_NUMAQ || X86_BIGSMP || X86_SUMMIT && ACPI) && EXPERIMENTAL) |
1042 | default n if X86_PC | ||
1043 | default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP) | 1057 | default y if (X86_NUMAQ || X86_SUMMIT || X86_BIGSMP) |
1044 | help | 1058 | ---help--- |
1045 | Enable NUMA (Non Uniform Memory Access) support. | 1059 | Enable NUMA (Non Uniform Memory Access) support. |
1046 | 1060 | ||
1047 | The kernel will try to allocate memory used by a CPU on the | 1061 | The kernel will try to allocate memory used by a CPU on the |
@@ -1064,19 +1078,19 @@ config K8_NUMA | |||
1064 | def_bool y | 1078 | def_bool y |
1065 | prompt "Old style AMD Opteron NUMA detection" | 1079 | prompt "Old style AMD Opteron NUMA detection" |
1066 | depends on X86_64 && NUMA && PCI | 1080 | depends on X86_64 && NUMA && PCI |
1067 | help | 1081 | ---help--- |
1068 | Enable K8 NUMA node topology detection. You should say Y here if | 1082 | Enable K8 NUMA node topology detection. You should say Y here if |
1069 | you have a multi processor AMD K8 system. This uses an old | 1083 | you have a multi processor AMD K8 system. This uses an old |
1070 | method to read the NUMA configuration directly from the builtin | 1084 | method to read the NUMA configuration directly from the builtin |
1071 | Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA | 1085 | Northbridge of Opteron. It is recommended to use X86_64_ACPI_NUMA |
1072 | instead, which also takes priority if both are compiled in. | 1086 | instead, which also takes priority if both are compiled in. |
1073 | 1087 | ||
1074 | config X86_64_ACPI_NUMA | 1088 | config X86_64_ACPI_NUMA |
1075 | def_bool y | 1089 | def_bool y |
1076 | prompt "ACPI NUMA detection" | 1090 | prompt "ACPI NUMA detection" |
1077 | depends on X86_64 && NUMA && ACPI && PCI | 1091 | depends on X86_64 && NUMA && ACPI && PCI |
1078 | select ACPI_NUMA | 1092 | select ACPI_NUMA |
1079 | help | 1093 | ---help--- |
1080 | Enable ACPI SRAT based node topology detection. | 1094 | Enable ACPI SRAT based node topology detection. |
1081 | 1095 | ||
1082 | # Some NUMA nodes have memory ranges that span | 1096 | # Some NUMA nodes have memory ranges that span |
@@ -1091,7 +1105,7 @@ config NODES_SPAN_OTHER_NODES | |||
1091 | config NUMA_EMU | 1105 | config NUMA_EMU |
1092 | bool "NUMA emulation" | 1106 | bool "NUMA emulation" |
1093 | depends on X86_64 && NUMA | 1107 | depends on X86_64 && NUMA |
1094 | help | 1108 | ---help--- |
1095 | Enable NUMA emulation. A flat machine will be split | 1109 | Enable NUMA emulation. A flat machine will be split |
1096 | into virtual nodes when booted with "numa=fake=N", where N is the | 1110 | into virtual nodes when booted with "numa=fake=N", where N is the |
1097 | number of nodes. This is only useful for debugging. | 1111 | number of nodes. This is only useful for debugging. |
@@ -1104,7 +1118,7 @@ config NODES_SHIFT | |||
1104 | default "4" if X86_NUMAQ | 1118 | default "4" if X86_NUMAQ |
1105 | default "3" | 1119 | default "3" |
1106 | depends on NEED_MULTIPLE_NODES | 1120 | depends on NEED_MULTIPLE_NODES |
1107 | help | 1121 | ---help--- |
1108 | Specify the maximum number of NUMA Nodes available on the target | 1122 | Specify the maximum number of NUMA Nodes available on the target |
1109 | system. Increases memory reserved to accomodate various tables. | 1123 | system. Increases memory reserved to accomodate various tables. |
1110 | 1124 | ||
@@ -1142,7 +1156,7 @@ config ARCH_SPARSEMEM_DEFAULT | |||
1142 | 1156 | ||
1143 | config ARCH_SPARSEMEM_ENABLE | 1157 | config ARCH_SPARSEMEM_ENABLE |
1144 | def_bool y | 1158 | def_bool y |
1145 | depends on X86_64 || NUMA || (EXPERIMENTAL && X86_PC) || X86_GENERICARCH | 1159 | depends on X86_64 || NUMA || (EXPERIMENTAL && X86_32) || X86_32_NON_STANDARD |
1146 | select SPARSEMEM_STATIC if X86_32 | 1160 | select SPARSEMEM_STATIC if X86_32 |
1147 | select SPARSEMEM_VMEMMAP_ENABLE if X86_64 | 1161 | select SPARSEMEM_VMEMMAP_ENABLE if X86_64 |
1148 | 1162 | ||
@@ -1159,61 +1173,61 @@ source "mm/Kconfig" | |||
1159 | config HIGHPTE | 1173 | config HIGHPTE |
1160 | bool "Allocate 3rd-level pagetables from highmem" | 1174 | bool "Allocate 3rd-level pagetables from highmem" |
1161 | depends on X86_32 && (HIGHMEM4G || HIGHMEM64G) | 1175 | depends on X86_32 && (HIGHMEM4G || HIGHMEM64G) |
1162 | help | 1176 | ---help--- |
1163 | The VM uses one page table entry for each page of physical memory. | 1177 | The VM uses one page table entry for each page of physical memory. |
1164 | For systems with a lot of RAM, this can be wasteful of precious | 1178 | For systems with a lot of RAM, this can be wasteful of precious |
1165 | low memory. Setting this option will put user-space page table | 1179 | low memory. Setting this option will put user-space page table |
1166 | entries in high memory. | 1180 | entries in high memory. |
1167 | 1181 | ||
1168 | config X86_CHECK_BIOS_CORRUPTION | 1182 | config X86_CHECK_BIOS_CORRUPTION |
1169 | bool "Check for low memory corruption" | 1183 | bool "Check for low memory corruption" |
1170 | help | 1184 | ---help--- |
1171 | Periodically check for memory corruption in low memory, which | 1185 | Periodically check for memory corruption in low memory, which |
1172 | is suspected to be caused by BIOS. Even when enabled in the | 1186 | is suspected to be caused by BIOS. Even when enabled in the |
1173 | configuration, it is disabled at runtime. Enable it by | 1187 | configuration, it is disabled at runtime. Enable it by |
1174 | setting "memory_corruption_check=1" on the kernel command | 1188 | setting "memory_corruption_check=1" on the kernel command |
1175 | line. By default it scans the low 64k of memory every 60 | 1189 | line. By default it scans the low 64k of memory every 60 |
1176 | seconds; see the memory_corruption_check_size and | 1190 | seconds; see the memory_corruption_check_size and |
1177 | memory_corruption_check_period parameters in | 1191 | memory_corruption_check_period parameters in |
1178 | Documentation/kernel-parameters.txt to adjust this. | 1192 | Documentation/kernel-parameters.txt to adjust this. |
1179 | 1193 | ||
1180 | When enabled with the default parameters, this option has | 1194 | When enabled with the default parameters, this option has |
1181 | almost no overhead, as it reserves a relatively small amount | 1195 | almost no overhead, as it reserves a relatively small amount |
1182 | of memory and scans it infrequently. It both detects corruption | 1196 | of memory and scans it infrequently. It both detects corruption |
1183 | and prevents it from affecting the running system. | 1197 | and prevents it from affecting the running system. |
1184 | 1198 | ||
1185 | It is, however, intended as a diagnostic tool; if repeatable | 1199 | It is, however, intended as a diagnostic tool; if repeatable |
1186 | BIOS-originated corruption always affects the same memory, | 1200 | BIOS-originated corruption always affects the same memory, |
1187 | you can use memmap= to prevent the kernel from using that | 1201 | you can use memmap= to prevent the kernel from using that |
1188 | memory. | 1202 | memory. |
1189 | 1203 | ||
1190 | config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK | 1204 | config X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK |
1191 | bool "Set the default setting of memory_corruption_check" | 1205 | bool "Set the default setting of memory_corruption_check" |
1192 | depends on X86_CHECK_BIOS_CORRUPTION | 1206 | depends on X86_CHECK_BIOS_CORRUPTION |
1193 | default y | 1207 | default y |
1194 | help | 1208 | ---help--- |
1195 | Set whether the default state of memory_corruption_check is | 1209 | Set whether the default state of memory_corruption_check is |
1196 | on or off. | 1210 | on or off. |
1197 | 1211 | ||
1198 | config X86_RESERVE_LOW_64K | 1212 | config X86_RESERVE_LOW_64K |
1199 | bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen" | 1213 | bool "Reserve low 64K of RAM on AMI/Phoenix BIOSen" |
1200 | default y | 1214 | default y |
1201 | help | 1215 | ---help--- |
1202 | Reserve the first 64K of physical RAM on BIOSes that are known | 1216 | Reserve the first 64K of physical RAM on BIOSes that are known |
1203 | to potentially corrupt that memory range. A numbers of BIOSes are | 1217 | to potentially corrupt that memory range. A numbers of BIOSes are |
1204 | known to utilize this area during suspend/resume, so it must not | 1218 | known to utilize this area during suspend/resume, so it must not |
1205 | be used by the kernel. | 1219 | be used by the kernel. |
1206 | 1220 | ||
1207 | Set this to N if you are absolutely sure that you trust the BIOS | 1221 | Set this to N if you are absolutely sure that you trust the BIOS |
1208 | to get all its memory reservations and usages right. | 1222 | to get all its memory reservations and usages right. |
1209 | 1223 | ||
1210 | If you have doubts about the BIOS (e.g. suspend/resume does not | 1224 | If you have doubts about the BIOS (e.g. suspend/resume does not |
1211 | work or there's kernel crashes after certain hardware hotplug | 1225 | work or there's kernel crashes after certain hardware hotplug |
1212 | events) and it's not AMI or Phoenix, then you might want to enable | 1226 | events) and it's not AMI or Phoenix, then you might want to enable |
1213 | X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check typical | 1227 | X86_CHECK_BIOS_CORRUPTION=y to allow the kernel to check typical |
1214 | corruption patterns. | 1228 | corruption patterns. |
1215 | 1229 | ||
1216 | Say Y if unsure. | 1230 | Say Y if unsure. |
1217 | 1231 | ||
1218 | config MATH_EMULATION | 1232 | config MATH_EMULATION |
1219 | bool | 1233 | bool |
@@ -1279,7 +1293,7 @@ config MTRR_SANITIZER | |||
1279 | def_bool y | 1293 | def_bool y |
1280 | prompt "MTRR cleanup support" | 1294 | prompt "MTRR cleanup support" |
1281 | depends on MTRR | 1295 | depends on MTRR |
1282 | help | 1296 | ---help--- |
1283 | Convert MTRR layout from continuous to discrete, so X drivers can | 1297 | Convert MTRR layout from continuous to discrete, so X drivers can |
1284 | add writeback entries. | 1298 | add writeback entries. |
1285 | 1299 | ||
@@ -1294,7 +1308,7 @@ config MTRR_SANITIZER_ENABLE_DEFAULT | |||
1294 | range 0 1 | 1308 | range 0 1 |
1295 | default "0" | 1309 | default "0" |
1296 | depends on MTRR_SANITIZER | 1310 | depends on MTRR_SANITIZER |
1297 | help | 1311 | ---help--- |
1298 | Enable mtrr cleanup default value | 1312 | Enable mtrr cleanup default value |
1299 | 1313 | ||
1300 | config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT | 1314 | config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT |
@@ -1302,7 +1316,7 @@ config MTRR_SANITIZER_SPARE_REG_NR_DEFAULT | |||
1302 | range 0 7 | 1316 | range 0 7 |
1303 | default "1" | 1317 | default "1" |
1304 | depends on MTRR_SANITIZER | 1318 | depends on MTRR_SANITIZER |
1305 | help | 1319 | ---help--- |
1306 | mtrr cleanup spare entries default, it can be changed via | 1320 | mtrr cleanup spare entries default, it can be changed via |
1307 | mtrr_spare_reg_nr=N on the kernel command line. | 1321 | mtrr_spare_reg_nr=N on the kernel command line. |
1308 | 1322 | ||
@@ -1310,7 +1324,7 @@ config X86_PAT | |||
1310 | bool | 1324 | bool |
1311 | prompt "x86 PAT support" | 1325 | prompt "x86 PAT support" |
1312 | depends on MTRR | 1326 | depends on MTRR |
1313 | help | 1327 | ---help--- |
1314 | Use PAT attributes to setup page level cache control. | 1328 | Use PAT attributes to setup page level cache control. |
1315 | 1329 | ||
1316 | PATs are the modern equivalents of MTRRs and are much more | 1330 | PATs are the modern equivalents of MTRRs and are much more |
@@ -1325,20 +1339,20 @@ config EFI | |||
1325 | bool "EFI runtime service support" | 1339 | bool "EFI runtime service support" |
1326 | depends on ACPI | 1340 | depends on ACPI |
1327 | ---help--- | 1341 | ---help--- |
1328 | This enables the kernel to use EFI runtime services that are | 1342 | This enables the kernel to use EFI runtime services that are |
1329 | available (such as the EFI variable services). | 1343 | available (such as the EFI variable services). |
1330 | 1344 | ||
1331 | This option is only useful on systems that have EFI firmware. | 1345 | This option is only useful on systems that have EFI firmware. |
1332 | In addition, you should use the latest ELILO loader available | 1346 | In addition, you should use the latest ELILO loader available |
1333 | at <http://elilo.sourceforge.net> in order to take advantage | 1347 | at <http://elilo.sourceforge.net> in order to take advantage |
1334 | of EFI runtime services. However, even with this option, the | 1348 | of EFI runtime services. However, even with this option, the |
1335 | resultant kernel should continue to boot on existing non-EFI | 1349 | resultant kernel should continue to boot on existing non-EFI |
1336 | platforms. | 1350 | platforms. |
1337 | 1351 | ||
1338 | config SECCOMP | 1352 | config SECCOMP |
1339 | def_bool y | 1353 | def_bool y |
1340 | prompt "Enable seccomp to safely compute untrusted bytecode" | 1354 | prompt "Enable seccomp to safely compute untrusted bytecode" |
1341 | help | 1355 | ---help--- |
1342 | This kernel feature is useful for number crunching applications | 1356 | This kernel feature is useful for number crunching applications |
1343 | that may need to compute untrusted bytecode during their | 1357 | that may need to compute untrusted bytecode during their |
1344 | execution. By using pipes or other transports made available to | 1358 | execution. By using pipes or other transports made available to |
@@ -1357,8 +1371,8 @@ config CC_STACKPROTECTOR_ALL | |||
1357 | config CC_STACKPROTECTOR | 1371 | config CC_STACKPROTECTOR |
1358 | bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" | 1372 | bool "Enable -fstack-protector buffer overflow detection (EXPERIMENTAL)" |
1359 | select CC_STACKPROTECTOR_ALL | 1373 | select CC_STACKPROTECTOR_ALL |
1360 | help | 1374 | ---help--- |
1361 | This option turns on the -fstack-protector GCC feature. This | 1375 | This option turns on the -fstack-protector GCC feature. This |
1362 | feature puts, at the beginning of functions, a canary value on | 1376 | feature puts, at the beginning of functions, a canary value on |
1363 | the stack just before the return address, and validates | 1377 | the stack just before the return address, and validates |
1364 | the value just before actually returning. Stack based buffer | 1378 | the value just before actually returning. Stack based buffer |
@@ -1375,8 +1389,7 @@ source kernel/Kconfig.hz | |||
1375 | 1389 | ||
1376 | config KEXEC | 1390 | config KEXEC |
1377 | bool "kexec system call" | 1391 | bool "kexec system call" |
1378 | depends on X86_BIOS_REBOOT | 1392 | ---help--- |
1379 | help | ||
1380 | kexec is a system call that implements the ability to shutdown your | 1393 | kexec is a system call that implements the ability to shutdown your |
1381 | current kernel, and to start another kernel. It is like a reboot | 1394 | current kernel, and to start another kernel. It is like a reboot |
1382 | but it is independent of the system firmware. And like a reboot | 1395 | but it is independent of the system firmware. And like a reboot |
@@ -1393,7 +1406,7 @@ config KEXEC | |||
1393 | config CRASH_DUMP | 1406 | config CRASH_DUMP |
1394 | bool "kernel crash dumps" | 1407 | bool "kernel crash dumps" |
1395 | depends on X86_64 || (X86_32 && HIGHMEM) | 1408 | depends on X86_64 || (X86_32 && HIGHMEM) |
1396 | help | 1409 | ---help--- |
1397 | Generate crash dump after being started by kexec. | 1410 | Generate crash dump after being started by kexec. |
1398 | This should be normally only set in special crash dump kernels | 1411 | This should be normally only set in special crash dump kernels |
1399 | which are loaded in the main kernel with kexec-tools into | 1412 | which are loaded in the main kernel with kexec-tools into |
@@ -1408,7 +1421,7 @@ config KEXEC_JUMP | |||
1408 | bool "kexec jump (EXPERIMENTAL)" | 1421 | bool "kexec jump (EXPERIMENTAL)" |
1409 | depends on EXPERIMENTAL | 1422 | depends on EXPERIMENTAL |
1410 | depends on KEXEC && HIBERNATION && X86_32 | 1423 | depends on KEXEC && HIBERNATION && X86_32 |
1411 | help | 1424 | ---help--- |
1412 | Jump between original kernel and kexeced kernel and invoke | 1425 | Jump between original kernel and kexeced kernel and invoke |
1413 | code in physical address mode via KEXEC | 1426 | code in physical address mode via KEXEC |
1414 | 1427 | ||
@@ -1417,7 +1430,7 @@ config PHYSICAL_START | |||
1417 | default "0x1000000" if X86_NUMAQ | 1430 | default "0x1000000" if X86_NUMAQ |
1418 | default "0x200000" if X86_64 | 1431 | default "0x200000" if X86_64 |
1419 | default "0x100000" | 1432 | default "0x100000" |
1420 | help | 1433 | ---help--- |
1421 | This gives the physical address where the kernel is loaded. | 1434 | This gives the physical address where the kernel is loaded. |
1422 | 1435 | ||
1423 | If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then | 1436 | If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then |
@@ -1458,7 +1471,7 @@ config PHYSICAL_START | |||
1458 | config RELOCATABLE | 1471 | config RELOCATABLE |
1459 | bool "Build a relocatable kernel (EXPERIMENTAL)" | 1472 | bool "Build a relocatable kernel (EXPERIMENTAL)" |
1460 | depends on EXPERIMENTAL | 1473 | depends on EXPERIMENTAL |
1461 | help | 1474 | ---help--- |
1462 | This builds a kernel image that retains relocation information | 1475 | This builds a kernel image that retains relocation information |
1463 | so it can be loaded someplace besides the default 1MB. | 1476 | so it can be loaded someplace besides the default 1MB. |
1464 | The relocations tend to make the kernel binary about 10% larger, | 1477 | The relocations tend to make the kernel binary about 10% larger, |
@@ -1478,7 +1491,7 @@ config PHYSICAL_ALIGN | |||
1478 | default "0x100000" if X86_32 | 1491 | default "0x100000" if X86_32 |
1479 | default "0x200000" if X86_64 | 1492 | default "0x200000" if X86_64 |
1480 | range 0x2000 0x400000 | 1493 | range 0x2000 0x400000 |
1481 | help | 1494 | ---help--- |
1482 | This value puts the alignment restrictions on physical address | 1495 | This value puts the alignment restrictions on physical address |
1483 | where kernel is loaded and run from. Kernel is compiled for an | 1496 | where kernel is loaded and run from. Kernel is compiled for an |
1484 | address which meets above alignment restriction. | 1497 | address which meets above alignment restriction. |
@@ -1499,7 +1512,7 @@ config PHYSICAL_ALIGN | |||
1499 | 1512 | ||
1500 | config HOTPLUG_CPU | 1513 | config HOTPLUG_CPU |
1501 | bool "Support for hot-pluggable CPUs" | 1514 | bool "Support for hot-pluggable CPUs" |
1502 | depends on SMP && HOTPLUG && !X86_VOYAGER | 1515 | depends on SMP && HOTPLUG |
1503 | ---help--- | 1516 | ---help--- |
1504 | Say Y here to allow turning CPUs off and on. CPUs can be | 1517 | Say Y here to allow turning CPUs off and on. CPUs can be |
1505 | controlled through /sys/devices/system/cpu. | 1518 | controlled through /sys/devices/system/cpu. |
@@ -1511,7 +1524,7 @@ config COMPAT_VDSO | |||
1511 | def_bool y | 1524 | def_bool y |
1512 | prompt "Compat VDSO support" | 1525 | prompt "Compat VDSO support" |
1513 | depends on X86_32 || IA32_EMULATION | 1526 | depends on X86_32 || IA32_EMULATION |
1514 | help | 1527 | ---help--- |
1515 | Map the 32-bit VDSO to the predictable old-style address too. | 1528 | Map the 32-bit VDSO to the predictable old-style address too. |
1516 | ---help--- | 1529 | ---help--- |
1517 | Say N here if you are running a sufficiently recent glibc | 1530 | Say N here if you are running a sufficiently recent glibc |
@@ -1523,7 +1536,7 @@ config COMPAT_VDSO | |||
1523 | config CMDLINE_BOOL | 1536 | config CMDLINE_BOOL |
1524 | bool "Built-in kernel command line" | 1537 | bool "Built-in kernel command line" |
1525 | default n | 1538 | default n |
1526 | help | 1539 | ---help--- |
1527 | Allow for specifying boot arguments to the kernel at | 1540 | Allow for specifying boot arguments to the kernel at |
1528 | build time. On some systems (e.g. embedded ones), it is | 1541 | build time. On some systems (e.g. embedded ones), it is |
1529 | necessary or convenient to provide some or all of the | 1542 | necessary or convenient to provide some or all of the |
@@ -1541,7 +1554,7 @@ config CMDLINE | |||
1541 | string "Built-in kernel command string" | 1554 | string "Built-in kernel command string" |
1542 | depends on CMDLINE_BOOL | 1555 | depends on CMDLINE_BOOL |
1543 | default "" | 1556 | default "" |
1544 | help | 1557 | ---help--- |
1545 | Enter arguments here that should be compiled into the kernel | 1558 | Enter arguments here that should be compiled into the kernel |
1546 | image and used at boot time. If the boot loader provides a | 1559 | image and used at boot time. If the boot loader provides a |
1547 | command line at boot time, it is appended to this string to | 1560 | command line at boot time, it is appended to this string to |
@@ -1558,7 +1571,7 @@ config CMDLINE_OVERRIDE | |||
1558 | bool "Built-in command line overrides boot loader arguments" | 1571 | bool "Built-in command line overrides boot loader arguments" |
1559 | default n | 1572 | default n |
1560 | depends on CMDLINE_BOOL | 1573 | depends on CMDLINE_BOOL |
1561 | help | 1574 | ---help--- |
1562 | Set this option to 'Y' to have the kernel ignore the boot loader | 1575 | Set this option to 'Y' to have the kernel ignore the boot loader |
1563 | command line, and use ONLY the built-in command line. | 1576 | command line, and use ONLY the built-in command line. |
1564 | 1577 | ||
@@ -1580,7 +1593,6 @@ config HAVE_ARCH_EARLY_PFN_TO_NID | |||
1580 | depends on NUMA | 1593 | depends on NUMA |
1581 | 1594 | ||
1582 | menu "Power management and ACPI options" | 1595 | menu "Power management and ACPI options" |
1583 | depends on !X86_VOYAGER | ||
1584 | 1596 | ||
1585 | config ARCH_HIBERNATION_HEADER | 1597 | config ARCH_HIBERNATION_HEADER |
1586 | def_bool y | 1598 | def_bool y |
@@ -1658,7 +1670,7 @@ if APM | |||
1658 | 1670 | ||
1659 | config APM_IGNORE_USER_SUSPEND | 1671 | config APM_IGNORE_USER_SUSPEND |
1660 | bool "Ignore USER SUSPEND" | 1672 | bool "Ignore USER SUSPEND" |
1661 | help | 1673 | ---help--- |
1662 | This option will ignore USER SUSPEND requests. On machines with a | 1674 | This option will ignore USER SUSPEND requests. On machines with a |
1663 | compliant APM BIOS, you want to say N. However, on the NEC Versa M | 1675 | compliant APM BIOS, you want to say N. However, on the NEC Versa M |
1664 | series notebooks, it is necessary to say Y because of a BIOS bug. | 1676 | series notebooks, it is necessary to say Y because of a BIOS bug. |
@@ -1682,7 +1694,7 @@ config APM_DO_ENABLE | |||
1682 | 1694 | ||
1683 | config APM_CPU_IDLE | 1695 | config APM_CPU_IDLE |
1684 | bool "Make CPU Idle calls when idle" | 1696 | bool "Make CPU Idle calls when idle" |
1685 | help | 1697 | ---help--- |
1686 | Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop. | 1698 | Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop. |
1687 | On some machines, this can activate improved power savings, such as | 1699 | On some machines, this can activate improved power savings, such as |
1688 | a slowed CPU clock rate, when the machine is idle. These idle calls | 1700 | a slowed CPU clock rate, when the machine is idle. These idle calls |
@@ -1693,7 +1705,7 @@ config APM_CPU_IDLE | |||
1693 | 1705 | ||
1694 | config APM_DISPLAY_BLANK | 1706 | config APM_DISPLAY_BLANK |
1695 | bool "Enable console blanking using APM" | 1707 | bool "Enable console blanking using APM" |
1696 | help | 1708 | ---help--- |
1697 | Enable console blanking using the APM. Some laptops can use this to | 1709 | Enable console blanking using the APM. Some laptops can use this to |
1698 | turn off the LCD backlight when the screen blanker of the Linux | 1710 | turn off the LCD backlight when the screen blanker of the Linux |
1699 | virtual console blanks the screen. Note that this is only used by | 1711 | virtual console blanks the screen. Note that this is only used by |
@@ -1706,7 +1718,7 @@ config APM_DISPLAY_BLANK | |||
1706 | 1718 | ||
1707 | config APM_ALLOW_INTS | 1719 | config APM_ALLOW_INTS |
1708 | bool "Allow interrupts during APM BIOS calls" | 1720 | bool "Allow interrupts during APM BIOS calls" |
1709 | help | 1721 | ---help--- |
1710 | Normally we disable external interrupts while we are making calls to | 1722 | Normally we disable external interrupts while we are making calls to |
1711 | the APM BIOS as a measure to lessen the effects of a badly behaving | 1723 | the APM BIOS as a measure to lessen the effects of a badly behaving |
1712 | BIOS implementation. The BIOS should reenable interrupts if it | 1724 | BIOS implementation. The BIOS should reenable interrupts if it |
@@ -1731,7 +1743,7 @@ config PCI | |||
1731 | bool "PCI support" | 1743 | bool "PCI support" |
1732 | default y | 1744 | default y |
1733 | select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC) | 1745 | select ARCH_SUPPORTS_MSI if (X86_LOCAL_APIC && X86_IO_APIC) |
1734 | help | 1746 | ---help--- |
1735 | Find out whether you have a PCI motherboard. PCI is the name of a | 1747 | Find out whether you have a PCI motherboard. PCI is the name of a |
1736 | bus system, i.e. the way the CPU talks to the other stuff inside | 1748 | bus system, i.e. the way the CPU talks to the other stuff inside |
1737 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or | 1749 | your box. Other bus systems are ISA, EISA, MicroChannel (MCA) or |
@@ -1802,7 +1814,7 @@ config PCI_MMCONFIG | |||
1802 | config DMAR | 1814 | config DMAR |
1803 | bool "Support for DMA Remapping Devices (EXPERIMENTAL)" | 1815 | bool "Support for DMA Remapping Devices (EXPERIMENTAL)" |
1804 | depends on X86_64 && PCI_MSI && ACPI && EXPERIMENTAL | 1816 | depends on X86_64 && PCI_MSI && ACPI && EXPERIMENTAL |
1805 | help | 1817 | ---help--- |
1806 | DMA remapping (DMAR) devices support enables independent address | 1818 | DMA remapping (DMAR) devices support enables independent address |
1807 | translations for Direct Memory Access (DMA) from devices. | 1819 | translations for Direct Memory Access (DMA) from devices. |
1808 | These DMA remapping devices are reported via ACPI tables | 1820 | These DMA remapping devices are reported via ACPI tables |
@@ -1824,29 +1836,30 @@ config DMAR_GFX_WA | |||
1824 | def_bool y | 1836 | def_bool y |
1825 | prompt "Support for Graphics workaround" | 1837 | prompt "Support for Graphics workaround" |
1826 | depends on DMAR | 1838 | depends on DMAR |
1827 | help | 1839 | ---help--- |
1828 | Current Graphics drivers tend to use physical address | 1840 | Current Graphics drivers tend to use physical address |
1829 | for DMA and avoid using DMA APIs. Setting this config | 1841 | for DMA and avoid using DMA APIs. Setting this config |
1830 | option permits the IOMMU driver to set a unity map for | 1842 | option permits the IOMMU driver to set a unity map for |
1831 | all the OS-visible memory. Hence the driver can continue | 1843 | all the OS-visible memory. Hence the driver can continue |
1832 | to use physical addresses for DMA. | 1844 | to use physical addresses for DMA. |
1833 | 1845 | ||
1834 | config DMAR_FLOPPY_WA | 1846 | config DMAR_FLOPPY_WA |
1835 | def_bool y | 1847 | def_bool y |
1836 | depends on DMAR | 1848 | depends on DMAR |
1837 | help | 1849 | ---help--- |
1838 | Floppy disk drivers are know to bypass DMA API calls | 1850 | Floppy disk drivers are know to bypass DMA API calls |
1839 | thereby failing to work when IOMMU is enabled. This | 1851 | thereby failing to work when IOMMU is enabled. This |
1840 | workaround will setup a 1:1 mapping for the first | 1852 | workaround will setup a 1:1 mapping for the first |
1841 | 16M to make floppy (an ISA device) work. | 1853 | 16M to make floppy (an ISA device) work. |
1842 | 1854 | ||
1843 | config INTR_REMAP | 1855 | config INTR_REMAP |
1844 | bool "Support for Interrupt Remapping (EXPERIMENTAL)" | 1856 | bool "Support for Interrupt Remapping (EXPERIMENTAL)" |
1845 | depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL | 1857 | depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI && EXPERIMENTAL |
1846 | help | 1858 | select X86_X2APIC |
1847 | Supports Interrupt remapping for IO-APIC and MSI devices. | 1859 | ---help--- |
1848 | To use x2apic mode in the CPU's which support x2APIC enhancements or | 1860 | Supports Interrupt remapping for IO-APIC and MSI devices. |
1849 | to support platforms with CPU's having > 8 bit APIC ID, say Y. | 1861 | To use x2apic mode in the CPU's which support x2APIC enhancements or |
1862 | to support platforms with CPU's having > 8 bit APIC ID, say Y. | ||
1850 | 1863 | ||
1851 | source "drivers/pci/pcie/Kconfig" | 1864 | source "drivers/pci/pcie/Kconfig" |
1852 | 1865 | ||
@@ -1860,8 +1873,7 @@ if X86_32 | |||
1860 | 1873 | ||
1861 | config ISA | 1874 | config ISA |
1862 | bool "ISA support" | 1875 | bool "ISA support" |
1863 | depends on !X86_VOYAGER | 1876 | ---help--- |
1864 | help | ||
1865 | Find out whether you have ISA slots on your motherboard. ISA is the | 1877 | Find out whether you have ISA slots on your motherboard. ISA is the |
1866 | name of a bus system, i.e. the way the CPU talks to the other stuff | 1878 | name of a bus system, i.e. the way the CPU talks to the other stuff |
1867 | inside your box. Other bus systems are PCI, EISA, MicroChannel | 1879 | inside your box. Other bus systems are PCI, EISA, MicroChannel |
@@ -1887,9 +1899,8 @@ config EISA | |||
1887 | source "drivers/eisa/Kconfig" | 1899 | source "drivers/eisa/Kconfig" |
1888 | 1900 | ||
1889 | config MCA | 1901 | config MCA |
1890 | bool "MCA support" if !X86_VOYAGER | 1902 | bool "MCA support" |
1891 | default y if X86_VOYAGER | 1903 | ---help--- |
1892 | help | ||
1893 | MicroChannel Architecture is found in some IBM PS/2 machines and | 1904 | MicroChannel Architecture is found in some IBM PS/2 machines and |
1894 | laptops. It is a bus system similar to PCI or ISA. See | 1905 | laptops. It is a bus system similar to PCI or ISA. See |
1895 | <file:Documentation/mca.txt> (and especially the web page given | 1906 | <file:Documentation/mca.txt> (and especially the web page given |
@@ -1899,8 +1910,7 @@ source "drivers/mca/Kconfig" | |||
1899 | 1910 | ||
1900 | config SCx200 | 1911 | config SCx200 |
1901 | tristate "NatSemi SCx200 support" | 1912 | tristate "NatSemi SCx200 support" |
1902 | depends on !X86_VOYAGER | 1913 | ---help--- |
1903 | help | ||
1904 | This provides basic support for National Semiconductor's | 1914 | This provides basic support for National Semiconductor's |
1905 | (now AMD's) Geode processors. The driver probes for the | 1915 | (now AMD's) Geode processors. The driver probes for the |
1906 | PCI-IDs of several on-chip devices, so its a good dependency | 1916 | PCI-IDs of several on-chip devices, so its a good dependency |
@@ -1912,7 +1922,7 @@ config SCx200HR_TIMER | |||
1912 | tristate "NatSemi SCx200 27MHz High-Resolution Timer Support" | 1922 | tristate "NatSemi SCx200 27MHz High-Resolution Timer Support" |
1913 | depends on SCx200 && GENERIC_TIME | 1923 | depends on SCx200 && GENERIC_TIME |
1914 | default y | 1924 | default y |
1915 | help | 1925 | ---help--- |
1916 | This driver provides a clocksource built upon the on-chip | 1926 | This driver provides a clocksource built upon the on-chip |
1917 | 27MHz high-resolution timer. Its also a workaround for | 1927 | 27MHz high-resolution timer. Its also a workaround for |
1918 | NSC Geode SC-1100's buggy TSC, which loses time when the | 1928 | NSC Geode SC-1100's buggy TSC, which loses time when the |
@@ -1923,7 +1933,7 @@ config GEODE_MFGPT_TIMER | |||
1923 | def_bool y | 1933 | def_bool y |
1924 | prompt "Geode Multi-Function General Purpose Timer (MFGPT) events" | 1934 | prompt "Geode Multi-Function General Purpose Timer (MFGPT) events" |
1925 | depends on MGEODE_LX && GENERIC_TIME && GENERIC_CLOCKEVENTS | 1935 | depends on MGEODE_LX && GENERIC_TIME && GENERIC_CLOCKEVENTS |
1926 | help | 1936 | ---help--- |
1927 | This driver provides a clock event source based on the MFGPT | 1937 | This driver provides a clock event source based on the MFGPT |
1928 | timer(s) in the CS5535 and CS5536 companion chip for the geode. | 1938 | timer(s) in the CS5535 and CS5536 companion chip for the geode. |
1929 | MFGPTs have a better resolution and max interval than the | 1939 | MFGPTs have a better resolution and max interval than the |
@@ -1932,7 +1942,7 @@ config GEODE_MFGPT_TIMER | |||
1932 | config OLPC | 1942 | config OLPC |
1933 | bool "One Laptop Per Child support" | 1943 | bool "One Laptop Per Child support" |
1934 | default n | 1944 | default n |
1935 | help | 1945 | ---help--- |
1936 | Add support for detecting the unique features of the OLPC | 1946 | Add support for detecting the unique features of the OLPC |
1937 | XO hardware. | 1947 | XO hardware. |
1938 | 1948 | ||
@@ -1957,16 +1967,16 @@ config IA32_EMULATION | |||
1957 | bool "IA32 Emulation" | 1967 | bool "IA32 Emulation" |
1958 | depends on X86_64 | 1968 | depends on X86_64 |
1959 | select COMPAT_BINFMT_ELF | 1969 | select COMPAT_BINFMT_ELF |
1960 | help | 1970 | ---help--- |
1961 | Include code to run 32-bit programs under a 64-bit kernel. You should | 1971 | Include code to run 32-bit programs under a 64-bit kernel. You should |
1962 | likely turn this on, unless you're 100% sure that you don't have any | 1972 | likely turn this on, unless you're 100% sure that you don't have any |
1963 | 32-bit programs left. | 1973 | 32-bit programs left. |
1964 | 1974 | ||
1965 | config IA32_AOUT | 1975 | config IA32_AOUT |
1966 | tristate "IA32 a.out support" | 1976 | tristate "IA32 a.out support" |
1967 | depends on IA32_EMULATION | 1977 | depends on IA32_EMULATION |
1968 | help | 1978 | ---help--- |
1969 | Support old a.out binaries in the 32bit emulation. | 1979 | Support old a.out binaries in the 32bit emulation. |
1970 | 1980 | ||
1971 | config COMPAT | 1981 | config COMPAT |
1972 | def_bool y | 1982 | def_bool y |
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index 085fef4d8660..a95eaf0e582a 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -50,7 +50,7 @@ config M386 | |||
50 | config M486 | 50 | config M486 |
51 | bool "486" | 51 | bool "486" |
52 | depends on X86_32 | 52 | depends on X86_32 |
53 | help | 53 | ---help--- |
54 | Select this for a 486 series processor, either Intel or one of the | 54 | Select this for a 486 series processor, either Intel or one of the |
55 | compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, | 55 | compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, |
56 | DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or | 56 | DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or |
@@ -59,7 +59,7 @@ config M486 | |||
59 | config M586 | 59 | config M586 |
60 | bool "586/K5/5x86/6x86/6x86MX" | 60 | bool "586/K5/5x86/6x86/6x86MX" |
61 | depends on X86_32 | 61 | depends on X86_32 |
62 | help | 62 | ---help--- |
63 | Select this for an 586 or 686 series processor such as the AMD K5, | 63 | Select this for an 586 or 686 series processor such as the AMD K5, |
64 | the Cyrix 5x86, 6x86 and 6x86MX. This choice does not | 64 | the Cyrix 5x86, 6x86 and 6x86MX. This choice does not |
65 | assume the RDTSC (Read Time Stamp Counter) instruction. | 65 | assume the RDTSC (Read Time Stamp Counter) instruction. |
@@ -67,21 +67,21 @@ config M586 | |||
67 | config M586TSC | 67 | config M586TSC |
68 | bool "Pentium-Classic" | 68 | bool "Pentium-Classic" |
69 | depends on X86_32 | 69 | depends on X86_32 |
70 | help | 70 | ---help--- |
71 | Select this for a Pentium Classic processor with the RDTSC (Read | 71 | Select this for a Pentium Classic processor with the RDTSC (Read |
72 | Time Stamp Counter) instruction for benchmarking. | 72 | Time Stamp Counter) instruction for benchmarking. |
73 | 73 | ||
74 | config M586MMX | 74 | config M586MMX |
75 | bool "Pentium-MMX" | 75 | bool "Pentium-MMX" |
76 | depends on X86_32 | 76 | depends on X86_32 |
77 | help | 77 | ---help--- |
78 | Select this for a Pentium with the MMX graphics/multimedia | 78 | Select this for a Pentium with the MMX graphics/multimedia |
79 | extended instructions. | 79 | extended instructions. |
80 | 80 | ||
81 | config M686 | 81 | config M686 |
82 | bool "Pentium-Pro" | 82 | bool "Pentium-Pro" |
83 | depends on X86_32 | 83 | depends on X86_32 |
84 | help | 84 | ---help--- |
85 | Select this for Intel Pentium Pro chips. This enables the use of | 85 | Select this for Intel Pentium Pro chips. This enables the use of |
86 | Pentium Pro extended instructions, and disables the init-time guard | 86 | Pentium Pro extended instructions, and disables the init-time guard |
87 | against the f00f bug found in earlier Pentiums. | 87 | against the f00f bug found in earlier Pentiums. |
@@ -89,7 +89,7 @@ config M686 | |||
89 | config MPENTIUMII | 89 | config MPENTIUMII |
90 | bool "Pentium-II/Celeron(pre-Coppermine)" | 90 | bool "Pentium-II/Celeron(pre-Coppermine)" |
91 | depends on X86_32 | 91 | depends on X86_32 |
92 | help | 92 | ---help--- |
93 | Select this for Intel chips based on the Pentium-II and | 93 | Select this for Intel chips based on the Pentium-II and |
94 | pre-Coppermine Celeron core. This option enables an unaligned | 94 | pre-Coppermine Celeron core. This option enables an unaligned |
95 | copy optimization, compiles the kernel with optimization flags | 95 | copy optimization, compiles the kernel with optimization flags |
@@ -99,7 +99,7 @@ config MPENTIUMII | |||
99 | config MPENTIUMIII | 99 | config MPENTIUMIII |
100 | bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" | 100 | bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" |
101 | depends on X86_32 | 101 | depends on X86_32 |
102 | help | 102 | ---help--- |
103 | Select this for Intel chips based on the Pentium-III and | 103 | Select this for Intel chips based on the Pentium-III and |
104 | Celeron-Coppermine core. This option enables use of some | 104 | Celeron-Coppermine core. This option enables use of some |
105 | extended prefetch instructions in addition to the Pentium II | 105 | extended prefetch instructions in addition to the Pentium II |
@@ -108,14 +108,14 @@ config MPENTIUMIII | |||
108 | config MPENTIUMM | 108 | config MPENTIUMM |
109 | bool "Pentium M" | 109 | bool "Pentium M" |
110 | depends on X86_32 | 110 | depends on X86_32 |
111 | help | 111 | ---help--- |
112 | Select this for Intel Pentium M (not Pentium-4 M) | 112 | Select this for Intel Pentium M (not Pentium-4 M) |
113 | notebook chips. | 113 | notebook chips. |
114 | 114 | ||
115 | config MPENTIUM4 | 115 | config MPENTIUM4 |
116 | bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" | 116 | bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" |
117 | depends on X86_32 | 117 | depends on X86_32 |
118 | help | 118 | ---help--- |
119 | Select this for Intel Pentium 4 chips. This includes the | 119 | Select this for Intel Pentium 4 chips. This includes the |
120 | Pentium 4, Pentium D, P4-based Celeron and Xeon, and | 120 | Pentium 4, Pentium D, P4-based Celeron and Xeon, and |
121 | Pentium-4 M (not Pentium M) chips. This option enables compile | 121 | Pentium-4 M (not Pentium M) chips. This option enables compile |
@@ -151,7 +151,7 @@ config MPENTIUM4 | |||
151 | config MK6 | 151 | config MK6 |
152 | bool "K6/K6-II/K6-III" | 152 | bool "K6/K6-II/K6-III" |
153 | depends on X86_32 | 153 | depends on X86_32 |
154 | help | 154 | ---help--- |
155 | Select this for an AMD K6-family processor. Enables use of | 155 | Select this for an AMD K6-family processor. Enables use of |
156 | some extended instructions, and passes appropriate optimization | 156 | some extended instructions, and passes appropriate optimization |
157 | flags to GCC. | 157 | flags to GCC. |
@@ -159,14 +159,14 @@ config MK6 | |||
159 | config MK7 | 159 | config MK7 |
160 | bool "Athlon/Duron/K7" | 160 | bool "Athlon/Duron/K7" |
161 | depends on X86_32 | 161 | depends on X86_32 |
162 | help | 162 | ---help--- |
163 | Select this for an AMD Athlon K7-family processor. Enables use of | 163 | Select this for an AMD Athlon K7-family processor. Enables use of |
164 | some extended instructions, and passes appropriate optimization | 164 | some extended instructions, and passes appropriate optimization |
165 | flags to GCC. | 165 | flags to GCC. |
166 | 166 | ||
167 | config MK8 | 167 | config MK8 |
168 | bool "Opteron/Athlon64/Hammer/K8" | 168 | bool "Opteron/Athlon64/Hammer/K8" |
169 | help | 169 | ---help--- |
170 | Select this for an AMD Opteron or Athlon64 Hammer-family processor. | 170 | Select this for an AMD Opteron or Athlon64 Hammer-family processor. |
171 | Enables use of some extended instructions, and passes appropriate | 171 | Enables use of some extended instructions, and passes appropriate |
172 | optimization flags to GCC. | 172 | optimization flags to GCC. |
@@ -174,7 +174,7 @@ config MK8 | |||
174 | config MCRUSOE | 174 | config MCRUSOE |
175 | bool "Crusoe" | 175 | bool "Crusoe" |
176 | depends on X86_32 | 176 | depends on X86_32 |
177 | help | 177 | ---help--- |
178 | Select this for a Transmeta Crusoe processor. Treats the processor | 178 | Select this for a Transmeta Crusoe processor. Treats the processor |
179 | like a 586 with TSC, and sets some GCC optimization flags (like a | 179 | like a 586 with TSC, and sets some GCC optimization flags (like a |
180 | Pentium Pro with no alignment requirements). | 180 | Pentium Pro with no alignment requirements). |
@@ -182,13 +182,13 @@ config MCRUSOE | |||
182 | config MEFFICEON | 182 | config MEFFICEON |
183 | bool "Efficeon" | 183 | bool "Efficeon" |
184 | depends on X86_32 | 184 | depends on X86_32 |
185 | help | 185 | ---help--- |
186 | Select this for a Transmeta Efficeon processor. | 186 | Select this for a Transmeta Efficeon processor. |
187 | 187 | ||
188 | config MWINCHIPC6 | 188 | config MWINCHIPC6 |
189 | bool "Winchip-C6" | 189 | bool "Winchip-C6" |
190 | depends on X86_32 | 190 | depends on X86_32 |
191 | help | 191 | ---help--- |
192 | Select this for an IDT Winchip C6 chip. Linux and GCC | 192 | Select this for an IDT Winchip C6 chip. Linux and GCC |
193 | treat this chip as a 586TSC with some extended instructions | 193 | treat this chip as a 586TSC with some extended instructions |
194 | and alignment requirements. | 194 | and alignment requirements. |
@@ -196,7 +196,7 @@ config MWINCHIPC6 | |||
196 | config MWINCHIP3D | 196 | config MWINCHIP3D |
197 | bool "Winchip-2/Winchip-2A/Winchip-3" | 197 | bool "Winchip-2/Winchip-2A/Winchip-3" |
198 | depends on X86_32 | 198 | depends on X86_32 |
199 | help | 199 | ---help--- |
200 | Select this for an IDT Winchip-2, 2A or 3. Linux and GCC | 200 | Select this for an IDT Winchip-2, 2A or 3. Linux and GCC |
201 | treat this chip as a 586TSC with some extended instructions | 201 | treat this chip as a 586TSC with some extended instructions |
202 | and alignment requirements. Also enable out of order memory | 202 | and alignment requirements. Also enable out of order memory |
@@ -206,19 +206,19 @@ config MWINCHIP3D | |||
206 | config MGEODEGX1 | 206 | config MGEODEGX1 |
207 | bool "GeodeGX1" | 207 | bool "GeodeGX1" |
208 | depends on X86_32 | 208 | depends on X86_32 |
209 | help | 209 | ---help--- |
210 | Select this for a Geode GX1 (Cyrix MediaGX) chip. | 210 | Select this for a Geode GX1 (Cyrix MediaGX) chip. |
211 | 211 | ||
212 | config MGEODE_LX | 212 | config MGEODE_LX |
213 | bool "Geode GX/LX" | 213 | bool "Geode GX/LX" |
214 | depends on X86_32 | 214 | depends on X86_32 |
215 | help | 215 | ---help--- |
216 | Select this for AMD Geode GX and LX processors. | 216 | Select this for AMD Geode GX and LX processors. |
217 | 217 | ||
218 | config MCYRIXIII | 218 | config MCYRIXIII |
219 | bool "CyrixIII/VIA-C3" | 219 | bool "CyrixIII/VIA-C3" |
220 | depends on X86_32 | 220 | depends on X86_32 |
221 | help | 221 | ---help--- |
222 | Select this for a Cyrix III or C3 chip. Presently Linux and GCC | 222 | Select this for a Cyrix III or C3 chip. Presently Linux and GCC |
223 | treat this chip as a generic 586. Whilst the CPU is 686 class, | 223 | treat this chip as a generic 586. Whilst the CPU is 686 class, |
224 | it lacks the cmov extension which gcc assumes is present when | 224 | it lacks the cmov extension which gcc assumes is present when |
@@ -230,7 +230,7 @@ config MCYRIXIII | |||
230 | config MVIAC3_2 | 230 | config MVIAC3_2 |
231 | bool "VIA C3-2 (Nehemiah)" | 231 | bool "VIA C3-2 (Nehemiah)" |
232 | depends on X86_32 | 232 | depends on X86_32 |
233 | help | 233 | ---help--- |
234 | Select this for a VIA C3 "Nehemiah". Selecting this enables usage | 234 | Select this for a VIA C3 "Nehemiah". Selecting this enables usage |
235 | of SSE and tells gcc to treat the CPU as a 686. | 235 | of SSE and tells gcc to treat the CPU as a 686. |
236 | Note, this kernel will not boot on older (pre model 9) C3s. | 236 | Note, this kernel will not boot on older (pre model 9) C3s. |
@@ -238,14 +238,14 @@ config MVIAC3_2 | |||
238 | config MVIAC7 | 238 | config MVIAC7 |
239 | bool "VIA C7" | 239 | bool "VIA C7" |
240 | depends on X86_32 | 240 | depends on X86_32 |
241 | help | 241 | ---help--- |
242 | Select this for a VIA C7. Selecting this uses the correct cache | 242 | Select this for a VIA C7. Selecting this uses the correct cache |
243 | shift and tells gcc to treat the CPU as a 686. | 243 | shift and tells gcc to treat the CPU as a 686. |
244 | 244 | ||
245 | config MPSC | 245 | config MPSC |
246 | bool "Intel P4 / older Netburst based Xeon" | 246 | bool "Intel P4 / older Netburst based Xeon" |
247 | depends on X86_64 | 247 | depends on X86_64 |
248 | help | 248 | ---help--- |
249 | Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey | 249 | Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey |
250 | Xeon CPUs with Intel 64bit which is compatible with x86-64. | 250 | Xeon CPUs with Intel 64bit which is compatible with x86-64. |
251 | Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the | 251 | Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the |
@@ -255,7 +255,7 @@ config MPSC | |||
255 | 255 | ||
256 | config MCORE2 | 256 | config MCORE2 |
257 | bool "Core 2/newer Xeon" | 257 | bool "Core 2/newer Xeon" |
258 | help | 258 | ---help--- |
259 | 259 | ||
260 | Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and | 260 | Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and |
261 | 53xx) CPUs. You can distinguish newer from older Xeons by the CPU | 261 | 53xx) CPUs. You can distinguish newer from older Xeons by the CPU |
@@ -265,7 +265,7 @@ config MCORE2 | |||
265 | config GENERIC_CPU | 265 | config GENERIC_CPU |
266 | bool "Generic-x86-64" | 266 | bool "Generic-x86-64" |
267 | depends on X86_64 | 267 | depends on X86_64 |
268 | help | 268 | ---help--- |
269 | Generic x86-64 CPU. | 269 | Generic x86-64 CPU. |
270 | Run equally well on all x86-64 CPUs. | 270 | Run equally well on all x86-64 CPUs. |
271 | 271 | ||
@@ -274,7 +274,7 @@ endchoice | |||
274 | config X86_GENERIC | 274 | config X86_GENERIC |
275 | bool "Generic x86 support" | 275 | bool "Generic x86 support" |
276 | depends on X86_32 | 276 | depends on X86_32 |
277 | help | 277 | ---help--- |
278 | Instead of just including optimizations for the selected | 278 | Instead of just including optimizations for the selected |
279 | x86 variant (e.g. PII, Crusoe or Athlon), include some more | 279 | x86 variant (e.g. PII, Crusoe or Athlon), include some more |
280 | generic optimizations as well. This will make the kernel | 280 | generic optimizations as well. This will make the kernel |
@@ -319,7 +319,7 @@ config X86_XADD | |||
319 | config X86_PPRO_FENCE | 319 | config X86_PPRO_FENCE |
320 | bool "PentiumPro memory ordering errata workaround" | 320 | bool "PentiumPro memory ordering errata workaround" |
321 | depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 | 321 | depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 |
322 | help | 322 | ---help--- |
323 | Old PentiumPro multiprocessor systems had errata that could cause | 323 | Old PentiumPro multiprocessor systems had errata that could cause |
324 | memory operations to violate the x86 ordering standard in rare cases. | 324 | memory operations to violate the x86 ordering standard in rare cases. |
325 | Enabling this option will attempt to work around some (but not all) | 325 | Enabling this option will attempt to work around some (but not all) |
@@ -412,14 +412,14 @@ config X86_DEBUGCTLMSR | |||
412 | 412 | ||
413 | menuconfig PROCESSOR_SELECT | 413 | menuconfig PROCESSOR_SELECT |
414 | bool "Supported processor vendors" if EMBEDDED | 414 | bool "Supported processor vendors" if EMBEDDED |
415 | help | 415 | ---help--- |
416 | This lets you choose what x86 vendor support code your kernel | 416 | This lets you choose what x86 vendor support code your kernel |
417 | will include. | 417 | will include. |
418 | 418 | ||
419 | config CPU_SUP_INTEL | 419 | config CPU_SUP_INTEL |
420 | default y | 420 | default y |
421 | bool "Support Intel processors" if PROCESSOR_SELECT | 421 | bool "Support Intel processors" if PROCESSOR_SELECT |
422 | help | 422 | ---help--- |
423 | This enables detection, tunings and quirks for Intel processors | 423 | This enables detection, tunings and quirks for Intel processors |
424 | 424 | ||
425 | You need this enabled if you want your kernel to run on an | 425 | You need this enabled if you want your kernel to run on an |
@@ -433,7 +433,7 @@ config CPU_SUP_CYRIX_32 | |||
433 | default y | 433 | default y |
434 | bool "Support Cyrix processors" if PROCESSOR_SELECT | 434 | bool "Support Cyrix processors" if PROCESSOR_SELECT |
435 | depends on !64BIT | 435 | depends on !64BIT |
436 | help | 436 | ---help--- |
437 | This enables detection, tunings and quirks for Cyrix processors | 437 | This enables detection, tunings and quirks for Cyrix processors |
438 | 438 | ||
439 | You need this enabled if you want your kernel to run on a | 439 | You need this enabled if you want your kernel to run on a |
@@ -446,7 +446,7 @@ config CPU_SUP_CYRIX_32 | |||
446 | config CPU_SUP_AMD | 446 | config CPU_SUP_AMD |
447 | default y | 447 | default y |
448 | bool "Support AMD processors" if PROCESSOR_SELECT | 448 | bool "Support AMD processors" if PROCESSOR_SELECT |
449 | help | 449 | ---help--- |
450 | This enables detection, tunings and quirks for AMD processors | 450 | This enables detection, tunings and quirks for AMD processors |
451 | 451 | ||
452 | You need this enabled if you want your kernel to run on an | 452 | You need this enabled if you want your kernel to run on an |
@@ -460,7 +460,7 @@ config CPU_SUP_CENTAUR_32 | |||
460 | default y | 460 | default y |
461 | bool "Support Centaur processors" if PROCESSOR_SELECT | 461 | bool "Support Centaur processors" if PROCESSOR_SELECT |
462 | depends on !64BIT | 462 | depends on !64BIT |
463 | help | 463 | ---help--- |
464 | This enables detection, tunings and quirks for Centaur processors | 464 | This enables detection, tunings and quirks for Centaur processors |
465 | 465 | ||
466 | You need this enabled if you want your kernel to run on a | 466 | You need this enabled if you want your kernel to run on a |
@@ -474,7 +474,7 @@ config CPU_SUP_CENTAUR_64 | |||
474 | default y | 474 | default y |
475 | bool "Support Centaur processors" if PROCESSOR_SELECT | 475 | bool "Support Centaur processors" if PROCESSOR_SELECT |
476 | depends on 64BIT | 476 | depends on 64BIT |
477 | help | 477 | ---help--- |
478 | This enables detection, tunings and quirks for Centaur processors | 478 | This enables detection, tunings and quirks for Centaur processors |
479 | 479 | ||
480 | You need this enabled if you want your kernel to run on a | 480 | You need this enabled if you want your kernel to run on a |
@@ -488,7 +488,7 @@ config CPU_SUP_TRANSMETA_32 | |||
488 | default y | 488 | default y |
489 | bool "Support Transmeta processors" if PROCESSOR_SELECT | 489 | bool "Support Transmeta processors" if PROCESSOR_SELECT |
490 | depends on !64BIT | 490 | depends on !64BIT |
491 | help | 491 | ---help--- |
492 | This enables detection, tunings and quirks for Transmeta processors | 492 | This enables detection, tunings and quirks for Transmeta processors |
493 | 493 | ||
494 | You need this enabled if you want your kernel to run on a | 494 | You need this enabled if you want your kernel to run on a |
@@ -502,7 +502,7 @@ config CPU_SUP_UMC_32 | |||
502 | default y | 502 | default y |
503 | bool "Support UMC processors" if PROCESSOR_SELECT | 503 | bool "Support UMC processors" if PROCESSOR_SELECT |
504 | depends on !64BIT | 504 | depends on !64BIT |
505 | help | 505 | ---help--- |
506 | This enables detection, tunings and quirks for UMC processors | 506 | This enables detection, tunings and quirks for UMC processors |
507 | 507 | ||
508 | You need this enabled if you want your kernel to run on a | 508 | You need this enabled if you want your kernel to run on a |
@@ -521,7 +521,7 @@ config X86_PTRACE_BTS | |||
521 | bool "Branch Trace Store" | 521 | bool "Branch Trace Store" |
522 | default y | 522 | default y |
523 | depends on X86_DEBUGCTLMSR | 523 | depends on X86_DEBUGCTLMSR |
524 | help | 524 | ---help--- |
525 | This adds a ptrace interface to the hardware's branch trace store. | 525 | This adds a ptrace interface to the hardware's branch trace store. |
526 | 526 | ||
527 | Debuggers may use it to collect an execution trace of the debugged | 527 | Debuggers may use it to collect an execution trace of the debugged |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 28f111461ca8..fdb45df608b6 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -7,7 +7,7 @@ source "lib/Kconfig.debug" | |||
7 | 7 | ||
8 | config STRICT_DEVMEM | 8 | config STRICT_DEVMEM |
9 | bool "Filter access to /dev/mem" | 9 | bool "Filter access to /dev/mem" |
10 | help | 10 | ---help--- |
11 | If this option is disabled, you allow userspace (root) access to all | 11 | If this option is disabled, you allow userspace (root) access to all |
12 | of memory, including kernel and userspace memory. Accidental | 12 | of memory, including kernel and userspace memory. Accidental |
13 | access to this is obviously disastrous, but specific access can | 13 | access to this is obviously disastrous, but specific access can |
@@ -25,7 +25,7 @@ config STRICT_DEVMEM | |||
25 | config X86_VERBOSE_BOOTUP | 25 | config X86_VERBOSE_BOOTUP |
26 | bool "Enable verbose x86 bootup info messages" | 26 | bool "Enable verbose x86 bootup info messages" |
27 | default y | 27 | default y |
28 | help | 28 | ---help--- |
29 | Enables the informational output from the decompression stage | 29 | Enables the informational output from the decompression stage |
30 | (e.g. bzImage) of the boot. If you disable this you will still | 30 | (e.g. bzImage) of the boot. If you disable this you will still |
31 | see errors. Disable this if you want silent bootup. | 31 | see errors. Disable this if you want silent bootup. |
@@ -33,7 +33,7 @@ config X86_VERBOSE_BOOTUP | |||
33 | config EARLY_PRINTK | 33 | config EARLY_PRINTK |
34 | bool "Early printk" if EMBEDDED | 34 | bool "Early printk" if EMBEDDED |
35 | default y | 35 | default y |
36 | help | 36 | ---help--- |
37 | Write kernel log output directly into the VGA buffer or to a serial | 37 | Write kernel log output directly into the VGA buffer or to a serial |
38 | port. | 38 | port. |
39 | 39 | ||
@@ -47,7 +47,7 @@ config EARLY_PRINTK_DBGP | |||
47 | bool "Early printk via EHCI debug port" | 47 | bool "Early printk via EHCI debug port" |
48 | default n | 48 | default n |
49 | depends on EARLY_PRINTK && PCI | 49 | depends on EARLY_PRINTK && PCI |
50 | help | 50 | ---help--- |
51 | Write kernel log output directly into the EHCI debug port. | 51 | Write kernel log output directly into the EHCI debug port. |
52 | 52 | ||
53 | This is useful for kernel debugging when your machine crashes very | 53 | This is useful for kernel debugging when your machine crashes very |
@@ -59,14 +59,14 @@ config EARLY_PRINTK_DBGP | |||
59 | config DEBUG_STACKOVERFLOW | 59 | config DEBUG_STACKOVERFLOW |
60 | bool "Check for stack overflows" | 60 | bool "Check for stack overflows" |
61 | depends on DEBUG_KERNEL | 61 | depends on DEBUG_KERNEL |
62 | help | 62 | ---help--- |
63 | This option will cause messages to be printed if free stack space | 63 | This option will cause messages to be printed if free stack space |
64 | drops below a certain limit. | 64 | drops below a certain limit. |
65 | 65 | ||
66 | config DEBUG_STACK_USAGE | 66 | config DEBUG_STACK_USAGE |
67 | bool "Stack utilization instrumentation" | 67 | bool "Stack utilization instrumentation" |
68 | depends on DEBUG_KERNEL | 68 | depends on DEBUG_KERNEL |
69 | help | 69 | ---help--- |
70 | Enables the display of the minimum amount of free stack which each | 70 | Enables the display of the minimum amount of free stack which each |
71 | task has ever had available in the sysrq-T and sysrq-P debug output. | 71 | task has ever had available in the sysrq-T and sysrq-P debug output. |
72 | 72 | ||
@@ -75,7 +75,7 @@ config DEBUG_STACK_USAGE | |||
75 | config DEBUG_PAGEALLOC | 75 | config DEBUG_PAGEALLOC |
76 | bool "Debug page memory allocations" | 76 | bool "Debug page memory allocations" |
77 | depends on DEBUG_KERNEL | 77 | depends on DEBUG_KERNEL |
78 | help | 78 | ---help--- |
79 | Unmap pages from the kernel linear mapping after free_pages(). | 79 | Unmap pages from the kernel linear mapping after free_pages(). |
80 | This results in a large slowdown, but helps to find certain types | 80 | This results in a large slowdown, but helps to find certain types |
81 | of memory corruptions. | 81 | of memory corruptions. |
@@ -83,9 +83,9 @@ config DEBUG_PAGEALLOC | |||
83 | config DEBUG_PER_CPU_MAPS | 83 | config DEBUG_PER_CPU_MAPS |
84 | bool "Debug access to per_cpu maps" | 84 | bool "Debug access to per_cpu maps" |
85 | depends on DEBUG_KERNEL | 85 | depends on DEBUG_KERNEL |
86 | depends on X86_SMP | 86 | depends on SMP |
87 | default n | 87 | default n |
88 | help | 88 | ---help--- |
89 | Say Y to verify that the per_cpu map being accessed has | 89 | Say Y to verify that the per_cpu map being accessed has |
90 | been setup. Adds a fair amount of code to kernel memory | 90 | been setup. Adds a fair amount of code to kernel memory |
91 | and decreases performance. | 91 | and decreases performance. |
@@ -96,7 +96,7 @@ config X86_PTDUMP | |||
96 | bool "Export kernel pagetable layout to userspace via debugfs" | 96 | bool "Export kernel pagetable layout to userspace via debugfs" |
97 | depends on DEBUG_KERNEL | 97 | depends on DEBUG_KERNEL |
98 | select DEBUG_FS | 98 | select DEBUG_FS |
99 | help | 99 | ---help--- |
100 | Say Y here if you want to show the kernel pagetable layout in a | 100 | Say Y here if you want to show the kernel pagetable layout in a |
101 | debugfs file. This information is only useful for kernel developers | 101 | debugfs file. This information is only useful for kernel developers |
102 | who are working in architecture specific areas of the kernel. | 102 | who are working in architecture specific areas of the kernel. |
@@ -108,7 +108,7 @@ config DEBUG_RODATA | |||
108 | bool "Write protect kernel read-only data structures" | 108 | bool "Write protect kernel read-only data structures" |
109 | default y | 109 | default y |
110 | depends on DEBUG_KERNEL | 110 | depends on DEBUG_KERNEL |
111 | help | 111 | ---help--- |
112 | Mark the kernel read-only data as write-protected in the pagetables, | 112 | Mark the kernel read-only data as write-protected in the pagetables, |
113 | in order to catch accidental (and incorrect) writes to such const | 113 | in order to catch accidental (and incorrect) writes to such const |
114 | data. This is recommended so that we can catch kernel bugs sooner. | 114 | data. This is recommended so that we can catch kernel bugs sooner. |
@@ -118,7 +118,7 @@ config DEBUG_RODATA_TEST | |||
118 | bool "Testcase for the DEBUG_RODATA feature" | 118 | bool "Testcase for the DEBUG_RODATA feature" |
119 | depends on DEBUG_RODATA | 119 | depends on DEBUG_RODATA |
120 | default y | 120 | default y |
121 | help | 121 | ---help--- |
122 | This option enables a testcase for the DEBUG_RODATA | 122 | This option enables a testcase for the DEBUG_RODATA |
123 | feature as well as for the change_page_attr() infrastructure. | 123 | feature as well as for the change_page_attr() infrastructure. |
124 | If in doubt, say "N" | 124 | If in doubt, say "N" |
@@ -126,7 +126,7 @@ config DEBUG_RODATA_TEST | |||
126 | config DEBUG_NX_TEST | 126 | config DEBUG_NX_TEST |
127 | tristate "Testcase for the NX non-executable stack feature" | 127 | tristate "Testcase for the NX non-executable stack feature" |
128 | depends on DEBUG_KERNEL && m | 128 | depends on DEBUG_KERNEL && m |
129 | help | 129 | ---help--- |
130 | This option enables a testcase for the CPU NX capability | 130 | This option enables a testcase for the CPU NX capability |
131 | and the software setup of this feature. | 131 | and the software setup of this feature. |
132 | If in doubt, say "N" | 132 | If in doubt, say "N" |
@@ -134,7 +134,7 @@ config DEBUG_NX_TEST | |||
134 | config 4KSTACKS | 134 | config 4KSTACKS |
135 | bool "Use 4Kb for kernel stacks instead of 8Kb" | 135 | bool "Use 4Kb for kernel stacks instead of 8Kb" |
136 | depends on X86_32 | 136 | depends on X86_32 |
137 | help | 137 | ---help--- |
138 | If you say Y here the kernel will use a 4Kb stacksize for the | 138 | If you say Y here the kernel will use a 4Kb stacksize for the |
139 | kernel stack attached to each process/thread. This facilitates | 139 | kernel stack attached to each process/thread. This facilitates |
140 | running more threads on a system and also reduces the pressure | 140 | running more threads on a system and also reduces the pressure |
@@ -145,7 +145,7 @@ config DOUBLEFAULT | |||
145 | default y | 145 | default y |
146 | bool "Enable doublefault exception handler" if EMBEDDED | 146 | bool "Enable doublefault exception handler" if EMBEDDED |
147 | depends on X86_32 | 147 | depends on X86_32 |
148 | help | 148 | ---help--- |
149 | This option allows trapping of rare doublefault exceptions that | 149 | This option allows trapping of rare doublefault exceptions that |
150 | would otherwise cause a system to silently reboot. Disabling this | 150 | would otherwise cause a system to silently reboot. Disabling this |
151 | option saves about 4k and might cause you much additional grey | 151 | option saves about 4k and might cause you much additional grey |
@@ -155,7 +155,7 @@ config IOMMU_DEBUG | |||
155 | bool "Enable IOMMU debugging" | 155 | bool "Enable IOMMU debugging" |
156 | depends on GART_IOMMU && DEBUG_KERNEL | 156 | depends on GART_IOMMU && DEBUG_KERNEL |
157 | depends on X86_64 | 157 | depends on X86_64 |
158 | help | 158 | ---help--- |
159 | Force the IOMMU to on even when you have less than 4GB of | 159 | Force the IOMMU to on even when you have less than 4GB of |
160 | memory and add debugging code. On overflow always panic. And | 160 | memory and add debugging code. On overflow always panic. And |
161 | allow to enable IOMMU leak tracing. Can be disabled at boot | 161 | allow to enable IOMMU leak tracing. Can be disabled at boot |
@@ -171,32 +171,12 @@ config IOMMU_LEAK | |||
171 | bool "IOMMU leak tracing" | 171 | bool "IOMMU leak tracing" |
172 | depends on DEBUG_KERNEL | 172 | depends on DEBUG_KERNEL |
173 | depends on IOMMU_DEBUG | 173 | depends on IOMMU_DEBUG |
174 | help | 174 | ---help--- |
175 | Add a simple leak tracer to the IOMMU code. This is useful when you | 175 | Add a simple leak tracer to the IOMMU code. This is useful when you |
176 | are debugging a buggy device driver that leaks IOMMU mappings. | 176 | are debugging a buggy device driver that leaks IOMMU mappings. |
177 | 177 | ||
178 | config MMIOTRACE | 178 | config HAVE_MMIOTRACE_SUPPORT |
179 | bool "Memory mapped IO tracing" | 179 | def_bool y |
180 | depends on DEBUG_KERNEL && PCI | ||
181 | select TRACING | ||
182 | help | ||
183 | Mmiotrace traces Memory Mapped I/O access and is meant for | ||
184 | debugging and reverse engineering. It is called from the ioremap | ||
185 | implementation and works via page faults. Tracing is disabled by | ||
186 | default and can be enabled at run-time. | ||
187 | |||
188 | See Documentation/tracers/mmiotrace.txt. | ||
189 | If you are not helping to develop drivers, say N. | ||
190 | |||
191 | config MMIOTRACE_TEST | ||
192 | tristate "Test module for mmiotrace" | ||
193 | depends on MMIOTRACE && m | ||
194 | help | ||
195 | This is a dumb module for testing mmiotrace. It is very dangerous | ||
196 | as it will write garbage to IO memory starting at a given address. | ||
197 | However, it should be safe to use on e.g. unused portion of VRAM. | ||
198 | |||
199 | Say N, unless you absolutely know what you are doing. | ||
200 | 180 | ||
201 | # | 181 | # |
202 | # IO delay types: | 182 | # IO delay types: |
@@ -224,25 +204,25 @@ choice | |||
224 | 204 | ||
225 | config IO_DELAY_0X80 | 205 | config IO_DELAY_0X80 |
226 | bool "port 0x80 based port-IO delay [recommended]" | 206 | bool "port 0x80 based port-IO delay [recommended]" |
227 | help | 207 | ---help--- |
228 | This is the traditional Linux IO delay used for in/out_p. | 208 | This is the traditional Linux IO delay used for in/out_p. |
229 | It is the most tested hence safest selection here. | 209 | It is the most tested hence safest selection here. |
230 | 210 | ||
231 | config IO_DELAY_0XED | 211 | config IO_DELAY_0XED |
232 | bool "port 0xed based port-IO delay" | 212 | bool "port 0xed based port-IO delay" |
233 | help | 213 | ---help--- |
234 | Use port 0xed as the IO delay. This frees up port 0x80 which is | 214 | Use port 0xed as the IO delay. This frees up port 0x80 which is |
235 | often used as a hardware-debug port. | 215 | often used as a hardware-debug port. |
236 | 216 | ||
237 | config IO_DELAY_UDELAY | 217 | config IO_DELAY_UDELAY |
238 | bool "udelay based port-IO delay" | 218 | bool "udelay based port-IO delay" |
239 | help | 219 | ---help--- |
240 | Use udelay(2) as the IO delay method. This provides the delay | 220 | Use udelay(2) as the IO delay method. This provides the delay |
241 | while not having any side-effect on the IO port space. | 221 | while not having any side-effect on the IO port space. |
242 | 222 | ||
243 | config IO_DELAY_NONE | 223 | config IO_DELAY_NONE |
244 | bool "no port-IO delay" | 224 | bool "no port-IO delay" |
245 | help | 225 | ---help--- |
246 | No port-IO delay. Will break on old boxes that require port-IO | 226 | No port-IO delay. Will break on old boxes that require port-IO |
247 | delay for certain operations. Should work on most new machines. | 227 | delay for certain operations. Should work on most new machines. |
248 | 228 | ||
@@ -276,18 +256,18 @@ config DEBUG_BOOT_PARAMS | |||
276 | bool "Debug boot parameters" | 256 | bool "Debug boot parameters" |
277 | depends on DEBUG_KERNEL | 257 | depends on DEBUG_KERNEL |
278 | depends on DEBUG_FS | 258 | depends on DEBUG_FS |
279 | help | 259 | ---help--- |
280 | This option will cause struct boot_params to be exported via debugfs. | 260 | This option will cause struct boot_params to be exported via debugfs. |
281 | 261 | ||
282 | config CPA_DEBUG | 262 | config CPA_DEBUG |
283 | bool "CPA self-test code" | 263 | bool "CPA self-test code" |
284 | depends on DEBUG_KERNEL | 264 | depends on DEBUG_KERNEL |
285 | help | 265 | ---help--- |
286 | Do change_page_attr() self-tests every 30 seconds. | 266 | Do change_page_attr() self-tests every 30 seconds. |
287 | 267 | ||
288 | config OPTIMIZE_INLINING | 268 | config OPTIMIZE_INLINING |
289 | bool "Allow gcc to uninline functions marked 'inline'" | 269 | bool "Allow gcc to uninline functions marked 'inline'" |
290 | help | 270 | ---help--- |
291 | This option determines if the kernel forces gcc to inline the functions | 271 | This option determines if the kernel forces gcc to inline the functions |
292 | developers have marked 'inline'. Doing so takes away freedom from gcc to | 272 | developers have marked 'inline'. Doing so takes away freedom from gcc to |
293 | do what it thinks is best, which is desirable for the gcc 3.x series of | 273 | do what it thinks is best, which is desirable for the gcc 3.x series of |
@@ -300,4 +280,3 @@ config OPTIMIZE_INLINING | |||
300 | If unsure, say N. | 280 | If unsure, say N. |
301 | 281 | ||
302 | endmenu | 282 | endmenu |
303 | |||
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index ab48ab497e5a..1836191839ee 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -105,29 +105,6 @@ KBUILD_CFLAGS += -fno-asynchronous-unwind-tables | |||
105 | # prevent gcc from generating any FP code by mistake | 105 | # prevent gcc from generating any FP code by mistake |
106 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) | 106 | KBUILD_CFLAGS += $(call cc-option,-mno-sse -mno-mmx -mno-sse2 -mno-3dnow,) |
107 | 107 | ||
108 | ### | ||
109 | # Sub architecture support | ||
110 | # fcore-y is linked before mcore-y files. | ||
111 | |||
112 | # Default subarch .c files | ||
113 | mcore-y := arch/x86/mach-default/ | ||
114 | |||
115 | # Voyager subarch support | ||
116 | mflags-$(CONFIG_X86_VOYAGER) := -Iarch/x86/include/asm/mach-voyager | ||
117 | mcore-$(CONFIG_X86_VOYAGER) := arch/x86/mach-voyager/ | ||
118 | |||
119 | # generic subarchitecture | ||
120 | mflags-$(CONFIG_X86_GENERICARCH):= -Iarch/x86/include/asm/mach-generic | ||
121 | fcore-$(CONFIG_X86_GENERICARCH) += arch/x86/mach-generic/ | ||
122 | mcore-$(CONFIG_X86_GENERICARCH) := arch/x86/mach-default/ | ||
123 | |||
124 | # default subarch .h files | ||
125 | mflags-y += -Iarch/x86/include/asm/mach-default | ||
126 | |||
127 | # 64 bit does not support subarch support - clear sub arch variables | ||
128 | fcore-$(CONFIG_X86_64) := | ||
129 | mcore-$(CONFIG_X86_64) := | ||
130 | |||
131 | KBUILD_CFLAGS += $(mflags-y) | 108 | KBUILD_CFLAGS += $(mflags-y) |
132 | KBUILD_AFLAGS += $(mflags-y) | 109 | KBUILD_AFLAGS += $(mflags-y) |
133 | 110 | ||
@@ -153,9 +130,6 @@ core-$(CONFIG_LGUEST_GUEST) += arch/x86/lguest/ | |||
153 | core-y += arch/x86/kernel/ | 130 | core-y += arch/x86/kernel/ |
154 | core-y += arch/x86/mm/ | 131 | core-y += arch/x86/mm/ |
155 | 132 | ||
156 | # Remaining sub architecture files | ||
157 | core-y += $(mcore-y) | ||
158 | |||
159 | core-y += arch/x86/crypto/ | 133 | core-y += arch/x86/crypto/ |
160 | core-y += arch/x86/vdso/ | 134 | core-y += arch/x86/vdso/ |
161 | core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/ | 135 | core-$(CONFIG_IA32_EMULATION) += arch/x86/ia32/ |
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile index cd48c7210016..c70eff69a1fb 100644 --- a/arch/x86/boot/Makefile +++ b/arch/x86/boot/Makefile | |||
@@ -32,7 +32,6 @@ setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o | |||
32 | setup-y += header.o main.o mca.o memory.o pm.o pmjump.o | 32 | setup-y += header.o main.o mca.o memory.o pm.o pmjump.o |
33 | setup-y += printf.o string.o tty.o video.o video-mode.o version.o | 33 | setup-y += printf.o string.o tty.o video.o video-mode.o version.o |
34 | setup-$(CONFIG_X86_APM_BOOT) += apm.o | 34 | setup-$(CONFIG_X86_APM_BOOT) += apm.o |
35 | setup-$(CONFIG_X86_VOYAGER) += voyager.o | ||
36 | 35 | ||
37 | # The link order of the video-*.o modules can matter. In particular, | 36 | # The link order of the video-*.o modules can matter. In particular, |
38 | # video-vga.o *must* be listed first, followed by video-vesa.o. | 37 | # video-vga.o *must* be listed first, followed by video-vesa.o. |
diff --git a/arch/x86/boot/a20.c b/arch/x86/boot/a20.c index 4063d630deff..7c19ce8c2442 100644 --- a/arch/x86/boot/a20.c +++ b/arch/x86/boot/a20.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Copyright (C) 1991, 1992 Linus Torvalds | 3 | * Copyright (C) 1991, 1992 Linus Torvalds |
4 | * Copyright 2007-2008 rPath, Inc. - All Rights Reserved | 4 | * Copyright 2007-2008 rPath, Inc. - All Rights Reserved |
5 | * Copyright 2009 Intel Corporation | ||
5 | * | 6 | * |
6 | * This file is part of the Linux kernel, and is made available under | 7 | * This file is part of the Linux kernel, and is made available under |
7 | * the terms of the GNU General Public License version 2. | 8 | * the terms of the GNU General Public License version 2. |
@@ -15,16 +16,23 @@ | |||
15 | #include "boot.h" | 16 | #include "boot.h" |
16 | 17 | ||
17 | #define MAX_8042_LOOPS 100000 | 18 | #define MAX_8042_LOOPS 100000 |
19 | #define MAX_8042_FF 32 | ||
18 | 20 | ||
19 | static int empty_8042(void) | 21 | static int empty_8042(void) |
20 | { | 22 | { |
21 | u8 status; | 23 | u8 status; |
22 | int loops = MAX_8042_LOOPS; | 24 | int loops = MAX_8042_LOOPS; |
25 | int ffs = MAX_8042_FF; | ||
23 | 26 | ||
24 | while (loops--) { | 27 | while (loops--) { |
25 | io_delay(); | 28 | io_delay(); |
26 | 29 | ||
27 | status = inb(0x64); | 30 | status = inb(0x64); |
31 | if (status == 0xff) { | ||
32 | /* FF is a plausible, but very unlikely status */ | ||
33 | if (!--ffs) | ||
34 | return -1; /* Assume no KBC present */ | ||
35 | } | ||
28 | if (status & 1) { | 36 | if (status & 1) { |
29 | /* Read and discard input data */ | 37 | /* Read and discard input data */ |
30 | io_delay(); | 38 | io_delay(); |
@@ -118,44 +126,37 @@ static void enable_a20_fast(void) | |||
118 | 126 | ||
119 | int enable_a20(void) | 127 | int enable_a20(void) |
120 | { | 128 | { |
121 | #if defined(CONFIG_X86_ELAN) | ||
122 | /* Elan croaks if we try to touch the KBC */ | ||
123 | enable_a20_fast(); | ||
124 | while (!a20_test_long()) | ||
125 | ; | ||
126 | return 0; | ||
127 | #elif defined(CONFIG_X86_VOYAGER) | ||
128 | /* On Voyager, a20_test() is unsafe? */ | ||
129 | enable_a20_kbc(); | ||
130 | return 0; | ||
131 | #else | ||
132 | int loops = A20_ENABLE_LOOPS; | 129 | int loops = A20_ENABLE_LOOPS; |
133 | while (loops--) { | 130 | int kbc_err; |
134 | /* First, check to see if A20 is already enabled | 131 | |
135 | (legacy free, etc.) */ | 132 | while (loops--) { |
136 | if (a20_test_short()) | 133 | /* First, check to see if A20 is already enabled |
137 | return 0; | 134 | (legacy free, etc.) */ |
138 | 135 | if (a20_test_short()) | |
139 | /* Next, try the BIOS (INT 0x15, AX=0x2401) */ | 136 | return 0; |
140 | enable_a20_bios(); | 137 | |
141 | if (a20_test_short()) | 138 | /* Next, try the BIOS (INT 0x15, AX=0x2401) */ |
142 | return 0; | 139 | enable_a20_bios(); |
143 | 140 | if (a20_test_short()) | |
144 | /* Try enabling A20 through the keyboard controller */ | 141 | return 0; |
145 | empty_8042(); | 142 | |
146 | if (a20_test_short()) | 143 | /* Try enabling A20 through the keyboard controller */ |
147 | return 0; /* BIOS worked, but with delayed reaction */ | 144 | kbc_err = empty_8042(); |
148 | 145 | ||
149 | enable_a20_kbc(); | 146 | if (a20_test_short()) |
150 | if (a20_test_long()) | 147 | return 0; /* BIOS worked, but with delayed reaction */ |
151 | return 0; | 148 | |
152 | 149 | if (!kbc_err) { | |
153 | /* Finally, try enabling the "fast A20 gate" */ | 150 | enable_a20_kbc(); |
154 | enable_a20_fast(); | 151 | if (a20_test_long()) |
155 | if (a20_test_long()) | 152 | return 0; |
156 | return 0; | 153 | } |
157 | } | 154 | |
158 | 155 | /* Finally, try enabling the "fast A20 gate" */ | |
159 | return -1; | 156 | enable_a20_fast(); |
160 | #endif | 157 | if (a20_test_long()) |
158 | return 0; | ||
159 | } | ||
160 | |||
161 | return -1; | ||
161 | } | 162 | } |
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index cc0ef13fba7a..7b2692e897e5 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h | |||
@@ -302,9 +302,6 @@ void probe_cards(int unsafe); | |||
302 | /* video-vesa.c */ | 302 | /* video-vesa.c */ |
303 | void vesa_store_edid(void); | 303 | void vesa_store_edid(void); |
304 | 304 | ||
305 | /* voyager.c */ | ||
306 | int query_voyager(void); | ||
307 | |||
308 | #endif /* __ASSEMBLY__ */ | 305 | #endif /* __ASSEMBLY__ */ |
309 | 306 | ||
310 | #endif /* BOOT_BOOT_H */ | 307 | #endif /* BOOT_BOOT_H */ |
diff --git a/arch/x86/boot/compressed/head_32.S b/arch/x86/boot/compressed/head_32.S index 29c5fbf08392..3a8a866fb2e2 100644 --- a/arch/x86/boot/compressed/head_32.S +++ b/arch/x86/boot/compressed/head_32.S | |||
@@ -25,14 +25,12 @@ | |||
25 | 25 | ||
26 | #include <linux/linkage.h> | 26 | #include <linux/linkage.h> |
27 | #include <asm/segment.h> | 27 | #include <asm/segment.h> |
28 | #include <asm/page.h> | 28 | #include <asm/page_types.h> |
29 | #include <asm/boot.h> | 29 | #include <asm/boot.h> |
30 | #include <asm/asm-offsets.h> | 30 | #include <asm/asm-offsets.h> |
31 | 31 | ||
32 | .section ".text.head","ax",@progbits | 32 | .section ".text.head","ax",@progbits |
33 | .globl startup_32 | 33 | ENTRY(startup_32) |
34 | |||
35 | startup_32: | ||
36 | cld | 34 | cld |
37 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking | 35 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking |
38 | * us to not reload segments */ | 36 | * us to not reload segments */ |
@@ -113,6 +111,8 @@ startup_32: | |||
113 | */ | 111 | */ |
114 | leal relocated(%ebx), %eax | 112 | leal relocated(%ebx), %eax |
115 | jmp *%eax | 113 | jmp *%eax |
114 | ENDPROC(startup_32) | ||
115 | |||
116 | .section ".text" | 116 | .section ".text" |
117 | relocated: | 117 | relocated: |
118 | 118 | ||
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index 1d5dff4123e1..ed4a82948002 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S | |||
@@ -26,8 +26,8 @@ | |||
26 | 26 | ||
27 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
28 | #include <asm/segment.h> | 28 | #include <asm/segment.h> |
29 | #include <asm/pgtable.h> | 29 | #include <asm/pgtable_types.h> |
30 | #include <asm/page.h> | 30 | #include <asm/page_types.h> |
31 | #include <asm/boot.h> | 31 | #include <asm/boot.h> |
32 | #include <asm/msr.h> | 32 | #include <asm/msr.h> |
33 | #include <asm/processor-flags.h> | 33 | #include <asm/processor-flags.h> |
@@ -35,9 +35,7 @@ | |||
35 | 35 | ||
36 | .section ".text.head" | 36 | .section ".text.head" |
37 | .code32 | 37 | .code32 |
38 | .globl startup_32 | 38 | ENTRY(startup_32) |
39 | |||
40 | startup_32: | ||
41 | cld | 39 | cld |
42 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking | 40 | /* test KEEP_SEGMENTS flag to see if the bootloader is asking |
43 | * us to not reload segments */ | 41 | * us to not reload segments */ |
@@ -176,6 +174,7 @@ startup_32: | |||
176 | 174 | ||
177 | /* Jump from 32bit compatibility mode into 64bit mode. */ | 175 | /* Jump from 32bit compatibility mode into 64bit mode. */ |
178 | lret | 176 | lret |
177 | ENDPROC(startup_32) | ||
179 | 178 | ||
180 | no_longmode: | 179 | no_longmode: |
181 | /* This isn't an x86-64 CPU so hang */ | 180 | /* This isn't an x86-64 CPU so hang */ |
@@ -295,7 +294,6 @@ relocated: | |||
295 | call decompress_kernel | 294 | call decompress_kernel |
296 | popq %rsi | 295 | popq %rsi |
297 | 296 | ||
298 | |||
299 | /* | 297 | /* |
300 | * Jump to the decompressed kernel. | 298 | * Jump to the decompressed kernel. |
301 | */ | 299 | */ |
diff --git a/arch/x86/boot/copy.S b/arch/x86/boot/copy.S index ef50c84e8b4b..11f272c6f5e9 100644 --- a/arch/x86/boot/copy.S +++ b/arch/x86/boot/copy.S | |||
@@ -8,6 +8,8 @@ | |||
8 | * | 8 | * |
9 | * ----------------------------------------------------------------------- */ | 9 | * ----------------------------------------------------------------------- */ |
10 | 10 | ||
11 | #include <linux/linkage.h> | ||
12 | |||
11 | /* | 13 | /* |
12 | * Memory copy routines | 14 | * Memory copy routines |
13 | */ | 15 | */ |
@@ -15,9 +17,7 @@ | |||
15 | .code16gcc | 17 | .code16gcc |
16 | .text | 18 | .text |
17 | 19 | ||
18 | .globl memcpy | 20 | GLOBAL(memcpy) |
19 | .type memcpy, @function | ||
20 | memcpy: | ||
21 | pushw %si | 21 | pushw %si |
22 | pushw %di | 22 | pushw %di |
23 | movw %ax, %di | 23 | movw %ax, %di |
@@ -31,11 +31,9 @@ memcpy: | |||
31 | popw %di | 31 | popw %di |
32 | popw %si | 32 | popw %si |
33 | ret | 33 | ret |
34 | .size memcpy, .-memcpy | 34 | ENDPROC(memcpy) |
35 | 35 | ||
36 | .globl memset | 36 | GLOBAL(memset) |
37 | .type memset, @function | ||
38 | memset: | ||
39 | pushw %di | 37 | pushw %di |
40 | movw %ax, %di | 38 | movw %ax, %di |
41 | movzbl %dl, %eax | 39 | movzbl %dl, %eax |
@@ -48,52 +46,42 @@ memset: | |||
48 | rep; stosb | 46 | rep; stosb |
49 | popw %di | 47 | popw %di |
50 | ret | 48 | ret |
51 | .size memset, .-memset | 49 | ENDPROC(memset) |
52 | 50 | ||
53 | .globl copy_from_fs | 51 | GLOBAL(copy_from_fs) |
54 | .type copy_from_fs, @function | ||
55 | copy_from_fs: | ||
56 | pushw %ds | 52 | pushw %ds |
57 | pushw %fs | 53 | pushw %fs |
58 | popw %ds | 54 | popw %ds |
59 | call memcpy | 55 | call memcpy |
60 | popw %ds | 56 | popw %ds |
61 | ret | 57 | ret |
62 | .size copy_from_fs, .-copy_from_fs | 58 | ENDPROC(copy_from_fs) |
63 | 59 | ||
64 | .globl copy_to_fs | 60 | GLOBAL(copy_to_fs) |
65 | .type copy_to_fs, @function | ||
66 | copy_to_fs: | ||
67 | pushw %es | 61 | pushw %es |
68 | pushw %fs | 62 | pushw %fs |
69 | popw %es | 63 | popw %es |
70 | call memcpy | 64 | call memcpy |
71 | popw %es | 65 | popw %es |
72 | ret | 66 | ret |
73 | .size copy_to_fs, .-copy_to_fs | 67 | ENDPROC(copy_to_fs) |
74 | 68 | ||
75 | #if 0 /* Not currently used, but can be enabled as needed */ | 69 | #if 0 /* Not currently used, but can be enabled as needed */ |
76 | 70 | GLOBAL(copy_from_gs) | |
77 | .globl copy_from_gs | ||
78 | .type copy_from_gs, @function | ||
79 | copy_from_gs: | ||
80 | pushw %ds | 71 | pushw %ds |
81 | pushw %gs | 72 | pushw %gs |
82 | popw %ds | 73 | popw %ds |
83 | call memcpy | 74 | call memcpy |
84 | popw %ds | 75 | popw %ds |
85 | ret | 76 | ret |
86 | .size copy_from_gs, .-copy_from_gs | 77 | ENDPROC(copy_from_gs) |
87 | .globl copy_to_gs | ||
88 | 78 | ||
89 | .type copy_to_gs, @function | 79 | GLOBAL(copy_to_gs) |
90 | copy_to_gs: | ||
91 | pushw %es | 80 | pushw %es |
92 | pushw %gs | 81 | pushw %gs |
93 | popw %es | 82 | popw %es |
94 | call memcpy | 83 | call memcpy |
95 | popw %es | 84 | popw %es |
96 | ret | 85 | ret |
97 | .size copy_to_gs, .-copy_to_gs | 86 | ENDPROC(copy_to_gs) |
98 | |||
99 | #endif | 87 | #endif |
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S index b993062e9a5f..7ccff4884a23 100644 --- a/arch/x86/boot/header.S +++ b/arch/x86/boot/header.S | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/utsrelease.h> | 19 | #include <linux/utsrelease.h> |
20 | #include <asm/boot.h> | 20 | #include <asm/boot.h> |
21 | #include <asm/e820.h> | 21 | #include <asm/e820.h> |
22 | #include <asm/page.h> | 22 | #include <asm/page_types.h> |
23 | #include <asm/setup.h> | 23 | #include <asm/setup.h> |
24 | #include "boot.h" | 24 | #include "boot.h" |
25 | #include "offsets.h" | 25 | #include "offsets.h" |
diff --git a/arch/x86/boot/main.c b/arch/x86/boot/main.c index 197421db1af1..58f0415d3ae0 100644 --- a/arch/x86/boot/main.c +++ b/arch/x86/boot/main.c | |||
@@ -149,11 +149,6 @@ void main(void) | |||
149 | /* Query MCA information */ | 149 | /* Query MCA information */ |
150 | query_mca(); | 150 | query_mca(); |
151 | 151 | ||
152 | /* Voyager */ | ||
153 | #ifdef CONFIG_X86_VOYAGER | ||
154 | query_voyager(); | ||
155 | #endif | ||
156 | |||
157 | /* Query Intel SpeedStep (IST) information */ | 152 | /* Query Intel SpeedStep (IST) information */ |
158 | query_ist(); | 153 | query_ist(); |
159 | 154 | ||
diff --git a/arch/x86/boot/pmjump.S b/arch/x86/boot/pmjump.S index 141b6e20ed31..019c17a75851 100644 --- a/arch/x86/boot/pmjump.S +++ b/arch/x86/boot/pmjump.S | |||
@@ -15,18 +15,15 @@ | |||
15 | #include <asm/boot.h> | 15 | #include <asm/boot.h> |
16 | #include <asm/processor-flags.h> | 16 | #include <asm/processor-flags.h> |
17 | #include <asm/segment.h> | 17 | #include <asm/segment.h> |
18 | #include <linux/linkage.h> | ||
18 | 19 | ||
19 | .text | 20 | .text |
20 | |||
21 | .globl protected_mode_jump | ||
22 | .type protected_mode_jump, @function | ||
23 | |||
24 | .code16 | 21 | .code16 |
25 | 22 | ||
26 | /* | 23 | /* |
27 | * void protected_mode_jump(u32 entrypoint, u32 bootparams); | 24 | * void protected_mode_jump(u32 entrypoint, u32 bootparams); |
28 | */ | 25 | */ |
29 | protected_mode_jump: | 26 | GLOBAL(protected_mode_jump) |
30 | movl %edx, %esi # Pointer to boot_params table | 27 | movl %edx, %esi # Pointer to boot_params table |
31 | 28 | ||
32 | xorl %ebx, %ebx | 29 | xorl %ebx, %ebx |
@@ -47,12 +44,10 @@ protected_mode_jump: | |||
47 | .byte 0x66, 0xea # ljmpl opcode | 44 | .byte 0x66, 0xea # ljmpl opcode |
48 | 2: .long in_pm32 # offset | 45 | 2: .long in_pm32 # offset |
49 | .word __BOOT_CS # segment | 46 | .word __BOOT_CS # segment |
50 | 47 | ENDPROC(protected_mode_jump) | |
51 | .size protected_mode_jump, .-protected_mode_jump | ||
52 | 48 | ||
53 | .code32 | 49 | .code32 |
54 | .type in_pm32, @function | 50 | GLOBAL(in_pm32) |
55 | in_pm32: | ||
56 | # Set up data segments for flat 32-bit mode | 51 | # Set up data segments for flat 32-bit mode |
57 | movl %ecx, %ds | 52 | movl %ecx, %ds |
58 | movl %ecx, %es | 53 | movl %ecx, %es |
@@ -78,5 +73,4 @@ in_pm32: | |||
78 | lldt %cx | 73 | lldt %cx |
79 | 74 | ||
80 | jmpl *%eax # Jump to the 32-bit entrypoint | 75 | jmpl *%eax # Jump to the 32-bit entrypoint |
81 | 76 | ENDPROC(in_pm32) | |
82 | .size in_pm32, .-in_pm32 | ||
diff --git a/arch/x86/boot/voyager.c b/arch/x86/boot/voyager.c deleted file mode 100644 index 433909d61e5c..000000000000 --- a/arch/x86/boot/voyager.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* -*- linux-c -*- ------------------------------------------------------- * | ||
2 | * | ||
3 | * Copyright (C) 1991, 1992 Linus Torvalds | ||
4 | * Copyright 2007 rPath, Inc. - All Rights Reserved | ||
5 | * | ||
6 | * This file is part of the Linux kernel, and is made available under | ||
7 | * the terms of the GNU General Public License version 2. | ||
8 | * | ||
9 | * ----------------------------------------------------------------------- */ | ||
10 | |||
11 | /* | ||
12 | * Get the Voyager config information | ||
13 | */ | ||
14 | |||
15 | #include "boot.h" | ||
16 | |||
17 | int query_voyager(void) | ||
18 | { | ||
19 | u8 err; | ||
20 | u16 es, di; | ||
21 | /* Abuse the apm_bios_info area for this */ | ||
22 | u8 *data_ptr = (u8 *)&boot_params.apm_bios_info; | ||
23 | |||
24 | data_ptr[0] = 0xff; /* Flag on config not found(?) */ | ||
25 | |||
26 | asm("pushw %%es ; " | ||
27 | "int $0x15 ; " | ||
28 | "setc %0 ; " | ||
29 | "movw %%es, %1 ; " | ||
30 | "popw %%es" | ||
31 | : "=q" (err), "=r" (es), "=D" (di) | ||
32 | : "a" (0xffc0)); | ||
33 | |||
34 | if (err) | ||
35 | return -1; /* Not Voyager */ | ||
36 | |||
37 | set_fs(es); | ||
38 | copy_from_fs(data_ptr, di, 7); /* Table is 7 bytes apparently */ | ||
39 | return 0; | ||
40 | } | ||
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig index edba00d98ac3..5c023f6f652c 100644 --- a/arch/x86/configs/i386_defconfig +++ b/arch/x86/configs/i386_defconfig | |||
@@ -1,14 +1,13 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.27-rc5 | 3 | # Linux kernel version: 2.6.29-rc4 |
4 | # Wed Sep 3 17:23:09 2008 | 4 | # Thu Feb 12 12:57:57 2009 |
5 | # | 5 | # |
6 | # CONFIG_64BIT is not set | 6 | # CONFIG_64BIT is not set |
7 | CONFIG_X86_32=y | 7 | CONFIG_X86_32=y |
8 | # CONFIG_X86_64 is not set | 8 | # CONFIG_X86_64 is not set |
9 | CONFIG_X86=y | 9 | CONFIG_X86=y |
10 | CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" | 10 | CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig" |
11 | # CONFIG_GENERIC_LOCKBREAK is not set | ||
12 | CONFIG_GENERIC_TIME=y | 11 | CONFIG_GENERIC_TIME=y |
13 | CONFIG_GENERIC_CMOS_UPDATE=y | 12 | CONFIG_GENERIC_CMOS_UPDATE=y |
14 | CONFIG_CLOCKSOURCE_WATCHDOG=y | 13 | CONFIG_CLOCKSOURCE_WATCHDOG=y |
@@ -24,16 +23,14 @@ CONFIG_GENERIC_ISA_DMA=y | |||
24 | CONFIG_GENERIC_IOMAP=y | 23 | CONFIG_GENERIC_IOMAP=y |
25 | CONFIG_GENERIC_BUG=y | 24 | CONFIG_GENERIC_BUG=y |
26 | CONFIG_GENERIC_HWEIGHT=y | 25 | CONFIG_GENERIC_HWEIGHT=y |
27 | # CONFIG_GENERIC_GPIO is not set | ||
28 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 26 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
29 | # CONFIG_RWSEM_GENERIC_SPINLOCK is not set | 27 | # CONFIG_RWSEM_GENERIC_SPINLOCK is not set |
30 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 28 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
31 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
32 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
33 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y | 29 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y |
34 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 30 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
35 | # CONFIG_GENERIC_TIME_VSYSCALL is not set | 31 | # CONFIG_GENERIC_TIME_VSYSCALL is not set |
36 | CONFIG_ARCH_HAS_CPU_RELAX=y | 32 | CONFIG_ARCH_HAS_CPU_RELAX=y |
33 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y | ||
37 | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | 34 | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y |
38 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 35 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
39 | # CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set | 36 | # CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set |
@@ -42,12 +39,12 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y | |||
42 | # CONFIG_ZONE_DMA32 is not set | 39 | # CONFIG_ZONE_DMA32 is not set |
43 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 40 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
44 | # CONFIG_AUDIT_ARCH is not set | 41 | # CONFIG_AUDIT_ARCH is not set |
45 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
46 | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y | 42 | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y |
47 | CONFIG_GENERIC_HARDIRQS=y | 43 | CONFIG_GENERIC_HARDIRQS=y |
48 | CONFIG_GENERIC_IRQ_PROBE=y | 44 | CONFIG_GENERIC_IRQ_PROBE=y |
49 | CONFIG_GENERIC_PENDING_IRQ=y | 45 | CONFIG_GENERIC_PENDING_IRQ=y |
50 | CONFIG_X86_SMP=y | 46 | CONFIG_X86_SMP=y |
47 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
51 | CONFIG_X86_32_SMP=y | 48 | CONFIG_X86_32_SMP=y |
52 | CONFIG_X86_HT=y | 49 | CONFIG_X86_HT=y |
53 | CONFIG_X86_BIOS_REBOOT=y | 50 | CONFIG_X86_BIOS_REBOOT=y |
@@ -76,30 +73,44 @@ CONFIG_TASK_IO_ACCOUNTING=y | |||
76 | CONFIG_AUDIT=y | 73 | CONFIG_AUDIT=y |
77 | CONFIG_AUDITSYSCALL=y | 74 | CONFIG_AUDITSYSCALL=y |
78 | CONFIG_AUDIT_TREE=y | 75 | CONFIG_AUDIT_TREE=y |
76 | |||
77 | # | ||
78 | # RCU Subsystem | ||
79 | # | ||
80 | # CONFIG_CLASSIC_RCU is not set | ||
81 | CONFIG_TREE_RCU=y | ||
82 | # CONFIG_PREEMPT_RCU is not set | ||
83 | # CONFIG_RCU_TRACE is not set | ||
84 | CONFIG_RCU_FANOUT=32 | ||
85 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
86 | # CONFIG_TREE_RCU_TRACE is not set | ||
87 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
79 | # CONFIG_IKCONFIG is not set | 88 | # CONFIG_IKCONFIG is not set |
80 | CONFIG_LOG_BUF_SHIFT=18 | 89 | CONFIG_LOG_BUF_SHIFT=18 |
81 | CONFIG_CGROUPS=y | ||
82 | # CONFIG_CGROUP_DEBUG is not set | ||
83 | CONFIG_CGROUP_NS=y | ||
84 | # CONFIG_CGROUP_DEVICE is not set | ||
85 | CONFIG_CPUSETS=y | ||
86 | CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y | 90 | CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y |
87 | CONFIG_GROUP_SCHED=y | 91 | CONFIG_GROUP_SCHED=y |
88 | CONFIG_FAIR_GROUP_SCHED=y | 92 | CONFIG_FAIR_GROUP_SCHED=y |
89 | # CONFIG_RT_GROUP_SCHED is not set | 93 | # CONFIG_RT_GROUP_SCHED is not set |
90 | # CONFIG_USER_SCHED is not set | 94 | # CONFIG_USER_SCHED is not set |
91 | CONFIG_CGROUP_SCHED=y | 95 | CONFIG_CGROUP_SCHED=y |
96 | CONFIG_CGROUPS=y | ||
97 | # CONFIG_CGROUP_DEBUG is not set | ||
98 | CONFIG_CGROUP_NS=y | ||
99 | CONFIG_CGROUP_FREEZER=y | ||
100 | # CONFIG_CGROUP_DEVICE is not set | ||
101 | CONFIG_CPUSETS=y | ||
102 | CONFIG_PROC_PID_CPUSET=y | ||
92 | CONFIG_CGROUP_CPUACCT=y | 103 | CONFIG_CGROUP_CPUACCT=y |
93 | CONFIG_RESOURCE_COUNTERS=y | 104 | CONFIG_RESOURCE_COUNTERS=y |
94 | # CONFIG_CGROUP_MEM_RES_CTLR is not set | 105 | # CONFIG_CGROUP_MEM_RES_CTLR is not set |
95 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | 106 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
96 | CONFIG_PROC_PID_CPUSET=y | ||
97 | CONFIG_RELAY=y | 107 | CONFIG_RELAY=y |
98 | CONFIG_NAMESPACES=y | 108 | CONFIG_NAMESPACES=y |
99 | CONFIG_UTS_NS=y | 109 | CONFIG_UTS_NS=y |
100 | CONFIG_IPC_NS=y | 110 | CONFIG_IPC_NS=y |
101 | CONFIG_USER_NS=y | 111 | CONFIG_USER_NS=y |
102 | CONFIG_PID_NS=y | 112 | CONFIG_PID_NS=y |
113 | CONFIG_NET_NS=y | ||
103 | CONFIG_BLK_DEV_INITRD=y | 114 | CONFIG_BLK_DEV_INITRD=y |
104 | CONFIG_INITRAMFS_SOURCE="" | 115 | CONFIG_INITRAMFS_SOURCE="" |
105 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 116 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -124,12 +135,15 @@ CONFIG_SIGNALFD=y | |||
124 | CONFIG_TIMERFD=y | 135 | CONFIG_TIMERFD=y |
125 | CONFIG_EVENTFD=y | 136 | CONFIG_EVENTFD=y |
126 | CONFIG_SHMEM=y | 137 | CONFIG_SHMEM=y |
138 | CONFIG_AIO=y | ||
127 | CONFIG_VM_EVENT_COUNTERS=y | 139 | CONFIG_VM_EVENT_COUNTERS=y |
140 | CONFIG_PCI_QUIRKS=y | ||
128 | CONFIG_SLUB_DEBUG=y | 141 | CONFIG_SLUB_DEBUG=y |
129 | # CONFIG_SLAB is not set | 142 | # CONFIG_SLAB is not set |
130 | CONFIG_SLUB=y | 143 | CONFIG_SLUB=y |
131 | # CONFIG_SLOB is not set | 144 | # CONFIG_SLOB is not set |
132 | CONFIG_PROFILING=y | 145 | CONFIG_PROFILING=y |
146 | CONFIG_TRACEPOINTS=y | ||
133 | CONFIG_MARKERS=y | 147 | CONFIG_MARKERS=y |
134 | # CONFIG_OPROFILE is not set | 148 | # CONFIG_OPROFILE is not set |
135 | CONFIG_HAVE_OPROFILE=y | 149 | CONFIG_HAVE_OPROFILE=y |
@@ -139,15 +153,10 @@ CONFIG_KRETPROBES=y | |||
139 | CONFIG_HAVE_IOREMAP_PROT=y | 153 | CONFIG_HAVE_IOREMAP_PROT=y |
140 | CONFIG_HAVE_KPROBES=y | 154 | CONFIG_HAVE_KPROBES=y |
141 | CONFIG_HAVE_KRETPROBES=y | 155 | CONFIG_HAVE_KRETPROBES=y |
142 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | 156 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
143 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
144 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
145 | # CONFIG_HAVE_CLK is not set | ||
146 | CONFIG_PROC_PAGE_MONITOR=y | ||
147 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y | 157 | CONFIG_HAVE_GENERIC_DMA_COHERENT=y |
148 | CONFIG_SLABINFO=y | 158 | CONFIG_SLABINFO=y |
149 | CONFIG_RT_MUTEXES=y | 159 | CONFIG_RT_MUTEXES=y |
150 | # CONFIG_TINY_SHMEM is not set | ||
151 | CONFIG_BASE_SMALL=0 | 160 | CONFIG_BASE_SMALL=0 |
152 | CONFIG_MODULES=y | 161 | CONFIG_MODULES=y |
153 | # CONFIG_MODULE_FORCE_LOAD is not set | 162 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -155,12 +164,10 @@ CONFIG_MODULE_UNLOAD=y | |||
155 | CONFIG_MODULE_FORCE_UNLOAD=y | 164 | CONFIG_MODULE_FORCE_UNLOAD=y |
156 | # CONFIG_MODVERSIONS is not set | 165 | # CONFIG_MODVERSIONS is not set |
157 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 166 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
158 | CONFIG_KMOD=y | ||
159 | CONFIG_STOP_MACHINE=y | 167 | CONFIG_STOP_MACHINE=y |
160 | CONFIG_BLOCK=y | 168 | CONFIG_BLOCK=y |
161 | # CONFIG_LBD is not set | 169 | # CONFIG_LBD is not set |
162 | CONFIG_BLK_DEV_IO_TRACE=y | 170 | CONFIG_BLK_DEV_IO_TRACE=y |
163 | # CONFIG_LSF is not set | ||
164 | CONFIG_BLK_DEV_BSG=y | 171 | CONFIG_BLK_DEV_BSG=y |
165 | # CONFIG_BLK_DEV_INTEGRITY is not set | 172 | # CONFIG_BLK_DEV_INTEGRITY is not set |
166 | 173 | ||
@@ -176,7 +183,7 @@ CONFIG_IOSCHED_CFQ=y | |||
176 | CONFIG_DEFAULT_CFQ=y | 183 | CONFIG_DEFAULT_CFQ=y |
177 | # CONFIG_DEFAULT_NOOP is not set | 184 | # CONFIG_DEFAULT_NOOP is not set |
178 | CONFIG_DEFAULT_IOSCHED="cfq" | 185 | CONFIG_DEFAULT_IOSCHED="cfq" |
179 | CONFIG_CLASSIC_RCU=y | 186 | CONFIG_FREEZER=y |
180 | 187 | ||
181 | # | 188 | # |
182 | # Processor type and features | 189 | # Processor type and features |
@@ -186,15 +193,14 @@ CONFIG_NO_HZ=y | |||
186 | CONFIG_HIGH_RES_TIMERS=y | 193 | CONFIG_HIGH_RES_TIMERS=y |
187 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | 194 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y |
188 | CONFIG_SMP=y | 195 | CONFIG_SMP=y |
196 | CONFIG_SPARSE_IRQ=y | ||
189 | CONFIG_X86_FIND_SMP_CONFIG=y | 197 | CONFIG_X86_FIND_SMP_CONFIG=y |
190 | CONFIG_X86_MPPARSE=y | 198 | CONFIG_X86_MPPARSE=y |
191 | CONFIG_X86_PC=y | ||
192 | # CONFIG_X86_ELAN is not set | 199 | # CONFIG_X86_ELAN is not set |
193 | # CONFIG_X86_VOYAGER is not set | ||
194 | # CONFIG_X86_GENERICARCH is not set | 200 | # CONFIG_X86_GENERICARCH is not set |
195 | # CONFIG_X86_VSMP is not set | 201 | # CONFIG_X86_VSMP is not set |
196 | # CONFIG_X86_RDC321X is not set | 202 | # CONFIG_X86_RDC321X is not set |
197 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 203 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
198 | # CONFIG_PARAVIRT_GUEST is not set | 204 | # CONFIG_PARAVIRT_GUEST is not set |
199 | # CONFIG_MEMTEST is not set | 205 | # CONFIG_MEMTEST is not set |
200 | # CONFIG_M386 is not set | 206 | # CONFIG_M386 is not set |
@@ -238,10 +244,19 @@ CONFIG_X86_TSC=y | |||
238 | CONFIG_X86_CMOV=y | 244 | CONFIG_X86_CMOV=y |
239 | CONFIG_X86_MINIMUM_CPU_FAMILY=4 | 245 | CONFIG_X86_MINIMUM_CPU_FAMILY=4 |
240 | CONFIG_X86_DEBUGCTLMSR=y | 246 | CONFIG_X86_DEBUGCTLMSR=y |
247 | CONFIG_CPU_SUP_INTEL=y | ||
248 | CONFIG_CPU_SUP_CYRIX_32=y | ||
249 | CONFIG_CPU_SUP_AMD=y | ||
250 | CONFIG_CPU_SUP_CENTAUR_32=y | ||
251 | CONFIG_CPU_SUP_TRANSMETA_32=y | ||
252 | CONFIG_CPU_SUP_UMC_32=y | ||
253 | CONFIG_X86_DS=y | ||
254 | CONFIG_X86_PTRACE_BTS=y | ||
241 | CONFIG_HPET_TIMER=y | 255 | CONFIG_HPET_TIMER=y |
242 | CONFIG_HPET_EMULATE_RTC=y | 256 | CONFIG_HPET_EMULATE_RTC=y |
243 | CONFIG_DMI=y | 257 | CONFIG_DMI=y |
244 | # CONFIG_IOMMU_HELPER is not set | 258 | # CONFIG_IOMMU_HELPER is not set |
259 | # CONFIG_IOMMU_API is not set | ||
245 | CONFIG_NR_CPUS=64 | 260 | CONFIG_NR_CPUS=64 |
246 | CONFIG_SCHED_SMT=y | 261 | CONFIG_SCHED_SMT=y |
247 | CONFIG_SCHED_MC=y | 262 | CONFIG_SCHED_MC=y |
@@ -250,12 +265,15 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
250 | # CONFIG_PREEMPT is not set | 265 | # CONFIG_PREEMPT is not set |
251 | CONFIG_X86_LOCAL_APIC=y | 266 | CONFIG_X86_LOCAL_APIC=y |
252 | CONFIG_X86_IO_APIC=y | 267 | CONFIG_X86_IO_APIC=y |
268 | CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y | ||
253 | # CONFIG_X86_MCE is not set | 269 | # CONFIG_X86_MCE is not set |
254 | CONFIG_VM86=y | 270 | CONFIG_VM86=y |
255 | # CONFIG_TOSHIBA is not set | 271 | # CONFIG_TOSHIBA is not set |
256 | # CONFIG_I8K is not set | 272 | # CONFIG_I8K is not set |
257 | CONFIG_X86_REBOOTFIXUPS=y | 273 | CONFIG_X86_REBOOTFIXUPS=y |
258 | CONFIG_MICROCODE=y | 274 | CONFIG_MICROCODE=y |
275 | CONFIG_MICROCODE_INTEL=y | ||
276 | CONFIG_MICROCODE_AMD=y | ||
259 | CONFIG_MICROCODE_OLD_INTERFACE=y | 277 | CONFIG_MICROCODE_OLD_INTERFACE=y |
260 | CONFIG_X86_MSR=y | 278 | CONFIG_X86_MSR=y |
261 | CONFIG_X86_CPUID=y | 279 | CONFIG_X86_CPUID=y |
@@ -264,6 +282,7 @@ CONFIG_HIGHMEM4G=y | |||
264 | # CONFIG_HIGHMEM64G is not set | 282 | # CONFIG_HIGHMEM64G is not set |
265 | CONFIG_PAGE_OFFSET=0xC0000000 | 283 | CONFIG_PAGE_OFFSET=0xC0000000 |
266 | CONFIG_HIGHMEM=y | 284 | CONFIG_HIGHMEM=y |
285 | # CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set | ||
267 | CONFIG_ARCH_FLATMEM_ENABLE=y | 286 | CONFIG_ARCH_FLATMEM_ENABLE=y |
268 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 287 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
269 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 288 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
@@ -274,14 +293,17 @@ CONFIG_FLATMEM_MANUAL=y | |||
274 | CONFIG_FLATMEM=y | 293 | CONFIG_FLATMEM=y |
275 | CONFIG_FLAT_NODE_MEM_MAP=y | 294 | CONFIG_FLAT_NODE_MEM_MAP=y |
276 | CONFIG_SPARSEMEM_STATIC=y | 295 | CONFIG_SPARSEMEM_STATIC=y |
277 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
278 | CONFIG_PAGEFLAGS_EXTENDED=y | 296 | CONFIG_PAGEFLAGS_EXTENDED=y |
279 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 297 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
280 | CONFIG_RESOURCES_64BIT=y | 298 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
281 | CONFIG_ZONE_DMA_FLAG=1 | 299 | CONFIG_ZONE_DMA_FLAG=1 |
282 | CONFIG_BOUNCE=y | 300 | CONFIG_BOUNCE=y |
283 | CONFIG_VIRT_TO_BUS=y | 301 | CONFIG_VIRT_TO_BUS=y |
302 | CONFIG_UNEVICTABLE_LRU=y | ||
284 | CONFIG_HIGHPTE=y | 303 | CONFIG_HIGHPTE=y |
304 | CONFIG_X86_CHECK_BIOS_CORRUPTION=y | ||
305 | CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y | ||
306 | CONFIG_X86_RESERVE_LOW_64K=y | ||
285 | # CONFIG_MATH_EMULATION is not set | 307 | # CONFIG_MATH_EMULATION is not set |
286 | CONFIG_MTRR=y | 308 | CONFIG_MTRR=y |
287 | # CONFIG_MTRR_SANITIZER is not set | 309 | # CONFIG_MTRR_SANITIZER is not set |
@@ -302,10 +324,11 @@ CONFIG_PHYSICAL_START=0x1000000 | |||
302 | CONFIG_PHYSICAL_ALIGN=0x200000 | 324 | CONFIG_PHYSICAL_ALIGN=0x200000 |
303 | CONFIG_HOTPLUG_CPU=y | 325 | CONFIG_HOTPLUG_CPU=y |
304 | # CONFIG_COMPAT_VDSO is not set | 326 | # CONFIG_COMPAT_VDSO is not set |
327 | # CONFIG_CMDLINE_BOOL is not set | ||
305 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 328 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
306 | 329 | ||
307 | # | 330 | # |
308 | # Power management options | 331 | # Power management and ACPI options |
309 | # | 332 | # |
310 | CONFIG_PM=y | 333 | CONFIG_PM=y |
311 | CONFIG_PM_DEBUG=y | 334 | CONFIG_PM_DEBUG=y |
@@ -331,19 +354,13 @@ CONFIG_ACPI_BATTERY=y | |||
331 | CONFIG_ACPI_BUTTON=y | 354 | CONFIG_ACPI_BUTTON=y |
332 | CONFIG_ACPI_FAN=y | 355 | CONFIG_ACPI_FAN=y |
333 | CONFIG_ACPI_DOCK=y | 356 | CONFIG_ACPI_DOCK=y |
334 | # CONFIG_ACPI_BAY is not set | ||
335 | CONFIG_ACPI_PROCESSOR=y | 357 | CONFIG_ACPI_PROCESSOR=y |
336 | CONFIG_ACPI_HOTPLUG_CPU=y | 358 | CONFIG_ACPI_HOTPLUG_CPU=y |
337 | CONFIG_ACPI_THERMAL=y | 359 | CONFIG_ACPI_THERMAL=y |
338 | # CONFIG_ACPI_WMI is not set | ||
339 | # CONFIG_ACPI_ASUS is not set | ||
340 | # CONFIG_ACPI_TOSHIBA is not set | ||
341 | # CONFIG_ACPI_CUSTOM_DSDT is not set | 360 | # CONFIG_ACPI_CUSTOM_DSDT is not set |
342 | CONFIG_ACPI_BLACKLIST_YEAR=0 | 361 | CONFIG_ACPI_BLACKLIST_YEAR=0 |
343 | # CONFIG_ACPI_DEBUG is not set | 362 | # CONFIG_ACPI_DEBUG is not set |
344 | CONFIG_ACPI_EC=y | ||
345 | # CONFIG_ACPI_PCI_SLOT is not set | 363 | # CONFIG_ACPI_PCI_SLOT is not set |
346 | CONFIG_ACPI_POWER=y | ||
347 | CONFIG_ACPI_SYSTEM=y | 364 | CONFIG_ACPI_SYSTEM=y |
348 | CONFIG_X86_PM_TIMER=y | 365 | CONFIG_X86_PM_TIMER=y |
349 | CONFIG_ACPI_CONTAINER=y | 366 | CONFIG_ACPI_CONTAINER=y |
@@ -388,7 +405,6 @@ CONFIG_X86_ACPI_CPUFREQ=y | |||
388 | # | 405 | # |
389 | # shared options | 406 | # shared options |
390 | # | 407 | # |
391 | # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set | ||
392 | # CONFIG_X86_SPEEDSTEP_LIB is not set | 408 | # CONFIG_X86_SPEEDSTEP_LIB is not set |
393 | CONFIG_CPU_IDLE=y | 409 | CONFIG_CPU_IDLE=y |
394 | CONFIG_CPU_IDLE_GOV_LADDER=y | 410 | CONFIG_CPU_IDLE_GOV_LADDER=y |
@@ -415,6 +431,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
415 | CONFIG_PCI_MSI=y | 431 | CONFIG_PCI_MSI=y |
416 | # CONFIG_PCI_LEGACY is not set | 432 | # CONFIG_PCI_LEGACY is not set |
417 | # CONFIG_PCI_DEBUG is not set | 433 | # CONFIG_PCI_DEBUG is not set |
434 | # CONFIG_PCI_STUB is not set | ||
418 | CONFIG_HT_IRQ=y | 435 | CONFIG_HT_IRQ=y |
419 | CONFIG_ISA_DMA_API=y | 436 | CONFIG_ISA_DMA_API=y |
420 | # CONFIG_ISA is not set | 437 | # CONFIG_ISA is not set |
@@ -452,13 +469,17 @@ CONFIG_HOTPLUG_PCI=y | |||
452 | # Executable file formats / Emulations | 469 | # Executable file formats / Emulations |
453 | # | 470 | # |
454 | CONFIG_BINFMT_ELF=y | 471 | CONFIG_BINFMT_ELF=y |
472 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
473 | CONFIG_HAVE_AOUT=y | ||
455 | # CONFIG_BINFMT_AOUT is not set | 474 | # CONFIG_BINFMT_AOUT is not set |
456 | CONFIG_BINFMT_MISC=y | 475 | CONFIG_BINFMT_MISC=y |
476 | CONFIG_HAVE_ATOMIC_IOMAP=y | ||
457 | CONFIG_NET=y | 477 | CONFIG_NET=y |
458 | 478 | ||
459 | # | 479 | # |
460 | # Networking options | 480 | # Networking options |
461 | # | 481 | # |
482 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
462 | CONFIG_PACKET=y | 483 | CONFIG_PACKET=y |
463 | CONFIG_PACKET_MMAP=y | 484 | CONFIG_PACKET_MMAP=y |
464 | CONFIG_UNIX=y | 485 | CONFIG_UNIX=y |
@@ -519,7 +540,6 @@ CONFIG_DEFAULT_CUBIC=y | |||
519 | # CONFIG_DEFAULT_RENO is not set | 540 | # CONFIG_DEFAULT_RENO is not set |
520 | CONFIG_DEFAULT_TCP_CONG="cubic" | 541 | CONFIG_DEFAULT_TCP_CONG="cubic" |
521 | CONFIG_TCP_MD5SIG=y | 542 | CONFIG_TCP_MD5SIG=y |
522 | # CONFIG_IP_VS is not set | ||
523 | CONFIG_IPV6=y | 543 | CONFIG_IPV6=y |
524 | # CONFIG_IPV6_PRIVACY is not set | 544 | # CONFIG_IPV6_PRIVACY is not set |
525 | # CONFIG_IPV6_ROUTER_PREF is not set | 545 | # CONFIG_IPV6_ROUTER_PREF is not set |
@@ -557,19 +577,21 @@ CONFIG_NF_CONNTRACK_IRC=y | |||
557 | CONFIG_NF_CONNTRACK_SIP=y | 577 | CONFIG_NF_CONNTRACK_SIP=y |
558 | CONFIG_NF_CT_NETLINK=y | 578 | CONFIG_NF_CT_NETLINK=y |
559 | CONFIG_NETFILTER_XTABLES=y | 579 | CONFIG_NETFILTER_XTABLES=y |
580 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y | ||
560 | CONFIG_NETFILTER_XT_TARGET_MARK=y | 581 | CONFIG_NETFILTER_XT_TARGET_MARK=y |
561 | CONFIG_NETFILTER_XT_TARGET_NFLOG=y | 582 | CONFIG_NETFILTER_XT_TARGET_NFLOG=y |
562 | CONFIG_NETFILTER_XT_TARGET_SECMARK=y | 583 | CONFIG_NETFILTER_XT_TARGET_SECMARK=y |
563 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y | ||
564 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=y | 584 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=y |
565 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y | 585 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y |
566 | CONFIG_NETFILTER_XT_MATCH_MARK=y | 586 | CONFIG_NETFILTER_XT_MATCH_MARK=y |
567 | CONFIG_NETFILTER_XT_MATCH_POLICY=y | 587 | CONFIG_NETFILTER_XT_MATCH_POLICY=y |
568 | CONFIG_NETFILTER_XT_MATCH_STATE=y | 588 | CONFIG_NETFILTER_XT_MATCH_STATE=y |
589 | # CONFIG_IP_VS is not set | ||
569 | 590 | ||
570 | # | 591 | # |
571 | # IP: Netfilter Configuration | 592 | # IP: Netfilter Configuration |
572 | # | 593 | # |
594 | CONFIG_NF_DEFRAG_IPV4=y | ||
573 | CONFIG_NF_CONNTRACK_IPV4=y | 595 | CONFIG_NF_CONNTRACK_IPV4=y |
574 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | 596 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y |
575 | CONFIG_IP_NF_IPTABLES=y | 597 | CONFIG_IP_NF_IPTABLES=y |
@@ -595,8 +617,8 @@ CONFIG_IP_NF_MANGLE=y | |||
595 | CONFIG_NF_CONNTRACK_IPV6=y | 617 | CONFIG_NF_CONNTRACK_IPV6=y |
596 | CONFIG_IP6_NF_IPTABLES=y | 618 | CONFIG_IP6_NF_IPTABLES=y |
597 | CONFIG_IP6_NF_MATCH_IPV6HEADER=y | 619 | CONFIG_IP6_NF_MATCH_IPV6HEADER=y |
598 | CONFIG_IP6_NF_FILTER=y | ||
599 | CONFIG_IP6_NF_TARGET_LOG=y | 620 | CONFIG_IP6_NF_TARGET_LOG=y |
621 | CONFIG_IP6_NF_FILTER=y | ||
600 | CONFIG_IP6_NF_TARGET_REJECT=y | 622 | CONFIG_IP6_NF_TARGET_REJECT=y |
601 | CONFIG_IP6_NF_MANGLE=y | 623 | CONFIG_IP6_NF_MANGLE=y |
602 | # CONFIG_IP_DCCP is not set | 624 | # CONFIG_IP_DCCP is not set |
@@ -604,6 +626,7 @@ CONFIG_IP6_NF_MANGLE=y | |||
604 | # CONFIG_TIPC is not set | 626 | # CONFIG_TIPC is not set |
605 | # CONFIG_ATM is not set | 627 | # CONFIG_ATM is not set |
606 | # CONFIG_BRIDGE is not set | 628 | # CONFIG_BRIDGE is not set |
629 | # CONFIG_NET_DSA is not set | ||
607 | # CONFIG_VLAN_8021Q is not set | 630 | # CONFIG_VLAN_8021Q is not set |
608 | # CONFIG_DECNET is not set | 631 | # CONFIG_DECNET is not set |
609 | CONFIG_LLC=y | 632 | CONFIG_LLC=y |
@@ -623,6 +646,7 @@ CONFIG_NET_SCHED=y | |||
623 | # CONFIG_NET_SCH_HTB is not set | 646 | # CONFIG_NET_SCH_HTB is not set |
624 | # CONFIG_NET_SCH_HFSC is not set | 647 | # CONFIG_NET_SCH_HFSC is not set |
625 | # CONFIG_NET_SCH_PRIO is not set | 648 | # CONFIG_NET_SCH_PRIO is not set |
649 | # CONFIG_NET_SCH_MULTIQ is not set | ||
626 | # CONFIG_NET_SCH_RED is not set | 650 | # CONFIG_NET_SCH_RED is not set |
627 | # CONFIG_NET_SCH_SFQ is not set | 651 | # CONFIG_NET_SCH_SFQ is not set |
628 | # CONFIG_NET_SCH_TEQL is not set | 652 | # CONFIG_NET_SCH_TEQL is not set |
@@ -630,6 +654,7 @@ CONFIG_NET_SCHED=y | |||
630 | # CONFIG_NET_SCH_GRED is not set | 654 | # CONFIG_NET_SCH_GRED is not set |
631 | # CONFIG_NET_SCH_DSMARK is not set | 655 | # CONFIG_NET_SCH_DSMARK is not set |
632 | # CONFIG_NET_SCH_NETEM is not set | 656 | # CONFIG_NET_SCH_NETEM is not set |
657 | # CONFIG_NET_SCH_DRR is not set | ||
633 | # CONFIG_NET_SCH_INGRESS is not set | 658 | # CONFIG_NET_SCH_INGRESS is not set |
634 | 659 | ||
635 | # | 660 | # |
@@ -644,6 +669,7 @@ CONFIG_NET_CLS=y | |||
644 | # CONFIG_NET_CLS_RSVP is not set | 669 | # CONFIG_NET_CLS_RSVP is not set |
645 | # CONFIG_NET_CLS_RSVP6 is not set | 670 | # CONFIG_NET_CLS_RSVP6 is not set |
646 | # CONFIG_NET_CLS_FLOW is not set | 671 | # CONFIG_NET_CLS_FLOW is not set |
672 | # CONFIG_NET_CLS_CGROUP is not set | ||
647 | CONFIG_NET_EMATCH=y | 673 | CONFIG_NET_EMATCH=y |
648 | CONFIG_NET_EMATCH_STACK=32 | 674 | CONFIG_NET_EMATCH_STACK=32 |
649 | # CONFIG_NET_EMATCH_CMP is not set | 675 | # CONFIG_NET_EMATCH_CMP is not set |
@@ -659,7 +685,9 @@ CONFIG_NET_CLS_ACT=y | |||
659 | # CONFIG_NET_ACT_NAT is not set | 685 | # CONFIG_NET_ACT_NAT is not set |
660 | # CONFIG_NET_ACT_PEDIT is not set | 686 | # CONFIG_NET_ACT_PEDIT is not set |
661 | # CONFIG_NET_ACT_SIMP is not set | 687 | # CONFIG_NET_ACT_SIMP is not set |
688 | # CONFIG_NET_ACT_SKBEDIT is not set | ||
662 | CONFIG_NET_SCH_FIFO=y | 689 | CONFIG_NET_SCH_FIFO=y |
690 | # CONFIG_DCB is not set | ||
663 | 691 | ||
664 | # | 692 | # |
665 | # Network testing | 693 | # Network testing |
@@ -676,29 +704,33 @@ CONFIG_HAMRADIO=y | |||
676 | # CONFIG_IRDA is not set | 704 | # CONFIG_IRDA is not set |
677 | # CONFIG_BT is not set | 705 | # CONFIG_BT is not set |
678 | # CONFIG_AF_RXRPC is not set | 706 | # CONFIG_AF_RXRPC is not set |
707 | # CONFIG_PHONET is not set | ||
679 | CONFIG_FIB_RULES=y | 708 | CONFIG_FIB_RULES=y |
680 | 709 | CONFIG_WIRELESS=y | |
681 | # | ||
682 | # Wireless | ||
683 | # | ||
684 | CONFIG_CFG80211=y | 710 | CONFIG_CFG80211=y |
711 | # CONFIG_CFG80211_REG_DEBUG is not set | ||
685 | CONFIG_NL80211=y | 712 | CONFIG_NL80211=y |
713 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
686 | CONFIG_WIRELESS_EXT=y | 714 | CONFIG_WIRELESS_EXT=y |
687 | CONFIG_WIRELESS_EXT_SYSFS=y | 715 | CONFIG_WIRELESS_EXT_SYSFS=y |
716 | # CONFIG_LIB80211 is not set | ||
688 | CONFIG_MAC80211=y | 717 | CONFIG_MAC80211=y |
689 | 718 | ||
690 | # | 719 | # |
691 | # Rate control algorithm selection | 720 | # Rate control algorithm selection |
692 | # | 721 | # |
693 | CONFIG_MAC80211_RC_PID=y | 722 | CONFIG_MAC80211_RC_MINSTREL=y |
694 | CONFIG_MAC80211_RC_DEFAULT_PID=y | 723 | # CONFIG_MAC80211_RC_DEFAULT_PID is not set |
695 | CONFIG_MAC80211_RC_DEFAULT="pid" | 724 | CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y |
725 | CONFIG_MAC80211_RC_DEFAULT="minstrel" | ||
696 | # CONFIG_MAC80211_MESH is not set | 726 | # CONFIG_MAC80211_MESH is not set |
697 | CONFIG_MAC80211_LEDS=y | 727 | CONFIG_MAC80211_LEDS=y |
698 | # CONFIG_MAC80211_DEBUGFS is not set | 728 | # CONFIG_MAC80211_DEBUGFS is not set |
699 | # CONFIG_MAC80211_DEBUG_MENU is not set | 729 | # CONFIG_MAC80211_DEBUG_MENU is not set |
700 | # CONFIG_IEEE80211 is not set | 730 | # CONFIG_WIMAX is not set |
701 | # CONFIG_RFKILL is not set | 731 | CONFIG_RFKILL=y |
732 | # CONFIG_RFKILL_INPUT is not set | ||
733 | CONFIG_RFKILL_LEDS=y | ||
702 | # CONFIG_NET_9P is not set | 734 | # CONFIG_NET_9P is not set |
703 | 735 | ||
704 | # | 736 | # |
@@ -722,7 +754,7 @@ CONFIG_PROC_EVENTS=y | |||
722 | # CONFIG_MTD is not set | 754 | # CONFIG_MTD is not set |
723 | # CONFIG_PARPORT is not set | 755 | # CONFIG_PARPORT is not set |
724 | CONFIG_PNP=y | 756 | CONFIG_PNP=y |
725 | # CONFIG_PNP_DEBUG is not set | 757 | CONFIG_PNP_DEBUG_MESSAGES=y |
726 | 758 | ||
727 | # | 759 | # |
728 | # Protocols | 760 | # Protocols |
@@ -750,20 +782,19 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 | |||
750 | CONFIG_MISC_DEVICES=y | 782 | CONFIG_MISC_DEVICES=y |
751 | # CONFIG_IBM_ASM is not set | 783 | # CONFIG_IBM_ASM is not set |
752 | # CONFIG_PHANTOM is not set | 784 | # CONFIG_PHANTOM is not set |
753 | # CONFIG_EEPROM_93CX6 is not set | ||
754 | # CONFIG_SGI_IOC4 is not set | 785 | # CONFIG_SGI_IOC4 is not set |
755 | # CONFIG_TIFM_CORE is not set | 786 | # CONFIG_TIFM_CORE is not set |
756 | # CONFIG_ACER_WMI is not set | 787 | # CONFIG_ICS932S401 is not set |
757 | # CONFIG_ASUS_LAPTOP is not set | ||
758 | # CONFIG_FUJITSU_LAPTOP is not set | ||
759 | # CONFIG_TC1100_WMI is not set | ||
760 | # CONFIG_MSI_LAPTOP is not set | ||
761 | # CONFIG_COMPAL_LAPTOP is not set | ||
762 | # CONFIG_SONY_LAPTOP is not set | ||
763 | # CONFIG_THINKPAD_ACPI is not set | ||
764 | # CONFIG_INTEL_MENLOW is not set | ||
765 | # CONFIG_ENCLOSURE_SERVICES is not set | 788 | # CONFIG_ENCLOSURE_SERVICES is not set |
766 | # CONFIG_HP_ILO is not set | 789 | # CONFIG_HP_ILO is not set |
790 | # CONFIG_C2PORT is not set | ||
791 | |||
792 | # | ||
793 | # EEPROM support | ||
794 | # | ||
795 | # CONFIG_EEPROM_AT24 is not set | ||
796 | # CONFIG_EEPROM_LEGACY is not set | ||
797 | # CONFIG_EEPROM_93CX6 is not set | ||
767 | CONFIG_HAVE_IDE=y | 798 | CONFIG_HAVE_IDE=y |
768 | # CONFIG_IDE is not set | 799 | # CONFIG_IDE is not set |
769 | 800 | ||
@@ -802,7 +833,7 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
802 | # | 833 | # |
803 | CONFIG_SCSI_SPI_ATTRS=y | 834 | CONFIG_SCSI_SPI_ATTRS=y |
804 | # CONFIG_SCSI_FC_ATTRS is not set | 835 | # CONFIG_SCSI_FC_ATTRS is not set |
805 | CONFIG_SCSI_ISCSI_ATTRS=y | 836 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
806 | # CONFIG_SCSI_SAS_ATTRS is not set | 837 | # CONFIG_SCSI_SAS_ATTRS is not set |
807 | # CONFIG_SCSI_SAS_LIBSAS is not set | 838 | # CONFIG_SCSI_SAS_LIBSAS is not set |
808 | # CONFIG_SCSI_SRP_ATTRS is not set | 839 | # CONFIG_SCSI_SRP_ATTRS is not set |
@@ -875,6 +906,7 @@ CONFIG_PATA_OLDPIIX=y | |||
875 | CONFIG_PATA_SCH=y | 906 | CONFIG_PATA_SCH=y |
876 | CONFIG_MD=y | 907 | CONFIG_MD=y |
877 | CONFIG_BLK_DEV_MD=y | 908 | CONFIG_BLK_DEV_MD=y |
909 | CONFIG_MD_AUTODETECT=y | ||
878 | # CONFIG_MD_LINEAR is not set | 910 | # CONFIG_MD_LINEAR is not set |
879 | # CONFIG_MD_RAID0 is not set | 911 | # CONFIG_MD_RAID0 is not set |
880 | # CONFIG_MD_RAID1 is not set | 912 | # CONFIG_MD_RAID1 is not set |
@@ -930,6 +962,9 @@ CONFIG_PHYLIB=y | |||
930 | # CONFIG_BROADCOM_PHY is not set | 962 | # CONFIG_BROADCOM_PHY is not set |
931 | # CONFIG_ICPLUS_PHY is not set | 963 | # CONFIG_ICPLUS_PHY is not set |
932 | # CONFIG_REALTEK_PHY is not set | 964 | # CONFIG_REALTEK_PHY is not set |
965 | # CONFIG_NATIONAL_PHY is not set | ||
966 | # CONFIG_STE10XP is not set | ||
967 | # CONFIG_LSI_ET1011C_PHY is not set | ||
933 | # CONFIG_FIXED_PHY is not set | 968 | # CONFIG_FIXED_PHY is not set |
934 | # CONFIG_MDIO_BITBANG is not set | 969 | # CONFIG_MDIO_BITBANG is not set |
935 | CONFIG_NET_ETHERNET=y | 970 | CONFIG_NET_ETHERNET=y |
@@ -953,6 +988,9 @@ CONFIG_NET_TULIP=y | |||
953 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 988 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
954 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 989 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
955 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 990 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
991 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
992 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
993 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
956 | CONFIG_NET_PCI=y | 994 | CONFIG_NET_PCI=y |
957 | # CONFIG_PCNET32 is not set | 995 | # CONFIG_PCNET32 is not set |
958 | # CONFIG_AMD8111_ETH is not set | 996 | # CONFIG_AMD8111_ETH is not set |
@@ -960,7 +998,6 @@ CONFIG_NET_PCI=y | |||
960 | # CONFIG_B44 is not set | 998 | # CONFIG_B44 is not set |
961 | CONFIG_FORCEDETH=y | 999 | CONFIG_FORCEDETH=y |
962 | # CONFIG_FORCEDETH_NAPI is not set | 1000 | # CONFIG_FORCEDETH_NAPI is not set |
963 | # CONFIG_EEPRO100 is not set | ||
964 | CONFIG_E100=y | 1001 | CONFIG_E100=y |
965 | # CONFIG_FEALNX is not set | 1002 | # CONFIG_FEALNX is not set |
966 | # CONFIG_NATSEMI is not set | 1003 | # CONFIG_NATSEMI is not set |
@@ -974,15 +1011,16 @@ CONFIG_8139TOO=y | |||
974 | # CONFIG_R6040 is not set | 1011 | # CONFIG_R6040 is not set |
975 | # CONFIG_SIS900 is not set | 1012 | # CONFIG_SIS900 is not set |
976 | # CONFIG_EPIC100 is not set | 1013 | # CONFIG_EPIC100 is not set |
1014 | # CONFIG_SMSC9420 is not set | ||
977 | # CONFIG_SUNDANCE is not set | 1015 | # CONFIG_SUNDANCE is not set |
978 | # CONFIG_TLAN is not set | 1016 | # CONFIG_TLAN is not set |
979 | # CONFIG_VIA_RHINE is not set | 1017 | # CONFIG_VIA_RHINE is not set |
980 | # CONFIG_SC92031 is not set | 1018 | # CONFIG_SC92031 is not set |
1019 | # CONFIG_ATL2 is not set | ||
981 | CONFIG_NETDEV_1000=y | 1020 | CONFIG_NETDEV_1000=y |
982 | # CONFIG_ACENIC is not set | 1021 | # CONFIG_ACENIC is not set |
983 | # CONFIG_DL2K is not set | 1022 | # CONFIG_DL2K is not set |
984 | CONFIG_E1000=y | 1023 | CONFIG_E1000=y |
985 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
986 | CONFIG_E1000E=y | 1024 | CONFIG_E1000E=y |
987 | # CONFIG_IP1000 is not set | 1025 | # CONFIG_IP1000 is not set |
988 | # CONFIG_IGB is not set | 1026 | # CONFIG_IGB is not set |
@@ -1000,18 +1038,23 @@ CONFIG_BNX2=y | |||
1000 | # CONFIG_QLA3XXX is not set | 1038 | # CONFIG_QLA3XXX is not set |
1001 | # CONFIG_ATL1 is not set | 1039 | # CONFIG_ATL1 is not set |
1002 | # CONFIG_ATL1E is not set | 1040 | # CONFIG_ATL1E is not set |
1041 | # CONFIG_JME is not set | ||
1003 | CONFIG_NETDEV_10000=y | 1042 | CONFIG_NETDEV_10000=y |
1004 | # CONFIG_CHELSIO_T1 is not set | 1043 | # CONFIG_CHELSIO_T1 is not set |
1044 | CONFIG_CHELSIO_T3_DEPENDS=y | ||
1005 | # CONFIG_CHELSIO_T3 is not set | 1045 | # CONFIG_CHELSIO_T3 is not set |
1046 | # CONFIG_ENIC is not set | ||
1006 | # CONFIG_IXGBE is not set | 1047 | # CONFIG_IXGBE is not set |
1007 | # CONFIG_IXGB is not set | 1048 | # CONFIG_IXGB is not set |
1008 | # CONFIG_S2IO is not set | 1049 | # CONFIG_S2IO is not set |
1009 | # CONFIG_MYRI10GE is not set | 1050 | # CONFIG_MYRI10GE is not set |
1010 | # CONFIG_NETXEN_NIC is not set | 1051 | # CONFIG_NETXEN_NIC is not set |
1011 | # CONFIG_NIU is not set | 1052 | # CONFIG_NIU is not set |
1053 | # CONFIG_MLX4_EN is not set | ||
1012 | # CONFIG_MLX4_CORE is not set | 1054 | # CONFIG_MLX4_CORE is not set |
1013 | # CONFIG_TEHUTI is not set | 1055 | # CONFIG_TEHUTI is not set |
1014 | # CONFIG_BNX2X is not set | 1056 | # CONFIG_BNX2X is not set |
1057 | # CONFIG_QLGE is not set | ||
1015 | # CONFIG_SFC is not set | 1058 | # CONFIG_SFC is not set |
1016 | CONFIG_TR=y | 1059 | CONFIG_TR=y |
1017 | # CONFIG_IBMOL is not set | 1060 | # CONFIG_IBMOL is not set |
@@ -1025,9 +1068,8 @@ CONFIG_TR=y | |||
1025 | # CONFIG_WLAN_PRE80211 is not set | 1068 | # CONFIG_WLAN_PRE80211 is not set |
1026 | CONFIG_WLAN_80211=y | 1069 | CONFIG_WLAN_80211=y |
1027 | # CONFIG_PCMCIA_RAYCS is not set | 1070 | # CONFIG_PCMCIA_RAYCS is not set |
1028 | # CONFIG_IPW2100 is not set | ||
1029 | # CONFIG_IPW2200 is not set | ||
1030 | # CONFIG_LIBERTAS is not set | 1071 | # CONFIG_LIBERTAS is not set |
1072 | # CONFIG_LIBERTAS_THINFIRM is not set | ||
1031 | # CONFIG_AIRO is not set | 1073 | # CONFIG_AIRO is not set |
1032 | # CONFIG_HERMES is not set | 1074 | # CONFIG_HERMES is not set |
1033 | # CONFIG_ATMEL is not set | 1075 | # CONFIG_ATMEL is not set |
@@ -1044,6 +1086,8 @@ CONFIG_WLAN_80211=y | |||
1044 | CONFIG_ATH5K=y | 1086 | CONFIG_ATH5K=y |
1045 | # CONFIG_ATH5K_DEBUG is not set | 1087 | # CONFIG_ATH5K_DEBUG is not set |
1046 | # CONFIG_ATH9K is not set | 1088 | # CONFIG_ATH9K is not set |
1089 | # CONFIG_IPW2100 is not set | ||
1090 | # CONFIG_IPW2200 is not set | ||
1047 | # CONFIG_IWLCORE is not set | 1091 | # CONFIG_IWLCORE is not set |
1048 | # CONFIG_IWLWIFI_LEDS is not set | 1092 | # CONFIG_IWLWIFI_LEDS is not set |
1049 | # CONFIG_IWLAGN is not set | 1093 | # CONFIG_IWLAGN is not set |
@@ -1055,6 +1099,10 @@ CONFIG_ATH5K=y | |||
1055 | # CONFIG_RT2X00 is not set | 1099 | # CONFIG_RT2X00 is not set |
1056 | 1100 | ||
1057 | # | 1101 | # |
1102 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
1103 | # | ||
1104 | |||
1105 | # | ||
1058 | # USB Network Adapters | 1106 | # USB Network Adapters |
1059 | # | 1107 | # |
1060 | # CONFIG_USB_CATC is not set | 1108 | # CONFIG_USB_CATC is not set |
@@ -1062,6 +1110,7 @@ CONFIG_ATH5K=y | |||
1062 | # CONFIG_USB_PEGASUS is not set | 1110 | # CONFIG_USB_PEGASUS is not set |
1063 | # CONFIG_USB_RTL8150 is not set | 1111 | # CONFIG_USB_RTL8150 is not set |
1064 | # CONFIG_USB_USBNET is not set | 1112 | # CONFIG_USB_USBNET is not set |
1113 | # CONFIG_USB_HSO is not set | ||
1065 | CONFIG_NET_PCMCIA=y | 1114 | CONFIG_NET_PCMCIA=y |
1066 | # CONFIG_PCMCIA_3C589 is not set | 1115 | # CONFIG_PCMCIA_3C589 is not set |
1067 | # CONFIG_PCMCIA_3C574 is not set | 1116 | # CONFIG_PCMCIA_3C574 is not set |
@@ -1123,6 +1172,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y | |||
1123 | CONFIG_MOUSE_PS2_SYNAPTICS=y | 1172 | CONFIG_MOUSE_PS2_SYNAPTICS=y |
1124 | CONFIG_MOUSE_PS2_LIFEBOOK=y | 1173 | CONFIG_MOUSE_PS2_LIFEBOOK=y |
1125 | CONFIG_MOUSE_PS2_TRACKPOINT=y | 1174 | CONFIG_MOUSE_PS2_TRACKPOINT=y |
1175 | # CONFIG_MOUSE_PS2_ELANTECH is not set | ||
1126 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | 1176 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set |
1127 | # CONFIG_MOUSE_SERIAL is not set | 1177 | # CONFIG_MOUSE_SERIAL is not set |
1128 | # CONFIG_MOUSE_APPLETOUCH is not set | 1178 | # CONFIG_MOUSE_APPLETOUCH is not set |
@@ -1160,15 +1210,16 @@ CONFIG_INPUT_TOUCHSCREEN=y | |||
1160 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | 1210 | # CONFIG_TOUCHSCREEN_FUJITSU is not set |
1161 | # CONFIG_TOUCHSCREEN_GUNZE is not set | 1211 | # CONFIG_TOUCHSCREEN_GUNZE is not set |
1162 | # CONFIG_TOUCHSCREEN_ELO is not set | 1212 | # CONFIG_TOUCHSCREEN_ELO is not set |
1213 | # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set | ||
1163 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | 1214 | # CONFIG_TOUCHSCREEN_MTOUCH is not set |
1164 | # CONFIG_TOUCHSCREEN_INEXIO is not set | 1215 | # CONFIG_TOUCHSCREEN_INEXIO is not set |
1165 | # CONFIG_TOUCHSCREEN_MK712 is not set | 1216 | # CONFIG_TOUCHSCREEN_MK712 is not set |
1166 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | 1217 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set |
1167 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | 1218 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set |
1168 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | 1219 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set |
1169 | # CONFIG_TOUCHSCREEN_UCB1400 is not set | ||
1170 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | 1220 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set |
1171 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | 1221 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set |
1222 | # CONFIG_TOUCHSCREEN_TSC2007 is not set | ||
1172 | CONFIG_INPUT_MISC=y | 1223 | CONFIG_INPUT_MISC=y |
1173 | # CONFIG_INPUT_PCSPKR is not set | 1224 | # CONFIG_INPUT_PCSPKR is not set |
1174 | # CONFIG_INPUT_APANEL is not set | 1225 | # CONFIG_INPUT_APANEL is not set |
@@ -1179,6 +1230,7 @@ CONFIG_INPUT_MISC=y | |||
1179 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | 1230 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set |
1180 | # CONFIG_INPUT_POWERMATE is not set | 1231 | # CONFIG_INPUT_POWERMATE is not set |
1181 | # CONFIG_INPUT_YEALINK is not set | 1232 | # CONFIG_INPUT_YEALINK is not set |
1233 | # CONFIG_INPUT_CM109 is not set | ||
1182 | # CONFIG_INPUT_UINPUT is not set | 1234 | # CONFIG_INPUT_UINPUT is not set |
1183 | 1235 | ||
1184 | # | 1236 | # |
@@ -1245,6 +1297,7 @@ CONFIG_SERIAL_CORE=y | |||
1245 | CONFIG_SERIAL_CORE_CONSOLE=y | 1297 | CONFIG_SERIAL_CORE_CONSOLE=y |
1246 | # CONFIG_SERIAL_JSM is not set | 1298 | # CONFIG_SERIAL_JSM is not set |
1247 | CONFIG_UNIX98_PTYS=y | 1299 | CONFIG_UNIX98_PTYS=y |
1300 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
1248 | # CONFIG_LEGACY_PTYS is not set | 1301 | # CONFIG_LEGACY_PTYS is not set |
1249 | # CONFIG_IPMI_HANDLER is not set | 1302 | # CONFIG_IPMI_HANDLER is not set |
1250 | CONFIG_HW_RANDOM=y | 1303 | CONFIG_HW_RANDOM=y |
@@ -1279,6 +1332,7 @@ CONFIG_I2C=y | |||
1279 | CONFIG_I2C_BOARDINFO=y | 1332 | CONFIG_I2C_BOARDINFO=y |
1280 | # CONFIG_I2C_CHARDEV is not set | 1333 | # CONFIG_I2C_CHARDEV is not set |
1281 | CONFIG_I2C_HELPER_AUTO=y | 1334 | CONFIG_I2C_HELPER_AUTO=y |
1335 | CONFIG_I2C_ALGOBIT=y | ||
1282 | 1336 | ||
1283 | # | 1337 | # |
1284 | # I2C Hardware Bus support | 1338 | # I2C Hardware Bus support |
@@ -1331,8 +1385,6 @@ CONFIG_I2C_I801=y | |||
1331 | # Miscellaneous I2C Chip support | 1385 | # Miscellaneous I2C Chip support |
1332 | # | 1386 | # |
1333 | # CONFIG_DS1682 is not set | 1387 | # CONFIG_DS1682 is not set |
1334 | # CONFIG_EEPROM_AT24 is not set | ||
1335 | # CONFIG_EEPROM_LEGACY is not set | ||
1336 | # CONFIG_SENSORS_PCF8574 is not set | 1388 | # CONFIG_SENSORS_PCF8574 is not set |
1337 | # CONFIG_PCF8575 is not set | 1389 | # CONFIG_PCF8575 is not set |
1338 | # CONFIG_SENSORS_PCA9539 is not set | 1390 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -1351,8 +1403,78 @@ CONFIG_POWER_SUPPLY=y | |||
1351 | # CONFIG_POWER_SUPPLY_DEBUG is not set | 1403 | # CONFIG_POWER_SUPPLY_DEBUG is not set |
1352 | # CONFIG_PDA_POWER is not set | 1404 | # CONFIG_PDA_POWER is not set |
1353 | # CONFIG_BATTERY_DS2760 is not set | 1405 | # CONFIG_BATTERY_DS2760 is not set |
1354 | # CONFIG_HWMON is not set | 1406 | # CONFIG_BATTERY_BQ27x00 is not set |
1407 | CONFIG_HWMON=y | ||
1408 | # CONFIG_HWMON_VID is not set | ||
1409 | # CONFIG_SENSORS_ABITUGURU is not set | ||
1410 | # CONFIG_SENSORS_ABITUGURU3 is not set | ||
1411 | # CONFIG_SENSORS_AD7414 is not set | ||
1412 | # CONFIG_SENSORS_AD7418 is not set | ||
1413 | # CONFIG_SENSORS_ADM1021 is not set | ||
1414 | # CONFIG_SENSORS_ADM1025 is not set | ||
1415 | # CONFIG_SENSORS_ADM1026 is not set | ||
1416 | # CONFIG_SENSORS_ADM1029 is not set | ||
1417 | # CONFIG_SENSORS_ADM1031 is not set | ||
1418 | # CONFIG_SENSORS_ADM9240 is not set | ||
1419 | # CONFIG_SENSORS_ADT7462 is not set | ||
1420 | # CONFIG_SENSORS_ADT7470 is not set | ||
1421 | # CONFIG_SENSORS_ADT7473 is not set | ||
1422 | # CONFIG_SENSORS_ADT7475 is not set | ||
1423 | # CONFIG_SENSORS_K8TEMP is not set | ||
1424 | # CONFIG_SENSORS_ASB100 is not set | ||
1425 | # CONFIG_SENSORS_ATXP1 is not set | ||
1426 | # CONFIG_SENSORS_DS1621 is not set | ||
1427 | # CONFIG_SENSORS_I5K_AMB is not set | ||
1428 | # CONFIG_SENSORS_F71805F is not set | ||
1429 | # CONFIG_SENSORS_F71882FG is not set | ||
1430 | # CONFIG_SENSORS_F75375S is not set | ||
1431 | # CONFIG_SENSORS_FSCHER is not set | ||
1432 | # CONFIG_SENSORS_FSCPOS is not set | ||
1433 | # CONFIG_SENSORS_FSCHMD is not set | ||
1434 | # CONFIG_SENSORS_GL518SM is not set | ||
1435 | # CONFIG_SENSORS_GL520SM is not set | ||
1436 | # CONFIG_SENSORS_CORETEMP is not set | ||
1437 | # CONFIG_SENSORS_IT87 is not set | ||
1438 | # CONFIG_SENSORS_LM63 is not set | ||
1439 | # CONFIG_SENSORS_LM75 is not set | ||
1440 | # CONFIG_SENSORS_LM77 is not set | ||
1441 | # CONFIG_SENSORS_LM78 is not set | ||
1442 | # CONFIG_SENSORS_LM80 is not set | ||
1443 | # CONFIG_SENSORS_LM83 is not set | ||
1444 | # CONFIG_SENSORS_LM85 is not set | ||
1445 | # CONFIG_SENSORS_LM87 is not set | ||
1446 | # CONFIG_SENSORS_LM90 is not set | ||
1447 | # CONFIG_SENSORS_LM92 is not set | ||
1448 | # CONFIG_SENSORS_LM93 is not set | ||
1449 | # CONFIG_SENSORS_LTC4245 is not set | ||
1450 | # CONFIG_SENSORS_MAX1619 is not set | ||
1451 | # CONFIG_SENSORS_MAX6650 is not set | ||
1452 | # CONFIG_SENSORS_PC87360 is not set | ||
1453 | # CONFIG_SENSORS_PC87427 is not set | ||
1454 | # CONFIG_SENSORS_SIS5595 is not set | ||
1455 | # CONFIG_SENSORS_DME1737 is not set | ||
1456 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
1457 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
1458 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
1459 | # CONFIG_SENSORS_ADS7828 is not set | ||
1460 | # CONFIG_SENSORS_THMC50 is not set | ||
1461 | # CONFIG_SENSORS_VIA686A is not set | ||
1462 | # CONFIG_SENSORS_VT1211 is not set | ||
1463 | # CONFIG_SENSORS_VT8231 is not set | ||
1464 | # CONFIG_SENSORS_W83781D is not set | ||
1465 | # CONFIG_SENSORS_W83791D is not set | ||
1466 | # CONFIG_SENSORS_W83792D is not set | ||
1467 | # CONFIG_SENSORS_W83793 is not set | ||
1468 | # CONFIG_SENSORS_W83L785TS is not set | ||
1469 | # CONFIG_SENSORS_W83L786NG is not set | ||
1470 | # CONFIG_SENSORS_W83627HF is not set | ||
1471 | # CONFIG_SENSORS_W83627EHF is not set | ||
1472 | # CONFIG_SENSORS_HDAPS is not set | ||
1473 | # CONFIG_SENSORS_LIS3LV02D is not set | ||
1474 | # CONFIG_SENSORS_APPLESMC is not set | ||
1475 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
1355 | CONFIG_THERMAL=y | 1476 | CONFIG_THERMAL=y |
1477 | # CONFIG_THERMAL_HWMON is not set | ||
1356 | CONFIG_WATCHDOG=y | 1478 | CONFIG_WATCHDOG=y |
1357 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 1479 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
1358 | 1480 | ||
@@ -1372,6 +1494,7 @@ CONFIG_WATCHDOG=y | |||
1372 | # CONFIG_I6300ESB_WDT is not set | 1494 | # CONFIG_I6300ESB_WDT is not set |
1373 | # CONFIG_ITCO_WDT is not set | 1495 | # CONFIG_ITCO_WDT is not set |
1374 | # CONFIG_IT8712F_WDT is not set | 1496 | # CONFIG_IT8712F_WDT is not set |
1497 | # CONFIG_IT87_WDT is not set | ||
1375 | # CONFIG_HP_WATCHDOG is not set | 1498 | # CONFIG_HP_WATCHDOG is not set |
1376 | # CONFIG_SC1200_WDT is not set | 1499 | # CONFIG_SC1200_WDT is not set |
1377 | # CONFIG_PC87413_WDT is not set | 1500 | # CONFIG_PC87413_WDT is not set |
@@ -1379,9 +1502,11 @@ CONFIG_WATCHDOG=y | |||
1379 | # CONFIG_SBC8360_WDT is not set | 1502 | # CONFIG_SBC8360_WDT is not set |
1380 | # CONFIG_SBC7240_WDT is not set | 1503 | # CONFIG_SBC7240_WDT is not set |
1381 | # CONFIG_CPU5_WDT is not set | 1504 | # CONFIG_CPU5_WDT is not set |
1505 | # CONFIG_SMSC_SCH311X_WDT is not set | ||
1382 | # CONFIG_SMSC37B787_WDT is not set | 1506 | # CONFIG_SMSC37B787_WDT is not set |
1383 | # CONFIG_W83627HF_WDT is not set | 1507 | # CONFIG_W83627HF_WDT is not set |
1384 | # CONFIG_W83697HF_WDT is not set | 1508 | # CONFIG_W83697HF_WDT is not set |
1509 | # CONFIG_W83697UG_WDT is not set | ||
1385 | # CONFIG_W83877F_WDT is not set | 1510 | # CONFIG_W83877F_WDT is not set |
1386 | # CONFIG_W83977F_WDT is not set | 1511 | # CONFIG_W83977F_WDT is not set |
1387 | # CONFIG_MACHZ_WDT is not set | 1512 | # CONFIG_MACHZ_WDT is not set |
@@ -1397,11 +1522,11 @@ CONFIG_WATCHDOG=y | |||
1397 | # USB-based Watchdog Cards | 1522 | # USB-based Watchdog Cards |
1398 | # | 1523 | # |
1399 | # CONFIG_USBPCWATCHDOG is not set | 1524 | # CONFIG_USBPCWATCHDOG is not set |
1525 | CONFIG_SSB_POSSIBLE=y | ||
1400 | 1526 | ||
1401 | # | 1527 | # |
1402 | # Sonics Silicon Backplane | 1528 | # Sonics Silicon Backplane |
1403 | # | 1529 | # |
1404 | CONFIG_SSB_POSSIBLE=y | ||
1405 | # CONFIG_SSB is not set | 1530 | # CONFIG_SSB is not set |
1406 | 1531 | ||
1407 | # | 1532 | # |
@@ -1410,7 +1535,13 @@ CONFIG_SSB_POSSIBLE=y | |||
1410 | # CONFIG_MFD_CORE is not set | 1535 | # CONFIG_MFD_CORE is not set |
1411 | # CONFIG_MFD_SM501 is not set | 1536 | # CONFIG_MFD_SM501 is not set |
1412 | # CONFIG_HTC_PASIC3 is not set | 1537 | # CONFIG_HTC_PASIC3 is not set |
1538 | # CONFIG_TWL4030_CORE is not set | ||
1413 | # CONFIG_MFD_TMIO is not set | 1539 | # CONFIG_MFD_TMIO is not set |
1540 | # CONFIG_PMIC_DA903X is not set | ||
1541 | # CONFIG_MFD_WM8400 is not set | ||
1542 | # CONFIG_MFD_WM8350_I2C is not set | ||
1543 | # CONFIG_MFD_PCF50633 is not set | ||
1544 | # CONFIG_REGULATOR is not set | ||
1414 | 1545 | ||
1415 | # | 1546 | # |
1416 | # Multimedia devices | 1547 | # Multimedia devices |
@@ -1450,6 +1581,7 @@ CONFIG_DRM=y | |||
1450 | # CONFIG_DRM_I810 is not set | 1581 | # CONFIG_DRM_I810 is not set |
1451 | # CONFIG_DRM_I830 is not set | 1582 | # CONFIG_DRM_I830 is not set |
1452 | CONFIG_DRM_I915=y | 1583 | CONFIG_DRM_I915=y |
1584 | # CONFIG_DRM_I915_KMS is not set | ||
1453 | # CONFIG_DRM_MGA is not set | 1585 | # CONFIG_DRM_MGA is not set |
1454 | # CONFIG_DRM_SIS is not set | 1586 | # CONFIG_DRM_SIS is not set |
1455 | # CONFIG_DRM_VIA is not set | 1587 | # CONFIG_DRM_VIA is not set |
@@ -1459,6 +1591,7 @@ CONFIG_DRM_I915=y | |||
1459 | CONFIG_FB=y | 1591 | CONFIG_FB=y |
1460 | # CONFIG_FIRMWARE_EDID is not set | 1592 | # CONFIG_FIRMWARE_EDID is not set |
1461 | # CONFIG_FB_DDC is not set | 1593 | # CONFIG_FB_DDC is not set |
1594 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
1462 | CONFIG_FB_CFB_FILLRECT=y | 1595 | CONFIG_FB_CFB_FILLRECT=y |
1463 | CONFIG_FB_CFB_COPYAREA=y | 1596 | CONFIG_FB_CFB_COPYAREA=y |
1464 | CONFIG_FB_CFB_IMAGEBLIT=y | 1597 | CONFIG_FB_CFB_IMAGEBLIT=y |
@@ -1487,7 +1620,6 @@ CONFIG_FB_TILEBLITTING=y | |||
1487 | # CONFIG_FB_UVESA is not set | 1620 | # CONFIG_FB_UVESA is not set |
1488 | # CONFIG_FB_VESA is not set | 1621 | # CONFIG_FB_VESA is not set |
1489 | CONFIG_FB_EFI=y | 1622 | CONFIG_FB_EFI=y |
1490 | # CONFIG_FB_IMAC is not set | ||
1491 | # CONFIG_FB_N411 is not set | 1623 | # CONFIG_FB_N411 is not set |
1492 | # CONFIG_FB_HGA is not set | 1624 | # CONFIG_FB_HGA is not set |
1493 | # CONFIG_FB_S1D13XXX is not set | 1625 | # CONFIG_FB_S1D13XXX is not set |
@@ -1503,6 +1635,7 @@ CONFIG_FB_EFI=y | |||
1503 | # CONFIG_FB_S3 is not set | 1635 | # CONFIG_FB_S3 is not set |
1504 | # CONFIG_FB_SAVAGE is not set | 1636 | # CONFIG_FB_SAVAGE is not set |
1505 | # CONFIG_FB_SIS is not set | 1637 | # CONFIG_FB_SIS is not set |
1638 | # CONFIG_FB_VIA is not set | ||
1506 | # CONFIG_FB_NEOMAGIC is not set | 1639 | # CONFIG_FB_NEOMAGIC is not set |
1507 | # CONFIG_FB_KYRO is not set | 1640 | # CONFIG_FB_KYRO is not set |
1508 | # CONFIG_FB_3DFX is not set | 1641 | # CONFIG_FB_3DFX is not set |
@@ -1515,12 +1648,15 @@ CONFIG_FB_EFI=y | |||
1515 | # CONFIG_FB_CARMINE is not set | 1648 | # CONFIG_FB_CARMINE is not set |
1516 | # CONFIG_FB_GEODE is not set | 1649 | # CONFIG_FB_GEODE is not set |
1517 | # CONFIG_FB_VIRTUAL is not set | 1650 | # CONFIG_FB_VIRTUAL is not set |
1651 | # CONFIG_FB_METRONOME is not set | ||
1652 | # CONFIG_FB_MB862XX is not set | ||
1518 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 1653 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
1519 | # CONFIG_LCD_CLASS_DEVICE is not set | 1654 | # CONFIG_LCD_CLASS_DEVICE is not set |
1520 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | 1655 | CONFIG_BACKLIGHT_CLASS_DEVICE=y |
1521 | # CONFIG_BACKLIGHT_CORGI is not set | 1656 | CONFIG_BACKLIGHT_GENERIC=y |
1522 | # CONFIG_BACKLIGHT_PROGEAR is not set | 1657 | # CONFIG_BACKLIGHT_PROGEAR is not set |
1523 | # CONFIG_BACKLIGHT_MBP_NVIDIA is not set | 1658 | # CONFIG_BACKLIGHT_MBP_NVIDIA is not set |
1659 | # CONFIG_BACKLIGHT_SAHARA is not set | ||
1524 | 1660 | ||
1525 | # | 1661 | # |
1526 | # Display device support | 1662 | # Display device support |
@@ -1540,10 +1676,12 @@ CONFIG_LOGO=y | |||
1540 | # CONFIG_LOGO_LINUX_VGA16 is not set | 1676 | # CONFIG_LOGO_LINUX_VGA16 is not set |
1541 | CONFIG_LOGO_LINUX_CLUT224=y | 1677 | CONFIG_LOGO_LINUX_CLUT224=y |
1542 | CONFIG_SOUND=y | 1678 | CONFIG_SOUND=y |
1679 | CONFIG_SOUND_OSS_CORE=y | ||
1543 | CONFIG_SND=y | 1680 | CONFIG_SND=y |
1544 | CONFIG_SND_TIMER=y | 1681 | CONFIG_SND_TIMER=y |
1545 | CONFIG_SND_PCM=y | 1682 | CONFIG_SND_PCM=y |
1546 | CONFIG_SND_HWDEP=y | 1683 | CONFIG_SND_HWDEP=y |
1684 | CONFIG_SND_JACK=y | ||
1547 | CONFIG_SND_SEQUENCER=y | 1685 | CONFIG_SND_SEQUENCER=y |
1548 | CONFIG_SND_SEQ_DUMMY=y | 1686 | CONFIG_SND_SEQ_DUMMY=y |
1549 | CONFIG_SND_OSSEMUL=y | 1687 | CONFIG_SND_OSSEMUL=y |
@@ -1551,6 +1689,8 @@ CONFIG_SND_MIXER_OSS=y | |||
1551 | CONFIG_SND_PCM_OSS=y | 1689 | CONFIG_SND_PCM_OSS=y |
1552 | CONFIG_SND_PCM_OSS_PLUGINS=y | 1690 | CONFIG_SND_PCM_OSS_PLUGINS=y |
1553 | CONFIG_SND_SEQUENCER_OSS=y | 1691 | CONFIG_SND_SEQUENCER_OSS=y |
1692 | CONFIG_SND_HRTIMER=y | ||
1693 | CONFIG_SND_SEQ_HRTIMER_DEFAULT=y | ||
1554 | CONFIG_SND_DYNAMIC_MINORS=y | 1694 | CONFIG_SND_DYNAMIC_MINORS=y |
1555 | CONFIG_SND_SUPPORT_OLD_API=y | 1695 | CONFIG_SND_SUPPORT_OLD_API=y |
1556 | CONFIG_SND_VERBOSE_PROCFS=y | 1696 | CONFIG_SND_VERBOSE_PROCFS=y |
@@ -1605,11 +1745,16 @@ CONFIG_SND_PCI=y | |||
1605 | # CONFIG_SND_FM801 is not set | 1745 | # CONFIG_SND_FM801 is not set |
1606 | CONFIG_SND_HDA_INTEL=y | 1746 | CONFIG_SND_HDA_INTEL=y |
1607 | CONFIG_SND_HDA_HWDEP=y | 1747 | CONFIG_SND_HDA_HWDEP=y |
1748 | # CONFIG_SND_HDA_RECONFIG is not set | ||
1749 | # CONFIG_SND_HDA_INPUT_BEEP is not set | ||
1608 | CONFIG_SND_HDA_CODEC_REALTEK=y | 1750 | CONFIG_SND_HDA_CODEC_REALTEK=y |
1609 | CONFIG_SND_HDA_CODEC_ANALOG=y | 1751 | CONFIG_SND_HDA_CODEC_ANALOG=y |
1610 | CONFIG_SND_HDA_CODEC_SIGMATEL=y | 1752 | CONFIG_SND_HDA_CODEC_SIGMATEL=y |
1611 | CONFIG_SND_HDA_CODEC_VIA=y | 1753 | CONFIG_SND_HDA_CODEC_VIA=y |
1612 | CONFIG_SND_HDA_CODEC_ATIHDMI=y | 1754 | CONFIG_SND_HDA_CODEC_ATIHDMI=y |
1755 | CONFIG_SND_HDA_CODEC_NVHDMI=y | ||
1756 | CONFIG_SND_HDA_CODEC_INTELHDMI=y | ||
1757 | CONFIG_SND_HDA_ELD=y | ||
1613 | CONFIG_SND_HDA_CODEC_CONEXANT=y | 1758 | CONFIG_SND_HDA_CODEC_CONEXANT=y |
1614 | CONFIG_SND_HDA_CODEC_CMEDIA=y | 1759 | CONFIG_SND_HDA_CODEC_CMEDIA=y |
1615 | CONFIG_SND_HDA_CODEC_SI3054=y | 1760 | CONFIG_SND_HDA_CODEC_SI3054=y |
@@ -1643,6 +1788,7 @@ CONFIG_SND_USB=y | |||
1643 | # CONFIG_SND_USB_AUDIO is not set | 1788 | # CONFIG_SND_USB_AUDIO is not set |
1644 | # CONFIG_SND_USB_USX2Y is not set | 1789 | # CONFIG_SND_USB_USX2Y is not set |
1645 | # CONFIG_SND_USB_CAIAQ is not set | 1790 | # CONFIG_SND_USB_CAIAQ is not set |
1791 | # CONFIG_SND_USB_US122L is not set | ||
1646 | CONFIG_SND_PCMCIA=y | 1792 | CONFIG_SND_PCMCIA=y |
1647 | # CONFIG_SND_VXPOCKET is not set | 1793 | # CONFIG_SND_VXPOCKET is not set |
1648 | # CONFIG_SND_PDAUDIOCF is not set | 1794 | # CONFIG_SND_PDAUDIOCF is not set |
@@ -1657,15 +1803,37 @@ CONFIG_HIDRAW=y | |||
1657 | # USB Input Devices | 1803 | # USB Input Devices |
1658 | # | 1804 | # |
1659 | CONFIG_USB_HID=y | 1805 | CONFIG_USB_HID=y |
1660 | CONFIG_USB_HIDINPUT_POWERBOOK=y | ||
1661 | CONFIG_HID_FF=y | ||
1662 | CONFIG_HID_PID=y | 1806 | CONFIG_HID_PID=y |
1807 | CONFIG_USB_HIDDEV=y | ||
1808 | |||
1809 | # | ||
1810 | # Special HID drivers | ||
1811 | # | ||
1812 | CONFIG_HID_COMPAT=y | ||
1813 | CONFIG_HID_A4TECH=y | ||
1814 | CONFIG_HID_APPLE=y | ||
1815 | CONFIG_HID_BELKIN=y | ||
1816 | CONFIG_HID_CHERRY=y | ||
1817 | CONFIG_HID_CHICONY=y | ||
1818 | CONFIG_HID_CYPRESS=y | ||
1819 | CONFIG_HID_EZKEY=y | ||
1820 | CONFIG_HID_GYRATION=y | ||
1821 | CONFIG_HID_LOGITECH=y | ||
1663 | CONFIG_LOGITECH_FF=y | 1822 | CONFIG_LOGITECH_FF=y |
1664 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | 1823 | # CONFIG_LOGIRUMBLEPAD2_FF is not set |
1824 | CONFIG_HID_MICROSOFT=y | ||
1825 | CONFIG_HID_MONTEREY=y | ||
1826 | CONFIG_HID_NTRIG=y | ||
1827 | CONFIG_HID_PANTHERLORD=y | ||
1665 | CONFIG_PANTHERLORD_FF=y | 1828 | CONFIG_PANTHERLORD_FF=y |
1829 | CONFIG_HID_PETALYNX=y | ||
1830 | CONFIG_HID_SAMSUNG=y | ||
1831 | CONFIG_HID_SONY=y | ||
1832 | CONFIG_HID_SUNPLUS=y | ||
1833 | # CONFIG_GREENASIA_FF is not set | ||
1834 | CONFIG_HID_TOPSEED=y | ||
1666 | CONFIG_THRUSTMASTER_FF=y | 1835 | CONFIG_THRUSTMASTER_FF=y |
1667 | CONFIG_ZEROPLUS_FF=y | 1836 | CONFIG_ZEROPLUS_FF=y |
1668 | CONFIG_USB_HIDDEV=y | ||
1669 | CONFIG_USB_SUPPORT=y | 1837 | CONFIG_USB_SUPPORT=y |
1670 | CONFIG_USB_ARCH_HAS_HCD=y | 1838 | CONFIG_USB_ARCH_HAS_HCD=y |
1671 | CONFIG_USB_ARCH_HAS_OHCI=y | 1839 | CONFIG_USB_ARCH_HAS_OHCI=y |
@@ -1683,6 +1851,8 @@ CONFIG_USB_DEVICEFS=y | |||
1683 | CONFIG_USB_SUSPEND=y | 1851 | CONFIG_USB_SUSPEND=y |
1684 | # CONFIG_USB_OTG is not set | 1852 | # CONFIG_USB_OTG is not set |
1685 | CONFIG_USB_MON=y | 1853 | CONFIG_USB_MON=y |
1854 | # CONFIG_USB_WUSB is not set | ||
1855 | # CONFIG_USB_WUSB_CBAF is not set | ||
1686 | 1856 | ||
1687 | # | 1857 | # |
1688 | # USB Host Controller Drivers | 1858 | # USB Host Controller Drivers |
@@ -1691,6 +1861,7 @@ CONFIG_USB_MON=y | |||
1691 | CONFIG_USB_EHCI_HCD=y | 1861 | CONFIG_USB_EHCI_HCD=y |
1692 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1862 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1693 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1863 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1864 | # CONFIG_USB_OXU210HP_HCD is not set | ||
1694 | # CONFIG_USB_ISP116X_HCD is not set | 1865 | # CONFIG_USB_ISP116X_HCD is not set |
1695 | # CONFIG_USB_ISP1760_HCD is not set | 1866 | # CONFIG_USB_ISP1760_HCD is not set |
1696 | CONFIG_USB_OHCI_HCD=y | 1867 | CONFIG_USB_OHCI_HCD=y |
@@ -1700,6 +1871,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
1700 | CONFIG_USB_UHCI_HCD=y | 1871 | CONFIG_USB_UHCI_HCD=y |
1701 | # CONFIG_USB_SL811_HCD is not set | 1872 | # CONFIG_USB_SL811_HCD is not set |
1702 | # CONFIG_USB_R8A66597_HCD is not set | 1873 | # CONFIG_USB_R8A66597_HCD is not set |
1874 | # CONFIG_USB_WHCI_HCD is not set | ||
1875 | # CONFIG_USB_HWA_HCD is not set | ||
1703 | 1876 | ||
1704 | # | 1877 | # |
1705 | # USB Device Class drivers | 1878 | # USB Device Class drivers |
@@ -1707,20 +1880,20 @@ CONFIG_USB_UHCI_HCD=y | |||
1707 | # CONFIG_USB_ACM is not set | 1880 | # CONFIG_USB_ACM is not set |
1708 | CONFIG_USB_PRINTER=y | 1881 | CONFIG_USB_PRINTER=y |
1709 | # CONFIG_USB_WDM is not set | 1882 | # CONFIG_USB_WDM is not set |
1883 | # CONFIG_USB_TMC is not set | ||
1710 | 1884 | ||
1711 | # | 1885 | # |
1712 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1886 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
1713 | # | 1887 | # |
1714 | 1888 | ||
1715 | # | 1889 | # |
1716 | # may also be needed; see USB_STORAGE Help for more information | 1890 | # see USB_STORAGE Help for more information |
1717 | # | 1891 | # |
1718 | CONFIG_USB_STORAGE=y | 1892 | CONFIG_USB_STORAGE=y |
1719 | # CONFIG_USB_STORAGE_DEBUG is not set | 1893 | # CONFIG_USB_STORAGE_DEBUG is not set |
1720 | # CONFIG_USB_STORAGE_DATAFAB is not set | 1894 | # CONFIG_USB_STORAGE_DATAFAB is not set |
1721 | # CONFIG_USB_STORAGE_FREECOM is not set | 1895 | # CONFIG_USB_STORAGE_FREECOM is not set |
1722 | # CONFIG_USB_STORAGE_ISD200 is not set | 1896 | # CONFIG_USB_STORAGE_ISD200 is not set |
1723 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1724 | # CONFIG_USB_STORAGE_USBAT is not set | 1897 | # CONFIG_USB_STORAGE_USBAT is not set |
1725 | # CONFIG_USB_STORAGE_SDDR09 is not set | 1898 | # CONFIG_USB_STORAGE_SDDR09 is not set |
1726 | # CONFIG_USB_STORAGE_SDDR55 is not set | 1899 | # CONFIG_USB_STORAGE_SDDR55 is not set |
@@ -1728,7 +1901,6 @@ CONFIG_USB_STORAGE=y | |||
1728 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1901 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1729 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1902 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1730 | # CONFIG_USB_STORAGE_KARMA is not set | 1903 | # CONFIG_USB_STORAGE_KARMA is not set |
1731 | # CONFIG_USB_STORAGE_SIERRA is not set | ||
1732 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | 1904 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set |
1733 | CONFIG_USB_LIBUSUAL=y | 1905 | CONFIG_USB_LIBUSUAL=y |
1734 | 1906 | ||
@@ -1749,6 +1921,7 @@ CONFIG_USB_LIBUSUAL=y | |||
1749 | # CONFIG_USB_EMI62 is not set | 1921 | # CONFIG_USB_EMI62 is not set |
1750 | # CONFIG_USB_EMI26 is not set | 1922 | # CONFIG_USB_EMI26 is not set |
1751 | # CONFIG_USB_ADUTUX is not set | 1923 | # CONFIG_USB_ADUTUX is not set |
1924 | # CONFIG_USB_SEVSEG is not set | ||
1752 | # CONFIG_USB_RIO500 is not set | 1925 | # CONFIG_USB_RIO500 is not set |
1753 | # CONFIG_USB_LEGOTOWER is not set | 1926 | # CONFIG_USB_LEGOTOWER is not set |
1754 | # CONFIG_USB_LCD is not set | 1927 | # CONFIG_USB_LCD is not set |
@@ -1766,7 +1939,13 @@ CONFIG_USB_LIBUSUAL=y | |||
1766 | # CONFIG_USB_IOWARRIOR is not set | 1939 | # CONFIG_USB_IOWARRIOR is not set |
1767 | # CONFIG_USB_TEST is not set | 1940 | # CONFIG_USB_TEST is not set |
1768 | # CONFIG_USB_ISIGHTFW is not set | 1941 | # CONFIG_USB_ISIGHTFW is not set |
1942 | # CONFIG_USB_VST is not set | ||
1769 | # CONFIG_USB_GADGET is not set | 1943 | # CONFIG_USB_GADGET is not set |
1944 | |||
1945 | # | ||
1946 | # OTG and related infrastructure | ||
1947 | # | ||
1948 | # CONFIG_UWB is not set | ||
1770 | # CONFIG_MMC is not set | 1949 | # CONFIG_MMC is not set |
1771 | # CONFIG_MEMSTICK is not set | 1950 | # CONFIG_MEMSTICK is not set |
1772 | CONFIG_NEW_LEDS=y | 1951 | CONFIG_NEW_LEDS=y |
@@ -1775,6 +1954,7 @@ CONFIG_LEDS_CLASS=y | |||
1775 | # | 1954 | # |
1776 | # LED drivers | 1955 | # LED drivers |
1777 | # | 1956 | # |
1957 | # CONFIG_LEDS_ALIX2 is not set | ||
1778 | # CONFIG_LEDS_PCA9532 is not set | 1958 | # CONFIG_LEDS_PCA9532 is not set |
1779 | # CONFIG_LEDS_CLEVO_MAIL is not set | 1959 | # CONFIG_LEDS_CLEVO_MAIL is not set |
1780 | # CONFIG_LEDS_PCA955X is not set | 1960 | # CONFIG_LEDS_PCA955X is not set |
@@ -1785,6 +1965,7 @@ CONFIG_LEDS_CLASS=y | |||
1785 | CONFIG_LEDS_TRIGGERS=y | 1965 | CONFIG_LEDS_TRIGGERS=y |
1786 | # CONFIG_LEDS_TRIGGER_TIMER is not set | 1966 | # CONFIG_LEDS_TRIGGER_TIMER is not set |
1787 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | 1967 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set |
1968 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | ||
1788 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set | 1969 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set |
1789 | # CONFIG_ACCESSIBILITY is not set | 1970 | # CONFIG_ACCESSIBILITY is not set |
1790 | # CONFIG_INFINIBAND is not set | 1971 | # CONFIG_INFINIBAND is not set |
@@ -1824,6 +2005,7 @@ CONFIG_RTC_INTF_DEV=y | |||
1824 | # CONFIG_RTC_DRV_M41T80 is not set | 2005 | # CONFIG_RTC_DRV_M41T80 is not set |
1825 | # CONFIG_RTC_DRV_S35390A is not set | 2006 | # CONFIG_RTC_DRV_S35390A is not set |
1826 | # CONFIG_RTC_DRV_FM3130 is not set | 2007 | # CONFIG_RTC_DRV_FM3130 is not set |
2008 | # CONFIG_RTC_DRV_RX8581 is not set | ||
1827 | 2009 | ||
1828 | # | 2010 | # |
1829 | # SPI RTC drivers | 2011 | # SPI RTC drivers |
@@ -1833,12 +2015,15 @@ CONFIG_RTC_INTF_DEV=y | |||
1833 | # Platform RTC drivers | 2015 | # Platform RTC drivers |
1834 | # | 2016 | # |
1835 | CONFIG_RTC_DRV_CMOS=y | 2017 | CONFIG_RTC_DRV_CMOS=y |
2018 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1836 | # CONFIG_RTC_DRV_DS1511 is not set | 2019 | # CONFIG_RTC_DRV_DS1511 is not set |
1837 | # CONFIG_RTC_DRV_DS1553 is not set | 2020 | # CONFIG_RTC_DRV_DS1553 is not set |
1838 | # CONFIG_RTC_DRV_DS1742 is not set | 2021 | # CONFIG_RTC_DRV_DS1742 is not set |
1839 | # CONFIG_RTC_DRV_STK17TA8 is not set | 2022 | # CONFIG_RTC_DRV_STK17TA8 is not set |
1840 | # CONFIG_RTC_DRV_M48T86 is not set | 2023 | # CONFIG_RTC_DRV_M48T86 is not set |
2024 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1841 | # CONFIG_RTC_DRV_M48T59 is not set | 2025 | # CONFIG_RTC_DRV_M48T59 is not set |
2026 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1842 | # CONFIG_RTC_DRV_V3020 is not set | 2027 | # CONFIG_RTC_DRV_V3020 is not set |
1843 | 2028 | ||
1844 | # | 2029 | # |
@@ -1851,6 +2036,22 @@ CONFIG_DMADEVICES=y | |||
1851 | # | 2036 | # |
1852 | # CONFIG_INTEL_IOATDMA is not set | 2037 | # CONFIG_INTEL_IOATDMA is not set |
1853 | # CONFIG_UIO is not set | 2038 | # CONFIG_UIO is not set |
2039 | # CONFIG_STAGING is not set | ||
2040 | CONFIG_X86_PLATFORM_DEVICES=y | ||
2041 | # CONFIG_ACER_WMI is not set | ||
2042 | # CONFIG_ASUS_LAPTOP is not set | ||
2043 | # CONFIG_FUJITSU_LAPTOP is not set | ||
2044 | # CONFIG_TC1100_WMI is not set | ||
2045 | # CONFIG_MSI_LAPTOP is not set | ||
2046 | # CONFIG_PANASONIC_LAPTOP is not set | ||
2047 | # CONFIG_COMPAL_LAPTOP is not set | ||
2048 | # CONFIG_SONY_LAPTOP is not set | ||
2049 | # CONFIG_THINKPAD_ACPI is not set | ||
2050 | # CONFIG_INTEL_MENLOW is not set | ||
2051 | CONFIG_EEEPC_LAPTOP=y | ||
2052 | # CONFIG_ACPI_WMI is not set | ||
2053 | # CONFIG_ACPI_ASUS is not set | ||
2054 | # CONFIG_ACPI_TOSHIBA is not set | ||
1854 | 2055 | ||
1855 | # | 2056 | # |
1856 | # Firmware Drivers | 2057 | # Firmware Drivers |
@@ -1861,8 +2062,7 @@ CONFIG_EFI_VARS=y | |||
1861 | # CONFIG_DELL_RBU is not set | 2062 | # CONFIG_DELL_RBU is not set |
1862 | # CONFIG_DCDBAS is not set | 2063 | # CONFIG_DCDBAS is not set |
1863 | CONFIG_DMIID=y | 2064 | CONFIG_DMIID=y |
1864 | CONFIG_ISCSI_IBFT_FIND=y | 2065 | # CONFIG_ISCSI_IBFT_FIND is not set |
1865 | CONFIG_ISCSI_IBFT=y | ||
1866 | 2066 | ||
1867 | # | 2067 | # |
1868 | # File systems | 2068 | # File systems |
@@ -1872,21 +2072,24 @@ CONFIG_EXT3_FS=y | |||
1872 | CONFIG_EXT3_FS_XATTR=y | 2072 | CONFIG_EXT3_FS_XATTR=y |
1873 | CONFIG_EXT3_FS_POSIX_ACL=y | 2073 | CONFIG_EXT3_FS_POSIX_ACL=y |
1874 | CONFIG_EXT3_FS_SECURITY=y | 2074 | CONFIG_EXT3_FS_SECURITY=y |
1875 | # CONFIG_EXT4DEV_FS is not set | 2075 | # CONFIG_EXT4_FS is not set |
1876 | CONFIG_JBD=y | 2076 | CONFIG_JBD=y |
1877 | # CONFIG_JBD_DEBUG is not set | 2077 | # CONFIG_JBD_DEBUG is not set |
1878 | CONFIG_FS_MBCACHE=y | 2078 | CONFIG_FS_MBCACHE=y |
1879 | # CONFIG_REISERFS_FS is not set | 2079 | # CONFIG_REISERFS_FS is not set |
1880 | # CONFIG_JFS_FS is not set | 2080 | # CONFIG_JFS_FS is not set |
1881 | CONFIG_FS_POSIX_ACL=y | 2081 | CONFIG_FS_POSIX_ACL=y |
2082 | CONFIG_FILE_LOCKING=y | ||
1882 | # CONFIG_XFS_FS is not set | 2083 | # CONFIG_XFS_FS is not set |
1883 | # CONFIG_OCFS2_FS is not set | 2084 | # CONFIG_OCFS2_FS is not set |
2085 | # CONFIG_BTRFS_FS is not set | ||
1884 | CONFIG_DNOTIFY=y | 2086 | CONFIG_DNOTIFY=y |
1885 | CONFIG_INOTIFY=y | 2087 | CONFIG_INOTIFY=y |
1886 | CONFIG_INOTIFY_USER=y | 2088 | CONFIG_INOTIFY_USER=y |
1887 | CONFIG_QUOTA=y | 2089 | CONFIG_QUOTA=y |
1888 | CONFIG_QUOTA_NETLINK_INTERFACE=y | 2090 | CONFIG_QUOTA_NETLINK_INTERFACE=y |
1889 | # CONFIG_PRINT_QUOTA_WARNING is not set | 2091 | # CONFIG_PRINT_QUOTA_WARNING is not set |
2092 | CONFIG_QUOTA_TREE=y | ||
1890 | # CONFIG_QFMT_V1 is not set | 2093 | # CONFIG_QFMT_V1 is not set |
1891 | CONFIG_QFMT_V2=y | 2094 | CONFIG_QFMT_V2=y |
1892 | CONFIG_QUOTACTL=y | 2095 | CONFIG_QUOTACTL=y |
@@ -1920,16 +2123,14 @@ CONFIG_PROC_FS=y | |||
1920 | CONFIG_PROC_KCORE=y | 2123 | CONFIG_PROC_KCORE=y |
1921 | CONFIG_PROC_VMCORE=y | 2124 | CONFIG_PROC_VMCORE=y |
1922 | CONFIG_PROC_SYSCTL=y | 2125 | CONFIG_PROC_SYSCTL=y |
2126 | CONFIG_PROC_PAGE_MONITOR=y | ||
1923 | CONFIG_SYSFS=y | 2127 | CONFIG_SYSFS=y |
1924 | CONFIG_TMPFS=y | 2128 | CONFIG_TMPFS=y |
1925 | CONFIG_TMPFS_POSIX_ACL=y | 2129 | CONFIG_TMPFS_POSIX_ACL=y |
1926 | CONFIG_HUGETLBFS=y | 2130 | CONFIG_HUGETLBFS=y |
1927 | CONFIG_HUGETLB_PAGE=y | 2131 | CONFIG_HUGETLB_PAGE=y |
1928 | # CONFIG_CONFIGFS_FS is not set | 2132 | # CONFIG_CONFIGFS_FS is not set |
1929 | 2133 | CONFIG_MISC_FILESYSTEMS=y | |
1930 | # | ||
1931 | # Miscellaneous filesystems | ||
1932 | # | ||
1933 | # CONFIG_ADFS_FS is not set | 2134 | # CONFIG_ADFS_FS is not set |
1934 | # CONFIG_AFFS_FS is not set | 2135 | # CONFIG_AFFS_FS is not set |
1935 | # CONFIG_ECRYPT_FS is not set | 2136 | # CONFIG_ECRYPT_FS is not set |
@@ -1939,6 +2140,7 @@ CONFIG_HUGETLB_PAGE=y | |||
1939 | # CONFIG_BFS_FS is not set | 2140 | # CONFIG_BFS_FS is not set |
1940 | # CONFIG_EFS_FS is not set | 2141 | # CONFIG_EFS_FS is not set |
1941 | # CONFIG_CRAMFS is not set | 2142 | # CONFIG_CRAMFS is not set |
2143 | # CONFIG_SQUASHFS is not set | ||
1942 | # CONFIG_VXFS_FS is not set | 2144 | # CONFIG_VXFS_FS is not set |
1943 | # CONFIG_MINIX_FS is not set | 2145 | # CONFIG_MINIX_FS is not set |
1944 | # CONFIG_OMFS_FS is not set | 2146 | # CONFIG_OMFS_FS is not set |
@@ -1960,6 +2162,7 @@ CONFIG_NFS_ACL_SUPPORT=y | |||
1960 | CONFIG_NFS_COMMON=y | 2162 | CONFIG_NFS_COMMON=y |
1961 | CONFIG_SUNRPC=y | 2163 | CONFIG_SUNRPC=y |
1962 | CONFIG_SUNRPC_GSS=y | 2164 | CONFIG_SUNRPC_GSS=y |
2165 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
1963 | CONFIG_RPCSEC_GSS_KRB5=y | 2166 | CONFIG_RPCSEC_GSS_KRB5=y |
1964 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 2167 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1965 | # CONFIG_SMB_FS is not set | 2168 | # CONFIG_SMB_FS is not set |
@@ -2036,7 +2239,7 @@ CONFIG_NLS_UTF8=y | |||
2036 | # | 2239 | # |
2037 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 2240 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
2038 | CONFIG_PRINTK_TIME=y | 2241 | CONFIG_PRINTK_TIME=y |
2039 | CONFIG_ENABLE_WARN_DEPRECATED=y | 2242 | # CONFIG_ENABLE_WARN_DEPRECATED is not set |
2040 | CONFIG_ENABLE_MUST_CHECK=y | 2243 | CONFIG_ENABLE_MUST_CHECK=y |
2041 | CONFIG_FRAME_WARN=2048 | 2244 | CONFIG_FRAME_WARN=2048 |
2042 | CONFIG_MAGIC_SYSRQ=y | 2245 | CONFIG_MAGIC_SYSRQ=y |
@@ -2066,33 +2269,54 @@ CONFIG_TIMER_STATS=y | |||
2066 | CONFIG_DEBUG_BUGVERBOSE=y | 2269 | CONFIG_DEBUG_BUGVERBOSE=y |
2067 | # CONFIG_DEBUG_INFO is not set | 2270 | # CONFIG_DEBUG_INFO is not set |
2068 | # CONFIG_DEBUG_VM is not set | 2271 | # CONFIG_DEBUG_VM is not set |
2272 | # CONFIG_DEBUG_VIRTUAL is not set | ||
2069 | # CONFIG_DEBUG_WRITECOUNT is not set | 2273 | # CONFIG_DEBUG_WRITECOUNT is not set |
2070 | CONFIG_DEBUG_MEMORY_INIT=y | 2274 | CONFIG_DEBUG_MEMORY_INIT=y |
2071 | # CONFIG_DEBUG_LIST is not set | 2275 | # CONFIG_DEBUG_LIST is not set |
2072 | # CONFIG_DEBUG_SG is not set | 2276 | # CONFIG_DEBUG_SG is not set |
2277 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
2278 | CONFIG_ARCH_WANT_FRAME_POINTERS=y | ||
2073 | CONFIG_FRAME_POINTER=y | 2279 | CONFIG_FRAME_POINTER=y |
2074 | # CONFIG_BOOT_PRINTK_DELAY is not set | 2280 | # CONFIG_BOOT_PRINTK_DELAY is not set |
2075 | # CONFIG_RCU_TORTURE_TEST is not set | 2281 | # CONFIG_RCU_TORTURE_TEST is not set |
2282 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
2076 | # CONFIG_KPROBES_SANITY_TEST is not set | 2283 | # CONFIG_KPROBES_SANITY_TEST is not set |
2077 | # CONFIG_BACKTRACE_SELF_TEST is not set | 2284 | # CONFIG_BACKTRACE_SELF_TEST is not set |
2285 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
2078 | # CONFIG_LKDTM is not set | 2286 | # CONFIG_LKDTM is not set |
2079 | # CONFIG_FAULT_INJECTION is not set | 2287 | # CONFIG_FAULT_INJECTION is not set |
2080 | # CONFIG_LATENCYTOP is not set | 2288 | # CONFIG_LATENCYTOP is not set |
2081 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 2289 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
2082 | CONFIG_HAVE_FTRACE=y | 2290 | CONFIG_USER_STACKTRACE_SUPPORT=y |
2291 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
2292 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
2293 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
2083 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 2294 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
2084 | # CONFIG_FTRACE is not set | 2295 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
2296 | CONFIG_HAVE_HW_BRANCH_TRACER=y | ||
2297 | |||
2298 | # | ||
2299 | # Tracers | ||
2300 | # | ||
2301 | # CONFIG_FUNCTION_TRACER is not set | ||
2085 | # CONFIG_IRQSOFF_TRACER is not set | 2302 | # CONFIG_IRQSOFF_TRACER is not set |
2086 | # CONFIG_SYSPROF_TRACER is not set | 2303 | # CONFIG_SYSPROF_TRACER is not set |
2087 | # CONFIG_SCHED_TRACER is not set | 2304 | # CONFIG_SCHED_TRACER is not set |
2088 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 2305 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
2306 | # CONFIG_BOOT_TRACER is not set | ||
2307 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
2308 | # CONFIG_POWER_TRACER is not set | ||
2309 | # CONFIG_STACK_TRACER is not set | ||
2310 | # CONFIG_HW_BRANCH_TRACER is not set | ||
2089 | CONFIG_PROVIDE_OHCI1394_DMA_INIT=y | 2311 | CONFIG_PROVIDE_OHCI1394_DMA_INIT=y |
2312 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
2090 | # CONFIG_SAMPLES is not set | 2313 | # CONFIG_SAMPLES is not set |
2091 | CONFIG_HAVE_ARCH_KGDB=y | 2314 | CONFIG_HAVE_ARCH_KGDB=y |
2092 | # CONFIG_KGDB is not set | 2315 | # CONFIG_KGDB is not set |
2093 | # CONFIG_STRICT_DEVMEM is not set | 2316 | # CONFIG_STRICT_DEVMEM is not set |
2094 | CONFIG_X86_VERBOSE_BOOTUP=y | 2317 | CONFIG_X86_VERBOSE_BOOTUP=y |
2095 | CONFIG_EARLY_PRINTK=y | 2318 | CONFIG_EARLY_PRINTK=y |
2319 | CONFIG_EARLY_PRINTK_DBGP=y | ||
2096 | CONFIG_DEBUG_STACKOVERFLOW=y | 2320 | CONFIG_DEBUG_STACKOVERFLOW=y |
2097 | CONFIG_DEBUG_STACK_USAGE=y | 2321 | CONFIG_DEBUG_STACK_USAGE=y |
2098 | # CONFIG_DEBUG_PAGEALLOC is not set | 2322 | # CONFIG_DEBUG_PAGEALLOC is not set |
@@ -2123,8 +2347,10 @@ CONFIG_OPTIMIZE_INLINING=y | |||
2123 | CONFIG_KEYS=y | 2347 | CONFIG_KEYS=y |
2124 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | 2348 | CONFIG_KEYS_DEBUG_PROC_KEYS=y |
2125 | CONFIG_SECURITY=y | 2349 | CONFIG_SECURITY=y |
2350 | # CONFIG_SECURITYFS is not set | ||
2126 | CONFIG_SECURITY_NETWORK=y | 2351 | CONFIG_SECURITY_NETWORK=y |
2127 | # CONFIG_SECURITY_NETWORK_XFRM is not set | 2352 | # CONFIG_SECURITY_NETWORK_XFRM is not set |
2353 | # CONFIG_SECURITY_PATH is not set | ||
2128 | CONFIG_SECURITY_FILE_CAPABILITIES=y | 2354 | CONFIG_SECURITY_FILE_CAPABILITIES=y |
2129 | # CONFIG_SECURITY_ROOTPLUG is not set | 2355 | # CONFIG_SECURITY_ROOTPLUG is not set |
2130 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 | 2356 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 |
@@ -2135,7 +2361,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y | |||
2135 | CONFIG_SECURITY_SELINUX_DEVELOP=y | 2361 | CONFIG_SECURITY_SELINUX_DEVELOP=y |
2136 | CONFIG_SECURITY_SELINUX_AVC_STATS=y | 2362 | CONFIG_SECURITY_SELINUX_AVC_STATS=y |
2137 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 | 2363 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 |
2138 | # CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set | ||
2139 | # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set | 2364 | # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set |
2140 | # CONFIG_SECURITY_SMACK is not set | 2365 | # CONFIG_SECURITY_SMACK is not set |
2141 | CONFIG_CRYPTO=y | 2366 | CONFIG_CRYPTO=y |
@@ -2143,11 +2368,18 @@ CONFIG_CRYPTO=y | |||
2143 | # | 2368 | # |
2144 | # Crypto core or helper | 2369 | # Crypto core or helper |
2145 | # | 2370 | # |
2371 | # CONFIG_CRYPTO_FIPS is not set | ||
2146 | CONFIG_CRYPTO_ALGAPI=y | 2372 | CONFIG_CRYPTO_ALGAPI=y |
2373 | CONFIG_CRYPTO_ALGAPI2=y | ||
2147 | CONFIG_CRYPTO_AEAD=y | 2374 | CONFIG_CRYPTO_AEAD=y |
2375 | CONFIG_CRYPTO_AEAD2=y | ||
2148 | CONFIG_CRYPTO_BLKCIPHER=y | 2376 | CONFIG_CRYPTO_BLKCIPHER=y |
2377 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
2149 | CONFIG_CRYPTO_HASH=y | 2378 | CONFIG_CRYPTO_HASH=y |
2379 | CONFIG_CRYPTO_HASH2=y | ||
2380 | CONFIG_CRYPTO_RNG2=y | ||
2150 | CONFIG_CRYPTO_MANAGER=y | 2381 | CONFIG_CRYPTO_MANAGER=y |
2382 | CONFIG_CRYPTO_MANAGER2=y | ||
2151 | # CONFIG_CRYPTO_GF128MUL is not set | 2383 | # CONFIG_CRYPTO_GF128MUL is not set |
2152 | # CONFIG_CRYPTO_NULL is not set | 2384 | # CONFIG_CRYPTO_NULL is not set |
2153 | # CONFIG_CRYPTO_CRYPTD is not set | 2385 | # CONFIG_CRYPTO_CRYPTD is not set |
@@ -2182,6 +2414,7 @@ CONFIG_CRYPTO_HMAC=y | |||
2182 | # Digest | 2414 | # Digest |
2183 | # | 2415 | # |
2184 | # CONFIG_CRYPTO_CRC32C is not set | 2416 | # CONFIG_CRYPTO_CRC32C is not set |
2417 | # CONFIG_CRYPTO_CRC32C_INTEL is not set | ||
2185 | # CONFIG_CRYPTO_MD4 is not set | 2418 | # CONFIG_CRYPTO_MD4 is not set |
2186 | CONFIG_CRYPTO_MD5=y | 2419 | CONFIG_CRYPTO_MD5=y |
2187 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 2420 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
@@ -2222,6 +2455,11 @@ CONFIG_CRYPTO_DES=y | |||
2222 | # | 2455 | # |
2223 | # CONFIG_CRYPTO_DEFLATE is not set | 2456 | # CONFIG_CRYPTO_DEFLATE is not set |
2224 | # CONFIG_CRYPTO_LZO is not set | 2457 | # CONFIG_CRYPTO_LZO is not set |
2458 | |||
2459 | # | ||
2460 | # Random Number Generation | ||
2461 | # | ||
2462 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
2225 | CONFIG_CRYPTO_HW=y | 2463 | CONFIG_CRYPTO_HW=y |
2226 | # CONFIG_CRYPTO_DEV_PADLOCK is not set | 2464 | # CONFIG_CRYPTO_DEV_PADLOCK is not set |
2227 | # CONFIG_CRYPTO_DEV_GEODE is not set | 2465 | # CONFIG_CRYPTO_DEV_GEODE is not set |
@@ -2239,6 +2477,7 @@ CONFIG_VIRTUALIZATION=y | |||
2239 | CONFIG_BITREVERSE=y | 2477 | CONFIG_BITREVERSE=y |
2240 | CONFIG_GENERIC_FIND_FIRST_BIT=y | 2478 | CONFIG_GENERIC_FIND_FIRST_BIT=y |
2241 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 2479 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
2480 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
2242 | # CONFIG_CRC_CCITT is not set | 2481 | # CONFIG_CRC_CCITT is not set |
2243 | # CONFIG_CRC16 is not set | 2482 | # CONFIG_CRC16 is not set |
2244 | CONFIG_CRC_T10DIF=y | 2483 | CONFIG_CRC_T10DIF=y |
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig index 322dd2748fc9..4157cc4a2bde 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig | |||
@@ -1,14 +1,13 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.27-rc5 | 3 | # Linux kernel version: 2.6.29-rc4 |
4 | # Wed Sep 3 17:13:39 2008 | 4 | # Thu Feb 12 12:57:29 2009 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | # CONFIG_X86_32 is not set | 7 | # CONFIG_X86_32 is not set |
8 | CONFIG_X86_64=y | 8 | CONFIG_X86_64=y |
9 | CONFIG_X86=y | 9 | CONFIG_X86=y |
10 | CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" | 10 | CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" |
11 | # CONFIG_GENERIC_LOCKBREAK is not set | ||
12 | CONFIG_GENERIC_TIME=y | 11 | CONFIG_GENERIC_TIME=y |
13 | CONFIG_GENERIC_CMOS_UPDATE=y | 12 | CONFIG_GENERIC_CMOS_UPDATE=y |
14 | CONFIG_CLOCKSOURCE_WATCHDOG=y | 13 | CONFIG_CLOCKSOURCE_WATCHDOG=y |
@@ -23,17 +22,16 @@ CONFIG_ZONE_DMA=y | |||
23 | CONFIG_GENERIC_ISA_DMA=y | 22 | CONFIG_GENERIC_ISA_DMA=y |
24 | CONFIG_GENERIC_IOMAP=y | 23 | CONFIG_GENERIC_IOMAP=y |
25 | CONFIG_GENERIC_BUG=y | 24 | CONFIG_GENERIC_BUG=y |
25 | CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y | ||
26 | CONFIG_GENERIC_HWEIGHT=y | 26 | CONFIG_GENERIC_HWEIGHT=y |
27 | # CONFIG_GENERIC_GPIO is not set | ||
28 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 27 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
29 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 28 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
30 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 29 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
31 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
32 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
33 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y | 30 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y |
34 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 31 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
35 | CONFIG_GENERIC_TIME_VSYSCALL=y | 32 | CONFIG_GENERIC_TIME_VSYSCALL=y |
36 | CONFIG_ARCH_HAS_CPU_RELAX=y | 33 | CONFIG_ARCH_HAS_CPU_RELAX=y |
34 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y | ||
37 | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y | 35 | CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y |
38 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 36 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
39 | CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y | 37 | CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y |
@@ -42,12 +40,12 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y | |||
42 | CONFIG_ZONE_DMA32=y | 40 | CONFIG_ZONE_DMA32=y |
43 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 41 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
44 | CONFIG_AUDIT_ARCH=y | 42 | CONFIG_AUDIT_ARCH=y |
45 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
46 | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y | 43 | CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y |
47 | CONFIG_GENERIC_HARDIRQS=y | 44 | CONFIG_GENERIC_HARDIRQS=y |
48 | CONFIG_GENERIC_IRQ_PROBE=y | 45 | CONFIG_GENERIC_IRQ_PROBE=y |
49 | CONFIG_GENERIC_PENDING_IRQ=y | 46 | CONFIG_GENERIC_PENDING_IRQ=y |
50 | CONFIG_X86_SMP=y | 47 | CONFIG_X86_SMP=y |
48 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
51 | CONFIG_X86_64_SMP=y | 49 | CONFIG_X86_64_SMP=y |
52 | CONFIG_X86_HT=y | 50 | CONFIG_X86_HT=y |
53 | CONFIG_X86_BIOS_REBOOT=y | 51 | CONFIG_X86_BIOS_REBOOT=y |
@@ -76,30 +74,44 @@ CONFIG_TASK_IO_ACCOUNTING=y | |||
76 | CONFIG_AUDIT=y | 74 | CONFIG_AUDIT=y |
77 | CONFIG_AUDITSYSCALL=y | 75 | CONFIG_AUDITSYSCALL=y |
78 | CONFIG_AUDIT_TREE=y | 76 | CONFIG_AUDIT_TREE=y |
77 | |||
78 | # | ||
79 | # RCU Subsystem | ||
80 | # | ||
81 | # CONFIG_CLASSIC_RCU is not set | ||
82 | CONFIG_TREE_RCU=y | ||
83 | # CONFIG_PREEMPT_RCU is not set | ||
84 | # CONFIG_RCU_TRACE is not set | ||
85 | CONFIG_RCU_FANOUT=64 | ||
86 | # CONFIG_RCU_FANOUT_EXACT is not set | ||
87 | # CONFIG_TREE_RCU_TRACE is not set | ||
88 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
79 | # CONFIG_IKCONFIG is not set | 89 | # CONFIG_IKCONFIG is not set |
80 | CONFIG_LOG_BUF_SHIFT=18 | 90 | CONFIG_LOG_BUF_SHIFT=18 |
81 | CONFIG_CGROUPS=y | ||
82 | # CONFIG_CGROUP_DEBUG is not set | ||
83 | CONFIG_CGROUP_NS=y | ||
84 | # CONFIG_CGROUP_DEVICE is not set | ||
85 | CONFIG_CPUSETS=y | ||
86 | CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y | 91 | CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y |
87 | CONFIG_GROUP_SCHED=y | 92 | CONFIG_GROUP_SCHED=y |
88 | CONFIG_FAIR_GROUP_SCHED=y | 93 | CONFIG_FAIR_GROUP_SCHED=y |
89 | # CONFIG_RT_GROUP_SCHED is not set | 94 | # CONFIG_RT_GROUP_SCHED is not set |
90 | # CONFIG_USER_SCHED is not set | 95 | # CONFIG_USER_SCHED is not set |
91 | CONFIG_CGROUP_SCHED=y | 96 | CONFIG_CGROUP_SCHED=y |
97 | CONFIG_CGROUPS=y | ||
98 | # CONFIG_CGROUP_DEBUG is not set | ||
99 | CONFIG_CGROUP_NS=y | ||
100 | CONFIG_CGROUP_FREEZER=y | ||
101 | # CONFIG_CGROUP_DEVICE is not set | ||
102 | CONFIG_CPUSETS=y | ||
103 | CONFIG_PROC_PID_CPUSET=y | ||
92 | CONFIG_CGROUP_CPUACCT=y | 104 | CONFIG_CGROUP_CPUACCT=y |
93 | CONFIG_RESOURCE_COUNTERS=y | 105 | CONFIG_RESOURCE_COUNTERS=y |
94 | # CONFIG_CGROUP_MEM_RES_CTLR is not set | 106 | # CONFIG_CGROUP_MEM_RES_CTLR is not set |
95 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | 107 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
96 | CONFIG_PROC_PID_CPUSET=y | ||
97 | CONFIG_RELAY=y | 108 | CONFIG_RELAY=y |
98 | CONFIG_NAMESPACES=y | 109 | CONFIG_NAMESPACES=y |
99 | CONFIG_UTS_NS=y | 110 | CONFIG_UTS_NS=y |
100 | CONFIG_IPC_NS=y | 111 | CONFIG_IPC_NS=y |
101 | CONFIG_USER_NS=y | 112 | CONFIG_USER_NS=y |
102 | CONFIG_PID_NS=y | 113 | CONFIG_PID_NS=y |
114 | CONFIG_NET_NS=y | ||
103 | CONFIG_BLK_DEV_INITRD=y | 115 | CONFIG_BLK_DEV_INITRD=y |
104 | CONFIG_INITRAMFS_SOURCE="" | 116 | CONFIG_INITRAMFS_SOURCE="" |
105 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 117 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -124,12 +136,15 @@ CONFIG_SIGNALFD=y | |||
124 | CONFIG_TIMERFD=y | 136 | CONFIG_TIMERFD=y |
125 | CONFIG_EVENTFD=y | 137 | CONFIG_EVENTFD=y |
126 | CONFIG_SHMEM=y | 138 | CONFIG_SHMEM=y |
139 | CONFIG_AIO=y | ||
127 | CONFIG_VM_EVENT_COUNTERS=y | 140 | CONFIG_VM_EVENT_COUNTERS=y |
141 | CONFIG_PCI_QUIRKS=y | ||
128 | CONFIG_SLUB_DEBUG=y | 142 | CONFIG_SLUB_DEBUG=y |
129 | # CONFIG_SLAB is not set | 143 | # CONFIG_SLAB is not set |
130 | CONFIG_SLUB=y | 144 | CONFIG_SLUB=y |
131 | # CONFIG_SLOB is not set | 145 | # CONFIG_SLOB is not set |
132 | CONFIG_PROFILING=y | 146 | CONFIG_PROFILING=y |
147 | CONFIG_TRACEPOINTS=y | ||
133 | CONFIG_MARKERS=y | 148 | CONFIG_MARKERS=y |
134 | # CONFIG_OPROFILE is not set | 149 | # CONFIG_OPROFILE is not set |
135 | CONFIG_HAVE_OPROFILE=y | 150 | CONFIG_HAVE_OPROFILE=y |
@@ -139,15 +154,10 @@ CONFIG_KRETPROBES=y | |||
139 | CONFIG_HAVE_IOREMAP_PROT=y | 154 | CONFIG_HAVE_IOREMAP_PROT=y |
140 | CONFIG_HAVE_KPROBES=y | 155 | CONFIG_HAVE_KPROBES=y |
141 | CONFIG_HAVE_KRETPROBES=y | 156 | CONFIG_HAVE_KRETPROBES=y |
142 | # CONFIG_HAVE_ARCH_TRACEHOOK is not set | 157 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
143 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
144 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
145 | # CONFIG_HAVE_CLK is not set | ||
146 | CONFIG_PROC_PAGE_MONITOR=y | ||
147 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 158 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
148 | CONFIG_SLABINFO=y | 159 | CONFIG_SLABINFO=y |
149 | CONFIG_RT_MUTEXES=y | 160 | CONFIG_RT_MUTEXES=y |
150 | # CONFIG_TINY_SHMEM is not set | ||
151 | CONFIG_BASE_SMALL=0 | 161 | CONFIG_BASE_SMALL=0 |
152 | CONFIG_MODULES=y | 162 | CONFIG_MODULES=y |
153 | # CONFIG_MODULE_FORCE_LOAD is not set | 163 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -155,7 +165,6 @@ CONFIG_MODULE_UNLOAD=y | |||
155 | CONFIG_MODULE_FORCE_UNLOAD=y | 165 | CONFIG_MODULE_FORCE_UNLOAD=y |
156 | # CONFIG_MODVERSIONS is not set | 166 | # CONFIG_MODVERSIONS is not set |
157 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 167 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
158 | CONFIG_KMOD=y | ||
159 | CONFIG_STOP_MACHINE=y | 168 | CONFIG_STOP_MACHINE=y |
160 | CONFIG_BLOCK=y | 169 | CONFIG_BLOCK=y |
161 | CONFIG_BLK_DEV_IO_TRACE=y | 170 | CONFIG_BLK_DEV_IO_TRACE=y |
@@ -175,7 +184,7 @@ CONFIG_IOSCHED_CFQ=y | |||
175 | CONFIG_DEFAULT_CFQ=y | 184 | CONFIG_DEFAULT_CFQ=y |
176 | # CONFIG_DEFAULT_NOOP is not set | 185 | # CONFIG_DEFAULT_NOOP is not set |
177 | CONFIG_DEFAULT_IOSCHED="cfq" | 186 | CONFIG_DEFAULT_IOSCHED="cfq" |
178 | CONFIG_CLASSIC_RCU=y | 187 | CONFIG_FREEZER=y |
179 | 188 | ||
180 | # | 189 | # |
181 | # Processor type and features | 190 | # Processor type and features |
@@ -185,13 +194,14 @@ CONFIG_NO_HZ=y | |||
185 | CONFIG_HIGH_RES_TIMERS=y | 194 | CONFIG_HIGH_RES_TIMERS=y |
186 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | 195 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y |
187 | CONFIG_SMP=y | 196 | CONFIG_SMP=y |
197 | CONFIG_SPARSE_IRQ=y | ||
198 | # CONFIG_NUMA_MIGRATE_IRQ_DESC is not set | ||
188 | CONFIG_X86_FIND_SMP_CONFIG=y | 199 | CONFIG_X86_FIND_SMP_CONFIG=y |
189 | CONFIG_X86_MPPARSE=y | 200 | CONFIG_X86_MPPARSE=y |
190 | CONFIG_X86_PC=y | ||
191 | # CONFIG_X86_ELAN is not set | 201 | # CONFIG_X86_ELAN is not set |
192 | # CONFIG_X86_VOYAGER is not set | ||
193 | # CONFIG_X86_GENERICARCH is not set | 202 | # CONFIG_X86_GENERICARCH is not set |
194 | # CONFIG_X86_VSMP is not set | 203 | # CONFIG_X86_VSMP is not set |
204 | CONFIG_SCHED_OMIT_FRAME_POINTER=y | ||
195 | # CONFIG_PARAVIRT_GUEST is not set | 205 | # CONFIG_PARAVIRT_GUEST is not set |
196 | # CONFIG_MEMTEST is not set | 206 | # CONFIG_MEMTEST is not set |
197 | # CONFIG_M386 is not set | 207 | # CONFIG_M386 is not set |
@@ -230,6 +240,11 @@ CONFIG_X86_CMPXCHG64=y | |||
230 | CONFIG_X86_CMOV=y | 240 | CONFIG_X86_CMOV=y |
231 | CONFIG_X86_MINIMUM_CPU_FAMILY=64 | 241 | CONFIG_X86_MINIMUM_CPU_FAMILY=64 |
232 | CONFIG_X86_DEBUGCTLMSR=y | 242 | CONFIG_X86_DEBUGCTLMSR=y |
243 | CONFIG_CPU_SUP_INTEL=y | ||
244 | CONFIG_CPU_SUP_AMD=y | ||
245 | CONFIG_CPU_SUP_CENTAUR_64=y | ||
246 | CONFIG_X86_DS=y | ||
247 | CONFIG_X86_PTRACE_BTS=y | ||
233 | CONFIG_HPET_TIMER=y | 248 | CONFIG_HPET_TIMER=y |
234 | CONFIG_HPET_EMULATE_RTC=y | 249 | CONFIG_HPET_EMULATE_RTC=y |
235 | CONFIG_DMI=y | 250 | CONFIG_DMI=y |
@@ -237,8 +252,11 @@ CONFIG_GART_IOMMU=y | |||
237 | CONFIG_CALGARY_IOMMU=y | 252 | CONFIG_CALGARY_IOMMU=y |
238 | CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y | 253 | CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y |
239 | CONFIG_AMD_IOMMU=y | 254 | CONFIG_AMD_IOMMU=y |
255 | CONFIG_AMD_IOMMU_STATS=y | ||
240 | CONFIG_SWIOTLB=y | 256 | CONFIG_SWIOTLB=y |
241 | CONFIG_IOMMU_HELPER=y | 257 | CONFIG_IOMMU_HELPER=y |
258 | CONFIG_IOMMU_API=y | ||
259 | # CONFIG_MAXSMP is not set | ||
242 | CONFIG_NR_CPUS=64 | 260 | CONFIG_NR_CPUS=64 |
243 | CONFIG_SCHED_SMT=y | 261 | CONFIG_SCHED_SMT=y |
244 | CONFIG_SCHED_MC=y | 262 | CONFIG_SCHED_MC=y |
@@ -247,12 +265,17 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
247 | # CONFIG_PREEMPT is not set | 265 | # CONFIG_PREEMPT is not set |
248 | CONFIG_X86_LOCAL_APIC=y | 266 | CONFIG_X86_LOCAL_APIC=y |
249 | CONFIG_X86_IO_APIC=y | 267 | CONFIG_X86_IO_APIC=y |
268 | CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y | ||
250 | # CONFIG_X86_MCE is not set | 269 | # CONFIG_X86_MCE is not set |
251 | # CONFIG_I8K is not set | 270 | # CONFIG_I8K is not set |
252 | CONFIG_MICROCODE=y | 271 | CONFIG_MICROCODE=y |
272 | CONFIG_MICROCODE_INTEL=y | ||
273 | CONFIG_MICROCODE_AMD=y | ||
253 | CONFIG_MICROCODE_OLD_INTERFACE=y | 274 | CONFIG_MICROCODE_OLD_INTERFACE=y |
254 | CONFIG_X86_MSR=y | 275 | CONFIG_X86_MSR=y |
255 | CONFIG_X86_CPUID=y | 276 | CONFIG_X86_CPUID=y |
277 | CONFIG_ARCH_PHYS_ADDR_T_64BIT=y | ||
278 | CONFIG_DIRECT_GBPAGES=y | ||
256 | CONFIG_NUMA=y | 279 | CONFIG_NUMA=y |
257 | CONFIG_K8_NUMA=y | 280 | CONFIG_K8_NUMA=y |
258 | CONFIG_X86_64_ACPI_NUMA=y | 281 | CONFIG_X86_64_ACPI_NUMA=y |
@@ -269,7 +292,6 @@ CONFIG_SPARSEMEM_MANUAL=y | |||
269 | CONFIG_SPARSEMEM=y | 292 | CONFIG_SPARSEMEM=y |
270 | CONFIG_NEED_MULTIPLE_NODES=y | 293 | CONFIG_NEED_MULTIPLE_NODES=y |
271 | CONFIG_HAVE_MEMORY_PRESENT=y | 294 | CONFIG_HAVE_MEMORY_PRESENT=y |
272 | # CONFIG_SPARSEMEM_STATIC is not set | ||
273 | CONFIG_SPARSEMEM_EXTREME=y | 295 | CONFIG_SPARSEMEM_EXTREME=y |
274 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | 296 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y |
275 | CONFIG_SPARSEMEM_VMEMMAP=y | 297 | CONFIG_SPARSEMEM_VMEMMAP=y |
@@ -280,10 +302,14 @@ CONFIG_SPARSEMEM_VMEMMAP=y | |||
280 | CONFIG_PAGEFLAGS_EXTENDED=y | 302 | CONFIG_PAGEFLAGS_EXTENDED=y |
281 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 303 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
282 | CONFIG_MIGRATION=y | 304 | CONFIG_MIGRATION=y |
283 | CONFIG_RESOURCES_64BIT=y | 305 | CONFIG_PHYS_ADDR_T_64BIT=y |
284 | CONFIG_ZONE_DMA_FLAG=1 | 306 | CONFIG_ZONE_DMA_FLAG=1 |
285 | CONFIG_BOUNCE=y | 307 | CONFIG_BOUNCE=y |
286 | CONFIG_VIRT_TO_BUS=y | 308 | CONFIG_VIRT_TO_BUS=y |
309 | CONFIG_UNEVICTABLE_LRU=y | ||
310 | CONFIG_X86_CHECK_BIOS_CORRUPTION=y | ||
311 | CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=y | ||
312 | CONFIG_X86_RESERVE_LOW_64K=y | ||
287 | CONFIG_MTRR=y | 313 | CONFIG_MTRR=y |
288 | # CONFIG_MTRR_SANITIZER is not set | 314 | # CONFIG_MTRR_SANITIZER is not set |
289 | CONFIG_X86_PAT=y | 315 | CONFIG_X86_PAT=y |
@@ -302,11 +328,12 @@ CONFIG_PHYSICAL_START=0x1000000 | |||
302 | CONFIG_PHYSICAL_ALIGN=0x200000 | 328 | CONFIG_PHYSICAL_ALIGN=0x200000 |
303 | CONFIG_HOTPLUG_CPU=y | 329 | CONFIG_HOTPLUG_CPU=y |
304 | # CONFIG_COMPAT_VDSO is not set | 330 | # CONFIG_COMPAT_VDSO is not set |
331 | # CONFIG_CMDLINE_BOOL is not set | ||
305 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 332 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
306 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | 333 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y |
307 | 334 | ||
308 | # | 335 | # |
309 | # Power management options | 336 | # Power management and ACPI options |
310 | # | 337 | # |
311 | CONFIG_ARCH_HIBERNATION_HEADER=y | 338 | CONFIG_ARCH_HIBERNATION_HEADER=y |
312 | CONFIG_PM=y | 339 | CONFIG_PM=y |
@@ -333,20 +360,14 @@ CONFIG_ACPI_BATTERY=y | |||
333 | CONFIG_ACPI_BUTTON=y | 360 | CONFIG_ACPI_BUTTON=y |
334 | CONFIG_ACPI_FAN=y | 361 | CONFIG_ACPI_FAN=y |
335 | CONFIG_ACPI_DOCK=y | 362 | CONFIG_ACPI_DOCK=y |
336 | # CONFIG_ACPI_BAY is not set | ||
337 | CONFIG_ACPI_PROCESSOR=y | 363 | CONFIG_ACPI_PROCESSOR=y |
338 | CONFIG_ACPI_HOTPLUG_CPU=y | 364 | CONFIG_ACPI_HOTPLUG_CPU=y |
339 | CONFIG_ACPI_THERMAL=y | 365 | CONFIG_ACPI_THERMAL=y |
340 | CONFIG_ACPI_NUMA=y | 366 | CONFIG_ACPI_NUMA=y |
341 | # CONFIG_ACPI_WMI is not set | ||
342 | # CONFIG_ACPI_ASUS is not set | ||
343 | # CONFIG_ACPI_TOSHIBA is not set | ||
344 | # CONFIG_ACPI_CUSTOM_DSDT is not set | 367 | # CONFIG_ACPI_CUSTOM_DSDT is not set |
345 | CONFIG_ACPI_BLACKLIST_YEAR=0 | 368 | CONFIG_ACPI_BLACKLIST_YEAR=0 |
346 | # CONFIG_ACPI_DEBUG is not set | 369 | # CONFIG_ACPI_DEBUG is not set |
347 | CONFIG_ACPI_EC=y | ||
348 | # CONFIG_ACPI_PCI_SLOT is not set | 370 | # CONFIG_ACPI_PCI_SLOT is not set |
349 | CONFIG_ACPI_POWER=y | ||
350 | CONFIG_ACPI_SYSTEM=y | 371 | CONFIG_ACPI_SYSTEM=y |
351 | CONFIG_X86_PM_TIMER=y | 372 | CONFIG_X86_PM_TIMER=y |
352 | CONFIG_ACPI_CONTAINER=y | 373 | CONFIG_ACPI_CONTAINER=y |
@@ -381,13 +402,17 @@ CONFIG_X86_ACPI_CPUFREQ=y | |||
381 | # | 402 | # |
382 | # shared options | 403 | # shared options |
383 | # | 404 | # |
384 | # CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set | ||
385 | # CONFIG_X86_SPEEDSTEP_LIB is not set | 405 | # CONFIG_X86_SPEEDSTEP_LIB is not set |
386 | CONFIG_CPU_IDLE=y | 406 | CONFIG_CPU_IDLE=y |
387 | CONFIG_CPU_IDLE_GOV_LADDER=y | 407 | CONFIG_CPU_IDLE_GOV_LADDER=y |
388 | CONFIG_CPU_IDLE_GOV_MENU=y | 408 | CONFIG_CPU_IDLE_GOV_MENU=y |
389 | 409 | ||
390 | # | 410 | # |
411 | # Memory power savings | ||
412 | # | ||
413 | # CONFIG_I7300_IDLE is not set | ||
414 | |||
415 | # | ||
391 | # Bus options (PCI etc.) | 416 | # Bus options (PCI etc.) |
392 | # | 417 | # |
393 | CONFIG_PCI=y | 418 | CONFIG_PCI=y |
@@ -395,8 +420,10 @@ CONFIG_PCI_DIRECT=y | |||
395 | CONFIG_PCI_MMCONFIG=y | 420 | CONFIG_PCI_MMCONFIG=y |
396 | CONFIG_PCI_DOMAINS=y | 421 | CONFIG_PCI_DOMAINS=y |
397 | CONFIG_DMAR=y | 422 | CONFIG_DMAR=y |
423 | # CONFIG_DMAR_DEFAULT_ON is not set | ||
398 | CONFIG_DMAR_GFX_WA=y | 424 | CONFIG_DMAR_GFX_WA=y |
399 | CONFIG_DMAR_FLOPPY_WA=y | 425 | CONFIG_DMAR_FLOPPY_WA=y |
426 | # CONFIG_INTR_REMAP is not set | ||
400 | CONFIG_PCIEPORTBUS=y | 427 | CONFIG_PCIEPORTBUS=y |
401 | # CONFIG_HOTPLUG_PCI_PCIE is not set | 428 | # CONFIG_HOTPLUG_PCI_PCIE is not set |
402 | CONFIG_PCIEAER=y | 429 | CONFIG_PCIEAER=y |
@@ -405,6 +432,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
405 | CONFIG_PCI_MSI=y | 432 | CONFIG_PCI_MSI=y |
406 | # CONFIG_PCI_LEGACY is not set | 433 | # CONFIG_PCI_LEGACY is not set |
407 | # CONFIG_PCI_DEBUG is not set | 434 | # CONFIG_PCI_DEBUG is not set |
435 | # CONFIG_PCI_STUB is not set | ||
408 | CONFIG_HT_IRQ=y | 436 | CONFIG_HT_IRQ=y |
409 | CONFIG_ISA_DMA_API=y | 437 | CONFIG_ISA_DMA_API=y |
410 | CONFIG_K8_NB=y | 438 | CONFIG_K8_NB=y |
@@ -438,6 +466,8 @@ CONFIG_HOTPLUG_PCI=y | |||
438 | # | 466 | # |
439 | CONFIG_BINFMT_ELF=y | 467 | CONFIG_BINFMT_ELF=y |
440 | CONFIG_COMPAT_BINFMT_ELF=y | 468 | CONFIG_COMPAT_BINFMT_ELF=y |
469 | CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y | ||
470 | # CONFIG_HAVE_AOUT is not set | ||
441 | CONFIG_BINFMT_MISC=y | 471 | CONFIG_BINFMT_MISC=y |
442 | CONFIG_IA32_EMULATION=y | 472 | CONFIG_IA32_EMULATION=y |
443 | # CONFIG_IA32_AOUT is not set | 473 | # CONFIG_IA32_AOUT is not set |
@@ -449,6 +479,7 @@ CONFIG_NET=y | |||
449 | # | 479 | # |
450 | # Networking options | 480 | # Networking options |
451 | # | 481 | # |
482 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
452 | CONFIG_PACKET=y | 483 | CONFIG_PACKET=y |
453 | CONFIG_PACKET_MMAP=y | 484 | CONFIG_PACKET_MMAP=y |
454 | CONFIG_UNIX=y | 485 | CONFIG_UNIX=y |
@@ -509,7 +540,6 @@ CONFIG_DEFAULT_CUBIC=y | |||
509 | # CONFIG_DEFAULT_RENO is not set | 540 | # CONFIG_DEFAULT_RENO is not set |
510 | CONFIG_DEFAULT_TCP_CONG="cubic" | 541 | CONFIG_DEFAULT_TCP_CONG="cubic" |
511 | CONFIG_TCP_MD5SIG=y | 542 | CONFIG_TCP_MD5SIG=y |
512 | # CONFIG_IP_VS is not set | ||
513 | CONFIG_IPV6=y | 543 | CONFIG_IPV6=y |
514 | # CONFIG_IPV6_PRIVACY is not set | 544 | # CONFIG_IPV6_PRIVACY is not set |
515 | # CONFIG_IPV6_ROUTER_PREF is not set | 545 | # CONFIG_IPV6_ROUTER_PREF is not set |
@@ -547,19 +577,21 @@ CONFIG_NF_CONNTRACK_IRC=y | |||
547 | CONFIG_NF_CONNTRACK_SIP=y | 577 | CONFIG_NF_CONNTRACK_SIP=y |
548 | CONFIG_NF_CT_NETLINK=y | 578 | CONFIG_NF_CT_NETLINK=y |
549 | CONFIG_NETFILTER_XTABLES=y | 579 | CONFIG_NETFILTER_XTABLES=y |
580 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y | ||
550 | CONFIG_NETFILTER_XT_TARGET_MARK=y | 581 | CONFIG_NETFILTER_XT_TARGET_MARK=y |
551 | CONFIG_NETFILTER_XT_TARGET_NFLOG=y | 582 | CONFIG_NETFILTER_XT_TARGET_NFLOG=y |
552 | CONFIG_NETFILTER_XT_TARGET_SECMARK=y | 583 | CONFIG_NETFILTER_XT_TARGET_SECMARK=y |
553 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y | ||
554 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=y | 584 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=y |
555 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y | 585 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y |
556 | CONFIG_NETFILTER_XT_MATCH_MARK=y | 586 | CONFIG_NETFILTER_XT_MATCH_MARK=y |
557 | CONFIG_NETFILTER_XT_MATCH_POLICY=y | 587 | CONFIG_NETFILTER_XT_MATCH_POLICY=y |
558 | CONFIG_NETFILTER_XT_MATCH_STATE=y | 588 | CONFIG_NETFILTER_XT_MATCH_STATE=y |
589 | # CONFIG_IP_VS is not set | ||
559 | 590 | ||
560 | # | 591 | # |
561 | # IP: Netfilter Configuration | 592 | # IP: Netfilter Configuration |
562 | # | 593 | # |
594 | CONFIG_NF_DEFRAG_IPV4=y | ||
563 | CONFIG_NF_CONNTRACK_IPV4=y | 595 | CONFIG_NF_CONNTRACK_IPV4=y |
564 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | 596 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y |
565 | CONFIG_IP_NF_IPTABLES=y | 597 | CONFIG_IP_NF_IPTABLES=y |
@@ -585,8 +617,8 @@ CONFIG_IP_NF_MANGLE=y | |||
585 | CONFIG_NF_CONNTRACK_IPV6=y | 617 | CONFIG_NF_CONNTRACK_IPV6=y |
586 | CONFIG_IP6_NF_IPTABLES=y | 618 | CONFIG_IP6_NF_IPTABLES=y |
587 | CONFIG_IP6_NF_MATCH_IPV6HEADER=y | 619 | CONFIG_IP6_NF_MATCH_IPV6HEADER=y |
588 | CONFIG_IP6_NF_FILTER=y | ||
589 | CONFIG_IP6_NF_TARGET_LOG=y | 620 | CONFIG_IP6_NF_TARGET_LOG=y |
621 | CONFIG_IP6_NF_FILTER=y | ||
590 | CONFIG_IP6_NF_TARGET_REJECT=y | 622 | CONFIG_IP6_NF_TARGET_REJECT=y |
591 | CONFIG_IP6_NF_MANGLE=y | 623 | CONFIG_IP6_NF_MANGLE=y |
592 | # CONFIG_IP_DCCP is not set | 624 | # CONFIG_IP_DCCP is not set |
@@ -594,6 +626,7 @@ CONFIG_IP6_NF_MANGLE=y | |||
594 | # CONFIG_TIPC is not set | 626 | # CONFIG_TIPC is not set |
595 | # CONFIG_ATM is not set | 627 | # CONFIG_ATM is not set |
596 | # CONFIG_BRIDGE is not set | 628 | # CONFIG_BRIDGE is not set |
629 | # CONFIG_NET_DSA is not set | ||
597 | # CONFIG_VLAN_8021Q is not set | 630 | # CONFIG_VLAN_8021Q is not set |
598 | # CONFIG_DECNET is not set | 631 | # CONFIG_DECNET is not set |
599 | CONFIG_LLC=y | 632 | CONFIG_LLC=y |
@@ -613,6 +646,7 @@ CONFIG_NET_SCHED=y | |||
613 | # CONFIG_NET_SCH_HTB is not set | 646 | # CONFIG_NET_SCH_HTB is not set |
614 | # CONFIG_NET_SCH_HFSC is not set | 647 | # CONFIG_NET_SCH_HFSC is not set |
615 | # CONFIG_NET_SCH_PRIO is not set | 648 | # CONFIG_NET_SCH_PRIO is not set |
649 | # CONFIG_NET_SCH_MULTIQ is not set | ||
616 | # CONFIG_NET_SCH_RED is not set | 650 | # CONFIG_NET_SCH_RED is not set |
617 | # CONFIG_NET_SCH_SFQ is not set | 651 | # CONFIG_NET_SCH_SFQ is not set |
618 | # CONFIG_NET_SCH_TEQL is not set | 652 | # CONFIG_NET_SCH_TEQL is not set |
@@ -620,6 +654,7 @@ CONFIG_NET_SCHED=y | |||
620 | # CONFIG_NET_SCH_GRED is not set | 654 | # CONFIG_NET_SCH_GRED is not set |
621 | # CONFIG_NET_SCH_DSMARK is not set | 655 | # CONFIG_NET_SCH_DSMARK is not set |
622 | # CONFIG_NET_SCH_NETEM is not set | 656 | # CONFIG_NET_SCH_NETEM is not set |
657 | # CONFIG_NET_SCH_DRR is not set | ||
623 | # CONFIG_NET_SCH_INGRESS is not set | 658 | # CONFIG_NET_SCH_INGRESS is not set |
624 | 659 | ||
625 | # | 660 | # |
@@ -634,6 +669,7 @@ CONFIG_NET_CLS=y | |||
634 | # CONFIG_NET_CLS_RSVP is not set | 669 | # CONFIG_NET_CLS_RSVP is not set |
635 | # CONFIG_NET_CLS_RSVP6 is not set | 670 | # CONFIG_NET_CLS_RSVP6 is not set |
636 | # CONFIG_NET_CLS_FLOW is not set | 671 | # CONFIG_NET_CLS_FLOW is not set |
672 | # CONFIG_NET_CLS_CGROUP is not set | ||
637 | CONFIG_NET_EMATCH=y | 673 | CONFIG_NET_EMATCH=y |
638 | CONFIG_NET_EMATCH_STACK=32 | 674 | CONFIG_NET_EMATCH_STACK=32 |
639 | # CONFIG_NET_EMATCH_CMP is not set | 675 | # CONFIG_NET_EMATCH_CMP is not set |
@@ -649,7 +685,9 @@ CONFIG_NET_CLS_ACT=y | |||
649 | # CONFIG_NET_ACT_NAT is not set | 685 | # CONFIG_NET_ACT_NAT is not set |
650 | # CONFIG_NET_ACT_PEDIT is not set | 686 | # CONFIG_NET_ACT_PEDIT is not set |
651 | # CONFIG_NET_ACT_SIMP is not set | 687 | # CONFIG_NET_ACT_SIMP is not set |
688 | # CONFIG_NET_ACT_SKBEDIT is not set | ||
652 | CONFIG_NET_SCH_FIFO=y | 689 | CONFIG_NET_SCH_FIFO=y |
690 | # CONFIG_DCB is not set | ||
653 | 691 | ||
654 | # | 692 | # |
655 | # Network testing | 693 | # Network testing |
@@ -666,29 +704,33 @@ CONFIG_HAMRADIO=y | |||
666 | # CONFIG_IRDA is not set | 704 | # CONFIG_IRDA is not set |
667 | # CONFIG_BT is not set | 705 | # CONFIG_BT is not set |
668 | # CONFIG_AF_RXRPC is not set | 706 | # CONFIG_AF_RXRPC is not set |
707 | # CONFIG_PHONET is not set | ||
669 | CONFIG_FIB_RULES=y | 708 | CONFIG_FIB_RULES=y |
670 | 709 | CONFIG_WIRELESS=y | |
671 | # | ||
672 | # Wireless | ||
673 | # | ||
674 | CONFIG_CFG80211=y | 710 | CONFIG_CFG80211=y |
711 | # CONFIG_CFG80211_REG_DEBUG is not set | ||
675 | CONFIG_NL80211=y | 712 | CONFIG_NL80211=y |
713 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
676 | CONFIG_WIRELESS_EXT=y | 714 | CONFIG_WIRELESS_EXT=y |
677 | CONFIG_WIRELESS_EXT_SYSFS=y | 715 | CONFIG_WIRELESS_EXT_SYSFS=y |
716 | # CONFIG_LIB80211 is not set | ||
678 | CONFIG_MAC80211=y | 717 | CONFIG_MAC80211=y |
679 | 718 | ||
680 | # | 719 | # |
681 | # Rate control algorithm selection | 720 | # Rate control algorithm selection |
682 | # | 721 | # |
683 | CONFIG_MAC80211_RC_PID=y | 722 | CONFIG_MAC80211_RC_MINSTREL=y |
684 | CONFIG_MAC80211_RC_DEFAULT_PID=y | 723 | # CONFIG_MAC80211_RC_DEFAULT_PID is not set |
685 | CONFIG_MAC80211_RC_DEFAULT="pid" | 724 | CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y |
725 | CONFIG_MAC80211_RC_DEFAULT="minstrel" | ||
686 | # CONFIG_MAC80211_MESH is not set | 726 | # CONFIG_MAC80211_MESH is not set |
687 | CONFIG_MAC80211_LEDS=y | 727 | CONFIG_MAC80211_LEDS=y |
688 | # CONFIG_MAC80211_DEBUGFS is not set | 728 | # CONFIG_MAC80211_DEBUGFS is not set |
689 | # CONFIG_MAC80211_DEBUG_MENU is not set | 729 | # CONFIG_MAC80211_DEBUG_MENU is not set |
690 | # CONFIG_IEEE80211 is not set | 730 | # CONFIG_WIMAX is not set |
691 | # CONFIG_RFKILL is not set | 731 | CONFIG_RFKILL=y |
732 | # CONFIG_RFKILL_INPUT is not set | ||
733 | CONFIG_RFKILL_LEDS=y | ||
692 | # CONFIG_NET_9P is not set | 734 | # CONFIG_NET_9P is not set |
693 | 735 | ||
694 | # | 736 | # |
@@ -712,7 +754,7 @@ CONFIG_PROC_EVENTS=y | |||
712 | # CONFIG_MTD is not set | 754 | # CONFIG_MTD is not set |
713 | # CONFIG_PARPORT is not set | 755 | # CONFIG_PARPORT is not set |
714 | CONFIG_PNP=y | 756 | CONFIG_PNP=y |
715 | # CONFIG_PNP_DEBUG is not set | 757 | CONFIG_PNP_DEBUG_MESSAGES=y |
716 | 758 | ||
717 | # | 759 | # |
718 | # Protocols | 760 | # Protocols |
@@ -740,21 +782,21 @@ CONFIG_BLK_DEV_RAM_SIZE=16384 | |||
740 | CONFIG_MISC_DEVICES=y | 782 | CONFIG_MISC_DEVICES=y |
741 | # CONFIG_IBM_ASM is not set | 783 | # CONFIG_IBM_ASM is not set |
742 | # CONFIG_PHANTOM is not set | 784 | # CONFIG_PHANTOM is not set |
743 | # CONFIG_EEPROM_93CX6 is not set | ||
744 | # CONFIG_SGI_IOC4 is not set | 785 | # CONFIG_SGI_IOC4 is not set |
745 | # CONFIG_TIFM_CORE is not set | 786 | # CONFIG_TIFM_CORE is not set |
746 | # CONFIG_ACER_WMI is not set | 787 | # CONFIG_ICS932S401 is not set |
747 | # CONFIG_ASUS_LAPTOP is not set | ||
748 | # CONFIG_FUJITSU_LAPTOP is not set | ||
749 | # CONFIG_MSI_LAPTOP is not set | ||
750 | # CONFIG_COMPAL_LAPTOP is not set | ||
751 | # CONFIG_SONY_LAPTOP is not set | ||
752 | # CONFIG_THINKPAD_ACPI is not set | ||
753 | # CONFIG_INTEL_MENLOW is not set | ||
754 | # CONFIG_ENCLOSURE_SERVICES is not set | 788 | # CONFIG_ENCLOSURE_SERVICES is not set |
755 | # CONFIG_SGI_XP is not set | 789 | # CONFIG_SGI_XP is not set |
756 | # CONFIG_HP_ILO is not set | 790 | # CONFIG_HP_ILO is not set |
757 | # CONFIG_SGI_GRU is not set | 791 | # CONFIG_SGI_GRU is not set |
792 | # CONFIG_C2PORT is not set | ||
793 | |||
794 | # | ||
795 | # EEPROM support | ||
796 | # | ||
797 | # CONFIG_EEPROM_AT24 is not set | ||
798 | # CONFIG_EEPROM_LEGACY is not set | ||
799 | # CONFIG_EEPROM_93CX6 is not set | ||
758 | CONFIG_HAVE_IDE=y | 800 | CONFIG_HAVE_IDE=y |
759 | # CONFIG_IDE is not set | 801 | # CONFIG_IDE is not set |
760 | 802 | ||
@@ -793,7 +835,7 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
793 | # | 835 | # |
794 | CONFIG_SCSI_SPI_ATTRS=y | 836 | CONFIG_SCSI_SPI_ATTRS=y |
795 | # CONFIG_SCSI_FC_ATTRS is not set | 837 | # CONFIG_SCSI_FC_ATTRS is not set |
796 | CONFIG_SCSI_ISCSI_ATTRS=y | 838 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
797 | # CONFIG_SCSI_SAS_ATTRS is not set | 839 | # CONFIG_SCSI_SAS_ATTRS is not set |
798 | # CONFIG_SCSI_SAS_LIBSAS is not set | 840 | # CONFIG_SCSI_SAS_LIBSAS is not set |
799 | # CONFIG_SCSI_SRP_ATTRS is not set | 841 | # CONFIG_SCSI_SRP_ATTRS is not set |
@@ -864,6 +906,7 @@ CONFIG_PATA_OLDPIIX=y | |||
864 | CONFIG_PATA_SCH=y | 906 | CONFIG_PATA_SCH=y |
865 | CONFIG_MD=y | 907 | CONFIG_MD=y |
866 | CONFIG_BLK_DEV_MD=y | 908 | CONFIG_BLK_DEV_MD=y |
909 | CONFIG_MD_AUTODETECT=y | ||
867 | # CONFIG_MD_LINEAR is not set | 910 | # CONFIG_MD_LINEAR is not set |
868 | # CONFIG_MD_RAID0 is not set | 911 | # CONFIG_MD_RAID0 is not set |
869 | # CONFIG_MD_RAID1 is not set | 912 | # CONFIG_MD_RAID1 is not set |
@@ -919,6 +962,9 @@ CONFIG_PHYLIB=y | |||
919 | # CONFIG_BROADCOM_PHY is not set | 962 | # CONFIG_BROADCOM_PHY is not set |
920 | # CONFIG_ICPLUS_PHY is not set | 963 | # CONFIG_ICPLUS_PHY is not set |
921 | # CONFIG_REALTEK_PHY is not set | 964 | # CONFIG_REALTEK_PHY is not set |
965 | # CONFIG_NATIONAL_PHY is not set | ||
966 | # CONFIG_STE10XP is not set | ||
967 | # CONFIG_LSI_ET1011C_PHY is not set | ||
922 | # CONFIG_FIXED_PHY is not set | 968 | # CONFIG_FIXED_PHY is not set |
923 | # CONFIG_MDIO_BITBANG is not set | 969 | # CONFIG_MDIO_BITBANG is not set |
924 | CONFIG_NET_ETHERNET=y | 970 | CONFIG_NET_ETHERNET=y |
@@ -942,6 +988,9 @@ CONFIG_NET_TULIP=y | |||
942 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 988 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
943 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 989 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
944 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 990 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
991 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
992 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
993 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
945 | CONFIG_NET_PCI=y | 994 | CONFIG_NET_PCI=y |
946 | # CONFIG_PCNET32 is not set | 995 | # CONFIG_PCNET32 is not set |
947 | # CONFIG_AMD8111_ETH is not set | 996 | # CONFIG_AMD8111_ETH is not set |
@@ -949,7 +998,6 @@ CONFIG_NET_PCI=y | |||
949 | # CONFIG_B44 is not set | 998 | # CONFIG_B44 is not set |
950 | CONFIG_FORCEDETH=y | 999 | CONFIG_FORCEDETH=y |
951 | # CONFIG_FORCEDETH_NAPI is not set | 1000 | # CONFIG_FORCEDETH_NAPI is not set |
952 | # CONFIG_EEPRO100 is not set | ||
953 | CONFIG_E100=y | 1001 | CONFIG_E100=y |
954 | # CONFIG_FEALNX is not set | 1002 | # CONFIG_FEALNX is not set |
955 | # CONFIG_NATSEMI is not set | 1003 | # CONFIG_NATSEMI is not set |
@@ -963,15 +1011,16 @@ CONFIG_8139TOO_PIO=y | |||
963 | # CONFIG_R6040 is not set | 1011 | # CONFIG_R6040 is not set |
964 | # CONFIG_SIS900 is not set | 1012 | # CONFIG_SIS900 is not set |
965 | # CONFIG_EPIC100 is not set | 1013 | # CONFIG_EPIC100 is not set |
1014 | # CONFIG_SMSC9420 is not set | ||
966 | # CONFIG_SUNDANCE is not set | 1015 | # CONFIG_SUNDANCE is not set |
967 | # CONFIG_TLAN is not set | 1016 | # CONFIG_TLAN is not set |
968 | # CONFIG_VIA_RHINE is not set | 1017 | # CONFIG_VIA_RHINE is not set |
969 | # CONFIG_SC92031 is not set | 1018 | # CONFIG_SC92031 is not set |
1019 | # CONFIG_ATL2 is not set | ||
970 | CONFIG_NETDEV_1000=y | 1020 | CONFIG_NETDEV_1000=y |
971 | # CONFIG_ACENIC is not set | 1021 | # CONFIG_ACENIC is not set |
972 | # CONFIG_DL2K is not set | 1022 | # CONFIG_DL2K is not set |
973 | CONFIG_E1000=y | 1023 | CONFIG_E1000=y |
974 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
975 | # CONFIG_E1000E is not set | 1024 | # CONFIG_E1000E is not set |
976 | # CONFIG_IP1000 is not set | 1025 | # CONFIG_IP1000 is not set |
977 | # CONFIG_IGB is not set | 1026 | # CONFIG_IGB is not set |
@@ -989,18 +1038,23 @@ CONFIG_TIGON3=y | |||
989 | # CONFIG_QLA3XXX is not set | 1038 | # CONFIG_QLA3XXX is not set |
990 | # CONFIG_ATL1 is not set | 1039 | # CONFIG_ATL1 is not set |
991 | # CONFIG_ATL1E is not set | 1040 | # CONFIG_ATL1E is not set |
1041 | # CONFIG_JME is not set | ||
992 | CONFIG_NETDEV_10000=y | 1042 | CONFIG_NETDEV_10000=y |
993 | # CONFIG_CHELSIO_T1 is not set | 1043 | # CONFIG_CHELSIO_T1 is not set |
1044 | CONFIG_CHELSIO_T3_DEPENDS=y | ||
994 | # CONFIG_CHELSIO_T3 is not set | 1045 | # CONFIG_CHELSIO_T3 is not set |
1046 | # CONFIG_ENIC is not set | ||
995 | # CONFIG_IXGBE is not set | 1047 | # CONFIG_IXGBE is not set |
996 | # CONFIG_IXGB is not set | 1048 | # CONFIG_IXGB is not set |
997 | # CONFIG_S2IO is not set | 1049 | # CONFIG_S2IO is not set |
998 | # CONFIG_MYRI10GE is not set | 1050 | # CONFIG_MYRI10GE is not set |
999 | # CONFIG_NETXEN_NIC is not set | 1051 | # CONFIG_NETXEN_NIC is not set |
1000 | # CONFIG_NIU is not set | 1052 | # CONFIG_NIU is not set |
1053 | # CONFIG_MLX4_EN is not set | ||
1001 | # CONFIG_MLX4_CORE is not set | 1054 | # CONFIG_MLX4_CORE is not set |
1002 | # CONFIG_TEHUTI is not set | 1055 | # CONFIG_TEHUTI is not set |
1003 | # CONFIG_BNX2X is not set | 1056 | # CONFIG_BNX2X is not set |
1057 | # CONFIG_QLGE is not set | ||
1004 | # CONFIG_SFC is not set | 1058 | # CONFIG_SFC is not set |
1005 | CONFIG_TR=y | 1059 | CONFIG_TR=y |
1006 | # CONFIG_IBMOL is not set | 1060 | # CONFIG_IBMOL is not set |
@@ -1013,9 +1067,8 @@ CONFIG_TR=y | |||
1013 | # CONFIG_WLAN_PRE80211 is not set | 1067 | # CONFIG_WLAN_PRE80211 is not set |
1014 | CONFIG_WLAN_80211=y | 1068 | CONFIG_WLAN_80211=y |
1015 | # CONFIG_PCMCIA_RAYCS is not set | 1069 | # CONFIG_PCMCIA_RAYCS is not set |
1016 | # CONFIG_IPW2100 is not set | ||
1017 | # CONFIG_IPW2200 is not set | ||
1018 | # CONFIG_LIBERTAS is not set | 1070 | # CONFIG_LIBERTAS is not set |
1071 | # CONFIG_LIBERTAS_THINFIRM is not set | ||
1019 | # CONFIG_AIRO is not set | 1072 | # CONFIG_AIRO is not set |
1020 | # CONFIG_HERMES is not set | 1073 | # CONFIG_HERMES is not set |
1021 | # CONFIG_ATMEL is not set | 1074 | # CONFIG_ATMEL is not set |
@@ -1032,6 +1085,8 @@ CONFIG_WLAN_80211=y | |||
1032 | CONFIG_ATH5K=y | 1085 | CONFIG_ATH5K=y |
1033 | # CONFIG_ATH5K_DEBUG is not set | 1086 | # CONFIG_ATH5K_DEBUG is not set |
1034 | # CONFIG_ATH9K is not set | 1087 | # CONFIG_ATH9K is not set |
1088 | # CONFIG_IPW2100 is not set | ||
1089 | # CONFIG_IPW2200 is not set | ||
1035 | # CONFIG_IWLCORE is not set | 1090 | # CONFIG_IWLCORE is not set |
1036 | # CONFIG_IWLWIFI_LEDS is not set | 1091 | # CONFIG_IWLWIFI_LEDS is not set |
1037 | # CONFIG_IWLAGN is not set | 1092 | # CONFIG_IWLAGN is not set |
@@ -1043,6 +1098,10 @@ CONFIG_ATH5K=y | |||
1043 | # CONFIG_RT2X00 is not set | 1098 | # CONFIG_RT2X00 is not set |
1044 | 1099 | ||
1045 | # | 1100 | # |
1101 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
1102 | # | ||
1103 | |||
1104 | # | ||
1046 | # USB Network Adapters | 1105 | # USB Network Adapters |
1047 | # | 1106 | # |
1048 | # CONFIG_USB_CATC is not set | 1107 | # CONFIG_USB_CATC is not set |
@@ -1050,6 +1109,7 @@ CONFIG_ATH5K=y | |||
1050 | # CONFIG_USB_PEGASUS is not set | 1109 | # CONFIG_USB_PEGASUS is not set |
1051 | # CONFIG_USB_RTL8150 is not set | 1110 | # CONFIG_USB_RTL8150 is not set |
1052 | # CONFIG_USB_USBNET is not set | 1111 | # CONFIG_USB_USBNET is not set |
1112 | # CONFIG_USB_HSO is not set | ||
1053 | CONFIG_NET_PCMCIA=y | 1113 | CONFIG_NET_PCMCIA=y |
1054 | # CONFIG_PCMCIA_3C589 is not set | 1114 | # CONFIG_PCMCIA_3C589 is not set |
1055 | # CONFIG_PCMCIA_3C574 is not set | 1115 | # CONFIG_PCMCIA_3C574 is not set |
@@ -1059,6 +1119,7 @@ CONFIG_NET_PCMCIA=y | |||
1059 | # CONFIG_PCMCIA_SMC91C92 is not set | 1119 | # CONFIG_PCMCIA_SMC91C92 is not set |
1060 | # CONFIG_PCMCIA_XIRC2PS is not set | 1120 | # CONFIG_PCMCIA_XIRC2PS is not set |
1061 | # CONFIG_PCMCIA_AXNET is not set | 1121 | # CONFIG_PCMCIA_AXNET is not set |
1122 | # CONFIG_PCMCIA_IBMTR is not set | ||
1062 | # CONFIG_WAN is not set | 1123 | # CONFIG_WAN is not set |
1063 | CONFIG_FDDI=y | 1124 | CONFIG_FDDI=y |
1064 | # CONFIG_DEFXX is not set | 1125 | # CONFIG_DEFXX is not set |
@@ -1110,6 +1171,7 @@ CONFIG_MOUSE_PS2_LOGIPS2PP=y | |||
1110 | CONFIG_MOUSE_PS2_SYNAPTICS=y | 1171 | CONFIG_MOUSE_PS2_SYNAPTICS=y |
1111 | CONFIG_MOUSE_PS2_LIFEBOOK=y | 1172 | CONFIG_MOUSE_PS2_LIFEBOOK=y |
1112 | CONFIG_MOUSE_PS2_TRACKPOINT=y | 1173 | CONFIG_MOUSE_PS2_TRACKPOINT=y |
1174 | # CONFIG_MOUSE_PS2_ELANTECH is not set | ||
1113 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | 1175 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set |
1114 | # CONFIG_MOUSE_SERIAL is not set | 1176 | # CONFIG_MOUSE_SERIAL is not set |
1115 | # CONFIG_MOUSE_APPLETOUCH is not set | 1177 | # CONFIG_MOUSE_APPLETOUCH is not set |
@@ -1147,15 +1209,16 @@ CONFIG_INPUT_TOUCHSCREEN=y | |||
1147 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | 1209 | # CONFIG_TOUCHSCREEN_FUJITSU is not set |
1148 | # CONFIG_TOUCHSCREEN_GUNZE is not set | 1210 | # CONFIG_TOUCHSCREEN_GUNZE is not set |
1149 | # CONFIG_TOUCHSCREEN_ELO is not set | 1211 | # CONFIG_TOUCHSCREEN_ELO is not set |
1212 | # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set | ||
1150 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | 1213 | # CONFIG_TOUCHSCREEN_MTOUCH is not set |
1151 | # CONFIG_TOUCHSCREEN_INEXIO is not set | 1214 | # CONFIG_TOUCHSCREEN_INEXIO is not set |
1152 | # CONFIG_TOUCHSCREEN_MK712 is not set | 1215 | # CONFIG_TOUCHSCREEN_MK712 is not set |
1153 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | 1216 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set |
1154 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | 1217 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set |
1155 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | 1218 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set |
1156 | # CONFIG_TOUCHSCREEN_UCB1400 is not set | ||
1157 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | 1219 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set |
1158 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | 1220 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set |
1221 | # CONFIG_TOUCHSCREEN_TSC2007 is not set | ||
1159 | CONFIG_INPUT_MISC=y | 1222 | CONFIG_INPUT_MISC=y |
1160 | # CONFIG_INPUT_PCSPKR is not set | 1223 | # CONFIG_INPUT_PCSPKR is not set |
1161 | # CONFIG_INPUT_APANEL is not set | 1224 | # CONFIG_INPUT_APANEL is not set |
@@ -1165,6 +1228,7 @@ CONFIG_INPUT_MISC=y | |||
1165 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | 1228 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set |
1166 | # CONFIG_INPUT_POWERMATE is not set | 1229 | # CONFIG_INPUT_POWERMATE is not set |
1167 | # CONFIG_INPUT_YEALINK is not set | 1230 | # CONFIG_INPUT_YEALINK is not set |
1231 | # CONFIG_INPUT_CM109 is not set | ||
1168 | # CONFIG_INPUT_UINPUT is not set | 1232 | # CONFIG_INPUT_UINPUT is not set |
1169 | 1233 | ||
1170 | # | 1234 | # |
@@ -1231,6 +1295,7 @@ CONFIG_SERIAL_CORE=y | |||
1231 | CONFIG_SERIAL_CORE_CONSOLE=y | 1295 | CONFIG_SERIAL_CORE_CONSOLE=y |
1232 | # CONFIG_SERIAL_JSM is not set | 1296 | # CONFIG_SERIAL_JSM is not set |
1233 | CONFIG_UNIX98_PTYS=y | 1297 | CONFIG_UNIX98_PTYS=y |
1298 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
1234 | # CONFIG_LEGACY_PTYS is not set | 1299 | # CONFIG_LEGACY_PTYS is not set |
1235 | # CONFIG_IPMI_HANDLER is not set | 1300 | # CONFIG_IPMI_HANDLER is not set |
1236 | CONFIG_HW_RANDOM=y | 1301 | CONFIG_HW_RANDOM=y |
@@ -1260,6 +1325,7 @@ CONFIG_I2C=y | |||
1260 | CONFIG_I2C_BOARDINFO=y | 1325 | CONFIG_I2C_BOARDINFO=y |
1261 | # CONFIG_I2C_CHARDEV is not set | 1326 | # CONFIG_I2C_CHARDEV is not set |
1262 | CONFIG_I2C_HELPER_AUTO=y | 1327 | CONFIG_I2C_HELPER_AUTO=y |
1328 | CONFIG_I2C_ALGOBIT=y | ||
1263 | 1329 | ||
1264 | # | 1330 | # |
1265 | # I2C Hardware Bus support | 1331 | # I2C Hardware Bus support |
@@ -1311,8 +1377,6 @@ CONFIG_I2C_I801=y | |||
1311 | # Miscellaneous I2C Chip support | 1377 | # Miscellaneous I2C Chip support |
1312 | # | 1378 | # |
1313 | # CONFIG_DS1682 is not set | 1379 | # CONFIG_DS1682 is not set |
1314 | # CONFIG_EEPROM_AT24 is not set | ||
1315 | # CONFIG_EEPROM_LEGACY is not set | ||
1316 | # CONFIG_SENSORS_PCF8574 is not set | 1380 | # CONFIG_SENSORS_PCF8574 is not set |
1317 | # CONFIG_PCF8575 is not set | 1381 | # CONFIG_PCF8575 is not set |
1318 | # CONFIG_SENSORS_PCA9539 is not set | 1382 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -1331,8 +1395,78 @@ CONFIG_POWER_SUPPLY=y | |||
1331 | # CONFIG_POWER_SUPPLY_DEBUG is not set | 1395 | # CONFIG_POWER_SUPPLY_DEBUG is not set |
1332 | # CONFIG_PDA_POWER is not set | 1396 | # CONFIG_PDA_POWER is not set |
1333 | # CONFIG_BATTERY_DS2760 is not set | 1397 | # CONFIG_BATTERY_DS2760 is not set |
1334 | # CONFIG_HWMON is not set | 1398 | # CONFIG_BATTERY_BQ27x00 is not set |
1399 | CONFIG_HWMON=y | ||
1400 | # CONFIG_HWMON_VID is not set | ||
1401 | # CONFIG_SENSORS_ABITUGURU is not set | ||
1402 | # CONFIG_SENSORS_ABITUGURU3 is not set | ||
1403 | # CONFIG_SENSORS_AD7414 is not set | ||
1404 | # CONFIG_SENSORS_AD7418 is not set | ||
1405 | # CONFIG_SENSORS_ADM1021 is not set | ||
1406 | # CONFIG_SENSORS_ADM1025 is not set | ||
1407 | # CONFIG_SENSORS_ADM1026 is not set | ||
1408 | # CONFIG_SENSORS_ADM1029 is not set | ||
1409 | # CONFIG_SENSORS_ADM1031 is not set | ||
1410 | # CONFIG_SENSORS_ADM9240 is not set | ||
1411 | # CONFIG_SENSORS_ADT7462 is not set | ||
1412 | # CONFIG_SENSORS_ADT7470 is not set | ||
1413 | # CONFIG_SENSORS_ADT7473 is not set | ||
1414 | # CONFIG_SENSORS_ADT7475 is not set | ||
1415 | # CONFIG_SENSORS_K8TEMP is not set | ||
1416 | # CONFIG_SENSORS_ASB100 is not set | ||
1417 | # CONFIG_SENSORS_ATXP1 is not set | ||
1418 | # CONFIG_SENSORS_DS1621 is not set | ||
1419 | # CONFIG_SENSORS_I5K_AMB is not set | ||
1420 | # CONFIG_SENSORS_F71805F is not set | ||
1421 | # CONFIG_SENSORS_F71882FG is not set | ||
1422 | # CONFIG_SENSORS_F75375S is not set | ||
1423 | # CONFIG_SENSORS_FSCHER is not set | ||
1424 | # CONFIG_SENSORS_FSCPOS is not set | ||
1425 | # CONFIG_SENSORS_FSCHMD is not set | ||
1426 | # CONFIG_SENSORS_GL518SM is not set | ||
1427 | # CONFIG_SENSORS_GL520SM is not set | ||
1428 | # CONFIG_SENSORS_CORETEMP is not set | ||
1429 | # CONFIG_SENSORS_IT87 is not set | ||
1430 | # CONFIG_SENSORS_LM63 is not set | ||
1431 | # CONFIG_SENSORS_LM75 is not set | ||
1432 | # CONFIG_SENSORS_LM77 is not set | ||
1433 | # CONFIG_SENSORS_LM78 is not set | ||
1434 | # CONFIG_SENSORS_LM80 is not set | ||
1435 | # CONFIG_SENSORS_LM83 is not set | ||
1436 | # CONFIG_SENSORS_LM85 is not set | ||
1437 | # CONFIG_SENSORS_LM87 is not set | ||
1438 | # CONFIG_SENSORS_LM90 is not set | ||
1439 | # CONFIG_SENSORS_LM92 is not set | ||
1440 | # CONFIG_SENSORS_LM93 is not set | ||
1441 | # CONFIG_SENSORS_LTC4245 is not set | ||
1442 | # CONFIG_SENSORS_MAX1619 is not set | ||
1443 | # CONFIG_SENSORS_MAX6650 is not set | ||
1444 | # CONFIG_SENSORS_PC87360 is not set | ||
1445 | # CONFIG_SENSORS_PC87427 is not set | ||
1446 | # CONFIG_SENSORS_SIS5595 is not set | ||
1447 | # CONFIG_SENSORS_DME1737 is not set | ||
1448 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
1449 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
1450 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
1451 | # CONFIG_SENSORS_ADS7828 is not set | ||
1452 | # CONFIG_SENSORS_THMC50 is not set | ||
1453 | # CONFIG_SENSORS_VIA686A is not set | ||
1454 | # CONFIG_SENSORS_VT1211 is not set | ||
1455 | # CONFIG_SENSORS_VT8231 is not set | ||
1456 | # CONFIG_SENSORS_W83781D is not set | ||
1457 | # CONFIG_SENSORS_W83791D is not set | ||
1458 | # CONFIG_SENSORS_W83792D is not set | ||
1459 | # CONFIG_SENSORS_W83793 is not set | ||
1460 | # CONFIG_SENSORS_W83L785TS is not set | ||
1461 | # CONFIG_SENSORS_W83L786NG is not set | ||
1462 | # CONFIG_SENSORS_W83627HF is not set | ||
1463 | # CONFIG_SENSORS_W83627EHF is not set | ||
1464 | # CONFIG_SENSORS_HDAPS is not set | ||
1465 | # CONFIG_SENSORS_LIS3LV02D is not set | ||
1466 | # CONFIG_SENSORS_APPLESMC is not set | ||
1467 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
1335 | CONFIG_THERMAL=y | 1468 | CONFIG_THERMAL=y |
1469 | # CONFIG_THERMAL_HWMON is not set | ||
1336 | CONFIG_WATCHDOG=y | 1470 | CONFIG_WATCHDOG=y |
1337 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 1471 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
1338 | 1472 | ||
@@ -1352,15 +1486,18 @@ CONFIG_WATCHDOG=y | |||
1352 | # CONFIG_I6300ESB_WDT is not set | 1486 | # CONFIG_I6300ESB_WDT is not set |
1353 | # CONFIG_ITCO_WDT is not set | 1487 | # CONFIG_ITCO_WDT is not set |
1354 | # CONFIG_IT8712F_WDT is not set | 1488 | # CONFIG_IT8712F_WDT is not set |
1489 | # CONFIG_IT87_WDT is not set | ||
1355 | # CONFIG_HP_WATCHDOG is not set | 1490 | # CONFIG_HP_WATCHDOG is not set |
1356 | # CONFIG_SC1200_WDT is not set | 1491 | # CONFIG_SC1200_WDT is not set |
1357 | # CONFIG_PC87413_WDT is not set | 1492 | # CONFIG_PC87413_WDT is not set |
1358 | # CONFIG_60XX_WDT is not set | 1493 | # CONFIG_60XX_WDT is not set |
1359 | # CONFIG_SBC8360_WDT is not set | 1494 | # CONFIG_SBC8360_WDT is not set |
1360 | # CONFIG_CPU5_WDT is not set | 1495 | # CONFIG_CPU5_WDT is not set |
1496 | # CONFIG_SMSC_SCH311X_WDT is not set | ||
1361 | # CONFIG_SMSC37B787_WDT is not set | 1497 | # CONFIG_SMSC37B787_WDT is not set |
1362 | # CONFIG_W83627HF_WDT is not set | 1498 | # CONFIG_W83627HF_WDT is not set |
1363 | # CONFIG_W83697HF_WDT is not set | 1499 | # CONFIG_W83697HF_WDT is not set |
1500 | # CONFIG_W83697UG_WDT is not set | ||
1364 | # CONFIG_W83877F_WDT is not set | 1501 | # CONFIG_W83877F_WDT is not set |
1365 | # CONFIG_W83977F_WDT is not set | 1502 | # CONFIG_W83977F_WDT is not set |
1366 | # CONFIG_MACHZ_WDT is not set | 1503 | # CONFIG_MACHZ_WDT is not set |
@@ -1376,11 +1513,11 @@ CONFIG_WATCHDOG=y | |||
1376 | # USB-based Watchdog Cards | 1513 | # USB-based Watchdog Cards |
1377 | # | 1514 | # |
1378 | # CONFIG_USBPCWATCHDOG is not set | 1515 | # CONFIG_USBPCWATCHDOG is not set |
1516 | CONFIG_SSB_POSSIBLE=y | ||
1379 | 1517 | ||
1380 | # | 1518 | # |
1381 | # Sonics Silicon Backplane | 1519 | # Sonics Silicon Backplane |
1382 | # | 1520 | # |
1383 | CONFIG_SSB_POSSIBLE=y | ||
1384 | # CONFIG_SSB is not set | 1521 | # CONFIG_SSB is not set |
1385 | 1522 | ||
1386 | # | 1523 | # |
@@ -1389,7 +1526,13 @@ CONFIG_SSB_POSSIBLE=y | |||
1389 | # CONFIG_MFD_CORE is not set | 1526 | # CONFIG_MFD_CORE is not set |
1390 | # CONFIG_MFD_SM501 is not set | 1527 | # CONFIG_MFD_SM501 is not set |
1391 | # CONFIG_HTC_PASIC3 is not set | 1528 | # CONFIG_HTC_PASIC3 is not set |
1529 | # CONFIG_TWL4030_CORE is not set | ||
1392 | # CONFIG_MFD_TMIO is not set | 1530 | # CONFIG_MFD_TMIO is not set |
1531 | # CONFIG_PMIC_DA903X is not set | ||
1532 | # CONFIG_MFD_WM8400 is not set | ||
1533 | # CONFIG_MFD_WM8350_I2C is not set | ||
1534 | # CONFIG_MFD_PCF50633 is not set | ||
1535 | # CONFIG_REGULATOR is not set | ||
1393 | 1536 | ||
1394 | # | 1537 | # |
1395 | # Multimedia devices | 1538 | # Multimedia devices |
@@ -1423,6 +1566,7 @@ CONFIG_DRM=y | |||
1423 | # CONFIG_DRM_I810 is not set | 1566 | # CONFIG_DRM_I810 is not set |
1424 | # CONFIG_DRM_I830 is not set | 1567 | # CONFIG_DRM_I830 is not set |
1425 | CONFIG_DRM_I915=y | 1568 | CONFIG_DRM_I915=y |
1569 | CONFIG_DRM_I915_KMS=y | ||
1426 | # CONFIG_DRM_MGA is not set | 1570 | # CONFIG_DRM_MGA is not set |
1427 | # CONFIG_DRM_SIS is not set | 1571 | # CONFIG_DRM_SIS is not set |
1428 | # CONFIG_DRM_VIA is not set | 1572 | # CONFIG_DRM_VIA is not set |
@@ -1432,6 +1576,7 @@ CONFIG_DRM_I915=y | |||
1432 | CONFIG_FB=y | 1576 | CONFIG_FB=y |
1433 | # CONFIG_FIRMWARE_EDID is not set | 1577 | # CONFIG_FIRMWARE_EDID is not set |
1434 | # CONFIG_FB_DDC is not set | 1578 | # CONFIG_FB_DDC is not set |
1579 | # CONFIG_FB_BOOT_VESA_SUPPORT is not set | ||
1435 | CONFIG_FB_CFB_FILLRECT=y | 1580 | CONFIG_FB_CFB_FILLRECT=y |
1436 | CONFIG_FB_CFB_COPYAREA=y | 1581 | CONFIG_FB_CFB_COPYAREA=y |
1437 | CONFIG_FB_CFB_IMAGEBLIT=y | 1582 | CONFIG_FB_CFB_IMAGEBLIT=y |
@@ -1460,7 +1605,6 @@ CONFIG_FB_TILEBLITTING=y | |||
1460 | # CONFIG_FB_UVESA is not set | 1605 | # CONFIG_FB_UVESA is not set |
1461 | # CONFIG_FB_VESA is not set | 1606 | # CONFIG_FB_VESA is not set |
1462 | CONFIG_FB_EFI=y | 1607 | CONFIG_FB_EFI=y |
1463 | # CONFIG_FB_IMAC is not set | ||
1464 | # CONFIG_FB_N411 is not set | 1608 | # CONFIG_FB_N411 is not set |
1465 | # CONFIG_FB_HGA is not set | 1609 | # CONFIG_FB_HGA is not set |
1466 | # CONFIG_FB_S1D13XXX is not set | 1610 | # CONFIG_FB_S1D13XXX is not set |
@@ -1475,6 +1619,7 @@ CONFIG_FB_EFI=y | |||
1475 | # CONFIG_FB_S3 is not set | 1619 | # CONFIG_FB_S3 is not set |
1476 | # CONFIG_FB_SAVAGE is not set | 1620 | # CONFIG_FB_SAVAGE is not set |
1477 | # CONFIG_FB_SIS is not set | 1621 | # CONFIG_FB_SIS is not set |
1622 | # CONFIG_FB_VIA is not set | ||
1478 | # CONFIG_FB_NEOMAGIC is not set | 1623 | # CONFIG_FB_NEOMAGIC is not set |
1479 | # CONFIG_FB_KYRO is not set | 1624 | # CONFIG_FB_KYRO is not set |
1480 | # CONFIG_FB_3DFX is not set | 1625 | # CONFIG_FB_3DFX is not set |
@@ -1486,12 +1631,15 @@ CONFIG_FB_EFI=y | |||
1486 | # CONFIG_FB_CARMINE is not set | 1631 | # CONFIG_FB_CARMINE is not set |
1487 | # CONFIG_FB_GEODE is not set | 1632 | # CONFIG_FB_GEODE is not set |
1488 | # CONFIG_FB_VIRTUAL is not set | 1633 | # CONFIG_FB_VIRTUAL is not set |
1634 | # CONFIG_FB_METRONOME is not set | ||
1635 | # CONFIG_FB_MB862XX is not set | ||
1489 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | 1636 | CONFIG_BACKLIGHT_LCD_SUPPORT=y |
1490 | # CONFIG_LCD_CLASS_DEVICE is not set | 1637 | # CONFIG_LCD_CLASS_DEVICE is not set |
1491 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | 1638 | CONFIG_BACKLIGHT_CLASS_DEVICE=y |
1492 | # CONFIG_BACKLIGHT_CORGI is not set | 1639 | CONFIG_BACKLIGHT_GENERIC=y |
1493 | # CONFIG_BACKLIGHT_PROGEAR is not set | 1640 | # CONFIG_BACKLIGHT_PROGEAR is not set |
1494 | # CONFIG_BACKLIGHT_MBP_NVIDIA is not set | 1641 | # CONFIG_BACKLIGHT_MBP_NVIDIA is not set |
1642 | # CONFIG_BACKLIGHT_SAHARA is not set | ||
1495 | 1643 | ||
1496 | # | 1644 | # |
1497 | # Display device support | 1645 | # Display device support |
@@ -1511,10 +1659,12 @@ CONFIG_LOGO=y | |||
1511 | # CONFIG_LOGO_LINUX_VGA16 is not set | 1659 | # CONFIG_LOGO_LINUX_VGA16 is not set |
1512 | CONFIG_LOGO_LINUX_CLUT224=y | 1660 | CONFIG_LOGO_LINUX_CLUT224=y |
1513 | CONFIG_SOUND=y | 1661 | CONFIG_SOUND=y |
1662 | CONFIG_SOUND_OSS_CORE=y | ||
1514 | CONFIG_SND=y | 1663 | CONFIG_SND=y |
1515 | CONFIG_SND_TIMER=y | 1664 | CONFIG_SND_TIMER=y |
1516 | CONFIG_SND_PCM=y | 1665 | CONFIG_SND_PCM=y |
1517 | CONFIG_SND_HWDEP=y | 1666 | CONFIG_SND_HWDEP=y |
1667 | CONFIG_SND_JACK=y | ||
1518 | CONFIG_SND_SEQUENCER=y | 1668 | CONFIG_SND_SEQUENCER=y |
1519 | CONFIG_SND_SEQ_DUMMY=y | 1669 | CONFIG_SND_SEQ_DUMMY=y |
1520 | CONFIG_SND_OSSEMUL=y | 1670 | CONFIG_SND_OSSEMUL=y |
@@ -1522,6 +1672,8 @@ CONFIG_SND_MIXER_OSS=y | |||
1522 | CONFIG_SND_PCM_OSS=y | 1672 | CONFIG_SND_PCM_OSS=y |
1523 | CONFIG_SND_PCM_OSS_PLUGINS=y | 1673 | CONFIG_SND_PCM_OSS_PLUGINS=y |
1524 | CONFIG_SND_SEQUENCER_OSS=y | 1674 | CONFIG_SND_SEQUENCER_OSS=y |
1675 | CONFIG_SND_HRTIMER=y | ||
1676 | CONFIG_SND_SEQ_HRTIMER_DEFAULT=y | ||
1525 | CONFIG_SND_DYNAMIC_MINORS=y | 1677 | CONFIG_SND_DYNAMIC_MINORS=y |
1526 | CONFIG_SND_SUPPORT_OLD_API=y | 1678 | CONFIG_SND_SUPPORT_OLD_API=y |
1527 | CONFIG_SND_VERBOSE_PROCFS=y | 1679 | CONFIG_SND_VERBOSE_PROCFS=y |
@@ -1575,11 +1727,16 @@ CONFIG_SND_PCI=y | |||
1575 | # CONFIG_SND_FM801 is not set | 1727 | # CONFIG_SND_FM801 is not set |
1576 | CONFIG_SND_HDA_INTEL=y | 1728 | CONFIG_SND_HDA_INTEL=y |
1577 | CONFIG_SND_HDA_HWDEP=y | 1729 | CONFIG_SND_HDA_HWDEP=y |
1730 | # CONFIG_SND_HDA_RECONFIG is not set | ||
1731 | # CONFIG_SND_HDA_INPUT_BEEP is not set | ||
1578 | CONFIG_SND_HDA_CODEC_REALTEK=y | 1732 | CONFIG_SND_HDA_CODEC_REALTEK=y |
1579 | CONFIG_SND_HDA_CODEC_ANALOG=y | 1733 | CONFIG_SND_HDA_CODEC_ANALOG=y |
1580 | CONFIG_SND_HDA_CODEC_SIGMATEL=y | 1734 | CONFIG_SND_HDA_CODEC_SIGMATEL=y |
1581 | CONFIG_SND_HDA_CODEC_VIA=y | 1735 | CONFIG_SND_HDA_CODEC_VIA=y |
1582 | CONFIG_SND_HDA_CODEC_ATIHDMI=y | 1736 | CONFIG_SND_HDA_CODEC_ATIHDMI=y |
1737 | CONFIG_SND_HDA_CODEC_NVHDMI=y | ||
1738 | CONFIG_SND_HDA_CODEC_INTELHDMI=y | ||
1739 | CONFIG_SND_HDA_ELD=y | ||
1583 | CONFIG_SND_HDA_CODEC_CONEXANT=y | 1740 | CONFIG_SND_HDA_CODEC_CONEXANT=y |
1584 | CONFIG_SND_HDA_CODEC_CMEDIA=y | 1741 | CONFIG_SND_HDA_CODEC_CMEDIA=y |
1585 | CONFIG_SND_HDA_CODEC_SI3054=y | 1742 | CONFIG_SND_HDA_CODEC_SI3054=y |
@@ -1612,6 +1769,7 @@ CONFIG_SND_USB=y | |||
1612 | # CONFIG_SND_USB_AUDIO is not set | 1769 | # CONFIG_SND_USB_AUDIO is not set |
1613 | # CONFIG_SND_USB_USX2Y is not set | 1770 | # CONFIG_SND_USB_USX2Y is not set |
1614 | # CONFIG_SND_USB_CAIAQ is not set | 1771 | # CONFIG_SND_USB_CAIAQ is not set |
1772 | # CONFIG_SND_USB_US122L is not set | ||
1615 | CONFIG_SND_PCMCIA=y | 1773 | CONFIG_SND_PCMCIA=y |
1616 | # CONFIG_SND_VXPOCKET is not set | 1774 | # CONFIG_SND_VXPOCKET is not set |
1617 | # CONFIG_SND_PDAUDIOCF is not set | 1775 | # CONFIG_SND_PDAUDIOCF is not set |
@@ -1626,15 +1784,37 @@ CONFIG_HIDRAW=y | |||
1626 | # USB Input Devices | 1784 | # USB Input Devices |
1627 | # | 1785 | # |
1628 | CONFIG_USB_HID=y | 1786 | CONFIG_USB_HID=y |
1629 | CONFIG_USB_HIDINPUT_POWERBOOK=y | ||
1630 | CONFIG_HID_FF=y | ||
1631 | CONFIG_HID_PID=y | 1787 | CONFIG_HID_PID=y |
1788 | CONFIG_USB_HIDDEV=y | ||
1789 | |||
1790 | # | ||
1791 | # Special HID drivers | ||
1792 | # | ||
1793 | CONFIG_HID_COMPAT=y | ||
1794 | CONFIG_HID_A4TECH=y | ||
1795 | CONFIG_HID_APPLE=y | ||
1796 | CONFIG_HID_BELKIN=y | ||
1797 | CONFIG_HID_CHERRY=y | ||
1798 | CONFIG_HID_CHICONY=y | ||
1799 | CONFIG_HID_CYPRESS=y | ||
1800 | CONFIG_HID_EZKEY=y | ||
1801 | CONFIG_HID_GYRATION=y | ||
1802 | CONFIG_HID_LOGITECH=y | ||
1632 | CONFIG_LOGITECH_FF=y | 1803 | CONFIG_LOGITECH_FF=y |
1633 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | 1804 | # CONFIG_LOGIRUMBLEPAD2_FF is not set |
1805 | CONFIG_HID_MICROSOFT=y | ||
1806 | CONFIG_HID_MONTEREY=y | ||
1807 | CONFIG_HID_NTRIG=y | ||
1808 | CONFIG_HID_PANTHERLORD=y | ||
1634 | CONFIG_PANTHERLORD_FF=y | 1809 | CONFIG_PANTHERLORD_FF=y |
1810 | CONFIG_HID_PETALYNX=y | ||
1811 | CONFIG_HID_SAMSUNG=y | ||
1812 | CONFIG_HID_SONY=y | ||
1813 | CONFIG_HID_SUNPLUS=y | ||
1814 | # CONFIG_GREENASIA_FF is not set | ||
1815 | CONFIG_HID_TOPSEED=y | ||
1635 | CONFIG_THRUSTMASTER_FF=y | 1816 | CONFIG_THRUSTMASTER_FF=y |
1636 | CONFIG_ZEROPLUS_FF=y | 1817 | CONFIG_ZEROPLUS_FF=y |
1637 | CONFIG_USB_HIDDEV=y | ||
1638 | CONFIG_USB_SUPPORT=y | 1818 | CONFIG_USB_SUPPORT=y |
1639 | CONFIG_USB_ARCH_HAS_HCD=y | 1819 | CONFIG_USB_ARCH_HAS_HCD=y |
1640 | CONFIG_USB_ARCH_HAS_OHCI=y | 1820 | CONFIG_USB_ARCH_HAS_OHCI=y |
@@ -1652,6 +1832,8 @@ CONFIG_USB_DEVICEFS=y | |||
1652 | CONFIG_USB_SUSPEND=y | 1832 | CONFIG_USB_SUSPEND=y |
1653 | # CONFIG_USB_OTG is not set | 1833 | # CONFIG_USB_OTG is not set |
1654 | CONFIG_USB_MON=y | 1834 | CONFIG_USB_MON=y |
1835 | # CONFIG_USB_WUSB is not set | ||
1836 | # CONFIG_USB_WUSB_CBAF is not set | ||
1655 | 1837 | ||
1656 | # | 1838 | # |
1657 | # USB Host Controller Drivers | 1839 | # USB Host Controller Drivers |
@@ -1660,6 +1842,7 @@ CONFIG_USB_MON=y | |||
1660 | CONFIG_USB_EHCI_HCD=y | 1842 | CONFIG_USB_EHCI_HCD=y |
1661 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 1843 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
1662 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 1844 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
1845 | # CONFIG_USB_OXU210HP_HCD is not set | ||
1663 | # CONFIG_USB_ISP116X_HCD is not set | 1846 | # CONFIG_USB_ISP116X_HCD is not set |
1664 | # CONFIG_USB_ISP1760_HCD is not set | 1847 | # CONFIG_USB_ISP1760_HCD is not set |
1665 | CONFIG_USB_OHCI_HCD=y | 1848 | CONFIG_USB_OHCI_HCD=y |
@@ -1669,6 +1852,8 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
1669 | CONFIG_USB_UHCI_HCD=y | 1852 | CONFIG_USB_UHCI_HCD=y |
1670 | # CONFIG_USB_SL811_HCD is not set | 1853 | # CONFIG_USB_SL811_HCD is not set |
1671 | # CONFIG_USB_R8A66597_HCD is not set | 1854 | # CONFIG_USB_R8A66597_HCD is not set |
1855 | # CONFIG_USB_WHCI_HCD is not set | ||
1856 | # CONFIG_USB_HWA_HCD is not set | ||
1672 | 1857 | ||
1673 | # | 1858 | # |
1674 | # USB Device Class drivers | 1859 | # USB Device Class drivers |
@@ -1676,20 +1861,20 @@ CONFIG_USB_UHCI_HCD=y | |||
1676 | # CONFIG_USB_ACM is not set | 1861 | # CONFIG_USB_ACM is not set |
1677 | CONFIG_USB_PRINTER=y | 1862 | CONFIG_USB_PRINTER=y |
1678 | # CONFIG_USB_WDM is not set | 1863 | # CONFIG_USB_WDM is not set |
1864 | # CONFIG_USB_TMC is not set | ||
1679 | 1865 | ||
1680 | # | 1866 | # |
1681 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1867 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
1682 | # | 1868 | # |
1683 | 1869 | ||
1684 | # | 1870 | # |
1685 | # may also be needed; see USB_STORAGE Help for more information | 1871 | # see USB_STORAGE Help for more information |
1686 | # | 1872 | # |
1687 | CONFIG_USB_STORAGE=y | 1873 | CONFIG_USB_STORAGE=y |
1688 | # CONFIG_USB_STORAGE_DEBUG is not set | 1874 | # CONFIG_USB_STORAGE_DEBUG is not set |
1689 | # CONFIG_USB_STORAGE_DATAFAB is not set | 1875 | # CONFIG_USB_STORAGE_DATAFAB is not set |
1690 | # CONFIG_USB_STORAGE_FREECOM is not set | 1876 | # CONFIG_USB_STORAGE_FREECOM is not set |
1691 | # CONFIG_USB_STORAGE_ISD200 is not set | 1877 | # CONFIG_USB_STORAGE_ISD200 is not set |
1692 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1693 | # CONFIG_USB_STORAGE_USBAT is not set | 1878 | # CONFIG_USB_STORAGE_USBAT is not set |
1694 | # CONFIG_USB_STORAGE_SDDR09 is not set | 1879 | # CONFIG_USB_STORAGE_SDDR09 is not set |
1695 | # CONFIG_USB_STORAGE_SDDR55 is not set | 1880 | # CONFIG_USB_STORAGE_SDDR55 is not set |
@@ -1697,7 +1882,6 @@ CONFIG_USB_STORAGE=y | |||
1697 | # CONFIG_USB_STORAGE_ALAUDA is not set | 1882 | # CONFIG_USB_STORAGE_ALAUDA is not set |
1698 | # CONFIG_USB_STORAGE_ONETOUCH is not set | 1883 | # CONFIG_USB_STORAGE_ONETOUCH is not set |
1699 | # CONFIG_USB_STORAGE_KARMA is not set | 1884 | # CONFIG_USB_STORAGE_KARMA is not set |
1700 | # CONFIG_USB_STORAGE_SIERRA is not set | ||
1701 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | 1885 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set |
1702 | CONFIG_USB_LIBUSUAL=y | 1886 | CONFIG_USB_LIBUSUAL=y |
1703 | 1887 | ||
@@ -1718,6 +1902,7 @@ CONFIG_USB_LIBUSUAL=y | |||
1718 | # CONFIG_USB_EMI62 is not set | 1902 | # CONFIG_USB_EMI62 is not set |
1719 | # CONFIG_USB_EMI26 is not set | 1903 | # CONFIG_USB_EMI26 is not set |
1720 | # CONFIG_USB_ADUTUX is not set | 1904 | # CONFIG_USB_ADUTUX is not set |
1905 | # CONFIG_USB_SEVSEG is not set | ||
1721 | # CONFIG_USB_RIO500 is not set | 1906 | # CONFIG_USB_RIO500 is not set |
1722 | # CONFIG_USB_LEGOTOWER is not set | 1907 | # CONFIG_USB_LEGOTOWER is not set |
1723 | # CONFIG_USB_LCD is not set | 1908 | # CONFIG_USB_LCD is not set |
@@ -1735,7 +1920,13 @@ CONFIG_USB_LIBUSUAL=y | |||
1735 | # CONFIG_USB_IOWARRIOR is not set | 1920 | # CONFIG_USB_IOWARRIOR is not set |
1736 | # CONFIG_USB_TEST is not set | 1921 | # CONFIG_USB_TEST is not set |
1737 | # CONFIG_USB_ISIGHTFW is not set | 1922 | # CONFIG_USB_ISIGHTFW is not set |
1923 | # CONFIG_USB_VST is not set | ||
1738 | # CONFIG_USB_GADGET is not set | 1924 | # CONFIG_USB_GADGET is not set |
1925 | |||
1926 | # | ||
1927 | # OTG and related infrastructure | ||
1928 | # | ||
1929 | # CONFIG_UWB is not set | ||
1739 | # CONFIG_MMC is not set | 1930 | # CONFIG_MMC is not set |
1740 | # CONFIG_MEMSTICK is not set | 1931 | # CONFIG_MEMSTICK is not set |
1741 | CONFIG_NEW_LEDS=y | 1932 | CONFIG_NEW_LEDS=y |
@@ -1744,6 +1935,7 @@ CONFIG_LEDS_CLASS=y | |||
1744 | # | 1935 | # |
1745 | # LED drivers | 1936 | # LED drivers |
1746 | # | 1937 | # |
1938 | # CONFIG_LEDS_ALIX2 is not set | ||
1747 | # CONFIG_LEDS_PCA9532 is not set | 1939 | # CONFIG_LEDS_PCA9532 is not set |
1748 | # CONFIG_LEDS_CLEVO_MAIL is not set | 1940 | # CONFIG_LEDS_CLEVO_MAIL is not set |
1749 | # CONFIG_LEDS_PCA955X is not set | 1941 | # CONFIG_LEDS_PCA955X is not set |
@@ -1754,6 +1946,7 @@ CONFIG_LEDS_CLASS=y | |||
1754 | CONFIG_LEDS_TRIGGERS=y | 1946 | CONFIG_LEDS_TRIGGERS=y |
1755 | # CONFIG_LEDS_TRIGGER_TIMER is not set | 1947 | # CONFIG_LEDS_TRIGGER_TIMER is not set |
1756 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set | 1948 | # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set |
1949 | # CONFIG_LEDS_TRIGGER_BACKLIGHT is not set | ||
1757 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set | 1950 | # CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set |
1758 | # CONFIG_ACCESSIBILITY is not set | 1951 | # CONFIG_ACCESSIBILITY is not set |
1759 | # CONFIG_INFINIBAND is not set | 1952 | # CONFIG_INFINIBAND is not set |
@@ -1793,6 +1986,7 @@ CONFIG_RTC_INTF_DEV=y | |||
1793 | # CONFIG_RTC_DRV_M41T80 is not set | 1986 | # CONFIG_RTC_DRV_M41T80 is not set |
1794 | # CONFIG_RTC_DRV_S35390A is not set | 1987 | # CONFIG_RTC_DRV_S35390A is not set |
1795 | # CONFIG_RTC_DRV_FM3130 is not set | 1988 | # CONFIG_RTC_DRV_FM3130 is not set |
1989 | # CONFIG_RTC_DRV_RX8581 is not set | ||
1796 | 1990 | ||
1797 | # | 1991 | # |
1798 | # SPI RTC drivers | 1992 | # SPI RTC drivers |
@@ -1802,12 +1996,15 @@ CONFIG_RTC_INTF_DEV=y | |||
1802 | # Platform RTC drivers | 1996 | # Platform RTC drivers |
1803 | # | 1997 | # |
1804 | CONFIG_RTC_DRV_CMOS=y | 1998 | CONFIG_RTC_DRV_CMOS=y |
1999 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1805 | # CONFIG_RTC_DRV_DS1511 is not set | 2000 | # CONFIG_RTC_DRV_DS1511 is not set |
1806 | # CONFIG_RTC_DRV_DS1553 is not set | 2001 | # CONFIG_RTC_DRV_DS1553 is not set |
1807 | # CONFIG_RTC_DRV_DS1742 is not set | 2002 | # CONFIG_RTC_DRV_DS1742 is not set |
1808 | # CONFIG_RTC_DRV_STK17TA8 is not set | 2003 | # CONFIG_RTC_DRV_STK17TA8 is not set |
1809 | # CONFIG_RTC_DRV_M48T86 is not set | 2004 | # CONFIG_RTC_DRV_M48T86 is not set |
2005 | # CONFIG_RTC_DRV_M48T35 is not set | ||
1810 | # CONFIG_RTC_DRV_M48T59 is not set | 2006 | # CONFIG_RTC_DRV_M48T59 is not set |
2007 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
1811 | # CONFIG_RTC_DRV_V3020 is not set | 2008 | # CONFIG_RTC_DRV_V3020 is not set |
1812 | 2009 | ||
1813 | # | 2010 | # |
@@ -1820,6 +2017,21 @@ CONFIG_DMADEVICES=y | |||
1820 | # | 2017 | # |
1821 | # CONFIG_INTEL_IOATDMA is not set | 2018 | # CONFIG_INTEL_IOATDMA is not set |
1822 | # CONFIG_UIO is not set | 2019 | # CONFIG_UIO is not set |
2020 | # CONFIG_STAGING is not set | ||
2021 | CONFIG_X86_PLATFORM_DEVICES=y | ||
2022 | # CONFIG_ACER_WMI is not set | ||
2023 | # CONFIG_ASUS_LAPTOP is not set | ||
2024 | # CONFIG_FUJITSU_LAPTOP is not set | ||
2025 | # CONFIG_MSI_LAPTOP is not set | ||
2026 | # CONFIG_PANASONIC_LAPTOP is not set | ||
2027 | # CONFIG_COMPAL_LAPTOP is not set | ||
2028 | # CONFIG_SONY_LAPTOP is not set | ||
2029 | # CONFIG_THINKPAD_ACPI is not set | ||
2030 | # CONFIG_INTEL_MENLOW is not set | ||
2031 | CONFIG_EEEPC_LAPTOP=y | ||
2032 | # CONFIG_ACPI_WMI is not set | ||
2033 | # CONFIG_ACPI_ASUS is not set | ||
2034 | # CONFIG_ACPI_TOSHIBA is not set | ||
1823 | 2035 | ||
1824 | # | 2036 | # |
1825 | # Firmware Drivers | 2037 | # Firmware Drivers |
@@ -1830,8 +2042,7 @@ CONFIG_EFI_VARS=y | |||
1830 | # CONFIG_DELL_RBU is not set | 2042 | # CONFIG_DELL_RBU is not set |
1831 | # CONFIG_DCDBAS is not set | 2043 | # CONFIG_DCDBAS is not set |
1832 | CONFIG_DMIID=y | 2044 | CONFIG_DMIID=y |
1833 | CONFIG_ISCSI_IBFT_FIND=y | 2045 | # CONFIG_ISCSI_IBFT_FIND is not set |
1834 | CONFIG_ISCSI_IBFT=y | ||
1835 | 2046 | ||
1836 | # | 2047 | # |
1837 | # File systems | 2048 | # File systems |
@@ -1841,22 +2052,25 @@ CONFIG_EXT3_FS=y | |||
1841 | CONFIG_EXT3_FS_XATTR=y | 2052 | CONFIG_EXT3_FS_XATTR=y |
1842 | CONFIG_EXT3_FS_POSIX_ACL=y | 2053 | CONFIG_EXT3_FS_POSIX_ACL=y |
1843 | CONFIG_EXT3_FS_SECURITY=y | 2054 | CONFIG_EXT3_FS_SECURITY=y |
1844 | # CONFIG_EXT4DEV_FS is not set | 2055 | # CONFIG_EXT4_FS is not set |
1845 | CONFIG_JBD=y | 2056 | CONFIG_JBD=y |
1846 | # CONFIG_JBD_DEBUG is not set | 2057 | # CONFIG_JBD_DEBUG is not set |
1847 | CONFIG_FS_MBCACHE=y | 2058 | CONFIG_FS_MBCACHE=y |
1848 | # CONFIG_REISERFS_FS is not set | 2059 | # CONFIG_REISERFS_FS is not set |
1849 | # CONFIG_JFS_FS is not set | 2060 | # CONFIG_JFS_FS is not set |
1850 | CONFIG_FS_POSIX_ACL=y | 2061 | CONFIG_FS_POSIX_ACL=y |
2062 | CONFIG_FILE_LOCKING=y | ||
1851 | # CONFIG_XFS_FS is not set | 2063 | # CONFIG_XFS_FS is not set |
1852 | # CONFIG_GFS2_FS is not set | 2064 | # CONFIG_GFS2_FS is not set |
1853 | # CONFIG_OCFS2_FS is not set | 2065 | # CONFIG_OCFS2_FS is not set |
2066 | # CONFIG_BTRFS_FS is not set | ||
1854 | CONFIG_DNOTIFY=y | 2067 | CONFIG_DNOTIFY=y |
1855 | CONFIG_INOTIFY=y | 2068 | CONFIG_INOTIFY=y |
1856 | CONFIG_INOTIFY_USER=y | 2069 | CONFIG_INOTIFY_USER=y |
1857 | CONFIG_QUOTA=y | 2070 | CONFIG_QUOTA=y |
1858 | CONFIG_QUOTA_NETLINK_INTERFACE=y | 2071 | CONFIG_QUOTA_NETLINK_INTERFACE=y |
1859 | # CONFIG_PRINT_QUOTA_WARNING is not set | 2072 | # CONFIG_PRINT_QUOTA_WARNING is not set |
2073 | CONFIG_QUOTA_TREE=y | ||
1860 | # CONFIG_QFMT_V1 is not set | 2074 | # CONFIG_QFMT_V1 is not set |
1861 | CONFIG_QFMT_V2=y | 2075 | CONFIG_QFMT_V2=y |
1862 | CONFIG_QUOTACTL=y | 2076 | CONFIG_QUOTACTL=y |
@@ -1890,16 +2104,14 @@ CONFIG_PROC_FS=y | |||
1890 | CONFIG_PROC_KCORE=y | 2104 | CONFIG_PROC_KCORE=y |
1891 | CONFIG_PROC_VMCORE=y | 2105 | CONFIG_PROC_VMCORE=y |
1892 | CONFIG_PROC_SYSCTL=y | 2106 | CONFIG_PROC_SYSCTL=y |
2107 | CONFIG_PROC_PAGE_MONITOR=y | ||
1893 | CONFIG_SYSFS=y | 2108 | CONFIG_SYSFS=y |
1894 | CONFIG_TMPFS=y | 2109 | CONFIG_TMPFS=y |
1895 | CONFIG_TMPFS_POSIX_ACL=y | 2110 | CONFIG_TMPFS_POSIX_ACL=y |
1896 | CONFIG_HUGETLBFS=y | 2111 | CONFIG_HUGETLBFS=y |
1897 | CONFIG_HUGETLB_PAGE=y | 2112 | CONFIG_HUGETLB_PAGE=y |
1898 | # CONFIG_CONFIGFS_FS is not set | 2113 | # CONFIG_CONFIGFS_FS is not set |
1899 | 2114 | CONFIG_MISC_FILESYSTEMS=y | |
1900 | # | ||
1901 | # Miscellaneous filesystems | ||
1902 | # | ||
1903 | # CONFIG_ADFS_FS is not set | 2115 | # CONFIG_ADFS_FS is not set |
1904 | # CONFIG_AFFS_FS is not set | 2116 | # CONFIG_AFFS_FS is not set |
1905 | # CONFIG_ECRYPT_FS is not set | 2117 | # CONFIG_ECRYPT_FS is not set |
@@ -1909,6 +2121,7 @@ CONFIG_HUGETLB_PAGE=y | |||
1909 | # CONFIG_BFS_FS is not set | 2121 | # CONFIG_BFS_FS is not set |
1910 | # CONFIG_EFS_FS is not set | 2122 | # CONFIG_EFS_FS is not set |
1911 | # CONFIG_CRAMFS is not set | 2123 | # CONFIG_CRAMFS is not set |
2124 | # CONFIG_SQUASHFS is not set | ||
1912 | # CONFIG_VXFS_FS is not set | 2125 | # CONFIG_VXFS_FS is not set |
1913 | # CONFIG_MINIX_FS is not set | 2126 | # CONFIG_MINIX_FS is not set |
1914 | # CONFIG_OMFS_FS is not set | 2127 | # CONFIG_OMFS_FS is not set |
@@ -1930,6 +2143,7 @@ CONFIG_NFS_ACL_SUPPORT=y | |||
1930 | CONFIG_NFS_COMMON=y | 2143 | CONFIG_NFS_COMMON=y |
1931 | CONFIG_SUNRPC=y | 2144 | CONFIG_SUNRPC=y |
1932 | CONFIG_SUNRPC_GSS=y | 2145 | CONFIG_SUNRPC_GSS=y |
2146 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
1933 | CONFIG_RPCSEC_GSS_KRB5=y | 2147 | CONFIG_RPCSEC_GSS_KRB5=y |
1934 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 2148 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1935 | # CONFIG_SMB_FS is not set | 2149 | # CONFIG_SMB_FS is not set |
@@ -2006,7 +2220,7 @@ CONFIG_NLS_UTF8=y | |||
2006 | # | 2220 | # |
2007 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 2221 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
2008 | CONFIG_PRINTK_TIME=y | 2222 | CONFIG_PRINTK_TIME=y |
2009 | CONFIG_ENABLE_WARN_DEPRECATED=y | 2223 | # CONFIG_ENABLE_WARN_DEPRECATED is not set |
2010 | CONFIG_ENABLE_MUST_CHECK=y | 2224 | CONFIG_ENABLE_MUST_CHECK=y |
2011 | CONFIG_FRAME_WARN=2048 | 2225 | CONFIG_FRAME_WARN=2048 |
2012 | CONFIG_MAGIC_SYSRQ=y | 2226 | CONFIG_MAGIC_SYSRQ=y |
@@ -2035,40 +2249,60 @@ CONFIG_TIMER_STATS=y | |||
2035 | CONFIG_DEBUG_BUGVERBOSE=y | 2249 | CONFIG_DEBUG_BUGVERBOSE=y |
2036 | # CONFIG_DEBUG_INFO is not set | 2250 | # CONFIG_DEBUG_INFO is not set |
2037 | # CONFIG_DEBUG_VM is not set | 2251 | # CONFIG_DEBUG_VM is not set |
2252 | # CONFIG_DEBUG_VIRTUAL is not set | ||
2038 | # CONFIG_DEBUG_WRITECOUNT is not set | 2253 | # CONFIG_DEBUG_WRITECOUNT is not set |
2039 | CONFIG_DEBUG_MEMORY_INIT=y | 2254 | CONFIG_DEBUG_MEMORY_INIT=y |
2040 | # CONFIG_DEBUG_LIST is not set | 2255 | # CONFIG_DEBUG_LIST is not set |
2041 | # CONFIG_DEBUG_SG is not set | 2256 | # CONFIG_DEBUG_SG is not set |
2257 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
2258 | CONFIG_ARCH_WANT_FRAME_POINTERS=y | ||
2042 | CONFIG_FRAME_POINTER=y | 2259 | CONFIG_FRAME_POINTER=y |
2043 | # CONFIG_BOOT_PRINTK_DELAY is not set | 2260 | # CONFIG_BOOT_PRINTK_DELAY is not set |
2044 | # CONFIG_RCU_TORTURE_TEST is not set | 2261 | # CONFIG_RCU_TORTURE_TEST is not set |
2262 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
2045 | # CONFIG_KPROBES_SANITY_TEST is not set | 2263 | # CONFIG_KPROBES_SANITY_TEST is not set |
2046 | # CONFIG_BACKTRACE_SELF_TEST is not set | 2264 | # CONFIG_BACKTRACE_SELF_TEST is not set |
2265 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
2047 | # CONFIG_LKDTM is not set | 2266 | # CONFIG_LKDTM is not set |
2048 | # CONFIG_FAULT_INJECTION is not set | 2267 | # CONFIG_FAULT_INJECTION is not set |
2049 | # CONFIG_LATENCYTOP is not set | 2268 | # CONFIG_LATENCYTOP is not set |
2050 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 2269 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
2051 | CONFIG_HAVE_FTRACE=y | 2270 | CONFIG_USER_STACKTRACE_SUPPORT=y |
2271 | CONFIG_HAVE_FUNCTION_TRACER=y | ||
2272 | CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y | ||
2273 | CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y | ||
2052 | CONFIG_HAVE_DYNAMIC_FTRACE=y | 2274 | CONFIG_HAVE_DYNAMIC_FTRACE=y |
2053 | # CONFIG_FTRACE is not set | 2275 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y |
2276 | CONFIG_HAVE_HW_BRANCH_TRACER=y | ||
2277 | |||
2278 | # | ||
2279 | # Tracers | ||
2280 | # | ||
2281 | # CONFIG_FUNCTION_TRACER is not set | ||
2054 | # CONFIG_IRQSOFF_TRACER is not set | 2282 | # CONFIG_IRQSOFF_TRACER is not set |
2055 | # CONFIG_SYSPROF_TRACER is not set | 2283 | # CONFIG_SYSPROF_TRACER is not set |
2056 | # CONFIG_SCHED_TRACER is not set | 2284 | # CONFIG_SCHED_TRACER is not set |
2057 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 2285 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
2286 | # CONFIG_BOOT_TRACER is not set | ||
2287 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
2288 | # CONFIG_POWER_TRACER is not set | ||
2289 | # CONFIG_STACK_TRACER is not set | ||
2290 | # CONFIG_HW_BRANCH_TRACER is not set | ||
2058 | CONFIG_PROVIDE_OHCI1394_DMA_INIT=y | 2291 | CONFIG_PROVIDE_OHCI1394_DMA_INIT=y |
2292 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
2059 | # CONFIG_SAMPLES is not set | 2293 | # CONFIG_SAMPLES is not set |
2060 | CONFIG_HAVE_ARCH_KGDB=y | 2294 | CONFIG_HAVE_ARCH_KGDB=y |
2061 | # CONFIG_KGDB is not set | 2295 | # CONFIG_KGDB is not set |
2062 | # CONFIG_STRICT_DEVMEM is not set | 2296 | # CONFIG_STRICT_DEVMEM is not set |
2063 | CONFIG_X86_VERBOSE_BOOTUP=y | 2297 | CONFIG_X86_VERBOSE_BOOTUP=y |
2064 | CONFIG_EARLY_PRINTK=y | 2298 | CONFIG_EARLY_PRINTK=y |
2299 | CONFIG_EARLY_PRINTK_DBGP=y | ||
2065 | CONFIG_DEBUG_STACKOVERFLOW=y | 2300 | CONFIG_DEBUG_STACKOVERFLOW=y |
2066 | CONFIG_DEBUG_STACK_USAGE=y | 2301 | CONFIG_DEBUG_STACK_USAGE=y |
2067 | # CONFIG_DEBUG_PAGEALLOC is not set | 2302 | # CONFIG_DEBUG_PAGEALLOC is not set |
2068 | # CONFIG_DEBUG_PER_CPU_MAPS is not set | 2303 | # CONFIG_DEBUG_PER_CPU_MAPS is not set |
2069 | # CONFIG_X86_PTDUMP is not set | 2304 | # CONFIG_X86_PTDUMP is not set |
2070 | CONFIG_DEBUG_RODATA=y | 2305 | CONFIG_DEBUG_RODATA=y |
2071 | # CONFIG_DIRECT_GBPAGES is not set | ||
2072 | # CONFIG_DEBUG_RODATA_TEST is not set | 2306 | # CONFIG_DEBUG_RODATA_TEST is not set |
2073 | CONFIG_DEBUG_NX_TEST=m | 2307 | CONFIG_DEBUG_NX_TEST=m |
2074 | # CONFIG_IOMMU_DEBUG is not set | 2308 | # CONFIG_IOMMU_DEBUG is not set |
@@ -2092,8 +2326,10 @@ CONFIG_OPTIMIZE_INLINING=y | |||
2092 | CONFIG_KEYS=y | 2326 | CONFIG_KEYS=y |
2093 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | 2327 | CONFIG_KEYS_DEBUG_PROC_KEYS=y |
2094 | CONFIG_SECURITY=y | 2328 | CONFIG_SECURITY=y |
2329 | # CONFIG_SECURITYFS is not set | ||
2095 | CONFIG_SECURITY_NETWORK=y | 2330 | CONFIG_SECURITY_NETWORK=y |
2096 | # CONFIG_SECURITY_NETWORK_XFRM is not set | 2331 | # CONFIG_SECURITY_NETWORK_XFRM is not set |
2332 | # CONFIG_SECURITY_PATH is not set | ||
2097 | CONFIG_SECURITY_FILE_CAPABILITIES=y | 2333 | CONFIG_SECURITY_FILE_CAPABILITIES=y |
2098 | # CONFIG_SECURITY_ROOTPLUG is not set | 2334 | # CONFIG_SECURITY_ROOTPLUG is not set |
2099 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 | 2335 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 |
@@ -2104,7 +2340,6 @@ CONFIG_SECURITY_SELINUX_DISABLE=y | |||
2104 | CONFIG_SECURITY_SELINUX_DEVELOP=y | 2340 | CONFIG_SECURITY_SELINUX_DEVELOP=y |
2105 | CONFIG_SECURITY_SELINUX_AVC_STATS=y | 2341 | CONFIG_SECURITY_SELINUX_AVC_STATS=y |
2106 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 | 2342 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 |
2107 | # CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT is not set | ||
2108 | # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set | 2343 | # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set |
2109 | # CONFIG_SECURITY_SMACK is not set | 2344 | # CONFIG_SECURITY_SMACK is not set |
2110 | CONFIG_CRYPTO=y | 2345 | CONFIG_CRYPTO=y |
@@ -2112,11 +2347,18 @@ CONFIG_CRYPTO=y | |||
2112 | # | 2347 | # |
2113 | # Crypto core or helper | 2348 | # Crypto core or helper |
2114 | # | 2349 | # |
2350 | # CONFIG_CRYPTO_FIPS is not set | ||
2115 | CONFIG_CRYPTO_ALGAPI=y | 2351 | CONFIG_CRYPTO_ALGAPI=y |
2352 | CONFIG_CRYPTO_ALGAPI2=y | ||
2116 | CONFIG_CRYPTO_AEAD=y | 2353 | CONFIG_CRYPTO_AEAD=y |
2354 | CONFIG_CRYPTO_AEAD2=y | ||
2117 | CONFIG_CRYPTO_BLKCIPHER=y | 2355 | CONFIG_CRYPTO_BLKCIPHER=y |
2356 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
2118 | CONFIG_CRYPTO_HASH=y | 2357 | CONFIG_CRYPTO_HASH=y |
2358 | CONFIG_CRYPTO_HASH2=y | ||
2359 | CONFIG_CRYPTO_RNG2=y | ||
2119 | CONFIG_CRYPTO_MANAGER=y | 2360 | CONFIG_CRYPTO_MANAGER=y |
2361 | CONFIG_CRYPTO_MANAGER2=y | ||
2120 | # CONFIG_CRYPTO_GF128MUL is not set | 2362 | # CONFIG_CRYPTO_GF128MUL is not set |
2121 | # CONFIG_CRYPTO_NULL is not set | 2363 | # CONFIG_CRYPTO_NULL is not set |
2122 | # CONFIG_CRYPTO_CRYPTD is not set | 2364 | # CONFIG_CRYPTO_CRYPTD is not set |
@@ -2151,6 +2393,7 @@ CONFIG_CRYPTO_HMAC=y | |||
2151 | # Digest | 2393 | # Digest |
2152 | # | 2394 | # |
2153 | # CONFIG_CRYPTO_CRC32C is not set | 2395 | # CONFIG_CRYPTO_CRC32C is not set |
2396 | # CONFIG_CRYPTO_CRC32C_INTEL is not set | ||
2154 | # CONFIG_CRYPTO_MD4 is not set | 2397 | # CONFIG_CRYPTO_MD4 is not set |
2155 | CONFIG_CRYPTO_MD5=y | 2398 | CONFIG_CRYPTO_MD5=y |
2156 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 2399 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
@@ -2191,6 +2434,11 @@ CONFIG_CRYPTO_DES=y | |||
2191 | # | 2434 | # |
2192 | # CONFIG_CRYPTO_DEFLATE is not set | 2435 | # CONFIG_CRYPTO_DEFLATE is not set |
2193 | # CONFIG_CRYPTO_LZO is not set | 2436 | # CONFIG_CRYPTO_LZO is not set |
2437 | |||
2438 | # | ||
2439 | # Random Number Generation | ||
2440 | # | ||
2441 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
2194 | CONFIG_CRYPTO_HW=y | 2442 | CONFIG_CRYPTO_HW=y |
2195 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | 2443 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set |
2196 | CONFIG_HAVE_KVM=y | 2444 | CONFIG_HAVE_KVM=y |
@@ -2205,6 +2453,7 @@ CONFIG_VIRTUALIZATION=y | |||
2205 | CONFIG_BITREVERSE=y | 2453 | CONFIG_BITREVERSE=y |
2206 | CONFIG_GENERIC_FIND_FIRST_BIT=y | 2454 | CONFIG_GENERIC_FIND_FIRST_BIT=y |
2207 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 2455 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
2456 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
2208 | # CONFIG_CRC_CCITT is not set | 2457 | # CONFIG_CRC_CCITT is not set |
2209 | # CONFIG_CRC16 is not set | 2458 | # CONFIG_CRC16 is not set |
2210 | CONFIG_CRC_T10DIF=y | 2459 | CONFIG_CRC_T10DIF=y |
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index dd77ac0cac46..588a7aa937e1 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -33,8 +33,6 @@ | |||
33 | #include <asm/sigframe.h> | 33 | #include <asm/sigframe.h> |
34 | #include <asm/sys_ia32.h> | 34 | #include <asm/sys_ia32.h> |
35 | 35 | ||
36 | #define DEBUG_SIG 0 | ||
37 | |||
38 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 36 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
39 | 37 | ||
40 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \ | 38 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \ |
@@ -190,42 +188,47 @@ asmlinkage long sys32_sigaltstack(const stack_ia32_t __user *uss_ptr, | |||
190 | /* | 188 | /* |
191 | * Do a signal return; undo the signal stack. | 189 | * Do a signal return; undo the signal stack. |
192 | */ | 190 | */ |
191 | #define loadsegment_gs(v) load_gs_index(v) | ||
192 | #define loadsegment_fs(v) loadsegment(fs, v) | ||
193 | #define loadsegment_ds(v) loadsegment(ds, v) | ||
194 | #define loadsegment_es(v) loadsegment(es, v) | ||
195 | |||
196 | #define get_user_seg(seg) ({ unsigned int v; savesegment(seg, v); v; }) | ||
197 | #define set_user_seg(seg, v) loadsegment_##seg(v) | ||
198 | |||
193 | #define COPY(x) { \ | 199 | #define COPY(x) { \ |
194 | get_user_ex(regs->x, &sc->x); \ | 200 | get_user_ex(regs->x, &sc->x); \ |
195 | } | 201 | } |
196 | 202 | ||
197 | #define COPY_SEG_CPL3(seg) { \ | 203 | #define GET_SEG(seg) ({ \ |
198 | unsigned short tmp; \ | 204 | unsigned short tmp; \ |
199 | get_user_ex(tmp, &sc->seg); \ | 205 | get_user_ex(tmp, &sc->seg); \ |
200 | regs->seg = tmp | 3; \ | 206 | tmp; \ |
201 | } | 207 | }) |
208 | |||
209 | #define COPY_SEG_CPL3(seg) do { \ | ||
210 | regs->seg = GET_SEG(seg) | 3; \ | ||
211 | } while (0) | ||
202 | 212 | ||
203 | #define RELOAD_SEG(seg) { \ | 213 | #define RELOAD_SEG(seg) { \ |
204 | unsigned int cur, pre; \ | 214 | unsigned int pre = GET_SEG(seg); \ |
205 | get_user_ex(pre, &sc->seg); \ | 215 | unsigned int cur = get_user_seg(seg); \ |
206 | savesegment(seg, cur); \ | ||
207 | pre |= 3; \ | 216 | pre |= 3; \ |
208 | if (pre != cur) \ | 217 | if (pre != cur) \ |
209 | loadsegment(seg, pre); \ | 218 | set_user_seg(seg, pre); \ |
210 | } | 219 | } |
211 | 220 | ||
212 | static int ia32_restore_sigcontext(struct pt_regs *regs, | 221 | static int ia32_restore_sigcontext(struct pt_regs *regs, |
213 | struct sigcontext_ia32 __user *sc, | 222 | struct sigcontext_ia32 __user *sc, |
214 | unsigned int *pax) | 223 | unsigned int *pax) |
215 | { | 224 | { |
216 | unsigned int tmpflags, gs, oldgs, err = 0; | 225 | unsigned int tmpflags, err = 0; |
217 | void __user *buf; | 226 | void __user *buf; |
218 | u32 tmp; | 227 | u32 tmp; |
219 | 228 | ||
220 | /* Always make any pending restarted system calls return -EINTR */ | 229 | /* Always make any pending restarted system calls return -EINTR */ |
221 | current_thread_info()->restart_block.fn = do_no_restart_syscall; | 230 | current_thread_info()->restart_block.fn = do_no_restart_syscall; |
222 | 231 | ||
223 | #if DEBUG_SIG | ||
224 | printk(KERN_DEBUG "SIG restore_sigcontext: " | ||
225 | "sc=%p err(%x) eip(%x) cs(%x) flg(%x)\n", | ||
226 | sc, sc->err, sc->ip, sc->cs, sc->flags); | ||
227 | #endif | ||
228 | |||
229 | get_user_try { | 232 | get_user_try { |
230 | /* | 233 | /* |
231 | * Reload fs and gs if they have changed in the signal | 234 | * Reload fs and gs if they have changed in the signal |
@@ -233,12 +236,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, | |||
233 | * the handler, but does not clobber them at least in the | 236 | * the handler, but does not clobber them at least in the |
234 | * normal case. | 237 | * normal case. |
235 | */ | 238 | */ |
236 | get_user_ex(gs, &sc->gs); | 239 | RELOAD_SEG(gs); |
237 | gs |= 3; | ||
238 | savesegment(gs, oldgs); | ||
239 | if (gs != oldgs) | ||
240 | load_gs_index(gs); | ||
241 | |||
242 | RELOAD_SEG(fs); | 240 | RELOAD_SEG(fs); |
243 | RELOAD_SEG(ds); | 241 | RELOAD_SEG(ds); |
244 | RELOAD_SEG(es); | 242 | RELOAD_SEG(es); |
@@ -337,17 +335,13 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc, | |||
337 | void __user *fpstate, | 335 | void __user *fpstate, |
338 | struct pt_regs *regs, unsigned int mask) | 336 | struct pt_regs *regs, unsigned int mask) |
339 | { | 337 | { |
340 | int tmp, err = 0; | 338 | int err = 0; |
341 | 339 | ||
342 | put_user_try { | 340 | put_user_try { |
343 | savesegment(gs, tmp); | 341 | put_user_ex(get_user_seg(gs), (unsigned int __user *)&sc->gs); |
344 | put_user_ex(tmp, (unsigned int __user *)&sc->gs); | 342 | put_user_ex(get_user_seg(fs), (unsigned int __user *)&sc->fs); |
345 | savesegment(fs, tmp); | 343 | put_user_ex(get_user_seg(ds), (unsigned int __user *)&sc->ds); |
346 | put_user_ex(tmp, (unsigned int __user *)&sc->fs); | 344 | put_user_ex(get_user_seg(es), (unsigned int __user *)&sc->es); |
347 | savesegment(ds, tmp); | ||
348 | put_user_ex(tmp, (unsigned int __user *)&sc->ds); | ||
349 | savesegment(es, tmp); | ||
350 | put_user_ex(tmp, (unsigned int __user *)&sc->es); | ||
351 | 345 | ||
352 | put_user_ex(regs->di, &sc->di); | 346 | put_user_ex(regs->di, &sc->di); |
353 | put_user_ex(regs->si, &sc->si); | 347 | put_user_ex(regs->si, &sc->si); |
@@ -488,11 +482,6 @@ int ia32_setup_frame(int sig, struct k_sigaction *ka, | |||
488 | regs->cs = __USER32_CS; | 482 | regs->cs = __USER32_CS; |
489 | regs->ss = __USER32_DS; | 483 | regs->ss = __USER32_DS; |
490 | 484 | ||
491 | #if DEBUG_SIG | ||
492 | printk(KERN_DEBUG "SIG deliver (%s:%d): sp=%p pc=%lx ra=%u\n", | ||
493 | current->comm, current->pid, frame, regs->ip, frame->pretcode); | ||
494 | #endif | ||
495 | |||
496 | return 0; | 485 | return 0; |
497 | } | 486 | } |
498 | 487 | ||
@@ -574,10 +563,5 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
574 | regs->cs = __USER32_CS; | 563 | regs->cs = __USER32_CS; |
575 | regs->ss = __USER32_DS; | 564 | regs->ss = __USER32_DS; |
576 | 565 | ||
577 | #if DEBUG_SIG | ||
578 | printk(KERN_DEBUG "SIG deliver (%s:%d): sp=%p pc=%lx ra=%u\n", | ||
579 | current->comm, current->pid, frame, regs->ip, frame->pretcode); | ||
580 | #endif | ||
581 | |||
582 | return 0; | 566 | return 0; |
583 | } | 567 | } |
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 9830681446ad..4518dc500903 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h | |||
@@ -102,9 +102,6 @@ static inline void disable_acpi(void) | |||
102 | acpi_noirq = 1; | 102 | acpi_noirq = 1; |
103 | } | 103 | } |
104 | 104 | ||
105 | /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */ | ||
106 | #define FIX_ACPI_PAGES 4 | ||
107 | |||
108 | extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); | 105 | extern int acpi_gsi_to_irq(u32 gsi, unsigned int *irq); |
109 | 106 | ||
110 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } | 107 | static inline void acpi_noirq_set(void) { acpi_noirq = 1; } |
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index ab1d51a8855e..a6208dc74633 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -1,15 +1,18 @@ | |||
1 | #ifndef _ASM_X86_APIC_H | 1 | #ifndef _ASM_X86_APIC_H |
2 | #define _ASM_X86_APIC_H | 2 | #define _ASM_X86_APIC_H |
3 | 3 | ||
4 | #include <linux/pm.h> | 4 | #include <linux/cpumask.h> |
5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
6 | #include <linux/pm.h> | ||
6 | 7 | ||
7 | #include <asm/alternative.h> | 8 | #include <asm/alternative.h> |
8 | #include <asm/fixmap.h> | 9 | #include <asm/cpufeature.h> |
9 | #include <asm/apicdef.h> | ||
10 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
11 | #include <asm/apicdef.h> | ||
12 | #include <asm/atomic.h> | ||
13 | #include <asm/fixmap.h> | ||
14 | #include <asm/mpspec.h> | ||
11 | #include <asm/system.h> | 15 | #include <asm/system.h> |
12 | #include <asm/cpufeature.h> | ||
13 | #include <asm/msr.h> | 16 | #include <asm/msr.h> |
14 | 17 | ||
15 | #define ARCH_APICTIMER_STOPS_ON_C3 1 | 18 | #define ARCH_APICTIMER_STOPS_ON_C3 1 |
@@ -33,7 +36,13 @@ | |||
33 | } while (0) | 36 | } while (0) |
34 | 37 | ||
35 | 38 | ||
39 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) | ||
36 | extern void generic_apic_probe(void); | 40 | extern void generic_apic_probe(void); |
41 | #else | ||
42 | static inline void generic_apic_probe(void) | ||
43 | { | ||
44 | } | ||
45 | #endif | ||
37 | 46 | ||
38 | #ifdef CONFIG_X86_LOCAL_APIC | 47 | #ifdef CONFIG_X86_LOCAL_APIC |
39 | 48 | ||
@@ -41,6 +50,21 @@ extern unsigned int apic_verbosity; | |||
41 | extern int local_apic_timer_c2_ok; | 50 | extern int local_apic_timer_c2_ok; |
42 | 51 | ||
43 | extern int disable_apic; | 52 | extern int disable_apic; |
53 | |||
54 | #ifdef CONFIG_SMP | ||
55 | extern void __inquire_remote_apic(int apicid); | ||
56 | #else /* CONFIG_SMP */ | ||
57 | static inline void __inquire_remote_apic(int apicid) | ||
58 | { | ||
59 | } | ||
60 | #endif /* CONFIG_SMP */ | ||
61 | |||
62 | static inline void default_inquire_remote_apic(int apicid) | ||
63 | { | ||
64 | if (apic_verbosity >= APIC_DEBUG) | ||
65 | __inquire_remote_apic(apicid); | ||
66 | } | ||
67 | |||
44 | /* | 68 | /* |
45 | * Basic functions accessing APICs. | 69 | * Basic functions accessing APICs. |
46 | */ | 70 | */ |
@@ -71,6 +95,12 @@ static inline u32 native_apic_mem_read(u32 reg) | |||
71 | return *((volatile u32 *)(APIC_BASE + reg)); | 95 | return *((volatile u32 *)(APIC_BASE + reg)); |
72 | } | 96 | } |
73 | 97 | ||
98 | extern void native_apic_wait_icr_idle(void); | ||
99 | extern u32 native_safe_apic_wait_icr_idle(void); | ||
100 | extern void native_apic_icr_write(u32 low, u32 id); | ||
101 | extern u64 native_apic_icr_read(void); | ||
102 | |||
103 | #ifdef CONFIG_X86_X2APIC | ||
74 | static inline void native_apic_msr_write(u32 reg, u32 v) | 104 | static inline void native_apic_msr_write(u32 reg, u32 v) |
75 | { | 105 | { |
76 | if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || | 106 | if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || |
@@ -91,8 +121,32 @@ static inline u32 native_apic_msr_read(u32 reg) | |||
91 | return low; | 121 | return low; |
92 | } | 122 | } |
93 | 123 | ||
94 | #ifndef CONFIG_X86_32 | 124 | static inline void native_x2apic_wait_icr_idle(void) |
95 | extern int x2apic; | 125 | { |
126 | /* no need to wait for icr idle in x2apic */ | ||
127 | return; | ||
128 | } | ||
129 | |||
130 | static inline u32 native_safe_x2apic_wait_icr_idle(void) | ||
131 | { | ||
132 | /* no need to wait for icr idle in x2apic */ | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | static inline void native_x2apic_icr_write(u32 low, u32 id) | ||
137 | { | ||
138 | wrmsrl(APIC_BASE_MSR + (APIC_ICR >> 4), ((__u64) id) << 32 | low); | ||
139 | } | ||
140 | |||
141 | static inline u64 native_x2apic_icr_read(void) | ||
142 | { | ||
143 | unsigned long val; | ||
144 | |||
145 | rdmsrl(APIC_BASE_MSR + (APIC_ICR >> 4), val); | ||
146 | return val; | ||
147 | } | ||
148 | |||
149 | extern int x2apic, x2apic_phys; | ||
96 | extern void check_x2apic(void); | 150 | extern void check_x2apic(void); |
97 | extern void enable_x2apic(void); | 151 | extern void enable_x2apic(void); |
98 | extern void enable_IR_x2apic(void); | 152 | extern void enable_IR_x2apic(void); |
@@ -110,30 +164,24 @@ static inline int x2apic_enabled(void) | |||
110 | return 0; | 164 | return 0; |
111 | } | 165 | } |
112 | #else | 166 | #else |
113 | #define x2apic_enabled() 0 | 167 | static inline void check_x2apic(void) |
168 | { | ||
169 | } | ||
170 | static inline void enable_x2apic(void) | ||
171 | { | ||
172 | } | ||
173 | static inline void enable_IR_x2apic(void) | ||
174 | { | ||
175 | } | ||
176 | static inline int x2apic_enabled(void) | ||
177 | { | ||
178 | return 0; | ||
179 | } | ||
114 | #endif | 180 | #endif |
115 | 181 | ||
116 | struct apic_ops { | ||
117 | u32 (*read)(u32 reg); | ||
118 | void (*write)(u32 reg, u32 v); | ||
119 | u64 (*icr_read)(void); | ||
120 | void (*icr_write)(u32 low, u32 high); | ||
121 | void (*wait_icr_idle)(void); | ||
122 | u32 (*safe_wait_icr_idle)(void); | ||
123 | }; | ||
124 | |||
125 | extern struct apic_ops *apic_ops; | ||
126 | |||
127 | #define apic_read (apic_ops->read) | ||
128 | #define apic_write (apic_ops->write) | ||
129 | #define apic_icr_read (apic_ops->icr_read) | ||
130 | #define apic_icr_write (apic_ops->icr_write) | ||
131 | #define apic_wait_icr_idle (apic_ops->wait_icr_idle) | ||
132 | #define safe_apic_wait_icr_idle (apic_ops->safe_wait_icr_idle) | ||
133 | |||
134 | extern int get_physical_broadcast(void); | 182 | extern int get_physical_broadcast(void); |
135 | 183 | ||
136 | #ifdef CONFIG_X86_64 | 184 | #ifdef CONFIG_X86_X2APIC |
137 | static inline void ack_x2APIC_irq(void) | 185 | static inline void ack_x2APIC_irq(void) |
138 | { | 186 | { |
139 | /* Docs say use 0 for future compatibility */ | 187 | /* Docs say use 0 for future compatibility */ |
@@ -141,18 +189,6 @@ static inline void ack_x2APIC_irq(void) | |||
141 | } | 189 | } |
142 | #endif | 190 | #endif |
143 | 191 | ||
144 | |||
145 | static inline void ack_APIC_irq(void) | ||
146 | { | ||
147 | /* | ||
148 | * ack_APIC_irq() actually gets compiled as a single instruction | ||
149 | * ... yummie. | ||
150 | */ | ||
151 | |||
152 | /* Docs say use 0 for future compatibility */ | ||
153 | apic_write(APIC_EOI, 0); | ||
154 | } | ||
155 | |||
156 | extern int lapic_get_maxlvt(void); | 192 | extern int lapic_get_maxlvt(void); |
157 | extern void clear_local_APIC(void); | 193 | extern void clear_local_APIC(void); |
158 | extern void connect_bsp_APIC(void); | 194 | extern void connect_bsp_APIC(void); |
@@ -196,4 +232,316 @@ static inline void disable_local_APIC(void) { } | |||
196 | 232 | ||
197 | #endif /* !CONFIG_X86_LOCAL_APIC */ | 233 | #endif /* !CONFIG_X86_LOCAL_APIC */ |
198 | 234 | ||
235 | #ifdef CONFIG_X86_64 | ||
236 | #define SET_APIC_ID(x) (apic->set_apic_id(x)) | ||
237 | #else | ||
238 | |||
239 | #endif | ||
240 | |||
241 | /* | ||
242 | * Copyright 2004 James Cleverdon, IBM. | ||
243 | * Subject to the GNU Public License, v.2 | ||
244 | * | ||
245 | * Generic APIC sub-arch data struct. | ||
246 | * | ||
247 | * Hacked for x86-64 by James Cleverdon from i386 architecture code by | ||
248 | * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and | ||
249 | * James Cleverdon. | ||
250 | */ | ||
251 | struct apic { | ||
252 | char *name; | ||
253 | |||
254 | int (*probe)(void); | ||
255 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); | ||
256 | int (*apic_id_registered)(void); | ||
257 | |||
258 | u32 irq_delivery_mode; | ||
259 | u32 irq_dest_mode; | ||
260 | |||
261 | const struct cpumask *(*target_cpus)(void); | ||
262 | |||
263 | int disable_esr; | ||
264 | |||
265 | int dest_logical; | ||
266 | unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); | ||
267 | unsigned long (*check_apicid_present)(int apicid); | ||
268 | |||
269 | void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); | ||
270 | void (*init_apic_ldr)(void); | ||
271 | |||
272 | physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map); | ||
273 | |||
274 | void (*setup_apic_routing)(void); | ||
275 | int (*multi_timer_check)(int apic, int irq); | ||
276 | int (*apicid_to_node)(int logical_apicid); | ||
277 | int (*cpu_to_logical_apicid)(int cpu); | ||
278 | int (*cpu_present_to_apicid)(int mps_cpu); | ||
279 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); | ||
280 | void (*setup_portio_remap)(void); | ||
281 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); | ||
282 | void (*enable_apic_mode)(void); | ||
283 | int (*phys_pkg_id)(int cpuid_apic, int index_msb); | ||
284 | |||
285 | /* | ||
286 | * When one of the next two hooks returns 1 the apic | ||
287 | * is switched to this. Essentially they are additional | ||
288 | * probe functions: | ||
289 | */ | ||
290 | int (*mps_oem_check)(struct mpc_table *mpc, char *oem, char *productid); | ||
291 | |||
292 | unsigned int (*get_apic_id)(unsigned long x); | ||
293 | unsigned long (*set_apic_id)(unsigned int id); | ||
294 | unsigned long apic_id_mask; | ||
295 | |||
296 | unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); | ||
297 | unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, | ||
298 | const struct cpumask *andmask); | ||
299 | |||
300 | /* ipi */ | ||
301 | void (*send_IPI_mask)(const struct cpumask *mask, int vector); | ||
302 | void (*send_IPI_mask_allbutself)(const struct cpumask *mask, | ||
303 | int vector); | ||
304 | void (*send_IPI_allbutself)(int vector); | ||
305 | void (*send_IPI_all)(int vector); | ||
306 | void (*send_IPI_self)(int vector); | ||
307 | |||
308 | /* wakeup_secondary_cpu */ | ||
309 | int (*wakeup_cpu)(int apicid, unsigned long start_eip); | ||
310 | |||
311 | int trampoline_phys_low; | ||
312 | int trampoline_phys_high; | ||
313 | |||
314 | void (*wait_for_init_deassert)(atomic_t *deassert); | ||
315 | void (*smp_callin_clear_local_apic)(void); | ||
316 | void (*inquire_remote_apic)(int apicid); | ||
317 | |||
318 | /* apic ops */ | ||
319 | u32 (*read)(u32 reg); | ||
320 | void (*write)(u32 reg, u32 v); | ||
321 | u64 (*icr_read)(void); | ||
322 | void (*icr_write)(u32 low, u32 high); | ||
323 | void (*wait_icr_idle)(void); | ||
324 | u32 (*safe_wait_icr_idle)(void); | ||
325 | }; | ||
326 | |||
327 | extern struct apic *apic; | ||
328 | |||
329 | static inline u32 apic_read(u32 reg) | ||
330 | { | ||
331 | return apic->read(reg); | ||
332 | } | ||
333 | |||
334 | static inline void apic_write(u32 reg, u32 val) | ||
335 | { | ||
336 | apic->write(reg, val); | ||
337 | } | ||
338 | |||
339 | static inline u64 apic_icr_read(void) | ||
340 | { | ||
341 | return apic->icr_read(); | ||
342 | } | ||
343 | |||
344 | static inline void apic_icr_write(u32 low, u32 high) | ||
345 | { | ||
346 | apic->icr_write(low, high); | ||
347 | } | ||
348 | |||
349 | static inline void apic_wait_icr_idle(void) | ||
350 | { | ||
351 | apic->wait_icr_idle(); | ||
352 | } | ||
353 | |||
354 | static inline u32 safe_apic_wait_icr_idle(void) | ||
355 | { | ||
356 | return apic->safe_wait_icr_idle(); | ||
357 | } | ||
358 | |||
359 | |||
360 | static inline void ack_APIC_irq(void) | ||
361 | { | ||
362 | /* | ||
363 | * ack_APIC_irq() actually gets compiled as a single instruction | ||
364 | * ... yummie. | ||
365 | */ | ||
366 | |||
367 | /* Docs say use 0 for future compatibility */ | ||
368 | apic_write(APIC_EOI, 0); | ||
369 | } | ||
370 | |||
371 | static inline unsigned default_get_apic_id(unsigned long x) | ||
372 | { | ||
373 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
374 | |||
375 | if (APIC_XAPIC(ver)) | ||
376 | return (x >> 24) & 0xFF; | ||
377 | else | ||
378 | return (x >> 24) & 0x0F; | ||
379 | } | ||
380 | |||
381 | /* | ||
382 | * Warm reset vector default position: | ||
383 | */ | ||
384 | #define DEFAULT_TRAMPOLINE_PHYS_LOW 0x467 | ||
385 | #define DEFAULT_TRAMPOLINE_PHYS_HIGH 0x469 | ||
386 | |||
387 | #ifdef CONFIG_X86_32 | ||
388 | extern void es7000_update_apic_to_cluster(void); | ||
389 | #else | ||
390 | extern struct apic apic_flat; | ||
391 | extern struct apic apic_physflat; | ||
392 | extern struct apic apic_x2apic_cluster; | ||
393 | extern struct apic apic_x2apic_phys; | ||
394 | extern int default_acpi_madt_oem_check(char *, char *); | ||
395 | |||
396 | extern void apic_send_IPI_self(int vector); | ||
397 | |||
398 | extern struct apic apic_x2apic_uv_x; | ||
399 | DECLARE_PER_CPU(int, x2apic_extra_bits); | ||
400 | |||
401 | extern int default_cpu_present_to_apicid(int mps_cpu); | ||
402 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | ||
403 | #endif | ||
404 | |||
405 | static inline void default_wait_for_init_deassert(atomic_t *deassert) | ||
406 | { | ||
407 | while (!atomic_read(deassert)) | ||
408 | cpu_relax(); | ||
409 | return; | ||
410 | } | ||
411 | |||
412 | extern void generic_bigsmp_probe(void); | ||
413 | |||
414 | |||
415 | #ifdef CONFIG_X86_LOCAL_APIC | ||
416 | |||
417 | #include <asm/smp.h> | ||
418 | |||
419 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | ||
420 | |||
421 | static inline const struct cpumask *default_target_cpus(void) | ||
422 | { | ||
423 | #ifdef CONFIG_SMP | ||
424 | return cpu_online_mask; | ||
425 | #else | ||
426 | return cpumask_of(0); | ||
427 | #endif | ||
428 | } | ||
429 | |||
430 | DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid); | ||
431 | |||
432 | |||
433 | static inline unsigned int read_apic_id(void) | ||
434 | { | ||
435 | unsigned int reg; | ||
436 | |||
437 | reg = apic_read(APIC_ID); | ||
438 | |||
439 | return apic->get_apic_id(reg); | ||
440 | } | ||
441 | |||
442 | extern void default_setup_apic_routing(void); | ||
443 | |||
444 | #ifdef CONFIG_X86_32 | ||
445 | /* | ||
446 | * Set up the logical destination ID. | ||
447 | * | ||
448 | * Intel recommends to set DFR, LDR and TPR before enabling | ||
449 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
450 | * document number 292116). So here it goes... | ||
451 | */ | ||
452 | extern void default_init_apic_ldr(void); | ||
453 | |||
454 | static inline int default_apic_id_registered(void) | ||
455 | { | ||
456 | return physid_isset(read_apic_id(), phys_cpu_present_map); | ||
457 | } | ||
458 | |||
459 | static inline unsigned int | ||
460 | default_cpu_mask_to_apicid(const struct cpumask *cpumask) | ||
461 | { | ||
462 | return cpumask_bits(cpumask)[0]; | ||
463 | } | ||
464 | |||
465 | static inline unsigned int | ||
466 | default_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
467 | const struct cpumask *andmask) | ||
468 | { | ||
469 | unsigned long mask1 = cpumask_bits(cpumask)[0]; | ||
470 | unsigned long mask2 = cpumask_bits(andmask)[0]; | ||
471 | unsigned long mask3 = cpumask_bits(cpu_online_mask)[0]; | ||
472 | |||
473 | return (unsigned int)(mask1 & mask2 & mask3); | ||
474 | } | ||
475 | |||
476 | static inline int default_phys_pkg_id(int cpuid_apic, int index_msb) | ||
477 | { | ||
478 | return cpuid_apic >> index_msb; | ||
479 | } | ||
480 | |||
481 | extern int default_apicid_to_node(int logical_apicid); | ||
482 | |||
483 | #endif | ||
484 | |||
485 | static inline unsigned long default_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
486 | { | ||
487 | return physid_isset(apicid, bitmap); | ||
488 | } | ||
489 | |||
490 | static inline unsigned long default_check_apicid_present(int bit) | ||
491 | { | ||
492 | return physid_isset(bit, phys_cpu_present_map); | ||
493 | } | ||
494 | |||
495 | static inline physid_mask_t default_ioapic_phys_id_map(physid_mask_t phys_map) | ||
496 | { | ||
497 | return phys_map; | ||
498 | } | ||
499 | |||
500 | /* Mapping from cpu number to logical apicid */ | ||
501 | static inline int default_cpu_to_logical_apicid(int cpu) | ||
502 | { | ||
503 | return 1 << cpu; | ||
504 | } | ||
505 | |||
506 | static inline int __default_cpu_present_to_apicid(int mps_cpu) | ||
507 | { | ||
508 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) | ||
509 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
510 | else | ||
511 | return BAD_APICID; | ||
512 | } | ||
513 | |||
514 | static inline int | ||
515 | __default_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
516 | { | ||
517 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | ||
518 | } | ||
519 | |||
520 | #ifdef CONFIG_X86_32 | ||
521 | static inline int default_cpu_present_to_apicid(int mps_cpu) | ||
522 | { | ||
523 | return __default_cpu_present_to_apicid(mps_cpu); | ||
524 | } | ||
525 | |||
526 | static inline int | ||
527 | default_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
528 | { | ||
529 | return __default_check_phys_apicid_present(boot_cpu_physical_apicid); | ||
530 | } | ||
531 | #else | ||
532 | extern int default_cpu_present_to_apicid(int mps_cpu); | ||
533 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | ||
534 | #endif | ||
535 | |||
536 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | ||
537 | { | ||
538 | return physid_mask_of_physid(phys_apicid); | ||
539 | } | ||
540 | |||
541 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
542 | |||
543 | #ifdef CONFIG_X86_32 | ||
544 | extern u8 cpu_2_logical_apicid[NR_CPUS]; | ||
545 | #endif | ||
546 | |||
199 | #endif /* _ASM_X86_APIC_H */ | 547 | #endif /* _ASM_X86_APIC_H */ |
diff --git a/arch/x86/include/asm/mach-default/apm.h b/arch/x86/include/asm/apm.h index 20370c6db74b..20370c6db74b 100644 --- a/arch/x86/include/asm/mach-default/apm.h +++ b/arch/x86/include/asm/apm.h | |||
diff --git a/arch/x86/include/asm/arch_hooks.h b/arch/x86/include/asm/arch_hooks.h deleted file mode 100644 index cbd4957838a6..000000000000 --- a/arch/x86/include/asm/arch_hooks.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef _ASM_X86_ARCH_HOOKS_H | ||
2 | #define _ASM_X86_ARCH_HOOKS_H | ||
3 | |||
4 | #include <linux/interrupt.h> | ||
5 | |||
6 | /* | ||
7 | * linux/include/asm/arch_hooks.h | ||
8 | * | ||
9 | * define the architecture specific hooks | ||
10 | */ | ||
11 | |||
12 | /* these aren't arch hooks, they are generic routines | ||
13 | * that can be used by the hooks */ | ||
14 | extern void init_ISA_irqs(void); | ||
15 | extern irqreturn_t timer_interrupt(int irq, void *dev_id); | ||
16 | |||
17 | /* these are the defined hooks */ | ||
18 | extern void intr_init_hook(void); | ||
19 | extern void pre_intr_init_hook(void); | ||
20 | extern void pre_setup_arch_hook(void); | ||
21 | extern void trap_init_hook(void); | ||
22 | extern void pre_time_init_hook(void); | ||
23 | extern void time_init_hook(void); | ||
24 | extern void mca_nmi_hook(void); | ||
25 | |||
26 | #endif /* _ASM_X86_ARCH_HOOKS_H */ | ||
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h deleted file mode 100644 index d8dd9f537911..000000000000 --- a/arch/x86/include/asm/bigsmp/apic.h +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_APIC_H | ||
2 | #define __ASM_MACH_APIC_H | ||
3 | |||
4 | #define xapic_phys_to_log_apicid(cpu) (per_cpu(x86_bios_cpu_apicid, cpu)) | ||
5 | #define esr_disable (1) | ||
6 | |||
7 | static inline int apic_id_registered(void) | ||
8 | { | ||
9 | return (1); | ||
10 | } | ||
11 | |||
12 | static inline const cpumask_t *target_cpus(void) | ||
13 | { | ||
14 | #ifdef CONFIG_SMP | ||
15 | return &cpu_online_map; | ||
16 | #else | ||
17 | return &cpumask_of_cpu(0); | ||
18 | #endif | ||
19 | } | ||
20 | |||
21 | #undef APIC_DEST_LOGICAL | ||
22 | #define APIC_DEST_LOGICAL 0 | ||
23 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | ||
24 | #define INT_DELIVERY_MODE (dest_Fixed) | ||
25 | #define INT_DEST_MODE (0) /* phys delivery to target proc */ | ||
26 | #define NO_BALANCE_IRQ (0) | ||
27 | |||
28 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | ||
29 | { | ||
30 | return (0); | ||
31 | } | ||
32 | |||
33 | static inline unsigned long check_apicid_present(int bit) | ||
34 | { | ||
35 | return (1); | ||
36 | } | ||
37 | |||
38 | static inline unsigned long calculate_ldr(int cpu) | ||
39 | { | ||
40 | unsigned long val, id; | ||
41 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
42 | id = xapic_phys_to_log_apicid(cpu); | ||
43 | val |= SET_APIC_LOGICAL_ID(id); | ||
44 | return val; | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * Set up the logical destination ID. | ||
49 | * | ||
50 | * Intel recommends to set DFR, LDR and TPR before enabling | ||
51 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
52 | * document number 292116). So here it goes... | ||
53 | */ | ||
54 | static inline void init_apic_ldr(void) | ||
55 | { | ||
56 | unsigned long val; | ||
57 | int cpu = smp_processor_id(); | ||
58 | |||
59 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
60 | val = calculate_ldr(cpu); | ||
61 | apic_write(APIC_LDR, val); | ||
62 | } | ||
63 | |||
64 | static inline void setup_apic_routing(void) | ||
65 | { | ||
66 | printk("Enabling APIC mode: %s. Using %d I/O APICs\n", | ||
67 | "Physflat", nr_ioapics); | ||
68 | } | ||
69 | |||
70 | static inline int multi_timer_check(int apic, int irq) | ||
71 | { | ||
72 | return (0); | ||
73 | } | ||
74 | |||
75 | static inline int apicid_to_node(int logical_apicid) | ||
76 | { | ||
77 | return apicid_2_node[hard_smp_processor_id()]; | ||
78 | } | ||
79 | |||
80 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
81 | { | ||
82 | if (mps_cpu < nr_cpu_ids) | ||
83 | return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
84 | |||
85 | return BAD_APICID; | ||
86 | } | ||
87 | |||
88 | static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) | ||
89 | { | ||
90 | return physid_mask_of_physid(phys_apicid); | ||
91 | } | ||
92 | |||
93 | extern u8 cpu_2_logical_apicid[]; | ||
94 | /* Mapping from cpu number to logical apicid */ | ||
95 | static inline int cpu_to_logical_apicid(int cpu) | ||
96 | { | ||
97 | if (cpu >= nr_cpu_ids) | ||
98 | return BAD_APICID; | ||
99 | return cpu_physical_id(cpu); | ||
100 | } | ||
101 | |||
102 | static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) | ||
103 | { | ||
104 | /* For clustered we don't have a good way to do this yet - hack */ | ||
105 | return physids_promote(0xFFL); | ||
106 | } | ||
107 | |||
108 | static inline void setup_portio_remap(void) | ||
109 | { | ||
110 | } | ||
111 | |||
112 | static inline void enable_apic_mode(void) | ||
113 | { | ||
114 | } | ||
115 | |||
116 | static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
117 | { | ||
118 | return (1); | ||
119 | } | ||
120 | |||
121 | /* As we are using single CPU as destination, pick only one CPU here */ | ||
122 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
123 | { | ||
124 | int cpu; | ||
125 | int apicid; | ||
126 | |||
127 | cpu = first_cpu(*cpumask); | ||
128 | apicid = cpu_to_logical_apicid(cpu); | ||
129 | return apicid; | ||
130 | } | ||
131 | |||
132 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
133 | const struct cpumask *andmask) | ||
134 | { | ||
135 | int cpu; | ||
136 | |||
137 | /* | ||
138 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | ||
139 | * May as well be the first. | ||
140 | */ | ||
141 | for_each_cpu_and(cpu, cpumask, andmask) | ||
142 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | ||
143 | break; | ||
144 | if (cpu < nr_cpu_ids) | ||
145 | return cpu_to_logical_apicid(cpu); | ||
146 | |||
147 | return BAD_APICID; | ||
148 | } | ||
149 | |||
150 | static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | ||
151 | { | ||
152 | return cpuid_apic >> index_msb; | ||
153 | } | ||
154 | |||
155 | #endif /* __ASM_MACH_APIC_H */ | ||
diff --git a/arch/x86/include/asm/bigsmp/apicdef.h b/arch/x86/include/asm/bigsmp/apicdef.h deleted file mode 100644 index 392c3f5ef2fe..000000000000 --- a/arch/x86/include/asm/bigsmp/apicdef.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_APICDEF_H | ||
2 | #define __ASM_MACH_APICDEF_H | ||
3 | |||
4 | #define APIC_ID_MASK (0xFF<<24) | ||
5 | |||
6 | static inline unsigned get_apic_id(unsigned long x) | ||
7 | { | ||
8 | return (((x)>>24)&0xFF); | ||
9 | } | ||
10 | |||
11 | #define GET_APIC_ID(x) get_apic_id(x) | ||
12 | |||
13 | #endif | ||
diff --git a/arch/x86/include/asm/bigsmp/ipi.h b/arch/x86/include/asm/bigsmp/ipi.h deleted file mode 100644 index 27fcd01b3ae6..000000000000 --- a/arch/x86/include/asm/bigsmp/ipi.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | ||
2 | #define __ASM_MACH_IPI_H | ||
3 | |||
4 | void send_IPI_mask_sequence(const struct cpumask *mask, int vector); | ||
5 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
6 | |||
7 | static inline void send_IPI_mask(const struct cpumask *mask, int vector) | ||
8 | { | ||
9 | send_IPI_mask_sequence(mask, vector); | ||
10 | } | ||
11 | |||
12 | static inline void send_IPI_allbutself(int vector) | ||
13 | { | ||
14 | send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
15 | } | ||
16 | |||
17 | static inline void send_IPI_all(int vector) | ||
18 | { | ||
19 | send_IPI_mask(cpu_online_mask, vector); | ||
20 | } | ||
21 | |||
22 | #endif /* __ASM_MACH_IPI_H */ | ||
diff --git a/arch/x86/include/asm/calling.h b/arch/x86/include/asm/calling.h index 2bc162e0ec6e..0e63c9a2a8d0 100644 --- a/arch/x86/include/asm/calling.h +++ b/arch/x86/include/asm/calling.h | |||
@@ -1,5 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | * Some macros to handle stack frames in assembly. | 2 | |
3 | x86 function call convention, 64-bit: | ||
4 | ------------------------------------- | ||
5 | arguments | callee-saved | extra caller-saved | return | ||
6 | [callee-clobbered] | | [callee-clobbered] | | ||
7 | --------------------------------------------------------------------------- | ||
8 | rdi rsi rdx rcx r8-9 | rbx rbp [*] r12-15 | r10-11 | rax, rdx [**] | ||
9 | |||
10 | ( rsp is obviously invariant across normal function calls. (gcc can 'merge' | ||
11 | functions when it sees tail-call optimization possibilities) rflags is | ||
12 | clobbered. Leftover arguments are passed over the stack frame.) | ||
13 | |||
14 | [*] In the frame-pointers case rbp is fixed to the stack frame. | ||
15 | |||
16 | [**] for struct return values wider than 64 bits the return convention is a | ||
17 | bit more complex: up to 128 bits width we return small structures | ||
18 | straight in rax, rdx. For structures larger than that (3 words or | ||
19 | larger) the caller puts a pointer to an on-stack return struct | ||
20 | [allocated in the caller's stack frame] into the first argument - i.e. | ||
21 | into rdi. All other arguments shift up by one in this case. | ||
22 | Fortunately this case is rare in the kernel. | ||
23 | |||
24 | For 32-bit we have the following conventions - kernel is built with | ||
25 | -mregparm=3 and -freg-struct-return: | ||
26 | |||
27 | x86 function calling convention, 32-bit: | ||
28 | ---------------------------------------- | ||
29 | arguments | callee-saved | extra caller-saved | return | ||
30 | [callee-clobbered] | | [callee-clobbered] | | ||
31 | ------------------------------------------------------------------------- | ||
32 | eax edx ecx | ebx edi esi ebp [*] | <none> | eax, edx [**] | ||
33 | |||
34 | ( here too esp is obviously invariant across normal function calls. eflags | ||
35 | is clobbered. Leftover arguments are passed over the stack frame. ) | ||
36 | |||
37 | [*] In the frame-pointers case ebp is fixed to the stack frame. | ||
38 | |||
39 | [**] We build with -freg-struct-return, which on 32-bit means similar | ||
40 | semantics as on 64-bit: edx can be used for a second return value | ||
41 | (i.e. covering integer and structure sizes up to 64 bits) - after that | ||
42 | it gets more complex and more expensive: 3-word or larger struct returns | ||
43 | get done in the caller's frame and the pointer to the return struct goes | ||
44 | into regparm0, i.e. eax - the other arguments shift up and the | ||
45 | function's register parameters degenerate to regparm=2 in essence. | ||
46 | |||
47 | */ | ||
48 | |||
49 | |||
50 | /* | ||
51 | * 64-bit system call stack frame layout defines and helpers, | ||
52 | * for assembly code: | ||
3 | */ | 53 | */ |
4 | 54 | ||
5 | #define R15 0 | 55 | #define R15 0 |
@@ -9,7 +59,7 @@ | |||
9 | #define RBP 32 | 59 | #define RBP 32 |
10 | #define RBX 40 | 60 | #define RBX 40 |
11 | 61 | ||
12 | /* arguments: interrupts/non tracing syscalls only save upto here*/ | 62 | /* arguments: interrupts/non tracing syscalls only save up to here: */ |
13 | #define R11 48 | 63 | #define R11 48 |
14 | #define R10 56 | 64 | #define R10 56 |
15 | #define R9 64 | 65 | #define R9 64 |
@@ -22,7 +72,7 @@ | |||
22 | #define ORIG_RAX 120 /* + error_code */ | 72 | #define ORIG_RAX 120 /* + error_code */ |
23 | /* end of arguments */ | 73 | /* end of arguments */ |
24 | 74 | ||
25 | /* cpu exception frame or undefined in case of fast syscall. */ | 75 | /* cpu exception frame or undefined in case of fast syscall: */ |
26 | #define RIP 128 | 76 | #define RIP 128 |
27 | #define CS 136 | 77 | #define CS 136 |
28 | #define EFLAGS 144 | 78 | #define EFLAGS 144 |
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h index f03b23e32864..b185091bf19c 100644 --- a/arch/x86/include/asm/cpu.h +++ b/arch/x86/include/asm/cpu.h | |||
@@ -32,10 +32,6 @@ extern void arch_unregister_cpu(int); | |||
32 | 32 | ||
33 | DECLARE_PER_CPU(int, cpu_state); | 33 | DECLARE_PER_CPU(int, cpu_state); |
34 | 34 | ||
35 | #ifdef CONFIG_X86_HAS_BOOT_CPU_ID | 35 | extern unsigned int boot_cpu_id; |
36 | extern unsigned char boot_cpu_id; | ||
37 | #else | ||
38 | #define boot_cpu_id 0 | ||
39 | #endif | ||
40 | 36 | ||
41 | #endif /* _ASM_X86_CPU_H */ | 37 | #endif /* _ASM_X86_CPU_H */ |
diff --git a/arch/x86/include/asm/mach-default/do_timer.h b/arch/x86/include/asm/do_timer.h index 23ecda0b28a0..23ecda0b28a0 100644 --- a/arch/x86/include/asm/mach-default/do_timer.h +++ b/arch/x86/include/asm/do_timer.h | |||
diff --git a/arch/x86/include/asm/mach-default/entry_arch.h b/arch/x86/include/asm/entry_arch.h index 6fa399ad1de2..854d538ae857 100644 --- a/arch/x86/include/asm/mach-default/entry_arch.h +++ b/arch/x86/include/asm/entry_arch.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * is no hardware IRQ pin equivalent for them, they are triggered | 9 | * is no hardware IRQ pin equivalent for them, they are triggered |
10 | * through the ICC by us (IPIs) | 10 | * through the ICC by us (IPIs) |
11 | */ | 11 | */ |
12 | #ifdef CONFIG_X86_SMP | 12 | #ifdef CONFIG_SMP |
13 | BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) | 13 | BUILD_INTERRUPT(reschedule_interrupt,RESCHEDULE_VECTOR) |
14 | BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) | 14 | BUILD_INTERRUPT(call_function_interrupt,CALL_FUNCTION_VECTOR) |
15 | BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR) | 15 | BUILD_INTERRUPT(call_function_single_interrupt,CALL_FUNCTION_SINGLE_VECTOR) |
@@ -41,10 +41,15 @@ BUILD_INTERRUPT3(invalidate_interrupt7,INVALIDATE_TLB_VECTOR_START+7, | |||
41 | * a much simpler SMP time architecture: | 41 | * a much simpler SMP time architecture: |
42 | */ | 42 | */ |
43 | #ifdef CONFIG_X86_LOCAL_APIC | 43 | #ifdef CONFIG_X86_LOCAL_APIC |
44 | |||
44 | BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) | 45 | BUILD_INTERRUPT(apic_timer_interrupt,LOCAL_TIMER_VECTOR) |
45 | BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) | 46 | BUILD_INTERRUPT(error_interrupt,ERROR_APIC_VECTOR) |
46 | BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) | 47 | BUILD_INTERRUPT(spurious_interrupt,SPURIOUS_APIC_VECTOR) |
47 | 48 | ||
49 | #ifdef CONFIG_PERF_COUNTERS | ||
50 | BUILD_INTERRUPT(perf_counter_interrupt, LOCAL_PERF_VECTOR) | ||
51 | #endif | ||
52 | |||
48 | #ifdef CONFIG_X86_MCE_P4THERMAL | 53 | #ifdef CONFIG_X86_MCE_P4THERMAL |
49 | BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) | 54 | BUILD_INTERRUPT(thermal_interrupt,THERMAL_APIC_VECTOR) |
50 | #endif | 55 | #endif |
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h deleted file mode 100644 index c58b9cc74465..000000000000 --- a/arch/x86/include/asm/es7000/apic.h +++ /dev/null | |||
@@ -1,242 +0,0 @@ | |||
1 | #ifndef __ASM_ES7000_APIC_H | ||
2 | #define __ASM_ES7000_APIC_H | ||
3 | |||
4 | #include <linux/gfp.h> | ||
5 | |||
6 | #define xapic_phys_to_log_apicid(cpu) per_cpu(x86_bios_cpu_apicid, cpu) | ||
7 | #define esr_disable (1) | ||
8 | |||
9 | static inline int apic_id_registered(void) | ||
10 | { | ||
11 | return (1); | ||
12 | } | ||
13 | |||
14 | static inline const cpumask_t *target_cpus_cluster(void) | ||
15 | { | ||
16 | return &CPU_MASK_ALL; | ||
17 | } | ||
18 | |||
19 | static inline const cpumask_t *target_cpus(void) | ||
20 | { | ||
21 | return &cpumask_of_cpu(smp_processor_id()); | ||
22 | } | ||
23 | |||
24 | #define APIC_DFR_VALUE_CLUSTER (APIC_DFR_CLUSTER) | ||
25 | #define INT_DELIVERY_MODE_CLUSTER (dest_LowestPrio) | ||
26 | #define INT_DEST_MODE_CLUSTER (1) /* logical delivery broadcast to all procs */ | ||
27 | #define NO_BALANCE_IRQ_CLUSTER (1) | ||
28 | |||
29 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | ||
30 | #define INT_DELIVERY_MODE (dest_Fixed) | ||
31 | #define INT_DEST_MODE (0) /* phys delivery to target procs */ | ||
32 | #define NO_BALANCE_IRQ (0) | ||
33 | #undef APIC_DEST_LOGICAL | ||
34 | #define APIC_DEST_LOGICAL 0x0 | ||
35 | |||
36 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | ||
37 | { | ||
38 | return 0; | ||
39 | } | ||
40 | static inline unsigned long check_apicid_present(int bit) | ||
41 | { | ||
42 | return physid_isset(bit, phys_cpu_present_map); | ||
43 | } | ||
44 | |||
45 | #define apicid_cluster(apicid) (apicid & 0xF0) | ||
46 | |||
47 | static inline unsigned long calculate_ldr(int cpu) | ||
48 | { | ||
49 | unsigned long id; | ||
50 | id = xapic_phys_to_log_apicid(cpu); | ||
51 | return (SET_APIC_LOGICAL_ID(id)); | ||
52 | } | ||
53 | |||
54 | /* | ||
55 | * Set up the logical destination ID. | ||
56 | * | ||
57 | * Intel recommends to set DFR, LdR and TPR before enabling | ||
58 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
59 | * document number 292116). So here it goes... | ||
60 | */ | ||
61 | static inline void init_apic_ldr_cluster(void) | ||
62 | { | ||
63 | unsigned long val; | ||
64 | int cpu = smp_processor_id(); | ||
65 | |||
66 | apic_write(APIC_DFR, APIC_DFR_VALUE_CLUSTER); | ||
67 | val = calculate_ldr(cpu); | ||
68 | apic_write(APIC_LDR, val); | ||
69 | } | ||
70 | |||
71 | static inline void init_apic_ldr(void) | ||
72 | { | ||
73 | unsigned long val; | ||
74 | int cpu = smp_processor_id(); | ||
75 | |||
76 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
77 | val = calculate_ldr(cpu); | ||
78 | apic_write(APIC_LDR, val); | ||
79 | } | ||
80 | |||
81 | extern int apic_version [MAX_APICS]; | ||
82 | static inline void setup_apic_routing(void) | ||
83 | { | ||
84 | int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id()); | ||
85 | printk("Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n", | ||
86 | (apic_version[apic] == 0x14) ? | ||
87 | "Physical Cluster" : "Logical Cluster", | ||
88 | nr_ioapics, cpus_addr(*target_cpus())[0]); | ||
89 | } | ||
90 | |||
91 | static inline int multi_timer_check(int apic, int irq) | ||
92 | { | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | static inline int apicid_to_node(int logical_apicid) | ||
97 | { | ||
98 | return 0; | ||
99 | } | ||
100 | |||
101 | |||
102 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
103 | { | ||
104 | if (!mps_cpu) | ||
105 | return boot_cpu_physical_apicid; | ||
106 | else if (mps_cpu < nr_cpu_ids) | ||
107 | return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
108 | else | ||
109 | return BAD_APICID; | ||
110 | } | ||
111 | |||
112 | static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) | ||
113 | { | ||
114 | static int id = 0; | ||
115 | physid_mask_t mask; | ||
116 | mask = physid_mask_of_physid(id); | ||
117 | ++id; | ||
118 | return mask; | ||
119 | } | ||
120 | |||
121 | extern u8 cpu_2_logical_apicid[]; | ||
122 | /* Mapping from cpu number to logical apicid */ | ||
123 | static inline int cpu_to_logical_apicid(int cpu) | ||
124 | { | ||
125 | #ifdef CONFIG_SMP | ||
126 | if (cpu >= nr_cpu_ids) | ||
127 | return BAD_APICID; | ||
128 | return (int)cpu_2_logical_apicid[cpu]; | ||
129 | #else | ||
130 | return logical_smp_processor_id(); | ||
131 | #endif | ||
132 | } | ||
133 | |||
134 | static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) | ||
135 | { | ||
136 | /* For clustered we don't have a good way to do this yet - hack */ | ||
137 | return physids_promote(0xff); | ||
138 | } | ||
139 | |||
140 | |||
141 | static inline void setup_portio_remap(void) | ||
142 | { | ||
143 | } | ||
144 | |||
145 | extern unsigned int boot_cpu_physical_apicid; | ||
146 | static inline int check_phys_apicid_present(int cpu_physical_apicid) | ||
147 | { | ||
148 | boot_cpu_physical_apicid = read_apic_id(); | ||
149 | return (1); | ||
150 | } | ||
151 | |||
152 | static inline unsigned int | ||
153 | cpu_mask_to_apicid_cluster(const struct cpumask *cpumask) | ||
154 | { | ||
155 | int num_bits_set; | ||
156 | int cpus_found = 0; | ||
157 | int cpu; | ||
158 | int apicid; | ||
159 | |||
160 | num_bits_set = cpumask_weight(cpumask); | ||
161 | /* Return id to all */ | ||
162 | if (num_bits_set == nr_cpu_ids) | ||
163 | return 0xFF; | ||
164 | /* | ||
165 | * The cpus in the mask must all be on the apic cluster. If are not | ||
166 | * on the same apicid cluster return default value of TARGET_CPUS. | ||
167 | */ | ||
168 | cpu = cpumask_first(cpumask); | ||
169 | apicid = cpu_to_logical_apicid(cpu); | ||
170 | while (cpus_found < num_bits_set) { | ||
171 | if (cpumask_test_cpu(cpu, cpumask)) { | ||
172 | int new_apicid = cpu_to_logical_apicid(cpu); | ||
173 | if (apicid_cluster(apicid) != | ||
174 | apicid_cluster(new_apicid)){ | ||
175 | printk ("%s: Not a valid mask!\n", __func__); | ||
176 | return 0xFF; | ||
177 | } | ||
178 | apicid = new_apicid; | ||
179 | cpus_found++; | ||
180 | } | ||
181 | cpu++; | ||
182 | } | ||
183 | return apicid; | ||
184 | } | ||
185 | |||
186 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
187 | { | ||
188 | int num_bits_set; | ||
189 | int cpus_found = 0; | ||
190 | int cpu; | ||
191 | int apicid; | ||
192 | |||
193 | num_bits_set = cpus_weight(*cpumask); | ||
194 | /* Return id to all */ | ||
195 | if (num_bits_set == nr_cpu_ids) | ||
196 | return cpu_to_logical_apicid(0); | ||
197 | /* | ||
198 | * The cpus in the mask must all be on the apic cluster. If are not | ||
199 | * on the same apicid cluster return default value of TARGET_CPUS. | ||
200 | */ | ||
201 | cpu = first_cpu(*cpumask); | ||
202 | apicid = cpu_to_logical_apicid(cpu); | ||
203 | while (cpus_found < num_bits_set) { | ||
204 | if (cpu_isset(cpu, *cpumask)) { | ||
205 | int new_apicid = cpu_to_logical_apicid(cpu); | ||
206 | if (apicid_cluster(apicid) != | ||
207 | apicid_cluster(new_apicid)){ | ||
208 | printk ("%s: Not a valid mask!\n", __func__); | ||
209 | return cpu_to_logical_apicid(0); | ||
210 | } | ||
211 | apicid = new_apicid; | ||
212 | cpus_found++; | ||
213 | } | ||
214 | cpu++; | ||
215 | } | ||
216 | return apicid; | ||
217 | } | ||
218 | |||
219 | |||
220 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, | ||
221 | const struct cpumask *andmask) | ||
222 | { | ||
223 | int apicid = cpu_to_logical_apicid(0); | ||
224 | cpumask_var_t cpumask; | ||
225 | |||
226 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) | ||
227 | return apicid; | ||
228 | |||
229 | cpumask_and(cpumask, inmask, andmask); | ||
230 | cpumask_and(cpumask, cpumask, cpu_online_mask); | ||
231 | apicid = cpu_mask_to_apicid(cpumask); | ||
232 | |||
233 | free_cpumask_var(cpumask); | ||
234 | return apicid; | ||
235 | } | ||
236 | |||
237 | static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | ||
238 | { | ||
239 | return cpuid_apic >> index_msb; | ||
240 | } | ||
241 | |||
242 | #endif /* __ASM_ES7000_APIC_H */ | ||
diff --git a/arch/x86/include/asm/es7000/apicdef.h b/arch/x86/include/asm/es7000/apicdef.h deleted file mode 100644 index 8b234a3cb851..000000000000 --- a/arch/x86/include/asm/es7000/apicdef.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ASM_ES7000_APICDEF_H | ||
2 | #define __ASM_ES7000_APICDEF_H | ||
3 | |||
4 | #define APIC_ID_MASK (0xFF<<24) | ||
5 | |||
6 | static inline unsigned get_apic_id(unsigned long x) | ||
7 | { | ||
8 | return (((x)>>24)&0xFF); | ||
9 | } | ||
10 | |||
11 | #define GET_APIC_ID(x) get_apic_id(x) | ||
12 | |||
13 | #endif | ||
diff --git a/arch/x86/include/asm/es7000/ipi.h b/arch/x86/include/asm/es7000/ipi.h deleted file mode 100644 index 7e8ed24d4b8a..000000000000 --- a/arch/x86/include/asm/es7000/ipi.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #ifndef __ASM_ES7000_IPI_H | ||
2 | #define __ASM_ES7000_IPI_H | ||
3 | |||
4 | void send_IPI_mask_sequence(const struct cpumask *mask, int vector); | ||
5 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
6 | |||
7 | static inline void send_IPI_mask(const struct cpumask *mask, int vector) | ||
8 | { | ||
9 | send_IPI_mask_sequence(mask, vector); | ||
10 | } | ||
11 | |||
12 | static inline void send_IPI_allbutself(int vector) | ||
13 | { | ||
14 | send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
15 | } | ||
16 | |||
17 | static inline void send_IPI_all(int vector) | ||
18 | { | ||
19 | send_IPI_mask(cpu_online_mask, vector); | ||
20 | } | ||
21 | |||
22 | #endif /* __ASM_ES7000_IPI_H */ | ||
diff --git a/arch/x86/include/asm/es7000/mpparse.h b/arch/x86/include/asm/es7000/mpparse.h deleted file mode 100644 index c1629b090ec2..000000000000 --- a/arch/x86/include/asm/es7000/mpparse.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef __ASM_ES7000_MPPARSE_H | ||
2 | #define __ASM_ES7000_MPPARSE_H | ||
3 | |||
4 | #include <linux/acpi.h> | ||
5 | |||
6 | extern int parse_unisys_oem (char *oemptr); | ||
7 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | ||
8 | extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr); | ||
9 | extern void setup_unisys(void); | ||
10 | |||
11 | #ifndef CONFIG_X86_GENERICARCH | ||
12 | extern int acpi_madt_oem_check(char *oem_id, char *oem_table_id); | ||
13 | extern int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid); | ||
14 | #endif | ||
15 | |||
16 | #ifdef CONFIG_ACPI | ||
17 | |||
18 | static inline int es7000_check_dsdt(void) | ||
19 | { | ||
20 | struct acpi_table_header header; | ||
21 | |||
22 | if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) && | ||
23 | !strncmp(header.oem_id, "UNISYS", 6)) | ||
24 | return 1; | ||
25 | return 0; | ||
26 | } | ||
27 | #endif | ||
28 | |||
29 | #endif /* __ASM_MACH_MPPARSE_H */ | ||
diff --git a/arch/x86/include/asm/es7000/wakecpu.h b/arch/x86/include/asm/es7000/wakecpu.h deleted file mode 100644 index 78f0daaee436..000000000000 --- a/arch/x86/include/asm/es7000/wakecpu.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #ifndef __ASM_ES7000_WAKECPU_H | ||
2 | #define __ASM_ES7000_WAKECPU_H | ||
3 | |||
4 | #define TRAMPOLINE_PHYS_LOW 0x467 | ||
5 | #define TRAMPOLINE_PHYS_HIGH 0x469 | ||
6 | |||
7 | static inline void wait_for_init_deassert(atomic_t *deassert) | ||
8 | { | ||
9 | #ifndef CONFIG_ES7000_CLUSTERED_APIC | ||
10 | while (!atomic_read(deassert)) | ||
11 | cpu_relax(); | ||
12 | #endif | ||
13 | return; | ||
14 | } | ||
15 | |||
16 | /* Nothing to do for most platforms, since cleared by the INIT cycle */ | ||
17 | static inline void smp_callin_clear_local_apic(void) | ||
18 | { | ||
19 | } | ||
20 | |||
21 | static inline void store_NMI_vector(unsigned short *high, unsigned short *low) | ||
22 | { | ||
23 | } | ||
24 | |||
25 | static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | extern void __inquire_remote_apic(int apicid); | ||
30 | |||
31 | static inline void inquire_remote_apic(int apicid) | ||
32 | { | ||
33 | if (apic_verbosity >= APIC_DEBUG) | ||
34 | __inquire_remote_apic(apicid); | ||
35 | } | ||
36 | |||
37 | #endif /* __ASM_MACH_WAKECPU_H */ | ||
diff --git a/arch/x86/include/asm/fixmap_32.h b/arch/x86/include/asm/fixmap_32.h index c7115c1d7217..047d9bab2b31 100644 --- a/arch/x86/include/asm/fixmap_32.h +++ b/arch/x86/include/asm/fixmap_32.h | |||
@@ -95,10 +95,6 @@ enum fixed_addresses { | |||
95 | (__end_of_permanent_fixed_addresses & 255), | 95 | (__end_of_permanent_fixed_addresses & 255), |
96 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, | 96 | FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1, |
97 | FIX_WP_TEST, | 97 | FIX_WP_TEST, |
98 | #ifdef CONFIG_ACPI | ||
99 | FIX_ACPI_BEGIN, | ||
100 | FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, | ||
101 | #endif | ||
102 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | 98 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT |
103 | FIX_OHCI1394_BASE, | 99 | FIX_OHCI1394_BASE, |
104 | #endif | 100 | #endif |
diff --git a/arch/x86/include/asm/fixmap_64.h b/arch/x86/include/asm/fixmap_64.h index 00a30ab9b1a5..298d9ba3faeb 100644 --- a/arch/x86/include/asm/fixmap_64.h +++ b/arch/x86/include/asm/fixmap_64.h | |||
@@ -50,10 +50,6 @@ enum fixed_addresses { | |||
50 | FIX_PARAVIRT_BOOTMAP, | 50 | FIX_PARAVIRT_BOOTMAP, |
51 | #endif | 51 | #endif |
52 | __end_of_permanent_fixed_addresses, | 52 | __end_of_permanent_fixed_addresses, |
53 | #ifdef CONFIG_ACPI | ||
54 | FIX_ACPI_BEGIN, | ||
55 | FIX_ACPI_END = FIX_ACPI_BEGIN + FIX_ACPI_PAGES - 1, | ||
56 | #endif | ||
57 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT | 53 | #ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT |
58 | FIX_OHCI1394_BASE, | 54 | FIX_OHCI1394_BASE, |
59 | #endif | 55 | #endif |
diff --git a/arch/x86/include/asm/genapic.h b/arch/x86/include/asm/genapic.h index d48bee663a6f..4b8b98fa7f25 100644 --- a/arch/x86/include/asm/genapic.h +++ b/arch/x86/include/asm/genapic.h | |||
@@ -1,5 +1 @@ | |||
1 | #ifdef CONFIG_X86_32 | #include <asm/apic.h> | |
2 | # include "genapic_32.h" | ||
3 | #else | ||
4 | # include "genapic_64.h" | ||
5 | #endif | ||
diff --git a/arch/x86/include/asm/genapic_32.h b/arch/x86/include/asm/genapic_32.h deleted file mode 100644 index 4334502d3664..000000000000 --- a/arch/x86/include/asm/genapic_32.h +++ /dev/null | |||
@@ -1,141 +0,0 @@ | |||
1 | #ifndef _ASM_X86_GENAPIC_32_H | ||
2 | #define _ASM_X86_GENAPIC_32_H | ||
3 | |||
4 | #include <asm/mpspec.h> | ||
5 | #include <asm/atomic.h> | ||
6 | |||
7 | /* | ||
8 | * Generic APIC driver interface. | ||
9 | * | ||
10 | * An straight forward mapping of the APIC related parts of the | ||
11 | * x86 subarchitecture interface to a dynamic object. | ||
12 | * | ||
13 | * This is used by the "generic" x86 subarchitecture. | ||
14 | * | ||
15 | * Copyright 2003 Andi Kleen, SuSE Labs. | ||
16 | */ | ||
17 | |||
18 | struct mpc_bus; | ||
19 | struct mpc_table; | ||
20 | struct mpc_cpu; | ||
21 | |||
22 | struct genapic { | ||
23 | char *name; | ||
24 | int (*probe)(void); | ||
25 | |||
26 | int (*apic_id_registered)(void); | ||
27 | const struct cpumask *(*target_cpus)(void); | ||
28 | int int_delivery_mode; | ||
29 | int int_dest_mode; | ||
30 | int ESR_DISABLE; | ||
31 | int apic_destination_logical; | ||
32 | unsigned long (*check_apicid_used)(physid_mask_t bitmap, int apicid); | ||
33 | unsigned long (*check_apicid_present)(int apicid); | ||
34 | int no_balance_irq; | ||
35 | int no_ioapic_check; | ||
36 | void (*init_apic_ldr)(void); | ||
37 | physid_mask_t (*ioapic_phys_id_map)(physid_mask_t map); | ||
38 | |||
39 | void (*setup_apic_routing)(void); | ||
40 | int (*multi_timer_check)(int apic, int irq); | ||
41 | int (*apicid_to_node)(int logical_apicid); | ||
42 | int (*cpu_to_logical_apicid)(int cpu); | ||
43 | int (*cpu_present_to_apicid)(int mps_cpu); | ||
44 | physid_mask_t (*apicid_to_cpu_present)(int phys_apicid); | ||
45 | void (*setup_portio_remap)(void); | ||
46 | int (*check_phys_apicid_present)(int boot_cpu_physical_apicid); | ||
47 | void (*enable_apic_mode)(void); | ||
48 | u32 (*phys_pkg_id)(u32 cpuid_apic, int index_msb); | ||
49 | |||
50 | /* mpparse */ | ||
51 | /* When one of the next two hooks returns 1 the genapic | ||
52 | is switched to this. Essentially they are additional probe | ||
53 | functions. */ | ||
54 | int (*mps_oem_check)(struct mpc_table *mpc, char *oem, | ||
55 | char *productid); | ||
56 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); | ||
57 | |||
58 | unsigned (*get_apic_id)(unsigned long x); | ||
59 | unsigned long apic_id_mask; | ||
60 | unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); | ||
61 | unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, | ||
62 | const struct cpumask *andmask); | ||
63 | void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); | ||
64 | |||
65 | #ifdef CONFIG_SMP | ||
66 | /* ipi */ | ||
67 | void (*send_IPI_mask)(const struct cpumask *mask, int vector); | ||
68 | void (*send_IPI_mask_allbutself)(const struct cpumask *mask, | ||
69 | int vector); | ||
70 | void (*send_IPI_allbutself)(int vector); | ||
71 | void (*send_IPI_all)(int vector); | ||
72 | #endif | ||
73 | int (*wakeup_cpu)(int apicid, unsigned long start_eip); | ||
74 | int trampoline_phys_low; | ||
75 | int trampoline_phys_high; | ||
76 | void (*wait_for_init_deassert)(atomic_t *deassert); | ||
77 | void (*smp_callin_clear_local_apic)(void); | ||
78 | void (*store_NMI_vector)(unsigned short *high, unsigned short *low); | ||
79 | void (*restore_NMI_vector)(unsigned short *high, unsigned short *low); | ||
80 | void (*inquire_remote_apic)(int apicid); | ||
81 | }; | ||
82 | |||
83 | #define APICFUNC(x) .x = x, | ||
84 | |||
85 | /* More functions could be probably marked IPIFUNC and save some space | ||
86 | in UP GENERICARCH kernels, but I don't have the nerve right now | ||
87 | to untangle this mess. -AK */ | ||
88 | #ifdef CONFIG_SMP | ||
89 | #define IPIFUNC(x) APICFUNC(x) | ||
90 | #else | ||
91 | #define IPIFUNC(x) | ||
92 | #endif | ||
93 | |||
94 | #define APIC_INIT(aname, aprobe) \ | ||
95 | { \ | ||
96 | .name = aname, \ | ||
97 | .probe = aprobe, \ | ||
98 | .int_delivery_mode = INT_DELIVERY_MODE, \ | ||
99 | .int_dest_mode = INT_DEST_MODE, \ | ||
100 | .no_balance_irq = NO_BALANCE_IRQ, \ | ||
101 | .ESR_DISABLE = esr_disable, \ | ||
102 | .apic_destination_logical = APIC_DEST_LOGICAL, \ | ||
103 | APICFUNC(apic_id_registered) \ | ||
104 | APICFUNC(target_cpus) \ | ||
105 | APICFUNC(check_apicid_used) \ | ||
106 | APICFUNC(check_apicid_present) \ | ||
107 | APICFUNC(init_apic_ldr) \ | ||
108 | APICFUNC(ioapic_phys_id_map) \ | ||
109 | APICFUNC(setup_apic_routing) \ | ||
110 | APICFUNC(multi_timer_check) \ | ||
111 | APICFUNC(apicid_to_node) \ | ||
112 | APICFUNC(cpu_to_logical_apicid) \ | ||
113 | APICFUNC(cpu_present_to_apicid) \ | ||
114 | APICFUNC(apicid_to_cpu_present) \ | ||
115 | APICFUNC(setup_portio_remap) \ | ||
116 | APICFUNC(check_phys_apicid_present) \ | ||
117 | APICFUNC(mps_oem_check) \ | ||
118 | APICFUNC(get_apic_id) \ | ||
119 | .apic_id_mask = APIC_ID_MASK, \ | ||
120 | APICFUNC(cpu_mask_to_apicid) \ | ||
121 | APICFUNC(cpu_mask_to_apicid_and) \ | ||
122 | APICFUNC(vector_allocation_domain) \ | ||
123 | APICFUNC(acpi_madt_oem_check) \ | ||
124 | IPIFUNC(send_IPI_mask) \ | ||
125 | IPIFUNC(send_IPI_allbutself) \ | ||
126 | IPIFUNC(send_IPI_all) \ | ||
127 | APICFUNC(enable_apic_mode) \ | ||
128 | APICFUNC(phys_pkg_id) \ | ||
129 | .trampoline_phys_low = TRAMPOLINE_PHYS_LOW, \ | ||
130 | .trampoline_phys_high = TRAMPOLINE_PHYS_HIGH, \ | ||
131 | APICFUNC(wait_for_init_deassert) \ | ||
132 | APICFUNC(smp_callin_clear_local_apic) \ | ||
133 | APICFUNC(store_NMI_vector) \ | ||
134 | APICFUNC(restore_NMI_vector) \ | ||
135 | APICFUNC(inquire_remote_apic) \ | ||
136 | } | ||
137 | |||
138 | extern struct genapic *genapic; | ||
139 | extern void es7000_update_genapic_to_cluster(void); | ||
140 | |||
141 | #endif /* _ASM_X86_GENAPIC_32_H */ | ||
diff --git a/arch/x86/include/asm/genapic_64.h b/arch/x86/include/asm/genapic_64.h deleted file mode 100644 index 7bb092c59055..000000000000 --- a/arch/x86/include/asm/genapic_64.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | #ifndef _ASM_X86_GENAPIC_64_H | ||
2 | #define _ASM_X86_GENAPIC_64_H | ||
3 | |||
4 | #include <linux/cpumask.h> | ||
5 | |||
6 | /* | ||
7 | * Copyright 2004 James Cleverdon, IBM. | ||
8 | * Subject to the GNU Public License, v.2 | ||
9 | * | ||
10 | * Generic APIC sub-arch data struct. | ||
11 | * | ||
12 | * Hacked for x86-64 by James Cleverdon from i386 architecture code by | ||
13 | * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and | ||
14 | * James Cleverdon. | ||
15 | */ | ||
16 | |||
17 | struct genapic { | ||
18 | char *name; | ||
19 | int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); | ||
20 | u32 int_delivery_mode; | ||
21 | u32 int_dest_mode; | ||
22 | int (*apic_id_registered)(void); | ||
23 | const struct cpumask *(*target_cpus)(void); | ||
24 | void (*vector_allocation_domain)(int cpu, struct cpumask *retmask); | ||
25 | void (*init_apic_ldr)(void); | ||
26 | /* ipi */ | ||
27 | void (*send_IPI_mask)(const struct cpumask *mask, int vector); | ||
28 | void (*send_IPI_mask_allbutself)(const struct cpumask *mask, | ||
29 | int vector); | ||
30 | void (*send_IPI_allbutself)(int vector); | ||
31 | void (*send_IPI_all)(int vector); | ||
32 | void (*send_IPI_self)(int vector); | ||
33 | /* */ | ||
34 | unsigned int (*cpu_mask_to_apicid)(const struct cpumask *cpumask); | ||
35 | unsigned int (*cpu_mask_to_apicid_and)(const struct cpumask *cpumask, | ||
36 | const struct cpumask *andmask); | ||
37 | unsigned int (*phys_pkg_id)(int index_msb); | ||
38 | unsigned int (*get_apic_id)(unsigned long x); | ||
39 | unsigned long (*set_apic_id)(unsigned int id); | ||
40 | unsigned long apic_id_mask; | ||
41 | /* wakeup_secondary_cpu */ | ||
42 | int (*wakeup_cpu)(int apicid, unsigned long start_eip); | ||
43 | }; | ||
44 | |||
45 | extern struct genapic *genapic; | ||
46 | |||
47 | extern struct genapic apic_flat; | ||
48 | extern struct genapic apic_physflat; | ||
49 | extern struct genapic apic_x2apic_cluster; | ||
50 | extern struct genapic apic_x2apic_phys; | ||
51 | extern int acpi_madt_oem_check(char *, char *); | ||
52 | |||
53 | extern void apic_send_IPI_self(int vector); | ||
54 | |||
55 | extern struct genapic apic_x2apic_uv_x; | ||
56 | DECLARE_PER_CPU(int, x2apic_extra_bits); | ||
57 | |||
58 | extern void setup_apic_routing(void); | ||
59 | |||
60 | #endif /* _ASM_X86_GENAPIC_64_H */ | ||
diff --git a/arch/x86/include/asm/hw_irq.h b/arch/x86/include/asm/hw_irq.h index 8de644b6b959..370e1c83bb49 100644 --- a/arch/x86/include/asm/hw_irq.h +++ b/arch/x86/include/asm/hw_irq.h | |||
@@ -25,8 +25,6 @@ | |||
25 | #include <asm/irq.h> | 25 | #include <asm/irq.h> |
26 | #include <asm/sections.h> | 26 | #include <asm/sections.h> |
27 | 27 | ||
28 | #define platform_legacy_irq(irq) ((irq) < 16) | ||
29 | |||
30 | /* Interrupt handlers registered during init_IRQ */ | 28 | /* Interrupt handlers registered during init_IRQ */ |
31 | extern void apic_timer_interrupt(void); | 29 | extern void apic_timer_interrupt(void); |
32 | extern void error_interrupt(void); | 30 | extern void error_interrupt(void); |
@@ -58,7 +56,7 @@ extern void make_8259A_irq(unsigned int irq); | |||
58 | extern void init_8259A(int aeoi); | 56 | extern void init_8259A(int aeoi); |
59 | 57 | ||
60 | /* IOAPIC */ | 58 | /* IOAPIC */ |
61 | #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) | 59 | #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1<<(x)) & io_apic_irqs)) |
62 | extern unsigned long io_apic_irqs; | 60 | extern unsigned long io_apic_irqs; |
63 | 61 | ||
64 | extern void init_VISWS_APIC_irqs(void); | 62 | extern void init_VISWS_APIC_irqs(void); |
@@ -67,15 +65,7 @@ extern void disable_IO_APIC(void); | |||
67 | extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); | 65 | extern int IO_APIC_get_PCI_irq_vector(int bus, int slot, int fn); |
68 | extern void setup_ioapic_dest(void); | 66 | extern void setup_ioapic_dest(void); |
69 | 67 | ||
70 | #ifdef CONFIG_X86_64 | ||
71 | extern void enable_IO_APIC(void); | 68 | extern void enable_IO_APIC(void); |
72 | #endif | ||
73 | |||
74 | /* IPI functions */ | ||
75 | #ifdef CONFIG_X86_32 | ||
76 | extern void send_IPI_self(int vector); | ||
77 | #endif | ||
78 | extern void send_IPI(int dest, int vector); | ||
79 | 69 | ||
80 | /* Statistics */ | 70 | /* Statistics */ |
81 | extern atomic_t irq_err_count; | 71 | extern atomic_t irq_err_count; |
@@ -84,21 +74,11 @@ extern atomic_t irq_mis_count; | |||
84 | /* EISA */ | 74 | /* EISA */ |
85 | extern void eisa_set_level_irq(unsigned int irq); | 75 | extern void eisa_set_level_irq(unsigned int irq); |
86 | 76 | ||
87 | /* Voyager functions */ | ||
88 | extern asmlinkage void vic_cpi_interrupt(void); | ||
89 | extern asmlinkage void vic_sys_interrupt(void); | ||
90 | extern asmlinkage void vic_cmn_interrupt(void); | ||
91 | extern asmlinkage void qic_timer_interrupt(void); | ||
92 | extern asmlinkage void qic_invalidate_interrupt(void); | ||
93 | extern asmlinkage void qic_reschedule_interrupt(void); | ||
94 | extern asmlinkage void qic_enable_irq_interrupt(void); | ||
95 | extern asmlinkage void qic_call_function_interrupt(void); | ||
96 | |||
97 | /* SMP */ | 77 | /* SMP */ |
98 | extern void smp_apic_timer_interrupt(struct pt_regs *); | 78 | extern void smp_apic_timer_interrupt(struct pt_regs *); |
99 | extern void smp_spurious_interrupt(struct pt_regs *); | 79 | extern void smp_spurious_interrupt(struct pt_regs *); |
100 | extern void smp_error_interrupt(struct pt_regs *); | 80 | extern void smp_error_interrupt(struct pt_regs *); |
101 | #ifdef CONFIG_X86_SMP | 81 | #ifdef CONFIG_SMP |
102 | extern void smp_reschedule_interrupt(struct pt_regs *); | 82 | extern void smp_reschedule_interrupt(struct pt_regs *); |
103 | extern void smp_call_function_interrupt(struct pt_regs *); | 83 | extern void smp_call_function_interrupt(struct pt_regs *); |
104 | extern void smp_call_function_single_interrupt(struct pt_regs *); | 84 | extern void smp_call_function_single_interrupt(struct pt_regs *); |
diff --git a/arch/x86/include/asm/i8259.h b/arch/x86/include/asm/i8259.h index 58d7091eeb1f..1a99e6c092af 100644 --- a/arch/x86/include/asm/i8259.h +++ b/arch/x86/include/asm/i8259.h | |||
@@ -60,4 +60,8 @@ extern struct irq_chip i8259A_chip; | |||
60 | extern void mask_8259A(void); | 60 | extern void mask_8259A(void); |
61 | extern void unmask_8259A(void); | 61 | extern void unmask_8259A(void); |
62 | 62 | ||
63 | #ifdef CONFIG_X86_32 | ||
64 | extern void init_ISA_irqs(void); | ||
65 | #endif | ||
66 | |||
63 | #endif /* _ASM_X86_I8259_H */ | 67 | #endif /* _ASM_X86_I8259_H */ |
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 1dbbdf4be9b4..683d0b4c00fc 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | #include <linux/compiler.h> | 6 | #include <linux/compiler.h> |
7 | #include <asm-generic/int-ll64.h> | 7 | #include <asm-generic/int-ll64.h> |
8 | #include <asm/page.h> | ||
8 | 9 | ||
9 | #define build_mmio_read(name, size, type, reg, barrier) \ | 10 | #define build_mmio_read(name, size, type, reg, barrier) \ |
10 | static inline type name(const volatile void __iomem *addr) \ | 11 | static inline type name(const volatile void __iomem *addr) \ |
@@ -80,6 +81,100 @@ static inline void writeq(__u64 val, volatile void __iomem *addr) | |||
80 | #define readq readq | 81 | #define readq readq |
81 | #define writeq writeq | 82 | #define writeq writeq |
82 | 83 | ||
84 | /** | ||
85 | * virt_to_phys - map virtual addresses to physical | ||
86 | * @address: address to remap | ||
87 | * | ||
88 | * The returned physical address is the physical (CPU) mapping for | ||
89 | * the memory address given. It is only valid to use this function on | ||
90 | * addresses directly mapped or allocated via kmalloc. | ||
91 | * | ||
92 | * This function does not give bus mappings for DMA transfers. In | ||
93 | * almost all conceivable cases a device driver should not be using | ||
94 | * this function | ||
95 | */ | ||
96 | |||
97 | static inline phys_addr_t virt_to_phys(volatile void *address) | ||
98 | { | ||
99 | return __pa(address); | ||
100 | } | ||
101 | |||
102 | /** | ||
103 | * phys_to_virt - map physical address to virtual | ||
104 | * @address: address to remap | ||
105 | * | ||
106 | * The returned virtual address is a current CPU mapping for | ||
107 | * the memory address given. It is only valid to use this function on | ||
108 | * addresses that have a kernel mapping | ||
109 | * | ||
110 | * This function does not handle bus mappings for DMA transfers. In | ||
111 | * almost all conceivable cases a device driver should not be using | ||
112 | * this function | ||
113 | */ | ||
114 | |||
115 | static inline void *phys_to_virt(phys_addr_t address) | ||
116 | { | ||
117 | return __va(address); | ||
118 | } | ||
119 | |||
120 | /* | ||
121 | * Change "struct page" to physical address. | ||
122 | */ | ||
123 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | ||
124 | |||
125 | /* | ||
126 | * ISA I/O bus memory addresses are 1:1 with the physical address. | ||
127 | * However, we truncate the address to unsigned int to avoid undesirable | ||
128 | * promitions in legacy drivers. | ||
129 | */ | ||
130 | static inline unsigned int isa_virt_to_bus(volatile void *address) | ||
131 | { | ||
132 | return (unsigned int)virt_to_phys(address); | ||
133 | } | ||
134 | #define isa_page_to_bus(page) ((unsigned int)page_to_phys(page)) | ||
135 | #define isa_bus_to_virt phys_to_virt | ||
136 | |||
137 | /* | ||
138 | * However PCI ones are not necessarily 1:1 and therefore these interfaces | ||
139 | * are forbidden in portable PCI drivers. | ||
140 | * | ||
141 | * Allow them on x86 for legacy drivers, though. | ||
142 | */ | ||
143 | #define virt_to_bus virt_to_phys | ||
144 | #define bus_to_virt phys_to_virt | ||
145 | |||
146 | /** | ||
147 | * ioremap - map bus memory into CPU space | ||
148 | * @offset: bus address of the memory | ||
149 | * @size: size of the resource to map | ||
150 | * | ||
151 | * ioremap performs a platform specific sequence of operations to | ||
152 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ | ||
153 | * writew/writel functions and the other mmio helpers. The returned | ||
154 | * address is not guaranteed to be usable directly as a virtual | ||
155 | * address. | ||
156 | * | ||
157 | * If the area you are trying to map is a PCI BAR you should have a | ||
158 | * look at pci_iomap(). | ||
159 | */ | ||
160 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
161 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
162 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
163 | unsigned long prot_val); | ||
164 | |||
165 | /* | ||
166 | * The default ioremap() behavior is non-cached: | ||
167 | */ | ||
168 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
169 | { | ||
170 | return ioremap_nocache(offset, size); | ||
171 | } | ||
172 | |||
173 | extern void iounmap(volatile void __iomem *addr); | ||
174 | |||
175 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
176 | |||
177 | |||
83 | #ifdef CONFIG_X86_32 | 178 | #ifdef CONFIG_X86_32 |
84 | # include "io_32.h" | 179 | # include "io_32.h" |
85 | #else | 180 | #else |
@@ -91,7 +186,7 @@ extern void unxlate_dev_mem_ptr(unsigned long phys, void *addr); | |||
91 | 186 | ||
92 | extern int ioremap_change_attr(unsigned long vaddr, unsigned long size, | 187 | extern int ioremap_change_attr(unsigned long vaddr, unsigned long size, |
93 | unsigned long prot_val); | 188 | unsigned long prot_val); |
94 | extern void __iomem *ioremap_wc(unsigned long offset, unsigned long size); | 189 | extern void __iomem *ioremap_wc(resource_size_t offset, unsigned long size); |
95 | 190 | ||
96 | /* | 191 | /* |
97 | * early_ioremap() and early_iounmap() are for temporary early boot-time | 192 | * early_ioremap() and early_iounmap() are for temporary early boot-time |
@@ -105,5 +200,6 @@ extern void __iomem *early_memremap(unsigned long offset, unsigned long size); | |||
105 | extern void early_iounmap(void __iomem *addr, unsigned long size); | 200 | extern void early_iounmap(void __iomem *addr, unsigned long size); |
106 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | 201 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); |
107 | 202 | ||
203 | #define IO_SPACE_LIMIT 0xffff | ||
108 | 204 | ||
109 | #endif /* _ASM_X86_IO_H */ | 205 | #endif /* _ASM_X86_IO_H */ |
diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h index d8e242e1b396..a299900f5920 100644 --- a/arch/x86/include/asm/io_32.h +++ b/arch/x86/include/asm/io_32.h | |||
@@ -37,8 +37,6 @@ | |||
37 | * - Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 37 | * - Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #define IO_SPACE_LIMIT 0xffff | ||
41 | |||
42 | #define XQUAD_PORTIO_BASE 0xfe400000 | 40 | #define XQUAD_PORTIO_BASE 0xfe400000 |
43 | #define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ | 41 | #define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ |
44 | 42 | ||
@@ -53,92 +51,6 @@ | |||
53 | */ | 51 | */ |
54 | #define xlate_dev_kmem_ptr(p) p | 52 | #define xlate_dev_kmem_ptr(p) p |
55 | 53 | ||
56 | /** | ||
57 | * virt_to_phys - map virtual addresses to physical | ||
58 | * @address: address to remap | ||
59 | * | ||
60 | * The returned physical address is the physical (CPU) mapping for | ||
61 | * the memory address given. It is only valid to use this function on | ||
62 | * addresses directly mapped or allocated via kmalloc. | ||
63 | * | ||
64 | * This function does not give bus mappings for DMA transfers. In | ||
65 | * almost all conceivable cases a device driver should not be using | ||
66 | * this function | ||
67 | */ | ||
68 | |||
69 | static inline unsigned long virt_to_phys(volatile void *address) | ||
70 | { | ||
71 | return __pa(address); | ||
72 | } | ||
73 | |||
74 | /** | ||
75 | * phys_to_virt - map physical address to virtual | ||
76 | * @address: address to remap | ||
77 | * | ||
78 | * The returned virtual address is a current CPU mapping for | ||
79 | * the memory address given. It is only valid to use this function on | ||
80 | * addresses that have a kernel mapping | ||
81 | * | ||
82 | * This function does not handle bus mappings for DMA transfers. In | ||
83 | * almost all conceivable cases a device driver should not be using | ||
84 | * this function | ||
85 | */ | ||
86 | |||
87 | static inline void *phys_to_virt(unsigned long address) | ||
88 | { | ||
89 | return __va(address); | ||
90 | } | ||
91 | |||
92 | /* | ||
93 | * Change "struct page" to physical address. | ||
94 | */ | ||
95 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | ||
96 | |||
97 | /** | ||
98 | * ioremap - map bus memory into CPU space | ||
99 | * @offset: bus address of the memory | ||
100 | * @size: size of the resource to map | ||
101 | * | ||
102 | * ioremap performs a platform specific sequence of operations to | ||
103 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ | ||
104 | * writew/writel functions and the other mmio helpers. The returned | ||
105 | * address is not guaranteed to be usable directly as a virtual | ||
106 | * address. | ||
107 | * | ||
108 | * If the area you are trying to map is a PCI BAR you should have a | ||
109 | * look at pci_iomap(). | ||
110 | */ | ||
111 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
112 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
113 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
114 | unsigned long prot_val); | ||
115 | |||
116 | /* | ||
117 | * The default ioremap() behavior is non-cached: | ||
118 | */ | ||
119 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
120 | { | ||
121 | return ioremap_nocache(offset, size); | ||
122 | } | ||
123 | |||
124 | extern void iounmap(volatile void __iomem *addr); | ||
125 | |||
126 | /* | ||
127 | * ISA I/O bus memory addresses are 1:1 with the physical address. | ||
128 | */ | ||
129 | #define isa_virt_to_bus virt_to_phys | ||
130 | #define isa_page_to_bus page_to_phys | ||
131 | #define isa_bus_to_virt phys_to_virt | ||
132 | |||
133 | /* | ||
134 | * However PCI ones are not necessarily 1:1 and therefore these interfaces | ||
135 | * are forbidden in portable PCI drivers. | ||
136 | * | ||
137 | * Allow them on x86 for legacy drivers, though. | ||
138 | */ | ||
139 | #define virt_to_bus virt_to_phys | ||
140 | #define bus_to_virt phys_to_virt | ||
141 | |||
142 | static inline void | 54 | static inline void |
143 | memset_io(volatile void __iomem *addr, unsigned char val, int count) | 55 | memset_io(volatile void __iomem *addr, unsigned char val, int count) |
144 | { | 56 | { |
diff --git a/arch/x86/include/asm/io_64.h b/arch/x86/include/asm/io_64.h index 563c16270ba6..244067893af4 100644 --- a/arch/x86/include/asm/io_64.h +++ b/arch/x86/include/asm/io_64.h | |||
@@ -136,73 +136,12 @@ __OUTS(b) | |||
136 | __OUTS(w) | 136 | __OUTS(w) |
137 | __OUTS(l) | 137 | __OUTS(l) |
138 | 138 | ||
139 | #define IO_SPACE_LIMIT 0xffff | ||
140 | |||
141 | #if defined(__KERNEL__) && defined(__x86_64__) | 139 | #if defined(__KERNEL__) && defined(__x86_64__) |
142 | 140 | ||
143 | #include <linux/vmalloc.h> | 141 | #include <linux/vmalloc.h> |
144 | 142 | ||
145 | #ifndef __i386__ | ||
146 | /* | ||
147 | * Change virtual addresses to physical addresses and vv. | ||
148 | * These are pretty trivial | ||
149 | */ | ||
150 | static inline unsigned long virt_to_phys(volatile void *address) | ||
151 | { | ||
152 | return __pa(address); | ||
153 | } | ||
154 | |||
155 | static inline void *phys_to_virt(unsigned long address) | ||
156 | { | ||
157 | return __va(address); | ||
158 | } | ||
159 | #endif | ||
160 | |||
161 | /* | ||
162 | * Change "struct page" to physical address. | ||
163 | */ | ||
164 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | ||
165 | |||
166 | #include <asm-generic/iomap.h> | 143 | #include <asm-generic/iomap.h> |
167 | 144 | ||
168 | /* | ||
169 | * This one maps high address device memory and turns off caching for that area. | ||
170 | * it's useful if some control registers are in such an area and write combining | ||
171 | * or read caching is not desirable: | ||
172 | */ | ||
173 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
174 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
175 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
176 | unsigned long prot_val); | ||
177 | |||
178 | /* | ||
179 | * The default ioremap() behavior is non-cached: | ||
180 | */ | ||
181 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
182 | { | ||
183 | return ioremap_nocache(offset, size); | ||
184 | } | ||
185 | |||
186 | extern void iounmap(volatile void __iomem *addr); | ||
187 | |||
188 | extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys); | ||
189 | |||
190 | /* | ||
191 | * ISA I/O bus memory addresses are 1:1 with the physical address. | ||
192 | */ | ||
193 | #define isa_virt_to_bus virt_to_phys | ||
194 | #define isa_page_to_bus page_to_phys | ||
195 | #define isa_bus_to_virt phys_to_virt | ||
196 | |||
197 | /* | ||
198 | * However PCI ones are not necessarily 1:1 and therefore these interfaces | ||
199 | * are forbidden in portable PCI drivers. | ||
200 | * | ||
201 | * Allow them on x86 for legacy drivers, though. | ||
202 | */ | ||
203 | #define virt_to_bus virt_to_phys | ||
204 | #define bus_to_virt phys_to_virt | ||
205 | |||
206 | void __memcpy_fromio(void *, unsigned long, unsigned); | 145 | void __memcpy_fromio(void *, unsigned long, unsigned); |
207 | void __memcpy_toio(unsigned long, const void *, unsigned); | 146 | void __memcpy_toio(unsigned long, const void *, unsigned); |
208 | 147 | ||
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 08ec793aa043..59cb4a1317b7 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -143,15 +143,6 @@ extern int noioapicreroute; | |||
143 | /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ | 143 | /* 1 if the timer IRQ uses the '8259A Virtual Wire' mode */ |
144 | extern int timer_through_8259; | 144 | extern int timer_through_8259; |
145 | 145 | ||
146 | static inline void disable_ioapic_setup(void) | ||
147 | { | ||
148 | #ifdef CONFIG_PCI | ||
149 | noioapicquirk = 1; | ||
150 | noioapicreroute = -1; | ||
151 | #endif | ||
152 | skip_ioapic_setup = 1; | ||
153 | } | ||
154 | |||
155 | /* | 146 | /* |
156 | * If we use the IO-APIC for IRQ routing, disable automatic | 147 | * If we use the IO-APIC for IRQ routing, disable automatic |
157 | * assignment of PCI IRQ's. | 148 | * assignment of PCI IRQ's. |
@@ -178,6 +169,12 @@ extern void reinit_intr_remapped_IO_APIC(int); | |||
178 | 169 | ||
179 | extern void probe_nr_irqs_gsi(void); | 170 | extern void probe_nr_irqs_gsi(void); |
180 | 171 | ||
172 | extern int setup_ioapic_entry(int apic, int irq, | ||
173 | struct IO_APIC_route_entry *entry, | ||
174 | unsigned int destination, int trigger, | ||
175 | int polarity, int vector); | ||
176 | extern void ioapic_write_entry(int apic, int pin, | ||
177 | struct IO_APIC_route_entry e); | ||
181 | #else /* !CONFIG_X86_IO_APIC */ | 178 | #else /* !CONFIG_X86_IO_APIC */ |
182 | #define io_apic_assign_pci_irqs 0 | 179 | #define io_apic_assign_pci_irqs 0 |
183 | static const int timer_through_8259 = 0; | 180 | static const int timer_through_8259 = 0; |
diff --git a/arch/x86/include/asm/ipi.h b/arch/x86/include/asm/ipi.h index c745a306f7d3..0b7228268a63 100644 --- a/arch/x86/include/asm/ipi.h +++ b/arch/x86/include/asm/ipi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_X86_IPI_H | 1 | #ifndef _ASM_X86_IPI_H |
2 | #define _ASM_X86_IPI_H | 2 | #define _ASM_X86_IPI_H |
3 | 3 | ||
4 | #ifdef CONFIG_X86_LOCAL_APIC | ||
5 | |||
4 | /* | 6 | /* |
5 | * Copyright 2004 James Cleverdon, IBM. | 7 | * Copyright 2004 James Cleverdon, IBM. |
6 | * Subject to the GNU Public License, v.2 | 8 | * Subject to the GNU Public License, v.2 |
@@ -55,8 +57,8 @@ static inline void __xapic_wait_icr_idle(void) | |||
55 | cpu_relax(); | 57 | cpu_relax(); |
56 | } | 58 | } |
57 | 59 | ||
58 | static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, | 60 | static inline void |
59 | unsigned int dest) | 61 | __default_send_IPI_shortcut(unsigned int shortcut, int vector, unsigned int dest) |
60 | { | 62 | { |
61 | /* | 63 | /* |
62 | * Subtle. In the case of the 'never do double writes' workaround | 64 | * Subtle. In the case of the 'never do double writes' workaround |
@@ -87,8 +89,8 @@ static inline void __send_IPI_shortcut(unsigned int shortcut, int vector, | |||
87 | * This is used to send an IPI with no shorthand notation (the destination is | 89 | * This is used to send an IPI with no shorthand notation (the destination is |
88 | * specified in bits 56 to 63 of the ICR). | 90 | * specified in bits 56 to 63 of the ICR). |
89 | */ | 91 | */ |
90 | static inline void __send_IPI_dest_field(unsigned int mask, int vector, | 92 | static inline void |
91 | unsigned int dest) | 93 | __default_send_IPI_dest_field(unsigned int mask, int vector, unsigned int dest) |
92 | { | 94 | { |
93 | unsigned long cfg; | 95 | unsigned long cfg; |
94 | 96 | ||
@@ -117,41 +119,44 @@ static inline void __send_IPI_dest_field(unsigned int mask, int vector, | |||
117 | native_apic_mem_write(APIC_ICR, cfg); | 119 | native_apic_mem_write(APIC_ICR, cfg); |
118 | } | 120 | } |
119 | 121 | ||
120 | static inline void send_IPI_mask_sequence(const struct cpumask *mask, | 122 | extern void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, |
121 | int vector) | 123 | int vector); |
122 | { | 124 | extern void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask, |
123 | unsigned long flags; | 125 | int vector); |
124 | unsigned long query_cpu; | 126 | extern void default_send_IPI_mask_sequence_logical(const struct cpumask *mask, |
127 | int vector); | ||
128 | extern void default_send_IPI_mask_allbutself_logical(const struct cpumask *mask, | ||
129 | int vector); | ||
125 | 130 | ||
126 | /* | 131 | /* Avoid include hell */ |
127 | * Hack. The clustered APIC addressing mode doesn't allow us to send | 132 | #define NMI_VECTOR 0x02 |
128 | * to an arbitrary mask, so I do a unicast to each CPU instead. | 133 | |
129 | * - mbligh | 134 | extern int no_broadcast; |
130 | */ | 135 | |
131 | local_irq_save(flags); | 136 | static inline void __default_local_send_IPI_allbutself(int vector) |
132 | for_each_cpu(query_cpu, mask) { | 137 | { |
133 | __send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, query_cpu), | 138 | if (no_broadcast || vector == NMI_VECTOR) |
134 | vector, APIC_DEST_PHYSICAL); | 139 | apic->send_IPI_mask_allbutself(cpu_online_mask, vector); |
135 | } | 140 | else |
136 | local_irq_restore(flags); | 141 | __default_send_IPI_shortcut(APIC_DEST_ALLBUT, vector, apic->dest_logical); |
137 | } | 142 | } |
138 | 143 | ||
139 | static inline void send_IPI_mask_allbutself(const struct cpumask *mask, | 144 | static inline void __default_local_send_IPI_all(int vector) |
140 | int vector) | ||
141 | { | 145 | { |
142 | unsigned long flags; | 146 | if (no_broadcast || vector == NMI_VECTOR) |
143 | unsigned int query_cpu; | 147 | apic->send_IPI_mask(cpu_online_mask, vector); |
144 | unsigned int this_cpu = smp_processor_id(); | 148 | else |
145 | 149 | __default_send_IPI_shortcut(APIC_DEST_ALLINC, vector, apic->dest_logical); | |
146 | /* See Hack comment above */ | ||
147 | |||
148 | local_irq_save(flags); | ||
149 | for_each_cpu(query_cpu, mask) | ||
150 | if (query_cpu != this_cpu) | ||
151 | __send_IPI_dest_field( | ||
152 | per_cpu(x86_cpu_to_apicid, query_cpu), | ||
153 | vector, APIC_DEST_PHYSICAL); | ||
154 | local_irq_restore(flags); | ||
155 | } | 150 | } |
156 | 151 | ||
152 | #ifdef CONFIG_X86_32 | ||
153 | extern void default_send_IPI_mask_logical(const struct cpumask *mask, | ||
154 | int vector); | ||
155 | extern void default_send_IPI_allbutself(int vector); | ||
156 | extern void default_send_IPI_all(int vector); | ||
157 | extern void default_send_IPI_self(int vector); | ||
158 | #endif | ||
159 | |||
160 | #endif | ||
161 | |||
157 | #endif /* _ASM_X86_IPI_H */ | 162 | #endif /* _ASM_X86_IPI_H */ |
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h index 592688ed04d3..107eb2196691 100644 --- a/arch/x86/include/asm/irq.h +++ b/arch/x86/include/asm/irq.h | |||
@@ -36,9 +36,11 @@ static inline int irq_canonicalize(int irq) | |||
36 | extern void fixup_irqs(void); | 36 | extern void fixup_irqs(void); |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | extern unsigned int do_IRQ(struct pt_regs *regs); | ||
40 | extern void init_IRQ(void); | 39 | extern void init_IRQ(void); |
41 | extern void native_init_IRQ(void); | 40 | extern void native_init_IRQ(void); |
41 | extern bool handle_irq(unsigned irq, struct pt_regs *regs); | ||
42 | |||
43 | extern unsigned int do_IRQ(struct pt_regs *regs); | ||
42 | 44 | ||
43 | /* Interrupt vector management */ | 45 | /* Interrupt vector management */ |
44 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); | 46 | extern DECLARE_BITMAP(used_vectors, NR_VECTORS); |
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index 9a83a10a5d51..8a285f356f8a 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h | |||
@@ -1,47 +1,69 @@ | |||
1 | #ifndef _ASM_X86_IRQ_VECTORS_H | 1 | #ifndef _ASM_X86_IRQ_VECTORS_H |
2 | #define _ASM_X86_IRQ_VECTORS_H | 2 | #define _ASM_X86_IRQ_VECTORS_H |
3 | 3 | ||
4 | #include <linux/threads.h> | 4 | /* |
5 | * Linux IRQ vector layout. | ||
6 | * | ||
7 | * There are 256 IDT entries (per CPU - each entry is 8 bytes) which can | ||
8 | * be defined by Linux. They are used as a jump table by the CPU when a | ||
9 | * given vector is triggered - by a CPU-external, CPU-internal or | ||
10 | * software-triggered event. | ||
11 | * | ||
12 | * Linux sets the kernel code address each entry jumps to early during | ||
13 | * bootup, and never changes them. This is the general layout of the | ||
14 | * IDT entries: | ||
15 | * | ||
16 | * Vectors 0 ... 31 : system traps and exceptions - hardcoded events | ||
17 | * Vectors 32 ... 127 : device interrupts | ||
18 | * Vector 128 : legacy int80 syscall interface | ||
19 | * Vectors 129 ... 237 : device interrupts | ||
20 | * Vectors 238 ... 255 : special interrupts | ||
21 | * | ||
22 | * 64-bit x86 has per CPU IDT tables, 32-bit has one shared IDT table. | ||
23 | * | ||
24 | * This file enumerates the exact layout of them: | ||
25 | */ | ||
5 | 26 | ||
6 | #define NMI_VECTOR 0x02 | 27 | #define NMI_VECTOR 0x02 |
7 | 28 | ||
8 | /* | 29 | /* |
9 | * IDT vectors usable for external interrupt sources start | 30 | * IDT vectors usable for external interrupt sources start |
10 | * at 0x20: | 31 | * at 0x20: |
11 | */ | 32 | */ |
12 | #define FIRST_EXTERNAL_VECTOR 0x20 | 33 | #define FIRST_EXTERNAL_VECTOR 0x20 |
13 | 34 | ||
14 | #ifdef CONFIG_X86_32 | 35 | #ifdef CONFIG_X86_32 |
15 | # define SYSCALL_VECTOR 0x80 | 36 | # define SYSCALL_VECTOR 0x80 |
16 | #else | 37 | #else |
17 | # define IA32_SYSCALL_VECTOR 0x80 | 38 | # define IA32_SYSCALL_VECTOR 0x80 |
18 | #endif | 39 | #endif |
19 | 40 | ||
20 | /* | 41 | /* |
21 | * Reserve the lowest usable priority level 0x20 - 0x2f for triggering | 42 | * Reserve the lowest usable priority level 0x20 - 0x2f for triggering |
22 | * cleanup after irq migration. | 43 | * cleanup after irq migration. |
23 | */ | 44 | */ |
24 | #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR | 45 | #define IRQ_MOVE_CLEANUP_VECTOR FIRST_EXTERNAL_VECTOR |
25 | 46 | ||
26 | /* | 47 | /* |
27 | * Vectors 0x30-0x3f are used for ISA interrupts. | 48 | * Vectors 0x30-0x3f are used for ISA interrupts. |
28 | */ | 49 | */ |
29 | #define IRQ0_VECTOR (FIRST_EXTERNAL_VECTOR + 0x10) | 50 | #define IRQ0_VECTOR (FIRST_EXTERNAL_VECTOR + 0x10) |
30 | #define IRQ1_VECTOR (IRQ0_VECTOR + 1) | 51 | |
31 | #define IRQ2_VECTOR (IRQ0_VECTOR + 2) | 52 | #define IRQ1_VECTOR (IRQ0_VECTOR + 1) |
32 | #define IRQ3_VECTOR (IRQ0_VECTOR + 3) | 53 | #define IRQ2_VECTOR (IRQ0_VECTOR + 2) |
33 | #define IRQ4_VECTOR (IRQ0_VECTOR + 4) | 54 | #define IRQ3_VECTOR (IRQ0_VECTOR + 3) |
34 | #define IRQ5_VECTOR (IRQ0_VECTOR + 5) | 55 | #define IRQ4_VECTOR (IRQ0_VECTOR + 4) |
35 | #define IRQ6_VECTOR (IRQ0_VECTOR + 6) | 56 | #define IRQ5_VECTOR (IRQ0_VECTOR + 5) |
36 | #define IRQ7_VECTOR (IRQ0_VECTOR + 7) | 57 | #define IRQ6_VECTOR (IRQ0_VECTOR + 6) |
37 | #define IRQ8_VECTOR (IRQ0_VECTOR + 8) | 58 | #define IRQ7_VECTOR (IRQ0_VECTOR + 7) |
38 | #define IRQ9_VECTOR (IRQ0_VECTOR + 9) | 59 | #define IRQ8_VECTOR (IRQ0_VECTOR + 8) |
39 | #define IRQ10_VECTOR (IRQ0_VECTOR + 10) | 60 | #define IRQ9_VECTOR (IRQ0_VECTOR + 9) |
40 | #define IRQ11_VECTOR (IRQ0_VECTOR + 11) | 61 | #define IRQ10_VECTOR (IRQ0_VECTOR + 10) |
41 | #define IRQ12_VECTOR (IRQ0_VECTOR + 12) | 62 | #define IRQ11_VECTOR (IRQ0_VECTOR + 11) |
42 | #define IRQ13_VECTOR (IRQ0_VECTOR + 13) | 63 | #define IRQ12_VECTOR (IRQ0_VECTOR + 12) |
43 | #define IRQ14_VECTOR (IRQ0_VECTOR + 14) | 64 | #define IRQ13_VECTOR (IRQ0_VECTOR + 13) |
44 | #define IRQ15_VECTOR (IRQ0_VECTOR + 15) | 65 | #define IRQ14_VECTOR (IRQ0_VECTOR + 14) |
66 | #define IRQ15_VECTOR (IRQ0_VECTOR + 15) | ||
45 | 67 | ||
46 | /* | 68 | /* |
47 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff | 69 | * Special IRQ vectors used by the SMP architecture, 0xf0-0xff |
@@ -50,123 +72,97 @@ | |||
50 | * into a single vector (CALL_FUNCTION_VECTOR) to save vector space. | 72 | * into a single vector (CALL_FUNCTION_VECTOR) to save vector space. |
51 | * TLB, reschedule and local APIC vectors are performance-critical. | 73 | * TLB, reschedule and local APIC vectors are performance-critical. |
52 | */ | 74 | */ |
53 | #ifdef CONFIG_X86_32 | ||
54 | 75 | ||
55 | # define SPURIOUS_APIC_VECTOR 0xff | 76 | #define SPURIOUS_APIC_VECTOR 0xff |
56 | # define ERROR_APIC_VECTOR 0xfe | 77 | /* |
57 | # define RESCHEDULE_VECTOR 0xfd | 78 | * Sanity check |
58 | # define CALL_FUNCTION_VECTOR 0xfc | 79 | */ |
59 | # define CALL_FUNCTION_SINGLE_VECTOR 0xfb | 80 | #if ((SPURIOUS_APIC_VECTOR & 0x0F) != 0x0F) |
60 | # define THERMAL_APIC_VECTOR 0xfa | 81 | # error SPURIOUS_APIC_VECTOR definition error |
61 | /* 0xf8 - 0xf9 : free */ | 82 | #endif |
62 | # define INVALIDATE_TLB_VECTOR_END 0xf7 | ||
63 | # define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */ | ||
64 | 83 | ||
65 | # define NUM_INVALIDATE_TLB_VECTORS 8 | 84 | #define ERROR_APIC_VECTOR 0xfe |
85 | #define RESCHEDULE_VECTOR 0xfd | ||
86 | #define CALL_FUNCTION_VECTOR 0xfc | ||
87 | #define CALL_FUNCTION_SINGLE_VECTOR 0xfb | ||
88 | #define THERMAL_APIC_VECTOR 0xfa | ||
66 | 89 | ||
90 | #ifdef CONFIG_X86_32 | ||
91 | /* 0xf8 - 0xf9 : free */ | ||
67 | #else | 92 | #else |
68 | |||
69 | # define SPURIOUS_APIC_VECTOR 0xff | ||
70 | # define ERROR_APIC_VECTOR 0xfe | ||
71 | # define RESCHEDULE_VECTOR 0xfd | ||
72 | # define CALL_FUNCTION_VECTOR 0xfc | ||
73 | # define CALL_FUNCTION_SINGLE_VECTOR 0xfb | ||
74 | # define THERMAL_APIC_VECTOR 0xfa | ||
75 | # define THRESHOLD_APIC_VECTOR 0xf9 | 93 | # define THRESHOLD_APIC_VECTOR 0xf9 |
76 | # define UV_BAU_MESSAGE 0xf8 | 94 | # define UV_BAU_MESSAGE 0xf8 |
77 | # define INVALIDATE_TLB_VECTOR_END 0xf7 | ||
78 | # define INVALIDATE_TLB_VECTOR_START 0xf0 /* f0-f7 used for TLB flush */ | ||
79 | |||
80 | #define NUM_INVALIDATE_TLB_VECTORS 8 | ||
81 | |||
82 | #endif | 95 | #endif |
83 | 96 | ||
97 | /* f0-f7 used for spreading out TLB flushes: */ | ||
98 | #define INVALIDATE_TLB_VECTOR_END 0xf7 | ||
99 | #define INVALIDATE_TLB_VECTOR_START 0xf0 | ||
100 | #define NUM_INVALIDATE_TLB_VECTORS 8 | ||
101 | |||
84 | /* | 102 | /* |
85 | * Local APIC timer IRQ vector is on a different priority level, | 103 | * Local APIC timer IRQ vector is on a different priority level, |
86 | * to work around the 'lost local interrupt if more than 2 IRQ | 104 | * to work around the 'lost local interrupt if more than 2 IRQ |
87 | * sources per level' errata. | 105 | * sources per level' errata. |
88 | */ | 106 | */ |
89 | #define LOCAL_TIMER_VECTOR 0xef | 107 | #define LOCAL_TIMER_VECTOR 0xef |
108 | |||
109 | /* | ||
110 | * Performance monitoring interrupt vector: | ||
111 | */ | ||
112 | #define LOCAL_PERF_VECTOR 0xee | ||
90 | 113 | ||
91 | /* | 114 | /* |
92 | * First APIC vector available to drivers: (vectors 0x30-0xee) we | 115 | * First APIC vector available to drivers: (vectors 0x30-0xee) we |
93 | * start at 0x31(0x41) to spread out vectors evenly between priority | 116 | * start at 0x31(0x41) to spread out vectors evenly between priority |
94 | * levels. (0x80 is the syscall vector) | 117 | * levels. (0x80 is the syscall vector) |
95 | */ | 118 | */ |
96 | #define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) | 119 | #define FIRST_DEVICE_VECTOR (IRQ15_VECTOR + 2) |
97 | |||
98 | #define NR_VECTORS 256 | ||
99 | |||
100 | #define FPU_IRQ 13 | ||
101 | |||
102 | #define FIRST_VM86_IRQ 3 | ||
103 | #define LAST_VM86_IRQ 15 | ||
104 | #define invalid_vm86_irq(irq) ((irq) < 3 || (irq) > 15) | ||
105 | 120 | ||
106 | #define NR_IRQS_LEGACY 16 | 121 | #define NR_VECTORS 256 |
107 | 122 | ||
108 | #if defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_VOYAGER) | 123 | #define FPU_IRQ 13 |
109 | |||
110 | #include <asm/apicnum.h> /* need MAX_IO_APICS */ | ||
111 | |||
112 | #ifndef CONFIG_SPARSE_IRQ | ||
113 | # if NR_CPUS < MAX_IO_APICS | ||
114 | # define NR_IRQS (NR_VECTORS + (32 * NR_CPUS)) | ||
115 | # else | ||
116 | # define NR_IRQS (NR_VECTORS + (32 * MAX_IO_APICS)) | ||
117 | # endif | ||
118 | #else | ||
119 | 124 | ||
120 | # define NR_IRQS \ | 125 | #define FIRST_VM86_IRQ 3 |
121 | ((8 * NR_CPUS) > (32 * MAX_IO_APICS) ? \ | 126 | #define LAST_VM86_IRQ 15 |
122 | (NR_VECTORS + (8 * NR_CPUS)) : \ | ||
123 | (NR_VECTORS + (32 * MAX_IO_APICS))) \ | ||
124 | 127 | ||
128 | #ifndef __ASSEMBLY__ | ||
129 | static inline int invalid_vm86_irq(int irq) | ||
130 | { | ||
131 | return irq < FIRST_VM86_IRQ || irq > LAST_VM86_IRQ; | ||
132 | } | ||
125 | #endif | 133 | #endif |
126 | 134 | ||
127 | #elif defined(CONFIG_X86_VOYAGER) | 135 | /* |
128 | 136 | * Size the maximum number of interrupts. | |
129 | # define NR_IRQS 224 | 137 | * |
138 | * If the irq_desc[] array has a sparse layout, we can size things | ||
139 | * generously - it scales up linearly with the maximum number of CPUs, | ||
140 | * and the maximum number of IO-APICs, whichever is higher. | ||
141 | * | ||
142 | * In other cases we size more conservatively, to not create too large | ||
143 | * static arrays. | ||
144 | */ | ||
130 | 145 | ||
131 | #else /* IO_APIC || VOYAGER */ | 146 | #define NR_IRQS_LEGACY 16 |
132 | 147 | ||
133 | # define NR_IRQS 16 | 148 | #define CPU_VECTOR_LIMIT ( 8 * NR_CPUS ) |
149 | #define IO_APIC_VECTOR_LIMIT ( 32 * MAX_IO_APICS ) | ||
134 | 150 | ||
151 | #ifdef CONFIG_X86_IO_APIC | ||
152 | # ifdef CONFIG_SPARSE_IRQ | ||
153 | # define NR_IRQS \ | ||
154 | (CPU_VECTOR_LIMIT > IO_APIC_VECTOR_LIMIT ? \ | ||
155 | (NR_VECTORS + CPU_VECTOR_LIMIT) : \ | ||
156 | (NR_VECTORS + IO_APIC_VECTOR_LIMIT)) | ||
157 | # else | ||
158 | # if NR_CPUS < MAX_IO_APICS | ||
159 | # define NR_IRQS (NR_VECTORS + 4*CPU_VECTOR_LIMIT) | ||
160 | # else | ||
161 | # define NR_IRQS (NR_VECTORS + IO_APIC_VECTOR_LIMIT) | ||
162 | # endif | ||
163 | # endif | ||
164 | #else /* !CONFIG_X86_IO_APIC: */ | ||
165 | # define NR_IRQS NR_IRQS_LEGACY | ||
135 | #endif | 166 | #endif |
136 | 167 | ||
137 | /* Voyager specific defines */ | ||
138 | /* These define the CPIs we use in linux */ | ||
139 | #define VIC_CPI_LEVEL0 0 | ||
140 | #define VIC_CPI_LEVEL1 1 | ||
141 | /* now the fake CPIs */ | ||
142 | #define VIC_TIMER_CPI 2 | ||
143 | #define VIC_INVALIDATE_CPI 3 | ||
144 | #define VIC_RESCHEDULE_CPI 4 | ||
145 | #define VIC_ENABLE_IRQ_CPI 5 | ||
146 | #define VIC_CALL_FUNCTION_CPI 6 | ||
147 | #define VIC_CALL_FUNCTION_SINGLE_CPI 7 | ||
148 | |||
149 | /* Now the QIC CPIs: Since we don't need the two initial levels, | ||
150 | * these are 2 less than the VIC CPIs */ | ||
151 | #define QIC_CPI_OFFSET 1 | ||
152 | #define QIC_TIMER_CPI (VIC_TIMER_CPI - QIC_CPI_OFFSET) | ||
153 | #define QIC_INVALIDATE_CPI (VIC_INVALIDATE_CPI - QIC_CPI_OFFSET) | ||
154 | #define QIC_RESCHEDULE_CPI (VIC_RESCHEDULE_CPI - QIC_CPI_OFFSET) | ||
155 | #define QIC_ENABLE_IRQ_CPI (VIC_ENABLE_IRQ_CPI - QIC_CPI_OFFSET) | ||
156 | #define QIC_CALL_FUNCTION_CPI (VIC_CALL_FUNCTION_CPI - QIC_CPI_OFFSET) | ||
157 | #define QIC_CALL_FUNCTION_SINGLE_CPI (VIC_CALL_FUNCTION_SINGLE_CPI - QIC_CPI_OFFSET) | ||
158 | |||
159 | #define VIC_START_FAKE_CPI VIC_TIMER_CPI | ||
160 | #define VIC_END_FAKE_CPI VIC_CALL_FUNCTION_SINGLE_CPI | ||
161 | |||
162 | /* this is the SYS_INT CPI. */ | ||
163 | #define VIC_SYS_INT 8 | ||
164 | #define VIC_CMN_INT 15 | ||
165 | |||
166 | /* This is the boot CPI for alternate processors. It gets overwritten | ||
167 | * by the above once the system has activated all available processors */ | ||
168 | #define VIC_CPU_BOOT_CPI VIC_CPI_LEVEL0 | ||
169 | #define VIC_CPU_BOOT_ERRATA_CPI (VIC_CPI_LEVEL0 + 8) | ||
170 | |||
171 | |||
172 | #endif /* _ASM_X86_IRQ_VECTORS_H */ | 168 | #endif /* _ASM_X86_IRQ_VECTORS_H */ |
diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h index c61d8b2ab8b9..0ceb6d19ed30 100644 --- a/arch/x86/include/asm/kexec.h +++ b/arch/x86/include/asm/kexec.h | |||
@@ -9,23 +9,8 @@ | |||
9 | # define PAGES_NR 4 | 9 | # define PAGES_NR 4 |
10 | #else | 10 | #else |
11 | # define PA_CONTROL_PAGE 0 | 11 | # define PA_CONTROL_PAGE 0 |
12 | # define VA_CONTROL_PAGE 1 | 12 | # define PA_TABLE_PAGE 1 |
13 | # define PA_PGD 2 | 13 | # define PAGES_NR 2 |
14 | # define VA_PGD 3 | ||
15 | # define PA_PUD_0 4 | ||
16 | # define VA_PUD_0 5 | ||
17 | # define PA_PMD_0 6 | ||
18 | # define VA_PMD_0 7 | ||
19 | # define PA_PTE_0 8 | ||
20 | # define VA_PTE_0 9 | ||
21 | # define PA_PUD_1 10 | ||
22 | # define VA_PUD_1 11 | ||
23 | # define PA_PMD_1 12 | ||
24 | # define VA_PMD_1 13 | ||
25 | # define PA_PTE_1 14 | ||
26 | # define VA_PTE_1 15 | ||
27 | # define PA_TABLE_PAGE 16 | ||
28 | # define PAGES_NR 17 | ||
29 | #endif | 14 | #endif |
30 | 15 | ||
31 | #ifdef CONFIG_X86_32 | 16 | #ifdef CONFIG_X86_32 |
@@ -157,9 +142,9 @@ relocate_kernel(unsigned long indirection_page, | |||
157 | unsigned long start_address) ATTRIB_NORET; | 142 | unsigned long start_address) ATTRIB_NORET; |
158 | #endif | 143 | #endif |
159 | 144 | ||
160 | #ifdef CONFIG_X86_32 | ||
161 | #define ARCH_HAS_KIMAGE_ARCH | 145 | #define ARCH_HAS_KIMAGE_ARCH |
162 | 146 | ||
147 | #ifdef CONFIG_X86_32 | ||
163 | struct kimage_arch { | 148 | struct kimage_arch { |
164 | pgd_t *pgd; | 149 | pgd_t *pgd; |
165 | #ifdef CONFIG_X86_PAE | 150 | #ifdef CONFIG_X86_PAE |
@@ -169,6 +154,12 @@ struct kimage_arch { | |||
169 | pte_t *pte0; | 154 | pte_t *pte0; |
170 | pte_t *pte1; | 155 | pte_t *pte1; |
171 | }; | 156 | }; |
157 | #else | ||
158 | struct kimage_arch { | ||
159 | pud_t *pud; | ||
160 | pmd_t *pmd; | ||
161 | pte_t *pte; | ||
162 | }; | ||
172 | #endif | 163 | #endif |
173 | 164 | ||
174 | #endif /* __ASSEMBLY__ */ | 165 | #endif /* __ASSEMBLY__ */ |
diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h index d2e3bf3608af..886c9402ec45 100644 --- a/arch/x86/include/asm/kvm.h +++ b/arch/x86/include/asm/kvm.h | |||
@@ -9,6 +9,13 @@ | |||
9 | #include <linux/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/ioctl.h> | 10 | #include <linux/ioctl.h> |
11 | 11 | ||
12 | /* Select x86 specific features in <linux/kvm.h> */ | ||
13 | #define __KVM_HAVE_PIT | ||
14 | #define __KVM_HAVE_IOAPIC | ||
15 | #define __KVM_HAVE_DEVICE_ASSIGNMENT | ||
16 | #define __KVM_HAVE_MSI | ||
17 | #define __KVM_HAVE_USER_NMI | ||
18 | |||
12 | /* Architectural interrupt line count. */ | 19 | /* Architectural interrupt line count. */ |
13 | #define KVM_NR_INTERRUPTS 256 | 20 | #define KVM_NR_INTERRUPTS 256 |
14 | 21 | ||
diff --git a/arch/x86/include/asm/linkage.h b/arch/x86/include/asm/linkage.h index 5d98d0b68ffc..9320e2a8a26a 100644 --- a/arch/x86/include/asm/linkage.h +++ b/arch/x86/include/asm/linkage.h | |||
@@ -52,70 +52,14 @@ | |||
52 | 52 | ||
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | #define GLOBAL(name) \ | ||
56 | .globl name; \ | ||
57 | name: | ||
58 | |||
55 | #ifdef CONFIG_X86_ALIGNMENT_16 | 59 | #ifdef CONFIG_X86_ALIGNMENT_16 |
56 | #define __ALIGN .align 16,0x90 | 60 | #define __ALIGN .align 16,0x90 |
57 | #define __ALIGN_STR ".align 16,0x90" | 61 | #define __ALIGN_STR ".align 16,0x90" |
58 | #endif | 62 | #endif |
59 | 63 | ||
60 | /* | ||
61 | * to check ENTRY_X86/END_X86 and | ||
62 | * KPROBE_ENTRY_X86/KPROBE_END_X86 | ||
63 | * unbalanced-missed-mixed appearance | ||
64 | */ | ||
65 | #define __set_entry_x86 .set ENTRY_X86_IN, 0 | ||
66 | #define __unset_entry_x86 .set ENTRY_X86_IN, 1 | ||
67 | #define __set_kprobe_x86 .set KPROBE_X86_IN, 0 | ||
68 | #define __unset_kprobe_x86 .set KPROBE_X86_IN, 1 | ||
69 | |||
70 | #define __macro_err_x86 .error "ENTRY_X86/KPROBE_X86 unbalanced,missed,mixed" | ||
71 | |||
72 | #define __check_entry_x86 \ | ||
73 | .ifdef ENTRY_X86_IN; \ | ||
74 | .ifeq ENTRY_X86_IN; \ | ||
75 | __macro_err_x86; \ | ||
76 | .abort; \ | ||
77 | .endif; \ | ||
78 | .endif | ||
79 | |||
80 | #define __check_kprobe_x86 \ | ||
81 | .ifdef KPROBE_X86_IN; \ | ||
82 | .ifeq KPROBE_X86_IN; \ | ||
83 | __macro_err_x86; \ | ||
84 | .abort; \ | ||
85 | .endif; \ | ||
86 | .endif | ||
87 | |||
88 | #define __check_entry_kprobe_x86 \ | ||
89 | __check_entry_x86; \ | ||
90 | __check_kprobe_x86 | ||
91 | |||
92 | #define ENTRY_KPROBE_FINAL_X86 __check_entry_kprobe_x86 | ||
93 | |||
94 | #define ENTRY_X86(name) \ | ||
95 | __check_entry_kprobe_x86; \ | ||
96 | __set_entry_x86; \ | ||
97 | .globl name; \ | ||
98 | __ALIGN; \ | ||
99 | name: | ||
100 | |||
101 | #define END_X86(name) \ | ||
102 | __unset_entry_x86; \ | ||
103 | __check_entry_kprobe_x86; \ | ||
104 | .size name, .-name | ||
105 | |||
106 | #define KPROBE_ENTRY_X86(name) \ | ||
107 | __check_entry_kprobe_x86; \ | ||
108 | __set_kprobe_x86; \ | ||
109 | .pushsection .kprobes.text, "ax"; \ | ||
110 | .globl name; \ | ||
111 | __ALIGN; \ | ||
112 | name: | ||
113 | |||
114 | #define KPROBE_END_X86(name) \ | ||
115 | __unset_kprobe_x86; \ | ||
116 | __check_entry_kprobe_x86; \ | ||
117 | .size name, .-name; \ | ||
118 | .popsection | ||
119 | |||
120 | #endif /* _ASM_X86_LINKAGE_H */ | 64 | #endif /* _ASM_X86_LINKAGE_H */ |
121 | 65 | ||
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h deleted file mode 100644 index cc09cbbee27e..000000000000 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_APIC_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_APIC_H | ||
3 | |||
4 | #ifdef CONFIG_X86_LOCAL_APIC | ||
5 | |||
6 | #include <mach_apicdef.h> | ||
7 | #include <asm/smp.h> | ||
8 | |||
9 | #define APIC_DFR_VALUE (APIC_DFR_FLAT) | ||
10 | |||
11 | static inline const struct cpumask *target_cpus(void) | ||
12 | { | ||
13 | #ifdef CONFIG_SMP | ||
14 | return cpu_online_mask; | ||
15 | #else | ||
16 | return cpumask_of(0); | ||
17 | #endif | ||
18 | } | ||
19 | |||
20 | #define NO_BALANCE_IRQ (0) | ||
21 | #define esr_disable (0) | ||
22 | |||
23 | #ifdef CONFIG_X86_64 | ||
24 | #include <asm/genapic.h> | ||
25 | #define INT_DELIVERY_MODE (genapic->int_delivery_mode) | ||
26 | #define INT_DEST_MODE (genapic->int_dest_mode) | ||
27 | #define TARGET_CPUS (genapic->target_cpus()) | ||
28 | #define apic_id_registered (genapic->apic_id_registered) | ||
29 | #define init_apic_ldr (genapic->init_apic_ldr) | ||
30 | #define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) | ||
31 | #define cpu_mask_to_apicid_and (genapic->cpu_mask_to_apicid_and) | ||
32 | #define phys_pkg_id (genapic->phys_pkg_id) | ||
33 | #define vector_allocation_domain (genapic->vector_allocation_domain) | ||
34 | #define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID))) | ||
35 | #define send_IPI_self (genapic->send_IPI_self) | ||
36 | #define wakeup_secondary_cpu (genapic->wakeup_cpu) | ||
37 | extern void setup_apic_routing(void); | ||
38 | #else | ||
39 | #define INT_DELIVERY_MODE dest_LowestPrio | ||
40 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ | ||
41 | #define TARGET_CPUS (target_cpus()) | ||
42 | #define wakeup_secondary_cpu wakeup_secondary_cpu_via_init | ||
43 | /* | ||
44 | * Set up the logical destination ID. | ||
45 | * | ||
46 | * Intel recommends to set DFR, LDR and TPR before enabling | ||
47 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
48 | * document number 292116). So here it goes... | ||
49 | */ | ||
50 | static inline void init_apic_ldr(void) | ||
51 | { | ||
52 | unsigned long val; | ||
53 | |||
54 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
55 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
56 | val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id()); | ||
57 | apic_write(APIC_LDR, val); | ||
58 | } | ||
59 | |||
60 | static inline int apic_id_registered(void) | ||
61 | { | ||
62 | return physid_isset(read_apic_id(), phys_cpu_present_map); | ||
63 | } | ||
64 | |||
65 | static inline unsigned int cpu_mask_to_apicid(const struct cpumask *cpumask) | ||
66 | { | ||
67 | return cpumask_bits(cpumask)[0]; | ||
68 | } | ||
69 | |||
70 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
71 | const struct cpumask *andmask) | ||
72 | { | ||
73 | unsigned long mask1 = cpumask_bits(cpumask)[0]; | ||
74 | unsigned long mask2 = cpumask_bits(andmask)[0]; | ||
75 | unsigned long mask3 = cpumask_bits(cpu_online_mask)[0]; | ||
76 | |||
77 | return (unsigned int)(mask1 & mask2 & mask3); | ||
78 | } | ||
79 | |||
80 | static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | ||
81 | { | ||
82 | return cpuid_apic >> index_msb; | ||
83 | } | ||
84 | |||
85 | static inline void setup_apic_routing(void) | ||
86 | { | ||
87 | #ifdef CONFIG_X86_IO_APIC | ||
88 | printk("Enabling APIC mode: %s. Using %d I/O APICs\n", | ||
89 | "Flat", nr_ioapics); | ||
90 | #endif | ||
91 | } | ||
92 | |||
93 | static inline int apicid_to_node(int logical_apicid) | ||
94 | { | ||
95 | #ifdef CONFIG_SMP | ||
96 | return apicid_2_node[hard_smp_processor_id()]; | ||
97 | #else | ||
98 | return 0; | ||
99 | #endif | ||
100 | } | ||
101 | |||
102 | static inline void vector_allocation_domain(int cpu, struct cpumask *retmask) | ||
103 | { | ||
104 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
105 | * specified in the interrupt destination when using lowest | ||
106 | * priority interrupt delivery mode. | ||
107 | * | ||
108 | * In particular there was a hyperthreading cpu observed to | ||
109 | * deliver interrupts to the wrong hyperthread when only one | ||
110 | * hyperthread was specified in the interrupt desitination. | ||
111 | */ | ||
112 | *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } }; | ||
113 | } | ||
114 | #endif | ||
115 | |||
116 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | ||
117 | { | ||
118 | return physid_isset(apicid, bitmap); | ||
119 | } | ||
120 | |||
121 | static inline unsigned long check_apicid_present(int bit) | ||
122 | { | ||
123 | return physid_isset(bit, phys_cpu_present_map); | ||
124 | } | ||
125 | |||
126 | static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) | ||
127 | { | ||
128 | return phys_map; | ||
129 | } | ||
130 | |||
131 | static inline int multi_timer_check(int apic, int irq) | ||
132 | { | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | /* Mapping from cpu number to logical apicid */ | ||
137 | static inline int cpu_to_logical_apicid(int cpu) | ||
138 | { | ||
139 | return 1 << cpu; | ||
140 | } | ||
141 | |||
142 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
143 | { | ||
144 | if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) | ||
145 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
146 | else | ||
147 | return BAD_APICID; | ||
148 | } | ||
149 | |||
150 | static inline physid_mask_t apicid_to_cpu_present(int phys_apicid) | ||
151 | { | ||
152 | return physid_mask_of_physid(phys_apicid); | ||
153 | } | ||
154 | |||
155 | static inline void setup_portio_remap(void) | ||
156 | { | ||
157 | } | ||
158 | |||
159 | static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
160 | { | ||
161 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | ||
162 | } | ||
163 | |||
164 | static inline void enable_apic_mode(void) | ||
165 | { | ||
166 | } | ||
167 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
168 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APIC_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_apicdef.h b/arch/x86/include/asm/mach-default/mach_apicdef.h deleted file mode 100644 index 53179936d6c6..000000000000 --- a/arch/x86/include/asm/mach-default/mach_apicdef.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H | ||
3 | |||
4 | #include <asm/apic.h> | ||
5 | |||
6 | #ifdef CONFIG_X86_64 | ||
7 | #define APIC_ID_MASK (genapic->apic_id_mask) | ||
8 | #define GET_APIC_ID(x) (genapic->get_apic_id(x)) | ||
9 | #define SET_APIC_ID(x) (genapic->set_apic_id(x)) | ||
10 | #else | ||
11 | #define APIC_ID_MASK (0xF<<24) | ||
12 | static inline unsigned get_apic_id(unsigned long x) | ||
13 | { | ||
14 | unsigned int ver = GET_APIC_VERSION(apic_read(APIC_LVR)); | ||
15 | if (APIC_XAPIC(ver)) | ||
16 | return (((x)>>24)&0xFF); | ||
17 | else | ||
18 | return (((x)>>24)&0xF); | ||
19 | } | ||
20 | |||
21 | #define GET_APIC_ID(x) get_apic_id(x) | ||
22 | #endif | ||
23 | |||
24 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_APICDEF_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_ipi.h b/arch/x86/include/asm/mach-default/mach_ipi.h deleted file mode 100644 index 191312d155da..000000000000 --- a/arch/x86/include/asm/mach-default/mach_ipi.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_IPI_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_IPI_H | ||
3 | |||
4 | /* Avoid include hell */ | ||
5 | #define NMI_VECTOR 0x02 | ||
6 | |||
7 | void send_IPI_mask_bitmask(const struct cpumask *mask, int vector); | ||
8 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
9 | void __send_IPI_shortcut(unsigned int shortcut, int vector); | ||
10 | |||
11 | extern int no_broadcast; | ||
12 | |||
13 | #ifdef CONFIG_X86_64 | ||
14 | #include <asm/genapic.h> | ||
15 | #define send_IPI_mask (genapic->send_IPI_mask) | ||
16 | #define send_IPI_mask_allbutself (genapic->send_IPI_mask_allbutself) | ||
17 | #else | ||
18 | static inline void send_IPI_mask(const struct cpumask *mask, int vector) | ||
19 | { | ||
20 | send_IPI_mask_bitmask(mask, vector); | ||
21 | } | ||
22 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
23 | #endif | ||
24 | |||
25 | static inline void __local_send_IPI_allbutself(int vector) | ||
26 | { | ||
27 | if (no_broadcast || vector == NMI_VECTOR) | ||
28 | send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
29 | else | ||
30 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector); | ||
31 | } | ||
32 | |||
33 | static inline void __local_send_IPI_all(int vector) | ||
34 | { | ||
35 | if (no_broadcast || vector == NMI_VECTOR) | ||
36 | send_IPI_mask(cpu_online_mask, vector); | ||
37 | else | ||
38 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); | ||
39 | } | ||
40 | |||
41 | #ifdef CONFIG_X86_64 | ||
42 | #define send_IPI_allbutself (genapic->send_IPI_allbutself) | ||
43 | #define send_IPI_all (genapic->send_IPI_all) | ||
44 | #else | ||
45 | static inline void send_IPI_allbutself(int vector) | ||
46 | { | ||
47 | /* | ||
48 | * if there are no other CPUs in the system then we get an APIC send | ||
49 | * error if we try to broadcast, thus avoid sending IPIs in this case. | ||
50 | */ | ||
51 | if (!(num_online_cpus() > 1)) | ||
52 | return; | ||
53 | |||
54 | __local_send_IPI_allbutself(vector); | ||
55 | return; | ||
56 | } | ||
57 | |||
58 | static inline void send_IPI_all(int vector) | ||
59 | { | ||
60 | __local_send_IPI_all(vector); | ||
61 | } | ||
62 | #endif | ||
63 | |||
64 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_IPI_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_mpparse.h b/arch/x86/include/asm/mach-default/mach_mpparse.h deleted file mode 100644 index c70a263d68cd..000000000000 --- a/arch/x86/include/asm/mach-default/mach_mpparse.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H | ||
3 | |||
4 | static inline int | ||
5 | mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
6 | { | ||
7 | return 0; | ||
8 | } | ||
9 | |||
10 | /* Hook from generic ACPI tables.c */ | ||
11 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
12 | { | ||
13 | return 0; | ||
14 | } | ||
15 | |||
16 | |||
17 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_MPPARSE_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_mpspec.h b/arch/x86/include/asm/mach-default/mach_mpspec.h deleted file mode 100644 index e85ede686be8..000000000000 --- a/arch/x86/include/asm/mach-default/mach_mpspec.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_MPSPEC_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 256 | ||
5 | |||
6 | #if CONFIG_BASE_SMALL == 0 | ||
7 | #define MAX_MP_BUSSES 256 | ||
8 | #else | ||
9 | #define MAX_MP_BUSSES 32 | ||
10 | #endif | ||
11 | |||
12 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_MPSPEC_H */ | ||
diff --git a/arch/x86/include/asm/mach-default/mach_wakecpu.h b/arch/x86/include/asm/mach-default/mach_wakecpu.h deleted file mode 100644 index 89897a6a65b9..000000000000 --- a/arch/x86/include/asm/mach-default/mach_wakecpu.h +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H | ||
2 | #define _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H | ||
3 | |||
4 | #define TRAMPOLINE_PHYS_LOW (0x467) | ||
5 | #define TRAMPOLINE_PHYS_HIGH (0x469) | ||
6 | |||
7 | static inline void wait_for_init_deassert(atomic_t *deassert) | ||
8 | { | ||
9 | while (!atomic_read(deassert)) | ||
10 | cpu_relax(); | ||
11 | return; | ||
12 | } | ||
13 | |||
14 | /* Nothing to do for most platforms, since cleared by the INIT cycle */ | ||
15 | static inline void smp_callin_clear_local_apic(void) | ||
16 | { | ||
17 | } | ||
18 | |||
19 | static inline void store_NMI_vector(unsigned short *high, unsigned short *low) | ||
20 | { | ||
21 | } | ||
22 | |||
23 | static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | ||
24 | { | ||
25 | } | ||
26 | |||
27 | #ifdef CONFIG_SMP | ||
28 | extern void __inquire_remote_apic(int apicid); | ||
29 | #else /* CONFIG_SMP */ | ||
30 | static inline void __inquire_remote_apic(int apicid) | ||
31 | { | ||
32 | } | ||
33 | #endif /* CONFIG_SMP */ | ||
34 | |||
35 | static inline void inquire_remote_apic(int apicid) | ||
36 | { | ||
37 | if (apic_verbosity >= APIC_DEBUG) | ||
38 | __inquire_remote_apic(apicid); | ||
39 | } | ||
40 | |||
41 | #endif /* _ASM_X86_MACH_DEFAULT_MACH_WAKECPU_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/gpio.h b/arch/x86/include/asm/mach-generic/gpio.h deleted file mode 100644 index 995c45efdb33..000000000000 --- a/arch/x86/include/asm/mach-generic/gpio.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_GPIO_H | ||
2 | #define _ASM_X86_MACH_GENERIC_GPIO_H | ||
3 | |||
4 | int gpio_request(unsigned gpio, const char *label); | ||
5 | void gpio_free(unsigned gpio); | ||
6 | int gpio_direction_input(unsigned gpio); | ||
7 | int gpio_direction_output(unsigned gpio, int value); | ||
8 | int gpio_get_value(unsigned gpio); | ||
9 | void gpio_set_value(unsigned gpio, int value); | ||
10 | int gpio_to_irq(unsigned gpio); | ||
11 | int irq_to_gpio(unsigned irq); | ||
12 | |||
13 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
14 | |||
15 | #endif /* _ASM_X86_MACH_GENERIC_GPIO_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h deleted file mode 100644 index 48553e958ad5..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_APIC_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_APIC_H | ||
3 | |||
4 | #include <asm/genapic.h> | ||
5 | |||
6 | #define esr_disable (genapic->ESR_DISABLE) | ||
7 | #define NO_BALANCE_IRQ (genapic->no_balance_irq) | ||
8 | #define INT_DELIVERY_MODE (genapic->int_delivery_mode) | ||
9 | #define INT_DEST_MODE (genapic->int_dest_mode) | ||
10 | #undef APIC_DEST_LOGICAL | ||
11 | #define APIC_DEST_LOGICAL (genapic->apic_destination_logical) | ||
12 | #define TARGET_CPUS (genapic->target_cpus()) | ||
13 | #define apic_id_registered (genapic->apic_id_registered) | ||
14 | #define init_apic_ldr (genapic->init_apic_ldr) | ||
15 | #define ioapic_phys_id_map (genapic->ioapic_phys_id_map) | ||
16 | #define setup_apic_routing (genapic->setup_apic_routing) | ||
17 | #define multi_timer_check (genapic->multi_timer_check) | ||
18 | #define apicid_to_node (genapic->apicid_to_node) | ||
19 | #define cpu_to_logical_apicid (genapic->cpu_to_logical_apicid) | ||
20 | #define cpu_present_to_apicid (genapic->cpu_present_to_apicid) | ||
21 | #define apicid_to_cpu_present (genapic->apicid_to_cpu_present) | ||
22 | #define setup_portio_remap (genapic->setup_portio_remap) | ||
23 | #define check_apicid_present (genapic->check_apicid_present) | ||
24 | #define check_phys_apicid_present (genapic->check_phys_apicid_present) | ||
25 | #define check_apicid_used (genapic->check_apicid_used) | ||
26 | #define cpu_mask_to_apicid (genapic->cpu_mask_to_apicid) | ||
27 | #define cpu_mask_to_apicid_and (genapic->cpu_mask_to_apicid_and) | ||
28 | #define vector_allocation_domain (genapic->vector_allocation_domain) | ||
29 | #define enable_apic_mode (genapic->enable_apic_mode) | ||
30 | #define phys_pkg_id (genapic->phys_pkg_id) | ||
31 | #define wakeup_secondary_cpu (genapic->wakeup_cpu) | ||
32 | |||
33 | extern void generic_bigsmp_probe(void); | ||
34 | |||
35 | #endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_apicdef.h b/arch/x86/include/asm/mach-generic/mach_apicdef.h deleted file mode 100644 index 68041f3802f4..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_apicdef.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_APICDEF_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_APICDEF_H | ||
3 | |||
4 | #ifndef APIC_DEFINITION | ||
5 | #include <asm/genapic.h> | ||
6 | |||
7 | #define GET_APIC_ID (genapic->get_apic_id) | ||
8 | #define APIC_ID_MASK (genapic->apic_id_mask) | ||
9 | #endif | ||
10 | |||
11 | #endif /* _ASM_X86_MACH_GENERIC_MACH_APICDEF_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_ipi.h b/arch/x86/include/asm/mach-generic/mach_ipi.h deleted file mode 100644 index ffd637e3c3d9..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_ipi.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_IPI_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_IPI_H | ||
3 | |||
4 | #include <asm/genapic.h> | ||
5 | |||
6 | #define send_IPI_mask (genapic->send_IPI_mask) | ||
7 | #define send_IPI_allbutself (genapic->send_IPI_allbutself) | ||
8 | #define send_IPI_all (genapic->send_IPI_all) | ||
9 | |||
10 | #endif /* _ASM_X86_MACH_GENERIC_MACH_IPI_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_mpparse.h b/arch/x86/include/asm/mach-generic/mach_mpparse.h deleted file mode 100644 index 9444ab8dca94..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_mpparse.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H | ||
3 | |||
4 | |||
5 | extern int mps_oem_check(struct mpc_table *, char *, char *); | ||
6 | |||
7 | extern int acpi_madt_oem_check(char *, char *); | ||
8 | |||
9 | #endif /* _ASM_X86_MACH_GENERIC_MACH_MPPARSE_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_mpspec.h b/arch/x86/include/asm/mach-generic/mach_mpspec.h deleted file mode 100644 index 3bc407226578..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_mpspec.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_MPSPEC_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_MPSPEC_H | ||
3 | |||
4 | #define MAX_IRQ_SOURCES 256 | ||
5 | |||
6 | /* Summit or generic (i.e. installer) kernels need lots of bus entries. */ | ||
7 | /* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */ | ||
8 | #define MAX_MP_BUSSES 260 | ||
9 | |||
10 | extern void numaq_mps_oem_check(struct mpc_table *, char *, char *); | ||
11 | |||
12 | #endif /* _ASM_X86_MACH_GENERIC_MACH_MPSPEC_H */ | ||
diff --git a/arch/x86/include/asm/mach-generic/mach_wakecpu.h b/arch/x86/include/asm/mach-generic/mach_wakecpu.h deleted file mode 100644 index 1ab16b168c8a..000000000000 --- a/arch/x86/include/asm/mach-generic/mach_wakecpu.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H | ||
2 | #define _ASM_X86_MACH_GENERIC_MACH_WAKECPU_H | ||
3 | |||
4 | #define TRAMPOLINE_PHYS_LOW (genapic->trampoline_phys_low) | ||
5 | #define TRAMPOLINE_PHYS_HIGH (genapic->trampoline_phys_high) | ||
6 | #define wait_for_init_deassert (genapic->wait_for_init_deassert) | ||
7 | #define smp_callin_clear_local_apic (genapic->smp_callin_clear_local_apic) | ||
8 | #define store_NMI_vector (genapic->store_NMI_vector) | ||
9 | #define restore_NMI_vector (genapic->restore_NMI_vector) | ||
10 | #define inquire_remote_apic (genapic->inquire_remote_apic) | ||
11 | |||
12 | #endif /* _ASM_X86_MACH_GENERIC_MACH_APIC_H */ | ||
diff --git a/arch/x86/include/asm/mach-rdc321x/gpio.h b/arch/x86/include/asm/mach-rdc321x/gpio.h deleted file mode 100644 index c210ab5788b0..000000000000 --- a/arch/x86/include/asm/mach-rdc321x/gpio.h +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | #ifndef _ASM_X86_MACH_RDC321X_GPIO_H | ||
2 | #define _ASM_X86_MACH_RDC321X_GPIO_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | |||
6 | extern int rdc_gpio_get_value(unsigned gpio); | ||
7 | extern void rdc_gpio_set_value(unsigned gpio, int value); | ||
8 | extern int rdc_gpio_direction_input(unsigned gpio); | ||
9 | extern int rdc_gpio_direction_output(unsigned gpio, int value); | ||
10 | extern int rdc_gpio_request(unsigned gpio, const char *label); | ||
11 | extern void rdc_gpio_free(unsigned gpio); | ||
12 | extern void __init rdc321x_gpio_setup(void); | ||
13 | |||
14 | /* Wrappers for the arch-neutral GPIO API */ | ||
15 | |||
16 | static inline int gpio_request(unsigned gpio, const char *label) | ||
17 | { | ||
18 | return rdc_gpio_request(gpio, label); | ||
19 | } | ||
20 | |||
21 | static inline void gpio_free(unsigned gpio) | ||
22 | { | ||
23 | might_sleep(); | ||
24 | rdc_gpio_free(gpio); | ||
25 | } | ||
26 | |||
27 | static inline int gpio_direction_input(unsigned gpio) | ||
28 | { | ||
29 | return rdc_gpio_direction_input(gpio); | ||
30 | } | ||
31 | |||
32 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
33 | { | ||
34 | return rdc_gpio_direction_output(gpio, value); | ||
35 | } | ||
36 | |||
37 | static inline int gpio_get_value(unsigned gpio) | ||
38 | { | ||
39 | return rdc_gpio_get_value(gpio); | ||
40 | } | ||
41 | |||
42 | static inline void gpio_set_value(unsigned gpio, int value) | ||
43 | { | ||
44 | rdc_gpio_set_value(gpio, value); | ||
45 | } | ||
46 | |||
47 | static inline int gpio_to_irq(unsigned gpio) | ||
48 | { | ||
49 | return gpio; | ||
50 | } | ||
51 | |||
52 | static inline int irq_to_gpio(unsigned irq) | ||
53 | { | ||
54 | return irq; | ||
55 | } | ||
56 | |||
57 | /* For cansleep */ | ||
58 | #include <asm-generic/gpio.h> | ||
59 | |||
60 | #endif /* _ASM_X86_MACH_RDC321X_GPIO_H */ | ||
diff --git a/arch/x86/include/asm/mach-voyager/do_timer.h b/arch/x86/include/asm/mach-voyager/do_timer.h deleted file mode 100644 index 9e5a459fd15b..000000000000 --- a/arch/x86/include/asm/mach-voyager/do_timer.h +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | /* defines for inline arch setup functions */ | ||
2 | #include <linux/clockchips.h> | ||
3 | |||
4 | #include <asm/voyager.h> | ||
5 | #include <asm/i8253.h> | ||
6 | |||
7 | /** | ||
8 | * do_timer_interrupt_hook - hook into timer tick | ||
9 | * | ||
10 | * Call the pit clock event handler. see asm/i8253.h | ||
11 | **/ | ||
12 | static inline void do_timer_interrupt_hook(void) | ||
13 | { | ||
14 | global_clock_event->event_handler(global_clock_event); | ||
15 | voyager_timer_interrupt(); | ||
16 | } | ||
17 | |||
diff --git a/arch/x86/include/asm/mach-voyager/entry_arch.h b/arch/x86/include/asm/mach-voyager/entry_arch.h deleted file mode 100644 index ae52624b5937..000000000000 --- a/arch/x86/include/asm/mach-voyager/entry_arch.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8 -*- */ | ||
2 | |||
3 | /* Copyright (C) 2002 | ||
4 | * | ||
5 | * Author: James.Bottomley@HansenPartnership.com | ||
6 | * | ||
7 | * linux/arch/i386/voyager/entry_arch.h | ||
8 | * | ||
9 | * This file builds the VIC and QIC CPI gates | ||
10 | */ | ||
11 | |||
12 | /* initialise the voyager interrupt gates | ||
13 | * | ||
14 | * This uses the macros in irq.h to set up assembly jump gates. The | ||
15 | * calls are then redirected to the same routine with smp_ prefixed */ | ||
16 | BUILD_INTERRUPT(vic_sys_interrupt, VIC_SYS_INT) | ||
17 | BUILD_INTERRUPT(vic_cmn_interrupt, VIC_CMN_INT) | ||
18 | BUILD_INTERRUPT(vic_cpi_interrupt, VIC_CPI_LEVEL0); | ||
19 | |||
20 | /* do all the QIC interrupts */ | ||
21 | BUILD_INTERRUPT(qic_timer_interrupt, QIC_TIMER_CPI); | ||
22 | BUILD_INTERRUPT(qic_invalidate_interrupt, QIC_INVALIDATE_CPI); | ||
23 | BUILD_INTERRUPT(qic_reschedule_interrupt, QIC_RESCHEDULE_CPI); | ||
24 | BUILD_INTERRUPT(qic_enable_irq_interrupt, QIC_ENABLE_IRQ_CPI); | ||
25 | BUILD_INTERRUPT(qic_call_function_interrupt, QIC_CALL_FUNCTION_CPI); | ||
26 | BUILD_INTERRUPT(qic_call_function_single_interrupt, QIC_CALL_FUNCTION_SINGLE_CPI); | ||
diff --git a/arch/x86/include/asm/mach-voyager/setup_arch.h b/arch/x86/include/asm/mach-voyager/setup_arch.h deleted file mode 100644 index 71729ca05cd7..000000000000 --- a/arch/x86/include/asm/mach-voyager/setup_arch.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #include <asm/voyager.h> | ||
2 | #include <asm/setup.h> | ||
3 | #define VOYAGER_BIOS_INFO ((struct voyager_bios_info *) \ | ||
4 | (&boot_params.apm_bios_info)) | ||
5 | |||
6 | /* Hook to call BIOS initialisation function */ | ||
7 | |||
8 | /* for voyager, pass the voyager BIOS/SUS info area to the detection | ||
9 | * routines */ | ||
10 | |||
11 | #define ARCH_SETUP voyager_detect(VOYAGER_BIOS_INFO); | ||
12 | |||
diff --git a/arch/x86/include/asm/mach-default/mach_timer.h b/arch/x86/include/asm/mach_timer.h index 853728519ae9..853728519ae9 100644 --- a/arch/x86/include/asm/mach-default/mach_timer.h +++ b/arch/x86/include/asm/mach_timer.h | |||
diff --git a/arch/x86/include/asm/mach-default/mach_traps.h b/arch/x86/include/asm/mach_traps.h index f7920601e472..f7920601e472 100644 --- a/arch/x86/include/asm/mach-default/mach_traps.h +++ b/arch/x86/include/asm/mach_traps.h | |||
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h index 07f1af494ca5..105fb90a0635 100644 --- a/arch/x86/include/asm/mmzone_32.h +++ b/arch/x86/include/asm/mmzone_32.h | |||
@@ -32,8 +32,6 @@ static inline void get_memcfg_numa(void) | |||
32 | get_memcfg_numa_flat(); | 32 | get_memcfg_numa_flat(); |
33 | } | 33 | } |
34 | 34 | ||
35 | extern int early_pfn_to_nid(unsigned long pfn); | ||
36 | |||
37 | extern void resume_map_numa_kva(pgd_t *pgd); | 35 | extern void resume_map_numa_kva(pgd_t *pgd); |
38 | 36 | ||
39 | #else /* !CONFIG_NUMA */ | 37 | #else /* !CONFIG_NUMA */ |
diff --git a/arch/x86/include/asm/mmzone_64.h b/arch/x86/include/asm/mmzone_64.h index a5b3817d4b9e..a29f48c2a322 100644 --- a/arch/x86/include/asm/mmzone_64.h +++ b/arch/x86/include/asm/mmzone_64.h | |||
@@ -40,8 +40,6 @@ static inline __attribute__((pure)) int phys_to_nid(unsigned long addr) | |||
40 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ | 40 | #define node_end_pfn(nid) (NODE_DATA(nid)->node_start_pfn + \ |
41 | NODE_DATA(nid)->node_spanned_pages) | 41 | NODE_DATA(nid)->node_spanned_pages) |
42 | 42 | ||
43 | extern int early_pfn_to_nid(unsigned long pfn); | ||
44 | |||
45 | #ifdef CONFIG_NUMA_EMU | 43 | #ifdef CONFIG_NUMA_EMU |
46 | #define FAKE_NODE_MIN_SIZE (64 * 1024 * 1024) | 44 | #define FAKE_NODE_MIN_SIZE (64 * 1024 * 1024) |
47 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) | 45 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) |
diff --git a/arch/x86/include/asm/mpspec.h b/arch/x86/include/asm/mpspec.h index bd22f2a3713f..642fc7fc8cdc 100644 --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h | |||
@@ -9,7 +9,18 @@ extern int apic_version[MAX_APICS]; | |||
9 | extern int pic_mode; | 9 | extern int pic_mode; |
10 | 10 | ||
11 | #ifdef CONFIG_X86_32 | 11 | #ifdef CONFIG_X86_32 |
12 | #include <mach_mpspec.h> | 12 | |
13 | /* | ||
14 | * Summit or generic (i.e. installer) kernels need lots of bus entries. | ||
15 | * Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. | ||
16 | */ | ||
17 | #if CONFIG_BASE_SMALL == 0 | ||
18 | # define MAX_MP_BUSSES 260 | ||
19 | #else | ||
20 | # define MAX_MP_BUSSES 32 | ||
21 | #endif | ||
22 | |||
23 | #define MAX_IRQ_SOURCES 256 | ||
13 | 24 | ||
14 | extern unsigned int def_to_bigsmp; | 25 | extern unsigned int def_to_bigsmp; |
15 | extern u8 apicid_2_node[]; | 26 | extern u8 apicid_2_node[]; |
@@ -20,15 +31,15 @@ extern int mp_bus_id_to_local[MAX_MP_BUSSES]; | |||
20 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | 31 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; |
21 | #endif | 32 | #endif |
22 | 33 | ||
23 | #define MAX_APICID 256 | 34 | #define MAX_APICID 256 |
24 | 35 | ||
25 | #else | 36 | #else /* CONFIG_X86_64: */ |
26 | 37 | ||
27 | #define MAX_MP_BUSSES 256 | 38 | #define MAX_MP_BUSSES 256 |
28 | /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ | 39 | /* Each PCI slot may be a combo card with its own bus. 4 IRQ pins per slot. */ |
29 | #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) | 40 | #define MAX_IRQ_SOURCES (MAX_MP_BUSSES * 4) |
30 | 41 | ||
31 | #endif | 42 | #endif /* CONFIG_X86_64 */ |
32 | 43 | ||
33 | extern void early_find_smp_config(void); | 44 | extern void early_find_smp_config(void); |
34 | extern void early_get_smp_config(void); | 45 | extern void early_get_smp_config(void); |
@@ -45,11 +56,13 @@ extern int smp_found_config; | |||
45 | extern int mpc_default_type; | 56 | extern int mpc_default_type; |
46 | extern unsigned long mp_lapic_addr; | 57 | extern unsigned long mp_lapic_addr; |
47 | 58 | ||
48 | extern void find_smp_config(void); | ||
49 | extern void get_smp_config(void); | 59 | extern void get_smp_config(void); |
60 | |||
50 | #ifdef CONFIG_X86_MPPARSE | 61 | #ifdef CONFIG_X86_MPPARSE |
62 | extern void find_smp_config(void); | ||
51 | extern void early_reserve_e820_mpc_new(void); | 63 | extern void early_reserve_e820_mpc_new(void); |
52 | #else | 64 | #else |
65 | static inline void find_smp_config(void) { } | ||
53 | static inline void early_reserve_e820_mpc_new(void) { } | 66 | static inline void early_reserve_e820_mpc_new(void) { } |
54 | #endif | 67 | #endif |
55 | 68 | ||
@@ -64,6 +77,8 @@ extern int acpi_probe_gsi(void); | |||
64 | #ifdef CONFIG_X86_IO_APIC | 77 | #ifdef CONFIG_X86_IO_APIC |
65 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | 78 | extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, |
66 | u32 gsi, int triggering, int polarity); | 79 | u32 gsi, int triggering, int polarity); |
80 | extern int mp_find_ioapic(int gsi); | ||
81 | extern int mp_find_ioapic_pin(int ioapic, int gsi); | ||
67 | #else | 82 | #else |
68 | static inline int | 83 | static inline int |
69 | mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | 84 | mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, |
@@ -148,4 +163,8 @@ static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map) | |||
148 | 163 | ||
149 | extern physid_mask_t phys_cpu_present_map; | 164 | extern physid_mask_t phys_cpu_present_map; |
150 | 165 | ||
166 | extern int generic_mps_oem_check(struct mpc_table *, char *, char *); | ||
167 | |||
168 | extern int default_acpi_madt_oem_check(char *, char *); | ||
169 | |||
151 | #endif /* _ASM_X86_MPSPEC_H */ | 170 | #endif /* _ASM_X86_MPSPEC_H */ |
diff --git a/arch/x86/include/asm/numaq.h b/arch/x86/include/asm/numaq.h index 1e8bd30b4c16..9f0a5f5d29ec 100644 --- a/arch/x86/include/asm/numaq.h +++ b/arch/x86/include/asm/numaq.h | |||
@@ -31,6 +31,8 @@ | |||
31 | extern int found_numaq; | 31 | extern int found_numaq; |
32 | extern int get_memcfg_numaq(void); | 32 | extern int get_memcfg_numaq(void); |
33 | 33 | ||
34 | extern void *xquad_portio; | ||
35 | |||
34 | /* | 36 | /* |
35 | * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the | 37 | * SYS_CFG_DATA_PRIV_ADDR, struct eachquadmem, and struct sys_cfg_data are the |
36 | */ | 38 | */ |
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h deleted file mode 100644 index bf37bc49bd8e..000000000000 --- a/arch/x86/include/asm/numaq/apic.h +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | #ifndef __ASM_NUMAQ_APIC_H | ||
2 | #define __ASM_NUMAQ_APIC_H | ||
3 | |||
4 | #include <asm/io.h> | ||
5 | #include <linux/mmzone.h> | ||
6 | #include <linux/nodemask.h> | ||
7 | |||
8 | #define APIC_DFR_VALUE (APIC_DFR_CLUSTER) | ||
9 | |||
10 | static inline const cpumask_t *target_cpus(void) | ||
11 | { | ||
12 | return &CPU_MASK_ALL; | ||
13 | } | ||
14 | |||
15 | #define NO_BALANCE_IRQ (1) | ||
16 | #define esr_disable (1) | ||
17 | |||
18 | #define INT_DELIVERY_MODE dest_LowestPrio | ||
19 | #define INT_DEST_MODE 0 /* physical delivery on LOCAL quad */ | ||
20 | |||
21 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | ||
22 | { | ||
23 | return physid_isset(apicid, bitmap); | ||
24 | } | ||
25 | static inline unsigned long check_apicid_present(int bit) | ||
26 | { | ||
27 | return physid_isset(bit, phys_cpu_present_map); | ||
28 | } | ||
29 | #define apicid_cluster(apicid) (apicid & 0xF0) | ||
30 | |||
31 | static inline int apic_id_registered(void) | ||
32 | { | ||
33 | return 1; | ||
34 | } | ||
35 | |||
36 | static inline void init_apic_ldr(void) | ||
37 | { | ||
38 | /* Already done in NUMA-Q firmware */ | ||
39 | } | ||
40 | |||
41 | static inline void setup_apic_routing(void) | ||
42 | { | ||
43 | printk("Enabling APIC mode: %s. Using %d I/O APICs\n", | ||
44 | "NUMA-Q", nr_ioapics); | ||
45 | } | ||
46 | |||
47 | /* | ||
48 | * Skip adding the timer int on secondary nodes, which causes | ||
49 | * a small but painful rift in the time-space continuum. | ||
50 | */ | ||
51 | static inline int multi_timer_check(int apic, int irq) | ||
52 | { | ||
53 | return apic != 0 && irq == 0; | ||
54 | } | ||
55 | |||
56 | static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_map) | ||
57 | { | ||
58 | /* We don't have a good way to do this yet - hack */ | ||
59 | return physids_promote(0xFUL); | ||
60 | } | ||
61 | |||
62 | /* Mapping from cpu number to logical apicid */ | ||
63 | extern u8 cpu_2_logical_apicid[]; | ||
64 | static inline int cpu_to_logical_apicid(int cpu) | ||
65 | { | ||
66 | if (cpu >= nr_cpu_ids) | ||
67 | return BAD_APICID; | ||
68 | return (int)cpu_2_logical_apicid[cpu]; | ||
69 | } | ||
70 | |||
71 | /* | ||
72 | * Supporting over 60 cpus on NUMA-Q requires a locality-dependent | ||
73 | * cpu to APIC ID relation to properly interact with the intelligent | ||
74 | * mode of the cluster controller. | ||
75 | */ | ||
76 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
77 | { | ||
78 | if (mps_cpu < 60) | ||
79 | return ((mps_cpu >> 2) << 4) | (1 << (mps_cpu & 0x3)); | ||
80 | else | ||
81 | return BAD_APICID; | ||
82 | } | ||
83 | |||
84 | static inline int apicid_to_node(int logical_apicid) | ||
85 | { | ||
86 | return logical_apicid >> 4; | ||
87 | } | ||
88 | |||
89 | static inline physid_mask_t apicid_to_cpu_present(int logical_apicid) | ||
90 | { | ||
91 | int node = apicid_to_node(logical_apicid); | ||
92 | int cpu = __ffs(logical_apicid & 0xf); | ||
93 | |||
94 | return physid_mask_of_physid(cpu + 4*node); | ||
95 | } | ||
96 | |||
97 | extern void *xquad_portio; | ||
98 | |||
99 | static inline void setup_portio_remap(void) | ||
100 | { | ||
101 | int num_quads = num_online_nodes(); | ||
102 | |||
103 | if (num_quads <= 1) | ||
104 | return; | ||
105 | |||
106 | printk("Remapping cross-quad port I/O for %d quads\n", num_quads); | ||
107 | xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD); | ||
108 | printk("xquad_portio vaddr 0x%08lx, len %08lx\n", | ||
109 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); | ||
110 | } | ||
111 | |||
112 | static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
113 | { | ||
114 | return (1); | ||
115 | } | ||
116 | |||
117 | static inline void enable_apic_mode(void) | ||
118 | { | ||
119 | } | ||
120 | |||
121 | /* | ||
122 | * We use physical apicids here, not logical, so just return the default | ||
123 | * physical broadcast to stop people from breaking us | ||
124 | */ | ||
125 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
126 | { | ||
127 | return (int) 0xF; | ||
128 | } | ||
129 | |||
130 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
131 | const struct cpumask *andmask) | ||
132 | { | ||
133 | return (int) 0xF; | ||
134 | } | ||
135 | |||
136 | /* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */ | ||
137 | static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | ||
138 | { | ||
139 | return cpuid_apic >> index_msb; | ||
140 | } | ||
141 | |||
142 | #endif /* __ASM_NUMAQ_APIC_H */ | ||
diff --git a/arch/x86/include/asm/numaq/apicdef.h b/arch/x86/include/asm/numaq/apicdef.h deleted file mode 100644 index e012a46cc22a..000000000000 --- a/arch/x86/include/asm/numaq/apicdef.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #ifndef __ASM_NUMAQ_APICDEF_H | ||
2 | #define __ASM_NUMAQ_APICDEF_H | ||
3 | |||
4 | |||
5 | #define APIC_ID_MASK (0xF<<24) | ||
6 | |||
7 | static inline unsigned get_apic_id(unsigned long x) | ||
8 | { | ||
9 | return (((x)>>24)&0x0F); | ||
10 | } | ||
11 | |||
12 | #define GET_APIC_ID(x) get_apic_id(x) | ||
13 | |||
14 | #endif | ||
diff --git a/arch/x86/include/asm/numaq/ipi.h b/arch/x86/include/asm/numaq/ipi.h deleted file mode 100644 index a8374c652778..000000000000 --- a/arch/x86/include/asm/numaq/ipi.h +++ /dev/null | |||
@@ -1,22 +0,0 @@ | |||
1 | #ifndef __ASM_NUMAQ_IPI_H | ||
2 | #define __ASM_NUMAQ_IPI_H | ||
3 | |||
4 | void send_IPI_mask_sequence(const struct cpumask *mask, int vector); | ||
5 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector); | ||
6 | |||
7 | static inline void send_IPI_mask(const struct cpumask *mask, int vector) | ||
8 | { | ||
9 | send_IPI_mask_sequence(mask, vector); | ||
10 | } | ||
11 | |||
12 | static inline void send_IPI_allbutself(int vector) | ||
13 | { | ||
14 | send_IPI_mask_allbutself(cpu_online_mask, vector); | ||
15 | } | ||
16 | |||
17 | static inline void send_IPI_all(int vector) | ||
18 | { | ||
19 | send_IPI_mask(cpu_online_mask, vector); | ||
20 | } | ||
21 | |||
22 | #endif /* __ASM_NUMAQ_IPI_H */ | ||
diff --git a/arch/x86/include/asm/numaq/mpparse.h b/arch/x86/include/asm/numaq/mpparse.h deleted file mode 100644 index a2eeefcd1cc7..000000000000 --- a/arch/x86/include/asm/numaq/mpparse.h +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #ifndef __ASM_NUMAQ_MPPARSE_H | ||
2 | #define __ASM_NUMAQ_MPPARSE_H | ||
3 | |||
4 | extern void numaq_mps_oem_check(struct mpc_table *, char *, char *); | ||
5 | |||
6 | #endif /* __ASM_NUMAQ_MPPARSE_H */ | ||
diff --git a/arch/x86/include/asm/numaq/wakecpu.h b/arch/x86/include/asm/numaq/wakecpu.h deleted file mode 100644 index 6f499df8eddb..000000000000 --- a/arch/x86/include/asm/numaq/wakecpu.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #ifndef __ASM_NUMAQ_WAKECPU_H | ||
2 | #define __ASM_NUMAQ_WAKECPU_H | ||
3 | |||
4 | /* This file copes with machines that wakeup secondary CPUs by NMIs */ | ||
5 | |||
6 | #define TRAMPOLINE_PHYS_LOW (0x8) | ||
7 | #define TRAMPOLINE_PHYS_HIGH (0xa) | ||
8 | |||
9 | /* We don't do anything here because we use NMI's to boot instead */ | ||
10 | static inline void wait_for_init_deassert(atomic_t *deassert) | ||
11 | { | ||
12 | } | ||
13 | |||
14 | /* | ||
15 | * Because we use NMIs rather than the INIT-STARTUP sequence to | ||
16 | * bootstrap the CPUs, the APIC may be in a weird state. Kick it. | ||
17 | */ | ||
18 | static inline void smp_callin_clear_local_apic(void) | ||
19 | { | ||
20 | clear_local_APIC(); | ||
21 | } | ||
22 | |||
23 | static inline void store_NMI_vector(unsigned short *high, unsigned short *low) | ||
24 | { | ||
25 | printk("Storing NMI vector\n"); | ||
26 | *high = | ||
27 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)); | ||
28 | *low = | ||
29 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)); | ||
30 | } | ||
31 | |||
32 | static inline void restore_NMI_vector(unsigned short *high, unsigned short *low) | ||
33 | { | ||
34 | printk("Restoring NMI vector\n"); | ||
35 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) = | ||
36 | *high; | ||
37 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = | ||
38 | *low; | ||
39 | } | ||
40 | |||
41 | static inline void inquire_remote_apic(int apicid) | ||
42 | { | ||
43 | } | ||
44 | |||
45 | #endif /* __ASM_NUMAQ_WAKECPU_H */ | ||
diff --git a/arch/x86/include/asm/page.h b/arch/x86/include/asm/page.h index 6b9810859daf..89ed9d70b0aa 100644 --- a/arch/x86/include/asm/page.h +++ b/arch/x86/include/asm/page.h | |||
@@ -1,42 +1,11 @@ | |||
1 | #ifndef _ASM_X86_PAGE_H | 1 | #ifndef _ASM_X86_PAGE_H |
2 | #define _ASM_X86_PAGE_H | 2 | #define _ASM_X86_PAGE_H |
3 | 3 | ||
4 | #include <linux/const.h> | 4 | #include <linux/types.h> |
5 | |||
6 | /* PAGE_SHIFT determines the page size */ | ||
7 | #define PAGE_SHIFT 12 | ||
8 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) | ||
9 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
10 | 5 | ||
11 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
12 | 7 | ||
13 | #define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1) | 8 | #include <asm/page_types.h> |
14 | #define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1) | ||
15 | |||
16 | /* Cast PAGE_MASK to a signed type so that it is sign-extended if | ||
17 | virtual addresses are 32-bits but physical addresses are larger | ||
18 | (ie, 32-bit PAE). */ | ||
19 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) | ||
20 | |||
21 | /* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ | ||
22 | #define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK) | ||
23 | |||
24 | /* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */ | ||
25 | #define PTE_FLAGS_MASK (~PTE_PFN_MASK) | ||
26 | |||
27 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) | ||
28 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) | ||
29 | |||
30 | #define HPAGE_SHIFT PMD_SHIFT | ||
31 | #define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT) | ||
32 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | ||
33 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | ||
34 | |||
35 | #define HUGE_MAX_HSTATE 2 | ||
36 | |||
37 | #ifndef __ASSEMBLY__ | ||
38 | #include <linux/types.h> | ||
39 | #endif | ||
40 | 9 | ||
41 | #ifdef CONFIG_X86_64 | 10 | #ifdef CONFIG_X86_64 |
42 | #include <asm/page_64.h> | 11 | #include <asm/page_64.h> |
@@ -44,39 +13,18 @@ | |||
44 | #include <asm/page_32.h> | 13 | #include <asm/page_32.h> |
45 | #endif /* CONFIG_X86_64 */ | 14 | #endif /* CONFIG_X86_64 */ |
46 | 15 | ||
47 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | ||
48 | |||
49 | #define VM_DATA_DEFAULT_FLAGS \ | ||
50 | (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ | ||
51 | VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | ||
52 | |||
53 | |||
54 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
55 | 17 | ||
56 | typedef struct { pgdval_t pgd; } pgd_t; | ||
57 | typedef struct { pgprotval_t pgprot; } pgprot_t; | ||
58 | |||
59 | extern int page_is_ram(unsigned long pagenr); | ||
60 | extern int pagerange_is_ram(unsigned long start, unsigned long end); | ||
61 | extern int devmem_is_allowed(unsigned long pagenr); | ||
62 | extern void map_devmem(unsigned long pfn, unsigned long size, | ||
63 | pgprot_t vma_prot); | ||
64 | extern void unmap_devmem(unsigned long pfn, unsigned long size, | ||
65 | pgprot_t vma_prot); | ||
66 | |||
67 | extern unsigned long max_low_pfn_mapped; | ||
68 | extern unsigned long max_pfn_mapped; | ||
69 | |||
70 | struct page; | 18 | struct page; |
71 | 19 | ||
72 | static inline void clear_user_page(void *page, unsigned long vaddr, | 20 | static inline void clear_user_page(void *page, unsigned long vaddr, |
73 | struct page *pg) | 21 | struct page *pg) |
74 | { | 22 | { |
75 | clear_page(page); | 23 | clear_page(page); |
76 | } | 24 | } |
77 | 25 | ||
78 | static inline void copy_user_page(void *to, void *from, unsigned long vaddr, | 26 | static inline void copy_user_page(void *to, void *from, unsigned long vaddr, |
79 | struct page *topage) | 27 | struct page *topage) |
80 | { | 28 | { |
81 | copy_page(to, from); | 29 | copy_page(to, from); |
82 | } | 30 | } |
@@ -85,98 +33,6 @@ static inline void copy_user_page(void *to, void *from, unsigned long vaddr, | |||
85 | alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) | 33 | alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO | movableflags, vma, vaddr) |
86 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | 34 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE |
87 | 35 | ||
88 | static inline pgd_t native_make_pgd(pgdval_t val) | ||
89 | { | ||
90 | return (pgd_t) { val }; | ||
91 | } | ||
92 | |||
93 | static inline pgdval_t native_pgd_val(pgd_t pgd) | ||
94 | { | ||
95 | return pgd.pgd; | ||
96 | } | ||
97 | |||
98 | #if PAGETABLE_LEVELS >= 3 | ||
99 | #if PAGETABLE_LEVELS == 4 | ||
100 | typedef struct { pudval_t pud; } pud_t; | ||
101 | |||
102 | static inline pud_t native_make_pud(pmdval_t val) | ||
103 | { | ||
104 | return (pud_t) { val }; | ||
105 | } | ||
106 | |||
107 | static inline pudval_t native_pud_val(pud_t pud) | ||
108 | { | ||
109 | return pud.pud; | ||
110 | } | ||
111 | #else /* PAGETABLE_LEVELS == 3 */ | ||
112 | #include <asm-generic/pgtable-nopud.h> | ||
113 | |||
114 | static inline pudval_t native_pud_val(pud_t pud) | ||
115 | { | ||
116 | return native_pgd_val(pud.pgd); | ||
117 | } | ||
118 | #endif /* PAGETABLE_LEVELS == 4 */ | ||
119 | |||
120 | typedef struct { pmdval_t pmd; } pmd_t; | ||
121 | |||
122 | static inline pmd_t native_make_pmd(pmdval_t val) | ||
123 | { | ||
124 | return (pmd_t) { val }; | ||
125 | } | ||
126 | |||
127 | static inline pmdval_t native_pmd_val(pmd_t pmd) | ||
128 | { | ||
129 | return pmd.pmd; | ||
130 | } | ||
131 | #else /* PAGETABLE_LEVELS == 2 */ | ||
132 | #include <asm-generic/pgtable-nopmd.h> | ||
133 | |||
134 | static inline pmdval_t native_pmd_val(pmd_t pmd) | ||
135 | { | ||
136 | return native_pgd_val(pmd.pud.pgd); | ||
137 | } | ||
138 | #endif /* PAGETABLE_LEVELS >= 3 */ | ||
139 | |||
140 | static inline pte_t native_make_pte(pteval_t val) | ||
141 | { | ||
142 | return (pte_t) { .pte = val }; | ||
143 | } | ||
144 | |||
145 | static inline pteval_t native_pte_val(pte_t pte) | ||
146 | { | ||
147 | return pte.pte; | ||
148 | } | ||
149 | |||
150 | static inline pteval_t pte_flags(pte_t pte) | ||
151 | { | ||
152 | return native_pte_val(pte) & PTE_FLAGS_MASK; | ||
153 | } | ||
154 | |||
155 | #define pgprot_val(x) ((x).pgprot) | ||
156 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
157 | |||
158 | #ifdef CONFIG_PARAVIRT | ||
159 | #include <asm/paravirt.h> | ||
160 | #else /* !CONFIG_PARAVIRT */ | ||
161 | |||
162 | #define pgd_val(x) native_pgd_val(x) | ||
163 | #define __pgd(x) native_make_pgd(x) | ||
164 | |||
165 | #ifndef __PAGETABLE_PUD_FOLDED | ||
166 | #define pud_val(x) native_pud_val(x) | ||
167 | #define __pud(x) native_make_pud(x) | ||
168 | #endif | ||
169 | |||
170 | #ifndef __PAGETABLE_PMD_FOLDED | ||
171 | #define pmd_val(x) native_pmd_val(x) | ||
172 | #define __pmd(x) native_make_pmd(x) | ||
173 | #endif | ||
174 | |||
175 | #define pte_val(x) native_pte_val(x) | ||
176 | #define __pte(x) native_make_pte(x) | ||
177 | |||
178 | #endif /* CONFIG_PARAVIRT */ | ||
179 | |||
180 | #define __pa(x) __phys_addr((unsigned long)(x)) | 36 | #define __pa(x) __phys_addr((unsigned long)(x)) |
181 | #define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x)) | 37 | #define __pa_nodebug(x) __phys_addr_nodebug((unsigned long)(x)) |
182 | /* __pa_symbol should be used for C visible symbols. | 38 | /* __pa_symbol should be used for C visible symbols. |
diff --git a/arch/x86/include/asm/page_32.h b/arch/x86/include/asm/page_32.h index bcde0d7b4325..da4e762406f7 100644 --- a/arch/x86/include/asm/page_32.h +++ b/arch/x86/include/asm/page_32.h | |||
@@ -1,82 +1,14 @@ | |||
1 | #ifndef _ASM_X86_PAGE_32_H | 1 | #ifndef _ASM_X86_PAGE_32_H |
2 | #define _ASM_X86_PAGE_32_H | 2 | #define _ASM_X86_PAGE_32_H |
3 | 3 | ||
4 | /* | 4 | #include <asm/page_32_types.h> |
5 | * This handles the memory map. | ||
6 | * | ||
7 | * A __PAGE_OFFSET of 0xC0000000 means that the kernel has | ||
8 | * a virtual address space of one gigabyte, which limits the | ||
9 | * amount of physical memory you can use to about 950MB. | ||
10 | * | ||
11 | * If you want more physical memory than this then see the CONFIG_HIGHMEM4G | ||
12 | * and CONFIG_HIGHMEM64G options in the kernel configuration. | ||
13 | */ | ||
14 | #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) | ||
15 | |||
16 | #ifdef CONFIG_4KSTACKS | ||
17 | #define THREAD_ORDER 0 | ||
18 | #else | ||
19 | #define THREAD_ORDER 1 | ||
20 | #endif | ||
21 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) | ||
22 | |||
23 | #define STACKFAULT_STACK 0 | ||
24 | #define DOUBLEFAULT_STACK 1 | ||
25 | #define NMI_STACK 0 | ||
26 | #define DEBUG_STACK 0 | ||
27 | #define MCE_STACK 0 | ||
28 | #define N_EXCEPTION_STACKS 1 | ||
29 | |||
30 | #ifdef CONFIG_X86_PAE | ||
31 | /* 44=32+12, the limit we can fit into an unsigned long pfn */ | ||
32 | #define __PHYSICAL_MASK_SHIFT 44 | ||
33 | #define __VIRTUAL_MASK_SHIFT 32 | ||
34 | #define PAGETABLE_LEVELS 3 | ||
35 | |||
36 | #ifndef __ASSEMBLY__ | ||
37 | typedef u64 pteval_t; | ||
38 | typedef u64 pmdval_t; | ||
39 | typedef u64 pudval_t; | ||
40 | typedef u64 pgdval_t; | ||
41 | typedef u64 pgprotval_t; | ||
42 | |||
43 | typedef union { | ||
44 | struct { | ||
45 | unsigned long pte_low, pte_high; | ||
46 | }; | ||
47 | pteval_t pte; | ||
48 | } pte_t; | ||
49 | #endif /* __ASSEMBLY__ | ||
50 | */ | ||
51 | #else /* !CONFIG_X86_PAE */ | ||
52 | #define __PHYSICAL_MASK_SHIFT 32 | ||
53 | #define __VIRTUAL_MASK_SHIFT 32 | ||
54 | #define PAGETABLE_LEVELS 2 | ||
55 | |||
56 | #ifndef __ASSEMBLY__ | ||
57 | typedef unsigned long pteval_t; | ||
58 | typedef unsigned long pmdval_t; | ||
59 | typedef unsigned long pudval_t; | ||
60 | typedef unsigned long pgdval_t; | ||
61 | typedef unsigned long pgprotval_t; | ||
62 | |||
63 | typedef union { | ||
64 | pteval_t pte; | ||
65 | pteval_t pte_low; | ||
66 | } pte_t; | ||
67 | |||
68 | #endif /* __ASSEMBLY__ */ | ||
69 | #endif /* CONFIG_X86_PAE */ | ||
70 | 5 | ||
71 | #ifndef __ASSEMBLY__ | 6 | #ifndef __ASSEMBLY__ |
72 | typedef struct page *pgtable_t; | ||
73 | #endif | ||
74 | 7 | ||
75 | #ifdef CONFIG_HUGETLB_PAGE | 8 | #ifdef CONFIG_HUGETLB_PAGE |
76 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | 9 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
77 | #endif | 10 | #endif |
78 | 11 | ||
79 | #ifndef __ASSEMBLY__ | ||
80 | #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET) | 12 | #define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET) |
81 | #ifdef CONFIG_DEBUG_VIRTUAL | 13 | #ifdef CONFIG_DEBUG_VIRTUAL |
82 | extern unsigned long __phys_addr(unsigned long); | 14 | extern unsigned long __phys_addr(unsigned long); |
@@ -89,23 +21,6 @@ extern unsigned long __phys_addr(unsigned long); | |||
89 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 21 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
90 | #endif /* CONFIG_FLATMEM */ | 22 | #endif /* CONFIG_FLATMEM */ |
91 | 23 | ||
92 | extern int nx_enabled; | ||
93 | |||
94 | /* | ||
95 | * This much address space is reserved for vmalloc() and iomap() | ||
96 | * as well as fixmap mappings. | ||
97 | */ | ||
98 | extern unsigned int __VMALLOC_RESERVE; | ||
99 | extern int sysctl_legacy_va_layout; | ||
100 | |||
101 | extern void find_low_pfn_range(void); | ||
102 | extern unsigned long init_memory_mapping(unsigned long start, | ||
103 | unsigned long end); | ||
104 | extern void initmem_init(unsigned long, unsigned long); | ||
105 | extern void free_initmem(void); | ||
106 | extern void setup_bootmem_allocator(void); | ||
107 | |||
108 | |||
109 | #ifdef CONFIG_X86_USE_3DNOW | 24 | #ifdef CONFIG_X86_USE_3DNOW |
110 | #include <asm/mmx.h> | 25 | #include <asm/mmx.h> |
111 | 26 | ||
diff --git a/arch/x86/include/asm/page_32_types.h b/arch/x86/include/asm/page_32_types.h new file mode 100644 index 000000000000..f1e4a79a6e41 --- /dev/null +++ b/arch/x86/include/asm/page_32_types.h | |||
@@ -0,0 +1,60 @@ | |||
1 | #ifndef _ASM_X86_PAGE_32_DEFS_H | ||
2 | #define _ASM_X86_PAGE_32_DEFS_H | ||
3 | |||
4 | #include <linux/const.h> | ||
5 | |||
6 | /* | ||
7 | * This handles the memory map. | ||
8 | * | ||
9 | * A __PAGE_OFFSET of 0xC0000000 means that the kernel has | ||
10 | * a virtual address space of one gigabyte, which limits the | ||
11 | * amount of physical memory you can use to about 950MB. | ||
12 | * | ||
13 | * If you want more physical memory than this then see the CONFIG_HIGHMEM4G | ||
14 | * and CONFIG_HIGHMEM64G options in the kernel configuration. | ||
15 | */ | ||
16 | #define __PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL) | ||
17 | |||
18 | #ifdef CONFIG_4KSTACKS | ||
19 | #define THREAD_ORDER 0 | ||
20 | #else | ||
21 | #define THREAD_ORDER 1 | ||
22 | #endif | ||
23 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) | ||
24 | |||
25 | #define STACKFAULT_STACK 0 | ||
26 | #define DOUBLEFAULT_STACK 1 | ||
27 | #define NMI_STACK 0 | ||
28 | #define DEBUG_STACK 0 | ||
29 | #define MCE_STACK 0 | ||
30 | #define N_EXCEPTION_STACKS 1 | ||
31 | |||
32 | #ifdef CONFIG_X86_PAE | ||
33 | /* 44=32+12, the limit we can fit into an unsigned long pfn */ | ||
34 | #define __PHYSICAL_MASK_SHIFT 44 | ||
35 | #define __VIRTUAL_MASK_SHIFT 32 | ||
36 | |||
37 | #else /* !CONFIG_X86_PAE */ | ||
38 | #define __PHYSICAL_MASK_SHIFT 32 | ||
39 | #define __VIRTUAL_MASK_SHIFT 32 | ||
40 | #endif /* CONFIG_X86_PAE */ | ||
41 | |||
42 | #ifndef __ASSEMBLY__ | ||
43 | |||
44 | /* | ||
45 | * This much address space is reserved for vmalloc() and iomap() | ||
46 | * as well as fixmap mappings. | ||
47 | */ | ||
48 | extern unsigned int __VMALLOC_RESERVE; | ||
49 | extern int sysctl_legacy_va_layout; | ||
50 | |||
51 | extern void find_low_pfn_range(void); | ||
52 | extern unsigned long init_memory_mapping(unsigned long start, | ||
53 | unsigned long end); | ||
54 | extern void initmem_init(unsigned long, unsigned long); | ||
55 | extern void free_initmem(void); | ||
56 | extern void setup_bootmem_allocator(void); | ||
57 | |||
58 | #endif /* !__ASSEMBLY__ */ | ||
59 | |||
60 | #endif /* _ASM_X86_PAGE_32_DEFS_H */ | ||
diff --git a/arch/x86/include/asm/page_64.h b/arch/x86/include/asm/page_64.h index e27fdbe5f9e4..072694ed81a5 100644 --- a/arch/x86/include/asm/page_64.h +++ b/arch/x86/include/asm/page_64.h | |||
@@ -1,105 +1,6 @@ | |||
1 | #ifndef _ASM_X86_PAGE_64_H | 1 | #ifndef _ASM_X86_PAGE_64_H |
2 | #define _ASM_X86_PAGE_64_H | 2 | #define _ASM_X86_PAGE_64_H |
3 | 3 | ||
4 | #define PAGETABLE_LEVELS 4 | 4 | #include <asm/page_64_types.h> |
5 | |||
6 | #define THREAD_ORDER 1 | ||
7 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) | ||
8 | #define CURRENT_MASK (~(THREAD_SIZE - 1)) | ||
9 | |||
10 | #define EXCEPTION_STACK_ORDER 0 | ||
11 | #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) | ||
12 | |||
13 | #define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1) | ||
14 | #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER) | ||
15 | |||
16 | #define IRQ_STACK_ORDER 2 | ||
17 | #define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER) | ||
18 | |||
19 | #define STACKFAULT_STACK 1 | ||
20 | #define DOUBLEFAULT_STACK 2 | ||
21 | #define NMI_STACK 3 | ||
22 | #define DEBUG_STACK 4 | ||
23 | #define MCE_STACK 5 | ||
24 | #define N_EXCEPTION_STACKS 5 /* hw limit: 7 */ | ||
25 | |||
26 | #define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT) | ||
27 | #define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1)) | ||
28 | |||
29 | /* | ||
30 | * Set __PAGE_OFFSET to the most negative possible address + | ||
31 | * PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a | ||
32 | * hypervisor to fit. Choosing 16 slots here is arbitrary, but it's | ||
33 | * what Xen requires. | ||
34 | */ | ||
35 | #define __PAGE_OFFSET _AC(0xffff880000000000, UL) | ||
36 | |||
37 | #define __PHYSICAL_START CONFIG_PHYSICAL_START | ||
38 | #define __KERNEL_ALIGN 0x200000 | ||
39 | |||
40 | /* | ||
41 | * Make sure kernel is aligned to 2MB address. Catching it at compile | ||
42 | * time is better. Change your config file and compile the kernel | ||
43 | * for a 2MB aligned address (CONFIG_PHYSICAL_START) | ||
44 | */ | ||
45 | #if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0 | ||
46 | #error "CONFIG_PHYSICAL_START must be a multiple of 2MB" | ||
47 | #endif | ||
48 | |||
49 | #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) | ||
50 | #define __START_KERNEL_map _AC(0xffffffff80000000, UL) | ||
51 | |||
52 | /* See Documentation/x86_64/mm.txt for a description of the memory map. */ | ||
53 | #define __PHYSICAL_MASK_SHIFT 46 | ||
54 | #define __VIRTUAL_MASK_SHIFT 48 | ||
55 | |||
56 | /* | ||
57 | * Kernel image size is limited to 512 MB (see level2_kernel_pgt in | ||
58 | * arch/x86/kernel/head_64.S), and it is mapped here: | ||
59 | */ | ||
60 | #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) | ||
61 | #define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL) | ||
62 | |||
63 | #ifndef __ASSEMBLY__ | ||
64 | void clear_page(void *page); | ||
65 | void copy_page(void *to, void *from); | ||
66 | |||
67 | /* duplicated to the one in bootmem.h */ | ||
68 | extern unsigned long max_pfn; | ||
69 | extern unsigned long phys_base; | ||
70 | |||
71 | extern unsigned long __phys_addr(unsigned long); | ||
72 | #define __phys_reloc_hide(x) (x) | ||
73 | |||
74 | /* | ||
75 | * These are used to make use of C type-checking.. | ||
76 | */ | ||
77 | typedef unsigned long pteval_t; | ||
78 | typedef unsigned long pmdval_t; | ||
79 | typedef unsigned long pudval_t; | ||
80 | typedef unsigned long pgdval_t; | ||
81 | typedef unsigned long pgprotval_t; | ||
82 | |||
83 | typedef struct page *pgtable_t; | ||
84 | |||
85 | typedef struct { pteval_t pte; } pte_t; | ||
86 | |||
87 | #define vmemmap ((struct page *)VMEMMAP_START) | ||
88 | |||
89 | extern unsigned long init_memory_mapping(unsigned long start, | ||
90 | unsigned long end); | ||
91 | |||
92 | extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn); | ||
93 | extern void free_initmem(void); | ||
94 | |||
95 | extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); | ||
96 | extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); | ||
97 | |||
98 | #endif /* !__ASSEMBLY__ */ | ||
99 | |||
100 | #ifdef CONFIG_FLATMEM | ||
101 | #define pfn_valid(pfn) ((pfn) < max_pfn) | ||
102 | #endif | ||
103 | |||
104 | 5 | ||
105 | #endif /* _ASM_X86_PAGE_64_H */ | 6 | #endif /* _ASM_X86_PAGE_64_H */ |
diff --git a/arch/x86/include/asm/page_64_types.h b/arch/x86/include/asm/page_64_types.h new file mode 100644 index 000000000000..d38c91b70248 --- /dev/null +++ b/arch/x86/include/asm/page_64_types.h | |||
@@ -0,0 +1,89 @@ | |||
1 | #ifndef _ASM_X86_PAGE_64_DEFS_H | ||
2 | #define _ASM_X86_PAGE_64_DEFS_H | ||
3 | |||
4 | #define THREAD_ORDER 1 | ||
5 | #define THREAD_SIZE (PAGE_SIZE << THREAD_ORDER) | ||
6 | #define CURRENT_MASK (~(THREAD_SIZE - 1)) | ||
7 | |||
8 | #define EXCEPTION_STACK_ORDER 0 | ||
9 | #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER) | ||
10 | |||
11 | #define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1) | ||
12 | #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER) | ||
13 | |||
14 | #define IRQ_STACK_ORDER 2 | ||
15 | #define IRQ_STACK_SIZE (PAGE_SIZE << IRQ_STACK_ORDER) | ||
16 | |||
17 | #define STACKFAULT_STACK 1 | ||
18 | #define DOUBLEFAULT_STACK 2 | ||
19 | #define NMI_STACK 3 | ||
20 | #define DEBUG_STACK 4 | ||
21 | #define MCE_STACK 5 | ||
22 | #define N_EXCEPTION_STACKS 5 /* hw limit: 7 */ | ||
23 | |||
24 | #define PUD_PAGE_SIZE (_AC(1, UL) << PUD_SHIFT) | ||
25 | #define PUD_PAGE_MASK (~(PUD_PAGE_SIZE-1)) | ||
26 | |||
27 | /* | ||
28 | * Set __PAGE_OFFSET to the most negative possible address + | ||
29 | * PGDIR_SIZE*16 (pgd slot 272). The gap is to allow a space for a | ||
30 | * hypervisor to fit. Choosing 16 slots here is arbitrary, but it's | ||
31 | * what Xen requires. | ||
32 | */ | ||
33 | #define __PAGE_OFFSET _AC(0xffff880000000000, UL) | ||
34 | |||
35 | #define __PHYSICAL_START CONFIG_PHYSICAL_START | ||
36 | #define __KERNEL_ALIGN 0x200000 | ||
37 | |||
38 | /* | ||
39 | * Make sure kernel is aligned to 2MB address. Catching it at compile | ||
40 | * time is better. Change your config file and compile the kernel | ||
41 | * for a 2MB aligned address (CONFIG_PHYSICAL_START) | ||
42 | */ | ||
43 | #if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0 | ||
44 | #error "CONFIG_PHYSICAL_START must be a multiple of 2MB" | ||
45 | #endif | ||
46 | |||
47 | #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) | ||
48 | #define __START_KERNEL_map _AC(0xffffffff80000000, UL) | ||
49 | |||
50 | /* See Documentation/x86_64/mm.txt for a description of the memory map. */ | ||
51 | #define __PHYSICAL_MASK_SHIFT 46 | ||
52 | #define __VIRTUAL_MASK_SHIFT 48 | ||
53 | |||
54 | /* | ||
55 | * Kernel image size is limited to 512 MB (see level2_kernel_pgt in | ||
56 | * arch/x86/kernel/head_64.S), and it is mapped here: | ||
57 | */ | ||
58 | #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) | ||
59 | #define KERNEL_IMAGE_START _AC(0xffffffff80000000, UL) | ||
60 | |||
61 | #ifndef __ASSEMBLY__ | ||
62 | void clear_page(void *page); | ||
63 | void copy_page(void *to, void *from); | ||
64 | |||
65 | /* duplicated to the one in bootmem.h */ | ||
66 | extern unsigned long max_pfn; | ||
67 | extern unsigned long phys_base; | ||
68 | |||
69 | extern unsigned long __phys_addr(unsigned long); | ||
70 | #define __phys_reloc_hide(x) (x) | ||
71 | |||
72 | #define vmemmap ((struct page *)VMEMMAP_START) | ||
73 | |||
74 | extern unsigned long init_memory_mapping(unsigned long start, | ||
75 | unsigned long end); | ||
76 | |||
77 | extern void initmem_init(unsigned long start_pfn, unsigned long end_pfn); | ||
78 | extern void free_initmem(void); | ||
79 | |||
80 | extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); | ||
81 | extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); | ||
82 | |||
83 | #endif /* !__ASSEMBLY__ */ | ||
84 | |||
85 | #ifdef CONFIG_FLATMEM | ||
86 | #define pfn_valid(pfn) ((pfn) < max_pfn) | ||
87 | #endif | ||
88 | |||
89 | #endif /* _ASM_X86_PAGE_64_DEFS_H */ | ||
diff --git a/arch/x86/include/asm/page_types.h b/arch/x86/include/asm/page_types.h new file mode 100644 index 000000000000..2d625da6603c --- /dev/null +++ b/arch/x86/include/asm/page_types.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #ifndef _ASM_X86_PAGE_DEFS_H | ||
2 | #define _ASM_X86_PAGE_DEFS_H | ||
3 | |||
4 | #include <linux/const.h> | ||
5 | |||
6 | /* PAGE_SHIFT determines the page size */ | ||
7 | #define PAGE_SHIFT 12 | ||
8 | #define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT) | ||
9 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
10 | |||
11 | #define __PHYSICAL_MASK ((phys_addr_t)(1ULL << __PHYSICAL_MASK_SHIFT) - 1) | ||
12 | #define __VIRTUAL_MASK ((1UL << __VIRTUAL_MASK_SHIFT) - 1) | ||
13 | |||
14 | /* Cast PAGE_MASK to a signed type so that it is sign-extended if | ||
15 | virtual addresses are 32-bits but physical addresses are larger | ||
16 | (ie, 32-bit PAE). */ | ||
17 | #define PHYSICAL_PAGE_MASK (((signed long)PAGE_MASK) & __PHYSICAL_MASK) | ||
18 | |||
19 | #define PMD_PAGE_SIZE (_AC(1, UL) << PMD_SHIFT) | ||
20 | #define PMD_PAGE_MASK (~(PMD_PAGE_SIZE-1)) | ||
21 | |||
22 | #define HPAGE_SHIFT PMD_SHIFT | ||
23 | #define HPAGE_SIZE (_AC(1,UL) << HPAGE_SHIFT) | ||
24 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | ||
25 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | ||
26 | |||
27 | #define HUGE_MAX_HSTATE 2 | ||
28 | |||
29 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | ||
30 | |||
31 | #define VM_DATA_DEFAULT_FLAGS \ | ||
32 | (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \ | ||
33 | VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | ||
34 | |||
35 | #ifdef CONFIG_X86_64 | ||
36 | #include <asm/page_64_types.h> | ||
37 | #else | ||
38 | #include <asm/page_32_types.h> | ||
39 | #endif /* CONFIG_X86_64 */ | ||
40 | |||
41 | #ifndef __ASSEMBLY__ | ||
42 | |||
43 | struct pgprot; | ||
44 | |||
45 | extern int page_is_ram(unsigned long pagenr); | ||
46 | extern int devmem_is_allowed(unsigned long pagenr); | ||
47 | extern void map_devmem(unsigned long pfn, unsigned long size, | ||
48 | struct pgprot vma_prot); | ||
49 | extern void unmap_devmem(unsigned long pfn, unsigned long size, | ||
50 | struct pgprot vma_prot); | ||
51 | |||
52 | extern unsigned long max_low_pfn_mapped; | ||
53 | extern unsigned long max_pfn_mapped; | ||
54 | |||
55 | #endif /* !__ASSEMBLY__ */ | ||
56 | |||
57 | #endif /* _ASM_X86_PAGE_DEFS_H */ | ||
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h index ff691736f5e9..0617d5cc9712 100644 --- a/arch/x86/include/asm/paravirt.h +++ b/arch/x86/include/asm/paravirt.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * para-virtualization: those hooks are defined here. */ | 4 | * para-virtualization: those hooks are defined here. */ |
5 | 5 | ||
6 | #ifdef CONFIG_PARAVIRT | 6 | #ifdef CONFIG_PARAVIRT |
7 | #include <asm/page.h> | 7 | #include <asm/pgtable_types.h> |
8 | #include <asm/asm.h> | 8 | #include <asm/asm.h> |
9 | 9 | ||
10 | /* Bitmask of what can be clobbered: usually at least eax. */ | 10 | /* Bitmask of what can be clobbered: usually at least eax. */ |
@@ -1431,14 +1431,7 @@ static inline void arch_leave_lazy_cpu_mode(void) | |||
1431 | PVOP_VCALL0(pv_cpu_ops.lazy_mode.leave); | 1431 | PVOP_VCALL0(pv_cpu_ops.lazy_mode.leave); |
1432 | } | 1432 | } |
1433 | 1433 | ||
1434 | static inline void arch_flush_lazy_cpu_mode(void) | 1434 | void arch_flush_lazy_cpu_mode(void); |
1435 | { | ||
1436 | if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU)) { | ||
1437 | arch_leave_lazy_cpu_mode(); | ||
1438 | arch_enter_lazy_cpu_mode(); | ||
1439 | } | ||
1440 | } | ||
1441 | |||
1442 | 1435 | ||
1443 | #define __HAVE_ARCH_ENTER_LAZY_MMU_MODE | 1436 | #define __HAVE_ARCH_ENTER_LAZY_MMU_MODE |
1444 | static inline void arch_enter_lazy_mmu_mode(void) | 1437 | static inline void arch_enter_lazy_mmu_mode(void) |
@@ -1451,13 +1444,7 @@ static inline void arch_leave_lazy_mmu_mode(void) | |||
1451 | PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave); | 1444 | PVOP_VCALL0(pv_mmu_ops.lazy_mode.leave); |
1452 | } | 1445 | } |
1453 | 1446 | ||
1454 | static inline void arch_flush_lazy_mmu_mode(void) | 1447 | void arch_flush_lazy_mmu_mode(void); |
1455 | { | ||
1456 | if (unlikely(paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU)) { | ||
1457 | arch_leave_lazy_mmu_mode(); | ||
1458 | arch_enter_lazy_mmu_mode(); | ||
1459 | } | ||
1460 | } | ||
1461 | 1448 | ||
1462 | static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx, | 1449 | static inline void __set_fixmap(unsigned /* enum fixed_addresses */ idx, |
1463 | unsigned long phys, pgprot_t flags) | 1450 | unsigned long phys, pgprot_t flags) |
@@ -1482,6 +1469,7 @@ static inline int __raw_spin_is_contended(struct raw_spinlock *lock) | |||
1482 | { | 1469 | { |
1483 | return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock); | 1470 | return PVOP_CALL1(int, pv_lock_ops.spin_is_contended, lock); |
1484 | } | 1471 | } |
1472 | #define __raw_spin_is_contended __raw_spin_is_contended | ||
1485 | 1473 | ||
1486 | static __always_inline void __raw_spin_lock(struct raw_spinlock *lock) | 1474 | static __always_inline void __raw_spin_lock(struct raw_spinlock *lock) |
1487 | { | 1475 | { |
diff --git a/arch/x86/include/asm/pat.h b/arch/x86/include/asm/pat.h index b8493b3b9890..9709fdff6615 100644 --- a/arch/x86/include/asm/pat.h +++ b/arch/x86/include/asm/pat.h | |||
@@ -5,10 +5,8 @@ | |||
5 | 5 | ||
6 | #ifdef CONFIG_X86_PAT | 6 | #ifdef CONFIG_X86_PAT |
7 | extern int pat_enabled; | 7 | extern int pat_enabled; |
8 | extern void validate_pat_support(struct cpuinfo_x86 *c); | ||
9 | #else | 8 | #else |
10 | static const int pat_enabled; | 9 | static const int pat_enabled; |
11 | static inline void validate_pat_support(struct cpuinfo_x86 *c) { } | ||
12 | #endif | 10 | #endif |
13 | 11 | ||
14 | extern void pat_init(void); | 12 | extern void pat_init(void); |
@@ -17,6 +15,4 @@ extern int reserve_memtype(u64 start, u64 end, | |||
17 | unsigned long req_type, unsigned long *ret_type); | 15 | unsigned long req_type, unsigned long *ret_type); |
18 | extern int free_memtype(u64 start, u64 end); | 16 | extern int free_memtype(u64 start, u64 end); |
19 | 17 | ||
20 | extern void pat_disable(char *reason); | ||
21 | |||
22 | #endif /* _ASM_X86_PAT_H */ | 18 | #endif /* _ASM_X86_PAT_H */ |
diff --git a/arch/x86/include/asm/mach-default/pci-functions.h b/arch/x86/include/asm/pci-functions.h index ed0bab427354..ed0bab427354 100644 --- a/arch/x86/include/asm/mach-default/pci-functions.h +++ b/arch/x86/include/asm/pci-functions.h | |||
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index e0d199fe1d83..c1774ac9da7a 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h | |||
@@ -53,8 +53,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) | |||
53 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) | 53 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) |
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define pte_none(x) (!(x).pte_low) | ||
57 | |||
58 | /* | 56 | /* |
59 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, | 57 | * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, |
60 | * split up the 29 bits of offset into this range: | 58 | * split up the 29 bits of offset into this range: |
diff --git a/arch/x86/include/asm/pgtable-2level-defs.h b/arch/x86/include/asm/pgtable-2level_types.h index d77db8990eaa..daacc23e3fb9 100644 --- a/arch/x86/include/asm/pgtable-2level-defs.h +++ b/arch/x86/include/asm/pgtable-2level_types.h | |||
@@ -1,7 +1,23 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H | 1 | #ifndef _ASM_X86_PGTABLE_2LEVEL_DEFS_H |
2 | #define _ASM_X86_PGTABLE_2LEVEL_DEFS_H | 2 | #define _ASM_X86_PGTABLE_2LEVEL_DEFS_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | typedef unsigned long pteval_t; | ||
8 | typedef unsigned long pmdval_t; | ||
9 | typedef unsigned long pudval_t; | ||
10 | typedef unsigned long pgdval_t; | ||
11 | typedef unsigned long pgprotval_t; | ||
12 | |||
13 | typedef union { | ||
14 | pteval_t pte; | ||
15 | pteval_t pte_low; | ||
16 | } pte_t; | ||
17 | #endif /* !__ASSEMBLY__ */ | ||
18 | |||
4 | #define SHARED_KERNEL_PMD 0 | 19 | #define SHARED_KERNEL_PMD 0 |
20 | #define PAGETABLE_LEVELS 2 | ||
5 | 21 | ||
6 | /* | 22 | /* |
7 | * traditional i386 two-level paging structure: | 23 | * traditional i386 two-level paging structure: |
@@ -10,6 +26,7 @@ | |||
10 | #define PGDIR_SHIFT 22 | 26 | #define PGDIR_SHIFT 22 |
11 | #define PTRS_PER_PGD 1024 | 27 | #define PTRS_PER_PGD 1024 |
12 | 28 | ||
29 | |||
13 | /* | 30 | /* |
14 | * the i386 is two-level, so we don't really have any | 31 | * the i386 is two-level, so we don't really have any |
15 | * PMD directory physically. | 32 | * PMD directory physically. |
diff --git a/arch/x86/include/asm/pgtable-3level.h b/arch/x86/include/asm/pgtable-3level.h index 447da43cddb3..3f13cdf61156 100644 --- a/arch/x86/include/asm/pgtable-3level.h +++ b/arch/x86/include/asm/pgtable-3level.h | |||
@@ -18,21 +18,6 @@ | |||
18 | printk("%s:%d: bad pgd %p(%016Lx).\n", \ | 18 | printk("%s:%d: bad pgd %p(%016Lx).\n", \ |
19 | __FILE__, __LINE__, &(e), pgd_val(e)) | 19 | __FILE__, __LINE__, &(e), pgd_val(e)) |
20 | 20 | ||
21 | static inline int pud_none(pud_t pud) | ||
22 | { | ||
23 | return pud_val(pud) == 0; | ||
24 | } | ||
25 | |||
26 | static inline int pud_bad(pud_t pud) | ||
27 | { | ||
28 | return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0; | ||
29 | } | ||
30 | |||
31 | static inline int pud_present(pud_t pud) | ||
32 | { | ||
33 | return pud_val(pud) & _PAGE_PRESENT; | ||
34 | } | ||
35 | |||
36 | /* Rules for using set_pte: the pte being assigned *must* be | 21 | /* Rules for using set_pte: the pte being assigned *must* be |
37 | * either not present or in a state where the hardware will | 22 | * either not present or in a state where the hardware will |
38 | * not attempt to update the pte. In places where this is | 23 | * not attempt to update the pte. In places where this is |
@@ -120,15 +105,6 @@ static inline void pud_clear(pud_t *pudp) | |||
120 | write_cr3(pgd); | 105 | write_cr3(pgd); |
121 | } | 106 | } |
122 | 107 | ||
123 | #define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT) | ||
124 | |||
125 | #define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK)) | ||
126 | |||
127 | |||
128 | /* Find an entry in the second-level page table.. */ | ||
129 | #define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) + \ | ||
130 | pmd_index(address)) | ||
131 | |||
132 | #ifdef CONFIG_SMP | 108 | #ifdef CONFIG_SMP |
133 | static inline pte_t native_ptep_get_and_clear(pte_t *ptep) | 109 | static inline pte_t native_ptep_get_and_clear(pte_t *ptep) |
134 | { | 110 | { |
@@ -145,17 +121,6 @@ static inline pte_t native_ptep_get_and_clear(pte_t *ptep) | |||
145 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) | 121 | #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) |
146 | #endif | 122 | #endif |
147 | 123 | ||
148 | #define __HAVE_ARCH_PTE_SAME | ||
149 | static inline int pte_same(pte_t a, pte_t b) | ||
150 | { | ||
151 | return a.pte_low == b.pte_low && a.pte_high == b.pte_high; | ||
152 | } | ||
153 | |||
154 | static inline int pte_none(pte_t pte) | ||
155 | { | ||
156 | return !pte.pte_low && !pte.pte_high; | ||
157 | } | ||
158 | |||
159 | /* | 124 | /* |
160 | * Bits 0, 6 and 7 are taken in the low part of the pte, | 125 | * Bits 0, 6 and 7 are taken in the low part of the pte, |
161 | * put the 32 bits of offset into the high part. | 126 | * put the 32 bits of offset into the high part. |
diff --git a/arch/x86/include/asm/pgtable-3level-defs.h b/arch/x86/include/asm/pgtable-3level_types.h index 62561367653c..1bd5876c8649 100644 --- a/arch/x86/include/asm/pgtable-3level-defs.h +++ b/arch/x86/include/asm/pgtable-3level_types.h | |||
@@ -1,12 +1,31 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H | 1 | #ifndef _ASM_X86_PGTABLE_3LEVEL_DEFS_H |
2 | #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H | 2 | #define _ASM_X86_PGTABLE_3LEVEL_DEFS_H |
3 | 3 | ||
4 | #ifndef __ASSEMBLY__ | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | typedef u64 pteval_t; | ||
8 | typedef u64 pmdval_t; | ||
9 | typedef u64 pudval_t; | ||
10 | typedef u64 pgdval_t; | ||
11 | typedef u64 pgprotval_t; | ||
12 | |||
13 | typedef union { | ||
14 | struct { | ||
15 | unsigned long pte_low, pte_high; | ||
16 | }; | ||
17 | pteval_t pte; | ||
18 | } pte_t; | ||
19 | #endif /* !__ASSEMBLY__ */ | ||
20 | |||
4 | #ifdef CONFIG_PARAVIRT | 21 | #ifdef CONFIG_PARAVIRT |
5 | #define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) | 22 | #define SHARED_KERNEL_PMD (pv_info.shared_kernel_pmd) |
6 | #else | 23 | #else |
7 | #define SHARED_KERNEL_PMD 1 | 24 | #define SHARED_KERNEL_PMD 1 |
8 | #endif | 25 | #endif |
9 | 26 | ||
27 | #define PAGETABLE_LEVELS 3 | ||
28 | |||
10 | /* | 29 | /* |
11 | * PGDIR_SHIFT determines what a top-level page table entry can map | 30 | * PGDIR_SHIFT determines what a top-level page table entry can map |
12 | */ | 31 | */ |
@@ -25,4 +44,5 @@ | |||
25 | */ | 44 | */ |
26 | #define PTRS_PER_PTE 512 | 45 | #define PTRS_PER_PTE 512 |
27 | 46 | ||
47 | |||
28 | #endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */ | 48 | #endif /* _ASM_X86_PGTABLE_3LEVEL_DEFS_H */ |
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 6f7c102018bf..1c097a3a6669 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -1,164 +1,9 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_H | 1 | #ifndef _ASM_X86_PGTABLE_H |
2 | #define _ASM_X86_PGTABLE_H | 2 | #define _ASM_X86_PGTABLE_H |
3 | 3 | ||
4 | #define FIRST_USER_ADDRESS 0 | 4 | #include <asm/page.h> |
5 | |||
6 | #define _PAGE_BIT_PRESENT 0 /* is present */ | ||
7 | #define _PAGE_BIT_RW 1 /* writeable */ | ||
8 | #define _PAGE_BIT_USER 2 /* userspace addressable */ | ||
9 | #define _PAGE_BIT_PWT 3 /* page write through */ | ||
10 | #define _PAGE_BIT_PCD 4 /* page cache disabled */ | ||
11 | #define _PAGE_BIT_ACCESSED 5 /* was accessed (raised by CPU) */ | ||
12 | #define _PAGE_BIT_DIRTY 6 /* was written to (raised by CPU) */ | ||
13 | #define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */ | ||
14 | #define _PAGE_BIT_PAT 7 /* on 4KB pages */ | ||
15 | #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ | ||
16 | #define _PAGE_BIT_UNUSED1 9 /* available for programmer */ | ||
17 | #define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */ | ||
18 | #define _PAGE_BIT_UNUSED3 11 | ||
19 | #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ | ||
20 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 | ||
21 | #define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1 | ||
22 | #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ | ||
23 | |||
24 | /* If _PAGE_BIT_PRESENT is clear, we use these: */ | ||
25 | /* - if the user mapped it with PROT_NONE; pte_present gives true */ | ||
26 | #define _PAGE_BIT_PROTNONE _PAGE_BIT_GLOBAL | ||
27 | /* - set: nonlinear file mapping, saved PTE; unset:swap */ | ||
28 | #define _PAGE_BIT_FILE _PAGE_BIT_DIRTY | ||
29 | |||
30 | #define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT) | ||
31 | #define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW) | ||
32 | #define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER) | ||
33 | #define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT) | ||
34 | #define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD) | ||
35 | #define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED) | ||
36 | #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY) | ||
37 | #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) | ||
38 | #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) | ||
39 | #define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) | ||
40 | #define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP) | ||
41 | #define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3) | ||
42 | #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) | ||
43 | #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) | ||
44 | #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) | ||
45 | #define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST) | ||
46 | #define __HAVE_ARCH_PTE_SPECIAL | ||
47 | |||
48 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) | ||
49 | #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) | ||
50 | #else | ||
51 | #define _PAGE_NX (_AT(pteval_t, 0)) | ||
52 | #endif | ||
53 | 5 | ||
54 | #define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE) | 6 | #include <asm/pgtable_types.h> |
55 | #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE) | ||
56 | |||
57 | #define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ | ||
58 | _PAGE_ACCESSED | _PAGE_DIRTY) | ||
59 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ | ||
60 | _PAGE_DIRTY) | ||
61 | |||
62 | /* Set of bits not changed in pte_modify */ | ||
63 | #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ | ||
64 | _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY) | ||
65 | |||
66 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) | ||
67 | #define _PAGE_CACHE_WB (0) | ||
68 | #define _PAGE_CACHE_WC (_PAGE_PWT) | ||
69 | #define _PAGE_CACHE_UC_MINUS (_PAGE_PCD) | ||
70 | #define _PAGE_CACHE_UC (_PAGE_PCD | _PAGE_PWT) | ||
71 | |||
72 | #define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED) | ||
73 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ | ||
74 | _PAGE_ACCESSED | _PAGE_NX) | ||
75 | |||
76 | #define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | \ | ||
77 | _PAGE_USER | _PAGE_ACCESSED) | ||
78 | #define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
79 | _PAGE_ACCESSED | _PAGE_NX) | ||
80 | #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
81 | _PAGE_ACCESSED) | ||
82 | #define PAGE_COPY PAGE_COPY_NOEXEC | ||
83 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
84 | _PAGE_ACCESSED | _PAGE_NX) | ||
85 | #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
86 | _PAGE_ACCESSED) | ||
87 | |||
88 | #define __PAGE_KERNEL_EXEC \ | ||
89 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL) | ||
90 | #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) | ||
91 | |||
92 | #define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW) | ||
93 | #define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW) | ||
94 | #define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT) | ||
95 | #define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC) | ||
96 | #define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT) | ||
97 | #define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD) | ||
98 | #define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER) | ||
99 | #define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT) | ||
100 | #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) | ||
101 | #define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE) | ||
102 | #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) | ||
103 | |||
104 | #define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP) | ||
105 | #define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP) | ||
106 | #define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP) | ||
107 | #define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP) | ||
108 | |||
109 | #define PAGE_KERNEL __pgprot(__PAGE_KERNEL) | ||
110 | #define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO) | ||
111 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) | ||
112 | #define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX) | ||
113 | #define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC) | ||
114 | #define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE) | ||
115 | #define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS) | ||
116 | #define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE) | ||
117 | #define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE) | ||
118 | #define PAGE_KERNEL_LARGE_NOCACHE __pgprot(__PAGE_KERNEL_LARGE_NOCACHE) | ||
119 | #define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC) | ||
120 | #define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL) | ||
121 | #define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE) | ||
122 | |||
123 | #define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO) | ||
124 | #define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE) | ||
125 | #define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS) | ||
126 | #define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC) | ||
127 | |||
128 | /* xwr */ | ||
129 | #define __P000 PAGE_NONE | ||
130 | #define __P001 PAGE_READONLY | ||
131 | #define __P010 PAGE_COPY | ||
132 | #define __P011 PAGE_COPY | ||
133 | #define __P100 PAGE_READONLY_EXEC | ||
134 | #define __P101 PAGE_READONLY_EXEC | ||
135 | #define __P110 PAGE_COPY_EXEC | ||
136 | #define __P111 PAGE_COPY_EXEC | ||
137 | |||
138 | #define __S000 PAGE_NONE | ||
139 | #define __S001 PAGE_READONLY | ||
140 | #define __S010 PAGE_SHARED | ||
141 | #define __S011 PAGE_SHARED | ||
142 | #define __S100 PAGE_READONLY_EXEC | ||
143 | #define __S101 PAGE_READONLY_EXEC | ||
144 | #define __S110 PAGE_SHARED_EXEC | ||
145 | #define __S111 PAGE_SHARED_EXEC | ||
146 | |||
147 | /* | ||
148 | * early identity mapping pte attrib macros. | ||
149 | */ | ||
150 | #ifdef CONFIG_X86_64 | ||
151 | #define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC | ||
152 | #else | ||
153 | /* | ||
154 | * For PDE_IDENT_ATTR include USER bit. As the PDE and PTE protection | ||
155 | * bits are combined, this will alow user to access the high address mapped | ||
156 | * VDSO in the presence of CONFIG_COMPAT_VDSO | ||
157 | */ | ||
158 | #define PTE_IDENT_ATTR 0x003 /* PRESENT+RW */ | ||
159 | #define PDE_IDENT_ATTR 0x067 /* PRESENT+RW+USER+DIRTY+ACCESSED */ | ||
160 | #define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */ | ||
161 | #endif | ||
162 | 7 | ||
163 | /* | 8 | /* |
164 | * Macro to mark a page protection value as UC- | 9 | * Macro to mark a page protection value as UC- |
@@ -170,9 +15,6 @@ | |||
170 | 15 | ||
171 | #ifndef __ASSEMBLY__ | 16 | #ifndef __ASSEMBLY__ |
172 | 17 | ||
173 | #define pgprot_writecombine pgprot_writecombine | ||
174 | extern pgprot_t pgprot_writecombine(pgprot_t prot); | ||
175 | |||
176 | /* | 18 | /* |
177 | * ZERO_PAGE is a global shared page that is always zero: used | 19 | * ZERO_PAGE is a global shared page that is always zero: used |
178 | * for zero-mapped memory areas etc.. | 20 | * for zero-mapped memory areas etc.. |
@@ -183,6 +25,66 @@ extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; | |||
183 | extern spinlock_t pgd_lock; | 25 | extern spinlock_t pgd_lock; |
184 | extern struct list_head pgd_list; | 26 | extern struct list_head pgd_list; |
185 | 27 | ||
28 | #ifdef CONFIG_PARAVIRT | ||
29 | #include <asm/paravirt.h> | ||
30 | #else /* !CONFIG_PARAVIRT */ | ||
31 | #define set_pte(ptep, pte) native_set_pte(ptep, pte) | ||
32 | #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) | ||
33 | |||
34 | #define set_pte_present(mm, addr, ptep, pte) \ | ||
35 | native_set_pte_present(mm, addr, ptep, pte) | ||
36 | #define set_pte_atomic(ptep, pte) \ | ||
37 | native_set_pte_atomic(ptep, pte) | ||
38 | |||
39 | #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) | ||
40 | |||
41 | #ifndef __PAGETABLE_PUD_FOLDED | ||
42 | #define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd) | ||
43 | #define pgd_clear(pgd) native_pgd_clear(pgd) | ||
44 | #endif | ||
45 | |||
46 | #ifndef set_pud | ||
47 | # define set_pud(pudp, pud) native_set_pud(pudp, pud) | ||
48 | #endif | ||
49 | |||
50 | #ifndef __PAGETABLE_PMD_FOLDED | ||
51 | #define pud_clear(pud) native_pud_clear(pud) | ||
52 | #endif | ||
53 | |||
54 | #define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep) | ||
55 | #define pmd_clear(pmd) native_pmd_clear(pmd) | ||
56 | |||
57 | #define pte_update(mm, addr, ptep) do { } while (0) | ||
58 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | ||
59 | |||
60 | static inline void __init paravirt_pagetable_setup_start(pgd_t *base) | ||
61 | { | ||
62 | native_pagetable_setup_start(base); | ||
63 | } | ||
64 | |||
65 | static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | ||
66 | { | ||
67 | native_pagetable_setup_done(base); | ||
68 | } | ||
69 | |||
70 | #define pgd_val(x) native_pgd_val(x) | ||
71 | #define __pgd(x) native_make_pgd(x) | ||
72 | |||
73 | #ifndef __PAGETABLE_PUD_FOLDED | ||
74 | #define pud_val(x) native_pud_val(x) | ||
75 | #define __pud(x) native_make_pud(x) | ||
76 | #endif | ||
77 | |||
78 | #ifndef __PAGETABLE_PMD_FOLDED | ||
79 | #define pmd_val(x) native_pmd_val(x) | ||
80 | #define __pmd(x) native_make_pmd(x) | ||
81 | #endif | ||
82 | |||
83 | #define pte_val(x) native_pte_val(x) | ||
84 | #define __pte(x) native_make_pte(x) | ||
85 | |||
86 | #endif /* CONFIG_PARAVIRT */ | ||
87 | |||
186 | /* | 88 | /* |
187 | * The following only work if pte_present() is true. | 89 | * The following only work if pte_present() is true. |
188 | * Undefined behaviour if not.. | 90 | * Undefined behaviour if not.. |
@@ -236,7 +138,7 @@ static inline unsigned long pte_pfn(pte_t pte) | |||
236 | 138 | ||
237 | static inline int pmd_large(pmd_t pte) | 139 | static inline int pmd_large(pmd_t pte) |
238 | { | 140 | { |
239 | return (pmd_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == | 141 | return (pmd_flags(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == |
240 | (_PAGE_PSE | _PAGE_PRESENT); | 142 | (_PAGE_PSE | _PAGE_PRESENT); |
241 | } | 143 | } |
242 | 144 | ||
@@ -314,8 +216,6 @@ static inline pte_t pte_mkspecial(pte_t pte) | |||
314 | return pte_set_flags(pte, _PAGE_SPECIAL); | 216 | return pte_set_flags(pte, _PAGE_SPECIAL); |
315 | } | 217 | } |
316 | 218 | ||
317 | extern pteval_t __supported_pte_mask; | ||
318 | |||
319 | /* | 219 | /* |
320 | * Mask out unsupported bits in a present pgprot. Non-present pgprots | 220 | * Mask out unsupported bits in a present pgprot. Non-present pgprots |
321 | * can use those bits for other purposes, so leave them be. | 221 | * can use those bits for other purposes, so leave them be. |
@@ -388,82 +288,195 @@ static inline int is_new_memtype_allowed(unsigned long flags, | |||
388 | return 1; | 288 | return 1; |
389 | } | 289 | } |
390 | 290 | ||
391 | #ifndef __ASSEMBLY__ | 291 | #endif /* __ASSEMBLY__ */ |
392 | /* Indicate that x86 has its own track and untrack pfn vma functions */ | ||
393 | #define __HAVE_PFNMAP_TRACKING | ||
394 | |||
395 | #define __HAVE_PHYS_MEM_ACCESS_PROT | ||
396 | struct file; | ||
397 | pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | ||
398 | unsigned long size, pgprot_t vma_prot); | ||
399 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | ||
400 | unsigned long size, pgprot_t *vma_prot); | ||
401 | #endif | ||
402 | |||
403 | /* Install a pte for a particular vaddr in kernel space. */ | ||
404 | void set_pte_vaddr(unsigned long vaddr, pte_t pte); | ||
405 | 292 | ||
406 | #ifdef CONFIG_X86_32 | 293 | #ifdef CONFIG_X86_32 |
407 | extern void native_pagetable_setup_start(pgd_t *base); | 294 | # include "pgtable_32.h" |
408 | extern void native_pagetable_setup_done(pgd_t *base); | ||
409 | #else | 295 | #else |
410 | static inline void native_pagetable_setup_start(pgd_t *base) {} | 296 | # include "pgtable_64.h" |
411 | static inline void native_pagetable_setup_done(pgd_t *base) {} | ||
412 | #endif | 297 | #endif |
413 | 298 | ||
414 | struct seq_file; | 299 | #ifndef __ASSEMBLY__ |
415 | extern void arch_report_meminfo(struct seq_file *m); | 300 | #include <linux/mm_types.h> |
416 | 301 | ||
417 | #ifdef CONFIG_PARAVIRT | 302 | static inline int pte_none(pte_t pte) |
418 | #include <asm/paravirt.h> | 303 | { |
419 | #else /* !CONFIG_PARAVIRT */ | 304 | return !pte.pte; |
420 | #define set_pte(ptep, pte) native_set_pte(ptep, pte) | 305 | } |
421 | #define set_pte_at(mm, addr, ptep, pte) native_set_pte_at(mm, addr, ptep, pte) | ||
422 | 306 | ||
423 | #define set_pte_present(mm, addr, ptep, pte) \ | 307 | #define __HAVE_ARCH_PTE_SAME |
424 | native_set_pte_present(mm, addr, ptep, pte) | 308 | static inline int pte_same(pte_t a, pte_t b) |
425 | #define set_pte_atomic(ptep, pte) \ | 309 | { |
426 | native_set_pte_atomic(ptep, pte) | 310 | return a.pte == b.pte; |
311 | } | ||
427 | 312 | ||
428 | #define set_pmd(pmdp, pmd) native_set_pmd(pmdp, pmd) | 313 | static inline int pte_present(pte_t a) |
314 | { | ||
315 | return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE); | ||
316 | } | ||
429 | 317 | ||
430 | #ifndef __PAGETABLE_PUD_FOLDED | 318 | static inline int pmd_present(pmd_t pmd) |
431 | #define set_pgd(pgdp, pgd) native_set_pgd(pgdp, pgd) | 319 | { |
432 | #define pgd_clear(pgd) native_pgd_clear(pgd) | 320 | return pmd_flags(pmd) & _PAGE_PRESENT; |
433 | #endif | 321 | } |
434 | 322 | ||
435 | #ifndef set_pud | 323 | static inline int pmd_none(pmd_t pmd) |
436 | # define set_pud(pudp, pud) native_set_pud(pudp, pud) | 324 | { |
437 | #endif | 325 | /* Only check low word on 32-bit platforms, since it might be |
326 | out of sync with upper half. */ | ||
327 | return (unsigned long)native_pmd_val(pmd) == 0; | ||
328 | } | ||
438 | 329 | ||
439 | #ifndef __PAGETABLE_PMD_FOLDED | 330 | static inline unsigned long pmd_page_vaddr(pmd_t pmd) |
440 | #define pud_clear(pud) native_pud_clear(pud) | 331 | { |
441 | #endif | 332 | return (unsigned long)__va(pmd_val(pmd) & PTE_PFN_MASK); |
333 | } | ||
442 | 334 | ||
443 | #define pte_clear(mm, addr, ptep) native_pte_clear(mm, addr, ptep) | 335 | /* |
444 | #define pmd_clear(pmd) native_pmd_clear(pmd) | 336 | * Currently stuck as a macro due to indirect forward reference to |
337 | * linux/mmzone.h's __section_mem_map_addr() definition: | ||
338 | */ | ||
339 | #define pmd_page(pmd) pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) | ||
445 | 340 | ||
446 | #define pte_update(mm, addr, ptep) do { } while (0) | 341 | /* |
447 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 342 | * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] |
343 | * | ||
344 | * this macro returns the index of the entry in the pmd page which would | ||
345 | * control the given virtual address | ||
346 | */ | ||
347 | static inline unsigned pmd_index(unsigned long address) | ||
348 | { | ||
349 | return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1); | ||
350 | } | ||
448 | 351 | ||
449 | static inline void __init paravirt_pagetable_setup_start(pgd_t *base) | 352 | /* |
353 | * Conversion functions: convert a page and protection to a page entry, | ||
354 | * and a page entry and page directory to the page they refer to. | ||
355 | * | ||
356 | * (Currently stuck as a macro because of indirect forward reference | ||
357 | * to linux/mm.h:page_to_nid()) | ||
358 | */ | ||
359 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | ||
360 | |||
361 | /* | ||
362 | * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE] | ||
363 | * | ||
364 | * this function returns the index of the entry in the pte page which would | ||
365 | * control the given virtual address | ||
366 | */ | ||
367 | static inline unsigned pte_index(unsigned long address) | ||
450 | { | 368 | { |
451 | native_pagetable_setup_start(base); | 369 | return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1); |
452 | } | 370 | } |
453 | 371 | ||
454 | static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | 372 | static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address) |
455 | { | 373 | { |
456 | native_pagetable_setup_done(base); | 374 | return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address); |
457 | } | 375 | } |
458 | #endif /* CONFIG_PARAVIRT */ | ||
459 | 376 | ||
460 | #endif /* __ASSEMBLY__ */ | 377 | static inline int pmd_bad(pmd_t pmd) |
378 | { | ||
379 | return (pmd_flags(pmd) & ~_PAGE_USER) != _KERNPG_TABLE; | ||
380 | } | ||
461 | 381 | ||
462 | #ifdef CONFIG_X86_32 | 382 | static inline unsigned long pages_to_mb(unsigned long npg) |
463 | # include "pgtable_32.h" | 383 | { |
384 | return npg >> (20 - PAGE_SHIFT); | ||
385 | } | ||
386 | |||
387 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
388 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
389 | |||
390 | #if PAGETABLE_LEVELS > 2 | ||
391 | static inline int pud_none(pud_t pud) | ||
392 | { | ||
393 | return native_pud_val(pud) == 0; | ||
394 | } | ||
395 | |||
396 | static inline int pud_present(pud_t pud) | ||
397 | { | ||
398 | return pud_flags(pud) & _PAGE_PRESENT; | ||
399 | } | ||
400 | |||
401 | static inline unsigned long pud_page_vaddr(pud_t pud) | ||
402 | { | ||
403 | return (unsigned long)__va((unsigned long)pud_val(pud) & PTE_PFN_MASK); | ||
404 | } | ||
405 | |||
406 | /* | ||
407 | * Currently stuck as a macro due to indirect forward reference to | ||
408 | * linux/mmzone.h's __section_mem_map_addr() definition: | ||
409 | */ | ||
410 | #define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT) | ||
411 | |||
412 | /* Find an entry in the second-level page table.. */ | ||
413 | static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) | ||
414 | { | ||
415 | return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); | ||
416 | } | ||
417 | |||
418 | static inline unsigned long pmd_pfn(pmd_t pmd) | ||
419 | { | ||
420 | return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT; | ||
421 | } | ||
422 | |||
423 | static inline int pud_large(pud_t pud) | ||
424 | { | ||
425 | return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) == | ||
426 | (_PAGE_PSE | _PAGE_PRESENT); | ||
427 | } | ||
428 | |||
429 | static inline int pud_bad(pud_t pud) | ||
430 | { | ||
431 | return (pud_flags(pud) & ~(_KERNPG_TABLE | _PAGE_USER)) != 0; | ||
432 | } | ||
464 | #else | 433 | #else |
465 | # include "pgtable_64.h" | 434 | static inline int pud_large(pud_t pud) |
466 | #endif | 435 | { |
436 | return 0; | ||
437 | } | ||
438 | #endif /* PAGETABLE_LEVELS > 2 */ | ||
439 | |||
440 | #if PAGETABLE_LEVELS > 3 | ||
441 | static inline int pgd_present(pgd_t pgd) | ||
442 | { | ||
443 | return pgd_flags(pgd) & _PAGE_PRESENT; | ||
444 | } | ||
445 | |||
446 | static inline unsigned long pgd_page_vaddr(pgd_t pgd) | ||
447 | { | ||
448 | return (unsigned long)__va((unsigned long)pgd_val(pgd) & PTE_PFN_MASK); | ||
449 | } | ||
450 | |||
451 | /* | ||
452 | * Currently stuck as a macro due to indirect forward reference to | ||
453 | * linux/mmzone.h's __section_mem_map_addr() definition: | ||
454 | */ | ||
455 | #define pgd_page(pgd) pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT) | ||
456 | |||
457 | /* to find an entry in a page-table-directory. */ | ||
458 | static inline unsigned pud_index(unsigned long address) | ||
459 | { | ||
460 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1); | ||
461 | } | ||
462 | |||
463 | static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) | ||
464 | { | ||
465 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); | ||
466 | } | ||
467 | |||
468 | static inline int pgd_bad(pgd_t pgd) | ||
469 | { | ||
470 | return (pgd_flags(pgd) & ~_PAGE_USER) != _KERNPG_TABLE; | ||
471 | } | ||
472 | |||
473 | static inline int pgd_none(pgd_t pgd) | ||
474 | { | ||
475 | return !native_pgd_val(pgd); | ||
476 | } | ||
477 | #endif /* PAGETABLE_LEVELS > 3 */ | ||
478 | |||
479 | #endif /* __ASSEMBLY__ */ | ||
467 | 480 | ||
468 | /* | 481 | /* |
469 | * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD] | 482 | * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD] |
@@ -490,28 +503,6 @@ static inline void __init paravirt_pagetable_setup_done(pgd_t *base) | |||
490 | 503 | ||
491 | #ifndef __ASSEMBLY__ | 504 | #ifndef __ASSEMBLY__ |
492 | 505 | ||
493 | enum { | ||
494 | PG_LEVEL_NONE, | ||
495 | PG_LEVEL_4K, | ||
496 | PG_LEVEL_2M, | ||
497 | PG_LEVEL_1G, | ||
498 | PG_LEVEL_NUM | ||
499 | }; | ||
500 | |||
501 | #ifdef CONFIG_PROC_FS | ||
502 | extern void update_page_count(int level, unsigned long pages); | ||
503 | #else | ||
504 | static inline void update_page_count(int level, unsigned long pages) { } | ||
505 | #endif | ||
506 | |||
507 | /* | ||
508 | * Helper function that returns the kernel pagetable entry controlling | ||
509 | * the virtual address 'address'. NULL means no pagetable entry present. | ||
510 | * NOTE: the return type is pte_t but if the pmd is PSE then we return it | ||
511 | * as a pte too. | ||
512 | */ | ||
513 | extern pte_t *lookup_address(unsigned long address, unsigned int *level); | ||
514 | |||
515 | /* local pte updates need not use xchg for locking */ | 506 | /* local pte updates need not use xchg for locking */ |
516 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | 507 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) |
517 | { | 508 | { |
diff --git a/arch/x86/include/asm/pgtable_32.h b/arch/x86/include/asm/pgtable_32.h index 72b020deb46b..97612fc7632f 100644 --- a/arch/x86/include/asm/pgtable_32.h +++ b/arch/x86/include/asm/pgtable_32.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_32_H | 1 | #ifndef _ASM_X86_PGTABLE_32_H |
2 | #define _ASM_X86_PGTABLE_32_H | 2 | #define _ASM_X86_PGTABLE_32_H |
3 | 3 | ||
4 | #include <asm/pgtable_32_types.h> | ||
4 | 5 | ||
5 | /* | 6 | /* |
6 | * The Linux memory management assumes a three-level page table setup. On | 7 | * The Linux memory management assumes a three-level page table setup. On |
@@ -33,47 +34,6 @@ void paging_init(void); | |||
33 | 34 | ||
34 | extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t); | 35 | extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t); |
35 | 36 | ||
36 | /* | ||
37 | * The Linux x86 paging architecture is 'compile-time dual-mode', it | ||
38 | * implements both the traditional 2-level x86 page tables and the | ||
39 | * newer 3-level PAE-mode page tables. | ||
40 | */ | ||
41 | #ifdef CONFIG_X86_PAE | ||
42 | # include <asm/pgtable-3level-defs.h> | ||
43 | # define PMD_SIZE (1UL << PMD_SHIFT) | ||
44 | # define PMD_MASK (~(PMD_SIZE - 1)) | ||
45 | #else | ||
46 | # include <asm/pgtable-2level-defs.h> | ||
47 | #endif | ||
48 | |||
49 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
50 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) | ||
51 | |||
52 | /* Just any arbitrary offset to the start of the vmalloc VM area: the | ||
53 | * current 8MB value just means that there will be a 8MB "hole" after the | ||
54 | * physical memory until the kernel virtual memory starts. That means that | ||
55 | * any out-of-bounds memory accesses will hopefully be caught. | ||
56 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
57 | * area for the same reason. ;) | ||
58 | */ | ||
59 | #define VMALLOC_OFFSET (8 * 1024 * 1024) | ||
60 | #define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET) | ||
61 | #ifdef CONFIG_X86_PAE | ||
62 | #define LAST_PKMAP 512 | ||
63 | #else | ||
64 | #define LAST_PKMAP 1024 | ||
65 | #endif | ||
66 | |||
67 | #define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \ | ||
68 | & PMD_MASK) | ||
69 | |||
70 | #ifdef CONFIG_HIGHMEM | ||
71 | # define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE) | ||
72 | #else | ||
73 | # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) | ||
74 | #endif | ||
75 | |||
76 | #define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE) | ||
77 | 37 | ||
78 | /* | 38 | /* |
79 | * Define this if things work differently on an i386 and an i486: | 39 | * Define this if things work differently on an i386 and an i486: |
@@ -85,55 +45,12 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t); | |||
85 | /* The boot page tables (all created as a single array) */ | 45 | /* The boot page tables (all created as a single array) */ |
86 | extern unsigned long pg0[]; | 46 | extern unsigned long pg0[]; |
87 | 47 | ||
88 | #define pte_present(x) ((x).pte_low & (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
89 | |||
90 | /* To avoid harmful races, pmd_none(x) should check only the lower when PAE */ | ||
91 | #define pmd_none(x) (!(unsigned long)pmd_val((x))) | ||
92 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | ||
93 | #define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) | ||
94 | |||
95 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | ||
96 | |||
97 | #ifdef CONFIG_X86_PAE | 48 | #ifdef CONFIG_X86_PAE |
98 | # include <asm/pgtable-3level.h> | 49 | # include <asm/pgtable-3level.h> |
99 | #else | 50 | #else |
100 | # include <asm/pgtable-2level.h> | 51 | # include <asm/pgtable-2level.h> |
101 | #endif | 52 | #endif |
102 | 53 | ||
103 | /* | ||
104 | * Conversion functions: convert a page and protection to a page entry, | ||
105 | * and a page entry and page directory to the page they refer to. | ||
106 | */ | ||
107 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | ||
108 | |||
109 | |||
110 | static inline int pud_large(pud_t pud) { return 0; } | ||
111 | |||
112 | /* | ||
113 | * the pmd page can be thought of an array like this: pmd_t[PTRS_PER_PMD] | ||
114 | * | ||
115 | * this macro returns the index of the entry in the pmd page which would | ||
116 | * control the given virtual address | ||
117 | */ | ||
118 | #define pmd_index(address) \ | ||
119 | (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) | ||
120 | |||
121 | /* | ||
122 | * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE] | ||
123 | * | ||
124 | * this macro returns the index of the entry in the pte page which would | ||
125 | * control the given virtual address | ||
126 | */ | ||
127 | #define pte_index(address) \ | ||
128 | (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | ||
129 | #define pte_offset_kernel(dir, address) \ | ||
130 | ((pte_t *)pmd_page_vaddr(*(dir)) + pte_index((address))) | ||
131 | |||
132 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | ||
133 | |||
134 | #define pmd_page_vaddr(pmd) \ | ||
135 | ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK)) | ||
136 | |||
137 | #if defined(CONFIG_HIGHPTE) | 54 | #if defined(CONFIG_HIGHPTE) |
138 | #define pte_offset_map(dir, address) \ | 55 | #define pte_offset_map(dir, address) \ |
139 | ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \ | 56 | ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) + \ |
@@ -176,7 +93,4 @@ do { \ | |||
176 | #define kern_addr_valid(kaddr) (0) | 93 | #define kern_addr_valid(kaddr) (0) |
177 | #endif | 94 | #endif |
178 | 95 | ||
179 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
180 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
181 | |||
182 | #endif /* _ASM_X86_PGTABLE_32_H */ | 96 | #endif /* _ASM_X86_PGTABLE_32_H */ |
diff --git a/arch/x86/include/asm/pgtable_32_types.h b/arch/x86/include/asm/pgtable_32_types.h new file mode 100644 index 000000000000..bd8df3b2fe04 --- /dev/null +++ b/arch/x86/include/asm/pgtable_32_types.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_32_DEFS_H | ||
2 | #define _ASM_X86_PGTABLE_32_DEFS_H | ||
3 | |||
4 | /* | ||
5 | * The Linux x86 paging architecture is 'compile-time dual-mode', it | ||
6 | * implements both the traditional 2-level x86 page tables and the | ||
7 | * newer 3-level PAE-mode page tables. | ||
8 | */ | ||
9 | #ifdef CONFIG_X86_PAE | ||
10 | # include <asm/pgtable-3level_types.h> | ||
11 | # define PMD_SIZE (1UL << PMD_SHIFT) | ||
12 | # define PMD_MASK (~(PMD_SIZE - 1)) | ||
13 | #else | ||
14 | # include <asm/pgtable-2level_types.h> | ||
15 | #endif | ||
16 | |||
17 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
18 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) | ||
19 | |||
20 | /* Just any arbitrary offset to the start of the vmalloc VM area: the | ||
21 | * current 8MB value just means that there will be a 8MB "hole" after the | ||
22 | * physical memory until the kernel virtual memory starts. That means that | ||
23 | * any out-of-bounds memory accesses will hopefully be caught. | ||
24 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
25 | * area for the same reason. ;) | ||
26 | */ | ||
27 | #define VMALLOC_OFFSET (8 * 1024 * 1024) | ||
28 | #define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET) | ||
29 | #ifdef CONFIG_X86_PAE | ||
30 | #define LAST_PKMAP 512 | ||
31 | #else | ||
32 | #define LAST_PKMAP 1024 | ||
33 | #endif | ||
34 | |||
35 | #define PKMAP_BASE ((FIXADDR_BOOT_START - PAGE_SIZE * (LAST_PKMAP + 1)) \ | ||
36 | & PMD_MASK) | ||
37 | |||
38 | #ifdef CONFIG_HIGHMEM | ||
39 | # define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE) | ||
40 | #else | ||
41 | # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) | ||
42 | #endif | ||
43 | |||
44 | #define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE) | ||
45 | |||
46 | #endif /* _ASM_X86_PGTABLE_32_DEFS_H */ | ||
diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 1df9637dfda3..6b87bc6d5018 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _ASM_X86_PGTABLE_64_H | 2 | #define _ASM_X86_PGTABLE_64_H |
3 | 3 | ||
4 | #include <linux/const.h> | 4 | #include <linux/const.h> |
5 | #include <asm/pgtable_64_types.h> | ||
6 | |||
5 | #ifndef __ASSEMBLY__ | 7 | #ifndef __ASSEMBLY__ |
6 | 8 | ||
7 | /* | 9 | /* |
@@ -25,32 +27,6 @@ extern void paging_init(void); | |||
25 | 27 | ||
26 | #endif /* !__ASSEMBLY__ */ | 28 | #endif /* !__ASSEMBLY__ */ |
27 | 29 | ||
28 | #define SHARED_KERNEL_PMD 0 | ||
29 | |||
30 | /* | ||
31 | * PGDIR_SHIFT determines what a top-level page table entry can map | ||
32 | */ | ||
33 | #define PGDIR_SHIFT 39 | ||
34 | #define PTRS_PER_PGD 512 | ||
35 | |||
36 | /* | ||
37 | * 3rd level page | ||
38 | */ | ||
39 | #define PUD_SHIFT 30 | ||
40 | #define PTRS_PER_PUD 512 | ||
41 | |||
42 | /* | ||
43 | * PMD_SHIFT determines the size of the area a middle-level | ||
44 | * page table can map | ||
45 | */ | ||
46 | #define PMD_SHIFT 21 | ||
47 | #define PTRS_PER_PMD 512 | ||
48 | |||
49 | /* | ||
50 | * entries per page directory level | ||
51 | */ | ||
52 | #define PTRS_PER_PTE 512 | ||
53 | |||
54 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
55 | 31 | ||
56 | #define pte_ERROR(e) \ | 32 | #define pte_ERROR(e) \ |
@@ -66,9 +42,6 @@ extern void paging_init(void); | |||
66 | printk("%s:%d: bad pgd %p(%016lx).\n", \ | 42 | printk("%s:%d: bad pgd %p(%016lx).\n", \ |
67 | __FILE__, __LINE__, &(e), pgd_val(e)) | 43 | __FILE__, __LINE__, &(e), pgd_val(e)) |
68 | 44 | ||
69 | #define pgd_none(x) (!pgd_val(x)) | ||
70 | #define pud_none(x) (!pud_val(x)) | ||
71 | |||
72 | struct mm_struct; | 45 | struct mm_struct; |
73 | 46 | ||
74 | void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte); | 47 | void set_pte_vaddr_pud(pud_t *pud_page, unsigned long vaddr, pte_t new_pte); |
@@ -133,48 +106,6 @@ static inline void native_pgd_clear(pgd_t *pgd) | |||
133 | native_set_pgd(pgd, native_make_pgd(0)); | 106 | native_set_pgd(pgd, native_make_pgd(0)); |
134 | } | 107 | } |
135 | 108 | ||
136 | #define pte_same(a, b) ((a).pte == (b).pte) | ||
137 | |||
138 | #endif /* !__ASSEMBLY__ */ | ||
139 | |||
140 | #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) | ||
141 | #define PMD_MASK (~(PMD_SIZE - 1)) | ||
142 | #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT) | ||
143 | #define PUD_MASK (~(PUD_SIZE - 1)) | ||
144 | #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT) | ||
145 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) | ||
146 | |||
147 | |||
148 | #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) | ||
149 | #define VMALLOC_START _AC(0xffffc20000000000, UL) | ||
150 | #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) | ||
151 | #define VMEMMAP_START _AC(0xffffe20000000000, UL) | ||
152 | #define MODULES_VADDR _AC(0xffffffffa0000000, UL) | ||
153 | #define MODULES_END _AC(0xffffffffff000000, UL) | ||
154 | #define MODULES_LEN (MODULES_END - MODULES_VADDR) | ||
155 | |||
156 | #ifndef __ASSEMBLY__ | ||
157 | |||
158 | static inline int pgd_bad(pgd_t pgd) | ||
159 | { | ||
160 | return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; | ||
161 | } | ||
162 | |||
163 | static inline int pud_bad(pud_t pud) | ||
164 | { | ||
165 | return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; | ||
166 | } | ||
167 | |||
168 | static inline int pmd_bad(pmd_t pmd) | ||
169 | { | ||
170 | return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; | ||
171 | } | ||
172 | |||
173 | #define pte_none(x) (!pte_val((x))) | ||
174 | #define pte_present(x) (pte_val((x)) & (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
175 | |||
176 | #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT)) /* FIXME: is this right? */ | ||
177 | |||
178 | /* | 109 | /* |
179 | * Conversion functions: convert a page and protection to a page entry, | 110 | * Conversion functions: convert a page and protection to a page entry, |
180 | * and a page entry and page directory to the page they refer to. | 111 | * and a page entry and page directory to the page they refer to. |
@@ -183,41 +114,12 @@ static inline int pmd_bad(pmd_t pmd) | |||
183 | /* | 114 | /* |
184 | * Level 4 access. | 115 | * Level 4 access. |
185 | */ | 116 | */ |
186 | #define pgd_page_vaddr(pgd) \ | ||
187 | ((unsigned long)__va((unsigned long)pgd_val((pgd)) & PTE_PFN_MASK)) | ||
188 | #define pgd_page(pgd) (pfn_to_page(pgd_val((pgd)) >> PAGE_SHIFT)) | ||
189 | #define pgd_present(pgd) (pgd_val(pgd) & _PAGE_PRESENT) | ||
190 | static inline int pgd_large(pgd_t pgd) { return 0; } | 117 | static inline int pgd_large(pgd_t pgd) { return 0; } |
191 | #define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE) | 118 | #define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE) |
192 | 119 | ||
193 | /* PUD - Level3 access */ | 120 | /* PUD - Level3 access */ |
194 | /* to find an entry in a page-table-directory. */ | ||
195 | #define pud_page_vaddr(pud) \ | ||
196 | ((unsigned long)__va(pud_val((pud)) & PHYSICAL_PAGE_MASK)) | ||
197 | #define pud_page(pud) (pfn_to_page(pud_val((pud)) >> PAGE_SHIFT)) | ||
198 | #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1)) | ||
199 | #define pud_offset(pgd, address) \ | ||
200 | ((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address))) | ||
201 | #define pud_present(pud) (pud_val((pud)) & _PAGE_PRESENT) | ||
202 | |||
203 | static inline int pud_large(pud_t pte) | ||
204 | { | ||
205 | return (pud_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) == | ||
206 | (_PAGE_PSE | _PAGE_PRESENT); | ||
207 | } | ||
208 | 121 | ||
209 | /* PMD - Level 2 access */ | 122 | /* PMD - Level 2 access */ |
210 | #define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK)) | ||
211 | #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT)) | ||
212 | |||
213 | #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)) | ||
214 | #define pmd_offset(dir, address) ((pmd_t *)pud_page_vaddr(*(dir)) + \ | ||
215 | pmd_index(address)) | ||
216 | #define pmd_none(x) (!pmd_val((x))) | ||
217 | #define pmd_present(x) (pmd_val((x)) & _PAGE_PRESENT) | ||
218 | #define pfn_pmd(nr, prot) (__pmd(((nr) << PAGE_SHIFT) | pgprot_val((prot)))) | ||
219 | #define pmd_pfn(x) ((pmd_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT) | ||
220 | |||
221 | #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) | 123 | #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT) |
222 | #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ | 124 | #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) | \ |
223 | _PAGE_FILE }) | 125 | _PAGE_FILE }) |
@@ -225,13 +127,6 @@ static inline int pud_large(pud_t pte) | |||
225 | 127 | ||
226 | /* PTE - Level 1 access. */ | 128 | /* PTE - Level 1 access. */ |
227 | 129 | ||
228 | /* page, protection -> pte */ | ||
229 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn((page)), (pgprot)) | ||
230 | |||
231 | #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) | ||
232 | #define pte_offset_kernel(dir, address) ((pte_t *) pmd_page_vaddr(*(dir)) + \ | ||
233 | pte_index((address))) | ||
234 | |||
235 | /* x86-64 always has all page tables mapped. */ | 130 | /* x86-64 always has all page tables mapped. */ |
236 | #define pte_offset_map(dir, address) pte_offset_kernel((dir), (address)) | 131 | #define pte_offset_map(dir, address) pte_offset_kernel((dir), (address)) |
237 | #define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address)) | 132 | #define pte_offset_map_nested(dir, address) pte_offset_kernel((dir), (address)) |
@@ -265,9 +160,6 @@ extern int direct_gbpages; | |||
265 | extern int kern_addr_valid(unsigned long addr); | 160 | extern int kern_addr_valid(unsigned long addr); |
266 | extern void cleanup_highmap(void); | 161 | extern void cleanup_highmap(void); |
267 | 162 | ||
268 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | ||
269 | remap_pfn_range(vma, vaddr, pfn, size, prot) | ||
270 | |||
271 | #define HAVE_ARCH_UNMAPPED_AREA | 163 | #define HAVE_ARCH_UNMAPPED_AREA |
272 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN | 164 | #define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN |
273 | 165 | ||
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h new file mode 100644 index 000000000000..fbf42b8e0383 --- /dev/null +++ b/arch/x86/include/asm/pgtable_64_types.h | |||
@@ -0,0 +1,63 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_64_DEFS_H | ||
2 | #define _ASM_X86_PGTABLE_64_DEFS_H | ||
3 | |||
4 | #ifndef __ASSEMBLY__ | ||
5 | #include <linux/types.h> | ||
6 | |||
7 | /* | ||
8 | * These are used to make use of C type-checking.. | ||
9 | */ | ||
10 | typedef unsigned long pteval_t; | ||
11 | typedef unsigned long pmdval_t; | ||
12 | typedef unsigned long pudval_t; | ||
13 | typedef unsigned long pgdval_t; | ||
14 | typedef unsigned long pgprotval_t; | ||
15 | |||
16 | typedef struct { pteval_t pte; } pte_t; | ||
17 | |||
18 | #endif /* !__ASSEMBLY__ */ | ||
19 | |||
20 | #define SHARED_KERNEL_PMD 0 | ||
21 | #define PAGETABLE_LEVELS 4 | ||
22 | |||
23 | /* | ||
24 | * PGDIR_SHIFT determines what a top-level page table entry can map | ||
25 | */ | ||
26 | #define PGDIR_SHIFT 39 | ||
27 | #define PTRS_PER_PGD 512 | ||
28 | |||
29 | /* | ||
30 | * 3rd level page | ||
31 | */ | ||
32 | #define PUD_SHIFT 30 | ||
33 | #define PTRS_PER_PUD 512 | ||
34 | |||
35 | /* | ||
36 | * PMD_SHIFT determines the size of the area a middle-level | ||
37 | * page table can map | ||
38 | */ | ||
39 | #define PMD_SHIFT 21 | ||
40 | #define PTRS_PER_PMD 512 | ||
41 | |||
42 | /* | ||
43 | * entries per page directory level | ||
44 | */ | ||
45 | #define PTRS_PER_PTE 512 | ||
46 | |||
47 | #define PMD_SIZE (_AC(1, UL) << PMD_SHIFT) | ||
48 | #define PMD_MASK (~(PMD_SIZE - 1)) | ||
49 | #define PUD_SIZE (_AC(1, UL) << PUD_SHIFT) | ||
50 | #define PUD_MASK (~(PUD_SIZE - 1)) | ||
51 | #define PGDIR_SIZE (_AC(1, UL) << PGDIR_SHIFT) | ||
52 | #define PGDIR_MASK (~(PGDIR_SIZE - 1)) | ||
53 | |||
54 | |||
55 | #define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL) | ||
56 | #define VMALLOC_START _AC(0xffffc20000000000, UL) | ||
57 | #define VMALLOC_END _AC(0xffffe1ffffffffff, UL) | ||
58 | #define VMEMMAP_START _AC(0xffffe20000000000, UL) | ||
59 | #define MODULES_VADDR _AC(0xffffffffa0000000, UL) | ||
60 | #define MODULES_END _AC(0xffffffffff000000, UL) | ||
61 | #define MODULES_LEN (MODULES_END - MODULES_VADDR) | ||
62 | |||
63 | #endif /* _ASM_X86_PGTABLE_64_DEFS_H */ | ||
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h new file mode 100644 index 000000000000..4d258ad76a0f --- /dev/null +++ b/arch/x86/include/asm/pgtable_types.h | |||
@@ -0,0 +1,328 @@ | |||
1 | #ifndef _ASM_X86_PGTABLE_DEFS_H | ||
2 | #define _ASM_X86_PGTABLE_DEFS_H | ||
3 | |||
4 | #include <linux/const.h> | ||
5 | #include <asm/page_types.h> | ||
6 | |||
7 | #define FIRST_USER_ADDRESS 0 | ||
8 | |||
9 | #define _PAGE_BIT_PRESENT 0 /* is present */ | ||
10 | #define _PAGE_BIT_RW 1 /* writeable */ | ||
11 | #define _PAGE_BIT_USER 2 /* userspace addressable */ | ||
12 | #define _PAGE_BIT_PWT 3 /* page write through */ | ||
13 | #define _PAGE_BIT_PCD 4 /* page cache disabled */ | ||
14 | #define _PAGE_BIT_ACCESSED 5 /* was accessed (raised by CPU) */ | ||
15 | #define _PAGE_BIT_DIRTY 6 /* was written to (raised by CPU) */ | ||
16 | #define _PAGE_BIT_PSE 7 /* 4 MB (or 2MB) page */ | ||
17 | #define _PAGE_BIT_PAT 7 /* on 4KB pages */ | ||
18 | #define _PAGE_BIT_GLOBAL 8 /* Global TLB entry PPro+ */ | ||
19 | #define _PAGE_BIT_UNUSED1 9 /* available for programmer */ | ||
20 | #define _PAGE_BIT_IOMAP 10 /* flag used to indicate IO mapping */ | ||
21 | #define _PAGE_BIT_UNUSED3 11 | ||
22 | #define _PAGE_BIT_PAT_LARGE 12 /* On 2MB or 1GB pages */ | ||
23 | #define _PAGE_BIT_SPECIAL _PAGE_BIT_UNUSED1 | ||
24 | #define _PAGE_BIT_CPA_TEST _PAGE_BIT_UNUSED1 | ||
25 | #define _PAGE_BIT_NX 63 /* No execute: only valid after cpuid check */ | ||
26 | |||
27 | /* If _PAGE_BIT_PRESENT is clear, we use these: */ | ||
28 | /* - if the user mapped it with PROT_NONE; pte_present gives true */ | ||
29 | #define _PAGE_BIT_PROTNONE _PAGE_BIT_GLOBAL | ||
30 | /* - set: nonlinear file mapping, saved PTE; unset:swap */ | ||
31 | #define _PAGE_BIT_FILE _PAGE_BIT_DIRTY | ||
32 | |||
33 | #define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT) | ||
34 | #define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW) | ||
35 | #define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER) | ||
36 | #define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT) | ||
37 | #define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD) | ||
38 | #define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED) | ||
39 | #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY) | ||
40 | #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) | ||
41 | #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) | ||
42 | #define _PAGE_UNUSED1 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED1) | ||
43 | #define _PAGE_IOMAP (_AT(pteval_t, 1) << _PAGE_BIT_IOMAP) | ||
44 | #define _PAGE_UNUSED3 (_AT(pteval_t, 1) << _PAGE_BIT_UNUSED3) | ||
45 | #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) | ||
46 | #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) | ||
47 | #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) | ||
48 | #define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST) | ||
49 | #define __HAVE_ARCH_PTE_SPECIAL | ||
50 | |||
51 | #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE) | ||
52 | #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) | ||
53 | #else | ||
54 | #define _PAGE_NX (_AT(pteval_t, 0)) | ||
55 | #endif | ||
56 | |||
57 | #define _PAGE_FILE (_AT(pteval_t, 1) << _PAGE_BIT_FILE) | ||
58 | #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE) | ||
59 | |||
60 | #define _PAGE_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ | ||
61 | _PAGE_ACCESSED | _PAGE_DIRTY) | ||
62 | #define _KERNPG_TABLE (_PAGE_PRESENT | _PAGE_RW | _PAGE_ACCESSED | \ | ||
63 | _PAGE_DIRTY) | ||
64 | |||
65 | /* Set of bits not changed in pte_modify */ | ||
66 | #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ | ||
67 | _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY) | ||
68 | |||
69 | #define _PAGE_CACHE_MASK (_PAGE_PCD | _PAGE_PWT) | ||
70 | #define _PAGE_CACHE_WB (0) | ||
71 | #define _PAGE_CACHE_WC (_PAGE_PWT) | ||
72 | #define _PAGE_CACHE_UC_MINUS (_PAGE_PCD) | ||
73 | #define _PAGE_CACHE_UC (_PAGE_PCD | _PAGE_PWT) | ||
74 | |||
75 | #define PAGE_NONE __pgprot(_PAGE_PROTNONE | _PAGE_ACCESSED) | ||
76 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_RW | _PAGE_USER | \ | ||
77 | _PAGE_ACCESSED | _PAGE_NX) | ||
78 | |||
79 | #define PAGE_SHARED_EXEC __pgprot(_PAGE_PRESENT | _PAGE_RW | \ | ||
80 | _PAGE_USER | _PAGE_ACCESSED) | ||
81 | #define PAGE_COPY_NOEXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
82 | _PAGE_ACCESSED | _PAGE_NX) | ||
83 | #define PAGE_COPY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
84 | _PAGE_ACCESSED) | ||
85 | #define PAGE_COPY PAGE_COPY_NOEXEC | ||
86 | #define PAGE_READONLY __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
87 | _PAGE_ACCESSED | _PAGE_NX) | ||
88 | #define PAGE_READONLY_EXEC __pgprot(_PAGE_PRESENT | _PAGE_USER | \ | ||
89 | _PAGE_ACCESSED) | ||
90 | |||
91 | #define __PAGE_KERNEL_EXEC \ | ||
92 | (_PAGE_PRESENT | _PAGE_RW | _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_GLOBAL) | ||
93 | #define __PAGE_KERNEL (__PAGE_KERNEL_EXEC | _PAGE_NX) | ||
94 | |||
95 | #define __PAGE_KERNEL_RO (__PAGE_KERNEL & ~_PAGE_RW) | ||
96 | #define __PAGE_KERNEL_RX (__PAGE_KERNEL_EXEC & ~_PAGE_RW) | ||
97 | #define __PAGE_KERNEL_EXEC_NOCACHE (__PAGE_KERNEL_EXEC | _PAGE_PCD | _PAGE_PWT) | ||
98 | #define __PAGE_KERNEL_WC (__PAGE_KERNEL | _PAGE_CACHE_WC) | ||
99 | #define __PAGE_KERNEL_NOCACHE (__PAGE_KERNEL | _PAGE_PCD | _PAGE_PWT) | ||
100 | #define __PAGE_KERNEL_UC_MINUS (__PAGE_KERNEL | _PAGE_PCD) | ||
101 | #define __PAGE_KERNEL_VSYSCALL (__PAGE_KERNEL_RX | _PAGE_USER) | ||
102 | #define __PAGE_KERNEL_VSYSCALL_NOCACHE (__PAGE_KERNEL_VSYSCALL | _PAGE_PCD | _PAGE_PWT) | ||
103 | #define __PAGE_KERNEL_LARGE (__PAGE_KERNEL | _PAGE_PSE) | ||
104 | #define __PAGE_KERNEL_LARGE_NOCACHE (__PAGE_KERNEL | _PAGE_CACHE_UC | _PAGE_PSE) | ||
105 | #define __PAGE_KERNEL_LARGE_EXEC (__PAGE_KERNEL_EXEC | _PAGE_PSE) | ||
106 | |||
107 | #define __PAGE_KERNEL_IO (__PAGE_KERNEL | _PAGE_IOMAP) | ||
108 | #define __PAGE_KERNEL_IO_NOCACHE (__PAGE_KERNEL_NOCACHE | _PAGE_IOMAP) | ||
109 | #define __PAGE_KERNEL_IO_UC_MINUS (__PAGE_KERNEL_UC_MINUS | _PAGE_IOMAP) | ||
110 | #define __PAGE_KERNEL_IO_WC (__PAGE_KERNEL_WC | _PAGE_IOMAP) | ||
111 | |||
112 | #define PAGE_KERNEL __pgprot(__PAGE_KERNEL) | ||
113 | #define PAGE_KERNEL_RO __pgprot(__PAGE_KERNEL_RO) | ||
114 | #define PAGE_KERNEL_EXEC __pgprot(__PAGE_KERNEL_EXEC) | ||
115 | #define PAGE_KERNEL_RX __pgprot(__PAGE_KERNEL_RX) | ||
116 | #define PAGE_KERNEL_WC __pgprot(__PAGE_KERNEL_WC) | ||
117 | #define PAGE_KERNEL_NOCACHE __pgprot(__PAGE_KERNEL_NOCACHE) | ||
118 | #define PAGE_KERNEL_UC_MINUS __pgprot(__PAGE_KERNEL_UC_MINUS) | ||
119 | #define PAGE_KERNEL_EXEC_NOCACHE __pgprot(__PAGE_KERNEL_EXEC_NOCACHE) | ||
120 | #define PAGE_KERNEL_LARGE __pgprot(__PAGE_KERNEL_LARGE) | ||
121 | #define PAGE_KERNEL_LARGE_NOCACHE __pgprot(__PAGE_KERNEL_LARGE_NOCACHE) | ||
122 | #define PAGE_KERNEL_LARGE_EXEC __pgprot(__PAGE_KERNEL_LARGE_EXEC) | ||
123 | #define PAGE_KERNEL_VSYSCALL __pgprot(__PAGE_KERNEL_VSYSCALL) | ||
124 | #define PAGE_KERNEL_VSYSCALL_NOCACHE __pgprot(__PAGE_KERNEL_VSYSCALL_NOCACHE) | ||
125 | |||
126 | #define PAGE_KERNEL_IO __pgprot(__PAGE_KERNEL_IO) | ||
127 | #define PAGE_KERNEL_IO_NOCACHE __pgprot(__PAGE_KERNEL_IO_NOCACHE) | ||
128 | #define PAGE_KERNEL_IO_UC_MINUS __pgprot(__PAGE_KERNEL_IO_UC_MINUS) | ||
129 | #define PAGE_KERNEL_IO_WC __pgprot(__PAGE_KERNEL_IO_WC) | ||
130 | |||
131 | /* xwr */ | ||
132 | #define __P000 PAGE_NONE | ||
133 | #define __P001 PAGE_READONLY | ||
134 | #define __P010 PAGE_COPY | ||
135 | #define __P011 PAGE_COPY | ||
136 | #define __P100 PAGE_READONLY_EXEC | ||
137 | #define __P101 PAGE_READONLY_EXEC | ||
138 | #define __P110 PAGE_COPY_EXEC | ||
139 | #define __P111 PAGE_COPY_EXEC | ||
140 | |||
141 | #define __S000 PAGE_NONE | ||
142 | #define __S001 PAGE_READONLY | ||
143 | #define __S010 PAGE_SHARED | ||
144 | #define __S011 PAGE_SHARED | ||
145 | #define __S100 PAGE_READONLY_EXEC | ||
146 | #define __S101 PAGE_READONLY_EXEC | ||
147 | #define __S110 PAGE_SHARED_EXEC | ||
148 | #define __S111 PAGE_SHARED_EXEC | ||
149 | |||
150 | /* | ||
151 | * early identity mapping pte attrib macros. | ||
152 | */ | ||
153 | #ifdef CONFIG_X86_64 | ||
154 | #define __PAGE_KERNEL_IDENT_LARGE_EXEC __PAGE_KERNEL_LARGE_EXEC | ||
155 | #else | ||
156 | /* | ||
157 | * For PDE_IDENT_ATTR include USER bit. As the PDE and PTE protection | ||
158 | * bits are combined, this will alow user to access the high address mapped | ||
159 | * VDSO in the presence of CONFIG_COMPAT_VDSO | ||
160 | */ | ||
161 | #define PTE_IDENT_ATTR 0x003 /* PRESENT+RW */ | ||
162 | #define PDE_IDENT_ATTR 0x067 /* PRESENT+RW+USER+DIRTY+ACCESSED */ | ||
163 | #define PGD_IDENT_ATTR 0x001 /* PRESENT (no other attributes) */ | ||
164 | #endif | ||
165 | |||
166 | #ifdef CONFIG_X86_32 | ||
167 | # include "pgtable_32_types.h" | ||
168 | #else | ||
169 | # include "pgtable_64_types.h" | ||
170 | #endif | ||
171 | |||
172 | #ifndef __ASSEMBLY__ | ||
173 | |||
174 | #include <linux/types.h> | ||
175 | |||
176 | /* PTE_PFN_MASK extracts the PFN from a (pte|pmd|pud|pgd)val_t */ | ||
177 | #define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK) | ||
178 | |||
179 | /* PTE_FLAGS_MASK extracts the flags from a (pte|pmd|pud|pgd)val_t */ | ||
180 | #define PTE_FLAGS_MASK (~PTE_PFN_MASK) | ||
181 | |||
182 | typedef struct pgprot { pgprotval_t pgprot; } pgprot_t; | ||
183 | |||
184 | typedef struct { pgdval_t pgd; } pgd_t; | ||
185 | |||
186 | static inline pgd_t native_make_pgd(pgdval_t val) | ||
187 | { | ||
188 | return (pgd_t) { val }; | ||
189 | } | ||
190 | |||
191 | static inline pgdval_t native_pgd_val(pgd_t pgd) | ||
192 | { | ||
193 | return pgd.pgd; | ||
194 | } | ||
195 | |||
196 | static inline pgdval_t pgd_flags(pgd_t pgd) | ||
197 | { | ||
198 | return native_pgd_val(pgd) & PTE_FLAGS_MASK; | ||
199 | } | ||
200 | |||
201 | #if PAGETABLE_LEVELS > 3 | ||
202 | typedef struct { pudval_t pud; } pud_t; | ||
203 | |||
204 | static inline pud_t native_make_pud(pmdval_t val) | ||
205 | { | ||
206 | return (pud_t) { val }; | ||
207 | } | ||
208 | |||
209 | static inline pudval_t native_pud_val(pud_t pud) | ||
210 | { | ||
211 | return pud.pud; | ||
212 | } | ||
213 | #else | ||
214 | #include <asm-generic/pgtable-nopud.h> | ||
215 | |||
216 | static inline pudval_t native_pud_val(pud_t pud) | ||
217 | { | ||
218 | return native_pgd_val(pud.pgd); | ||
219 | } | ||
220 | #endif | ||
221 | |||
222 | #if PAGETABLE_LEVELS > 2 | ||
223 | typedef struct { pmdval_t pmd; } pmd_t; | ||
224 | |||
225 | static inline pmd_t native_make_pmd(pmdval_t val) | ||
226 | { | ||
227 | return (pmd_t) { val }; | ||
228 | } | ||
229 | |||
230 | static inline pmdval_t native_pmd_val(pmd_t pmd) | ||
231 | { | ||
232 | return pmd.pmd; | ||
233 | } | ||
234 | #else | ||
235 | #include <asm-generic/pgtable-nopmd.h> | ||
236 | |||
237 | static inline pmdval_t native_pmd_val(pmd_t pmd) | ||
238 | { | ||
239 | return native_pgd_val(pmd.pud.pgd); | ||
240 | } | ||
241 | #endif | ||
242 | |||
243 | static inline pudval_t pud_flags(pud_t pud) | ||
244 | { | ||
245 | return native_pud_val(pud) & PTE_FLAGS_MASK; | ||
246 | } | ||
247 | |||
248 | static inline pmdval_t pmd_flags(pmd_t pmd) | ||
249 | { | ||
250 | return native_pmd_val(pmd) & PTE_FLAGS_MASK; | ||
251 | } | ||
252 | |||
253 | static inline pte_t native_make_pte(pteval_t val) | ||
254 | { | ||
255 | return (pte_t) { .pte = val }; | ||
256 | } | ||
257 | |||
258 | static inline pteval_t native_pte_val(pte_t pte) | ||
259 | { | ||
260 | return pte.pte; | ||
261 | } | ||
262 | |||
263 | static inline pteval_t pte_flags(pte_t pte) | ||
264 | { | ||
265 | return native_pte_val(pte) & PTE_FLAGS_MASK; | ||
266 | } | ||
267 | |||
268 | #define pgprot_val(x) ((x).pgprot) | ||
269 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
270 | |||
271 | |||
272 | typedef struct page *pgtable_t; | ||
273 | |||
274 | extern pteval_t __supported_pte_mask; | ||
275 | extern int nx_enabled; | ||
276 | |||
277 | #define pgprot_writecombine pgprot_writecombine | ||
278 | extern pgprot_t pgprot_writecombine(pgprot_t prot); | ||
279 | |||
280 | /* Indicate that x86 has its own track and untrack pfn vma functions */ | ||
281 | #define __HAVE_PFNMAP_TRACKING | ||
282 | |||
283 | #define __HAVE_PHYS_MEM_ACCESS_PROT | ||
284 | struct file; | ||
285 | pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | ||
286 | unsigned long size, pgprot_t vma_prot); | ||
287 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | ||
288 | unsigned long size, pgprot_t *vma_prot); | ||
289 | |||
290 | /* Install a pte for a particular vaddr in kernel space. */ | ||
291 | void set_pte_vaddr(unsigned long vaddr, pte_t pte); | ||
292 | |||
293 | #ifdef CONFIG_X86_32 | ||
294 | extern void native_pagetable_setup_start(pgd_t *base); | ||
295 | extern void native_pagetable_setup_done(pgd_t *base); | ||
296 | #else | ||
297 | static inline void native_pagetable_setup_start(pgd_t *base) {} | ||
298 | static inline void native_pagetable_setup_done(pgd_t *base) {} | ||
299 | #endif | ||
300 | |||
301 | struct seq_file; | ||
302 | extern void arch_report_meminfo(struct seq_file *m); | ||
303 | |||
304 | enum { | ||
305 | PG_LEVEL_NONE, | ||
306 | PG_LEVEL_4K, | ||
307 | PG_LEVEL_2M, | ||
308 | PG_LEVEL_1G, | ||
309 | PG_LEVEL_NUM | ||
310 | }; | ||
311 | |||
312 | #ifdef CONFIG_PROC_FS | ||
313 | extern void update_page_count(int level, unsigned long pages); | ||
314 | #else | ||
315 | static inline void update_page_count(int level, unsigned long pages) { } | ||
316 | #endif | ||
317 | |||
318 | /* | ||
319 | * Helper function that returns the kernel pagetable entry controlling | ||
320 | * the virtual address 'address'. NULL means no pagetable entry present. | ||
321 | * NOTE: the return type is pte_t but if the pmd is PSE then we return it | ||
322 | * as a pte too. | ||
323 | */ | ||
324 | extern pte_t *lookup_address(unsigned long address, unsigned int *level); | ||
325 | |||
326 | #endif /* !__ASSEMBLY__ */ | ||
327 | |||
328 | #endif /* _ASM_X86_PGTABLE_DEFS_H */ | ||
diff --git a/arch/x86/include/asm/prctl.h b/arch/x86/include/asm/prctl.h index a8894647dd9a..3ac5032fae09 100644 --- a/arch/x86/include/asm/prctl.h +++ b/arch/x86/include/asm/prctl.h | |||
@@ -6,8 +6,4 @@ | |||
6 | #define ARCH_GET_FS 0x1003 | 6 | #define ARCH_GET_FS 0x1003 |
7 | #define ARCH_GET_GS 0x1004 | 7 | #define ARCH_GET_GS 0x1004 |
8 | 8 | ||
9 | #ifdef CONFIG_X86_64 | ||
10 | extern long sys_arch_prctl(int, unsigned long); | ||
11 | #endif /* CONFIG_X86_64 */ | ||
12 | |||
13 | #endif /* _ASM_X86_PRCTL_H */ | 9 | #endif /* _ASM_X86_PRCTL_H */ |
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h index 5a9472104253..c7a98f738210 100644 --- a/arch/x86/include/asm/processor.h +++ b/arch/x86/include/asm/processor.h | |||
@@ -16,6 +16,7 @@ struct mm_struct; | |||
16 | #include <asm/cpufeature.h> | 16 | #include <asm/cpufeature.h> |
17 | #include <asm/system.h> | 17 | #include <asm/system.h> |
18 | #include <asm/page.h> | 18 | #include <asm/page.h> |
19 | #include <asm/pgtable_types.h> | ||
19 | #include <asm/percpu.h> | 20 | #include <asm/percpu.h> |
20 | #include <asm/msr.h> | 21 | #include <asm/msr.h> |
21 | #include <asm/desc_defs.h> | 22 | #include <asm/desc_defs.h> |
@@ -73,7 +74,7 @@ struct cpuinfo_x86 { | |||
73 | char pad0; | 74 | char pad0; |
74 | #else | 75 | #else |
75 | /* Number of 4K pages in DTLB/ITLB combined(in pages): */ | 76 | /* Number of 4K pages in DTLB/ITLB combined(in pages): */ |
76 | int x86_tlbsize; | 77 | int x86_tlbsize; |
77 | __u8 x86_virt_bits; | 78 | __u8 x86_virt_bits; |
78 | __u8 x86_phys_bits; | 79 | __u8 x86_phys_bits; |
79 | #endif | 80 | #endif |
@@ -402,7 +403,6 @@ DECLARE_PER_CPU(unsigned long, stack_canary); | |||
402 | #endif | 403 | #endif |
403 | #endif /* X86_64 */ | 404 | #endif /* X86_64 */ |
404 | 405 | ||
405 | extern void print_cpu_info(struct cpuinfo_x86 *); | ||
406 | extern unsigned int xstate_size; | 406 | extern unsigned int xstate_size; |
407 | extern void free_thread_xstate(struct task_struct *); | 407 | extern void free_thread_xstate(struct task_struct *); |
408 | extern struct kmem_cache *task_xstate_cachep; | 408 | extern struct kmem_cache *task_xstate_cachep; |
@@ -861,6 +861,7 @@ static inline void spin_lock_prefetch(const void *x) | |||
861 | * User space process size: 3GB (default). | 861 | * User space process size: 3GB (default). |
862 | */ | 862 | */ |
863 | #define TASK_SIZE PAGE_OFFSET | 863 | #define TASK_SIZE PAGE_OFFSET |
864 | #define TASK_SIZE_MAX TASK_SIZE | ||
864 | #define STACK_TOP TASK_SIZE | 865 | #define STACK_TOP TASK_SIZE |
865 | #define STACK_TOP_MAX STACK_TOP | 866 | #define STACK_TOP_MAX STACK_TOP |
866 | 867 | ||
@@ -920,7 +921,7 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); | |||
920 | /* | 921 | /* |
921 | * User space process size. 47bits minus one guard page. | 922 | * User space process size. 47bits minus one guard page. |
922 | */ | 923 | */ |
923 | #define TASK_SIZE64 ((1UL << 47) - PAGE_SIZE) | 924 | #define TASK_SIZE_MAX ((1UL << 47) - PAGE_SIZE) |
924 | 925 | ||
925 | /* This decides where the kernel will search for a free chunk of vm | 926 | /* This decides where the kernel will search for a free chunk of vm |
926 | * space during mmap's. | 927 | * space during mmap's. |
@@ -929,12 +930,12 @@ extern unsigned long thread_saved_pc(struct task_struct *tsk); | |||
929 | 0xc0000000 : 0xFFFFe000) | 930 | 0xc0000000 : 0xFFFFe000) |
930 | 931 | ||
931 | #define TASK_SIZE (test_thread_flag(TIF_IA32) ? \ | 932 | #define TASK_SIZE (test_thread_flag(TIF_IA32) ? \ |
932 | IA32_PAGE_OFFSET : TASK_SIZE64) | 933 | IA32_PAGE_OFFSET : TASK_SIZE_MAX) |
933 | #define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? \ | 934 | #define TASK_SIZE_OF(child) ((test_tsk_thread_flag(child, TIF_IA32)) ? \ |
934 | IA32_PAGE_OFFSET : TASK_SIZE64) | 935 | IA32_PAGE_OFFSET : TASK_SIZE_MAX) |
935 | 936 | ||
936 | #define STACK_TOP TASK_SIZE | 937 | #define STACK_TOP TASK_SIZE |
937 | #define STACK_TOP_MAX TASK_SIZE64 | 938 | #define STACK_TOP_MAX TASK_SIZE_MAX |
938 | 939 | ||
939 | #define INIT_THREAD { \ | 940 | #define INIT_THREAD { \ |
940 | .sp0 = (unsigned long)&init_stack + sizeof(init_stack) \ | 941 | .sp0 = (unsigned long)&init_stack + sizeof(init_stack) \ |
diff --git a/arch/x86/include/asm/proto.h b/arch/x86/include/asm/proto.h index d6a22f92ba77..49fb3ecf3bb3 100644 --- a/arch/x86/include/asm/proto.h +++ b/arch/x86/include/asm/proto.h | |||
@@ -18,11 +18,7 @@ extern void syscall32_cpu_init(void); | |||
18 | 18 | ||
19 | extern void check_efer(void); | 19 | extern void check_efer(void); |
20 | 20 | ||
21 | #ifdef CONFIG_X86_BIOS_REBOOT | ||
22 | extern int reboot_force; | 21 | extern int reboot_force; |
23 | #else | ||
24 | static const int reboot_force = 0; | ||
25 | #endif | ||
26 | 22 | ||
27 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); | 23 | long do_arch_prctl(struct task_struct *task, int code, unsigned long addr); |
28 | 24 | ||
diff --git a/arch/x86/include/asm/mach-rdc321x/rdc321x_defs.h b/arch/x86/include/asm/rdc321x_defs.h index c8e9c8bed3d0..c8e9c8bed3d0 100644 --- a/arch/x86/include/asm/mach-rdc321x/rdc321x_defs.h +++ b/arch/x86/include/asm/rdc321x_defs.h | |||
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h index 536949749bc2..66801cb72f69 100644 --- a/arch/x86/include/asm/setup.h +++ b/arch/x86/include/asm/setup.h | |||
@@ -1,33 +1,19 @@ | |||
1 | #ifndef _ASM_X86_SETUP_H | 1 | #ifndef _ASM_X86_SETUP_H |
2 | #define _ASM_X86_SETUP_H | 2 | #define _ASM_X86_SETUP_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | ||
5 | |||
4 | #define COMMAND_LINE_SIZE 2048 | 6 | #define COMMAND_LINE_SIZE 2048 |
5 | 7 | ||
6 | #ifndef __ASSEMBLY__ | 8 | #ifndef __ASSEMBLY__ |
7 | 9 | ||
8 | /* Interrupt control for vSMPowered x86_64 systems */ | ||
9 | void vsmp_init(void); | ||
10 | |||
11 | |||
12 | void setup_bios_corruption_check(void); | ||
13 | |||
14 | |||
15 | #ifdef CONFIG_X86_VISWS | ||
16 | extern void visws_early_detect(void); | ||
17 | extern int is_visws_box(void); | ||
18 | #else | ||
19 | static inline void visws_early_detect(void) { } | ||
20 | static inline int is_visws_box(void) { return 0; } | ||
21 | #endif | ||
22 | |||
23 | extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | ||
24 | extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip); | ||
25 | /* | 10 | /* |
26 | * Any setup quirks to be performed? | 11 | * Any setup quirks to be performed? |
27 | */ | 12 | */ |
28 | struct mpc_cpu; | 13 | struct mpc_cpu; |
29 | struct mpc_bus; | 14 | struct mpc_bus; |
30 | struct mpc_oemtable; | 15 | struct mpc_oemtable; |
16 | |||
31 | struct x86_quirks { | 17 | struct x86_quirks { |
32 | int (*arch_pre_time_init)(void); | 18 | int (*arch_pre_time_init)(void); |
33 | int (*arch_time_init)(void); | 19 | int (*arch_time_init)(void); |
@@ -43,20 +29,20 @@ struct x86_quirks { | |||
43 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); | 29 | void (*mpc_oem_bus_info)(struct mpc_bus *m, char *name); |
44 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); | 30 | void (*mpc_oem_pci_bus)(struct mpc_bus *m); |
45 | void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable, | 31 | void (*smp_read_mpc_oem)(struct mpc_oemtable *oemtable, |
46 | unsigned short oemsize); | 32 | unsigned short oemsize); |
47 | int (*setup_ioapic_ids)(void); | 33 | int (*setup_ioapic_ids)(void); |
48 | int (*update_genapic)(void); | 34 | int (*update_apic)(void); |
49 | }; | 35 | }; |
50 | 36 | ||
51 | extern struct x86_quirks *x86_quirks; | 37 | extern void x86_quirk_pre_intr_init(void); |
52 | extern unsigned long saved_video_mode; | 38 | extern void x86_quirk_intr_init(void); |
53 | 39 | ||
54 | #ifndef CONFIG_PARAVIRT | 40 | extern void x86_quirk_trap_init(void); |
55 | #define paravirt_post_allocator_init() do {} while (0) | ||
56 | #endif | ||
57 | #endif /* __ASSEMBLY__ */ | ||
58 | 41 | ||
59 | #ifdef __KERNEL__ | 42 | extern void x86_quirk_pre_time_init(void); |
43 | extern void x86_quirk_time_init(void); | ||
44 | |||
45 | #endif /* __ASSEMBLY__ */ | ||
60 | 46 | ||
61 | #ifdef __i386__ | 47 | #ifdef __i386__ |
62 | 48 | ||
@@ -78,6 +64,28 @@ extern unsigned long saved_video_mode; | |||
78 | #ifndef __ASSEMBLY__ | 64 | #ifndef __ASSEMBLY__ |
79 | #include <asm/bootparam.h> | 65 | #include <asm/bootparam.h> |
80 | 66 | ||
67 | /* Interrupt control for vSMPowered x86_64 systems */ | ||
68 | void vsmp_init(void); | ||
69 | |||
70 | void setup_bios_corruption_check(void); | ||
71 | |||
72 | #ifdef CONFIG_X86_VISWS | ||
73 | extern void visws_early_detect(void); | ||
74 | extern int is_visws_box(void); | ||
75 | #else | ||
76 | static inline void visws_early_detect(void) { } | ||
77 | static inline int is_visws_box(void) { return 0; } | ||
78 | #endif | ||
79 | |||
80 | extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | ||
81 | extern int wakeup_secondary_cpu_via_init(int apicid, unsigned long start_eip); | ||
82 | extern struct x86_quirks *x86_quirks; | ||
83 | extern unsigned long saved_video_mode; | ||
84 | |||
85 | #ifndef CONFIG_PARAVIRT | ||
86 | #define paravirt_post_allocator_init() do {} while (0) | ||
87 | #endif | ||
88 | |||
81 | #ifndef _SETUP | 89 | #ifndef _SETUP |
82 | 90 | ||
83 | /* | 91 | /* |
diff --git a/arch/x86/include/asm/mach-default/setup_arch.h b/arch/x86/include/asm/setup_arch.h index 38846208b548..38846208b548 100644 --- a/arch/x86/include/asm/mach-default/setup_arch.h +++ b/arch/x86/include/asm/setup_arch.h | |||
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h index 45ef8a1b9d7c..47d0e21f2b9e 100644 --- a/arch/x86/include/asm/smp.h +++ b/arch/x86/include/asm/smp.h | |||
@@ -182,28 +182,9 @@ static inline int logical_smp_processor_id(void) | |||
182 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); | 182 | return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); |
183 | } | 183 | } |
184 | 184 | ||
185 | #include <mach_apicdef.h> | ||
186 | static inline unsigned int read_apic_id(void) | ||
187 | { | ||
188 | unsigned int reg; | ||
189 | |||
190 | reg = *(u32 *)(APIC_BASE + APIC_ID); | ||
191 | |||
192 | return GET_APIC_ID(reg); | ||
193 | } | ||
194 | #endif | 185 | #endif |
195 | 186 | ||
196 | |||
197 | # if defined(APIC_DEFINITION) || defined(CONFIG_X86_64) | ||
198 | extern int hard_smp_processor_id(void); | 187 | extern int hard_smp_processor_id(void); |
199 | # else | ||
200 | #include <mach_apicdef.h> | ||
201 | static inline int hard_smp_processor_id(void) | ||
202 | { | ||
203 | /* we don't want to mark this access volatile - bad code generation */ | ||
204 | return read_apic_id(); | ||
205 | } | ||
206 | # endif /* APIC_DEFINITION */ | ||
207 | 188 | ||
208 | #else /* CONFIG_X86_LOCAL_APIC */ | 189 | #else /* CONFIG_X86_LOCAL_APIC */ |
209 | 190 | ||
diff --git a/arch/x86/include/asm/mach-default/smpboot_hooks.h b/arch/x86/include/asm/smpboot_hooks.h index 23bf52103b89..1def60114906 100644 --- a/arch/x86/include/asm/mach-default/smpboot_hooks.h +++ b/arch/x86/include/asm/smpboot_hooks.h | |||
@@ -13,10 +13,10 @@ static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip) | |||
13 | CMOS_WRITE(0xa, 0xf); | 13 | CMOS_WRITE(0xa, 0xf); |
14 | local_flush_tlb(); | 14 | local_flush_tlb(); |
15 | pr_debug("1.\n"); | 15 | pr_debug("1.\n"); |
16 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_HIGH)) = | 16 | *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_high)) = |
17 | start_eip >> 4; | 17 | start_eip >> 4; |
18 | pr_debug("2.\n"); | 18 | pr_debug("2.\n"); |
19 | *((volatile unsigned short *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = | 19 | *((volatile unsigned short *)phys_to_virt(apic->trampoline_phys_low)) = |
20 | start_eip & 0xf; | 20 | start_eip & 0xf; |
21 | pr_debug("3.\n"); | 21 | pr_debug("3.\n"); |
22 | } | 22 | } |
@@ -34,7 +34,7 @@ static inline void smpboot_restore_warm_reset_vector(void) | |||
34 | */ | 34 | */ |
35 | CMOS_WRITE(0, 0xf); | 35 | CMOS_WRITE(0, 0xf); |
36 | 36 | ||
37 | *((volatile long *)phys_to_virt(TRAMPOLINE_PHYS_LOW)) = 0; | 37 | *((volatile long *)phys_to_virt(apic->trampoline_phys_low)) = 0; |
38 | } | 38 | } |
39 | 39 | ||
40 | static inline void __init smpboot_setup_io_apic(void) | 40 | static inline void __init smpboot_setup_io_apic(void) |
diff --git a/arch/x86/include/asm/spinlock.h b/arch/x86/include/asm/spinlock.h index 2bd6b111a414..3a5696656680 100644 --- a/arch/x86/include/asm/spinlock.h +++ b/arch/x86/include/asm/spinlock.h | |||
@@ -183,6 +183,7 @@ static inline int __raw_spin_is_contended(raw_spinlock_t *lock) | |||
183 | { | 183 | { |
184 | return __ticket_spin_is_contended(lock); | 184 | return __ticket_spin_is_contended(lock); |
185 | } | 185 | } |
186 | #define __raw_spin_is_contended __raw_spin_is_contended | ||
186 | 187 | ||
187 | static __always_inline void __raw_spin_lock(raw_spinlock_t *lock) | 188 | static __always_inline void __raw_spin_lock(raw_spinlock_t *lock) |
188 | { | 189 | { |
@@ -267,8 +268,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *lock) | |||
267 | { | 268 | { |
268 | atomic_t *count = (atomic_t *)lock; | 269 | atomic_t *count = (atomic_t *)lock; |
269 | 270 | ||
270 | atomic_dec(count); | 271 | if (atomic_dec_return(count) >= 0) |
271 | if (atomic_read(count) >= 0) | ||
272 | return 1; | 272 | return 1; |
273 | atomic_inc(count); | 273 | atomic_inc(count); |
274 | return 0; | 274 | return 0; |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h deleted file mode 100644 index 93d2c8667cfe..000000000000 --- a/arch/x86/include/asm/summit/apic.h +++ /dev/null | |||
@@ -1,202 +0,0 @@ | |||
1 | #ifndef __ASM_SUMMIT_APIC_H | ||
2 | #define __ASM_SUMMIT_APIC_H | ||
3 | |||
4 | #include <asm/smp.h> | ||
5 | #include <linux/gfp.h> | ||
6 | |||
7 | #define esr_disable (1) | ||
8 | #define NO_BALANCE_IRQ (0) | ||
9 | |||
10 | /* In clustered mode, the high nibble of APIC ID is a cluster number. | ||
11 | * The low nibble is a 4-bit bitmap. */ | ||
12 | #define XAPIC_DEST_CPUS_SHIFT 4 | ||
13 | #define XAPIC_DEST_CPUS_MASK ((1u << XAPIC_DEST_CPUS_SHIFT) - 1) | ||
14 | #define XAPIC_DEST_CLUSTER_MASK (XAPIC_DEST_CPUS_MASK << XAPIC_DEST_CPUS_SHIFT) | ||
15 | |||
16 | #define APIC_DFR_VALUE (APIC_DFR_CLUSTER) | ||
17 | |||
18 | static inline const cpumask_t *target_cpus(void) | ||
19 | { | ||
20 | /* CPU_MASK_ALL (0xff) has undefined behaviour with | ||
21 | * dest_LowestPrio mode logical clustered apic interrupt routing | ||
22 | * Just start on cpu 0. IRQ balancing will spread load | ||
23 | */ | ||
24 | return &cpumask_of_cpu(0); | ||
25 | } | ||
26 | |||
27 | #define INT_DELIVERY_MODE (dest_LowestPrio) | ||
28 | #define INT_DEST_MODE 1 /* logical delivery broadcast to all procs */ | ||
29 | |||
30 | static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | /* we don't use the phys_cpu_present_map to indicate apicid presence */ | ||
36 | static inline unsigned long check_apicid_present(int bit) | ||
37 | { | ||
38 | return 1; | ||
39 | } | ||
40 | |||
41 | #define apicid_cluster(apicid) ((apicid) & XAPIC_DEST_CLUSTER_MASK) | ||
42 | |||
43 | extern u8 cpu_2_logical_apicid[]; | ||
44 | |||
45 | static inline void init_apic_ldr(void) | ||
46 | { | ||
47 | unsigned long val, id; | ||
48 | int count = 0; | ||
49 | u8 my_id = (u8)hard_smp_processor_id(); | ||
50 | u8 my_cluster = (u8)apicid_cluster(my_id); | ||
51 | #ifdef CONFIG_SMP | ||
52 | u8 lid; | ||
53 | int i; | ||
54 | |||
55 | /* Create logical APIC IDs by counting CPUs already in cluster. */ | ||
56 | for (count = 0, i = nr_cpu_ids; --i >= 0; ) { | ||
57 | lid = cpu_2_logical_apicid[i]; | ||
58 | if (lid != BAD_APICID && apicid_cluster(lid) == my_cluster) | ||
59 | ++count; | ||
60 | } | ||
61 | #endif | ||
62 | /* We only have a 4 wide bitmap in cluster mode. If a deranged | ||
63 | * BIOS puts 5 CPUs in one APIC cluster, we're hosed. */ | ||
64 | BUG_ON(count >= XAPIC_DEST_CPUS_SHIFT); | ||
65 | id = my_cluster | (1UL << count); | ||
66 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
67 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
68 | val |= SET_APIC_LOGICAL_ID(id); | ||
69 | apic_write(APIC_LDR, val); | ||
70 | } | ||
71 | |||
72 | static inline int multi_timer_check(int apic, int irq) | ||
73 | { | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static inline int apic_id_registered(void) | ||
78 | { | ||
79 | return 1; | ||
80 | } | ||
81 | |||
82 | static inline void setup_apic_routing(void) | ||
83 | { | ||
84 | printk("Enabling APIC mode: Summit. Using %d I/O APICs\n", | ||
85 | nr_ioapics); | ||
86 | } | ||
87 | |||
88 | static inline int apicid_to_node(int logical_apicid) | ||
89 | { | ||
90 | #ifdef CONFIG_SMP | ||
91 | return apicid_2_node[hard_smp_processor_id()]; | ||
92 | #else | ||
93 | return 0; | ||
94 | #endif | ||
95 | } | ||
96 | |||
97 | /* Mapping from cpu number to logical apicid */ | ||
98 | static inline int cpu_to_logical_apicid(int cpu) | ||
99 | { | ||
100 | #ifdef CONFIG_SMP | ||
101 | if (cpu >= nr_cpu_ids) | ||
102 | return BAD_APICID; | ||
103 | return (int)cpu_2_logical_apicid[cpu]; | ||
104 | #else | ||
105 | return logical_smp_processor_id(); | ||
106 | #endif | ||
107 | } | ||
108 | |||
109 | static inline int cpu_present_to_apicid(int mps_cpu) | ||
110 | { | ||
111 | if (mps_cpu < nr_cpu_ids) | ||
112 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
113 | else | ||
114 | return BAD_APICID; | ||
115 | } | ||
116 | |||
117 | static inline physid_mask_t ioapic_phys_id_map(physid_mask_t phys_id_map) | ||
118 | { | ||
119 | /* For clustered we don't have a good way to do this yet - hack */ | ||
120 | return physids_promote(0x0F); | ||
121 | } | ||
122 | |||
123 | static inline physid_mask_t apicid_to_cpu_present(int apicid) | ||
124 | { | ||
125 | return physid_mask_of_physid(0); | ||
126 | } | ||
127 | |||
128 | static inline void setup_portio_remap(void) | ||
129 | { | ||
130 | } | ||
131 | |||
132 | static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
133 | { | ||
134 | return 1; | ||
135 | } | ||
136 | |||
137 | static inline void enable_apic_mode(void) | ||
138 | { | ||
139 | } | ||
140 | |||
141 | static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
142 | { | ||
143 | int num_bits_set; | ||
144 | int cpus_found = 0; | ||
145 | int cpu; | ||
146 | int apicid; | ||
147 | |||
148 | num_bits_set = cpus_weight(*cpumask); | ||
149 | /* Return id to all */ | ||
150 | if (num_bits_set >= nr_cpu_ids) | ||
151 | return (int) 0xFF; | ||
152 | /* | ||
153 | * The cpus in the mask must all be on the apic cluster. If are not | ||
154 | * on the same apicid cluster return default value of TARGET_CPUS. | ||
155 | */ | ||
156 | cpu = first_cpu(*cpumask); | ||
157 | apicid = cpu_to_logical_apicid(cpu); | ||
158 | while (cpus_found < num_bits_set) { | ||
159 | if (cpu_isset(cpu, *cpumask)) { | ||
160 | int new_apicid = cpu_to_logical_apicid(cpu); | ||
161 | if (apicid_cluster(apicid) != | ||
162 | apicid_cluster(new_apicid)){ | ||
163 | printk ("%s: Not a valid mask!\n", __func__); | ||
164 | return 0xFF; | ||
165 | } | ||
166 | apicid = apicid | new_apicid; | ||
167 | cpus_found++; | ||
168 | } | ||
169 | cpu++; | ||
170 | } | ||
171 | return apicid; | ||
172 | } | ||
173 | |||
174 | static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, | ||
175 | const struct cpumask *andmask) | ||
176 | { | ||
177 | int apicid = cpu_to_logical_apicid(0); | ||
178 | cpumask_var_t cpumask; | ||
179 | |||
180 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) | ||
181 | return apicid; | ||
182 | |||
183 | cpumask_and(cpumask, inmask, andmask); | ||
184 | cpumask_and(cpumask, cpumask, cpu_online_mask); | ||
185 | apicid = cpu_mask_to_apicid(cpumask); | ||
186 | |||
187 | free_cpumask_var(cpumask); | ||
188 | return apicid; | ||
189 | } | ||
190 | |||
191 | /* cpuid returns the value latched in the HW at reset, not the APIC ID | ||
192 | * register's value. For any box whose BIOS changes APIC IDs, like | ||
193 | * clustered APIC systems, we must use hard_smp_processor_id. | ||
194 | * | ||
195 | * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID. | ||
196 | */ | ||
197 | static inline u32 phys_pkg_id(u32 cpuid_apic, int index_msb) | ||
198 | { | ||
199 | return hard_smp_processor_id() >> index_msb; | ||
200 | } | ||
201 | |||
202 | #endif /* __ASM_SUMMIT_APIC_H */ | ||
diff --git a/arch/x86/include/asm/summit/apicdef.h b/arch/x86/include/asm/summit/apicdef.h deleted file mode 100644 index f3fbca1f61c1..000000000000 --- a/arch/x86/include/asm/summit/apicdef.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __ASM_SUMMIT_APICDEF_H | ||
2 | #define __ASM_SUMMIT_APICDEF_H | ||
3 | |||
4 | #define APIC_ID_MASK (0xFF<<24) | ||
5 | |||
6 | static inline unsigned get_apic_id(unsigned long x) | ||
7 | { | ||
8 | return (x>>24)&0xFF; | ||
9 | } | ||
10 | |||
11 | #define GET_APIC_ID(x) get_apic_id(x) | ||
12 | |||
13 | #endif | ||
diff --git a/arch/x86/include/asm/summit/ipi.h b/arch/x86/include/asm/summit/ipi.h deleted file mode 100644 index a8a2c24f50cc..000000000000 --- a/arch/x86/include/asm/summit/ipi.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | #ifndef __ASM_SUMMIT_IPI_H | ||
2 | #define __ASM_SUMMIT_IPI_H | ||
3 | |||
4 | void send_IPI_mask_sequence(const cpumask_t *mask, int vector); | ||
5 | void send_IPI_mask_allbutself(const cpumask_t *mask, int vector); | ||
6 | |||
7 | static inline void send_IPI_mask(const cpumask_t *mask, int vector) | ||
8 | { | ||
9 | send_IPI_mask_sequence(mask, vector); | ||
10 | } | ||
11 | |||
12 | static inline void send_IPI_allbutself(int vector) | ||
13 | { | ||
14 | cpumask_t mask = cpu_online_map; | ||
15 | cpu_clear(smp_processor_id(), mask); | ||
16 | |||
17 | if (!cpus_empty(mask)) | ||
18 | send_IPI_mask(&mask, vector); | ||
19 | } | ||
20 | |||
21 | static inline void send_IPI_all(int vector) | ||
22 | { | ||
23 | send_IPI_mask(&cpu_online_map, vector); | ||
24 | } | ||
25 | |||
26 | #endif /* __ASM_SUMMIT_IPI_H */ | ||
diff --git a/arch/x86/include/asm/summit/mpparse.h b/arch/x86/include/asm/summit/mpparse.h deleted file mode 100644 index 380e86c02363..000000000000 --- a/arch/x86/include/asm/summit/mpparse.h +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | #ifndef __ASM_SUMMIT_MPPARSE_H | ||
2 | #define __ASM_SUMMIT_MPPARSE_H | ||
3 | |||
4 | #include <asm/tsc.h> | ||
5 | |||
6 | extern int use_cyclone; | ||
7 | |||
8 | #ifdef CONFIG_X86_SUMMIT_NUMA | ||
9 | extern void setup_summit(void); | ||
10 | #else | ||
11 | #define setup_summit() {} | ||
12 | #endif | ||
13 | |||
14 | static inline int mps_oem_check(struct mpc_table *mpc, char *oem, | ||
15 | char *productid) | ||
16 | { | ||
17 | if (!strncmp(oem, "IBM ENSW", 8) && | ||
18 | (!strncmp(productid, "VIGIL SMP", 9) | ||
19 | || !strncmp(productid, "EXA", 3) | ||
20 | || !strncmp(productid, "RUTHLESS SMP", 12))){ | ||
21 | mark_tsc_unstable("Summit based system"); | ||
22 | use_cyclone = 1; /*enable cyclone-timer*/ | ||
23 | setup_summit(); | ||
24 | return 1; | ||
25 | } | ||
26 | return 0; | ||
27 | } | ||
28 | |||
29 | /* Hook from generic ACPI tables.c */ | ||
30 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
31 | { | ||
32 | if (!strncmp(oem_id, "IBM", 3) && | ||
33 | (!strncmp(oem_table_id, "SERVIGIL", 8) | ||
34 | || !strncmp(oem_table_id, "EXA", 3))){ | ||
35 | mark_tsc_unstable("Summit based system"); | ||
36 | use_cyclone = 1; /*enable cyclone-timer*/ | ||
37 | setup_summit(); | ||
38 | return 1; | ||
39 | } | ||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | struct rio_table_hdr { | ||
44 | unsigned char version; /* Version number of this data structure */ | ||
45 | /* Version 3 adds chassis_num & WP_index */ | ||
46 | unsigned char num_scal_dev; /* # of Scalability devices (Twisters for Vigil) */ | ||
47 | unsigned char num_rio_dev; /* # of RIO I/O devices (Cyclones and Winnipegs) */ | ||
48 | } __attribute__((packed)); | ||
49 | |||
50 | struct scal_detail { | ||
51 | unsigned char node_id; /* Scalability Node ID */ | ||
52 | unsigned long CBAR; /* Address of 1MB register space */ | ||
53 | unsigned char port0node; /* Node ID port connected to: 0xFF=None */ | ||
54 | unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
55 | unsigned char port1node; /* Node ID port connected to: 0xFF = None */ | ||
56 | unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
57 | unsigned char port2node; /* Node ID port connected to: 0xFF = None */ | ||
58 | unsigned char port2port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
59 | unsigned char chassis_num; /* 1 based Chassis number (1 = boot node) */ | ||
60 | } __attribute__((packed)); | ||
61 | |||
62 | struct rio_detail { | ||
63 | unsigned char node_id; /* RIO Node ID */ | ||
64 | unsigned long BBAR; /* Address of 1MB register space */ | ||
65 | unsigned char type; /* Type of device */ | ||
66 | unsigned char owner_id; /* For WPEG: Node ID of Cyclone that owns this WPEG*/ | ||
67 | /* For CYC: Node ID of Twister that owns this CYC */ | ||
68 | unsigned char port0node; /* Node ID port connected to: 0xFF=None */ | ||
69 | unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
70 | unsigned char port1node; /* Node ID port connected to: 0xFF=None */ | ||
71 | unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
72 | unsigned char first_slot; /* For WPEG: Lowest slot number below this WPEG */ | ||
73 | /* For CYC: 0 */ | ||
74 | unsigned char status; /* For WPEG: Bit 0 = 1 : the XAPIC is used */ | ||
75 | /* = 0 : the XAPIC is not used, ie:*/ | ||
76 | /* ints fwded to another XAPIC */ | ||
77 | /* Bits1:7 Reserved */ | ||
78 | /* For CYC: Bits0:7 Reserved */ | ||
79 | unsigned char WP_index; /* For WPEG: WPEG instance index - lower ones have */ | ||
80 | /* lower slot numbers/PCI bus numbers */ | ||
81 | /* For CYC: No meaning */ | ||
82 | unsigned char chassis_num; /* 1 based Chassis number */ | ||
83 | /* For LookOut WPEGs this field indicates the */ | ||
84 | /* Expansion Chassis #, enumerated from Boot */ | ||
85 | /* Node WPEG external port, then Boot Node CYC */ | ||
86 | /* external port, then Next Vigil chassis WPEG */ | ||
87 | /* external port, etc. */ | ||
88 | /* Shared Lookouts have only 1 chassis number (the */ | ||
89 | /* first one assigned) */ | ||
90 | } __attribute__((packed)); | ||
91 | |||
92 | |||
93 | typedef enum { | ||
94 | CompatTwister = 0, /* Compatibility Twister */ | ||
95 | AltTwister = 1, /* Alternate Twister of internal 8-way */ | ||
96 | CompatCyclone = 2, /* Compatibility Cyclone */ | ||
97 | AltCyclone = 3, /* Alternate Cyclone of internal 8-way */ | ||
98 | CompatWPEG = 4, /* Compatibility WPEG */ | ||
99 | AltWPEG = 5, /* Second Planar WPEG */ | ||
100 | LookOutAWPEG = 6, /* LookOut WPEG */ | ||
101 | LookOutBWPEG = 7, /* LookOut WPEG */ | ||
102 | } node_type; | ||
103 | |||
104 | static inline int is_WPEG(struct rio_detail *rio){ | ||
105 | return (rio->type == CompatWPEG || rio->type == AltWPEG || | ||
106 | rio->type == LookOutAWPEG || rio->type == LookOutBWPEG); | ||
107 | } | ||
108 | |||
109 | #endif /* __ASM_SUMMIT_MPPARSE_H */ | ||
diff --git a/arch/x86/include/asm/syscalls.h b/arch/x86/include/asm/syscalls.h index 68b1be10cfad..7043408f6904 100644 --- a/arch/x86/include/asm/syscalls.h +++ b/arch/x86/include/asm/syscalls.h | |||
@@ -74,6 +74,7 @@ asmlinkage long sys_vfork(struct pt_regs *); | |||
74 | asmlinkage long sys_execve(char __user *, char __user * __user *, | 74 | asmlinkage long sys_execve(char __user *, char __user * __user *, |
75 | char __user * __user *, | 75 | char __user * __user *, |
76 | struct pt_regs *); | 76 | struct pt_regs *); |
77 | long sys_arch_prctl(int, unsigned long); | ||
77 | 78 | ||
78 | /* kernel/ioport.c */ | 79 | /* kernel/ioport.c */ |
79 | asmlinkage long sys_iopl(unsigned int, struct pt_regs *); | 80 | asmlinkage long sys_iopl(unsigned int, struct pt_regs *); |
@@ -81,7 +82,7 @@ asmlinkage long sys_iopl(unsigned int, struct pt_regs *); | |||
81 | /* kernel/signal_64.c */ | 82 | /* kernel/signal_64.c */ |
82 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, | 83 | asmlinkage long sys_sigaltstack(const stack_t __user *, stack_t __user *, |
83 | struct pt_regs *); | 84 | struct pt_regs *); |
84 | asmlinkage long sys_rt_sigreturn(struct pt_regs *); | 85 | long sys_rt_sigreturn(struct pt_regs *); |
85 | 86 | ||
86 | /* kernel/sys_x86_64.c */ | 87 | /* kernel/sys_x86_64.c */ |
87 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, | 88 | asmlinkage long sys_mmap(unsigned long, unsigned long, unsigned long, |
diff --git a/arch/x86/include/asm/system.h b/arch/x86/include/asm/system.h index 7a80f72bec47..c00bfdbdd456 100644 --- a/arch/x86/include/asm/system.h +++ b/arch/x86/include/asm/system.h | |||
@@ -130,16 +130,16 @@ do { \ | |||
130 | "movq "__percpu_arg([current_task])",%%rsi\n\t" \ | 130 | "movq "__percpu_arg([current_task])",%%rsi\n\t" \ |
131 | __switch_canary \ | 131 | __switch_canary \ |
132 | "movq %P[thread_info](%%rsi),%%r8\n\t" \ | 132 | "movq %P[thread_info](%%rsi),%%r8\n\t" \ |
133 | LOCK_PREFIX "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \ | ||
134 | "movq %%rax,%%rdi\n\t" \ | 133 | "movq %%rax,%%rdi\n\t" \ |
135 | "jc ret_from_fork\n\t" \ | 134 | "testl %[_tif_fork],%P[ti_flags](%%r8)\n\t" \ |
135 | "jnz ret_from_fork\n\t" \ | ||
136 | RESTORE_CONTEXT \ | 136 | RESTORE_CONTEXT \ |
137 | : "=a" (last) \ | 137 | : "=a" (last) \ |
138 | __switch_canary_oparam \ | 138 | __switch_canary_oparam \ |
139 | : [next] "S" (next), [prev] "D" (prev), \ | 139 | : [next] "S" (next), [prev] "D" (prev), \ |
140 | [threadrsp] "i" (offsetof(struct task_struct, thread.sp)), \ | 140 | [threadrsp] "i" (offsetof(struct task_struct, thread.sp)), \ |
141 | [ti_flags] "i" (offsetof(struct thread_info, flags)), \ | 141 | [ti_flags] "i" (offsetof(struct thread_info, flags)), \ |
142 | [tif_fork] "i" (TIF_FORK), \ | 142 | [_tif_fork] "i" (_TIF_FORK), \ |
143 | [thread_info] "i" (offsetof(struct task_struct, stack)), \ | 143 | [thread_info] "i" (offsetof(struct task_struct, stack)), \ |
144 | [current_task] "m" (per_cpu_var(current_task)) \ | 144 | [current_task] "m" (per_cpu_var(current_task)) \ |
145 | __switch_canary_iparam \ | 145 | __switch_canary_iparam \ |
diff --git a/arch/x86/include/asm/timer.h b/arch/x86/include/asm/timer.h index 2bb6a835c453..a81195eaa2b3 100644 --- a/arch/x86/include/asm/timer.h +++ b/arch/x86/include/asm/timer.h | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/pm.h> | 4 | #include <linux/pm.h> |
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <linux/interrupt.h> | ||
6 | 7 | ||
7 | #define TICK_SIZE (tick_nsec / 1000) | 8 | #define TICK_SIZE (tick_nsec / 1000) |
8 | 9 | ||
@@ -12,6 +13,7 @@ unsigned long native_calibrate_tsc(void); | |||
12 | #ifdef CONFIG_X86_32 | 13 | #ifdef CONFIG_X86_32 |
13 | extern int timer_ack; | 14 | extern int timer_ack; |
14 | extern int recalibrate_cpu_khz(void); | 15 | extern int recalibrate_cpu_khz(void); |
16 | extern irqreturn_t timer_interrupt(int irq, void *dev_id); | ||
15 | #endif /* CONFIG_X86_32 */ | 17 | #endif /* CONFIG_X86_32 */ |
16 | 18 | ||
17 | extern int no_timer_check; | 19 | extern int no_timer_check; |
diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index 84210c479fca..987a2c10fe20 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h | |||
@@ -192,14 +192,26 @@ static inline int __copy_from_user_nocache(void *dst, const void __user *src, | |||
192 | unsigned size) | 192 | unsigned size) |
193 | { | 193 | { |
194 | might_sleep(); | 194 | might_sleep(); |
195 | return __copy_user_nocache(dst, src, size, 1); | 195 | /* |
196 | * In practice this limit means that large file write()s | ||
197 | * which get chunked to 4K copies get handled via | ||
198 | * non-temporal stores here. Smaller writes get handled | ||
199 | * via regular __copy_from_user(): | ||
200 | */ | ||
201 | if (likely(size >= PAGE_SIZE)) | ||
202 | return __copy_user_nocache(dst, src, size, 1); | ||
203 | else | ||
204 | return __copy_from_user(dst, src, size); | ||
196 | } | 205 | } |
197 | 206 | ||
198 | static inline int __copy_from_user_inatomic_nocache(void *dst, | 207 | static inline int __copy_from_user_inatomic_nocache(void *dst, |
199 | const void __user *src, | 208 | const void __user *src, |
200 | unsigned size) | 209 | unsigned size) |
201 | { | 210 | { |
202 | return __copy_user_nocache(dst, src, size, 0); | 211 | if (likely(size >= PAGE_SIZE)) |
212 | return __copy_user_nocache(dst, src, size, 0); | ||
213 | else | ||
214 | return __copy_from_user_inatomic(dst, src, size); | ||
203 | } | 215 | } |
204 | 216 | ||
205 | unsigned long | 217 | unsigned long |
diff --git a/arch/x86/include/asm/vic.h b/arch/x86/include/asm/vic.h deleted file mode 100644 index 53100f353612..000000000000 --- a/arch/x86/include/asm/vic.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* Copyright (C) 1999,2001 | ||
2 | * | ||
3 | * Author: J.E.J.Bottomley@HansenPartnership.com | ||
4 | * | ||
5 | * Standard include definitions for the NCR Voyager Interrupt Controller */ | ||
6 | |||
7 | /* The eight CPI vectors. To activate a CPI, you write a bit mask | ||
8 | * corresponding to the processor set to be interrupted into the | ||
9 | * relevant register. That set of CPUs will then be interrupted with | ||
10 | * the CPI */ | ||
11 | static const int VIC_CPI_Registers[] = | ||
12 | {0xFC00, 0xFC01, 0xFC08, 0xFC09, | ||
13 | 0xFC10, 0xFC11, 0xFC18, 0xFC19 }; | ||
14 | |||
15 | #define VIC_PROC_WHO_AM_I 0xfc29 | ||
16 | # define QUAD_IDENTIFIER 0xC0 | ||
17 | # define EIGHT_SLOT_IDENTIFIER 0xE0 | ||
18 | #define QIC_EXTENDED_PROCESSOR_SELECT 0xFC72 | ||
19 | #define VIC_CPI_BASE_REGISTER 0xFC41 | ||
20 | #define VIC_PROCESSOR_ID 0xFC21 | ||
21 | # define VIC_CPU_MASQUERADE_ENABLE 0x8 | ||
22 | |||
23 | #define VIC_CLAIM_REGISTER_0 0xFC38 | ||
24 | #define VIC_CLAIM_REGISTER_1 0xFC39 | ||
25 | #define VIC_REDIRECT_REGISTER_0 0xFC60 | ||
26 | #define VIC_REDIRECT_REGISTER_1 0xFC61 | ||
27 | #define VIC_PRIORITY_REGISTER 0xFC20 | ||
28 | |||
29 | #define VIC_PRIMARY_MC_BASE 0xFC48 | ||
30 | #define VIC_SECONDARY_MC_BASE 0xFC49 | ||
31 | |||
32 | #define QIC_PROCESSOR_ID 0xFC71 | ||
33 | # define QIC_CPUID_ENABLE 0x08 | ||
34 | |||
35 | #define QIC_VIC_CPI_BASE_REGISTER 0xFC79 | ||
36 | #define QIC_CPI_BASE_REGISTER 0xFC7A | ||
37 | |||
38 | #define QIC_MASK_REGISTER0 0xFC80 | ||
39 | /* NOTE: these are masked high, enabled low */ | ||
40 | # define QIC_PERF_TIMER 0x01 | ||
41 | # define QIC_LPE 0x02 | ||
42 | # define QIC_SYS_INT 0x04 | ||
43 | # define QIC_CMN_INT 0x08 | ||
44 | /* at the moment, just enable CMN_INT, disable SYS_INT */ | ||
45 | # define QIC_DEFAULT_MASK0 (~(QIC_CMN_INT /* | VIC_SYS_INT */)) | ||
46 | #define QIC_MASK_REGISTER1 0xFC81 | ||
47 | # define QIC_BOOT_CPI_MASK 0xFE | ||
48 | /* Enable CPI's 1-6 inclusive */ | ||
49 | # define QIC_CPI_ENABLE 0x81 | ||
50 | |||
51 | #define QIC_INTERRUPT_CLEAR0 0xFC8A | ||
52 | #define QIC_INTERRUPT_CLEAR1 0xFC8B | ||
53 | |||
54 | /* this is where we place the CPI vectors */ | ||
55 | #define VIC_DEFAULT_CPI_BASE 0xC0 | ||
56 | /* this is where we place the QIC CPI vectors */ | ||
57 | #define QIC_DEFAULT_CPI_BASE 0xD0 | ||
58 | |||
59 | #define VIC_BOOT_INTERRUPT_MASK 0xfe | ||
60 | |||
61 | extern void smp_vic_timer_interrupt(void); | ||
diff --git a/arch/x86/include/asm/voyager.h b/arch/x86/include/asm/voyager.h deleted file mode 100644 index b3e647307625..000000000000 --- a/arch/x86/include/asm/voyager.h +++ /dev/null | |||
@@ -1,529 +0,0 @@ | |||
1 | /* Copyright (C) 1999,2001 | ||
2 | * | ||
3 | * Author: J.E.J.Bottomley@HansenPartnership.com | ||
4 | * | ||
5 | * Standard include definitions for the NCR Voyager system */ | ||
6 | |||
7 | #undef VOYAGER_DEBUG | ||
8 | #undef VOYAGER_CAT_DEBUG | ||
9 | |||
10 | #ifdef VOYAGER_DEBUG | ||
11 | #define VDEBUG(x) printk x | ||
12 | #else | ||
13 | #define VDEBUG(x) | ||
14 | #endif | ||
15 | |||
16 | /* There are three levels of voyager machine: 3,4 and 5. The rule is | ||
17 | * if it's less than 3435 it's a Level 3 except for a 3360 which is | ||
18 | * a level 4. A 3435 or above is a Level 5 */ | ||
19 | #define VOYAGER_LEVEL5_AND_ABOVE 0x3435 | ||
20 | #define VOYAGER_LEVEL4 0x3360 | ||
21 | |||
22 | /* The L4 DINO ASIC */ | ||
23 | #define VOYAGER_DINO 0x43 | ||
24 | |||
25 | /* voyager ports in standard I/O space */ | ||
26 | #define VOYAGER_MC_SETUP 0x96 | ||
27 | |||
28 | |||
29 | #define VOYAGER_CAT_CONFIG_PORT 0x97 | ||
30 | # define VOYAGER_CAT_DESELECT 0xff | ||
31 | #define VOYAGER_SSPB_RELOCATION_PORT 0x98 | ||
32 | |||
33 | /* Valid CAT controller commands */ | ||
34 | /* start instruction register cycle */ | ||
35 | #define VOYAGER_CAT_IRCYC 0x01 | ||
36 | /* start data register cycle */ | ||
37 | #define VOYAGER_CAT_DRCYC 0x02 | ||
38 | /* move to execute state */ | ||
39 | #define VOYAGER_CAT_RUN 0x0F | ||
40 | /* end operation */ | ||
41 | #define VOYAGER_CAT_END 0x80 | ||
42 | /* hold in idle state */ | ||
43 | #define VOYAGER_CAT_HOLD 0x90 | ||
44 | /* single step an "intest" vector */ | ||
45 | #define VOYAGER_CAT_STEP 0xE0 | ||
46 | /* return cat controller to CLEMSON mode */ | ||
47 | #define VOYAGER_CAT_CLEMSON 0xFF | ||
48 | |||
49 | /* the default cat command header */ | ||
50 | #define VOYAGER_CAT_HEADER 0x7F | ||
51 | |||
52 | /* the range of possible CAT module ids in the system */ | ||
53 | #define VOYAGER_MIN_MODULE 0x10 | ||
54 | #define VOYAGER_MAX_MODULE 0x1f | ||
55 | |||
56 | /* The voyager registers per asic */ | ||
57 | #define VOYAGER_ASIC_ID_REG 0x00 | ||
58 | #define VOYAGER_ASIC_TYPE_REG 0x01 | ||
59 | /* the sub address registers can be made auto incrementing on reads */ | ||
60 | #define VOYAGER_AUTO_INC_REG 0x02 | ||
61 | # define VOYAGER_AUTO_INC 0x04 | ||
62 | # define VOYAGER_NO_AUTO_INC 0xfb | ||
63 | #define VOYAGER_SUBADDRDATA 0x03 | ||
64 | #define VOYAGER_SCANPATH 0x05 | ||
65 | # define VOYAGER_CONNECT_ASIC 0x01 | ||
66 | # define VOYAGER_DISCONNECT_ASIC 0xfe | ||
67 | #define VOYAGER_SUBADDRLO 0x06 | ||
68 | #define VOYAGER_SUBADDRHI 0x07 | ||
69 | #define VOYAGER_SUBMODSELECT 0x08 | ||
70 | #define VOYAGER_SUBMODPRESENT 0x09 | ||
71 | |||
72 | #define VOYAGER_SUBADDR_LO 0xff | ||
73 | #define VOYAGER_SUBADDR_HI 0xffff | ||
74 | |||
75 | /* the maximum size of a scan path -- used to form instructions */ | ||
76 | #define VOYAGER_MAX_SCAN_PATH 0x100 | ||
77 | /* the biggest possible register size (in bytes) */ | ||
78 | #define VOYAGER_MAX_REG_SIZE 4 | ||
79 | |||
80 | /* Total number of possible modules (including submodules) */ | ||
81 | #define VOYAGER_MAX_MODULES 16 | ||
82 | /* Largest number of asics per module */ | ||
83 | #define VOYAGER_MAX_ASICS_PER_MODULE 7 | ||
84 | |||
85 | /* the CAT asic of each module is always the first one */ | ||
86 | #define VOYAGER_CAT_ID 0 | ||
87 | #define VOYAGER_PSI 0x1a | ||
88 | |||
89 | /* voyager instruction operations and registers */ | ||
90 | #define VOYAGER_READ_CONFIG 0x1 | ||
91 | #define VOYAGER_WRITE_CONFIG 0x2 | ||
92 | #define VOYAGER_BYPASS 0xff | ||
93 | |||
94 | typedef struct voyager_asic { | ||
95 | __u8 asic_addr; /* ASIC address; Level 4 */ | ||
96 | __u8 asic_type; /* ASIC type */ | ||
97 | __u8 asic_id; /* ASIC id */ | ||
98 | __u8 jtag_id[4]; /* JTAG id */ | ||
99 | __u8 asic_location; /* Location within scan path; start w/ 0 */ | ||
100 | __u8 bit_location; /* Location within bit stream; start w/ 0 */ | ||
101 | __u8 ireg_length; /* Instruction register length */ | ||
102 | __u16 subaddr; /* Amount of sub address space */ | ||
103 | struct voyager_asic *next; /* Next asic in linked list */ | ||
104 | } voyager_asic_t; | ||
105 | |||
106 | typedef struct voyager_module { | ||
107 | __u8 module_addr; /* Module address */ | ||
108 | __u8 scan_path_connected; /* Scan path connected */ | ||
109 | __u16 ee_size; /* Size of the EEPROM */ | ||
110 | __u16 num_asics; /* Number of Asics */ | ||
111 | __u16 inst_bits; /* Instruction bits in the scan path */ | ||
112 | __u16 largest_reg; /* Largest register in the scan path */ | ||
113 | __u16 smallest_reg; /* Smallest register in the scan path */ | ||
114 | voyager_asic_t *asic; /* First ASIC in scan path (CAT_I) */ | ||
115 | struct voyager_module *submodule; /* Submodule pointer */ | ||
116 | struct voyager_module *next; /* Next module in linked list */ | ||
117 | } voyager_module_t; | ||
118 | |||
119 | typedef struct voyager_eeprom_hdr { | ||
120 | __u8 module_id[4]; | ||
121 | __u8 version_id; | ||
122 | __u8 config_id; | ||
123 | __u16 boundry_id; /* boundary scan id */ | ||
124 | __u16 ee_size; /* size of EEPROM */ | ||
125 | __u8 assembly[11]; /* assembly # */ | ||
126 | __u8 assembly_rev; /* assembly rev */ | ||
127 | __u8 tracer[4]; /* tracer number */ | ||
128 | __u16 assembly_cksum; /* asm checksum */ | ||
129 | __u16 power_consump; /* pwr requirements */ | ||
130 | __u16 num_asics; /* number of asics */ | ||
131 | __u16 bist_time; /* min. bist time */ | ||
132 | __u16 err_log_offset; /* error log offset */ | ||
133 | __u16 scan_path_offset;/* scan path offset */ | ||
134 | __u16 cct_offset; | ||
135 | __u16 log_length; /* length of err log */ | ||
136 | __u16 xsum_end; /* offset to end of | ||
137 | checksum */ | ||
138 | __u8 reserved[4]; | ||
139 | __u8 sflag; /* starting sentinal */ | ||
140 | __u8 part_number[13]; /* prom part number */ | ||
141 | __u8 version[10]; /* version number */ | ||
142 | __u8 signature[8]; | ||
143 | __u16 eeprom_chksum; | ||
144 | __u32 data_stamp_offset; | ||
145 | __u8 eflag ; /* ending sentinal */ | ||
146 | } __attribute__((packed)) voyager_eprom_hdr_t; | ||
147 | |||
148 | |||
149 | |||
150 | #define VOYAGER_EPROM_SIZE_OFFSET \ | ||
151 | ((__u16)(&(((voyager_eprom_hdr_t *)0)->ee_size))) | ||
152 | #define VOYAGER_XSUM_END_OFFSET 0x2a | ||
153 | |||
154 | /* the following three definitions are for internal table layouts | ||
155 | * in the module EPROMs. We really only care about the IDs and | ||
156 | * offsets */ | ||
157 | typedef struct voyager_sp_table { | ||
158 | __u8 asic_id; | ||
159 | __u8 bypass_flag; | ||
160 | __u16 asic_data_offset; | ||
161 | __u16 config_data_offset; | ||
162 | } __attribute__((packed)) voyager_sp_table_t; | ||
163 | |||
164 | typedef struct voyager_jtag_table { | ||
165 | __u8 icode[4]; | ||
166 | __u8 runbist[4]; | ||
167 | __u8 intest[4]; | ||
168 | __u8 samp_preld[4]; | ||
169 | __u8 ireg_len; | ||
170 | } __attribute__((packed)) voyager_jtt_t; | ||
171 | |||
172 | typedef struct voyager_asic_data_table { | ||
173 | __u8 jtag_id[4]; | ||
174 | __u16 length_bsr; | ||
175 | __u16 length_bist_reg; | ||
176 | __u32 bist_clk; | ||
177 | __u16 subaddr_bits; | ||
178 | __u16 seed_bits; | ||
179 | __u16 sig_bits; | ||
180 | __u16 jtag_offset; | ||
181 | } __attribute__((packed)) voyager_at_t; | ||
182 | |||
183 | /* Voyager Interrupt Controller (VIC) registers */ | ||
184 | |||
185 | /* Base to add to Cross Processor Interrupts (CPIs) when triggering | ||
186 | * the CPU IRQ line */ | ||
187 | /* register defines for the WCBICs (one per processor) */ | ||
188 | #define VOYAGER_WCBIC0 0x41 /* bus A node P1 processor 0 */ | ||
189 | #define VOYAGER_WCBIC1 0x49 /* bus A node P1 processor 1 */ | ||
190 | #define VOYAGER_WCBIC2 0x51 /* bus A node P2 processor 0 */ | ||
191 | #define VOYAGER_WCBIC3 0x59 /* bus A node P2 processor 1 */ | ||
192 | #define VOYAGER_WCBIC4 0x61 /* bus B node P1 processor 0 */ | ||
193 | #define VOYAGER_WCBIC5 0x69 /* bus B node P1 processor 1 */ | ||
194 | #define VOYAGER_WCBIC6 0x71 /* bus B node P2 processor 0 */ | ||
195 | #define VOYAGER_WCBIC7 0x79 /* bus B node P2 processor 1 */ | ||
196 | |||
197 | |||
198 | /* top of memory registers */ | ||
199 | #define VOYAGER_WCBIC_TOM_L 0x4 | ||
200 | #define VOYAGER_WCBIC_TOM_H 0x5 | ||
201 | |||
202 | /* register defines for Voyager Memory Contol (VMC) | ||
203 | * these are present on L4 machines only */ | ||
204 | #define VOYAGER_VMC1 0x81 | ||
205 | #define VOYAGER_VMC2 0x91 | ||
206 | #define VOYAGER_VMC3 0xa1 | ||
207 | #define VOYAGER_VMC4 0xb1 | ||
208 | |||
209 | /* VMC Ports */ | ||
210 | #define VOYAGER_VMC_MEMORY_SETUP 0x9 | ||
211 | # define VMC_Interleaving 0x01 | ||
212 | # define VMC_4Way 0x02 | ||
213 | # define VMC_EvenCacheLines 0x04 | ||
214 | # define VMC_HighLine 0x08 | ||
215 | # define VMC_Start0_Enable 0x20 | ||
216 | # define VMC_Start1_Enable 0x40 | ||
217 | # define VMC_Vremap 0x80 | ||
218 | #define VOYAGER_VMC_BANK_DENSITY 0xa | ||
219 | # define VMC_BANK_EMPTY 0 | ||
220 | # define VMC_BANK_4MB 1 | ||
221 | # define VMC_BANK_16MB 2 | ||
222 | # define VMC_BANK_64MB 3 | ||
223 | # define VMC_BANK0_MASK 0x03 | ||
224 | # define VMC_BANK1_MASK 0x0C | ||
225 | # define VMC_BANK2_MASK 0x30 | ||
226 | # define VMC_BANK3_MASK 0xC0 | ||
227 | |||
228 | /* Magellan Memory Controller (MMC) defines - present on L5 */ | ||
229 | #define VOYAGER_MMC_ASIC_ID 1 | ||
230 | /* the two memory modules corresponding to memory cards in the system */ | ||
231 | #define VOYAGER_MMC_MEMORY0_MODULE 0x14 | ||
232 | #define VOYAGER_MMC_MEMORY1_MODULE 0x15 | ||
233 | /* the Magellan Memory Address (MMA) defines */ | ||
234 | #define VOYAGER_MMA_ASIC_ID 2 | ||
235 | |||
236 | /* Submodule number for the Quad Baseboard */ | ||
237 | #define VOYAGER_QUAD_BASEBOARD 1 | ||
238 | |||
239 | /* ASIC defines for the Quad Baseboard */ | ||
240 | #define VOYAGER_QUAD_QDATA0 1 | ||
241 | #define VOYAGER_QUAD_QDATA1 2 | ||
242 | #define VOYAGER_QUAD_QABC 3 | ||
243 | |||
244 | /* Useful areas in extended CMOS */ | ||
245 | #define VOYAGER_PROCESSOR_PRESENT_MASK 0x88a | ||
246 | #define VOYAGER_MEMORY_CLICKMAP 0xa23 | ||
247 | #define VOYAGER_DUMP_LOCATION 0xb1a | ||
248 | |||
249 | /* SUS In Control bit - used to tell SUS that we don't need to be | ||
250 | * babysat anymore */ | ||
251 | #define VOYAGER_SUS_IN_CONTROL_PORT 0x3ff | ||
252 | # define VOYAGER_IN_CONTROL_FLAG 0x80 | ||
253 | |||
254 | /* Voyager PSI defines */ | ||
255 | #define VOYAGER_PSI_STATUS_REG 0x08 | ||
256 | # define PSI_DC_FAIL 0x01 | ||
257 | # define PSI_MON 0x02 | ||
258 | # define PSI_FAULT 0x04 | ||
259 | # define PSI_ALARM 0x08 | ||
260 | # define PSI_CURRENT 0x10 | ||
261 | # define PSI_DVM 0x20 | ||
262 | # define PSI_PSCFAULT 0x40 | ||
263 | # define PSI_STAT_CHG 0x80 | ||
264 | |||
265 | #define VOYAGER_PSI_SUPPLY_REG 0x8000 | ||
266 | /* read */ | ||
267 | # define PSI_FAIL_DC 0x01 | ||
268 | # define PSI_FAIL_AC 0x02 | ||
269 | # define PSI_MON_INT 0x04 | ||
270 | # define PSI_SWITCH_OFF 0x08 | ||
271 | # define PSI_HX_OFF 0x10 | ||
272 | # define PSI_SECURITY 0x20 | ||
273 | # define PSI_CMOS_BATT_LOW 0x40 | ||
274 | # define PSI_CMOS_BATT_FAIL 0x80 | ||
275 | /* write */ | ||
276 | # define PSI_CLR_SWITCH_OFF 0x13 | ||
277 | # define PSI_CLR_HX_OFF 0x14 | ||
278 | # define PSI_CLR_CMOS_BATT_FAIL 0x17 | ||
279 | |||
280 | #define VOYAGER_PSI_MASK 0x8001 | ||
281 | # define PSI_MASK_MASK 0x10 | ||
282 | |||
283 | #define VOYAGER_PSI_AC_FAIL_REG 0x8004 | ||
284 | #define AC_FAIL_STAT_CHANGE 0x80 | ||
285 | |||
286 | #define VOYAGER_PSI_GENERAL_REG 0x8007 | ||
287 | /* read */ | ||
288 | # define PSI_SWITCH_ON 0x01 | ||
289 | # define PSI_SWITCH_ENABLED 0x02 | ||
290 | # define PSI_ALARM_ENABLED 0x08 | ||
291 | # define PSI_SECURE_ENABLED 0x10 | ||
292 | # define PSI_COLD_RESET 0x20 | ||
293 | # define PSI_COLD_START 0x80 | ||
294 | /* write */ | ||
295 | # define PSI_POWER_DOWN 0x10 | ||
296 | # define PSI_SWITCH_DISABLE 0x01 | ||
297 | # define PSI_SWITCH_ENABLE 0x11 | ||
298 | # define PSI_CLEAR 0x12 | ||
299 | # define PSI_ALARM_DISABLE 0x03 | ||
300 | # define PSI_ALARM_ENABLE 0x13 | ||
301 | # define PSI_CLEAR_COLD_RESET 0x05 | ||
302 | # define PSI_SET_COLD_RESET 0x15 | ||
303 | # define PSI_CLEAR_COLD_START 0x07 | ||
304 | # define PSI_SET_COLD_START 0x17 | ||
305 | |||
306 | |||
307 | |||
308 | struct voyager_bios_info { | ||
309 | __u8 len; | ||
310 | __u8 major; | ||
311 | __u8 minor; | ||
312 | __u8 debug; | ||
313 | __u8 num_classes; | ||
314 | __u8 class_1; | ||
315 | __u8 class_2; | ||
316 | }; | ||
317 | |||
318 | /* The following structures and definitions are for the Kernel/SUS | ||
319 | * interface these are needed to find out how SUS initialised any Quad | ||
320 | * boards in the system */ | ||
321 | |||
322 | #define NUMBER_OF_MC_BUSSES 2 | ||
323 | #define SLOTS_PER_MC_BUS 8 | ||
324 | #define MAX_CPUS 16 /* 16 way CPU system */ | ||
325 | #define MAX_PROCESSOR_BOARDS 4 /* 4 processor slot system */ | ||
326 | #define MAX_CACHE_LEVELS 4 /* # of cache levels supported */ | ||
327 | #define MAX_SHARED_CPUS 4 /* # of CPUs that can share a LARC */ | ||
328 | #define NUMBER_OF_POS_REGS 8 | ||
329 | |||
330 | typedef struct { | ||
331 | __u8 MC_Slot; | ||
332 | __u8 POS_Values[NUMBER_OF_POS_REGS]; | ||
333 | } __attribute__((packed)) MC_SlotInformation_t; | ||
334 | |||
335 | struct QuadDescription { | ||
336 | __u8 Type; /* for type 0 (DYADIC or MONADIC) all fields | ||
337 | * will be zero except for slot */ | ||
338 | __u8 StructureVersion; | ||
339 | __u32 CPI_BaseAddress; | ||
340 | __u32 LARC_BankSize; | ||
341 | __u32 LocalMemoryStateBits; | ||
342 | __u8 Slot; /* Processor slots 1 - 4 */ | ||
343 | } __attribute__((packed)); | ||
344 | |||
345 | struct ProcBoardInfo { | ||
346 | __u8 Type; | ||
347 | __u8 StructureVersion; | ||
348 | __u8 NumberOfBoards; | ||
349 | struct QuadDescription QuadData[MAX_PROCESSOR_BOARDS]; | ||
350 | } __attribute__((packed)); | ||
351 | |||
352 | struct CacheDescription { | ||
353 | __u8 Level; | ||
354 | __u32 TotalSize; | ||
355 | __u16 LineSize; | ||
356 | __u8 Associativity; | ||
357 | __u8 CacheType; | ||
358 | __u8 WriteType; | ||
359 | __u8 Number_CPUs_SharedBy; | ||
360 | __u8 Shared_CPUs_Hardware_IDs[MAX_SHARED_CPUS]; | ||
361 | |||
362 | } __attribute__((packed)); | ||
363 | |||
364 | struct CPU_Description { | ||
365 | __u8 CPU_HardwareId; | ||
366 | char *FRU_String; | ||
367 | __u8 NumberOfCacheLevels; | ||
368 | struct CacheDescription CacheLevelData[MAX_CACHE_LEVELS]; | ||
369 | } __attribute__((packed)); | ||
370 | |||
371 | struct CPU_Info { | ||
372 | __u8 Type; | ||
373 | __u8 StructureVersion; | ||
374 | __u8 NumberOf_CPUs; | ||
375 | struct CPU_Description CPU_Data[MAX_CPUS]; | ||
376 | } __attribute__((packed)); | ||
377 | |||
378 | |||
379 | /* | ||
380 | * This structure will be used by SUS and the OS. | ||
381 | * The assumption about this structure is that no blank space is | ||
382 | * packed in it by our friend the compiler. | ||
383 | */ | ||
384 | typedef struct { | ||
385 | __u8 Mailbox_SUS; /* Written to by SUS to give | ||
386 | commands/response to the OS */ | ||
387 | __u8 Mailbox_OS; /* Written to by the OS to give | ||
388 | commands/response to SUS */ | ||
389 | __u8 SUS_MailboxVersion; /* Tells the OS which iteration of the | ||
390 | interface SUS supports */ | ||
391 | __u8 OS_MailboxVersion; /* Tells SUS which iteration of the | ||
392 | interface the OS supports */ | ||
393 | __u32 OS_Flags; /* Flags set by the OS as info for | ||
394 | SUS */ | ||
395 | __u32 SUS_Flags; /* Flags set by SUS as info | ||
396 | for the OS */ | ||
397 | __u32 WatchDogPeriod; /* Watchdog period (in seconds) which | ||
398 | the DP uses to see if the OS | ||
399 | is dead */ | ||
400 | __u32 WatchDogCount; /* Updated by the OS on every tic. */ | ||
401 | __u32 MemoryFor_SUS_ErrorLog; /* Flat 32 bit address which tells SUS | ||
402 | where to stuff the SUS error log | ||
403 | on a dump */ | ||
404 | MC_SlotInformation_t MC_SlotInfo[NUMBER_OF_MC_BUSSES*SLOTS_PER_MC_BUS]; | ||
405 | /* Storage for MCA POS data */ | ||
406 | /* All new SECOND_PASS_INTERFACE fields added from this point */ | ||
407 | struct ProcBoardInfo *BoardData; | ||
408 | struct CPU_Info *CPU_Data; | ||
409 | /* All new fields must be added from this point */ | ||
410 | } Voyager_KernelSUS_Mbox_t; | ||
411 | |||
412 | /* structure for finding the right memory address to send a QIC CPI to */ | ||
413 | struct voyager_qic_cpi { | ||
414 | /* Each cache line (32 bytes) can trigger a cpi. The cpi | ||
415 | * read/write may occur anywhere in the cache line---pick the | ||
416 | * middle to be safe */ | ||
417 | struct { | ||
418 | __u32 pad1[3]; | ||
419 | __u32 cpi; | ||
420 | __u32 pad2[4]; | ||
421 | } qic_cpi[8]; | ||
422 | }; | ||
423 | |||
424 | struct voyager_status { | ||
425 | __u32 power_fail:1; | ||
426 | __u32 switch_off:1; | ||
427 | __u32 request_from_kernel:1; | ||
428 | }; | ||
429 | |||
430 | struct voyager_psi_regs { | ||
431 | __u8 cat_id; | ||
432 | __u8 cat_dev; | ||
433 | __u8 cat_control; | ||
434 | __u8 subaddr; | ||
435 | __u8 dummy4; | ||
436 | __u8 checkbit; | ||
437 | __u8 subaddr_low; | ||
438 | __u8 subaddr_high; | ||
439 | __u8 intstatus; | ||
440 | __u8 stat1; | ||
441 | __u8 stat3; | ||
442 | __u8 fault; | ||
443 | __u8 tms; | ||
444 | __u8 gen; | ||
445 | __u8 sysconf; | ||
446 | __u8 dummy15; | ||
447 | }; | ||
448 | |||
449 | struct voyager_psi_subregs { | ||
450 | __u8 supply; | ||
451 | __u8 mask; | ||
452 | __u8 present; | ||
453 | __u8 DCfail; | ||
454 | __u8 ACfail; | ||
455 | __u8 fail; | ||
456 | __u8 UPSfail; | ||
457 | __u8 genstatus; | ||
458 | }; | ||
459 | |||
460 | struct voyager_psi { | ||
461 | struct voyager_psi_regs regs; | ||
462 | struct voyager_psi_subregs subregs; | ||
463 | }; | ||
464 | |||
465 | struct voyager_SUS { | ||
466 | #define VOYAGER_DUMP_BUTTON_NMI 0x1 | ||
467 | #define VOYAGER_SUS_VALID 0x2 | ||
468 | #define VOYAGER_SYSINT_COMPLETE 0x3 | ||
469 | __u8 SUS_mbox; | ||
470 | #define VOYAGER_NO_COMMAND 0x0 | ||
471 | #define VOYAGER_IGNORE_DUMP 0x1 | ||
472 | #define VOYAGER_DO_DUMP 0x2 | ||
473 | #define VOYAGER_SYSINT_HANDSHAKE 0x3 | ||
474 | #define VOYAGER_DO_MEM_DUMP 0x4 | ||
475 | #define VOYAGER_SYSINT_WAS_RECOVERED 0x5 | ||
476 | __u8 kernel_mbox; | ||
477 | #define VOYAGER_MAILBOX_VERSION 0x10 | ||
478 | __u8 SUS_version; | ||
479 | __u8 kernel_version; | ||
480 | #define VOYAGER_OS_HAS_SYSINT 0x1 | ||
481 | #define VOYAGER_OS_IN_PROGRESS 0x2 | ||
482 | #define VOYAGER_UPDATING_WDPERIOD 0x4 | ||
483 | __u32 kernel_flags; | ||
484 | #define VOYAGER_SUS_BOOTING 0x1 | ||
485 | #define VOYAGER_SUS_IN_PROGRESS 0x2 | ||
486 | __u32 SUS_flags; | ||
487 | __u32 watchdog_period; | ||
488 | __u32 watchdog_count; | ||
489 | __u32 SUS_errorlog; | ||
490 | /* lots of system configuration stuff under here */ | ||
491 | }; | ||
492 | |||
493 | /* Variables exported by voyager_smp */ | ||
494 | extern __u32 voyager_extended_vic_processors; | ||
495 | extern __u32 voyager_allowed_boot_processors; | ||
496 | extern __u32 voyager_quad_processors; | ||
497 | extern struct voyager_qic_cpi *voyager_quad_cpi_addr[NR_CPUS]; | ||
498 | extern struct voyager_SUS *voyager_SUS; | ||
499 | |||
500 | /* variables exported always */ | ||
501 | extern struct task_struct *voyager_thread; | ||
502 | extern int voyager_level; | ||
503 | extern struct voyager_status voyager_status; | ||
504 | |||
505 | /* functions exported by the voyager and voyager_smp modules */ | ||
506 | extern int voyager_cat_readb(__u8 module, __u8 asic, int reg); | ||
507 | extern void voyager_cat_init(void); | ||
508 | extern void voyager_detect(struct voyager_bios_info *); | ||
509 | extern void voyager_trap_init(void); | ||
510 | extern void voyager_setup_irqs(void); | ||
511 | extern int voyager_memory_detect(int region, __u32 *addr, __u32 *length); | ||
512 | extern void voyager_smp_intr_init(void); | ||
513 | extern __u8 voyager_extended_cmos_read(__u16 cmos_address); | ||
514 | extern void voyager_smp_dump(void); | ||
515 | extern void voyager_timer_interrupt(void); | ||
516 | extern void smp_local_timer_interrupt(void); | ||
517 | extern void voyager_power_off(void); | ||
518 | extern void smp_voyager_power_off(void *dummy); | ||
519 | extern void voyager_restart(void); | ||
520 | extern void voyager_cat_power_off(void); | ||
521 | extern void voyager_cat_do_common_interrupt(void); | ||
522 | extern void voyager_handle_nmi(void); | ||
523 | extern void voyager_smp_intr_init(void); | ||
524 | /* Commands for the following are */ | ||
525 | #define VOYAGER_PSI_READ 0 | ||
526 | #define VOYAGER_PSI_WRITE 1 | ||
527 | #define VOYAGER_PSI_SUBREAD 2 | ||
528 | #define VOYAGER_PSI_SUBWRITE 3 | ||
529 | extern void voyager_cat_psi(__u8, __u16, __u8 *); | ||
diff --git a/arch/x86/include/asm/xen/events.h b/arch/x86/include/asm/xen/events.h index 19144184983a..1df35417c412 100644 --- a/arch/x86/include/asm/xen/events.h +++ b/arch/x86/include/asm/xen/events.h | |||
@@ -15,10 +15,4 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) | |||
15 | return raw_irqs_disabled_flags(regs->flags); | 15 | return raw_irqs_disabled_flags(regs->flags); |
16 | } | 16 | } |
17 | 17 | ||
18 | static inline void xen_do_IRQ(int irq, struct pt_regs *regs) | ||
19 | { | ||
20 | regs->orig_ax = ~irq; | ||
21 | do_IRQ(regs); | ||
22 | } | ||
23 | |||
24 | #endif /* _ASM_X86_XEN_EVENTS_H */ | 18 | #endif /* _ASM_X86_XEN_EVENTS_H */ |
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index 81fbd735aec4..d5b7e90c0edf 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h | |||
@@ -38,22 +38,30 @@ extern struct shared_info *HYPERVISOR_shared_info; | |||
38 | extern struct start_info *xen_start_info; | 38 | extern struct start_info *xen_start_info; |
39 | 39 | ||
40 | enum xen_domain_type { | 40 | enum xen_domain_type { |
41 | XEN_NATIVE, | 41 | XEN_NATIVE, /* running on bare hardware */ |
42 | XEN_PV_DOMAIN, | 42 | XEN_PV_DOMAIN, /* running in a PV domain */ |
43 | XEN_HVM_DOMAIN, | 43 | XEN_HVM_DOMAIN, /* running in a Xen hvm domain */ |
44 | }; | 44 | }; |
45 | 45 | ||
46 | extern enum xen_domain_type xen_domain_type; | ||
47 | |||
48 | #ifdef CONFIG_XEN | 46 | #ifdef CONFIG_XEN |
49 | #define xen_domain() (xen_domain_type != XEN_NATIVE) | 47 | extern enum xen_domain_type xen_domain_type; |
50 | #else | 48 | #else |
51 | #define xen_domain() (0) | 49 | #define xen_domain_type XEN_NATIVE |
52 | #endif | 50 | #endif |
53 | 51 | ||
54 | #define xen_pv_domain() (xen_domain() && xen_domain_type == XEN_PV_DOMAIN) | 52 | #define xen_domain() (xen_domain_type != XEN_NATIVE) |
55 | #define xen_hvm_domain() (xen_domain() && xen_domain_type == XEN_HVM_DOMAIN) | 53 | #define xen_pv_domain() (xen_domain() && \ |
54 | xen_domain_type == XEN_PV_DOMAIN) | ||
55 | #define xen_hvm_domain() (xen_domain() && \ | ||
56 | xen_domain_type == XEN_HVM_DOMAIN) | ||
57 | |||
58 | #ifdef CONFIG_XEN_DOM0 | ||
59 | #include <xen/interface/xen.h> | ||
56 | 60 | ||
57 | #define xen_initial_domain() (xen_pv_domain() && xen_start_info->flags & SIF_INITDOMAIN) | 61 | #define xen_initial_domain() (xen_pv_domain() && \ |
62 | xen_start_info->flags & SIF_INITDOMAIN) | ||
63 | #else /* !CONFIG_XEN_DOM0 */ | ||
64 | #define xen_initial_domain() (0) | ||
65 | #endif /* CONFIG_XEN_DOM0 */ | ||
58 | 66 | ||
59 | #endif /* _ASM_X86_XEN_HYPERVISOR_H */ | 67 | #endif /* _ASM_X86_XEN_HYPERVISOR_H */ |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index 37fa30bada17..de5657c039e9 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -50,30 +50,26 @@ obj-y += step.o | |||
50 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 50 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
51 | obj-y += cpu/ | 51 | obj-y += cpu/ |
52 | obj-y += acpi/ | 52 | obj-y += acpi/ |
53 | obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o | 53 | obj-y += reboot.o |
54 | obj-$(CONFIG_MCA) += mca_32.o | 54 | obj-$(CONFIG_MCA) += mca_32.o |
55 | obj-$(CONFIG_X86_MSR) += msr.o | 55 | obj-$(CONFIG_X86_MSR) += msr.o |
56 | obj-$(CONFIG_X86_CPUID) += cpuid.o | 56 | obj-$(CONFIG_X86_CPUID) += cpuid.o |
57 | obj-$(CONFIG_PCI) += early-quirks.o | 57 | obj-$(CONFIG_PCI) += early-quirks.o |
58 | apm-y := apm_32.o | 58 | apm-y := apm_32.o |
59 | obj-$(CONFIG_APM) += apm.o | 59 | obj-$(CONFIG_APM) += apm.o |
60 | obj-$(CONFIG_X86_SMP) += smp.o | 60 | obj-$(CONFIG_SMP) += smp.o |
61 | obj-$(CONFIG_X86_SMP) += smpboot.o tsc_sync.o ipi.o | 61 | obj-$(CONFIG_SMP) += smpboot.o tsc_sync.o |
62 | obj-$(CONFIG_SMP) += setup_percpu.o | 62 | obj-$(CONFIG_SMP) += setup_percpu.o |
63 | obj-$(CONFIG_X86_64_SMP) += tsc_sync.o | 63 | obj-$(CONFIG_X86_64_SMP) += tsc_sync.o |
64 | obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o | 64 | obj-$(CONFIG_X86_TRAMPOLINE) += trampoline_$(BITS).o |
65 | obj-$(CONFIG_X86_MPPARSE) += mpparse.o | 65 | obj-$(CONFIG_X86_MPPARSE) += mpparse.o |
66 | obj-$(CONFIG_X86_LOCAL_APIC) += apic.o nmi.o | 66 | obj-y += apic/ |
67 | obj-$(CONFIG_X86_IO_APIC) += io_apic.o | ||
68 | obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o | 67 | obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o |
69 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | 68 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
70 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o | 69 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
71 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o | 70 | obj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o |
72 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o | 71 | obj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o |
73 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o | 72 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o |
74 | obj-$(CONFIG_X86_NUMAQ) += numaq_32.o | ||
75 | obj-$(CONFIG_X86_ES7000) += es7000_32.o | ||
76 | obj-$(CONFIG_X86_SUMMIT_NUMA) += summit_32.o | ||
77 | obj-y += vsmp_64.o | 73 | obj-y += vsmp_64.o |
78 | obj-$(CONFIG_KPROBES) += kprobes.o | 74 | obj-$(CONFIG_KPROBES) += kprobes.o |
79 | obj-$(CONFIG_MODULES) += module_$(BITS).o | 75 | obj-$(CONFIG_MODULES) += module_$(BITS).o |
@@ -115,17 +111,13 @@ obj-$(CONFIG_SWIOTLB) += pci-swiotlb_64.o # NB rename without _64 | |||
115 | ### | 111 | ### |
116 | # 64 bit specific files | 112 | # 64 bit specific files |
117 | ifeq ($(CONFIG_X86_64),y) | 113 | ifeq ($(CONFIG_X86_64),y) |
118 | obj-y += genapic_64.o genapic_flat_64.o | 114 | obj-$(CONFIG_X86_UV) += tlb_uv.o bios_uv.o uv_irq.o uv_sysfs.o |
119 | obj-y += genx2apic_cluster.o | 115 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o |
120 | obj-y += genx2apic_phys.o | 116 | obj-$(CONFIG_AUDIT) += audit_64.o |
121 | obj-$(CONFIG_X86_UV) += genx2apic_uv_x.o tlb_uv.o | 117 | |
122 | obj-$(CONFIG_X86_UV) += bios_uv.o uv_irq.o uv_sysfs.o | 118 | obj-$(CONFIG_GART_IOMMU) += pci-gart_64.o aperture_64.o |
123 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o | 119 | obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o |
124 | obj-$(CONFIG_AUDIT) += audit_64.o | 120 | obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o |
125 | 121 | ||
126 | obj-$(CONFIG_GART_IOMMU) += pci-gart_64.o aperture_64.o | 122 | obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o |
127 | obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o | ||
128 | obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o | ||
129 | |||
130 | obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o | ||
131 | endif | 123 | endif |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index c193ec3c695e..a18eb7ce2236 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -37,15 +37,10 @@ | |||
37 | #include <asm/pgtable.h> | 37 | #include <asm/pgtable.h> |
38 | #include <asm/io_apic.h> | 38 | #include <asm/io_apic.h> |
39 | #include <asm/apic.h> | 39 | #include <asm/apic.h> |
40 | #include <asm/genapic.h> | ||
41 | #include <asm/io.h> | 40 | #include <asm/io.h> |
42 | #include <asm/mpspec.h> | 41 | #include <asm/mpspec.h> |
43 | #include <asm/smp.h> | 42 | #include <asm/smp.h> |
44 | 43 | ||
45 | #ifdef CONFIG_X86_LOCAL_APIC | ||
46 | # include <mach_apic.h> | ||
47 | #endif | ||
48 | |||
49 | static int __initdata acpi_force = 0; | 44 | static int __initdata acpi_force = 0; |
50 | u32 acpi_rsdt_forced; | 45 | u32 acpi_rsdt_forced; |
51 | #ifdef CONFIG_ACPI | 46 | #ifdef CONFIG_ACPI |
@@ -56,16 +51,7 @@ int acpi_disabled = 1; | |||
56 | EXPORT_SYMBOL(acpi_disabled); | 51 | EXPORT_SYMBOL(acpi_disabled); |
57 | 52 | ||
58 | #ifdef CONFIG_X86_64 | 53 | #ifdef CONFIG_X86_64 |
59 | 54 | # include <asm/proto.h> | |
60 | #include <asm/proto.h> | ||
61 | |||
62 | #else /* X86 */ | ||
63 | |||
64 | #ifdef CONFIG_X86_LOCAL_APIC | ||
65 | #include <mach_apic.h> | ||
66 | #include <mach_mpparse.h> | ||
67 | #endif /* CONFIG_X86_LOCAL_APIC */ | ||
68 | |||
69 | #endif /* X86 */ | 55 | #endif /* X86 */ |
70 | 56 | ||
71 | #define BAD_MADT_ENTRY(entry, end) ( \ | 57 | #define BAD_MADT_ENTRY(entry, end) ( \ |
@@ -121,35 +107,18 @@ enum acpi_irq_model_id acpi_irq_model = ACPI_IRQ_MODEL_PIC; | |||
121 | */ | 107 | */ |
122 | char *__init __acpi_map_table(unsigned long phys, unsigned long size) | 108 | char *__init __acpi_map_table(unsigned long phys, unsigned long size) |
123 | { | 109 | { |
124 | unsigned long base, offset, mapped_size; | ||
125 | int idx; | ||
126 | 110 | ||
127 | if (!phys || !size) | 111 | if (!phys || !size) |
128 | return NULL; | 112 | return NULL; |
129 | 113 | ||
130 | if (phys+size <= (max_low_pfn_mapped << PAGE_SHIFT)) | 114 | return early_ioremap(phys, size); |
131 | return __va(phys); | 115 | } |
132 | 116 | void __init __acpi_unmap_table(char *map, unsigned long size) | |
133 | offset = phys & (PAGE_SIZE - 1); | 117 | { |
134 | mapped_size = PAGE_SIZE - offset; | 118 | if (!map || !size) |
135 | clear_fixmap(FIX_ACPI_END); | 119 | return; |
136 | set_fixmap(FIX_ACPI_END, phys); | ||
137 | base = fix_to_virt(FIX_ACPI_END); | ||
138 | |||
139 | /* | ||
140 | * Most cases can be covered by the below. | ||
141 | */ | ||
142 | idx = FIX_ACPI_END; | ||
143 | while (mapped_size < size) { | ||
144 | if (--idx < FIX_ACPI_BEGIN) | ||
145 | return NULL; /* cannot handle this */ | ||
146 | phys += PAGE_SIZE; | ||
147 | clear_fixmap(idx); | ||
148 | set_fixmap(idx, phys); | ||
149 | mapped_size += PAGE_SIZE; | ||
150 | } | ||
151 | 120 | ||
152 | return ((unsigned char *)base + offset); | 121 | early_iounmap(map, size); |
153 | } | 122 | } |
154 | 123 | ||
155 | #ifdef CONFIG_PCI_MMCONFIG | 124 | #ifdef CONFIG_PCI_MMCONFIG |
@@ -239,7 +208,8 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) | |||
239 | madt->address); | 208 | madt->address); |
240 | } | 209 | } |
241 | 210 | ||
242 | acpi_madt_oem_check(madt->header.oem_id, madt->header.oem_table_id); | 211 | default_acpi_madt_oem_check(madt->header.oem_id, |
212 | madt->header.oem_table_id); | ||
243 | 213 | ||
244 | return 0; | 214 | return 0; |
245 | } | 215 | } |
@@ -884,7 +854,7 @@ static struct { | |||
884 | DECLARE_BITMAP(pin_programmed, MP_MAX_IOAPIC_PIN + 1); | 854 | DECLARE_BITMAP(pin_programmed, MP_MAX_IOAPIC_PIN + 1); |
885 | } mp_ioapic_routing[MAX_IO_APICS]; | 855 | } mp_ioapic_routing[MAX_IO_APICS]; |
886 | 856 | ||
887 | static int mp_find_ioapic(int gsi) | 857 | int mp_find_ioapic(int gsi) |
888 | { | 858 | { |
889 | int i = 0; | 859 | int i = 0; |
890 | 860 | ||
@@ -899,6 +869,16 @@ static int mp_find_ioapic(int gsi) | |||
899 | return -1; | 869 | return -1; |
900 | } | 870 | } |
901 | 871 | ||
872 | int mp_find_ioapic_pin(int ioapic, int gsi) | ||
873 | { | ||
874 | if (WARN_ON(ioapic == -1)) | ||
875 | return -1; | ||
876 | if (WARN_ON(gsi > mp_ioapic_routing[ioapic].gsi_end)) | ||
877 | return -1; | ||
878 | |||
879 | return gsi - mp_ioapic_routing[ioapic].gsi_base; | ||
880 | } | ||
881 | |||
902 | static u8 __init uniq_ioapic_id(u8 id) | 882 | static u8 __init uniq_ioapic_id(u8 id) |
903 | { | 883 | { |
904 | #ifdef CONFIG_X86_32 | 884 | #ifdef CONFIG_X86_32 |
@@ -1034,7 +1014,7 @@ void __init mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger, u32 gsi) | |||
1034 | ioapic = mp_find_ioapic(gsi); | 1014 | ioapic = mp_find_ioapic(gsi); |
1035 | if (ioapic < 0) | 1015 | if (ioapic < 0) |
1036 | return; | 1016 | return; |
1037 | pin = gsi - mp_ioapic_routing[ioapic].gsi_base; | 1017 | pin = mp_find_ioapic_pin(ioapic, gsi); |
1038 | 1018 | ||
1039 | /* | 1019 | /* |
1040 | * TBD: This check is for faulty timer entries, where the override | 1020 | * TBD: This check is for faulty timer entries, where the override |
@@ -1154,7 +1134,7 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
1154 | return gsi; | 1134 | return gsi; |
1155 | } | 1135 | } |
1156 | 1136 | ||
1157 | ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base; | 1137 | ioapic_pin = mp_find_ioapic_pin(ioapic, gsi); |
1158 | 1138 | ||
1159 | #ifdef CONFIG_X86_32 | 1139 | #ifdef CONFIG_X86_32 |
1160 | if (ioapic_renumber_irq) | 1140 | if (ioapic_renumber_irq) |
@@ -1243,7 +1223,7 @@ int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | |||
1243 | mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); | 1223 | mp_irq.srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); |
1244 | ioapic = mp_find_ioapic(gsi); | 1224 | ioapic = mp_find_ioapic(gsi); |
1245 | mp_irq.dstapic = mp_ioapic_routing[ioapic].apic_id; | 1225 | mp_irq.dstapic = mp_ioapic_routing[ioapic].apic_id; |
1246 | mp_irq.dstirq = gsi - mp_ioapic_routing[ioapic].gsi_base; | 1226 | mp_irq.dstirq = mp_find_ioapic_pin(ioapic, gsi); |
1247 | 1227 | ||
1248 | save_mp_irq(&mp_irq); | 1228 | save_mp_irq(&mp_irq); |
1249 | #endif | 1229 | #endif |
@@ -1370,7 +1350,7 @@ static void __init acpi_process_madt(void) | |||
1370 | if (!error) { | 1350 | if (!error) { |
1371 | acpi_lapic = 1; | 1351 | acpi_lapic = 1; |
1372 | 1352 | ||
1373 | #ifdef CONFIG_X86_GENERICARCH | 1353 | #ifdef CONFIG_X86_BIGSMP |
1374 | generic_bigsmp_probe(); | 1354 | generic_bigsmp_probe(); |
1375 | #endif | 1355 | #endif |
1376 | /* | 1356 | /* |
@@ -1382,9 +1362,8 @@ static void __init acpi_process_madt(void) | |||
1382 | acpi_ioapic = 1; | 1362 | acpi_ioapic = 1; |
1383 | 1363 | ||
1384 | smp_found_config = 1; | 1364 | smp_found_config = 1; |
1385 | #ifdef CONFIG_X86_32 | 1365 | if (apic->setup_apic_routing) |
1386 | setup_apic_routing(); | 1366 | apic->setup_apic_routing(); |
1387 | #endif | ||
1388 | } | 1367 | } |
1389 | } | 1368 | } |
1390 | if (error == -EINVAL) { | 1369 | if (error == -EINVAL) { |
diff --git a/arch/x86/kernel/acpi/realmode/wakeup.S b/arch/x86/kernel/acpi/realmode/wakeup.S index 3355973b12ac..580b4e296010 100644 --- a/arch/x86/kernel/acpi/realmode/wakeup.S +++ b/arch/x86/kernel/acpi/realmode/wakeup.S | |||
@@ -3,8 +3,8 @@ | |||
3 | */ | 3 | */ |
4 | #include <asm/segment.h> | 4 | #include <asm/segment.h> |
5 | #include <asm/msr-index.h> | 5 | #include <asm/msr-index.h> |
6 | #include <asm/page.h> | 6 | #include <asm/page_types.h> |
7 | #include <asm/pgtable.h> | 7 | #include <asm/pgtable_types.h> |
8 | #include <asm/processor-flags.h> | 8 | #include <asm/processor-flags.h> |
9 | 9 | ||
10 | .code16 | 10 | .code16 |
diff --git a/arch/x86/kernel/acpi/wakeup_32.S b/arch/x86/kernel/acpi/wakeup_32.S index a12e6a9fb659..8ded418b0593 100644 --- a/arch/x86/kernel/acpi/wakeup_32.S +++ b/arch/x86/kernel/acpi/wakeup_32.S | |||
@@ -1,7 +1,7 @@ | |||
1 | .section .text.page_aligned | 1 | .section .text.page_aligned |
2 | #include <linux/linkage.h> | 2 | #include <linux/linkage.h> |
3 | #include <asm/segment.h> | 3 | #include <asm/segment.h> |
4 | #include <asm/page.h> | 4 | #include <asm/page_types.h> |
5 | 5 | ||
6 | # Copyright 2003, 2008 Pavel Machek <pavel@suse.cz>, distribute under GPLv2 | 6 | # Copyright 2003, 2008 Pavel Machek <pavel@suse.cz>, distribute under GPLv2 |
7 | 7 | ||
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index bcc293423a70..8ea5164cbd04 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S | |||
@@ -1,8 +1,8 @@ | |||
1 | .text | 1 | .text |
2 | #include <linux/linkage.h> | 2 | #include <linux/linkage.h> |
3 | #include <asm/segment.h> | 3 | #include <asm/segment.h> |
4 | #include <asm/pgtable.h> | 4 | #include <asm/pgtable_types.h> |
5 | #include <asm/page.h> | 5 | #include <asm/page_types.h> |
6 | #include <asm/msr.h> | 6 | #include <asm/msr.h> |
7 | #include <asm/asm-offsets.h> | 7 | #include <asm/asm-offsets.h> |
8 | 8 | ||
@@ -13,7 +13,6 @@ | |||
13 | * Hooray, we are in Long 64-bit mode (but still running in low memory) | 13 | * Hooray, we are in Long 64-bit mode (but still running in low memory) |
14 | */ | 14 | */ |
15 | ENTRY(wakeup_long64) | 15 | ENTRY(wakeup_long64) |
16 | wakeup_long64: | ||
17 | movq saved_magic, %rax | 16 | movq saved_magic, %rax |
18 | movq $0x123456789abcdef0, %rdx | 17 | movq $0x123456789abcdef0, %rdx |
19 | cmpq %rdx, %rax | 18 | cmpq %rdx, %rax |
@@ -34,16 +33,12 @@ wakeup_long64: | |||
34 | 33 | ||
35 | movq saved_rip, %rax | 34 | movq saved_rip, %rax |
36 | jmp *%rax | 35 | jmp *%rax |
36 | ENDPROC(wakeup_long64) | ||
37 | 37 | ||
38 | bogus_64_magic: | 38 | bogus_64_magic: |
39 | jmp bogus_64_magic | 39 | jmp bogus_64_magic |
40 | 40 | ||
41 | .align 2 | 41 | ENTRY(do_suspend_lowlevel) |
42 | .p2align 4,,15 | ||
43 | .globl do_suspend_lowlevel | ||
44 | .type do_suspend_lowlevel,@function | ||
45 | do_suspend_lowlevel: | ||
46 | .LFB5: | ||
47 | subq $8, %rsp | 42 | subq $8, %rsp |
48 | xorl %eax, %eax | 43 | xorl %eax, %eax |
49 | call save_processor_state | 44 | call save_processor_state |
@@ -67,7 +62,7 @@ do_suspend_lowlevel: | |||
67 | pushfq | 62 | pushfq |
68 | popq pt_regs_flags(%rax) | 63 | popq pt_regs_flags(%rax) |
69 | 64 | ||
70 | movq $.L97, saved_rip(%rip) | 65 | movq $resume_point, saved_rip(%rip) |
71 | 66 | ||
72 | movq %rsp, saved_rsp | 67 | movq %rsp, saved_rsp |
73 | movq %rbp, saved_rbp | 68 | movq %rbp, saved_rbp |
@@ -78,14 +73,12 @@ do_suspend_lowlevel: | |||
78 | addq $8, %rsp | 73 | addq $8, %rsp |
79 | movl $3, %edi | 74 | movl $3, %edi |
80 | xorl %eax, %eax | 75 | xorl %eax, %eax |
81 | jmp acpi_enter_sleep_state | 76 | call acpi_enter_sleep_state |
82 | .L97: | 77 | /* in case something went wrong, restore the machine status and go on */ |
83 | .p2align 4,,7 | 78 | jmp resume_point |
84 | .L99: | ||
85 | .align 4 | ||
86 | movl $24, %eax | ||
87 | movw %ax, %ds | ||
88 | 79 | ||
80 | .align 4 | ||
81 | resume_point: | ||
89 | /* We don't restore %rax, it must be 0 anyway */ | 82 | /* We don't restore %rax, it must be 0 anyway */ |
90 | movq $saved_context, %rax | 83 | movq $saved_context, %rax |
91 | movq saved_context_cr4(%rax), %rbx | 84 | movq saved_context_cr4(%rax), %rbx |
@@ -117,12 +110,9 @@ do_suspend_lowlevel: | |||
117 | xorl %eax, %eax | 110 | xorl %eax, %eax |
118 | addq $8, %rsp | 111 | addq $8, %rsp |
119 | jmp restore_processor_state | 112 | jmp restore_processor_state |
120 | .LFE5: | 113 | ENDPROC(do_suspend_lowlevel) |
121 | .Lfe5: | 114 | |
122 | .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel | ||
123 | |||
124 | .data | 115 | .data |
125 | ALIGN | ||
126 | ENTRY(saved_rbp) .quad 0 | 116 | ENTRY(saved_rbp) .quad 0 |
127 | ENTRY(saved_rsi) .quad 0 | 117 | ENTRY(saved_rsi) .quad 0 |
128 | ENTRY(saved_rdi) .quad 0 | 118 | ENTRY(saved_rdi) .quad 0 |
diff --git a/arch/x86/kernel/apic/Makefile b/arch/x86/kernel/apic/Makefile new file mode 100644 index 000000000000..da7b7b9f8bd8 --- /dev/null +++ b/arch/x86/kernel/apic/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # Makefile for local APIC drivers and for the IO-APIC code | ||
3 | # | ||
4 | |||
5 | obj-$(CONFIG_X86_LOCAL_APIC) += apic.o probe_$(BITS).o ipi.o nmi.o | ||
6 | obj-$(CONFIG_X86_IO_APIC) += io_apic.o | ||
7 | obj-$(CONFIG_SMP) += ipi.o | ||
8 | |||
9 | ifeq ($(CONFIG_X86_64),y) | ||
10 | obj-y += apic_flat_64.o | ||
11 | obj-$(CONFIG_X86_X2APIC) += x2apic_cluster.o | ||
12 | obj-$(CONFIG_X86_X2APIC) += x2apic_phys.o | ||
13 | obj-$(CONFIG_X86_UV) += x2apic_uv_x.o | ||
14 | endif | ||
15 | |||
16 | obj-$(CONFIG_X86_BIGSMP) += bigsmp_32.o | ||
17 | obj-$(CONFIG_X86_NUMAQ) += numaq_32.o | ||
18 | obj-$(CONFIG_X86_ES7000) += es7000_32.o | ||
19 | obj-$(CONFIG_X86_SUMMIT) += summit_32.o | ||
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic/apic.c index 383d827eef89..f9cecdfd05c5 100644 --- a/arch/x86/kernel/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Local APIC handling, local APIC timers | 2 | * Local APIC handling, local APIC timers |
3 | * | 3 | * |
4 | * (c) 1999, 2000 Ingo Molnar <mingo@redhat.com> | 4 | * (c) 1999, 2000, 2009 Ingo Molnar <mingo@redhat.com> |
5 | * | 5 | * |
6 | * Fixes | 6 | * Fixes |
7 | * Maciej W. Rozycki : Bits for genuine 82489DX APICs; | 7 | * Maciej W. Rozycki : Bits for genuine 82489DX APICs; |
@@ -14,60 +14,60 @@ | |||
14 | * Mikael Pettersson : PM converted to driver model. | 14 | * Mikael Pettersson : PM converted to driver model. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/init.h> | ||
18 | |||
19 | #include <linux/mm.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/bootmem.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/mc146818rtc.h> | ||
24 | #include <linux/kernel_stat.h> | 17 | #include <linux/kernel_stat.h> |
25 | #include <linux/sysdev.h> | 18 | #include <linux/mc146818rtc.h> |
26 | #include <linux/ioport.h> | ||
27 | #include <linux/cpu.h> | ||
28 | #include <linux/clockchips.h> | ||
29 | #include <linux/acpi_pmtmr.h> | 19 | #include <linux/acpi_pmtmr.h> |
20 | #include <linux/clockchips.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/bootmem.h> | ||
23 | #include <linux/ftrace.h> | ||
24 | #include <linux/ioport.h> | ||
30 | #include <linux/module.h> | 25 | #include <linux/module.h> |
31 | #include <linux/dmi.h> | 26 | #include <linux/sysdev.h> |
27 | #include <linux/delay.h> | ||
28 | #include <linux/timex.h> | ||
32 | #include <linux/dmar.h> | 29 | #include <linux/dmar.h> |
33 | #include <linux/ftrace.h> | 30 | #include <linux/init.h> |
34 | #include <linux/smp.h> | 31 | #include <linux/cpu.h> |
32 | #include <linux/dmi.h> | ||
35 | #include <linux/nmi.h> | 33 | #include <linux/nmi.h> |
36 | #include <linux/timex.h> | 34 | #include <linux/smp.h> |
35 | #include <linux/mm.h> | ||
37 | 36 | ||
37 | #include <asm/pgalloc.h> | ||
38 | #include <asm/atomic.h> | 38 | #include <asm/atomic.h> |
39 | #include <asm/mtrr.h> | ||
40 | #include <asm/mpspec.h> | 39 | #include <asm/mpspec.h> |
41 | #include <asm/desc.h> | ||
42 | #include <asm/arch_hooks.h> | ||
43 | #include <asm/hpet.h> | ||
44 | #include <asm/pgalloc.h> | ||
45 | #include <asm/i8253.h> | 40 | #include <asm/i8253.h> |
46 | #include <asm/idle.h> | 41 | #include <asm/i8259.h> |
47 | #include <asm/proto.h> | 42 | #include <asm/proto.h> |
48 | #include <asm/apic.h> | 43 | #include <asm/apic.h> |
49 | #include <asm/i8259.h> | 44 | #include <asm/desc.h> |
45 | #include <asm/hpet.h> | ||
46 | #include <asm/idle.h> | ||
47 | #include <asm/mtrr.h> | ||
50 | #include <asm/smp.h> | 48 | #include <asm/smp.h> |
51 | 49 | ||
52 | #include <mach_apic.h> | ||
53 | #include <mach_apicdef.h> | ||
54 | #include <mach_ipi.h> | ||
55 | |||
56 | /* | ||
57 | * Sanity check | ||
58 | */ | ||
59 | #if ((SPURIOUS_APIC_VECTOR & 0x0F) != 0x0F) | ||
60 | # error SPURIOUS_APIC_VECTOR definition error | ||
61 | #endif | ||
62 | |||
63 | unsigned int num_processors; | 50 | unsigned int num_processors; |
51 | |||
64 | unsigned disabled_cpus __cpuinitdata; | 52 | unsigned disabled_cpus __cpuinitdata; |
53 | |||
65 | /* Processor that is doing the boot up */ | 54 | /* Processor that is doing the boot up */ |
66 | unsigned int boot_cpu_physical_apicid = -1U; | 55 | unsigned int boot_cpu_physical_apicid = -1U; |
67 | EXPORT_SYMBOL(boot_cpu_physical_apicid); | 56 | |
57 | /* | ||
58 | * The highest APIC ID seen during enumeration. | ||
59 | * | ||
60 | * This determines the messaging protocol we can use: if all APIC IDs | ||
61 | * are in the 0 ... 7 range, then we can use logical addressing which | ||
62 | * has some performance advantages (better broadcasting). | ||
63 | * | ||
64 | * If there's an APIC ID above 8, we use physical addressing. | ||
65 | */ | ||
68 | unsigned int max_physical_apicid; | 66 | unsigned int max_physical_apicid; |
69 | 67 | ||
70 | /* Bitmask of physically existing CPUs */ | 68 | /* |
69 | * Bitmask of physically existing CPUs: | ||
70 | */ | ||
71 | physid_mask_t phys_cpu_present_map; | 71 | physid_mask_t phys_cpu_present_map; |
72 | 72 | ||
73 | /* | 73 | /* |
@@ -110,11 +110,7 @@ static __init int setup_apicpmtimer(char *s) | |||
110 | __setup("apicpmtimer", setup_apicpmtimer); | 110 | __setup("apicpmtimer", setup_apicpmtimer); |
111 | #endif | 111 | #endif |
112 | 112 | ||
113 | #ifdef CONFIG_X86_64 | 113 | #ifdef CONFIG_X86_X2APIC |
114 | #define HAVE_X2APIC | ||
115 | #endif | ||
116 | |||
117 | #ifdef HAVE_X2APIC | ||
118 | int x2apic; | 114 | int x2apic; |
119 | /* x2apic enabled before OS handover */ | 115 | /* x2apic enabled before OS handover */ |
120 | static int x2apic_preenabled; | 116 | static int x2apic_preenabled; |
@@ -212,18 +208,13 @@ static int modern_apic(void) | |||
212 | return lapic_get_version() >= 0x14; | 208 | return lapic_get_version() >= 0x14; |
213 | } | 209 | } |
214 | 210 | ||
215 | /* | 211 | void native_apic_wait_icr_idle(void) |
216 | * Paravirt kernels also might be using these below ops. So we still | ||
217 | * use generic apic_read()/apic_write(), which might be pointing to different | ||
218 | * ops in PARAVIRT case. | ||
219 | */ | ||
220 | void xapic_wait_icr_idle(void) | ||
221 | { | 212 | { |
222 | while (apic_read(APIC_ICR) & APIC_ICR_BUSY) | 213 | while (apic_read(APIC_ICR) & APIC_ICR_BUSY) |
223 | cpu_relax(); | 214 | cpu_relax(); |
224 | } | 215 | } |
225 | 216 | ||
226 | u32 safe_xapic_wait_icr_idle(void) | 217 | u32 native_safe_apic_wait_icr_idle(void) |
227 | { | 218 | { |
228 | u32 send_status; | 219 | u32 send_status; |
229 | int timeout; | 220 | int timeout; |
@@ -239,13 +230,13 @@ u32 safe_xapic_wait_icr_idle(void) | |||
239 | return send_status; | 230 | return send_status; |
240 | } | 231 | } |
241 | 232 | ||
242 | void xapic_icr_write(u32 low, u32 id) | 233 | void native_apic_icr_write(u32 low, u32 id) |
243 | { | 234 | { |
244 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id)); | 235 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(id)); |
245 | apic_write(APIC_ICR, low); | 236 | apic_write(APIC_ICR, low); |
246 | } | 237 | } |
247 | 238 | ||
248 | static u64 xapic_icr_read(void) | 239 | u64 native_apic_icr_read(void) |
249 | { | 240 | { |
250 | u32 icr1, icr2; | 241 | u32 icr1, icr2; |
251 | 242 | ||
@@ -255,54 +246,6 @@ static u64 xapic_icr_read(void) | |||
255 | return icr1 | ((u64)icr2 << 32); | 246 | return icr1 | ((u64)icr2 << 32); |
256 | } | 247 | } |
257 | 248 | ||
258 | static struct apic_ops xapic_ops = { | ||
259 | .read = native_apic_mem_read, | ||
260 | .write = native_apic_mem_write, | ||
261 | .icr_read = xapic_icr_read, | ||
262 | .icr_write = xapic_icr_write, | ||
263 | .wait_icr_idle = xapic_wait_icr_idle, | ||
264 | .safe_wait_icr_idle = safe_xapic_wait_icr_idle, | ||
265 | }; | ||
266 | |||
267 | struct apic_ops __read_mostly *apic_ops = &xapic_ops; | ||
268 | EXPORT_SYMBOL_GPL(apic_ops); | ||
269 | |||
270 | #ifdef HAVE_X2APIC | ||
271 | static void x2apic_wait_icr_idle(void) | ||
272 | { | ||
273 | /* no need to wait for icr idle in x2apic */ | ||
274 | return; | ||
275 | } | ||
276 | |||
277 | static u32 safe_x2apic_wait_icr_idle(void) | ||
278 | { | ||
279 | /* no need to wait for icr idle in x2apic */ | ||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | void x2apic_icr_write(u32 low, u32 id) | ||
284 | { | ||
285 | wrmsrl(APIC_BASE_MSR + (APIC_ICR >> 4), ((__u64) id) << 32 | low); | ||
286 | } | ||
287 | |||
288 | static u64 x2apic_icr_read(void) | ||
289 | { | ||
290 | unsigned long val; | ||
291 | |||
292 | rdmsrl(APIC_BASE_MSR + (APIC_ICR >> 4), val); | ||
293 | return val; | ||
294 | } | ||
295 | |||
296 | static struct apic_ops x2apic_ops = { | ||
297 | .read = native_apic_msr_read, | ||
298 | .write = native_apic_msr_write, | ||
299 | .icr_read = x2apic_icr_read, | ||
300 | .icr_write = x2apic_icr_write, | ||
301 | .wait_icr_idle = x2apic_wait_icr_idle, | ||
302 | .safe_wait_icr_idle = safe_x2apic_wait_icr_idle, | ||
303 | }; | ||
304 | #endif | ||
305 | |||
306 | /** | 249 | /** |
307 | * enable_NMI_through_LVT0 - enable NMI through local vector table 0 | 250 | * enable_NMI_through_LVT0 - enable NMI through local vector table 0 |
308 | */ | 251 | */ |
@@ -475,7 +418,7 @@ static void lapic_timer_setup(enum clock_event_mode mode, | |||
475 | static void lapic_timer_broadcast(const struct cpumask *mask) | 418 | static void lapic_timer_broadcast(const struct cpumask *mask) |
476 | { | 419 | { |
477 | #ifdef CONFIG_SMP | 420 | #ifdef CONFIG_SMP |
478 | send_IPI_mask(mask, LOCAL_TIMER_VECTOR); | 421 | apic->send_IPI_mask(mask, LOCAL_TIMER_VECTOR); |
479 | #endif | 422 | #endif |
480 | } | 423 | } |
481 | 424 | ||
@@ -553,7 +496,8 @@ static void __init lapic_cal_handler(struct clock_event_device *dev) | |||
553 | } | 496 | } |
554 | } | 497 | } |
555 | 498 | ||
556 | static int __init calibrate_by_pmtimer(long deltapm, long *delta) | 499 | static int __init |
500 | calibrate_by_pmtimer(long deltapm, long *delta, long *deltatsc) | ||
557 | { | 501 | { |
558 | const long pm_100ms = PMTMR_TICKS_PER_SEC / 10; | 502 | const long pm_100ms = PMTMR_TICKS_PER_SEC / 10; |
559 | const long pm_thresh = pm_100ms / 100; | 503 | const long pm_thresh = pm_100ms / 100; |
@@ -564,7 +508,7 @@ static int __init calibrate_by_pmtimer(long deltapm, long *delta) | |||
564 | return -1; | 508 | return -1; |
565 | #endif | 509 | #endif |
566 | 510 | ||
567 | apic_printk(APIC_VERBOSE, "... PM timer delta = %ld\n", deltapm); | 511 | apic_printk(APIC_VERBOSE, "... PM-Timer delta = %ld\n", deltapm); |
568 | 512 | ||
569 | /* Check, if the PM timer is available */ | 513 | /* Check, if the PM timer is available */ |
570 | if (!deltapm) | 514 | if (!deltapm) |
@@ -574,19 +518,30 @@ static int __init calibrate_by_pmtimer(long deltapm, long *delta) | |||
574 | 518 | ||
575 | if (deltapm > (pm_100ms - pm_thresh) && | 519 | if (deltapm > (pm_100ms - pm_thresh) && |
576 | deltapm < (pm_100ms + pm_thresh)) { | 520 | deltapm < (pm_100ms + pm_thresh)) { |
577 | apic_printk(APIC_VERBOSE, "... PM timer result ok\n"); | 521 | apic_printk(APIC_VERBOSE, "... PM-Timer result ok\n"); |
578 | } else { | 522 | return 0; |
579 | res = (((u64)deltapm) * mult) >> 22; | 523 | } |
580 | do_div(res, 1000000); | 524 | |
581 | pr_warning("APIC calibration not consistent " | 525 | res = (((u64)deltapm) * mult) >> 22; |
582 | "with PM Timer: %ldms instead of 100ms\n", | 526 | do_div(res, 1000000); |
583 | (long)res); | 527 | pr_warning("APIC calibration not consistent " |
584 | /* Correct the lapic counter value */ | 528 | "with PM-Timer: %ldms instead of 100ms\n",(long)res); |
585 | res = (((u64)(*delta)) * pm_100ms); | 529 | |
530 | /* Correct the lapic counter value */ | ||
531 | res = (((u64)(*delta)) * pm_100ms); | ||
532 | do_div(res, deltapm); | ||
533 | pr_info("APIC delta adjusted to PM-Timer: " | ||
534 | "%lu (%ld)\n", (unsigned long)res, *delta); | ||
535 | *delta = (long)res; | ||
536 | |||
537 | /* Correct the tsc counter value */ | ||
538 | if (cpu_has_tsc) { | ||
539 | res = (((u64)(*deltatsc)) * pm_100ms); | ||
586 | do_div(res, deltapm); | 540 | do_div(res, deltapm); |
587 | pr_info("APIC delta adjusted to PM-Timer: " | 541 | apic_printk(APIC_VERBOSE, "TSC delta adjusted to " |
588 | "%lu (%ld)\n", (unsigned long)res, *delta); | 542 | "PM-Timer: %lu (%ld) \n", |
589 | *delta = (long)res; | 543 | (unsigned long)res, *deltatsc); |
544 | *deltatsc = (long)res; | ||
590 | } | 545 | } |
591 | 546 | ||
592 | return 0; | 547 | return 0; |
@@ -597,7 +552,7 @@ static int __init calibrate_APIC_clock(void) | |||
597 | struct clock_event_device *levt = &__get_cpu_var(lapic_events); | 552 | struct clock_event_device *levt = &__get_cpu_var(lapic_events); |
598 | void (*real_handler)(struct clock_event_device *dev); | 553 | void (*real_handler)(struct clock_event_device *dev); |
599 | unsigned long deltaj; | 554 | unsigned long deltaj; |
600 | long delta; | 555 | long delta, deltatsc; |
601 | int pm_referenced = 0; | 556 | int pm_referenced = 0; |
602 | 557 | ||
603 | local_irq_disable(); | 558 | local_irq_disable(); |
@@ -627,9 +582,11 @@ static int __init calibrate_APIC_clock(void) | |||
627 | delta = lapic_cal_t1 - lapic_cal_t2; | 582 | delta = lapic_cal_t1 - lapic_cal_t2; |
628 | apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta); | 583 | apic_printk(APIC_VERBOSE, "... lapic delta = %ld\n", delta); |
629 | 584 | ||
585 | deltatsc = (long)(lapic_cal_tsc2 - lapic_cal_tsc1); | ||
586 | |||
630 | /* we trust the PM based calibration if possible */ | 587 | /* we trust the PM based calibration if possible */ |
631 | pm_referenced = !calibrate_by_pmtimer(lapic_cal_pm2 - lapic_cal_pm1, | 588 | pm_referenced = !calibrate_by_pmtimer(lapic_cal_pm2 - lapic_cal_pm1, |
632 | &delta); | 589 | &delta, &deltatsc); |
633 | 590 | ||
634 | /* Calculate the scaled math multiplication factor */ | 591 | /* Calculate the scaled math multiplication factor */ |
635 | lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS, | 592 | lapic_clockevent.mult = div_sc(delta, TICK_NSEC * LAPIC_CAL_LOOPS, |
@@ -647,11 +604,10 @@ static int __init calibrate_APIC_clock(void) | |||
647 | calibration_result); | 604 | calibration_result); |
648 | 605 | ||
649 | if (cpu_has_tsc) { | 606 | if (cpu_has_tsc) { |
650 | delta = (long)(lapic_cal_tsc2 - lapic_cal_tsc1); | ||
651 | apic_printk(APIC_VERBOSE, "..... CPU clock speed is " | 607 | apic_printk(APIC_VERBOSE, "..... CPU clock speed is " |
652 | "%ld.%04ld MHz.\n", | 608 | "%ld.%04ld MHz.\n", |
653 | (delta / LAPIC_CAL_LOOPS) / (1000000 / HZ), | 609 | (deltatsc / LAPIC_CAL_LOOPS) / (1000000 / HZ), |
654 | (delta / LAPIC_CAL_LOOPS) % (1000000 / HZ)); | 610 | (deltatsc / LAPIC_CAL_LOOPS) % (1000000 / HZ)); |
655 | } | 611 | } |
656 | 612 | ||
657 | apic_printk(APIC_VERBOSE, "..... host bus clock speed is " | 613 | apic_printk(APIC_VERBOSE, "..... host bus clock speed is " |
@@ -880,7 +836,7 @@ void clear_local_APIC(void) | |||
880 | } | 836 | } |
881 | 837 | ||
882 | /* lets not touch this if we didn't frob it */ | 838 | /* lets not touch this if we didn't frob it */ |
883 | #if defined(CONFIG_X86_MCE_P4THERMAL) || defined(X86_MCE_INTEL) | 839 | #if defined(CONFIG_X86_MCE_P4THERMAL) || defined(CONFIG_X86_MCE_INTEL) |
884 | if (maxlvt >= 5) { | 840 | if (maxlvt >= 5) { |
885 | v = apic_read(APIC_LVTTHMR); | 841 | v = apic_read(APIC_LVTTHMR); |
886 | apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED); | 842 | apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED); |
@@ -1009,11 +965,11 @@ int __init verify_local_APIC(void) | |||
1009 | */ | 965 | */ |
1010 | reg0 = apic_read(APIC_ID); | 966 | reg0 = apic_read(APIC_ID); |
1011 | apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0); | 967 | apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg0); |
1012 | apic_write(APIC_ID, reg0 ^ APIC_ID_MASK); | 968 | apic_write(APIC_ID, reg0 ^ apic->apic_id_mask); |
1013 | reg1 = apic_read(APIC_ID); | 969 | reg1 = apic_read(APIC_ID); |
1014 | apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1); | 970 | apic_printk(APIC_DEBUG, "Getting ID: %x\n", reg1); |
1015 | apic_write(APIC_ID, reg0); | 971 | apic_write(APIC_ID, reg0); |
1016 | if (reg1 != (reg0 ^ APIC_ID_MASK)) | 972 | if (reg1 != (reg0 ^ apic->apic_id_mask)) |
1017 | return 0; | 973 | return 0; |
1018 | 974 | ||
1019 | /* | 975 | /* |
@@ -1107,7 +1063,7 @@ static void __cpuinit lapic_setup_esr(void) | |||
1107 | return; | 1063 | return; |
1108 | } | 1064 | } |
1109 | 1065 | ||
1110 | if (esr_disable) { | 1066 | if (apic->disable_esr) { |
1111 | /* | 1067 | /* |
1112 | * Something untraceable is creating bad interrupts on | 1068 | * Something untraceable is creating bad interrupts on |
1113 | * secondary quads ... for the moment, just leave the | 1069 | * secondary quads ... for the moment, just leave the |
@@ -1149,15 +1105,13 @@ void __cpuinit setup_local_APIC(void) | |||
1149 | int i, j; | 1105 | int i, j; |
1150 | 1106 | ||
1151 | if (disable_apic) { | 1107 | if (disable_apic) { |
1152 | #ifdef CONFIG_X86_IO_APIC | 1108 | arch_disable_smp_support(); |
1153 | disable_ioapic_setup(); | ||
1154 | #endif | ||
1155 | return; | 1109 | return; |
1156 | } | 1110 | } |
1157 | 1111 | ||
1158 | #ifdef CONFIG_X86_32 | 1112 | #ifdef CONFIG_X86_32 |
1159 | /* Pound the ESR really hard over the head with a big hammer - mbligh */ | 1113 | /* Pound the ESR really hard over the head with a big hammer - mbligh */ |
1160 | if (lapic_is_integrated() && esr_disable) { | 1114 | if (lapic_is_integrated() && apic->disable_esr) { |
1161 | apic_write(APIC_ESR, 0); | 1115 | apic_write(APIC_ESR, 0); |
1162 | apic_write(APIC_ESR, 0); | 1116 | apic_write(APIC_ESR, 0); |
1163 | apic_write(APIC_ESR, 0); | 1117 | apic_write(APIC_ESR, 0); |
@@ -1171,7 +1125,7 @@ void __cpuinit setup_local_APIC(void) | |||
1171 | * Double-check whether this APIC is really registered. | 1125 | * Double-check whether this APIC is really registered. |
1172 | * This is meaningless in clustered apic mode, so we skip it. | 1126 | * This is meaningless in clustered apic mode, so we skip it. |
1173 | */ | 1127 | */ |
1174 | if (!apic_id_registered()) | 1128 | if (!apic->apic_id_registered()) |
1175 | BUG(); | 1129 | BUG(); |
1176 | 1130 | ||
1177 | /* | 1131 | /* |
@@ -1179,7 +1133,7 @@ void __cpuinit setup_local_APIC(void) | |||
1179 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | 1133 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel |
1180 | * document number 292116). So here it goes... | 1134 | * document number 292116). So here it goes... |
1181 | */ | 1135 | */ |
1182 | init_apic_ldr(); | 1136 | apic->init_apic_ldr(); |
1183 | 1137 | ||
1184 | /* | 1138 | /* |
1185 | * Set Task Priority to 'accept all'. We never change this | 1139 | * Set Task Priority to 'accept all'. We never change this |
@@ -1307,17 +1261,12 @@ void __cpuinit end_local_APIC_setup(void) | |||
1307 | apic_pm_activate(); | 1261 | apic_pm_activate(); |
1308 | } | 1262 | } |
1309 | 1263 | ||
1310 | #ifdef HAVE_X2APIC | 1264 | #ifdef CONFIG_X86_X2APIC |
1311 | void check_x2apic(void) | 1265 | void check_x2apic(void) |
1312 | { | 1266 | { |
1313 | int msr, msr2; | 1267 | if (x2apic_enabled()) { |
1314 | |||
1315 | rdmsr(MSR_IA32_APICBASE, msr, msr2); | ||
1316 | |||
1317 | if (msr & X2APIC_ENABLE) { | ||
1318 | pr_info("x2apic enabled by BIOS, switching to x2apic ops\n"); | 1268 | pr_info("x2apic enabled by BIOS, switching to x2apic ops\n"); |
1319 | x2apic_preenabled = x2apic = 1; | 1269 | x2apic_preenabled = x2apic = 1; |
1320 | apic_ops = &x2apic_ops; | ||
1321 | } | 1270 | } |
1322 | } | 1271 | } |
1323 | 1272 | ||
@@ -1325,6 +1274,9 @@ void enable_x2apic(void) | |||
1325 | { | 1274 | { |
1326 | int msr, msr2; | 1275 | int msr, msr2; |
1327 | 1276 | ||
1277 | if (!x2apic) | ||
1278 | return; | ||
1279 | |||
1328 | rdmsr(MSR_IA32_APICBASE, msr, msr2); | 1280 | rdmsr(MSR_IA32_APICBASE, msr, msr2); |
1329 | if (!(msr & X2APIC_ENABLE)) { | 1281 | if (!(msr & X2APIC_ENABLE)) { |
1330 | pr_info("Enabling x2apic\n"); | 1282 | pr_info("Enabling x2apic\n"); |
@@ -1388,7 +1340,6 @@ void __init enable_IR_x2apic(void) | |||
1388 | 1340 | ||
1389 | if (!x2apic) { | 1341 | if (!x2apic) { |
1390 | x2apic = 1; | 1342 | x2apic = 1; |
1391 | apic_ops = &x2apic_ops; | ||
1392 | enable_x2apic(); | 1343 | enable_x2apic(); |
1393 | } | 1344 | } |
1394 | 1345 | ||
@@ -1426,7 +1377,7 @@ end: | |||
1426 | 1377 | ||
1427 | return; | 1378 | return; |
1428 | } | 1379 | } |
1429 | #endif /* HAVE_X2APIC */ | 1380 | #endif /* CONFIG_X86_X2APIC */ |
1430 | 1381 | ||
1431 | #ifdef CONFIG_X86_64 | 1382 | #ifdef CONFIG_X86_64 |
1432 | /* | 1383 | /* |
@@ -1557,7 +1508,7 @@ void __init early_init_lapic_mapping(void) | |||
1557 | */ | 1508 | */ |
1558 | void __init init_apic_mappings(void) | 1509 | void __init init_apic_mappings(void) |
1559 | { | 1510 | { |
1560 | #ifdef HAVE_X2APIC | 1511 | #ifdef CONFIG_X86_X2APIC |
1561 | if (x2apic) { | 1512 | if (x2apic) { |
1562 | boot_cpu_physical_apicid = read_apic_id(); | 1513 | boot_cpu_physical_apicid = read_apic_id(); |
1563 | return; | 1514 | return; |
@@ -1621,11 +1572,9 @@ int __init APIC_init_uniprocessor(void) | |||
1621 | } | 1572 | } |
1622 | #endif | 1573 | #endif |
1623 | 1574 | ||
1624 | #ifdef HAVE_X2APIC | ||
1625 | enable_IR_x2apic(); | 1575 | enable_IR_x2apic(); |
1626 | #endif | ||
1627 | #ifdef CONFIG_X86_64 | 1576 | #ifdef CONFIG_X86_64 |
1628 | setup_apic_routing(); | 1577 | default_setup_apic_routing(); |
1629 | #endif | 1578 | #endif |
1630 | 1579 | ||
1631 | verify_local_APIC(); | 1580 | verify_local_APIC(); |
@@ -1646,35 +1595,31 @@ int __init APIC_init_uniprocessor(void) | |||
1646 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); | 1595 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); |
1647 | setup_local_APIC(); | 1596 | setup_local_APIC(); |
1648 | 1597 | ||
1649 | #ifdef CONFIG_X86_64 | 1598 | #ifdef CONFIG_X86_IO_APIC |
1650 | /* | 1599 | /* |
1651 | * Now enable IO-APICs, actually call clear_IO_APIC | 1600 | * Now enable IO-APICs, actually call clear_IO_APIC |
1652 | * We need clear_IO_APIC before enabling vector on BP | 1601 | * We need clear_IO_APIC before enabling error vector |
1653 | */ | 1602 | */ |
1654 | if (!skip_ioapic_setup && nr_ioapics) | 1603 | if (!skip_ioapic_setup && nr_ioapics) |
1655 | enable_IO_APIC(); | 1604 | enable_IO_APIC(); |
1656 | #endif | 1605 | #endif |
1657 | 1606 | ||
1658 | #ifdef CONFIG_X86_IO_APIC | ||
1659 | if (!smp_found_config || skip_ioapic_setup || !nr_ioapics) | ||
1660 | #endif | ||
1661 | localise_nmi_watchdog(); | ||
1662 | end_local_APIC_setup(); | 1607 | end_local_APIC_setup(); |
1663 | 1608 | ||
1664 | #ifdef CONFIG_X86_IO_APIC | 1609 | #ifdef CONFIG_X86_IO_APIC |
1665 | if (smp_found_config && !skip_ioapic_setup && nr_ioapics) | 1610 | if (smp_found_config && !skip_ioapic_setup && nr_ioapics) |
1666 | setup_IO_APIC(); | 1611 | setup_IO_APIC(); |
1667 | # ifdef CONFIG_X86_64 | 1612 | else { |
1668 | else | ||
1669 | nr_ioapics = 0; | 1613 | nr_ioapics = 0; |
1670 | # endif | 1614 | localise_nmi_watchdog(); |
1615 | } | ||
1616 | #else | ||
1617 | localise_nmi_watchdog(); | ||
1671 | #endif | 1618 | #endif |
1672 | 1619 | ||
1620 | setup_boot_clock(); | ||
1673 | #ifdef CONFIG_X86_64 | 1621 | #ifdef CONFIG_X86_64 |
1674 | setup_boot_APIC_clock(); | ||
1675 | check_nmi_watchdog(); | 1622 | check_nmi_watchdog(); |
1676 | #else | ||
1677 | setup_boot_clock(); | ||
1678 | #endif | 1623 | #endif |
1679 | 1624 | ||
1680 | return 0; | 1625 | return 0; |
@@ -1763,7 +1708,8 @@ void __init connect_bsp_APIC(void) | |||
1763 | outb(0x01, 0x23); | 1708 | outb(0x01, 0x23); |
1764 | } | 1709 | } |
1765 | #endif | 1710 | #endif |
1766 | enable_apic_mode(); | 1711 | if (apic->enable_apic_mode) |
1712 | apic->enable_apic_mode(); | ||
1767 | } | 1713 | } |
1768 | 1714 | ||
1769 | /** | 1715 | /** |
@@ -1901,7 +1847,7 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
1901 | } | 1847 | } |
1902 | #endif | 1848 | #endif |
1903 | 1849 | ||
1904 | #if defined(CONFIG_X86_SMP) || defined(CONFIG_X86_64) | 1850 | #if defined(CONFIG_SMP) || defined(CONFIG_X86_64) |
1905 | early_per_cpu(x86_cpu_to_apicid, cpu) = apicid; | 1851 | early_per_cpu(x86_cpu_to_apicid, cpu) = apicid; |
1906 | early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid; | 1852 | early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid; |
1907 | #endif | 1853 | #endif |
@@ -1910,11 +1856,30 @@ void __cpuinit generic_processor_info(int apicid, int version) | |||
1910 | set_cpu_present(cpu, true); | 1856 | set_cpu_present(cpu, true); |
1911 | } | 1857 | } |
1912 | 1858 | ||
1913 | #ifdef CONFIG_X86_64 | ||
1914 | int hard_smp_processor_id(void) | 1859 | int hard_smp_processor_id(void) |
1915 | { | 1860 | { |
1916 | return read_apic_id(); | 1861 | return read_apic_id(); |
1917 | } | 1862 | } |
1863 | |||
1864 | void default_init_apic_ldr(void) | ||
1865 | { | ||
1866 | unsigned long val; | ||
1867 | |||
1868 | apic_write(APIC_DFR, APIC_DFR_VALUE); | ||
1869 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
1870 | val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id()); | ||
1871 | apic_write(APIC_LDR, val); | ||
1872 | } | ||
1873 | |||
1874 | #ifdef CONFIG_X86_32 | ||
1875 | int default_apicid_to_node(int logical_apicid) | ||
1876 | { | ||
1877 | #ifdef CONFIG_SMP | ||
1878 | return apicid_2_node[hard_smp_processor_id()]; | ||
1879 | #else | ||
1880 | return 0; | ||
1881 | #endif | ||
1882 | } | ||
1918 | #endif | 1883 | #endif |
1919 | 1884 | ||
1920 | /* | 1885 | /* |
@@ -1992,7 +1957,7 @@ static int lapic_resume(struct sys_device *dev) | |||
1992 | 1957 | ||
1993 | local_irq_save(flags); | 1958 | local_irq_save(flags); |
1994 | 1959 | ||
1995 | #ifdef HAVE_X2APIC | 1960 | #ifdef CONFIG_X86_X2APIC |
1996 | if (x2apic) | 1961 | if (x2apic) |
1997 | enable_x2apic(); | 1962 | enable_x2apic(); |
1998 | else | 1963 | else |
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c index 34185488e4fb..3b002995e145 100644 --- a/arch/x86/kernel/genapic_flat_64.c +++ b/arch/x86/kernel/apic/apic_flat_64.c | |||
@@ -17,9 +17,8 @@ | |||
17 | #include <linux/init.h> | 17 | #include <linux/init.h> |
18 | #include <linux/hardirq.h> | 18 | #include <linux/hardirq.h> |
19 | #include <asm/smp.h> | 19 | #include <asm/smp.h> |
20 | #include <asm/apic.h> | ||
20 | #include <asm/ipi.h> | 21 | #include <asm/ipi.h> |
21 | #include <asm/genapic.h> | ||
22 | #include <mach_apicdef.h> | ||
23 | 22 | ||
24 | #ifdef CONFIG_ACPI | 23 | #ifdef CONFIG_ACPI |
25 | #include <acpi/acpi_bus.h> | 24 | #include <acpi/acpi_bus.h> |
@@ -74,7 +73,7 @@ static inline void _flat_send_IPI_mask(unsigned long mask, int vector) | |||
74 | unsigned long flags; | 73 | unsigned long flags; |
75 | 74 | ||
76 | local_irq_save(flags); | 75 | local_irq_save(flags); |
77 | __send_IPI_dest_field(mask, vector, APIC_DEST_LOGICAL); | 76 | __default_send_IPI_dest_field(mask, vector, apic->dest_logical); |
78 | local_irq_restore(flags); | 77 | local_irq_restore(flags); |
79 | } | 78 | } |
80 | 79 | ||
@@ -85,14 +84,15 @@ static void flat_send_IPI_mask(const struct cpumask *cpumask, int vector) | |||
85 | _flat_send_IPI_mask(mask, vector); | 84 | _flat_send_IPI_mask(mask, vector); |
86 | } | 85 | } |
87 | 86 | ||
88 | static void flat_send_IPI_mask_allbutself(const struct cpumask *cpumask, | 87 | static void |
89 | int vector) | 88 | flat_send_IPI_mask_allbutself(const struct cpumask *cpumask, int vector) |
90 | { | 89 | { |
91 | unsigned long mask = cpumask_bits(cpumask)[0]; | 90 | unsigned long mask = cpumask_bits(cpumask)[0]; |
92 | int cpu = smp_processor_id(); | 91 | int cpu = smp_processor_id(); |
93 | 92 | ||
94 | if (cpu < BITS_PER_LONG) | 93 | if (cpu < BITS_PER_LONG) |
95 | clear_bit(cpu, &mask); | 94 | clear_bit(cpu, &mask); |
95 | |||
96 | _flat_send_IPI_mask(mask, vector); | 96 | _flat_send_IPI_mask(mask, vector); |
97 | } | 97 | } |
98 | 98 | ||
@@ -114,23 +114,27 @@ static void flat_send_IPI_allbutself(int vector) | |||
114 | _flat_send_IPI_mask(mask, vector); | 114 | _flat_send_IPI_mask(mask, vector); |
115 | } | 115 | } |
116 | } else if (num_online_cpus() > 1) { | 116 | } else if (num_online_cpus() > 1) { |
117 | __send_IPI_shortcut(APIC_DEST_ALLBUT, vector,APIC_DEST_LOGICAL); | 117 | __default_send_IPI_shortcut(APIC_DEST_ALLBUT, |
118 | vector, apic->dest_logical); | ||
118 | } | 119 | } |
119 | } | 120 | } |
120 | 121 | ||
121 | static void flat_send_IPI_all(int vector) | 122 | static void flat_send_IPI_all(int vector) |
122 | { | 123 | { |
123 | if (vector == NMI_VECTOR) | 124 | if (vector == NMI_VECTOR) { |
124 | flat_send_IPI_mask(cpu_online_mask, vector); | 125 | flat_send_IPI_mask(cpu_online_mask, vector); |
125 | else | 126 | } else { |
126 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL); | 127 | __default_send_IPI_shortcut(APIC_DEST_ALLINC, |
128 | vector, apic->dest_logical); | ||
129 | } | ||
127 | } | 130 | } |
128 | 131 | ||
129 | static unsigned int get_apic_id(unsigned long x) | 132 | static unsigned int flat_get_apic_id(unsigned long x) |
130 | { | 133 | { |
131 | unsigned int id; | 134 | unsigned int id; |
132 | 135 | ||
133 | id = (((x)>>24) & 0xFFu); | 136 | id = (((x)>>24) & 0xFFu); |
137 | |||
134 | return id; | 138 | return id; |
135 | } | 139 | } |
136 | 140 | ||
@@ -146,7 +150,7 @@ static unsigned int read_xapic_id(void) | |||
146 | { | 150 | { |
147 | unsigned int id; | 151 | unsigned int id; |
148 | 152 | ||
149 | id = get_apic_id(apic_read(APIC_ID)); | 153 | id = flat_get_apic_id(apic_read(APIC_ID)); |
150 | return id; | 154 | return id; |
151 | } | 155 | } |
152 | 156 | ||
@@ -169,31 +173,68 @@ static unsigned int flat_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
169 | return mask1 & mask2; | 173 | return mask1 & mask2; |
170 | } | 174 | } |
171 | 175 | ||
172 | static unsigned int phys_pkg_id(int index_msb) | 176 | static int flat_phys_pkg_id(int initial_apic_id, int index_msb) |
173 | { | 177 | { |
174 | return hard_smp_processor_id() >> index_msb; | 178 | return hard_smp_processor_id() >> index_msb; |
175 | } | 179 | } |
176 | 180 | ||
177 | struct genapic apic_flat = { | 181 | struct apic apic_flat = { |
178 | .name = "flat", | 182 | .name = "flat", |
179 | .acpi_madt_oem_check = flat_acpi_madt_oem_check, | 183 | .probe = NULL, |
180 | .int_delivery_mode = dest_LowestPrio, | 184 | .acpi_madt_oem_check = flat_acpi_madt_oem_check, |
181 | .int_dest_mode = (APIC_DEST_LOGICAL != 0), | 185 | .apic_id_registered = flat_apic_id_registered, |
182 | .target_cpus = flat_target_cpus, | 186 | |
183 | .vector_allocation_domain = flat_vector_allocation_domain, | 187 | .irq_delivery_mode = dest_LowestPrio, |
184 | .apic_id_registered = flat_apic_id_registered, | 188 | .irq_dest_mode = 1, /* logical */ |
185 | .init_apic_ldr = flat_init_apic_ldr, | 189 | |
186 | .send_IPI_all = flat_send_IPI_all, | 190 | .target_cpus = flat_target_cpus, |
187 | .send_IPI_allbutself = flat_send_IPI_allbutself, | 191 | .disable_esr = 0, |
188 | .send_IPI_mask = flat_send_IPI_mask, | 192 | .dest_logical = APIC_DEST_LOGICAL, |
189 | .send_IPI_mask_allbutself = flat_send_IPI_mask_allbutself, | 193 | .check_apicid_used = NULL, |
190 | .send_IPI_self = apic_send_IPI_self, | 194 | .check_apicid_present = NULL, |
191 | .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, | 195 | |
192 | .cpu_mask_to_apicid_and = flat_cpu_mask_to_apicid_and, | 196 | .vector_allocation_domain = flat_vector_allocation_domain, |
193 | .phys_pkg_id = phys_pkg_id, | 197 | .init_apic_ldr = flat_init_apic_ldr, |
194 | .get_apic_id = get_apic_id, | 198 | |
195 | .set_apic_id = set_apic_id, | 199 | .ioapic_phys_id_map = NULL, |
196 | .apic_id_mask = (0xFFu<<24), | 200 | .setup_apic_routing = NULL, |
201 | .multi_timer_check = NULL, | ||
202 | .apicid_to_node = NULL, | ||
203 | .cpu_to_logical_apicid = NULL, | ||
204 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | ||
205 | .apicid_to_cpu_present = NULL, | ||
206 | .setup_portio_remap = NULL, | ||
207 | .check_phys_apicid_present = default_check_phys_apicid_present, | ||
208 | .enable_apic_mode = NULL, | ||
209 | .phys_pkg_id = flat_phys_pkg_id, | ||
210 | .mps_oem_check = NULL, | ||
211 | |||
212 | .get_apic_id = flat_get_apic_id, | ||
213 | .set_apic_id = set_apic_id, | ||
214 | .apic_id_mask = 0xFFu << 24, | ||
215 | |||
216 | .cpu_mask_to_apicid = flat_cpu_mask_to_apicid, | ||
217 | .cpu_mask_to_apicid_and = flat_cpu_mask_to_apicid_and, | ||
218 | |||
219 | .send_IPI_mask = flat_send_IPI_mask, | ||
220 | .send_IPI_mask_allbutself = flat_send_IPI_mask_allbutself, | ||
221 | .send_IPI_allbutself = flat_send_IPI_allbutself, | ||
222 | .send_IPI_all = flat_send_IPI_all, | ||
223 | .send_IPI_self = apic_send_IPI_self, | ||
224 | |||
225 | .wakeup_cpu = NULL, | ||
226 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
227 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
228 | .wait_for_init_deassert = NULL, | ||
229 | .smp_callin_clear_local_apic = NULL, | ||
230 | .inquire_remote_apic = NULL, | ||
231 | |||
232 | .read = native_apic_mem_read, | ||
233 | .write = native_apic_mem_write, | ||
234 | .icr_read = native_apic_icr_read, | ||
235 | .icr_write = native_apic_icr_write, | ||
236 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
237 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
197 | }; | 238 | }; |
198 | 239 | ||
199 | /* | 240 | /* |
@@ -232,18 +273,18 @@ static void physflat_vector_allocation_domain(int cpu, struct cpumask *retmask) | |||
232 | 273 | ||
233 | static void physflat_send_IPI_mask(const struct cpumask *cpumask, int vector) | 274 | static void physflat_send_IPI_mask(const struct cpumask *cpumask, int vector) |
234 | { | 275 | { |
235 | send_IPI_mask_sequence(cpumask, vector); | 276 | default_send_IPI_mask_sequence_phys(cpumask, vector); |
236 | } | 277 | } |
237 | 278 | ||
238 | static void physflat_send_IPI_mask_allbutself(const struct cpumask *cpumask, | 279 | static void physflat_send_IPI_mask_allbutself(const struct cpumask *cpumask, |
239 | int vector) | 280 | int vector) |
240 | { | 281 | { |
241 | send_IPI_mask_allbutself(cpumask, vector); | 282 | default_send_IPI_mask_allbutself_phys(cpumask, vector); |
242 | } | 283 | } |
243 | 284 | ||
244 | static void physflat_send_IPI_allbutself(int vector) | 285 | static void physflat_send_IPI_allbutself(int vector) |
245 | { | 286 | { |
246 | send_IPI_mask_allbutself(cpu_online_mask, vector); | 287 | default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector); |
247 | } | 288 | } |
248 | 289 | ||
249 | static void physflat_send_IPI_all(int vector) | 290 | static void physflat_send_IPI_all(int vector) |
@@ -276,32 +317,73 @@ physflat_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
276 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 317 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
277 | * May as well be the first. | 318 | * May as well be the first. |
278 | */ | 319 | */ |
279 | for_each_cpu_and(cpu, cpumask, andmask) | 320 | for_each_cpu_and(cpu, cpumask, andmask) { |
280 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | 321 | if (cpumask_test_cpu(cpu, cpu_online_mask)) |
281 | break; | 322 | break; |
323 | } | ||
282 | if (cpu < nr_cpu_ids) | 324 | if (cpu < nr_cpu_ids) |
283 | return per_cpu(x86_cpu_to_apicid, cpu); | 325 | return per_cpu(x86_cpu_to_apicid, cpu); |
326 | |||
284 | return BAD_APICID; | 327 | return BAD_APICID; |
285 | } | 328 | } |
286 | 329 | ||
287 | struct genapic apic_physflat = { | 330 | struct apic apic_physflat = { |
288 | .name = "physical flat", | 331 | |
289 | .acpi_madt_oem_check = physflat_acpi_madt_oem_check, | 332 | .name = "physical flat", |
290 | .int_delivery_mode = dest_Fixed, | 333 | .probe = NULL, |
291 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), | 334 | .acpi_madt_oem_check = physflat_acpi_madt_oem_check, |
292 | .target_cpus = physflat_target_cpus, | 335 | .apic_id_registered = flat_apic_id_registered, |
293 | .vector_allocation_domain = physflat_vector_allocation_domain, | 336 | |
294 | .apic_id_registered = flat_apic_id_registered, | 337 | .irq_delivery_mode = dest_Fixed, |
295 | .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/ | 338 | .irq_dest_mode = 0, /* physical */ |
296 | .send_IPI_all = physflat_send_IPI_all, | 339 | |
297 | .send_IPI_allbutself = physflat_send_IPI_allbutself, | 340 | .target_cpus = physflat_target_cpus, |
298 | .send_IPI_mask = physflat_send_IPI_mask, | 341 | .disable_esr = 0, |
299 | .send_IPI_mask_allbutself = physflat_send_IPI_mask_allbutself, | 342 | .dest_logical = 0, |
300 | .send_IPI_self = apic_send_IPI_self, | 343 | .check_apicid_used = NULL, |
301 | .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid, | 344 | .check_apicid_present = NULL, |
302 | .cpu_mask_to_apicid_and = physflat_cpu_mask_to_apicid_and, | 345 | |
303 | .phys_pkg_id = phys_pkg_id, | 346 | .vector_allocation_domain = physflat_vector_allocation_domain, |
304 | .get_apic_id = get_apic_id, | 347 | /* not needed, but shouldn't hurt: */ |
305 | .set_apic_id = set_apic_id, | 348 | .init_apic_ldr = flat_init_apic_ldr, |
306 | .apic_id_mask = (0xFFu<<24), | 349 | |
350 | .ioapic_phys_id_map = NULL, | ||
351 | .setup_apic_routing = NULL, | ||
352 | .multi_timer_check = NULL, | ||
353 | .apicid_to_node = NULL, | ||
354 | .cpu_to_logical_apicid = NULL, | ||
355 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | ||
356 | .apicid_to_cpu_present = NULL, | ||
357 | .setup_portio_remap = NULL, | ||
358 | .check_phys_apicid_present = default_check_phys_apicid_present, | ||
359 | .enable_apic_mode = NULL, | ||
360 | .phys_pkg_id = flat_phys_pkg_id, | ||
361 | .mps_oem_check = NULL, | ||
362 | |||
363 | .get_apic_id = flat_get_apic_id, | ||
364 | .set_apic_id = set_apic_id, | ||
365 | .apic_id_mask = 0xFFu << 24, | ||
366 | |||
367 | .cpu_mask_to_apicid = physflat_cpu_mask_to_apicid, | ||
368 | .cpu_mask_to_apicid_and = physflat_cpu_mask_to_apicid_and, | ||
369 | |||
370 | .send_IPI_mask = physflat_send_IPI_mask, | ||
371 | .send_IPI_mask_allbutself = physflat_send_IPI_mask_allbutself, | ||
372 | .send_IPI_allbutself = physflat_send_IPI_allbutself, | ||
373 | .send_IPI_all = physflat_send_IPI_all, | ||
374 | .send_IPI_self = apic_send_IPI_self, | ||
375 | |||
376 | .wakeup_cpu = NULL, | ||
377 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
378 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
379 | .wait_for_init_deassert = NULL, | ||
380 | .smp_callin_clear_local_apic = NULL, | ||
381 | .inquire_remote_apic = NULL, | ||
382 | |||
383 | .read = native_apic_mem_read, | ||
384 | .write = native_apic_mem_write, | ||
385 | .icr_read = native_apic_icr_read, | ||
386 | .icr_write = native_apic_icr_write, | ||
387 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
388 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
307 | }; | 389 | }; |
diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c new file mode 100644 index 000000000000..0b1093394fdf --- /dev/null +++ b/arch/x86/kernel/apic/bigsmp_32.c | |||
@@ -0,0 +1,274 @@ | |||
1 | /* | ||
2 | * APIC driver for "bigsmp" xAPIC machines with more than 8 virtual CPUs. | ||
3 | * | ||
4 | * Drives the local APIC in "clustered mode". | ||
5 | */ | ||
6 | #include <linux/threads.h> | ||
7 | #include <linux/cpumask.h> | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/init.h> | ||
10 | #include <linux/dmi.h> | ||
11 | #include <linux/smp.h> | ||
12 | |||
13 | #include <asm/apicdef.h> | ||
14 | #include <asm/fixmap.h> | ||
15 | #include <asm/mpspec.h> | ||
16 | #include <asm/apic.h> | ||
17 | #include <asm/ipi.h> | ||
18 | |||
19 | static inline unsigned bigsmp_get_apic_id(unsigned long x) | ||
20 | { | ||
21 | return (x >> 24) & 0xFF; | ||
22 | } | ||
23 | |||
24 | static inline int bigsmp_apic_id_registered(void) | ||
25 | { | ||
26 | return 1; | ||
27 | } | ||
28 | |||
29 | static inline const cpumask_t *bigsmp_target_cpus(void) | ||
30 | { | ||
31 | #ifdef CONFIG_SMP | ||
32 | return &cpu_online_map; | ||
33 | #else | ||
34 | return &cpumask_of_cpu(0); | ||
35 | #endif | ||
36 | } | ||
37 | |||
38 | static inline unsigned long | ||
39 | bigsmp_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | static inline unsigned long bigsmp_check_apicid_present(int bit) | ||
45 | { | ||
46 | return 1; | ||
47 | } | ||
48 | |||
49 | static inline unsigned long calculate_ldr(int cpu) | ||
50 | { | ||
51 | unsigned long val, id; | ||
52 | |||
53 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
54 | id = per_cpu(x86_bios_cpu_apicid, cpu); | ||
55 | val |= SET_APIC_LOGICAL_ID(id); | ||
56 | |||
57 | return val; | ||
58 | } | ||
59 | |||
60 | /* | ||
61 | * Set up the logical destination ID. | ||
62 | * | ||
63 | * Intel recommends to set DFR, LDR and TPR before enabling | ||
64 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
65 | * document number 292116). So here it goes... | ||
66 | */ | ||
67 | static inline void bigsmp_init_apic_ldr(void) | ||
68 | { | ||
69 | unsigned long val; | ||
70 | int cpu = smp_processor_id(); | ||
71 | |||
72 | apic_write(APIC_DFR, APIC_DFR_FLAT); | ||
73 | val = calculate_ldr(cpu); | ||
74 | apic_write(APIC_LDR, val); | ||
75 | } | ||
76 | |||
77 | static inline void bigsmp_setup_apic_routing(void) | ||
78 | { | ||
79 | printk(KERN_INFO | ||
80 | "Enabling APIC mode: Physflat. Using %d I/O APICs\n", | ||
81 | nr_ioapics); | ||
82 | } | ||
83 | |||
84 | static inline int bigsmp_apicid_to_node(int logical_apicid) | ||
85 | { | ||
86 | return apicid_2_node[hard_smp_processor_id()]; | ||
87 | } | ||
88 | |||
89 | static inline int bigsmp_cpu_present_to_apicid(int mps_cpu) | ||
90 | { | ||
91 | if (mps_cpu < nr_cpu_ids) | ||
92 | return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
93 | |||
94 | return BAD_APICID; | ||
95 | } | ||
96 | |||
97 | static inline physid_mask_t bigsmp_apicid_to_cpu_present(int phys_apicid) | ||
98 | { | ||
99 | return physid_mask_of_physid(phys_apicid); | ||
100 | } | ||
101 | |||
102 | /* Mapping from cpu number to logical apicid */ | ||
103 | static inline int bigsmp_cpu_to_logical_apicid(int cpu) | ||
104 | { | ||
105 | if (cpu >= nr_cpu_ids) | ||
106 | return BAD_APICID; | ||
107 | return cpu_physical_id(cpu); | ||
108 | } | ||
109 | |||
110 | static inline physid_mask_t bigsmp_ioapic_phys_id_map(physid_mask_t phys_map) | ||
111 | { | ||
112 | /* For clustered we don't have a good way to do this yet - hack */ | ||
113 | return physids_promote(0xFFL); | ||
114 | } | ||
115 | |||
116 | static inline void bigsmp_setup_portio_remap(void) | ||
117 | { | ||
118 | } | ||
119 | |||
120 | static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
121 | { | ||
122 | return 1; | ||
123 | } | ||
124 | |||
125 | /* As we are using single CPU as destination, pick only one CPU here */ | ||
126 | static inline unsigned int bigsmp_cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
127 | { | ||
128 | return bigsmp_cpu_to_logical_apicid(first_cpu(*cpumask)); | ||
129 | } | ||
130 | |||
131 | static inline unsigned int | ||
132 | bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
133 | const struct cpumask *andmask) | ||
134 | { | ||
135 | int cpu; | ||
136 | |||
137 | /* | ||
138 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | ||
139 | * May as well be the first. | ||
140 | */ | ||
141 | for_each_cpu_and(cpu, cpumask, andmask) { | ||
142 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | ||
143 | break; | ||
144 | } | ||
145 | if (cpu < nr_cpu_ids) | ||
146 | return bigsmp_cpu_to_logical_apicid(cpu); | ||
147 | |||
148 | return BAD_APICID; | ||
149 | } | ||
150 | |||
151 | static inline int bigsmp_phys_pkg_id(int cpuid_apic, int index_msb) | ||
152 | { | ||
153 | return cpuid_apic >> index_msb; | ||
154 | } | ||
155 | |||
156 | static inline void bigsmp_send_IPI_mask(const struct cpumask *mask, int vector) | ||
157 | { | ||
158 | default_send_IPI_mask_sequence_phys(mask, vector); | ||
159 | } | ||
160 | |||
161 | static inline void bigsmp_send_IPI_allbutself(int vector) | ||
162 | { | ||
163 | default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector); | ||
164 | } | ||
165 | |||
166 | static inline void bigsmp_send_IPI_all(int vector) | ||
167 | { | ||
168 | bigsmp_send_IPI_mask(cpu_online_mask, vector); | ||
169 | } | ||
170 | |||
171 | static int dmi_bigsmp; /* can be set by dmi scanners */ | ||
172 | |||
173 | static int hp_ht_bigsmp(const struct dmi_system_id *d) | ||
174 | { | ||
175 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); | ||
176 | dmi_bigsmp = 1; | ||
177 | |||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | |||
182 | static const struct dmi_system_id bigsmp_dmi_table[] = { | ||
183 | { hp_ht_bigsmp, "HP ProLiant DL760 G2", | ||
184 | { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), | ||
185 | DMI_MATCH(DMI_BIOS_VERSION, "P44-"), | ||
186 | } | ||
187 | }, | ||
188 | |||
189 | { hp_ht_bigsmp, "HP ProLiant DL740", | ||
190 | { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), | ||
191 | DMI_MATCH(DMI_BIOS_VERSION, "P47-"), | ||
192 | } | ||
193 | }, | ||
194 | { } /* NULL entry stops DMI scanning */ | ||
195 | }; | ||
196 | |||
197 | static void bigsmp_vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
198 | { | ||
199 | cpus_clear(*retmask); | ||
200 | cpu_set(cpu, *retmask); | ||
201 | } | ||
202 | |||
203 | static int probe_bigsmp(void) | ||
204 | { | ||
205 | if (def_to_bigsmp) | ||
206 | dmi_bigsmp = 1; | ||
207 | else | ||
208 | dmi_check_system(bigsmp_dmi_table); | ||
209 | |||
210 | return dmi_bigsmp; | ||
211 | } | ||
212 | |||
213 | struct apic apic_bigsmp = { | ||
214 | |||
215 | .name = "bigsmp", | ||
216 | .probe = probe_bigsmp, | ||
217 | .acpi_madt_oem_check = NULL, | ||
218 | .apic_id_registered = bigsmp_apic_id_registered, | ||
219 | |||
220 | .irq_delivery_mode = dest_Fixed, | ||
221 | /* phys delivery to target CPU: */ | ||
222 | .irq_dest_mode = 0, | ||
223 | |||
224 | .target_cpus = bigsmp_target_cpus, | ||
225 | .disable_esr = 1, | ||
226 | .dest_logical = 0, | ||
227 | .check_apicid_used = bigsmp_check_apicid_used, | ||
228 | .check_apicid_present = bigsmp_check_apicid_present, | ||
229 | |||
230 | .vector_allocation_domain = bigsmp_vector_allocation_domain, | ||
231 | .init_apic_ldr = bigsmp_init_apic_ldr, | ||
232 | |||
233 | .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map, | ||
234 | .setup_apic_routing = bigsmp_setup_apic_routing, | ||
235 | .multi_timer_check = NULL, | ||
236 | .apicid_to_node = bigsmp_apicid_to_node, | ||
237 | .cpu_to_logical_apicid = bigsmp_cpu_to_logical_apicid, | ||
238 | .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid, | ||
239 | .apicid_to_cpu_present = bigsmp_apicid_to_cpu_present, | ||
240 | .setup_portio_remap = NULL, | ||
241 | .check_phys_apicid_present = bigsmp_check_phys_apicid_present, | ||
242 | .enable_apic_mode = NULL, | ||
243 | .phys_pkg_id = bigsmp_phys_pkg_id, | ||
244 | .mps_oem_check = NULL, | ||
245 | |||
246 | .get_apic_id = bigsmp_get_apic_id, | ||
247 | .set_apic_id = NULL, | ||
248 | .apic_id_mask = 0xFF << 24, | ||
249 | |||
250 | .cpu_mask_to_apicid = bigsmp_cpu_mask_to_apicid, | ||
251 | .cpu_mask_to_apicid_and = bigsmp_cpu_mask_to_apicid_and, | ||
252 | |||
253 | .send_IPI_mask = bigsmp_send_IPI_mask, | ||
254 | .send_IPI_mask_allbutself = NULL, | ||
255 | .send_IPI_allbutself = bigsmp_send_IPI_allbutself, | ||
256 | .send_IPI_all = bigsmp_send_IPI_all, | ||
257 | .send_IPI_self = default_send_IPI_self, | ||
258 | |||
259 | .wakeup_cpu = NULL, | ||
260 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
261 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
262 | |||
263 | .wait_for_init_deassert = default_wait_for_init_deassert, | ||
264 | |||
265 | .smp_callin_clear_local_apic = NULL, | ||
266 | .inquire_remote_apic = default_inquire_remote_apic, | ||
267 | |||
268 | .read = native_apic_mem_read, | ||
269 | .write = native_apic_mem_write, | ||
270 | .icr_read = native_apic_icr_read, | ||
271 | .icr_write = native_apic_icr_write, | ||
272 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
273 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
274 | }; | ||
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c new file mode 100644 index 000000000000..320f2d2e4e54 --- /dev/null +++ b/arch/x86/kernel/apic/es7000_32.c | |||
@@ -0,0 +1,757 @@ | |||
1 | /* | ||
2 | * Written by: Garry Forsgren, Unisys Corporation | ||
3 | * Natalie Protasevich, Unisys Corporation | ||
4 | * | ||
5 | * This file contains the code to configure and interface | ||
6 | * with Unisys ES7000 series hardware system manager. | ||
7 | * | ||
8 | * Copyright (c) 2003 Unisys Corporation. | ||
9 | * Copyright (C) 2009, Red Hat, Inc., Ingo Molnar | ||
10 | * | ||
11 | * All Rights Reserved. | ||
12 | * | ||
13 | * This program is free software; you can redistribute it and/or modify it | ||
14 | * under the terms of version 2 of the GNU General Public License as | ||
15 | * published by the Free Software Foundation. | ||
16 | * | ||
17 | * This program is distributed in the hope that it would be useful, but | ||
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License along | ||
22 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
23 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
24 | * | ||
25 | * Contact information: Unisys Corporation, Township Line & Union Meeting | ||
26 | * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or: | ||
27 | * | ||
28 | * http://www.unisys.com | ||
29 | */ | ||
30 | #include <linux/notifier.h> | ||
31 | #include <linux/spinlock.h> | ||
32 | #include <linux/cpumask.h> | ||
33 | #include <linux/threads.h> | ||
34 | #include <linux/kernel.h> | ||
35 | #include <linux/module.h> | ||
36 | #include <linux/reboot.h> | ||
37 | #include <linux/string.h> | ||
38 | #include <linux/types.h> | ||
39 | #include <linux/errno.h> | ||
40 | #include <linux/acpi.h> | ||
41 | #include <linux/init.h> | ||
42 | #include <linux/nmi.h> | ||
43 | #include <linux/smp.h> | ||
44 | #include <linux/io.h> | ||
45 | |||
46 | #include <asm/apicdef.h> | ||
47 | #include <asm/atomic.h> | ||
48 | #include <asm/fixmap.h> | ||
49 | #include <asm/mpspec.h> | ||
50 | #include <asm/setup.h> | ||
51 | #include <asm/apic.h> | ||
52 | #include <asm/ipi.h> | ||
53 | |||
54 | /* | ||
55 | * ES7000 chipsets | ||
56 | */ | ||
57 | |||
58 | #define NON_UNISYS 0 | ||
59 | #define ES7000_CLASSIC 1 | ||
60 | #define ES7000_ZORRO 2 | ||
61 | |||
62 | #define MIP_REG 1 | ||
63 | #define MIP_PSAI_REG 4 | ||
64 | |||
65 | #define MIP_BUSY 1 | ||
66 | #define MIP_SPIN 0xf0000 | ||
67 | #define MIP_VALID 0x0100000000000000ULL | ||
68 | #define MIP_SW_APIC 0x1020b | ||
69 | |||
70 | #define MIP_PORT(val) ((val >> 32) & 0xffff) | ||
71 | |||
72 | #define MIP_RD_LO(val) (val & 0xffffffff) | ||
73 | |||
74 | struct mip_reg { | ||
75 | unsigned long long off_0x00; | ||
76 | unsigned long long off_0x08; | ||
77 | unsigned long long off_0x10; | ||
78 | unsigned long long off_0x18; | ||
79 | unsigned long long off_0x20; | ||
80 | unsigned long long off_0x28; | ||
81 | unsigned long long off_0x30; | ||
82 | unsigned long long off_0x38; | ||
83 | }; | ||
84 | |||
85 | struct mip_reg_info { | ||
86 | unsigned long long mip_info; | ||
87 | unsigned long long delivery_info; | ||
88 | unsigned long long host_reg; | ||
89 | unsigned long long mip_reg; | ||
90 | }; | ||
91 | |||
92 | struct psai { | ||
93 | unsigned long long entry_type; | ||
94 | unsigned long long addr; | ||
95 | unsigned long long bep_addr; | ||
96 | }; | ||
97 | |||
98 | #ifdef CONFIG_ACPI | ||
99 | |||
100 | struct es7000_oem_table { | ||
101 | struct acpi_table_header Header; | ||
102 | u32 OEMTableAddr; | ||
103 | u32 OEMTableSize; | ||
104 | }; | ||
105 | |||
106 | static unsigned long oem_addrX; | ||
107 | static unsigned long oem_size; | ||
108 | |||
109 | #endif | ||
110 | |||
111 | /* | ||
112 | * ES7000 Globals | ||
113 | */ | ||
114 | |||
115 | static volatile unsigned long *psai; | ||
116 | static struct mip_reg *mip_reg; | ||
117 | static struct mip_reg *host_reg; | ||
118 | static int mip_port; | ||
119 | static unsigned long mip_addr; | ||
120 | static unsigned long host_addr; | ||
121 | |||
122 | int es7000_plat; | ||
123 | |||
124 | /* | ||
125 | * GSI override for ES7000 platforms. | ||
126 | */ | ||
127 | |||
128 | static unsigned int base; | ||
129 | |||
130 | static int | ||
131 | es7000_rename_gsi(int ioapic, int gsi) | ||
132 | { | ||
133 | if (es7000_plat == ES7000_ZORRO) | ||
134 | return gsi; | ||
135 | |||
136 | if (!base) { | ||
137 | int i; | ||
138 | for (i = 0; i < nr_ioapics; i++) | ||
139 | base += nr_ioapic_registers[i]; | ||
140 | } | ||
141 | |||
142 | if (!ioapic && (gsi < 16)) | ||
143 | gsi += base; | ||
144 | |||
145 | return gsi; | ||
146 | } | ||
147 | |||
148 | static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip) | ||
149 | { | ||
150 | unsigned long vect = 0, psaival = 0; | ||
151 | |||
152 | if (psai == NULL) | ||
153 | return -1; | ||
154 | |||
155 | vect = ((unsigned long)__pa(eip)/0x1000) << 16; | ||
156 | psaival = (0x1000000 | vect | cpu); | ||
157 | |||
158 | while (*psai & 0x1000000) | ||
159 | ; | ||
160 | |||
161 | *psai = psaival; | ||
162 | |||
163 | return 0; | ||
164 | } | ||
165 | |||
166 | static int __init es7000_update_apic(void) | ||
167 | { | ||
168 | apic->wakeup_cpu = wakeup_secondary_cpu_via_mip; | ||
169 | |||
170 | /* MPENTIUMIII */ | ||
171 | if (boot_cpu_data.x86 == 6 && | ||
172 | (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) { | ||
173 | es7000_update_apic_to_cluster(); | ||
174 | apic->wait_for_init_deassert = NULL; | ||
175 | apic->wakeup_cpu = wakeup_secondary_cpu_via_mip; | ||
176 | } | ||
177 | |||
178 | return 0; | ||
179 | } | ||
180 | |||
181 | static void __init setup_unisys(void) | ||
182 | { | ||
183 | /* | ||
184 | * Determine the generation of the ES7000 currently running. | ||
185 | * | ||
186 | * es7000_plat = 1 if the machine is a 5xx ES7000 box | ||
187 | * es7000_plat = 2 if the machine is a x86_64 ES7000 box | ||
188 | * | ||
189 | */ | ||
190 | if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) | ||
191 | es7000_plat = ES7000_ZORRO; | ||
192 | else | ||
193 | es7000_plat = ES7000_CLASSIC; | ||
194 | ioapic_renumber_irq = es7000_rename_gsi; | ||
195 | |||
196 | x86_quirks->update_apic = es7000_update_apic; | ||
197 | } | ||
198 | |||
199 | /* | ||
200 | * Parse the OEM Table: | ||
201 | */ | ||
202 | static int __init parse_unisys_oem(char *oemptr) | ||
203 | { | ||
204 | int i; | ||
205 | int success = 0; | ||
206 | unsigned char type, size; | ||
207 | unsigned long val; | ||
208 | char *tp = NULL; | ||
209 | struct psai *psaip = NULL; | ||
210 | struct mip_reg_info *mi; | ||
211 | struct mip_reg *host, *mip; | ||
212 | |||
213 | tp = oemptr; | ||
214 | |||
215 | tp += 8; | ||
216 | |||
217 | for (i = 0; i <= 6; i++) { | ||
218 | type = *tp++; | ||
219 | size = *tp++; | ||
220 | tp -= 2; | ||
221 | switch (type) { | ||
222 | case MIP_REG: | ||
223 | mi = (struct mip_reg_info *)tp; | ||
224 | val = MIP_RD_LO(mi->host_reg); | ||
225 | host_addr = val; | ||
226 | host = (struct mip_reg *)val; | ||
227 | host_reg = __va(host); | ||
228 | val = MIP_RD_LO(mi->mip_reg); | ||
229 | mip_port = MIP_PORT(mi->mip_info); | ||
230 | mip_addr = val; | ||
231 | mip = (struct mip_reg *)val; | ||
232 | mip_reg = __va(mip); | ||
233 | pr_debug("es7000_mipcfg: host_reg = 0x%lx \n", | ||
234 | (unsigned long)host_reg); | ||
235 | pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n", | ||
236 | (unsigned long)mip_reg); | ||
237 | success++; | ||
238 | break; | ||
239 | case MIP_PSAI_REG: | ||
240 | psaip = (struct psai *)tp; | ||
241 | if (tp != NULL) { | ||
242 | if (psaip->addr) | ||
243 | psai = __va(psaip->addr); | ||
244 | else | ||
245 | psai = NULL; | ||
246 | success++; | ||
247 | } | ||
248 | break; | ||
249 | default: | ||
250 | break; | ||
251 | } | ||
252 | tp += size; | ||
253 | } | ||
254 | |||
255 | if (success < 2) | ||
256 | es7000_plat = NON_UNISYS; | ||
257 | else | ||
258 | setup_unisys(); | ||
259 | |||
260 | return es7000_plat; | ||
261 | } | ||
262 | |||
263 | #ifdef CONFIG_ACPI | ||
264 | static int __init find_unisys_acpi_oem_table(unsigned long *oem_addr) | ||
265 | { | ||
266 | struct acpi_table_header *header = NULL; | ||
267 | struct es7000_oem_table *table; | ||
268 | acpi_size tbl_size; | ||
269 | acpi_status ret; | ||
270 | int i = 0; | ||
271 | |||
272 | for (;;) { | ||
273 | ret = acpi_get_table_with_size("OEM1", i++, &header, &tbl_size); | ||
274 | if (!ACPI_SUCCESS(ret)) | ||
275 | return -1; | ||
276 | |||
277 | if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) | ||
278 | break; | ||
279 | |||
280 | early_acpi_os_unmap_memory(header, tbl_size); | ||
281 | } | ||
282 | |||
283 | table = (void *)header; | ||
284 | |||
285 | oem_addrX = table->OEMTableAddr; | ||
286 | oem_size = table->OEMTableSize; | ||
287 | |||
288 | early_acpi_os_unmap_memory(header, tbl_size); | ||
289 | |||
290 | *oem_addr = (unsigned long)__acpi_map_table(oem_addrX, oem_size); | ||
291 | |||
292 | return 0; | ||
293 | } | ||
294 | |||
295 | static void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr) | ||
296 | { | ||
297 | if (!oem_addr) | ||
298 | return; | ||
299 | |||
300 | __acpi_unmap_table((char *)oem_addr, oem_size); | ||
301 | } | ||
302 | |||
303 | static int es7000_check_dsdt(void) | ||
304 | { | ||
305 | struct acpi_table_header header; | ||
306 | |||
307 | if (ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_DSDT, 0, &header)) && | ||
308 | !strncmp(header.oem_id, "UNISYS", 6)) | ||
309 | return 1; | ||
310 | return 0; | ||
311 | } | ||
312 | |||
313 | /* Hook from generic ACPI tables.c */ | ||
314 | static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
315 | { | ||
316 | unsigned long oem_addr = 0; | ||
317 | int check_dsdt; | ||
318 | int ret = 0; | ||
319 | |||
320 | /* check dsdt at first to avoid clear fix_map for oem_addr */ | ||
321 | check_dsdt = es7000_check_dsdt(); | ||
322 | |||
323 | if (!find_unisys_acpi_oem_table(&oem_addr)) { | ||
324 | if (check_dsdt) { | ||
325 | ret = parse_unisys_oem((char *)oem_addr); | ||
326 | } else { | ||
327 | setup_unisys(); | ||
328 | ret = 1; | ||
329 | } | ||
330 | /* | ||
331 | * we need to unmap it | ||
332 | */ | ||
333 | unmap_unisys_acpi_oem_table(oem_addr); | ||
334 | } | ||
335 | return ret; | ||
336 | } | ||
337 | #else /* !CONFIG_ACPI: */ | ||
338 | static int __init es7000_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
339 | { | ||
340 | return 0; | ||
341 | } | ||
342 | #endif /* !CONFIG_ACPI */ | ||
343 | |||
344 | static void es7000_spin(int n) | ||
345 | { | ||
346 | int i = 0; | ||
347 | |||
348 | while (i++ < n) | ||
349 | rep_nop(); | ||
350 | } | ||
351 | |||
352 | static int __init | ||
353 | es7000_mip_write(struct mip_reg *mip_reg) | ||
354 | { | ||
355 | int status = 0; | ||
356 | int spin; | ||
357 | |||
358 | spin = MIP_SPIN; | ||
359 | while ((host_reg->off_0x38 & MIP_VALID) != 0) { | ||
360 | if (--spin <= 0) { | ||
361 | WARN(1, "Timeout waiting for Host Valid Flag\n"); | ||
362 | return -1; | ||
363 | } | ||
364 | es7000_spin(MIP_SPIN); | ||
365 | } | ||
366 | |||
367 | memcpy(host_reg, mip_reg, sizeof(struct mip_reg)); | ||
368 | outb(1, mip_port); | ||
369 | |||
370 | spin = MIP_SPIN; | ||
371 | |||
372 | while ((mip_reg->off_0x38 & MIP_VALID) == 0) { | ||
373 | if (--spin <= 0) { | ||
374 | WARN(1, "Timeout waiting for MIP Valid Flag\n"); | ||
375 | return -1; | ||
376 | } | ||
377 | es7000_spin(MIP_SPIN); | ||
378 | } | ||
379 | |||
380 | status = (mip_reg->off_0x00 & 0xffff0000000000ULL) >> 48; | ||
381 | mip_reg->off_0x38 &= ~MIP_VALID; | ||
382 | |||
383 | return status; | ||
384 | } | ||
385 | |||
386 | static void __init es7000_enable_apic_mode(void) | ||
387 | { | ||
388 | struct mip_reg es7000_mip_reg; | ||
389 | int mip_status; | ||
390 | |||
391 | if (!es7000_plat) | ||
392 | return; | ||
393 | |||
394 | printk(KERN_INFO "ES7000: Enabling APIC mode.\n"); | ||
395 | memset(&es7000_mip_reg, 0, sizeof(struct mip_reg)); | ||
396 | es7000_mip_reg.off_0x00 = MIP_SW_APIC; | ||
397 | es7000_mip_reg.off_0x38 = MIP_VALID; | ||
398 | |||
399 | while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0) | ||
400 | WARN(1, "Command failed, status = %x\n", mip_status); | ||
401 | } | ||
402 | |||
403 | static void es7000_vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
404 | { | ||
405 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
406 | * specified in the interrupt destination when using lowest | ||
407 | * priority interrupt delivery mode. | ||
408 | * | ||
409 | * In particular there was a hyperthreading cpu observed to | ||
410 | * deliver interrupts to the wrong hyperthread when only one | ||
411 | * hyperthread was specified in the interrupt desitination. | ||
412 | */ | ||
413 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | ||
414 | } | ||
415 | |||
416 | |||
417 | static void es7000_wait_for_init_deassert(atomic_t *deassert) | ||
418 | { | ||
419 | #ifndef CONFIG_ES7000_CLUSTERED_APIC | ||
420 | while (!atomic_read(deassert)) | ||
421 | cpu_relax(); | ||
422 | #endif | ||
423 | return; | ||
424 | } | ||
425 | |||
426 | static unsigned int es7000_get_apic_id(unsigned long x) | ||
427 | { | ||
428 | return (x >> 24) & 0xFF; | ||
429 | } | ||
430 | |||
431 | static void es7000_send_IPI_mask(const struct cpumask *mask, int vector) | ||
432 | { | ||
433 | default_send_IPI_mask_sequence_phys(mask, vector); | ||
434 | } | ||
435 | |||
436 | static void es7000_send_IPI_allbutself(int vector) | ||
437 | { | ||
438 | default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector); | ||
439 | } | ||
440 | |||
441 | static void es7000_send_IPI_all(int vector) | ||
442 | { | ||
443 | es7000_send_IPI_mask(cpu_online_mask, vector); | ||
444 | } | ||
445 | |||
446 | static int es7000_apic_id_registered(void) | ||
447 | { | ||
448 | return 1; | ||
449 | } | ||
450 | |||
451 | static const cpumask_t *target_cpus_cluster(void) | ||
452 | { | ||
453 | return &CPU_MASK_ALL; | ||
454 | } | ||
455 | |||
456 | static const cpumask_t *es7000_target_cpus(void) | ||
457 | { | ||
458 | return &cpumask_of_cpu(smp_processor_id()); | ||
459 | } | ||
460 | |||
461 | static unsigned long | ||
462 | es7000_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
463 | { | ||
464 | return 0; | ||
465 | } | ||
466 | static unsigned long es7000_check_apicid_present(int bit) | ||
467 | { | ||
468 | return physid_isset(bit, phys_cpu_present_map); | ||
469 | } | ||
470 | |||
471 | static unsigned long calculate_ldr(int cpu) | ||
472 | { | ||
473 | unsigned long id = per_cpu(x86_bios_cpu_apicid, cpu); | ||
474 | |||
475 | return SET_APIC_LOGICAL_ID(id); | ||
476 | } | ||
477 | |||
478 | /* | ||
479 | * Set up the logical destination ID. | ||
480 | * | ||
481 | * Intel recommends to set DFR, LdR and TPR before enabling | ||
482 | * an APIC. See e.g. "AP-388 82489DX User's Manual" (Intel | ||
483 | * document number 292116). So here it goes... | ||
484 | */ | ||
485 | static void es7000_init_apic_ldr_cluster(void) | ||
486 | { | ||
487 | unsigned long val; | ||
488 | int cpu = smp_processor_id(); | ||
489 | |||
490 | apic_write(APIC_DFR, APIC_DFR_CLUSTER); | ||
491 | val = calculate_ldr(cpu); | ||
492 | apic_write(APIC_LDR, val); | ||
493 | } | ||
494 | |||
495 | static void es7000_init_apic_ldr(void) | ||
496 | { | ||
497 | unsigned long val; | ||
498 | int cpu = smp_processor_id(); | ||
499 | |||
500 | apic_write(APIC_DFR, APIC_DFR_FLAT); | ||
501 | val = calculate_ldr(cpu); | ||
502 | apic_write(APIC_LDR, val); | ||
503 | } | ||
504 | |||
505 | static void es7000_setup_apic_routing(void) | ||
506 | { | ||
507 | int apic = per_cpu(x86_bios_cpu_apicid, smp_processor_id()); | ||
508 | |||
509 | printk(KERN_INFO | ||
510 | "Enabling APIC mode: %s. Using %d I/O APICs, target cpus %lx\n", | ||
511 | (apic_version[apic] == 0x14) ? | ||
512 | "Physical Cluster" : "Logical Cluster", | ||
513 | nr_ioapics, cpus_addr(*es7000_target_cpus())[0]); | ||
514 | } | ||
515 | |||
516 | static int es7000_apicid_to_node(int logical_apicid) | ||
517 | { | ||
518 | return 0; | ||
519 | } | ||
520 | |||
521 | |||
522 | static int es7000_cpu_present_to_apicid(int mps_cpu) | ||
523 | { | ||
524 | if (!mps_cpu) | ||
525 | return boot_cpu_physical_apicid; | ||
526 | else if (mps_cpu < nr_cpu_ids) | ||
527 | return per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
528 | else | ||
529 | return BAD_APICID; | ||
530 | } | ||
531 | |||
532 | static int cpu_id; | ||
533 | |||
534 | static physid_mask_t es7000_apicid_to_cpu_present(int phys_apicid) | ||
535 | { | ||
536 | physid_mask_t mask; | ||
537 | |||
538 | mask = physid_mask_of_physid(cpu_id); | ||
539 | ++cpu_id; | ||
540 | |||
541 | return mask; | ||
542 | } | ||
543 | |||
544 | /* Mapping from cpu number to logical apicid */ | ||
545 | static int es7000_cpu_to_logical_apicid(int cpu) | ||
546 | { | ||
547 | #ifdef CONFIG_SMP | ||
548 | if (cpu >= nr_cpu_ids) | ||
549 | return BAD_APICID; | ||
550 | return cpu_2_logical_apicid[cpu]; | ||
551 | #else | ||
552 | return logical_smp_processor_id(); | ||
553 | #endif | ||
554 | } | ||
555 | |||
556 | static physid_mask_t es7000_ioapic_phys_id_map(physid_mask_t phys_map) | ||
557 | { | ||
558 | /* For clustered we don't have a good way to do this yet - hack */ | ||
559 | return physids_promote(0xff); | ||
560 | } | ||
561 | |||
562 | static int es7000_check_phys_apicid_present(int cpu_physical_apicid) | ||
563 | { | ||
564 | boot_cpu_physical_apicid = read_apic_id(); | ||
565 | return 1; | ||
566 | } | ||
567 | |||
568 | static unsigned int | ||
569 | es7000_cpu_mask_to_apicid_cluster(const struct cpumask *cpumask) | ||
570 | { | ||
571 | int cpus_found = 0; | ||
572 | int num_bits_set; | ||
573 | int apicid; | ||
574 | int cpu; | ||
575 | |||
576 | num_bits_set = cpumask_weight(cpumask); | ||
577 | /* Return id to all */ | ||
578 | if (num_bits_set == nr_cpu_ids) | ||
579 | return 0xFF; | ||
580 | /* | ||
581 | * The cpus in the mask must all be on the apic cluster. If are not | ||
582 | * on the same apicid cluster return default value of target_cpus(): | ||
583 | */ | ||
584 | cpu = cpumask_first(cpumask); | ||
585 | apicid = es7000_cpu_to_logical_apicid(cpu); | ||
586 | |||
587 | while (cpus_found < num_bits_set) { | ||
588 | if (cpumask_test_cpu(cpu, cpumask)) { | ||
589 | int new_apicid = es7000_cpu_to_logical_apicid(cpu); | ||
590 | |||
591 | if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) { | ||
592 | WARN(1, "Not a valid mask!"); | ||
593 | |||
594 | return 0xFF; | ||
595 | } | ||
596 | apicid = new_apicid; | ||
597 | cpus_found++; | ||
598 | } | ||
599 | cpu++; | ||
600 | } | ||
601 | return apicid; | ||
602 | } | ||
603 | |||
604 | static unsigned int es7000_cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
605 | { | ||
606 | int cpus_found = 0; | ||
607 | int num_bits_set; | ||
608 | int apicid; | ||
609 | int cpu; | ||
610 | |||
611 | num_bits_set = cpus_weight(*cpumask); | ||
612 | /* Return id to all */ | ||
613 | if (num_bits_set == nr_cpu_ids) | ||
614 | return es7000_cpu_to_logical_apicid(0); | ||
615 | /* | ||
616 | * The cpus in the mask must all be on the apic cluster. If are not | ||
617 | * on the same apicid cluster return default value of target_cpus(): | ||
618 | */ | ||
619 | cpu = first_cpu(*cpumask); | ||
620 | apicid = es7000_cpu_to_logical_apicid(cpu); | ||
621 | while (cpus_found < num_bits_set) { | ||
622 | if (cpu_isset(cpu, *cpumask)) { | ||
623 | int new_apicid = es7000_cpu_to_logical_apicid(cpu); | ||
624 | |||
625 | if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) { | ||
626 | printk("%s: Not a valid mask!\n", __func__); | ||
627 | |||
628 | return es7000_cpu_to_logical_apicid(0); | ||
629 | } | ||
630 | apicid = new_apicid; | ||
631 | cpus_found++; | ||
632 | } | ||
633 | cpu++; | ||
634 | } | ||
635 | return apicid; | ||
636 | } | ||
637 | |||
638 | static unsigned int | ||
639 | es7000_cpu_mask_to_apicid_and(const struct cpumask *inmask, | ||
640 | const struct cpumask *andmask) | ||
641 | { | ||
642 | int apicid = es7000_cpu_to_logical_apicid(0); | ||
643 | cpumask_var_t cpumask; | ||
644 | |||
645 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) | ||
646 | return apicid; | ||
647 | |||
648 | cpumask_and(cpumask, inmask, andmask); | ||
649 | cpumask_and(cpumask, cpumask, cpu_online_mask); | ||
650 | apicid = es7000_cpu_mask_to_apicid(cpumask); | ||
651 | |||
652 | free_cpumask_var(cpumask); | ||
653 | |||
654 | return apicid; | ||
655 | } | ||
656 | |||
657 | static int es7000_phys_pkg_id(int cpuid_apic, int index_msb) | ||
658 | { | ||
659 | return cpuid_apic >> index_msb; | ||
660 | } | ||
661 | |||
662 | void __init es7000_update_apic_to_cluster(void) | ||
663 | { | ||
664 | apic->target_cpus = target_cpus_cluster; | ||
665 | apic->irq_delivery_mode = dest_LowestPrio; | ||
666 | /* logical delivery broadcast to all procs: */ | ||
667 | apic->irq_dest_mode = 1; | ||
668 | |||
669 | apic->init_apic_ldr = es7000_init_apic_ldr_cluster; | ||
670 | |||
671 | apic->cpu_mask_to_apicid = es7000_cpu_mask_to_apicid_cluster; | ||
672 | } | ||
673 | |||
674 | static int probe_es7000(void) | ||
675 | { | ||
676 | /* probed later in mptable/ACPI hooks */ | ||
677 | return 0; | ||
678 | } | ||
679 | |||
680 | static __init int | ||
681 | es7000_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
682 | { | ||
683 | if (mpc->oemptr) { | ||
684 | struct mpc_oemtable *oem_table = | ||
685 | (struct mpc_oemtable *)mpc->oemptr; | ||
686 | |||
687 | if (!strncmp(oem, "UNISYS", 6)) | ||
688 | return parse_unisys_oem((char *)oem_table); | ||
689 | } | ||
690 | return 0; | ||
691 | } | ||
692 | |||
693 | |||
694 | struct apic apic_es7000 = { | ||
695 | |||
696 | .name = "es7000", | ||
697 | .probe = probe_es7000, | ||
698 | .acpi_madt_oem_check = es7000_acpi_madt_oem_check, | ||
699 | .apic_id_registered = es7000_apic_id_registered, | ||
700 | |||
701 | .irq_delivery_mode = dest_Fixed, | ||
702 | /* phys delivery to target CPUs: */ | ||
703 | .irq_dest_mode = 0, | ||
704 | |||
705 | .target_cpus = es7000_target_cpus, | ||
706 | .disable_esr = 1, | ||
707 | .dest_logical = 0, | ||
708 | .check_apicid_used = es7000_check_apicid_used, | ||
709 | .check_apicid_present = es7000_check_apicid_present, | ||
710 | |||
711 | .vector_allocation_domain = es7000_vector_allocation_domain, | ||
712 | .init_apic_ldr = es7000_init_apic_ldr, | ||
713 | |||
714 | .ioapic_phys_id_map = es7000_ioapic_phys_id_map, | ||
715 | .setup_apic_routing = es7000_setup_apic_routing, | ||
716 | .multi_timer_check = NULL, | ||
717 | .apicid_to_node = es7000_apicid_to_node, | ||
718 | .cpu_to_logical_apicid = es7000_cpu_to_logical_apicid, | ||
719 | .cpu_present_to_apicid = es7000_cpu_present_to_apicid, | ||
720 | .apicid_to_cpu_present = es7000_apicid_to_cpu_present, | ||
721 | .setup_portio_remap = NULL, | ||
722 | .check_phys_apicid_present = es7000_check_phys_apicid_present, | ||
723 | .enable_apic_mode = es7000_enable_apic_mode, | ||
724 | .phys_pkg_id = es7000_phys_pkg_id, | ||
725 | .mps_oem_check = es7000_mps_oem_check, | ||
726 | |||
727 | .get_apic_id = es7000_get_apic_id, | ||
728 | .set_apic_id = NULL, | ||
729 | .apic_id_mask = 0xFF << 24, | ||
730 | |||
731 | .cpu_mask_to_apicid = es7000_cpu_mask_to_apicid, | ||
732 | .cpu_mask_to_apicid_and = es7000_cpu_mask_to_apicid_and, | ||
733 | |||
734 | .send_IPI_mask = es7000_send_IPI_mask, | ||
735 | .send_IPI_mask_allbutself = NULL, | ||
736 | .send_IPI_allbutself = es7000_send_IPI_allbutself, | ||
737 | .send_IPI_all = es7000_send_IPI_all, | ||
738 | .send_IPI_self = default_send_IPI_self, | ||
739 | |||
740 | .wakeup_cpu = NULL, | ||
741 | |||
742 | .trampoline_phys_low = 0x467, | ||
743 | .trampoline_phys_high = 0x469, | ||
744 | |||
745 | .wait_for_init_deassert = es7000_wait_for_init_deassert, | ||
746 | |||
747 | /* Nothing to do for most platforms, since cleared by the INIT cycle: */ | ||
748 | .smp_callin_clear_local_apic = NULL, | ||
749 | .inquire_remote_apic = default_inquire_remote_apic, | ||
750 | |||
751 | .read = native_apic_mem_read, | ||
752 | .write = native_apic_mem_write, | ||
753 | .icr_read = native_apic_icr_read, | ||
754 | .icr_write = native_apic_icr_write, | ||
755 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
756 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
757 | }; | ||
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 0480d06a12a4..00e6071cefc4 100644 --- a/arch/x86/kernel/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Intel IO-APIC support for multi-Pentium hosts. | 2 | * Intel IO-APIC support for multi-Pentium hosts. |
3 | * | 3 | * |
4 | * Copyright (C) 1997, 1998, 1999, 2000 Ingo Molnar, Hajnalka Szabo | 4 | * Copyright (C) 1997, 1998, 1999, 2000, 2009 Ingo Molnar, Hajnalka Szabo |
5 | * | 5 | * |
6 | * Many thanks to Stig Venaas for trying out countless experimental | 6 | * Many thanks to Stig Venaas for trying out countless experimental |
7 | * patches and reporting/debugging problems patiently! | 7 | * patches and reporting/debugging problems patiently! |
@@ -62,9 +62,7 @@ | |||
62 | #include <asm/uv/uv_hub.h> | 62 | #include <asm/uv/uv_hub.h> |
63 | #include <asm/uv/uv_irq.h> | 63 | #include <asm/uv/uv_irq.h> |
64 | 64 | ||
65 | #include <mach_ipi.h> | 65 | #include <asm/apic.h> |
66 | #include <mach_apic.h> | ||
67 | #include <mach_apicdef.h> | ||
68 | 66 | ||
69 | #define __apicdebuginit(type) static type __init | 67 | #define __apicdebuginit(type) static type __init |
70 | 68 | ||
@@ -100,10 +98,19 @@ DECLARE_BITMAP(mp_bus_not_pci, MAX_MP_BUSSES); | |||
100 | 98 | ||
101 | int skip_ioapic_setup; | 99 | int skip_ioapic_setup; |
102 | 100 | ||
101 | void arch_disable_smp_support(void) | ||
102 | { | ||
103 | #ifdef CONFIG_PCI | ||
104 | noioapicquirk = 1; | ||
105 | noioapicreroute = -1; | ||
106 | #endif | ||
107 | skip_ioapic_setup = 1; | ||
108 | } | ||
109 | |||
103 | static int __init parse_noapic(char *str) | 110 | static int __init parse_noapic(char *str) |
104 | { | 111 | { |
105 | /* disable IO-APIC */ | 112 | /* disable IO-APIC */ |
106 | disable_ioapic_setup(); | 113 | arch_disable_smp_support(); |
107 | return 0; | 114 | return 0; |
108 | } | 115 | } |
109 | early_param("noapic", parse_noapic); | 116 | early_param("noapic", parse_noapic); |
@@ -479,7 +486,7 @@ __ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) | |||
479 | io_apic_write(apic, 0x10 + 2*pin, eu.w1); | 486 | io_apic_write(apic, 0x10 + 2*pin, eu.w1); |
480 | } | 487 | } |
481 | 488 | ||
482 | static void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) | 489 | void ioapic_write_entry(int apic, int pin, struct IO_APIC_route_entry e) |
483 | { | 490 | { |
484 | unsigned long flags; | 491 | unsigned long flags; |
485 | spin_lock_irqsave(&ioapic_lock, flags); | 492 | spin_lock_irqsave(&ioapic_lock, flags); |
@@ -514,11 +521,11 @@ static void send_cleanup_vector(struct irq_cfg *cfg) | |||
514 | for_each_cpu_and(i, cfg->old_domain, cpu_online_mask) | 521 | for_each_cpu_and(i, cfg->old_domain, cpu_online_mask) |
515 | cfg->move_cleanup_count++; | 522 | cfg->move_cleanup_count++; |
516 | for_each_cpu_and(i, cfg->old_domain, cpu_online_mask) | 523 | for_each_cpu_and(i, cfg->old_domain, cpu_online_mask) |
517 | send_IPI_mask(cpumask_of(i), IRQ_MOVE_CLEANUP_VECTOR); | 524 | apic->send_IPI_mask(cpumask_of(i), IRQ_MOVE_CLEANUP_VECTOR); |
518 | } else { | 525 | } else { |
519 | cpumask_and(cleanup_mask, cfg->old_domain, cpu_online_mask); | 526 | cpumask_and(cleanup_mask, cfg->old_domain, cpu_online_mask); |
520 | cfg->move_cleanup_count = cpumask_weight(cleanup_mask); | 527 | cfg->move_cleanup_count = cpumask_weight(cleanup_mask); |
521 | send_IPI_mask(cleanup_mask, IRQ_MOVE_CLEANUP_VECTOR); | 528 | apic->send_IPI_mask(cleanup_mask, IRQ_MOVE_CLEANUP_VECTOR); |
522 | free_cpumask_var(cleanup_mask); | 529 | free_cpumask_var(cleanup_mask); |
523 | } | 530 | } |
524 | cfg->move_in_progress = 0; | 531 | cfg->move_in_progress = 0; |
@@ -563,8 +570,9 @@ static int | |||
563 | assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask); | 570 | assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask); |
564 | 571 | ||
565 | /* | 572 | /* |
566 | * Either sets desc->affinity to a valid value, and returns cpu_mask_to_apicid | 573 | * Either sets desc->affinity to a valid value, and returns |
567 | * of that, or returns BAD_APICID and leaves desc->affinity untouched. | 574 | * ->cpu_mask_to_apicid of that, or returns BAD_APICID and |
575 | * leaves desc->affinity untouched. | ||
568 | */ | 576 | */ |
569 | static unsigned int | 577 | static unsigned int |
570 | set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask) | 578 | set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask) |
@@ -582,7 +590,8 @@ set_desc_affinity(struct irq_desc *desc, const struct cpumask *mask) | |||
582 | 590 | ||
583 | cpumask_and(desc->affinity, cfg->domain, mask); | 591 | cpumask_and(desc->affinity, cfg->domain, mask); |
584 | set_extra_move_desc(desc, mask); | 592 | set_extra_move_desc(desc, mask); |
585 | return cpu_mask_to_apicid_and(desc->affinity, cpu_online_mask); | 593 | |
594 | return apic->cpu_mask_to_apicid_and(desc->affinity, cpu_online_mask); | ||
586 | } | 595 | } |
587 | 596 | ||
588 | static void | 597 | static void |
@@ -797,23 +806,6 @@ static void clear_IO_APIC (void) | |||
797 | clear_IO_APIC_pin(apic, pin); | 806 | clear_IO_APIC_pin(apic, pin); |
798 | } | 807 | } |
799 | 808 | ||
800 | #if !defined(CONFIG_SMP) && defined(CONFIG_X86_32) | ||
801 | void send_IPI_self(int vector) | ||
802 | { | ||
803 | unsigned int cfg; | ||
804 | |||
805 | /* | ||
806 | * Wait for idle. | ||
807 | */ | ||
808 | apic_wait_icr_idle(); | ||
809 | cfg = APIC_DM_FIXED | APIC_DEST_SELF | vector | APIC_DEST_LOGICAL; | ||
810 | /* | ||
811 | * Send the IPI. The write to APIC_ICR fires this off. | ||
812 | */ | ||
813 | apic_write(APIC_ICR, cfg); | ||
814 | } | ||
815 | #endif /* !CONFIG_SMP && CONFIG_X86_32*/ | ||
816 | |||
817 | #ifdef CONFIG_X86_32 | 809 | #ifdef CONFIG_X86_32 |
818 | /* | 810 | /* |
819 | * support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to | 811 | * support for broken MP BIOSs, enables hand-redirection of PIRQ0-7 to |
@@ -821,8 +813,9 @@ void send_IPI_self(int vector) | |||
821 | */ | 813 | */ |
822 | 814 | ||
823 | #define MAX_PIRQS 8 | 815 | #define MAX_PIRQS 8 |
824 | static int pirq_entries [MAX_PIRQS]; | 816 | static int pirq_entries[MAX_PIRQS] = { |
825 | static int pirqs_enabled; | 817 | [0 ... MAX_PIRQS - 1] = -1 |
818 | }; | ||
826 | 819 | ||
827 | static int __init ioapic_pirq_setup(char *str) | 820 | static int __init ioapic_pirq_setup(char *str) |
828 | { | 821 | { |
@@ -831,10 +824,6 @@ static int __init ioapic_pirq_setup(char *str) | |||
831 | 824 | ||
832 | get_options(str, ARRAY_SIZE(ints), ints); | 825 | get_options(str, ARRAY_SIZE(ints), ints); |
833 | 826 | ||
834 | for (i = 0; i < MAX_PIRQS; i++) | ||
835 | pirq_entries[i] = -1; | ||
836 | |||
837 | pirqs_enabled = 1; | ||
838 | apic_printk(APIC_VERBOSE, KERN_INFO | 827 | apic_printk(APIC_VERBOSE, KERN_INFO |
839 | "PIRQ redirection, working around broken MP-BIOS.\n"); | 828 | "PIRQ redirection, working around broken MP-BIOS.\n"); |
840 | max = MAX_PIRQS; | 829 | max = MAX_PIRQS; |
@@ -1316,7 +1305,7 @@ __assign_irq_vector(int irq, struct irq_cfg *cfg, const struct cpumask *mask) | |||
1316 | int new_cpu; | 1305 | int new_cpu; |
1317 | int vector, offset; | 1306 | int vector, offset; |
1318 | 1307 | ||
1319 | vector_allocation_domain(cpu, tmp_mask); | 1308 | apic->vector_allocation_domain(cpu, tmp_mask); |
1320 | 1309 | ||
1321 | vector = current_vector; | 1310 | vector = current_vector; |
1322 | offset = current_offset; | 1311 | offset = current_offset; |
@@ -1486,10 +1475,10 @@ static void ioapic_register_intr(int irq, struct irq_desc *desc, unsigned long t | |||
1486 | handle_edge_irq, "edge"); | 1475 | handle_edge_irq, "edge"); |
1487 | } | 1476 | } |
1488 | 1477 | ||
1489 | static int setup_ioapic_entry(int apic, int irq, | 1478 | int setup_ioapic_entry(int apic_id, int irq, |
1490 | struct IO_APIC_route_entry *entry, | 1479 | struct IO_APIC_route_entry *entry, |
1491 | unsigned int destination, int trigger, | 1480 | unsigned int destination, int trigger, |
1492 | int polarity, int vector) | 1481 | int polarity, int vector) |
1493 | { | 1482 | { |
1494 | /* | 1483 | /* |
1495 | * add it to the IO-APIC irq-routing table: | 1484 | * add it to the IO-APIC irq-routing table: |
@@ -1498,25 +1487,25 @@ static int setup_ioapic_entry(int apic, int irq, | |||
1498 | 1487 | ||
1499 | #ifdef CONFIG_INTR_REMAP | 1488 | #ifdef CONFIG_INTR_REMAP |
1500 | if (intr_remapping_enabled) { | 1489 | if (intr_remapping_enabled) { |
1501 | struct intel_iommu *iommu = map_ioapic_to_ir(apic); | 1490 | struct intel_iommu *iommu = map_ioapic_to_ir(apic_id); |
1502 | struct irte irte; | 1491 | struct irte irte; |
1503 | struct IR_IO_APIC_route_entry *ir_entry = | 1492 | struct IR_IO_APIC_route_entry *ir_entry = |
1504 | (struct IR_IO_APIC_route_entry *) entry; | 1493 | (struct IR_IO_APIC_route_entry *) entry; |
1505 | int index; | 1494 | int index; |
1506 | 1495 | ||
1507 | if (!iommu) | 1496 | if (!iommu) |
1508 | panic("No mapping iommu for ioapic %d\n", apic); | 1497 | panic("No mapping iommu for ioapic %d\n", apic_id); |
1509 | 1498 | ||
1510 | index = alloc_irte(iommu, irq, 1); | 1499 | index = alloc_irte(iommu, irq, 1); |
1511 | if (index < 0) | 1500 | if (index < 0) |
1512 | panic("Failed to allocate IRTE for ioapic %d\n", apic); | 1501 | panic("Failed to allocate IRTE for ioapic %d\n", apic_id); |
1513 | 1502 | ||
1514 | memset(&irte, 0, sizeof(irte)); | 1503 | memset(&irte, 0, sizeof(irte)); |
1515 | 1504 | ||
1516 | irte.present = 1; | 1505 | irte.present = 1; |
1517 | irte.dst_mode = INT_DEST_MODE; | 1506 | irte.dst_mode = apic->irq_dest_mode; |
1518 | irte.trigger_mode = trigger; | 1507 | irte.trigger_mode = trigger; |
1519 | irte.dlvry_mode = INT_DELIVERY_MODE; | 1508 | irte.dlvry_mode = apic->irq_delivery_mode; |
1520 | irte.vector = vector; | 1509 | irte.vector = vector; |
1521 | irte.dest_id = IRTE_DEST(destination); | 1510 | irte.dest_id = IRTE_DEST(destination); |
1522 | 1511 | ||
@@ -1529,8 +1518,8 @@ static int setup_ioapic_entry(int apic, int irq, | |||
1529 | } else | 1518 | } else |
1530 | #endif | 1519 | #endif |
1531 | { | 1520 | { |
1532 | entry->delivery_mode = INT_DELIVERY_MODE; | 1521 | entry->delivery_mode = apic->irq_delivery_mode; |
1533 | entry->dest_mode = INT_DEST_MODE; | 1522 | entry->dest_mode = apic->irq_dest_mode; |
1534 | entry->dest = destination; | 1523 | entry->dest = destination; |
1535 | } | 1524 | } |
1536 | 1525 | ||
@@ -1547,7 +1536,7 @@ static int setup_ioapic_entry(int apic, int irq, | |||
1547 | return 0; | 1536 | return 0; |
1548 | } | 1537 | } |
1549 | 1538 | ||
1550 | static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq, struct irq_desc *desc, | 1539 | static void setup_IO_APIC_irq(int apic_id, int pin, unsigned int irq, struct irq_desc *desc, |
1551 | int trigger, int polarity) | 1540 | int trigger, int polarity) |
1552 | { | 1541 | { |
1553 | struct irq_cfg *cfg; | 1542 | struct irq_cfg *cfg; |
@@ -1559,22 +1548,22 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq, struct irq_de | |||
1559 | 1548 | ||
1560 | cfg = desc->chip_data; | 1549 | cfg = desc->chip_data; |
1561 | 1550 | ||
1562 | if (assign_irq_vector(irq, cfg, TARGET_CPUS)) | 1551 | if (assign_irq_vector(irq, cfg, apic->target_cpus())) |
1563 | return; | 1552 | return; |
1564 | 1553 | ||
1565 | dest = cpu_mask_to_apicid_and(cfg->domain, TARGET_CPUS); | 1554 | dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus()); |
1566 | 1555 | ||
1567 | apic_printk(APIC_VERBOSE,KERN_DEBUG | 1556 | apic_printk(APIC_VERBOSE,KERN_DEBUG |
1568 | "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> " | 1557 | "IOAPIC[%d]: Set routing entry (%d-%d -> 0x%x -> " |
1569 | "IRQ %d Mode:%i Active:%i)\n", | 1558 | "IRQ %d Mode:%i Active:%i)\n", |
1570 | apic, mp_ioapics[apic].apicid, pin, cfg->vector, | 1559 | apic_id, mp_ioapics[apic_id].apicid, pin, cfg->vector, |
1571 | irq, trigger, polarity); | 1560 | irq, trigger, polarity); |
1572 | 1561 | ||
1573 | 1562 | ||
1574 | if (setup_ioapic_entry(mp_ioapics[apic].apicid, irq, &entry, | 1563 | if (setup_ioapic_entry(mp_ioapics[apic_id].apicid, irq, &entry, |
1575 | dest, trigger, polarity, cfg->vector)) { | 1564 | dest, trigger, polarity, cfg->vector)) { |
1576 | printk("Failed to setup ioapic entry for ioapic %d, pin %d\n", | 1565 | printk("Failed to setup ioapic entry for ioapic %d, pin %d\n", |
1577 | mp_ioapics[apic].apicid, pin); | 1566 | mp_ioapics[apic_id].apicid, pin); |
1578 | __clear_irq_vector(irq, cfg); | 1567 | __clear_irq_vector(irq, cfg); |
1579 | return; | 1568 | return; |
1580 | } | 1569 | } |
@@ -1583,12 +1572,12 @@ static void setup_IO_APIC_irq(int apic, int pin, unsigned int irq, struct irq_de | |||
1583 | if (irq < NR_IRQS_LEGACY) | 1572 | if (irq < NR_IRQS_LEGACY) |
1584 | disable_8259A_irq(irq); | 1573 | disable_8259A_irq(irq); |
1585 | 1574 | ||
1586 | ioapic_write_entry(apic, pin, entry); | 1575 | ioapic_write_entry(apic_id, pin, entry); |
1587 | } | 1576 | } |
1588 | 1577 | ||
1589 | static void __init setup_IO_APIC_irqs(void) | 1578 | static void __init setup_IO_APIC_irqs(void) |
1590 | { | 1579 | { |
1591 | int apic, pin, idx, irq; | 1580 | int apic_id, pin, idx, irq; |
1592 | int notcon = 0; | 1581 | int notcon = 0; |
1593 | struct irq_desc *desc; | 1582 | struct irq_desc *desc; |
1594 | struct irq_cfg *cfg; | 1583 | struct irq_cfg *cfg; |
@@ -1596,19 +1585,19 @@ static void __init setup_IO_APIC_irqs(void) | |||
1596 | 1585 | ||
1597 | apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); | 1586 | apic_printk(APIC_VERBOSE, KERN_DEBUG "init IO_APIC IRQs\n"); |
1598 | 1587 | ||
1599 | for (apic = 0; apic < nr_ioapics; apic++) { | 1588 | for (apic_id = 0; apic_id < nr_ioapics; apic_id++) { |
1600 | for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { | 1589 | for (pin = 0; pin < nr_ioapic_registers[apic_id]; pin++) { |
1601 | 1590 | ||
1602 | idx = find_irq_entry(apic, pin, mp_INT); | 1591 | idx = find_irq_entry(apic_id, pin, mp_INT); |
1603 | if (idx == -1) { | 1592 | if (idx == -1) { |
1604 | if (!notcon) { | 1593 | if (!notcon) { |
1605 | notcon = 1; | 1594 | notcon = 1; |
1606 | apic_printk(APIC_VERBOSE, | 1595 | apic_printk(APIC_VERBOSE, |
1607 | KERN_DEBUG " %d-%d", | 1596 | KERN_DEBUG " %d-%d", |
1608 | mp_ioapics[apic].apicid, pin); | 1597 | mp_ioapics[apic_id].apicid, pin); |
1609 | } else | 1598 | } else |
1610 | apic_printk(APIC_VERBOSE, " %d-%d", | 1599 | apic_printk(APIC_VERBOSE, " %d-%d", |
1611 | mp_ioapics[apic].apicid, pin); | 1600 | mp_ioapics[apic_id].apicid, pin); |
1612 | continue; | 1601 | continue; |
1613 | } | 1602 | } |
1614 | if (notcon) { | 1603 | if (notcon) { |
@@ -1617,20 +1606,25 @@ static void __init setup_IO_APIC_irqs(void) | |||
1617 | notcon = 0; | 1606 | notcon = 0; |
1618 | } | 1607 | } |
1619 | 1608 | ||
1620 | irq = pin_2_irq(idx, apic, pin); | 1609 | irq = pin_2_irq(idx, apic_id, pin); |
1621 | #ifdef CONFIG_X86_32 | 1610 | |
1622 | if (multi_timer_check(apic, irq)) | 1611 | /* |
1612 | * Skip the timer IRQ if there's a quirk handler | ||
1613 | * installed and if it returns 1: | ||
1614 | */ | ||
1615 | if (apic->multi_timer_check && | ||
1616 | apic->multi_timer_check(apic_id, irq)) | ||
1623 | continue; | 1617 | continue; |
1624 | #endif | 1618 | |
1625 | desc = irq_to_desc_alloc_cpu(irq, cpu); | 1619 | desc = irq_to_desc_alloc_cpu(irq, cpu); |
1626 | if (!desc) { | 1620 | if (!desc) { |
1627 | printk(KERN_INFO "can not get irq_desc for %d\n", irq); | 1621 | printk(KERN_INFO "can not get irq_desc for %d\n", irq); |
1628 | continue; | 1622 | continue; |
1629 | } | 1623 | } |
1630 | cfg = desc->chip_data; | 1624 | cfg = desc->chip_data; |
1631 | add_pin_to_irq_cpu(cfg, cpu, apic, pin); | 1625 | add_pin_to_irq_cpu(cfg, cpu, apic_id, pin); |
1632 | 1626 | ||
1633 | setup_IO_APIC_irq(apic, pin, irq, desc, | 1627 | setup_IO_APIC_irq(apic_id, pin, irq, desc, |
1634 | irq_trigger(idx), irq_polarity(idx)); | 1628 | irq_trigger(idx), irq_polarity(idx)); |
1635 | } | 1629 | } |
1636 | } | 1630 | } |
@@ -1643,7 +1637,7 @@ static void __init setup_IO_APIC_irqs(void) | |||
1643 | /* | 1637 | /* |
1644 | * Set up the timer pin, possibly with the 8259A-master behind. | 1638 | * Set up the timer pin, possibly with the 8259A-master behind. |
1645 | */ | 1639 | */ |
1646 | static void __init setup_timer_IRQ0_pin(unsigned int apic, unsigned int pin, | 1640 | static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin, |
1647 | int vector) | 1641 | int vector) |
1648 | { | 1642 | { |
1649 | struct IO_APIC_route_entry entry; | 1643 | struct IO_APIC_route_entry entry; |
@@ -1659,10 +1653,10 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic, unsigned int pin, | |||
1659 | * We use logical delivery to get the timer IRQ | 1653 | * We use logical delivery to get the timer IRQ |
1660 | * to the first CPU. | 1654 | * to the first CPU. |
1661 | */ | 1655 | */ |
1662 | entry.dest_mode = INT_DEST_MODE; | 1656 | entry.dest_mode = apic->irq_dest_mode; |
1663 | entry.mask = 1; /* mask IRQ now */ | 1657 | entry.mask = 0; /* don't mask IRQ for edge */ |
1664 | entry.dest = cpu_mask_to_apicid(TARGET_CPUS); | 1658 | entry.dest = apic->cpu_mask_to_apicid(apic->target_cpus()); |
1665 | entry.delivery_mode = INT_DELIVERY_MODE; | 1659 | entry.delivery_mode = apic->irq_delivery_mode; |
1666 | entry.polarity = 0; | 1660 | entry.polarity = 0; |
1667 | entry.trigger = 0; | 1661 | entry.trigger = 0; |
1668 | entry.vector = vector; | 1662 | entry.vector = vector; |
@@ -1676,7 +1670,7 @@ static void __init setup_timer_IRQ0_pin(unsigned int apic, unsigned int pin, | |||
1676 | /* | 1670 | /* |
1677 | * Add it to the IO-APIC irq-routing table: | 1671 | * Add it to the IO-APIC irq-routing table: |
1678 | */ | 1672 | */ |
1679 | ioapic_write_entry(apic, pin, entry); | 1673 | ioapic_write_entry(apic_id, pin, entry); |
1680 | } | 1674 | } |
1681 | 1675 | ||
1682 | 1676 | ||
@@ -1979,13 +1973,6 @@ void __init enable_IO_APIC(void) | |||
1979 | int apic; | 1973 | int apic; |
1980 | unsigned long flags; | 1974 | unsigned long flags; |
1981 | 1975 | ||
1982 | #ifdef CONFIG_X86_32 | ||
1983 | int i; | ||
1984 | if (!pirqs_enabled) | ||
1985 | for (i = 0; i < MAX_PIRQS; i++) | ||
1986 | pirq_entries[i] = -1; | ||
1987 | #endif | ||
1988 | |||
1989 | /* | 1976 | /* |
1990 | * The number of IO-APIC IRQ registers (== #pins): | 1977 | * The number of IO-APIC IRQ registers (== #pins): |
1991 | */ | 1978 | */ |
@@ -2089,7 +2076,7 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2089 | { | 2076 | { |
2090 | union IO_APIC_reg_00 reg_00; | 2077 | union IO_APIC_reg_00 reg_00; |
2091 | physid_mask_t phys_id_present_map; | 2078 | physid_mask_t phys_id_present_map; |
2092 | int apic; | 2079 | int apic_id; |
2093 | int i; | 2080 | int i; |
2094 | unsigned char old_id; | 2081 | unsigned char old_id; |
2095 | unsigned long flags; | 2082 | unsigned long flags; |
@@ -2108,26 +2095,26 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2108 | * This is broken; anything with a real cpu count has to | 2095 | * This is broken; anything with a real cpu count has to |
2109 | * circumvent this idiocy regardless. | 2096 | * circumvent this idiocy regardless. |
2110 | */ | 2097 | */ |
2111 | phys_id_present_map = ioapic_phys_id_map(phys_cpu_present_map); | 2098 | phys_id_present_map = apic->ioapic_phys_id_map(phys_cpu_present_map); |
2112 | 2099 | ||
2113 | /* | 2100 | /* |
2114 | * Set the IOAPIC ID to the value stored in the MPC table. | 2101 | * Set the IOAPIC ID to the value stored in the MPC table. |
2115 | */ | 2102 | */ |
2116 | for (apic = 0; apic < nr_ioapics; apic++) { | 2103 | for (apic_id = 0; apic_id < nr_ioapics; apic_id++) { |
2117 | 2104 | ||
2118 | /* Read the register 0 value */ | 2105 | /* Read the register 0 value */ |
2119 | spin_lock_irqsave(&ioapic_lock, flags); | 2106 | spin_lock_irqsave(&ioapic_lock, flags); |
2120 | reg_00.raw = io_apic_read(apic, 0); | 2107 | reg_00.raw = io_apic_read(apic_id, 0); |
2121 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2108 | spin_unlock_irqrestore(&ioapic_lock, flags); |
2122 | 2109 | ||
2123 | old_id = mp_ioapics[apic].apicid; | 2110 | old_id = mp_ioapics[apic_id].apicid; |
2124 | 2111 | ||
2125 | if (mp_ioapics[apic].apicid >= get_physical_broadcast()) { | 2112 | if (mp_ioapics[apic_id].apicid >= get_physical_broadcast()) { |
2126 | printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n", | 2113 | printk(KERN_ERR "BIOS bug, IO-APIC#%d ID is %d in the MPC table!...\n", |
2127 | apic, mp_ioapics[apic].apicid); | 2114 | apic_id, mp_ioapics[apic_id].apicid); |
2128 | printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", | 2115 | printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", |
2129 | reg_00.bits.ID); | 2116 | reg_00.bits.ID); |
2130 | mp_ioapics[apic].apicid = reg_00.bits.ID; | 2117 | mp_ioapics[apic_id].apicid = reg_00.bits.ID; |
2131 | } | 2118 | } |
2132 | 2119 | ||
2133 | /* | 2120 | /* |
@@ -2135,10 +2122,10 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2135 | * system must have a unique ID or we get lots of nice | 2122 | * system must have a unique ID or we get lots of nice |
2136 | * 'stuck on smp_invalidate_needed IPI wait' messages. | 2123 | * 'stuck on smp_invalidate_needed IPI wait' messages. |
2137 | */ | 2124 | */ |
2138 | if (check_apicid_used(phys_id_present_map, | 2125 | if (apic->check_apicid_used(phys_id_present_map, |
2139 | mp_ioapics[apic].apicid)) { | 2126 | mp_ioapics[apic_id].apicid)) { |
2140 | printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", | 2127 | printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!...\n", |
2141 | apic, mp_ioapics[apic].apicid); | 2128 | apic_id, mp_ioapics[apic_id].apicid); |
2142 | for (i = 0; i < get_physical_broadcast(); i++) | 2129 | for (i = 0; i < get_physical_broadcast(); i++) |
2143 | if (!physid_isset(i, phys_id_present_map)) | 2130 | if (!physid_isset(i, phys_id_present_map)) |
2144 | break; | 2131 | break; |
@@ -2147,13 +2134,13 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2147 | printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", | 2134 | printk(KERN_ERR "... fixing up to %d. (tell your hw vendor)\n", |
2148 | i); | 2135 | i); |
2149 | physid_set(i, phys_id_present_map); | 2136 | physid_set(i, phys_id_present_map); |
2150 | mp_ioapics[apic].apicid = i; | 2137 | mp_ioapics[apic_id].apicid = i; |
2151 | } else { | 2138 | } else { |
2152 | physid_mask_t tmp; | 2139 | physid_mask_t tmp; |
2153 | tmp = apicid_to_cpu_present(mp_ioapics[apic].apicid); | 2140 | tmp = apic->apicid_to_cpu_present(mp_ioapics[apic_id].apicid); |
2154 | apic_printk(APIC_VERBOSE, "Setting %d in the " | 2141 | apic_printk(APIC_VERBOSE, "Setting %d in the " |
2155 | "phys_id_present_map\n", | 2142 | "phys_id_present_map\n", |
2156 | mp_ioapics[apic].apicid); | 2143 | mp_ioapics[apic_id].apicid); |
2157 | physids_or(phys_id_present_map, phys_id_present_map, tmp); | 2144 | physids_or(phys_id_present_map, phys_id_present_map, tmp); |
2158 | } | 2145 | } |
2159 | 2146 | ||
@@ -2162,11 +2149,11 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2162 | * We need to adjust the IRQ routing table | 2149 | * We need to adjust the IRQ routing table |
2163 | * if the ID changed. | 2150 | * if the ID changed. |
2164 | */ | 2151 | */ |
2165 | if (old_id != mp_ioapics[apic].apicid) | 2152 | if (old_id != mp_ioapics[apic_id].apicid) |
2166 | for (i = 0; i < mp_irq_entries; i++) | 2153 | for (i = 0; i < mp_irq_entries; i++) |
2167 | if (mp_irqs[i].dstapic == old_id) | 2154 | if (mp_irqs[i].dstapic == old_id) |
2168 | mp_irqs[i].dstapic | 2155 | mp_irqs[i].dstapic |
2169 | = mp_ioapics[apic].apicid; | 2156 | = mp_ioapics[apic_id].apicid; |
2170 | 2157 | ||
2171 | /* | 2158 | /* |
2172 | * Read the right value from the MPC table and | 2159 | * Read the right value from the MPC table and |
@@ -2174,20 +2161,20 @@ static void __init setup_ioapic_ids_from_mpc(void) | |||
2174 | */ | 2161 | */ |
2175 | apic_printk(APIC_VERBOSE, KERN_INFO | 2162 | apic_printk(APIC_VERBOSE, KERN_INFO |
2176 | "...changing IO-APIC physical APIC ID to %d ...", | 2163 | "...changing IO-APIC physical APIC ID to %d ...", |
2177 | mp_ioapics[apic].apicid); | 2164 | mp_ioapics[apic_id].apicid); |
2178 | 2165 | ||
2179 | reg_00.bits.ID = mp_ioapics[apic].apicid; | 2166 | reg_00.bits.ID = mp_ioapics[apic_id].apicid; |
2180 | spin_lock_irqsave(&ioapic_lock, flags); | 2167 | spin_lock_irqsave(&ioapic_lock, flags); |
2181 | io_apic_write(apic, 0, reg_00.raw); | 2168 | io_apic_write(apic_id, 0, reg_00.raw); |
2182 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2169 | spin_unlock_irqrestore(&ioapic_lock, flags); |
2183 | 2170 | ||
2184 | /* | 2171 | /* |
2185 | * Sanity check | 2172 | * Sanity check |
2186 | */ | 2173 | */ |
2187 | spin_lock_irqsave(&ioapic_lock, flags); | 2174 | spin_lock_irqsave(&ioapic_lock, flags); |
2188 | reg_00.raw = io_apic_read(apic, 0); | 2175 | reg_00.raw = io_apic_read(apic_id, 0); |
2189 | spin_unlock_irqrestore(&ioapic_lock, flags); | 2176 | spin_unlock_irqrestore(&ioapic_lock, flags); |
2190 | if (reg_00.bits.ID != mp_ioapics[apic].apicid) | 2177 | if (reg_00.bits.ID != mp_ioapics[apic_id].apicid) |
2191 | printk("could not set ID!\n"); | 2178 | printk("could not set ID!\n"); |
2192 | else | 2179 | else |
2193 | apic_printk(APIC_VERBOSE, " ok.\n"); | 2180 | apic_printk(APIC_VERBOSE, " ok.\n"); |
@@ -2290,7 +2277,7 @@ static int ioapic_retrigger_irq(unsigned int irq) | |||
2290 | unsigned long flags; | 2277 | unsigned long flags; |
2291 | 2278 | ||
2292 | spin_lock_irqsave(&vector_lock, flags); | 2279 | spin_lock_irqsave(&vector_lock, flags); |
2293 | send_IPI_mask(cpumask_of(cpumask_first(cfg->domain)), cfg->vector); | 2280 | apic->send_IPI_mask(cpumask_of(cpumask_first(cfg->domain)), cfg->vector); |
2294 | spin_unlock_irqrestore(&vector_lock, flags); | 2281 | spin_unlock_irqrestore(&vector_lock, flags); |
2295 | 2282 | ||
2296 | return 1; | 2283 | return 1; |
@@ -2298,7 +2285,7 @@ static int ioapic_retrigger_irq(unsigned int irq) | |||
2298 | #else | 2285 | #else |
2299 | static int ioapic_retrigger_irq(unsigned int irq) | 2286 | static int ioapic_retrigger_irq(unsigned int irq) |
2300 | { | 2287 | { |
2301 | send_IPI_self(irq_cfg(irq)->vector); | 2288 | apic->send_IPI_self(irq_cfg(irq)->vector); |
2302 | 2289 | ||
2303 | return 1; | 2290 | return 1; |
2304 | } | 2291 | } |
@@ -2362,7 +2349,7 @@ migrate_ioapic_irq_desc(struct irq_desc *desc, const struct cpumask *mask) | |||
2362 | 2349 | ||
2363 | set_extra_move_desc(desc, mask); | 2350 | set_extra_move_desc(desc, mask); |
2364 | 2351 | ||
2365 | dest = cpu_mask_to_apicid_and(cfg->domain, mask); | 2352 | dest = apic->cpu_mask_to_apicid_and(cfg->domain, mask); |
2366 | 2353 | ||
2367 | modify_ioapic_rte = desc->status & IRQ_LEVEL; | 2354 | modify_ioapic_rte = desc->status & IRQ_LEVEL; |
2368 | if (modify_ioapic_rte) { | 2355 | if (modify_ioapic_rte) { |
@@ -2866,19 +2853,15 @@ static inline void __init check_timer(void) | |||
2866 | int cpu = boot_cpu_id; | 2853 | int cpu = boot_cpu_id; |
2867 | int apic1, pin1, apic2, pin2; | 2854 | int apic1, pin1, apic2, pin2; |
2868 | unsigned long flags; | 2855 | unsigned long flags; |
2869 | unsigned int ver; | ||
2870 | int no_pin1 = 0; | 2856 | int no_pin1 = 0; |
2871 | 2857 | ||
2872 | local_irq_save(flags); | 2858 | local_irq_save(flags); |
2873 | 2859 | ||
2874 | ver = apic_read(APIC_LVR); | ||
2875 | ver = GET_APIC_VERSION(ver); | ||
2876 | |||
2877 | /* | 2860 | /* |
2878 | * get/set the timer IRQ vector: | 2861 | * get/set the timer IRQ vector: |
2879 | */ | 2862 | */ |
2880 | disable_8259A_irq(0); | 2863 | disable_8259A_irq(0); |
2881 | assign_irq_vector(0, cfg, TARGET_CPUS); | 2864 | assign_irq_vector(0, cfg, apic->target_cpus()); |
2882 | 2865 | ||
2883 | /* | 2866 | /* |
2884 | * As IRQ0 is to be enabled in the 8259A, the virtual | 2867 | * As IRQ0 is to be enabled in the 8259A, the virtual |
@@ -2892,7 +2875,13 @@ static inline void __init check_timer(void) | |||
2892 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2875 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2893 | init_8259A(1); | 2876 | init_8259A(1); |
2894 | #ifdef CONFIG_X86_32 | 2877 | #ifdef CONFIG_X86_32 |
2895 | timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | 2878 | { |
2879 | unsigned int ver; | ||
2880 | |||
2881 | ver = apic_read(APIC_LVR); | ||
2882 | ver = GET_APIC_VERSION(ver); | ||
2883 | timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | ||
2884 | } | ||
2896 | #endif | 2885 | #endif |
2897 | 2886 | ||
2898 | pin1 = find_isa_irq_pin(0, mp_INT); | 2887 | pin1 = find_isa_irq_pin(0, mp_INT); |
@@ -2931,8 +2920,17 @@ static inline void __init check_timer(void) | |||
2931 | if (no_pin1) { | 2920 | if (no_pin1) { |
2932 | add_pin_to_irq_cpu(cfg, cpu, apic1, pin1); | 2921 | add_pin_to_irq_cpu(cfg, cpu, apic1, pin1); |
2933 | setup_timer_IRQ0_pin(apic1, pin1, cfg->vector); | 2922 | setup_timer_IRQ0_pin(apic1, pin1, cfg->vector); |
2923 | } else { | ||
2924 | /* for edge trigger, setup_IO_APIC_irq already | ||
2925 | * leave it unmasked. | ||
2926 | * so only need to unmask if it is level-trigger | ||
2927 | * do we really have level trigger timer? | ||
2928 | */ | ||
2929 | int idx; | ||
2930 | idx = find_irq_entry(apic1, pin1, mp_INT); | ||
2931 | if (idx != -1 && irq_trigger(idx)) | ||
2932 | unmask_IO_APIC_irq_desc(desc); | ||
2934 | } | 2933 | } |
2935 | unmask_IO_APIC_irq_desc(desc); | ||
2936 | if (timer_irq_works()) { | 2934 | if (timer_irq_works()) { |
2937 | if (nmi_watchdog == NMI_IO_APIC) { | 2935 | if (nmi_watchdog == NMI_IO_APIC) { |
2938 | setup_nmi(); | 2936 | setup_nmi(); |
@@ -2946,6 +2944,7 @@ static inline void __init check_timer(void) | |||
2946 | if (intr_remapping_enabled) | 2944 | if (intr_remapping_enabled) |
2947 | panic("timer doesn't work through Interrupt-remapped IO-APIC"); | 2945 | panic("timer doesn't work through Interrupt-remapped IO-APIC"); |
2948 | #endif | 2946 | #endif |
2947 | local_irq_disable(); | ||
2949 | clear_IO_APIC_pin(apic1, pin1); | 2948 | clear_IO_APIC_pin(apic1, pin1); |
2950 | if (!no_pin1) | 2949 | if (!no_pin1) |
2951 | apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " | 2950 | apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " |
@@ -2960,7 +2959,6 @@ static inline void __init check_timer(void) | |||
2960 | */ | 2959 | */ |
2961 | replace_pin_at_irq_cpu(cfg, cpu, apic1, pin1, apic2, pin2); | 2960 | replace_pin_at_irq_cpu(cfg, cpu, apic1, pin1, apic2, pin2); |
2962 | setup_timer_IRQ0_pin(apic2, pin2, cfg->vector); | 2961 | setup_timer_IRQ0_pin(apic2, pin2, cfg->vector); |
2963 | unmask_IO_APIC_irq_desc(desc); | ||
2964 | enable_8259A_irq(0); | 2962 | enable_8259A_irq(0); |
2965 | if (timer_irq_works()) { | 2963 | if (timer_irq_works()) { |
2966 | apic_printk(APIC_QUIET, KERN_INFO "....... works.\n"); | 2964 | apic_printk(APIC_QUIET, KERN_INFO "....... works.\n"); |
@@ -2975,6 +2973,7 @@ static inline void __init check_timer(void) | |||
2975 | /* | 2973 | /* |
2976 | * Cleanup, just in case ... | 2974 | * Cleanup, just in case ... |
2977 | */ | 2975 | */ |
2976 | local_irq_disable(); | ||
2978 | disable_8259A_irq(0); | 2977 | disable_8259A_irq(0); |
2979 | clear_IO_APIC_pin(apic2, pin2); | 2978 | clear_IO_APIC_pin(apic2, pin2); |
2980 | apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n"); | 2979 | apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n"); |
@@ -3000,6 +2999,7 @@ static inline void __init check_timer(void) | |||
3000 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); | 2999 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
3001 | goto out; | 3000 | goto out; |
3002 | } | 3001 | } |
3002 | local_irq_disable(); | ||
3003 | disable_8259A_irq(0); | 3003 | disable_8259A_irq(0); |
3004 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); | 3004 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); |
3005 | apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n"); | 3005 | apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n"); |
@@ -3017,6 +3017,7 @@ static inline void __init check_timer(void) | |||
3017 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); | 3017 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
3018 | goto out; | 3018 | goto out; |
3019 | } | 3019 | } |
3020 | local_irq_disable(); | ||
3020 | apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); | 3021 | apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); |
3021 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " | 3022 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " |
3022 | "report. Then try booting with the 'noapic' option.\n"); | 3023 | "report. Then try booting with the 'noapic' option.\n"); |
@@ -3046,13 +3047,9 @@ out: | |||
3046 | void __init setup_IO_APIC(void) | 3047 | void __init setup_IO_APIC(void) |
3047 | { | 3048 | { |
3048 | 3049 | ||
3049 | #ifdef CONFIG_X86_32 | ||
3050 | enable_IO_APIC(); | ||
3051 | #else | ||
3052 | /* | 3050 | /* |
3053 | * calling enable_IO_APIC() is moved to setup_local_APIC for BP | 3051 | * calling enable_IO_APIC() is moved to setup_local_APIC for BP |
3054 | */ | 3052 | */ |
3055 | #endif | ||
3056 | 3053 | ||
3057 | io_apic_irqs = ~PIC_IRQS; | 3054 | io_apic_irqs = ~PIC_IRQS; |
3058 | 3055 | ||
@@ -3168,6 +3165,7 @@ static int __init ioapic_init_sysfs(void) | |||
3168 | 3165 | ||
3169 | device_initcall(ioapic_init_sysfs); | 3166 | device_initcall(ioapic_init_sysfs); |
3170 | 3167 | ||
3168 | static int nr_irqs_gsi = NR_IRQS_LEGACY; | ||
3171 | /* | 3169 | /* |
3172 | * Dynamic irq allocate and deallocation | 3170 | * Dynamic irq allocate and deallocation |
3173 | */ | 3171 | */ |
@@ -3182,11 +3180,11 @@ unsigned int create_irq_nr(unsigned int irq_want) | |||
3182 | struct irq_desc *desc_new = NULL; | 3180 | struct irq_desc *desc_new = NULL; |
3183 | 3181 | ||
3184 | irq = 0; | 3182 | irq = 0; |
3183 | if (irq_want < nr_irqs_gsi) | ||
3184 | irq_want = nr_irqs_gsi; | ||
3185 | |||
3185 | spin_lock_irqsave(&vector_lock, flags); | 3186 | spin_lock_irqsave(&vector_lock, flags); |
3186 | for (new = irq_want; new < nr_irqs; new++) { | 3187 | for (new = irq_want; new < nr_irqs; new++) { |
3187 | if (platform_legacy_irq(new)) | ||
3188 | continue; | ||
3189 | |||
3190 | desc_new = irq_to_desc_alloc_cpu(new, cpu); | 3188 | desc_new = irq_to_desc_alloc_cpu(new, cpu); |
3191 | if (!desc_new) { | 3189 | if (!desc_new) { |
3192 | printk(KERN_INFO "can not get irq_desc for %d\n", new); | 3190 | printk(KERN_INFO "can not get irq_desc for %d\n", new); |
@@ -3196,7 +3194,7 @@ unsigned int create_irq_nr(unsigned int irq_want) | |||
3196 | 3194 | ||
3197 | if (cfg_new->vector != 0) | 3195 | if (cfg_new->vector != 0) |
3198 | continue; | 3196 | continue; |
3199 | if (__assign_irq_vector(new, cfg_new, TARGET_CPUS) == 0) | 3197 | if (__assign_irq_vector(new, cfg_new, apic->target_cpus()) == 0) |
3200 | irq = new; | 3198 | irq = new; |
3201 | break; | 3199 | break; |
3202 | } | 3200 | } |
@@ -3211,7 +3209,6 @@ unsigned int create_irq_nr(unsigned int irq_want) | |||
3211 | return irq; | 3209 | return irq; |
3212 | } | 3210 | } |
3213 | 3211 | ||
3214 | static int nr_irqs_gsi = NR_IRQS_LEGACY; | ||
3215 | int create_irq(void) | 3212 | int create_irq(void) |
3216 | { | 3213 | { |
3217 | unsigned int irq_want; | 3214 | unsigned int irq_want; |
@@ -3262,11 +3259,11 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms | |||
3262 | return -ENXIO; | 3259 | return -ENXIO; |
3263 | 3260 | ||
3264 | cfg = irq_cfg(irq); | 3261 | cfg = irq_cfg(irq); |
3265 | err = assign_irq_vector(irq, cfg, TARGET_CPUS); | 3262 | err = assign_irq_vector(irq, cfg, apic->target_cpus()); |
3266 | if (err) | 3263 | if (err) |
3267 | return err; | 3264 | return err; |
3268 | 3265 | ||
3269 | dest = cpu_mask_to_apicid_and(cfg->domain, TARGET_CPUS); | 3266 | dest = apic->cpu_mask_to_apicid_and(cfg->domain, apic->target_cpus()); |
3270 | 3267 | ||
3271 | #ifdef CONFIG_INTR_REMAP | 3268 | #ifdef CONFIG_INTR_REMAP |
3272 | if (irq_remapped(irq)) { | 3269 | if (irq_remapped(irq)) { |
@@ -3280,9 +3277,9 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms | |||
3280 | memset (&irte, 0, sizeof(irte)); | 3277 | memset (&irte, 0, sizeof(irte)); |
3281 | 3278 | ||
3282 | irte.present = 1; | 3279 | irte.present = 1; |
3283 | irte.dst_mode = INT_DEST_MODE; | 3280 | irte.dst_mode = apic->irq_dest_mode; |
3284 | irte.trigger_mode = 0; /* edge */ | 3281 | irte.trigger_mode = 0; /* edge */ |
3285 | irte.dlvry_mode = INT_DELIVERY_MODE; | 3282 | irte.dlvry_mode = apic->irq_delivery_mode; |
3286 | irte.vector = cfg->vector; | 3283 | irte.vector = cfg->vector; |
3287 | irte.dest_id = IRTE_DEST(dest); | 3284 | irte.dest_id = IRTE_DEST(dest); |
3288 | 3285 | ||
@@ -3300,10 +3297,10 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms | |||
3300 | msg->address_hi = MSI_ADDR_BASE_HI; | 3297 | msg->address_hi = MSI_ADDR_BASE_HI; |
3301 | msg->address_lo = | 3298 | msg->address_lo = |
3302 | MSI_ADDR_BASE_LO | | 3299 | MSI_ADDR_BASE_LO | |
3303 | ((INT_DEST_MODE == 0) ? | 3300 | ((apic->irq_dest_mode == 0) ? |
3304 | MSI_ADDR_DEST_MODE_PHYSICAL: | 3301 | MSI_ADDR_DEST_MODE_PHYSICAL: |
3305 | MSI_ADDR_DEST_MODE_LOGICAL) | | 3302 | MSI_ADDR_DEST_MODE_LOGICAL) | |
3306 | ((INT_DELIVERY_MODE != dest_LowestPrio) ? | 3303 | ((apic->irq_delivery_mode != dest_LowestPrio) ? |
3307 | MSI_ADDR_REDIRECTION_CPU: | 3304 | MSI_ADDR_REDIRECTION_CPU: |
3308 | MSI_ADDR_REDIRECTION_LOWPRI) | | 3305 | MSI_ADDR_REDIRECTION_LOWPRI) | |
3309 | MSI_ADDR_DEST_ID(dest); | 3306 | MSI_ADDR_DEST_ID(dest); |
@@ -3311,7 +3308,7 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms | |||
3311 | msg->data = | 3308 | msg->data = |
3312 | MSI_DATA_TRIGGER_EDGE | | 3309 | MSI_DATA_TRIGGER_EDGE | |
3313 | MSI_DATA_LEVEL_ASSERT | | 3310 | MSI_DATA_LEVEL_ASSERT | |
3314 | ((INT_DELIVERY_MODE != dest_LowestPrio) ? | 3311 | ((apic->irq_delivery_mode != dest_LowestPrio) ? |
3315 | MSI_DATA_DELIVERY_FIXED: | 3312 | MSI_DATA_DELIVERY_FIXED: |
3316 | MSI_DATA_DELIVERY_LOWPRI) | | 3313 | MSI_DATA_DELIVERY_LOWPRI) | |
3317 | MSI_DATA_VECTOR(cfg->vector); | 3314 | MSI_DATA_VECTOR(cfg->vector); |
@@ -3482,9 +3479,9 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) | |||
3482 | sub_handle = 0; | 3479 | sub_handle = 0; |
3483 | list_for_each_entry(msidesc, &dev->msi_list, list) { | 3480 | list_for_each_entry(msidesc, &dev->msi_list, list) { |
3484 | irq = create_irq_nr(irq_want); | 3481 | irq = create_irq_nr(irq_want); |
3485 | irq_want++; | ||
3486 | if (irq == 0) | 3482 | if (irq == 0) |
3487 | return -1; | 3483 | return -1; |
3484 | irq_want = irq + 1; | ||
3488 | #ifdef CONFIG_INTR_REMAP | 3485 | #ifdef CONFIG_INTR_REMAP |
3489 | if (!intr_remapping_enabled) | 3486 | if (!intr_remapping_enabled) |
3490 | goto no_ir; | 3487 | goto no_ir; |
@@ -3699,12 +3696,13 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
3699 | return -ENXIO; | 3696 | return -ENXIO; |
3700 | 3697 | ||
3701 | cfg = irq_cfg(irq); | 3698 | cfg = irq_cfg(irq); |
3702 | err = assign_irq_vector(irq, cfg, TARGET_CPUS); | 3699 | err = assign_irq_vector(irq, cfg, apic->target_cpus()); |
3703 | if (!err) { | 3700 | if (!err) { |
3704 | struct ht_irq_msg msg; | 3701 | struct ht_irq_msg msg; |
3705 | unsigned dest; | 3702 | unsigned dest; |
3706 | 3703 | ||
3707 | dest = cpu_mask_to_apicid_and(cfg->domain, TARGET_CPUS); | 3704 | dest = apic->cpu_mask_to_apicid_and(cfg->domain, |
3705 | apic->target_cpus()); | ||
3708 | 3706 | ||
3709 | msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest); | 3707 | msg.address_hi = HT_IRQ_HIGH_DEST_ID(dest); |
3710 | 3708 | ||
@@ -3712,11 +3710,11 @@ int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) | |||
3712 | HT_IRQ_LOW_BASE | | 3710 | HT_IRQ_LOW_BASE | |
3713 | HT_IRQ_LOW_DEST_ID(dest) | | 3711 | HT_IRQ_LOW_DEST_ID(dest) | |
3714 | HT_IRQ_LOW_VECTOR(cfg->vector) | | 3712 | HT_IRQ_LOW_VECTOR(cfg->vector) | |
3715 | ((INT_DEST_MODE == 0) ? | 3713 | ((apic->irq_dest_mode == 0) ? |
3716 | HT_IRQ_LOW_DM_PHYSICAL : | 3714 | HT_IRQ_LOW_DM_PHYSICAL : |
3717 | HT_IRQ_LOW_DM_LOGICAL) | | 3715 | HT_IRQ_LOW_DM_LOGICAL) | |
3718 | HT_IRQ_LOW_RQEOI_EDGE | | 3716 | HT_IRQ_LOW_RQEOI_EDGE | |
3719 | ((INT_DELIVERY_MODE != dest_LowestPrio) ? | 3717 | ((apic->irq_delivery_mode != dest_LowestPrio) ? |
3720 | HT_IRQ_LOW_MT_FIXED : | 3718 | HT_IRQ_LOW_MT_FIXED : |
3721 | HT_IRQ_LOW_MT_ARBITRATED) | | 3719 | HT_IRQ_LOW_MT_ARBITRATED) | |
3722 | HT_IRQ_LOW_IRQ_MASKED; | 3720 | HT_IRQ_LOW_IRQ_MASKED; |
@@ -3764,12 +3762,12 @@ int arch_enable_uv_irq(char *irq_name, unsigned int irq, int cpu, int mmr_blade, | |||
3764 | BUG_ON(sizeof(struct uv_IO_APIC_route_entry) != sizeof(unsigned long)); | 3762 | BUG_ON(sizeof(struct uv_IO_APIC_route_entry) != sizeof(unsigned long)); |
3765 | 3763 | ||
3766 | entry->vector = cfg->vector; | 3764 | entry->vector = cfg->vector; |
3767 | entry->delivery_mode = INT_DELIVERY_MODE; | 3765 | entry->delivery_mode = apic->irq_delivery_mode; |
3768 | entry->dest_mode = INT_DEST_MODE; | 3766 | entry->dest_mode = apic->irq_dest_mode; |
3769 | entry->polarity = 0; | 3767 | entry->polarity = 0; |
3770 | entry->trigger = 0; | 3768 | entry->trigger = 0; |
3771 | entry->mask = 0; | 3769 | entry->mask = 0; |
3772 | entry->dest = cpu_mask_to_apicid(eligible_cpu); | 3770 | entry->dest = apic->cpu_mask_to_apicid(eligible_cpu); |
3773 | 3771 | ||
3774 | mmr_pnode = uv_blade_to_pnode(mmr_blade); | 3772 | mmr_pnode = uv_blade_to_pnode(mmr_blade); |
3775 | uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value); | 3773 | uv_write_global_mmr64(mmr_pnode, mmr_offset, mmr_value); |
@@ -3837,11 +3835,17 @@ int __init arch_probe_nr_irqs(void) | |||
3837 | { | 3835 | { |
3838 | int nr; | 3836 | int nr; |
3839 | 3837 | ||
3840 | nr = ((8 * nr_cpu_ids) > (32 * nr_ioapics) ? | 3838 | if (nr_irqs > (NR_VECTORS * nr_cpu_ids)) |
3841 | (NR_VECTORS + (8 * nr_cpu_ids)) : | 3839 | nr_irqs = NR_VECTORS * nr_cpu_ids; |
3842 | (NR_VECTORS + (32 * nr_ioapics))); | ||
3843 | 3840 | ||
3844 | if (nr < nr_irqs && nr > nr_irqs_gsi) | 3841 | nr = nr_irqs_gsi + 8 * nr_cpu_ids; |
3842 | #if defined(CONFIG_PCI_MSI) || defined(CONFIG_HT_IRQ) | ||
3843 | /* | ||
3844 | * for MSI and HT dyn irq | ||
3845 | */ | ||
3846 | nr += nr_irqs_gsi * 16; | ||
3847 | #endif | ||
3848 | if (nr < nr_irqs) | ||
3845 | nr_irqs = nr; | 3849 | nr_irqs = nr; |
3846 | 3850 | ||
3847 | return 0; | 3851 | return 0; |
@@ -3873,7 +3877,7 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
3873 | */ | 3877 | */ |
3874 | 3878 | ||
3875 | if (physids_empty(apic_id_map)) | 3879 | if (physids_empty(apic_id_map)) |
3876 | apic_id_map = ioapic_phys_id_map(phys_cpu_present_map); | 3880 | apic_id_map = apic->ioapic_phys_id_map(phys_cpu_present_map); |
3877 | 3881 | ||
3878 | spin_lock_irqsave(&ioapic_lock, flags); | 3882 | spin_lock_irqsave(&ioapic_lock, flags); |
3879 | reg_00.raw = io_apic_read(ioapic, 0); | 3883 | reg_00.raw = io_apic_read(ioapic, 0); |
@@ -3889,10 +3893,10 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
3889 | * Every APIC in a system must have a unique ID or we get lots of nice | 3893 | * Every APIC in a system must have a unique ID or we get lots of nice |
3890 | * 'stuck on smp_invalidate_needed IPI wait' messages. | 3894 | * 'stuck on smp_invalidate_needed IPI wait' messages. |
3891 | */ | 3895 | */ |
3892 | if (check_apicid_used(apic_id_map, apic_id)) { | 3896 | if (apic->check_apicid_used(apic_id_map, apic_id)) { |
3893 | 3897 | ||
3894 | for (i = 0; i < get_physical_broadcast(); i++) { | 3898 | for (i = 0; i < get_physical_broadcast(); i++) { |
3895 | if (!check_apicid_used(apic_id_map, i)) | 3899 | if (!apic->check_apicid_used(apic_id_map, i)) |
3896 | break; | 3900 | break; |
3897 | } | 3901 | } |
3898 | 3902 | ||
@@ -3905,7 +3909,7 @@ int __init io_apic_get_unique_id(int ioapic, int apic_id) | |||
3905 | apic_id = i; | 3909 | apic_id = i; |
3906 | } | 3910 | } |
3907 | 3911 | ||
3908 | tmp = apicid_to_cpu_present(apic_id); | 3912 | tmp = apic->apicid_to_cpu_present(apic_id); |
3909 | physids_or(apic_id_map, apic_id_map, tmp); | 3913 | physids_or(apic_id_map, apic_id_map, tmp); |
3910 | 3914 | ||
3911 | if (reg_00.bits.ID != apic_id) { | 3915 | if (reg_00.bits.ID != apic_id) { |
@@ -3998,7 +4002,7 @@ int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | |||
3998 | /* | 4002 | /* |
3999 | * This function currently is only a helper for the i386 smp boot process where | 4003 | * This function currently is only a helper for the i386 smp boot process where |
4000 | * we need to reprogram the ioredtbls to cater for the cpus which have come online | 4004 | * we need to reprogram the ioredtbls to cater for the cpus which have come online |
4001 | * so mask in all cases should simply be TARGET_CPUS | 4005 | * so mask in all cases should simply be apic->target_cpus() |
4002 | */ | 4006 | */ |
4003 | #ifdef CONFIG_SMP | 4007 | #ifdef CONFIG_SMP |
4004 | void __init setup_ioapic_dest(void) | 4008 | void __init setup_ioapic_dest(void) |
@@ -4039,7 +4043,7 @@ void __init setup_ioapic_dest(void) | |||
4039 | (IRQ_NO_BALANCING | IRQ_AFFINITY_SET)) | 4043 | (IRQ_NO_BALANCING | IRQ_AFFINITY_SET)) |
4040 | mask = desc->affinity; | 4044 | mask = desc->affinity; |
4041 | else | 4045 | else |
4042 | mask = TARGET_CPUS; | 4046 | mask = apic->target_cpus(); |
4043 | 4047 | ||
4044 | #ifdef CONFIG_INTR_REMAP | 4048 | #ifdef CONFIG_INTR_REMAP |
4045 | if (intr_remapping_enabled) | 4049 | if (intr_remapping_enabled) |
diff --git a/arch/x86/kernel/apic/ipi.c b/arch/x86/kernel/apic/ipi.c new file mode 100644 index 000000000000..dbf5445727a9 --- /dev/null +++ b/arch/x86/kernel/apic/ipi.c | |||
@@ -0,0 +1,164 @@ | |||
1 | #include <linux/cpumask.h> | ||
2 | #include <linux/interrupt.h> | ||
3 | #include <linux/init.h> | ||
4 | |||
5 | #include <linux/mm.h> | ||
6 | #include <linux/delay.h> | ||
7 | #include <linux/spinlock.h> | ||
8 | #include <linux/kernel_stat.h> | ||
9 | #include <linux/mc146818rtc.h> | ||
10 | #include <linux/cache.h> | ||
11 | #include <linux/cpu.h> | ||
12 | #include <linux/module.h> | ||
13 | |||
14 | #include <asm/smp.h> | ||
15 | #include <asm/mtrr.h> | ||
16 | #include <asm/tlbflush.h> | ||
17 | #include <asm/mmu_context.h> | ||
18 | #include <asm/apic.h> | ||
19 | #include <asm/proto.h> | ||
20 | #include <asm/ipi.h> | ||
21 | |||
22 | void default_send_IPI_mask_sequence_phys(const struct cpumask *mask, int vector) | ||
23 | { | ||
24 | unsigned long query_cpu; | ||
25 | unsigned long flags; | ||
26 | |||
27 | /* | ||
28 | * Hack. The clustered APIC addressing mode doesn't allow us to send | ||
29 | * to an arbitrary mask, so I do a unicast to each CPU instead. | ||
30 | * - mbligh | ||
31 | */ | ||
32 | local_irq_save(flags); | ||
33 | for_each_cpu(query_cpu, mask) { | ||
34 | __default_send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, | ||
35 | query_cpu), vector, APIC_DEST_PHYSICAL); | ||
36 | } | ||
37 | local_irq_restore(flags); | ||
38 | } | ||
39 | |||
40 | void default_send_IPI_mask_allbutself_phys(const struct cpumask *mask, | ||
41 | int vector) | ||
42 | { | ||
43 | unsigned int this_cpu = smp_processor_id(); | ||
44 | unsigned int query_cpu; | ||
45 | unsigned long flags; | ||
46 | |||
47 | /* See Hack comment above */ | ||
48 | |||
49 | local_irq_save(flags); | ||
50 | for_each_cpu(query_cpu, mask) { | ||
51 | if (query_cpu == this_cpu) | ||
52 | continue; | ||
53 | __default_send_IPI_dest_field(per_cpu(x86_cpu_to_apicid, | ||
54 | query_cpu), vector, APIC_DEST_PHYSICAL); | ||
55 | } | ||
56 | local_irq_restore(flags); | ||
57 | } | ||
58 | |||
59 | void default_send_IPI_mask_sequence_logical(const struct cpumask *mask, | ||
60 | int vector) | ||
61 | { | ||
62 | unsigned long flags; | ||
63 | unsigned int query_cpu; | ||
64 | |||
65 | /* | ||
66 | * Hack. The clustered APIC addressing mode doesn't allow us to send | ||
67 | * to an arbitrary mask, so I do a unicasts to each CPU instead. This | ||
68 | * should be modified to do 1 message per cluster ID - mbligh | ||
69 | */ | ||
70 | |||
71 | local_irq_save(flags); | ||
72 | for_each_cpu(query_cpu, mask) | ||
73 | __default_send_IPI_dest_field( | ||
74 | apic->cpu_to_logical_apicid(query_cpu), vector, | ||
75 | apic->dest_logical); | ||
76 | local_irq_restore(flags); | ||
77 | } | ||
78 | |||
79 | void default_send_IPI_mask_allbutself_logical(const struct cpumask *mask, | ||
80 | int vector) | ||
81 | { | ||
82 | unsigned long flags; | ||
83 | unsigned int query_cpu; | ||
84 | unsigned int this_cpu = smp_processor_id(); | ||
85 | |||
86 | /* See Hack comment above */ | ||
87 | |||
88 | local_irq_save(flags); | ||
89 | for_each_cpu(query_cpu, mask) { | ||
90 | if (query_cpu == this_cpu) | ||
91 | continue; | ||
92 | __default_send_IPI_dest_field( | ||
93 | apic->cpu_to_logical_apicid(query_cpu), vector, | ||
94 | apic->dest_logical); | ||
95 | } | ||
96 | local_irq_restore(flags); | ||
97 | } | ||
98 | |||
99 | #ifdef CONFIG_X86_32 | ||
100 | |||
101 | /* | ||
102 | * This is only used on smaller machines. | ||
103 | */ | ||
104 | void default_send_IPI_mask_logical(const struct cpumask *cpumask, int vector) | ||
105 | { | ||
106 | unsigned long mask = cpumask_bits(cpumask)[0]; | ||
107 | unsigned long flags; | ||
108 | |||
109 | local_irq_save(flags); | ||
110 | WARN_ON(mask & ~cpumask_bits(cpu_online_mask)[0]); | ||
111 | __default_send_IPI_dest_field(mask, vector, apic->dest_logical); | ||
112 | local_irq_restore(flags); | ||
113 | } | ||
114 | |||
115 | void default_send_IPI_allbutself(int vector) | ||
116 | { | ||
117 | /* | ||
118 | * if there are no other CPUs in the system then we get an APIC send | ||
119 | * error if we try to broadcast, thus avoid sending IPIs in this case. | ||
120 | */ | ||
121 | if (!(num_online_cpus() > 1)) | ||
122 | return; | ||
123 | |||
124 | __default_local_send_IPI_allbutself(vector); | ||
125 | } | ||
126 | |||
127 | void default_send_IPI_all(int vector) | ||
128 | { | ||
129 | __default_local_send_IPI_all(vector); | ||
130 | } | ||
131 | |||
132 | void default_send_IPI_self(int vector) | ||
133 | { | ||
134 | __default_send_IPI_shortcut(APIC_DEST_SELF, vector, apic->dest_logical); | ||
135 | } | ||
136 | |||
137 | /* must come after the send_IPI functions above for inlining */ | ||
138 | static int convert_apicid_to_cpu(int apic_id) | ||
139 | { | ||
140 | int i; | ||
141 | |||
142 | for_each_possible_cpu(i) { | ||
143 | if (per_cpu(x86_cpu_to_apicid, i) == apic_id) | ||
144 | return i; | ||
145 | } | ||
146 | return -1; | ||
147 | } | ||
148 | |||
149 | int safe_smp_processor_id(void) | ||
150 | { | ||
151 | int apicid, cpuid; | ||
152 | |||
153 | if (!boot_cpu_has(X86_FEATURE_APIC)) | ||
154 | return 0; | ||
155 | |||
156 | apicid = hard_smp_processor_id(); | ||
157 | if (apicid == BAD_APICID) | ||
158 | return 0; | ||
159 | |||
160 | cpuid = convert_apicid_to_cpu(apicid); | ||
161 | |||
162 | return cpuid >= 0 ? cpuid : 0; | ||
163 | } | ||
164 | #endif | ||
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/apic/nmi.c index 23b6d9e6e4f5..bdfad80c3cf1 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
@@ -34,7 +34,7 @@ | |||
34 | 34 | ||
35 | #include <asm/mce.h> | 35 | #include <asm/mce.h> |
36 | 36 | ||
37 | #include <mach_traps.h> | 37 | #include <asm/mach_traps.h> |
38 | 38 | ||
39 | int unknown_nmi_panic; | 39 | int unknown_nmi_panic; |
40 | int nmi_watchdog_enabled; | 40 | int nmi_watchdog_enabled; |
diff --git a/arch/x86/kernel/apic/numaq_32.c b/arch/x86/kernel/apic/numaq_32.c new file mode 100644 index 000000000000..d9d6d61eed82 --- /dev/null +++ b/arch/x86/kernel/apic/numaq_32.c | |||
@@ -0,0 +1,565 @@ | |||
1 | /* | ||
2 | * Written by: Patricia Gaughen, IBM Corporation | ||
3 | * | ||
4 | * Copyright (C) 2002, IBM Corp. | ||
5 | * Copyright (C) 2009, Red Hat, Inc., Ingo Molnar | ||
6 | * | ||
7 | * All rights reserved. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, but | ||
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
17 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
18 | * details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | * | ||
24 | * Send feedback to <gone@us.ibm.com> | ||
25 | */ | ||
26 | #include <linux/nodemask.h> | ||
27 | #include <linux/topology.h> | ||
28 | #include <linux/bootmem.h> | ||
29 | #include <linux/threads.h> | ||
30 | #include <linux/cpumask.h> | ||
31 | #include <linux/kernel.h> | ||
32 | #include <linux/mmzone.h> | ||
33 | #include <linux/module.h> | ||
34 | #include <linux/string.h> | ||
35 | #include <linux/init.h> | ||
36 | #include <linux/numa.h> | ||
37 | #include <linux/smp.h> | ||
38 | #include <linux/io.h> | ||
39 | #include <linux/mm.h> | ||
40 | |||
41 | #include <asm/processor.h> | ||
42 | #include <asm/fixmap.h> | ||
43 | #include <asm/mpspec.h> | ||
44 | #include <asm/numaq.h> | ||
45 | #include <asm/setup.h> | ||
46 | #include <asm/apic.h> | ||
47 | #include <asm/e820.h> | ||
48 | #include <asm/ipi.h> | ||
49 | |||
50 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) | ||
51 | |||
52 | int found_numaq; | ||
53 | |||
54 | /* | ||
55 | * Have to match translation table entries to main table entries by counter | ||
56 | * hence the mpc_record variable .... can't see a less disgusting way of | ||
57 | * doing this .... | ||
58 | */ | ||
59 | struct mpc_trans { | ||
60 | unsigned char mpc_type; | ||
61 | unsigned char trans_len; | ||
62 | unsigned char trans_type; | ||
63 | unsigned char trans_quad; | ||
64 | unsigned char trans_global; | ||
65 | unsigned char trans_local; | ||
66 | unsigned short trans_reserved; | ||
67 | }; | ||
68 | |||
69 | /* x86_quirks member */ | ||
70 | static int mpc_record; | ||
71 | |||
72 | static __cpuinitdata struct mpc_trans *translation_table[MAX_MPC_ENTRY]; | ||
73 | |||
74 | int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
75 | int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
76 | int quad_local_to_mp_bus_id[NR_CPUS/4][4]; | ||
77 | |||
78 | |||
79 | static inline void numaq_register_node(int node, struct sys_cfg_data *scd) | ||
80 | { | ||
81 | struct eachquadmem *eq = scd->eq + node; | ||
82 | |||
83 | node_set_online(node); | ||
84 | |||
85 | /* Convert to pages */ | ||
86 | node_start_pfn[node] = | ||
87 | MB_TO_PAGES(eq->hi_shrd_mem_start - eq->priv_mem_size); | ||
88 | |||
89 | node_end_pfn[node] = | ||
90 | MB_TO_PAGES(eq->hi_shrd_mem_start + eq->hi_shrd_mem_size); | ||
91 | |||
92 | e820_register_active_regions(node, node_start_pfn[node], | ||
93 | node_end_pfn[node]); | ||
94 | |||
95 | memory_present(node, node_start_pfn[node], node_end_pfn[node]); | ||
96 | |||
97 | node_remap_size[node] = node_memmap_size_bytes(node, | ||
98 | node_start_pfn[node], | ||
99 | node_end_pfn[node]); | ||
100 | } | ||
101 | |||
102 | /* | ||
103 | * Function: smp_dump_qct() | ||
104 | * | ||
105 | * Description: gets memory layout from the quad config table. This | ||
106 | * function also updates node_online_map with the nodes (quads) present. | ||
107 | */ | ||
108 | static void __init smp_dump_qct(void) | ||
109 | { | ||
110 | struct sys_cfg_data *scd; | ||
111 | int node; | ||
112 | |||
113 | scd = (void *)__va(SYS_CFG_DATA_PRIV_ADDR); | ||
114 | |||
115 | nodes_clear(node_online_map); | ||
116 | for_each_node(node) { | ||
117 | if (scd->quads_present31_0 & (1 << node)) | ||
118 | numaq_register_node(node, scd); | ||
119 | } | ||
120 | } | ||
121 | |||
122 | void __cpuinit numaq_tsc_disable(void) | ||
123 | { | ||
124 | if (!found_numaq) | ||
125 | return; | ||
126 | |||
127 | if (num_online_nodes() > 1) { | ||
128 | printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); | ||
129 | setup_clear_cpu_cap(X86_FEATURE_TSC); | ||
130 | } | ||
131 | } | ||
132 | |||
133 | static int __init numaq_pre_time_init(void) | ||
134 | { | ||
135 | numaq_tsc_disable(); | ||
136 | return 0; | ||
137 | } | ||
138 | |||
139 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
140 | { | ||
141 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
142 | } | ||
143 | |||
144 | /* x86_quirks member */ | ||
145 | static int mpc_apic_id(struct mpc_cpu *m) | ||
146 | { | ||
147 | int quad = translation_table[mpc_record]->trans_quad; | ||
148 | int logical_apicid = generate_logical_apicid(quad, m->apicid); | ||
149 | |||
150 | printk(KERN_DEBUG | ||
151 | "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
152 | m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8, | ||
153 | (m->cpufeature & CPU_MODEL_MASK) >> 4, | ||
154 | m->apicver, quad, logical_apicid); | ||
155 | |||
156 | return logical_apicid; | ||
157 | } | ||
158 | |||
159 | /* x86_quirks member */ | ||
160 | static void mpc_oem_bus_info(struct mpc_bus *m, char *name) | ||
161 | { | ||
162 | int quad = translation_table[mpc_record]->trans_quad; | ||
163 | int local = translation_table[mpc_record]->trans_local; | ||
164 | |||
165 | mp_bus_id_to_node[m->busid] = quad; | ||
166 | mp_bus_id_to_local[m->busid] = local; | ||
167 | |||
168 | printk(KERN_INFO "Bus #%d is %s (node %d)\n", m->busid, name, quad); | ||
169 | } | ||
170 | |||
171 | /* x86_quirks member */ | ||
172 | static void mpc_oem_pci_bus(struct mpc_bus *m) | ||
173 | { | ||
174 | int quad = translation_table[mpc_record]->trans_quad; | ||
175 | int local = translation_table[mpc_record]->trans_local; | ||
176 | |||
177 | quad_local_to_mp_bus_id[quad][local] = m->busid; | ||
178 | } | ||
179 | |||
180 | static void __init MP_translation_info(struct mpc_trans *m) | ||
181 | { | ||
182 | printk(KERN_INFO | ||
183 | "Translation: record %d, type %d, quad %d, global %d, local %d\n", | ||
184 | mpc_record, m->trans_type, m->trans_quad, m->trans_global, | ||
185 | m->trans_local); | ||
186 | |||
187 | if (mpc_record >= MAX_MPC_ENTRY) | ||
188 | printk(KERN_ERR "MAX_MPC_ENTRY exceeded!\n"); | ||
189 | else | ||
190 | translation_table[mpc_record] = m; /* stash this for later */ | ||
191 | |||
192 | if (m->trans_quad < MAX_NUMNODES && !node_online(m->trans_quad)) | ||
193 | node_set_online(m->trans_quad); | ||
194 | } | ||
195 | |||
196 | static int __init mpf_checksum(unsigned char *mp, int len) | ||
197 | { | ||
198 | int sum = 0; | ||
199 | |||
200 | while (len--) | ||
201 | sum += *mp++; | ||
202 | |||
203 | return sum & 0xFF; | ||
204 | } | ||
205 | |||
206 | /* | ||
207 | * Read/parse the MPC oem tables | ||
208 | */ | ||
209 | static void __init | ||
210 | smp_read_mpc_oem(struct mpc_oemtable *oemtable, unsigned short oemsize) | ||
211 | { | ||
212 | int count = sizeof(*oemtable); /* the header size */ | ||
213 | unsigned char *oemptr = ((unsigned char *)oemtable) + count; | ||
214 | |||
215 | mpc_record = 0; | ||
216 | printk(KERN_INFO | ||
217 | "Found an OEM MPC table at %8p - parsing it ... \n", oemtable); | ||
218 | |||
219 | if (memcmp(oemtable->signature, MPC_OEM_SIGNATURE, 4)) { | ||
220 | printk(KERN_WARNING | ||
221 | "SMP mpc oemtable: bad signature [%c%c%c%c]!\n", | ||
222 | oemtable->signature[0], oemtable->signature[1], | ||
223 | oemtable->signature[2], oemtable->signature[3]); | ||
224 | return; | ||
225 | } | ||
226 | |||
227 | if (mpf_checksum((unsigned char *)oemtable, oemtable->length)) { | ||
228 | printk(KERN_WARNING "SMP oem mptable: checksum error!\n"); | ||
229 | return; | ||
230 | } | ||
231 | |||
232 | while (count < oemtable->length) { | ||
233 | switch (*oemptr) { | ||
234 | case MP_TRANSLATION: | ||
235 | { | ||
236 | struct mpc_trans *m = (void *)oemptr; | ||
237 | |||
238 | MP_translation_info(m); | ||
239 | oemptr += sizeof(*m); | ||
240 | count += sizeof(*m); | ||
241 | ++mpc_record; | ||
242 | break; | ||
243 | } | ||
244 | default: | ||
245 | printk(KERN_WARNING | ||
246 | "Unrecognised OEM table entry type! - %d\n", | ||
247 | (int)*oemptr); | ||
248 | return; | ||
249 | } | ||
250 | } | ||
251 | } | ||
252 | |||
253 | static int __init numaq_setup_ioapic_ids(void) | ||
254 | { | ||
255 | /* so can skip it */ | ||
256 | return 1; | ||
257 | } | ||
258 | |||
259 | static int __init numaq_update_apic(void) | ||
260 | { | ||
261 | apic->wakeup_cpu = wakeup_secondary_cpu_via_nmi; | ||
262 | |||
263 | return 0; | ||
264 | } | ||
265 | |||
266 | static struct x86_quirks numaq_x86_quirks __initdata = { | ||
267 | .arch_pre_time_init = numaq_pre_time_init, | ||
268 | .arch_time_init = NULL, | ||
269 | .arch_pre_intr_init = NULL, | ||
270 | .arch_memory_setup = NULL, | ||
271 | .arch_intr_init = NULL, | ||
272 | .arch_trap_init = NULL, | ||
273 | .mach_get_smp_config = NULL, | ||
274 | .mach_find_smp_config = NULL, | ||
275 | .mpc_record = &mpc_record, | ||
276 | .mpc_apic_id = mpc_apic_id, | ||
277 | .mpc_oem_bus_info = mpc_oem_bus_info, | ||
278 | .mpc_oem_pci_bus = mpc_oem_pci_bus, | ||
279 | .smp_read_mpc_oem = smp_read_mpc_oem, | ||
280 | .setup_ioapic_ids = numaq_setup_ioapic_ids, | ||
281 | .update_apic = numaq_update_apic, | ||
282 | }; | ||
283 | |||
284 | static __init void early_check_numaq(void) | ||
285 | { | ||
286 | /* | ||
287 | * Find possible boot-time SMP configuration: | ||
288 | */ | ||
289 | early_find_smp_config(); | ||
290 | |||
291 | /* | ||
292 | * get boot-time SMP configuration: | ||
293 | */ | ||
294 | if (smp_found_config) | ||
295 | early_get_smp_config(); | ||
296 | |||
297 | if (found_numaq) | ||
298 | x86_quirks = &numaq_x86_quirks; | ||
299 | } | ||
300 | |||
301 | int __init get_memcfg_numaq(void) | ||
302 | { | ||
303 | early_check_numaq(); | ||
304 | if (!found_numaq) | ||
305 | return 0; | ||
306 | smp_dump_qct(); | ||
307 | |||
308 | return 1; | ||
309 | } | ||
310 | |||
311 | #define NUMAQ_APIC_DFR_VALUE (APIC_DFR_CLUSTER) | ||
312 | |||
313 | static inline unsigned int numaq_get_apic_id(unsigned long x) | ||
314 | { | ||
315 | return (x >> 24) & 0x0F; | ||
316 | } | ||
317 | |||
318 | static inline void numaq_send_IPI_mask(const struct cpumask *mask, int vector) | ||
319 | { | ||
320 | default_send_IPI_mask_sequence_logical(mask, vector); | ||
321 | } | ||
322 | |||
323 | static inline void numaq_send_IPI_allbutself(int vector) | ||
324 | { | ||
325 | default_send_IPI_mask_allbutself_logical(cpu_online_mask, vector); | ||
326 | } | ||
327 | |||
328 | static inline void numaq_send_IPI_all(int vector) | ||
329 | { | ||
330 | numaq_send_IPI_mask(cpu_online_mask, vector); | ||
331 | } | ||
332 | |||
333 | #define NUMAQ_TRAMPOLINE_PHYS_LOW (0x8) | ||
334 | #define NUMAQ_TRAMPOLINE_PHYS_HIGH (0xa) | ||
335 | |||
336 | /* | ||
337 | * Because we use NMIs rather than the INIT-STARTUP sequence to | ||
338 | * bootstrap the CPUs, the APIC may be in a weird state. Kick it: | ||
339 | */ | ||
340 | static inline void numaq_smp_callin_clear_local_apic(void) | ||
341 | { | ||
342 | clear_local_APIC(); | ||
343 | } | ||
344 | |||
345 | static inline const cpumask_t *numaq_target_cpus(void) | ||
346 | { | ||
347 | return &CPU_MASK_ALL; | ||
348 | } | ||
349 | |||
350 | static inline unsigned long | ||
351 | numaq_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
352 | { | ||
353 | return physid_isset(apicid, bitmap); | ||
354 | } | ||
355 | |||
356 | static inline unsigned long numaq_check_apicid_present(int bit) | ||
357 | { | ||
358 | return physid_isset(bit, phys_cpu_present_map); | ||
359 | } | ||
360 | |||
361 | static inline int numaq_apic_id_registered(void) | ||
362 | { | ||
363 | return 1; | ||
364 | } | ||
365 | |||
366 | static inline void numaq_init_apic_ldr(void) | ||
367 | { | ||
368 | /* Already done in NUMA-Q firmware */ | ||
369 | } | ||
370 | |||
371 | static inline void numaq_setup_apic_routing(void) | ||
372 | { | ||
373 | printk(KERN_INFO | ||
374 | "Enabling APIC mode: NUMA-Q. Using %d I/O APICs\n", | ||
375 | nr_ioapics); | ||
376 | } | ||
377 | |||
378 | /* | ||
379 | * Skip adding the timer int on secondary nodes, which causes | ||
380 | * a small but painful rift in the time-space continuum. | ||
381 | */ | ||
382 | static inline int numaq_multi_timer_check(int apic, int irq) | ||
383 | { | ||
384 | return apic != 0 && irq == 0; | ||
385 | } | ||
386 | |||
387 | static inline physid_mask_t numaq_ioapic_phys_id_map(physid_mask_t phys_map) | ||
388 | { | ||
389 | /* We don't have a good way to do this yet - hack */ | ||
390 | return physids_promote(0xFUL); | ||
391 | } | ||
392 | |||
393 | static inline int numaq_cpu_to_logical_apicid(int cpu) | ||
394 | { | ||
395 | if (cpu >= nr_cpu_ids) | ||
396 | return BAD_APICID; | ||
397 | return cpu_2_logical_apicid[cpu]; | ||
398 | } | ||
399 | |||
400 | /* | ||
401 | * Supporting over 60 cpus on NUMA-Q requires a locality-dependent | ||
402 | * cpu to APIC ID relation to properly interact with the intelligent | ||
403 | * mode of the cluster controller. | ||
404 | */ | ||
405 | static inline int numaq_cpu_present_to_apicid(int mps_cpu) | ||
406 | { | ||
407 | if (mps_cpu < 60) | ||
408 | return ((mps_cpu >> 2) << 4) | (1 << (mps_cpu & 0x3)); | ||
409 | else | ||
410 | return BAD_APICID; | ||
411 | } | ||
412 | |||
413 | static inline int numaq_apicid_to_node(int logical_apicid) | ||
414 | { | ||
415 | return logical_apicid >> 4; | ||
416 | } | ||
417 | |||
418 | static inline physid_mask_t numaq_apicid_to_cpu_present(int logical_apicid) | ||
419 | { | ||
420 | int node = numaq_apicid_to_node(logical_apicid); | ||
421 | int cpu = __ffs(logical_apicid & 0xf); | ||
422 | |||
423 | return physid_mask_of_physid(cpu + 4*node); | ||
424 | } | ||
425 | |||
426 | /* Where the IO area was mapped on multiquad, always 0 otherwise */ | ||
427 | void *xquad_portio; | ||
428 | |||
429 | static inline int numaq_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
430 | { | ||
431 | return 1; | ||
432 | } | ||
433 | |||
434 | /* | ||
435 | * We use physical apicids here, not logical, so just return the default | ||
436 | * physical broadcast to stop people from breaking us | ||
437 | */ | ||
438 | static inline unsigned int numaq_cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
439 | { | ||
440 | return 0x0F; | ||
441 | } | ||
442 | |||
443 | static inline unsigned int | ||
444 | numaq_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | ||
445 | const struct cpumask *andmask) | ||
446 | { | ||
447 | return 0x0F; | ||
448 | } | ||
449 | |||
450 | /* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */ | ||
451 | static inline int numaq_phys_pkg_id(int cpuid_apic, int index_msb) | ||
452 | { | ||
453 | return cpuid_apic >> index_msb; | ||
454 | } | ||
455 | |||
456 | static int | ||
457 | numaq_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
458 | { | ||
459 | if (strncmp(oem, "IBM NUMA", 8)) | ||
460 | printk(KERN_ERR "Warning! Not a NUMA-Q system!\n"); | ||
461 | else | ||
462 | found_numaq = 1; | ||
463 | |||
464 | return found_numaq; | ||
465 | } | ||
466 | |||
467 | static int probe_numaq(void) | ||
468 | { | ||
469 | /* already know from get_memcfg_numaq() */ | ||
470 | return found_numaq; | ||
471 | } | ||
472 | |||
473 | static void numaq_vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
474 | { | ||
475 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
476 | * specified in the interrupt destination when using lowest | ||
477 | * priority interrupt delivery mode. | ||
478 | * | ||
479 | * In particular there was a hyperthreading cpu observed to | ||
480 | * deliver interrupts to the wrong hyperthread when only one | ||
481 | * hyperthread was specified in the interrupt desitination. | ||
482 | */ | ||
483 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | ||
484 | } | ||
485 | |||
486 | static void numaq_setup_portio_remap(void) | ||
487 | { | ||
488 | int num_quads = num_online_nodes(); | ||
489 | |||
490 | if (num_quads <= 1) | ||
491 | return; | ||
492 | |||
493 | printk(KERN_INFO | ||
494 | "Remapping cross-quad port I/O for %d quads\n", num_quads); | ||
495 | |||
496 | xquad_portio = ioremap(XQUAD_PORTIO_BASE, num_quads*XQUAD_PORTIO_QUAD); | ||
497 | |||
498 | printk(KERN_INFO | ||
499 | "xquad_portio vaddr 0x%08lx, len %08lx\n", | ||
500 | (u_long) xquad_portio, (u_long) num_quads*XQUAD_PORTIO_QUAD); | ||
501 | } | ||
502 | |||
503 | struct apic apic_numaq = { | ||
504 | |||
505 | .name = "NUMAQ", | ||
506 | .probe = probe_numaq, | ||
507 | .acpi_madt_oem_check = NULL, | ||
508 | .apic_id_registered = numaq_apic_id_registered, | ||
509 | |||
510 | .irq_delivery_mode = dest_LowestPrio, | ||
511 | /* physical delivery on LOCAL quad: */ | ||
512 | .irq_dest_mode = 0, | ||
513 | |||
514 | .target_cpus = numaq_target_cpus, | ||
515 | .disable_esr = 1, | ||
516 | .dest_logical = APIC_DEST_LOGICAL, | ||
517 | .check_apicid_used = numaq_check_apicid_used, | ||
518 | .check_apicid_present = numaq_check_apicid_present, | ||
519 | |||
520 | .vector_allocation_domain = numaq_vector_allocation_domain, | ||
521 | .init_apic_ldr = numaq_init_apic_ldr, | ||
522 | |||
523 | .ioapic_phys_id_map = numaq_ioapic_phys_id_map, | ||
524 | .setup_apic_routing = numaq_setup_apic_routing, | ||
525 | .multi_timer_check = numaq_multi_timer_check, | ||
526 | .apicid_to_node = numaq_apicid_to_node, | ||
527 | .cpu_to_logical_apicid = numaq_cpu_to_logical_apicid, | ||
528 | .cpu_present_to_apicid = numaq_cpu_present_to_apicid, | ||
529 | .apicid_to_cpu_present = numaq_apicid_to_cpu_present, | ||
530 | .setup_portio_remap = numaq_setup_portio_remap, | ||
531 | .check_phys_apicid_present = numaq_check_phys_apicid_present, | ||
532 | .enable_apic_mode = NULL, | ||
533 | .phys_pkg_id = numaq_phys_pkg_id, | ||
534 | .mps_oem_check = numaq_mps_oem_check, | ||
535 | |||
536 | .get_apic_id = numaq_get_apic_id, | ||
537 | .set_apic_id = NULL, | ||
538 | .apic_id_mask = 0x0F << 24, | ||
539 | |||
540 | .cpu_mask_to_apicid = numaq_cpu_mask_to_apicid, | ||
541 | .cpu_mask_to_apicid_and = numaq_cpu_mask_to_apicid_and, | ||
542 | |||
543 | .send_IPI_mask = numaq_send_IPI_mask, | ||
544 | .send_IPI_mask_allbutself = NULL, | ||
545 | .send_IPI_allbutself = numaq_send_IPI_allbutself, | ||
546 | .send_IPI_all = numaq_send_IPI_all, | ||
547 | .send_IPI_self = default_send_IPI_self, | ||
548 | |||
549 | .wakeup_cpu = NULL, | ||
550 | .trampoline_phys_low = NUMAQ_TRAMPOLINE_PHYS_LOW, | ||
551 | .trampoline_phys_high = NUMAQ_TRAMPOLINE_PHYS_HIGH, | ||
552 | |||
553 | /* We don't do anything here because we use NMI's to boot instead */ | ||
554 | .wait_for_init_deassert = NULL, | ||
555 | |||
556 | .smp_callin_clear_local_apic = numaq_smp_callin_clear_local_apic, | ||
557 | .inquire_remote_apic = NULL, | ||
558 | |||
559 | .read = native_apic_mem_read, | ||
560 | .write = native_apic_mem_write, | ||
561 | .icr_read = native_apic_icr_read, | ||
562 | .icr_write = native_apic_icr_write, | ||
563 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
564 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
565 | }; | ||
diff --git a/arch/x86/kernel/apic/probe_32.c b/arch/x86/kernel/apic/probe_32.c new file mode 100644 index 000000000000..3a730fa574bb --- /dev/null +++ b/arch/x86/kernel/apic/probe_32.c | |||
@@ -0,0 +1,295 @@ | |||
1 | /* | ||
2 | * Default generic APIC driver. This handles up to 8 CPUs. | ||
3 | * | ||
4 | * Copyright 2003 Andi Kleen, SuSE Labs. | ||
5 | * Subject to the GNU Public License, v.2 | ||
6 | * | ||
7 | * Generic x86 APIC driver probe layer. | ||
8 | */ | ||
9 | #include <linux/threads.h> | ||
10 | #include <linux/cpumask.h> | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/string.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/ctype.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/errno.h> | ||
17 | #include <asm/fixmap.h> | ||
18 | #include <asm/mpspec.h> | ||
19 | #include <asm/apicdef.h> | ||
20 | #include <asm/apic.h> | ||
21 | #include <asm/setup.h> | ||
22 | |||
23 | #include <linux/threads.h> | ||
24 | #include <linux/cpumask.h> | ||
25 | #include <asm/mpspec.h> | ||
26 | #include <asm/fixmap.h> | ||
27 | #include <asm/apicdef.h> | ||
28 | #include <linux/kernel.h> | ||
29 | #include <linux/string.h> | ||
30 | #include <linux/smp.h> | ||
31 | #include <linux/init.h> | ||
32 | #include <asm/ipi.h> | ||
33 | |||
34 | #include <linux/smp.h> | ||
35 | #include <linux/init.h> | ||
36 | #include <linux/interrupt.h> | ||
37 | #include <asm/acpi.h> | ||
38 | #include <asm/e820.h> | ||
39 | #include <asm/setup.h> | ||
40 | |||
41 | #ifdef CONFIG_HOTPLUG_CPU | ||
42 | #define DEFAULT_SEND_IPI (1) | ||
43 | #else | ||
44 | #define DEFAULT_SEND_IPI (0) | ||
45 | #endif | ||
46 | |||
47 | int no_broadcast = DEFAULT_SEND_IPI; | ||
48 | |||
49 | static __init int no_ipi_broadcast(char *str) | ||
50 | { | ||
51 | get_option(&str, &no_broadcast); | ||
52 | pr_info("Using %s mode\n", | ||
53 | no_broadcast ? "No IPI Broadcast" : "IPI Broadcast"); | ||
54 | return 1; | ||
55 | } | ||
56 | __setup("no_ipi_broadcast=", no_ipi_broadcast); | ||
57 | |||
58 | static int __init print_ipi_mode(void) | ||
59 | { | ||
60 | pr_info("Using IPI %s mode\n", | ||
61 | no_broadcast ? "No-Shortcut" : "Shortcut"); | ||
62 | return 0; | ||
63 | } | ||
64 | late_initcall(print_ipi_mode); | ||
65 | |||
66 | void default_setup_apic_routing(void) | ||
67 | { | ||
68 | #ifdef CONFIG_X86_IO_APIC | ||
69 | printk(KERN_INFO | ||
70 | "Enabling APIC mode: Flat. Using %d I/O APICs\n", | ||
71 | nr_ioapics); | ||
72 | #endif | ||
73 | } | ||
74 | |||
75 | static void default_vector_allocation_domain(int cpu, struct cpumask *retmask) | ||
76 | { | ||
77 | /* | ||
78 | * Careful. Some cpus do not strictly honor the set of cpus | ||
79 | * specified in the interrupt destination when using lowest | ||
80 | * priority interrupt delivery mode. | ||
81 | * | ||
82 | * In particular there was a hyperthreading cpu observed to | ||
83 | * deliver interrupts to the wrong hyperthread when only one | ||
84 | * hyperthread was specified in the interrupt desitination. | ||
85 | */ | ||
86 | *retmask = (cpumask_t) { { [0] = APIC_ALL_CPUS } }; | ||
87 | } | ||
88 | |||
89 | /* should be called last. */ | ||
90 | static int probe_default(void) | ||
91 | { | ||
92 | return 1; | ||
93 | } | ||
94 | |||
95 | struct apic apic_default = { | ||
96 | |||
97 | .name = "default", | ||
98 | .probe = probe_default, | ||
99 | .acpi_madt_oem_check = NULL, | ||
100 | .apic_id_registered = default_apic_id_registered, | ||
101 | |||
102 | .irq_delivery_mode = dest_LowestPrio, | ||
103 | /* logical delivery broadcast to all CPUs: */ | ||
104 | .irq_dest_mode = 1, | ||
105 | |||
106 | .target_cpus = default_target_cpus, | ||
107 | .disable_esr = 0, | ||
108 | .dest_logical = APIC_DEST_LOGICAL, | ||
109 | .check_apicid_used = default_check_apicid_used, | ||
110 | .check_apicid_present = default_check_apicid_present, | ||
111 | |||
112 | .vector_allocation_domain = default_vector_allocation_domain, | ||
113 | .init_apic_ldr = default_init_apic_ldr, | ||
114 | |||
115 | .ioapic_phys_id_map = default_ioapic_phys_id_map, | ||
116 | .setup_apic_routing = default_setup_apic_routing, | ||
117 | .multi_timer_check = NULL, | ||
118 | .apicid_to_node = default_apicid_to_node, | ||
119 | .cpu_to_logical_apicid = default_cpu_to_logical_apicid, | ||
120 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | ||
121 | .apicid_to_cpu_present = default_apicid_to_cpu_present, | ||
122 | .setup_portio_remap = NULL, | ||
123 | .check_phys_apicid_present = default_check_phys_apicid_present, | ||
124 | .enable_apic_mode = NULL, | ||
125 | .phys_pkg_id = default_phys_pkg_id, | ||
126 | .mps_oem_check = NULL, | ||
127 | |||
128 | .get_apic_id = default_get_apic_id, | ||
129 | .set_apic_id = NULL, | ||
130 | .apic_id_mask = 0x0F << 24, | ||
131 | |||
132 | .cpu_mask_to_apicid = default_cpu_mask_to_apicid, | ||
133 | .cpu_mask_to_apicid_and = default_cpu_mask_to_apicid_and, | ||
134 | |||
135 | .send_IPI_mask = default_send_IPI_mask_logical, | ||
136 | .send_IPI_mask_allbutself = default_send_IPI_mask_allbutself_logical, | ||
137 | .send_IPI_allbutself = default_send_IPI_allbutself, | ||
138 | .send_IPI_all = default_send_IPI_all, | ||
139 | .send_IPI_self = default_send_IPI_self, | ||
140 | |||
141 | .wakeup_cpu = NULL, | ||
142 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
143 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
144 | |||
145 | .wait_for_init_deassert = default_wait_for_init_deassert, | ||
146 | |||
147 | .smp_callin_clear_local_apic = NULL, | ||
148 | .inquire_remote_apic = default_inquire_remote_apic, | ||
149 | |||
150 | .read = native_apic_mem_read, | ||
151 | .write = native_apic_mem_write, | ||
152 | .icr_read = native_apic_icr_read, | ||
153 | .icr_write = native_apic_icr_write, | ||
154 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
155 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
156 | }; | ||
157 | |||
158 | extern struct apic apic_numaq; | ||
159 | extern struct apic apic_summit; | ||
160 | extern struct apic apic_bigsmp; | ||
161 | extern struct apic apic_es7000; | ||
162 | extern struct apic apic_default; | ||
163 | |||
164 | struct apic *apic = &apic_default; | ||
165 | EXPORT_SYMBOL_GPL(apic); | ||
166 | |||
167 | static struct apic *apic_probe[] __initdata = { | ||
168 | #ifdef CONFIG_X86_NUMAQ | ||
169 | &apic_numaq, | ||
170 | #endif | ||
171 | #ifdef CONFIG_X86_SUMMIT | ||
172 | &apic_summit, | ||
173 | #endif | ||
174 | #ifdef CONFIG_X86_BIGSMP | ||
175 | &apic_bigsmp, | ||
176 | #endif | ||
177 | #ifdef CONFIG_X86_ES7000 | ||
178 | &apic_es7000, | ||
179 | #endif | ||
180 | &apic_default, /* must be last */ | ||
181 | NULL, | ||
182 | }; | ||
183 | |||
184 | static int cmdline_apic __initdata; | ||
185 | static int __init parse_apic(char *arg) | ||
186 | { | ||
187 | int i; | ||
188 | |||
189 | if (!arg) | ||
190 | return -EINVAL; | ||
191 | |||
192 | for (i = 0; apic_probe[i]; i++) { | ||
193 | if (!strcmp(apic_probe[i]->name, arg)) { | ||
194 | apic = apic_probe[i]; | ||
195 | cmdline_apic = 1; | ||
196 | return 0; | ||
197 | } | ||
198 | } | ||
199 | |||
200 | if (x86_quirks->update_apic) | ||
201 | x86_quirks->update_apic(); | ||
202 | |||
203 | /* Parsed again by __setup for debug/verbose */ | ||
204 | return 0; | ||
205 | } | ||
206 | early_param("apic", parse_apic); | ||
207 | |||
208 | void __init generic_bigsmp_probe(void) | ||
209 | { | ||
210 | #ifdef CONFIG_X86_BIGSMP | ||
211 | /* | ||
212 | * This routine is used to switch to bigsmp mode when | ||
213 | * - There is no apic= option specified by the user | ||
214 | * - generic_apic_probe() has chosen apic_default as the sub_arch | ||
215 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support | ||
216 | */ | ||
217 | |||
218 | if (!cmdline_apic && apic == &apic_default) { | ||
219 | if (apic_bigsmp.probe()) { | ||
220 | apic = &apic_bigsmp; | ||
221 | if (x86_quirks->update_apic) | ||
222 | x86_quirks->update_apic(); | ||
223 | printk(KERN_INFO "Overriding APIC driver with %s\n", | ||
224 | apic->name); | ||
225 | } | ||
226 | } | ||
227 | #endif | ||
228 | } | ||
229 | |||
230 | void __init generic_apic_probe(void) | ||
231 | { | ||
232 | if (!cmdline_apic) { | ||
233 | int i; | ||
234 | for (i = 0; apic_probe[i]; i++) { | ||
235 | if (apic_probe[i]->probe()) { | ||
236 | apic = apic_probe[i]; | ||
237 | break; | ||
238 | } | ||
239 | } | ||
240 | /* Not visible without early console */ | ||
241 | if (!apic_probe[i]) | ||
242 | panic("Didn't find an APIC driver"); | ||
243 | |||
244 | if (x86_quirks->update_apic) | ||
245 | x86_quirks->update_apic(); | ||
246 | } | ||
247 | printk(KERN_INFO "Using APIC driver %s\n", apic->name); | ||
248 | } | ||
249 | |||
250 | /* These functions can switch the APIC even after the initial ->probe() */ | ||
251 | |||
252 | int __init | ||
253 | generic_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
254 | { | ||
255 | int i; | ||
256 | |||
257 | for (i = 0; apic_probe[i]; ++i) { | ||
258 | if (!apic_probe[i]->mps_oem_check) | ||
259 | continue; | ||
260 | if (!apic_probe[i]->mps_oem_check(mpc, oem, productid)) | ||
261 | continue; | ||
262 | |||
263 | if (!cmdline_apic) { | ||
264 | apic = apic_probe[i]; | ||
265 | if (x86_quirks->update_apic) | ||
266 | x86_quirks->update_apic(); | ||
267 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", | ||
268 | apic->name); | ||
269 | } | ||
270 | return 1; | ||
271 | } | ||
272 | return 0; | ||
273 | } | ||
274 | |||
275 | int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
276 | { | ||
277 | int i; | ||
278 | |||
279 | for (i = 0; apic_probe[i]; ++i) { | ||
280 | if (!apic_probe[i]->acpi_madt_oem_check) | ||
281 | continue; | ||
282 | if (!apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) | ||
283 | continue; | ||
284 | |||
285 | if (!cmdline_apic) { | ||
286 | apic = apic_probe[i]; | ||
287 | if (x86_quirks->update_apic) | ||
288 | x86_quirks->update_apic(); | ||
289 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", | ||
290 | apic->name); | ||
291 | } | ||
292 | return 1; | ||
293 | } | ||
294 | return 0; | ||
295 | } | ||
diff --git a/arch/x86/kernel/genapic_64.c b/arch/x86/kernel/apic/probe_64.c index e656c2721154..e7c163661c77 100644 --- a/arch/x86/kernel/genapic_64.c +++ b/arch/x86/kernel/apic/probe_64.c | |||
@@ -19,24 +19,27 @@ | |||
19 | #include <linux/dmar.h> | 19 | #include <linux/dmar.h> |
20 | 20 | ||
21 | #include <asm/smp.h> | 21 | #include <asm/smp.h> |
22 | #include <asm/apic.h> | ||
22 | #include <asm/ipi.h> | 23 | #include <asm/ipi.h> |
23 | #include <asm/genapic.h> | ||
24 | #include <asm/setup.h> | 24 | #include <asm/setup.h> |
25 | 25 | ||
26 | extern struct genapic apic_flat; | 26 | extern struct apic apic_flat; |
27 | extern struct genapic apic_physflat; | 27 | extern struct apic apic_physflat; |
28 | extern struct genapic apic_x2xpic_uv_x; | 28 | extern struct apic apic_x2xpic_uv_x; |
29 | extern struct genapic apic_x2apic_phys; | 29 | extern struct apic apic_x2apic_phys; |
30 | extern struct genapic apic_x2apic_cluster; | 30 | extern struct apic apic_x2apic_cluster; |
31 | 31 | ||
32 | struct genapic __read_mostly *genapic = &apic_flat; | 32 | struct apic __read_mostly *apic = &apic_flat; |
33 | EXPORT_SYMBOL_GPL(apic); | ||
33 | 34 | ||
34 | static struct genapic *apic_probe[] __initdata = { | 35 | static struct apic *apic_probe[] __initdata = { |
35 | #ifdef CONFIG_X86_UV | 36 | #ifdef CONFIG_X86_UV |
36 | &apic_x2apic_uv_x, | 37 | &apic_x2apic_uv_x, |
37 | #endif | 38 | #endif |
39 | #ifdef CONFIG_X86_X2APIC | ||
38 | &apic_x2apic_phys, | 40 | &apic_x2apic_phys, |
39 | &apic_x2apic_cluster, | 41 | &apic_x2apic_cluster, |
42 | #endif | ||
40 | &apic_physflat, | 43 | &apic_physflat, |
41 | NULL, | 44 | NULL, |
42 | }; | 45 | }; |
@@ -44,39 +47,48 @@ static struct genapic *apic_probe[] __initdata = { | |||
44 | /* | 47 | /* |
45 | * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. | 48 | * Check the APIC IDs in bios_cpu_apicid and choose the APIC mode. |
46 | */ | 49 | */ |
47 | void __init setup_apic_routing(void) | 50 | void __init default_setup_apic_routing(void) |
48 | { | 51 | { |
49 | if (genapic == &apic_x2apic_phys || genapic == &apic_x2apic_cluster) { | 52 | #ifdef CONFIG_X86_X2APIC |
50 | if (!intr_remapping_enabled) | 53 | if (x2apic && (apic != &apic_x2apic_phys && |
51 | genapic = &apic_flat; | 54 | #ifdef CONFIG_X86_UV |
55 | apic != &apic_x2apic_uv_x && | ||
56 | #endif | ||
57 | apic != &apic_x2apic_cluster)) { | ||
58 | if (x2apic_phys) | ||
59 | apic = &apic_x2apic_phys; | ||
60 | else | ||
61 | apic = &apic_x2apic_cluster; | ||
62 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); | ||
52 | } | 63 | } |
64 | #endif | ||
53 | 65 | ||
54 | if (genapic == &apic_flat) { | 66 | if (apic == &apic_flat) { |
55 | if (max_physical_apicid >= 8) | 67 | if (max_physical_apicid >= 8) |
56 | genapic = &apic_physflat; | 68 | apic = &apic_physflat; |
57 | printk(KERN_INFO "Setting APIC routing to %s\n", genapic->name); | 69 | printk(KERN_INFO "Setting APIC routing to %s\n", apic->name); |
58 | } | 70 | } |
59 | 71 | ||
60 | if (x86_quirks->update_genapic) | 72 | if (x86_quirks->update_apic) |
61 | x86_quirks->update_genapic(); | 73 | x86_quirks->update_apic(); |
62 | } | 74 | } |
63 | 75 | ||
64 | /* Same for both flat and physical. */ | 76 | /* Same for both flat and physical. */ |
65 | 77 | ||
66 | void apic_send_IPI_self(int vector) | 78 | void apic_send_IPI_self(int vector) |
67 | { | 79 | { |
68 | __send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); | 80 | __default_send_IPI_shortcut(APIC_DEST_SELF, vector, APIC_DEST_PHYSICAL); |
69 | } | 81 | } |
70 | 82 | ||
71 | int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 83 | int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
72 | { | 84 | { |
73 | int i; | 85 | int i; |
74 | 86 | ||
75 | for (i = 0; apic_probe[i]; ++i) { | 87 | for (i = 0; apic_probe[i]; ++i) { |
76 | if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { | 88 | if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { |
77 | genapic = apic_probe[i]; | 89 | apic = apic_probe[i]; |
78 | printk(KERN_INFO "Setting APIC routing to %s.\n", | 90 | printk(KERN_INFO "Setting APIC routing to %s.\n", |
79 | genapic->name); | 91 | apic->name); |
80 | return 1; | 92 | return 1; |
81 | } | 93 | } |
82 | } | 94 | } |
diff --git a/arch/x86/kernel/apic/summit_32.c b/arch/x86/kernel/apic/summit_32.c new file mode 100644 index 000000000000..cfe7b09015d8 --- /dev/null +++ b/arch/x86/kernel/apic/summit_32.c | |||
@@ -0,0 +1,601 @@ | |||
1 | /* | ||
2 | * IBM Summit-Specific Code | ||
3 | * | ||
4 | * Written By: Matthew Dobson, IBM Corporation | ||
5 | * | ||
6 | * Copyright (c) 2003 IBM Corp. | ||
7 | * | ||
8 | * All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or (at | ||
13 | * your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, but | ||
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
18 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
19 | * details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | * | ||
25 | * Send feedback to <colpatch@us.ibm.com> | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | #include <linux/mm.h> | ||
30 | #include <linux/init.h> | ||
31 | #include <asm/io.h> | ||
32 | #include <asm/bios_ebda.h> | ||
33 | |||
34 | /* | ||
35 | * APIC driver for the IBM "Summit" chipset. | ||
36 | */ | ||
37 | #include <linux/threads.h> | ||
38 | #include <linux/cpumask.h> | ||
39 | #include <asm/mpspec.h> | ||
40 | #include <asm/apic.h> | ||
41 | #include <asm/smp.h> | ||
42 | #include <asm/fixmap.h> | ||
43 | #include <asm/apicdef.h> | ||
44 | #include <asm/ipi.h> | ||
45 | #include <linux/kernel.h> | ||
46 | #include <linux/string.h> | ||
47 | #include <linux/init.h> | ||
48 | #include <linux/gfp.h> | ||
49 | #include <linux/smp.h> | ||
50 | |||
51 | static inline unsigned summit_get_apic_id(unsigned long x) | ||
52 | { | ||
53 | return (x >> 24) & 0xFF; | ||
54 | } | ||
55 | |||
56 | static inline void summit_send_IPI_mask(const cpumask_t *mask, int vector) | ||
57 | { | ||
58 | default_send_IPI_mask_sequence_logical(mask, vector); | ||
59 | } | ||
60 | |||
61 | static inline void summit_send_IPI_allbutself(int vector) | ||
62 | { | ||
63 | cpumask_t mask = cpu_online_map; | ||
64 | cpu_clear(smp_processor_id(), mask); | ||
65 | |||
66 | if (!cpus_empty(mask)) | ||
67 | summit_send_IPI_mask(&mask, vector); | ||
68 | } | ||
69 | |||
70 | static inline void summit_send_IPI_all(int vector) | ||
71 | { | ||
72 | summit_send_IPI_mask(&cpu_online_map, vector); | ||
73 | } | ||
74 | |||
75 | #include <asm/tsc.h> | ||
76 | |||
77 | extern int use_cyclone; | ||
78 | |||
79 | #ifdef CONFIG_X86_SUMMIT_NUMA | ||
80 | extern void setup_summit(void); | ||
81 | #else | ||
82 | #define setup_summit() {} | ||
83 | #endif | ||
84 | |||
85 | static inline int | ||
86 | summit_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
87 | { | ||
88 | if (!strncmp(oem, "IBM ENSW", 8) && | ||
89 | (!strncmp(productid, "VIGIL SMP", 9) | ||
90 | || !strncmp(productid, "EXA", 3) | ||
91 | || !strncmp(productid, "RUTHLESS SMP", 12))){ | ||
92 | mark_tsc_unstable("Summit based system"); | ||
93 | use_cyclone = 1; /*enable cyclone-timer*/ | ||
94 | setup_summit(); | ||
95 | return 1; | ||
96 | } | ||
97 | return 0; | ||
98 | } | ||
99 | |||
100 | /* Hook from generic ACPI tables.c */ | ||
101 | static inline int summit_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
102 | { | ||
103 | if (!strncmp(oem_id, "IBM", 3) && | ||
104 | (!strncmp(oem_table_id, "SERVIGIL", 8) | ||
105 | || !strncmp(oem_table_id, "EXA", 3))){ | ||
106 | mark_tsc_unstable("Summit based system"); | ||
107 | use_cyclone = 1; /*enable cyclone-timer*/ | ||
108 | setup_summit(); | ||
109 | return 1; | ||
110 | } | ||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | struct rio_table_hdr { | ||
115 | unsigned char version; /* Version number of this data structure */ | ||
116 | /* Version 3 adds chassis_num & WP_index */ | ||
117 | unsigned char num_scal_dev; /* # of Scalability devices (Twisters for Vigil) */ | ||
118 | unsigned char num_rio_dev; /* # of RIO I/O devices (Cyclones and Winnipegs) */ | ||
119 | } __attribute__((packed)); | ||
120 | |||
121 | struct scal_detail { | ||
122 | unsigned char node_id; /* Scalability Node ID */ | ||
123 | unsigned long CBAR; /* Address of 1MB register space */ | ||
124 | unsigned char port0node; /* Node ID port connected to: 0xFF=None */ | ||
125 | unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
126 | unsigned char port1node; /* Node ID port connected to: 0xFF = None */ | ||
127 | unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
128 | unsigned char port2node; /* Node ID port connected to: 0xFF = None */ | ||
129 | unsigned char port2port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
130 | unsigned char chassis_num; /* 1 based Chassis number (1 = boot node) */ | ||
131 | } __attribute__((packed)); | ||
132 | |||
133 | struct rio_detail { | ||
134 | unsigned char node_id; /* RIO Node ID */ | ||
135 | unsigned long BBAR; /* Address of 1MB register space */ | ||
136 | unsigned char type; /* Type of device */ | ||
137 | unsigned char owner_id; /* For WPEG: Node ID of Cyclone that owns this WPEG*/ | ||
138 | /* For CYC: Node ID of Twister that owns this CYC */ | ||
139 | unsigned char port0node; /* Node ID port connected to: 0xFF=None */ | ||
140 | unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
141 | unsigned char port1node; /* Node ID port connected to: 0xFF=None */ | ||
142 | unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */ | ||
143 | unsigned char first_slot; /* For WPEG: Lowest slot number below this WPEG */ | ||
144 | /* For CYC: 0 */ | ||
145 | unsigned char status; /* For WPEG: Bit 0 = 1 : the XAPIC is used */ | ||
146 | /* = 0 : the XAPIC is not used, ie:*/ | ||
147 | /* ints fwded to another XAPIC */ | ||
148 | /* Bits1:7 Reserved */ | ||
149 | /* For CYC: Bits0:7 Reserved */ | ||
150 | unsigned char WP_index; /* For WPEG: WPEG instance index - lower ones have */ | ||
151 | /* lower slot numbers/PCI bus numbers */ | ||
152 | /* For CYC: No meaning */ | ||
153 | unsigned char chassis_num; /* 1 based Chassis number */ | ||
154 | /* For LookOut WPEGs this field indicates the */ | ||
155 | /* Expansion Chassis #, enumerated from Boot */ | ||
156 | /* Node WPEG external port, then Boot Node CYC */ | ||
157 | /* external port, then Next Vigil chassis WPEG */ | ||
158 | /* external port, etc. */ | ||
159 | /* Shared Lookouts have only 1 chassis number (the */ | ||
160 | /* first one assigned) */ | ||
161 | } __attribute__((packed)); | ||
162 | |||
163 | |||
164 | typedef enum { | ||
165 | CompatTwister = 0, /* Compatibility Twister */ | ||
166 | AltTwister = 1, /* Alternate Twister of internal 8-way */ | ||
167 | CompatCyclone = 2, /* Compatibility Cyclone */ | ||
168 | AltCyclone = 3, /* Alternate Cyclone of internal 8-way */ | ||
169 | CompatWPEG = 4, /* Compatibility WPEG */ | ||
170 | AltWPEG = 5, /* Second Planar WPEG */ | ||
171 | LookOutAWPEG = 6, /* LookOut WPEG */ | ||
172 | LookOutBWPEG = 7, /* LookOut WPEG */ | ||
173 | } node_type; | ||
174 | |||
175 | static inline int is_WPEG(struct rio_detail *rio){ | ||
176 | return (rio->type == CompatWPEG || rio->type == AltWPEG || | ||
177 | rio->type == LookOutAWPEG || rio->type == LookOutBWPEG); | ||
178 | } | ||
179 | |||
180 | |||
181 | /* In clustered mode, the high nibble of APIC ID is a cluster number. | ||
182 | * The low nibble is a 4-bit bitmap. */ | ||
183 | #define XAPIC_DEST_CPUS_SHIFT 4 | ||
184 | #define XAPIC_DEST_CPUS_MASK ((1u << XAPIC_DEST_CPUS_SHIFT) - 1) | ||
185 | #define XAPIC_DEST_CLUSTER_MASK (XAPIC_DEST_CPUS_MASK << XAPIC_DEST_CPUS_SHIFT) | ||
186 | |||
187 | #define SUMMIT_APIC_DFR_VALUE (APIC_DFR_CLUSTER) | ||
188 | |||
189 | static inline const cpumask_t *summit_target_cpus(void) | ||
190 | { | ||
191 | /* CPU_MASK_ALL (0xff) has undefined behaviour with | ||
192 | * dest_LowestPrio mode logical clustered apic interrupt routing | ||
193 | * Just start on cpu 0. IRQ balancing will spread load | ||
194 | */ | ||
195 | return &cpumask_of_cpu(0); | ||
196 | } | ||
197 | |||
198 | static inline unsigned long | ||
199 | summit_check_apicid_used(physid_mask_t bitmap, int apicid) | ||
200 | { | ||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | /* we don't use the phys_cpu_present_map to indicate apicid presence */ | ||
205 | static inline unsigned long summit_check_apicid_present(int bit) | ||
206 | { | ||
207 | return 1; | ||
208 | } | ||
209 | |||
210 | static inline void summit_init_apic_ldr(void) | ||
211 | { | ||
212 | unsigned long val, id; | ||
213 | int count = 0; | ||
214 | u8 my_id = (u8)hard_smp_processor_id(); | ||
215 | u8 my_cluster = APIC_CLUSTER(my_id); | ||
216 | #ifdef CONFIG_SMP | ||
217 | u8 lid; | ||
218 | int i; | ||
219 | |||
220 | /* Create logical APIC IDs by counting CPUs already in cluster. */ | ||
221 | for (count = 0, i = nr_cpu_ids; --i >= 0; ) { | ||
222 | lid = cpu_2_logical_apicid[i]; | ||
223 | if (lid != BAD_APICID && APIC_CLUSTER(lid) == my_cluster) | ||
224 | ++count; | ||
225 | } | ||
226 | #endif | ||
227 | /* We only have a 4 wide bitmap in cluster mode. If a deranged | ||
228 | * BIOS puts 5 CPUs in one APIC cluster, we're hosed. */ | ||
229 | BUG_ON(count >= XAPIC_DEST_CPUS_SHIFT); | ||
230 | id = my_cluster | (1UL << count); | ||
231 | apic_write(APIC_DFR, SUMMIT_APIC_DFR_VALUE); | ||
232 | val = apic_read(APIC_LDR) & ~APIC_LDR_MASK; | ||
233 | val |= SET_APIC_LOGICAL_ID(id); | ||
234 | apic_write(APIC_LDR, val); | ||
235 | } | ||
236 | |||
237 | static inline int summit_apic_id_registered(void) | ||
238 | { | ||
239 | return 1; | ||
240 | } | ||
241 | |||
242 | static inline void summit_setup_apic_routing(void) | ||
243 | { | ||
244 | printk("Enabling APIC mode: Summit. Using %d I/O APICs\n", | ||
245 | nr_ioapics); | ||
246 | } | ||
247 | |||
248 | static inline int summit_apicid_to_node(int logical_apicid) | ||
249 | { | ||
250 | #ifdef CONFIG_SMP | ||
251 | return apicid_2_node[hard_smp_processor_id()]; | ||
252 | #else | ||
253 | return 0; | ||
254 | #endif | ||
255 | } | ||
256 | |||
257 | /* Mapping from cpu number to logical apicid */ | ||
258 | static inline int summit_cpu_to_logical_apicid(int cpu) | ||
259 | { | ||
260 | #ifdef CONFIG_SMP | ||
261 | if (cpu >= nr_cpu_ids) | ||
262 | return BAD_APICID; | ||
263 | return cpu_2_logical_apicid[cpu]; | ||
264 | #else | ||
265 | return logical_smp_processor_id(); | ||
266 | #endif | ||
267 | } | ||
268 | |||
269 | static inline int summit_cpu_present_to_apicid(int mps_cpu) | ||
270 | { | ||
271 | if (mps_cpu < nr_cpu_ids) | ||
272 | return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); | ||
273 | else | ||
274 | return BAD_APICID; | ||
275 | } | ||
276 | |||
277 | static inline physid_mask_t | ||
278 | summit_ioapic_phys_id_map(physid_mask_t phys_id_map) | ||
279 | { | ||
280 | /* For clustered we don't have a good way to do this yet - hack */ | ||
281 | return physids_promote(0x0F); | ||
282 | } | ||
283 | |||
284 | static inline physid_mask_t summit_apicid_to_cpu_present(int apicid) | ||
285 | { | ||
286 | return physid_mask_of_physid(0); | ||
287 | } | ||
288 | |||
289 | static inline void summit_setup_portio_remap(void) | ||
290 | { | ||
291 | } | ||
292 | |||
293 | static inline int summit_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
294 | { | ||
295 | return 1; | ||
296 | } | ||
297 | |||
298 | static inline unsigned int summit_cpu_mask_to_apicid(const cpumask_t *cpumask) | ||
299 | { | ||
300 | int cpus_found = 0; | ||
301 | int num_bits_set; | ||
302 | int apicid; | ||
303 | int cpu; | ||
304 | |||
305 | num_bits_set = cpus_weight(*cpumask); | ||
306 | /* Return id to all */ | ||
307 | if (num_bits_set >= nr_cpu_ids) | ||
308 | return 0xFF; | ||
309 | /* | ||
310 | * The cpus in the mask must all be on the apic cluster. If are not | ||
311 | * on the same apicid cluster return default value of target_cpus(): | ||
312 | */ | ||
313 | cpu = first_cpu(*cpumask); | ||
314 | apicid = summit_cpu_to_logical_apicid(cpu); | ||
315 | |||
316 | while (cpus_found < num_bits_set) { | ||
317 | if (cpu_isset(cpu, *cpumask)) { | ||
318 | int new_apicid = summit_cpu_to_logical_apicid(cpu); | ||
319 | |||
320 | if (APIC_CLUSTER(apicid) != APIC_CLUSTER(new_apicid)) { | ||
321 | printk ("%s: Not a valid mask!\n", __func__); | ||
322 | |||
323 | return 0xFF; | ||
324 | } | ||
325 | apicid = apicid | new_apicid; | ||
326 | cpus_found++; | ||
327 | } | ||
328 | cpu++; | ||
329 | } | ||
330 | return apicid; | ||
331 | } | ||
332 | |||
333 | static inline unsigned int | ||
334 | summit_cpu_mask_to_apicid_and(const struct cpumask *inmask, | ||
335 | const struct cpumask *andmask) | ||
336 | { | ||
337 | int apicid = summit_cpu_to_logical_apicid(0); | ||
338 | cpumask_var_t cpumask; | ||
339 | |||
340 | if (!alloc_cpumask_var(&cpumask, GFP_ATOMIC)) | ||
341 | return apicid; | ||
342 | |||
343 | cpumask_and(cpumask, inmask, andmask); | ||
344 | cpumask_and(cpumask, cpumask, cpu_online_mask); | ||
345 | apicid = summit_cpu_mask_to_apicid(cpumask); | ||
346 | |||
347 | free_cpumask_var(cpumask); | ||
348 | |||
349 | return apicid; | ||
350 | } | ||
351 | |||
352 | /* | ||
353 | * cpuid returns the value latched in the HW at reset, not the APIC ID | ||
354 | * register's value. For any box whose BIOS changes APIC IDs, like | ||
355 | * clustered APIC systems, we must use hard_smp_processor_id. | ||
356 | * | ||
357 | * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID. | ||
358 | */ | ||
359 | static inline int summit_phys_pkg_id(int cpuid_apic, int index_msb) | ||
360 | { | ||
361 | return hard_smp_processor_id() >> index_msb; | ||
362 | } | ||
363 | |||
364 | static int probe_summit(void) | ||
365 | { | ||
366 | /* probed later in mptable/ACPI hooks */ | ||
367 | return 0; | ||
368 | } | ||
369 | |||
370 | static void summit_vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
371 | { | ||
372 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
373 | * specified in the interrupt destination when using lowest | ||
374 | * priority interrupt delivery mode. | ||
375 | * | ||
376 | * In particular there was a hyperthreading cpu observed to | ||
377 | * deliver interrupts to the wrong hyperthread when only one | ||
378 | * hyperthread was specified in the interrupt desitination. | ||
379 | */ | ||
380 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | ||
381 | } | ||
382 | |||
383 | #ifdef CONFIG_X86_SUMMIT_NUMA | ||
384 | static struct rio_table_hdr *rio_table_hdr __initdata; | ||
385 | static struct scal_detail *scal_devs[MAX_NUMNODES] __initdata; | ||
386 | static struct rio_detail *rio_devs[MAX_NUMNODES*4] __initdata; | ||
387 | |||
388 | #ifndef CONFIG_X86_NUMAQ | ||
389 | static int mp_bus_id_to_node[MAX_MP_BUSSES] __initdata; | ||
390 | #endif | ||
391 | |||
392 | static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus) | ||
393 | { | ||
394 | int twister = 0, node = 0; | ||
395 | int i, bus, num_buses; | ||
396 | |||
397 | for (i = 0; i < rio_table_hdr->num_rio_dev; i++) { | ||
398 | if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id) { | ||
399 | twister = rio_devs[i]->owner_id; | ||
400 | break; | ||
401 | } | ||
402 | } | ||
403 | if (i == rio_table_hdr->num_rio_dev) { | ||
404 | printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __func__); | ||
405 | return last_bus; | ||
406 | } | ||
407 | |||
408 | for (i = 0; i < rio_table_hdr->num_scal_dev; i++) { | ||
409 | if (scal_devs[i]->node_id == twister) { | ||
410 | node = scal_devs[i]->node_id; | ||
411 | break; | ||
412 | } | ||
413 | } | ||
414 | if (i == rio_table_hdr->num_scal_dev) { | ||
415 | printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __func__); | ||
416 | return last_bus; | ||
417 | } | ||
418 | |||
419 | switch (rio_devs[wpeg_num]->type) { | ||
420 | case CompatWPEG: | ||
421 | /* | ||
422 | * The Compatibility Winnipeg controls the 2 legacy buses, | ||
423 | * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case | ||
424 | * a PCI-PCI bridge card is used in either slot: total 5 buses. | ||
425 | */ | ||
426 | num_buses = 5; | ||
427 | break; | ||
428 | case AltWPEG: | ||
429 | /* | ||
430 | * The Alternate Winnipeg controls the 2 133MHz buses [1 slot | ||
431 | * each], their 2 "extra" buses, the 100MHz bus [2 slots] and | ||
432 | * the "extra" buses for each of those slots: total 7 buses. | ||
433 | */ | ||
434 | num_buses = 7; | ||
435 | break; | ||
436 | case LookOutAWPEG: | ||
437 | case LookOutBWPEG: | ||
438 | /* | ||
439 | * A Lookout Winnipeg controls 3 100MHz buses [2 slots each] | ||
440 | * & the "extra" buses for each of those slots: total 9 buses. | ||
441 | */ | ||
442 | num_buses = 9; | ||
443 | break; | ||
444 | default: | ||
445 | printk(KERN_INFO "%s: Unsupported Winnipeg type!\n", __func__); | ||
446 | return last_bus; | ||
447 | } | ||
448 | |||
449 | for (bus = last_bus; bus < last_bus + num_buses; bus++) | ||
450 | mp_bus_id_to_node[bus] = node; | ||
451 | return bus; | ||
452 | } | ||
453 | |||
454 | static int __init build_detail_arrays(void) | ||
455 | { | ||
456 | unsigned long ptr; | ||
457 | int i, scal_detail_size, rio_detail_size; | ||
458 | |||
459 | if (rio_table_hdr->num_scal_dev > MAX_NUMNODES) { | ||
460 | printk(KERN_WARNING "%s: MAX_NUMNODES too low! Defined as %d, but system has %d nodes.\n", __func__, MAX_NUMNODES, rio_table_hdr->num_scal_dev); | ||
461 | return 0; | ||
462 | } | ||
463 | |||
464 | switch (rio_table_hdr->version) { | ||
465 | default: | ||
466 | printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __func__, rio_table_hdr->version); | ||
467 | return 0; | ||
468 | case 2: | ||
469 | scal_detail_size = 11; | ||
470 | rio_detail_size = 13; | ||
471 | break; | ||
472 | case 3: | ||
473 | scal_detail_size = 12; | ||
474 | rio_detail_size = 15; | ||
475 | break; | ||
476 | } | ||
477 | |||
478 | ptr = (unsigned long)rio_table_hdr + 3; | ||
479 | for (i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size) | ||
480 | scal_devs[i] = (struct scal_detail *)ptr; | ||
481 | |||
482 | for (i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size) | ||
483 | rio_devs[i] = (struct rio_detail *)ptr; | ||
484 | |||
485 | return 1; | ||
486 | } | ||
487 | |||
488 | void __init setup_summit(void) | ||
489 | { | ||
490 | unsigned long ptr; | ||
491 | unsigned short offset; | ||
492 | int i, next_wpeg, next_bus = 0; | ||
493 | |||
494 | /* The pointer to the EBDA is stored in the word @ phys 0x40E(40:0E) */ | ||
495 | ptr = get_bios_ebda(); | ||
496 | ptr = (unsigned long)phys_to_virt(ptr); | ||
497 | |||
498 | rio_table_hdr = NULL; | ||
499 | offset = 0x180; | ||
500 | while (offset) { | ||
501 | /* The block id is stored in the 2nd word */ | ||
502 | if (*((unsigned short *)(ptr + offset + 2)) == 0x4752) { | ||
503 | /* set the pointer past the offset & block id */ | ||
504 | rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4); | ||
505 | break; | ||
506 | } | ||
507 | /* The next offset is stored in the 1st word. 0 means no more */ | ||
508 | offset = *((unsigned short *)(ptr + offset)); | ||
509 | } | ||
510 | if (!rio_table_hdr) { | ||
511 | printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __func__); | ||
512 | return; | ||
513 | } | ||
514 | |||
515 | if (!build_detail_arrays()) | ||
516 | return; | ||
517 | |||
518 | /* The first Winnipeg we're looking for has an index of 0 */ | ||
519 | next_wpeg = 0; | ||
520 | do { | ||
521 | for (i = 0; i < rio_table_hdr->num_rio_dev; i++) { | ||
522 | if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg) { | ||
523 | /* It's the Winnipeg we're looking for! */ | ||
524 | next_bus = setup_pci_node_map_for_wpeg(i, next_bus); | ||
525 | next_wpeg++; | ||
526 | break; | ||
527 | } | ||
528 | } | ||
529 | /* | ||
530 | * If we go through all Rio devices and don't find one with | ||
531 | * the next index, it means we've found all the Winnipegs, | ||
532 | * and thus all the PCI buses. | ||
533 | */ | ||
534 | if (i == rio_table_hdr->num_rio_dev) | ||
535 | next_wpeg = 0; | ||
536 | } while (next_wpeg != 0); | ||
537 | } | ||
538 | #endif | ||
539 | |||
540 | struct apic apic_summit = { | ||
541 | |||
542 | .name = "summit", | ||
543 | .probe = probe_summit, | ||
544 | .acpi_madt_oem_check = summit_acpi_madt_oem_check, | ||
545 | .apic_id_registered = summit_apic_id_registered, | ||
546 | |||
547 | .irq_delivery_mode = dest_LowestPrio, | ||
548 | /* logical delivery broadcast to all CPUs: */ | ||
549 | .irq_dest_mode = 1, | ||
550 | |||
551 | .target_cpus = summit_target_cpus, | ||
552 | .disable_esr = 1, | ||
553 | .dest_logical = APIC_DEST_LOGICAL, | ||
554 | .check_apicid_used = summit_check_apicid_used, | ||
555 | .check_apicid_present = summit_check_apicid_present, | ||
556 | |||
557 | .vector_allocation_domain = summit_vector_allocation_domain, | ||
558 | .init_apic_ldr = summit_init_apic_ldr, | ||
559 | |||
560 | .ioapic_phys_id_map = summit_ioapic_phys_id_map, | ||
561 | .setup_apic_routing = summit_setup_apic_routing, | ||
562 | .multi_timer_check = NULL, | ||
563 | .apicid_to_node = summit_apicid_to_node, | ||
564 | .cpu_to_logical_apicid = summit_cpu_to_logical_apicid, | ||
565 | .cpu_present_to_apicid = summit_cpu_present_to_apicid, | ||
566 | .apicid_to_cpu_present = summit_apicid_to_cpu_present, | ||
567 | .setup_portio_remap = NULL, | ||
568 | .check_phys_apicid_present = summit_check_phys_apicid_present, | ||
569 | .enable_apic_mode = NULL, | ||
570 | .phys_pkg_id = summit_phys_pkg_id, | ||
571 | .mps_oem_check = summit_mps_oem_check, | ||
572 | |||
573 | .get_apic_id = summit_get_apic_id, | ||
574 | .set_apic_id = NULL, | ||
575 | .apic_id_mask = 0xFF << 24, | ||
576 | |||
577 | .cpu_mask_to_apicid = summit_cpu_mask_to_apicid, | ||
578 | .cpu_mask_to_apicid_and = summit_cpu_mask_to_apicid_and, | ||
579 | |||
580 | .send_IPI_mask = summit_send_IPI_mask, | ||
581 | .send_IPI_mask_allbutself = NULL, | ||
582 | .send_IPI_allbutself = summit_send_IPI_allbutself, | ||
583 | .send_IPI_all = summit_send_IPI_all, | ||
584 | .send_IPI_self = default_send_IPI_self, | ||
585 | |||
586 | .wakeup_cpu = NULL, | ||
587 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
588 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
589 | |||
590 | .wait_for_init_deassert = default_wait_for_init_deassert, | ||
591 | |||
592 | .smp_callin_clear_local_apic = NULL, | ||
593 | .inquire_remote_apic = default_inquire_remote_apic, | ||
594 | |||
595 | .read = native_apic_mem_read, | ||
596 | .write = native_apic_mem_write, | ||
597 | .icr_read = native_apic_icr_read, | ||
598 | .icr_write = native_apic_icr_write, | ||
599 | .wait_icr_idle = native_apic_wait_icr_idle, | ||
600 | .safe_wait_icr_idle = native_safe_apic_wait_icr_idle, | ||
601 | }; | ||
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c index 6ce497cc372d..354b9c45601d 100644 --- a/arch/x86/kernel/genx2apic_cluster.c +++ b/arch/x86/kernel/apic/x2apic_cluster.c | |||
@@ -7,17 +7,14 @@ | |||
7 | #include <linux/dmar.h> | 7 | #include <linux/dmar.h> |
8 | 8 | ||
9 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
10 | #include <asm/apic.h> | ||
10 | #include <asm/ipi.h> | 11 | #include <asm/ipi.h> |
11 | #include <asm/genapic.h> | ||
12 | 12 | ||
13 | DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid); | 13 | DEFINE_PER_CPU(u32, x86_cpu_to_logical_apicid); |
14 | 14 | ||
15 | static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 15 | static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
16 | { | 16 | { |
17 | if (cpu_has_x2apic) | 17 | return x2apic_enabled(); |
18 | return 1; | ||
19 | |||
20 | return 0; | ||
21 | } | 18 | } |
22 | 19 | ||
23 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ | 20 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ |
@@ -36,8 +33,8 @@ static void x2apic_vector_allocation_domain(int cpu, struct cpumask *retmask) | |||
36 | cpumask_set_cpu(cpu, retmask); | 33 | cpumask_set_cpu(cpu, retmask); |
37 | } | 34 | } |
38 | 35 | ||
39 | static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, | 36 | static void |
40 | unsigned int dest) | 37 | __x2apic_send_IPI_dest(unsigned int apicid, int vector, unsigned int dest) |
41 | { | 38 | { |
42 | unsigned long cfg; | 39 | unsigned long cfg; |
43 | 40 | ||
@@ -46,7 +43,7 @@ static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, | |||
46 | /* | 43 | /* |
47 | * send the IPI. | 44 | * send the IPI. |
48 | */ | 45 | */ |
49 | x2apic_icr_write(cfg, apicid); | 46 | native_x2apic_icr_write(cfg, apicid); |
50 | } | 47 | } |
51 | 48 | ||
52 | /* | 49 | /* |
@@ -57,45 +54,50 @@ static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, | |||
57 | */ | 54 | */ |
58 | static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) | 55 | static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) |
59 | { | 56 | { |
60 | unsigned long flags; | ||
61 | unsigned long query_cpu; | 57 | unsigned long query_cpu; |
58 | unsigned long flags; | ||
62 | 59 | ||
63 | local_irq_save(flags); | 60 | local_irq_save(flags); |
64 | for_each_cpu(query_cpu, mask) | 61 | for_each_cpu(query_cpu, mask) { |
65 | __x2apic_send_IPI_dest( | 62 | __x2apic_send_IPI_dest( |
66 | per_cpu(x86_cpu_to_logical_apicid, query_cpu), | 63 | per_cpu(x86_cpu_to_logical_apicid, query_cpu), |
67 | vector, APIC_DEST_LOGICAL); | 64 | vector, apic->dest_logical); |
65 | } | ||
68 | local_irq_restore(flags); | 66 | local_irq_restore(flags); |
69 | } | 67 | } |
70 | 68 | ||
71 | static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, | 69 | static void |
72 | int vector) | 70 | x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, int vector) |
73 | { | 71 | { |
74 | unsigned long flags; | ||
75 | unsigned long query_cpu; | ||
76 | unsigned long this_cpu = smp_processor_id(); | 72 | unsigned long this_cpu = smp_processor_id(); |
73 | unsigned long query_cpu; | ||
74 | unsigned long flags; | ||
77 | 75 | ||
78 | local_irq_save(flags); | 76 | local_irq_save(flags); |
79 | for_each_cpu(query_cpu, mask) | 77 | for_each_cpu(query_cpu, mask) { |
80 | if (query_cpu != this_cpu) | 78 | if (query_cpu == this_cpu) |
81 | __x2apic_send_IPI_dest( | 79 | continue; |
80 | __x2apic_send_IPI_dest( | ||
82 | per_cpu(x86_cpu_to_logical_apicid, query_cpu), | 81 | per_cpu(x86_cpu_to_logical_apicid, query_cpu), |
83 | vector, APIC_DEST_LOGICAL); | 82 | vector, apic->dest_logical); |
83 | } | ||
84 | local_irq_restore(flags); | 84 | local_irq_restore(flags); |
85 | } | 85 | } |
86 | 86 | ||
87 | static void x2apic_send_IPI_allbutself(int vector) | 87 | static void x2apic_send_IPI_allbutself(int vector) |
88 | { | 88 | { |
89 | unsigned long flags; | ||
90 | unsigned long query_cpu; | ||
91 | unsigned long this_cpu = smp_processor_id(); | 89 | unsigned long this_cpu = smp_processor_id(); |
90 | unsigned long query_cpu; | ||
91 | unsigned long flags; | ||
92 | 92 | ||
93 | local_irq_save(flags); | 93 | local_irq_save(flags); |
94 | for_each_online_cpu(query_cpu) | 94 | for_each_online_cpu(query_cpu) { |
95 | if (query_cpu != this_cpu) | 95 | if (query_cpu == this_cpu) |
96 | __x2apic_send_IPI_dest( | 96 | continue; |
97 | __x2apic_send_IPI_dest( | ||
97 | per_cpu(x86_cpu_to_logical_apicid, query_cpu), | 98 | per_cpu(x86_cpu_to_logical_apicid, query_cpu), |
98 | vector, APIC_DEST_LOGICAL); | 99 | vector, apic->dest_logical); |
100 | } | ||
99 | local_irq_restore(flags); | 101 | local_irq_restore(flags); |
100 | } | 102 | } |
101 | 103 | ||
@@ -111,21 +113,21 @@ static int x2apic_apic_id_registered(void) | |||
111 | 113 | ||
112 | static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask) | 114 | static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask) |
113 | { | 115 | { |
114 | int cpu; | ||
115 | |||
116 | /* | 116 | /* |
117 | * We're using fixed IRQ delivery, can only return one logical APIC ID. | 117 | * We're using fixed IRQ delivery, can only return one logical APIC ID. |
118 | * May as well be the first. | 118 | * May as well be the first. |
119 | */ | 119 | */ |
120 | cpu = cpumask_first(cpumask); | 120 | int cpu = cpumask_first(cpumask); |
121 | |||
121 | if ((unsigned)cpu < nr_cpu_ids) | 122 | if ((unsigned)cpu < nr_cpu_ids) |
122 | return per_cpu(x86_cpu_to_logical_apicid, cpu); | 123 | return per_cpu(x86_cpu_to_logical_apicid, cpu); |
123 | else | 124 | else |
124 | return BAD_APICID; | 125 | return BAD_APICID; |
125 | } | 126 | } |
126 | 127 | ||
127 | static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | 128 | static unsigned int |
128 | const struct cpumask *andmask) | 129 | x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, |
130 | const struct cpumask *andmask) | ||
129 | { | 131 | { |
130 | int cpu; | 132 | int cpu; |
131 | 133 | ||
@@ -133,15 +135,18 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
133 | * We're using fixed IRQ delivery, can only return one logical APIC ID. | 135 | * We're using fixed IRQ delivery, can only return one logical APIC ID. |
134 | * May as well be the first. | 136 | * May as well be the first. |
135 | */ | 137 | */ |
136 | for_each_cpu_and(cpu, cpumask, andmask) | 138 | for_each_cpu_and(cpu, cpumask, andmask) { |
137 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | 139 | if (cpumask_test_cpu(cpu, cpu_online_mask)) |
138 | break; | 140 | break; |
141 | } | ||
142 | |||
139 | if (cpu < nr_cpu_ids) | 143 | if (cpu < nr_cpu_ids) |
140 | return per_cpu(x86_cpu_to_logical_apicid, cpu); | 144 | return per_cpu(x86_cpu_to_logical_apicid, cpu); |
145 | |||
141 | return BAD_APICID; | 146 | return BAD_APICID; |
142 | } | 147 | } |
143 | 148 | ||
144 | static unsigned int get_apic_id(unsigned long x) | 149 | static unsigned int x2apic_cluster_phys_get_apic_id(unsigned long x) |
145 | { | 150 | { |
146 | unsigned int id; | 151 | unsigned int id; |
147 | 152 | ||
@@ -157,7 +162,7 @@ static unsigned long set_apic_id(unsigned int id) | |||
157 | return x; | 162 | return x; |
158 | } | 163 | } |
159 | 164 | ||
160 | static unsigned int phys_pkg_id(int index_msb) | 165 | static int x2apic_cluster_phys_pkg_id(int initial_apicid, int index_msb) |
161 | { | 166 | { |
162 | return current_cpu_data.initial_apicid >> index_msb; | 167 | return current_cpu_data.initial_apicid >> index_msb; |
163 | } | 168 | } |
@@ -172,27 +177,64 @@ static void init_x2apic_ldr(void) | |||
172 | int cpu = smp_processor_id(); | 177 | int cpu = smp_processor_id(); |
173 | 178 | ||
174 | per_cpu(x86_cpu_to_logical_apicid, cpu) = apic_read(APIC_LDR); | 179 | per_cpu(x86_cpu_to_logical_apicid, cpu) = apic_read(APIC_LDR); |
175 | return; | 180 | } |
176 | } | 181 | |
177 | 182 | struct apic apic_x2apic_cluster = { | |
178 | struct genapic apic_x2apic_cluster = { | 183 | |
179 | .name = "cluster x2apic", | 184 | .name = "cluster x2apic", |
180 | .acpi_madt_oem_check = x2apic_acpi_madt_oem_check, | 185 | .probe = NULL, |
181 | .int_delivery_mode = dest_LowestPrio, | 186 | .acpi_madt_oem_check = x2apic_acpi_madt_oem_check, |
182 | .int_dest_mode = (APIC_DEST_LOGICAL != 0), | 187 | .apic_id_registered = x2apic_apic_id_registered, |
183 | .target_cpus = x2apic_target_cpus, | 188 | |
184 | .vector_allocation_domain = x2apic_vector_allocation_domain, | 189 | .irq_delivery_mode = dest_LowestPrio, |
185 | .apic_id_registered = x2apic_apic_id_registered, | 190 | .irq_dest_mode = 1, /* logical */ |
186 | .init_apic_ldr = init_x2apic_ldr, | 191 | |
187 | .send_IPI_all = x2apic_send_IPI_all, | 192 | .target_cpus = x2apic_target_cpus, |
188 | .send_IPI_allbutself = x2apic_send_IPI_allbutself, | 193 | .disable_esr = 0, |
189 | .send_IPI_mask = x2apic_send_IPI_mask, | 194 | .dest_logical = APIC_DEST_LOGICAL, |
190 | .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, | 195 | .check_apicid_used = NULL, |
191 | .send_IPI_self = x2apic_send_IPI_self, | 196 | .check_apicid_present = NULL, |
192 | .cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid, | 197 | |
193 | .cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and, | 198 | .vector_allocation_domain = x2apic_vector_allocation_domain, |
194 | .phys_pkg_id = phys_pkg_id, | 199 | .init_apic_ldr = init_x2apic_ldr, |
195 | .get_apic_id = get_apic_id, | 200 | |
196 | .set_apic_id = set_apic_id, | 201 | .ioapic_phys_id_map = NULL, |
197 | .apic_id_mask = (0xFFFFFFFFu), | 202 | .setup_apic_routing = NULL, |
203 | .multi_timer_check = NULL, | ||
204 | .apicid_to_node = NULL, | ||
205 | .cpu_to_logical_apicid = NULL, | ||
206 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | ||
207 | .apicid_to_cpu_present = NULL, | ||
208 | .setup_portio_remap = NULL, | ||
209 | .check_phys_apicid_present = default_check_phys_apicid_present, | ||
210 | .enable_apic_mode = NULL, | ||
211 | .phys_pkg_id = x2apic_cluster_phys_pkg_id, | ||
212 | .mps_oem_check = NULL, | ||
213 | |||
214 | .get_apic_id = x2apic_cluster_phys_get_apic_id, | ||
215 | .set_apic_id = set_apic_id, | ||
216 | .apic_id_mask = 0xFFFFFFFFu, | ||
217 | |||
218 | .cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid, | ||
219 | .cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and, | ||
220 | |||
221 | .send_IPI_mask = x2apic_send_IPI_mask, | ||
222 | .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, | ||
223 | .send_IPI_allbutself = x2apic_send_IPI_allbutself, | ||
224 | .send_IPI_all = x2apic_send_IPI_all, | ||
225 | .send_IPI_self = x2apic_send_IPI_self, | ||
226 | |||
227 | .wakeup_cpu = NULL, | ||
228 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
229 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
230 | .wait_for_init_deassert = NULL, | ||
231 | .smp_callin_clear_local_apic = NULL, | ||
232 | .inquire_remote_apic = NULL, | ||
233 | |||
234 | .read = native_apic_msr_read, | ||
235 | .write = native_apic_msr_write, | ||
236 | .icr_read = native_x2apic_icr_read, | ||
237 | .icr_write = native_x2apic_icr_write, | ||
238 | .wait_icr_idle = native_x2apic_wait_icr_idle, | ||
239 | .safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle, | ||
198 | }; | 240 | }; |
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/apic/x2apic_phys.c index 21bcc0e098ba..5bcb174409bc 100644 --- a/arch/x86/kernel/genx2apic_phys.c +++ b/arch/x86/kernel/apic/x2apic_phys.c | |||
@@ -7,10 +7,10 @@ | |||
7 | #include <linux/dmar.h> | 7 | #include <linux/dmar.h> |
8 | 8 | ||
9 | #include <asm/smp.h> | 9 | #include <asm/smp.h> |
10 | #include <asm/apic.h> | ||
10 | #include <asm/ipi.h> | 11 | #include <asm/ipi.h> |
11 | #include <asm/genapic.h> | ||
12 | 12 | ||
13 | static int x2apic_phys; | 13 | int x2apic_phys; |
14 | 14 | ||
15 | static int set_x2apic_phys_mode(char *arg) | 15 | static int set_x2apic_phys_mode(char *arg) |
16 | { | 16 | { |
@@ -21,10 +21,10 @@ early_param("x2apic_phys", set_x2apic_phys_mode); | |||
21 | 21 | ||
22 | static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 22 | static int x2apic_acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
23 | { | 23 | { |
24 | if (cpu_has_x2apic && x2apic_phys) | 24 | if (x2apic_phys) |
25 | return 1; | 25 | return x2apic_enabled(); |
26 | 26 | else | |
27 | return 0; | 27 | return 0; |
28 | } | 28 | } |
29 | 29 | ||
30 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ | 30 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ |
@@ -50,13 +50,13 @@ static void __x2apic_send_IPI_dest(unsigned int apicid, int vector, | |||
50 | /* | 50 | /* |
51 | * send the IPI. | 51 | * send the IPI. |
52 | */ | 52 | */ |
53 | x2apic_icr_write(cfg, apicid); | 53 | native_x2apic_icr_write(cfg, apicid); |
54 | } | 54 | } |
55 | 55 | ||
56 | static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) | 56 | static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) |
57 | { | 57 | { |
58 | unsigned long flags; | ||
59 | unsigned long query_cpu; | 58 | unsigned long query_cpu; |
59 | unsigned long flags; | ||
60 | 60 | ||
61 | local_irq_save(flags); | 61 | local_irq_save(flags); |
62 | for_each_cpu(query_cpu, mask) { | 62 | for_each_cpu(query_cpu, mask) { |
@@ -66,12 +66,12 @@ static void x2apic_send_IPI_mask(const struct cpumask *mask, int vector) | |||
66 | local_irq_restore(flags); | 66 | local_irq_restore(flags); |
67 | } | 67 | } |
68 | 68 | ||
69 | static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, | 69 | static void |
70 | int vector) | 70 | x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, int vector) |
71 | { | 71 | { |
72 | unsigned long flags; | ||
73 | unsigned long query_cpu; | ||
74 | unsigned long this_cpu = smp_processor_id(); | 72 | unsigned long this_cpu = smp_processor_id(); |
73 | unsigned long query_cpu; | ||
74 | unsigned long flags; | ||
75 | 75 | ||
76 | local_irq_save(flags); | 76 | local_irq_save(flags); |
77 | for_each_cpu(query_cpu, mask) { | 77 | for_each_cpu(query_cpu, mask) { |
@@ -85,16 +85,17 @@ static void x2apic_send_IPI_mask_allbutself(const struct cpumask *mask, | |||
85 | 85 | ||
86 | static void x2apic_send_IPI_allbutself(int vector) | 86 | static void x2apic_send_IPI_allbutself(int vector) |
87 | { | 87 | { |
88 | unsigned long flags; | ||
89 | unsigned long query_cpu; | ||
90 | unsigned long this_cpu = smp_processor_id(); | 88 | unsigned long this_cpu = smp_processor_id(); |
89 | unsigned long query_cpu; | ||
90 | unsigned long flags; | ||
91 | 91 | ||
92 | local_irq_save(flags); | 92 | local_irq_save(flags); |
93 | for_each_online_cpu(query_cpu) | 93 | for_each_online_cpu(query_cpu) { |
94 | if (query_cpu != this_cpu) | 94 | if (query_cpu == this_cpu) |
95 | __x2apic_send_IPI_dest( | 95 | continue; |
96 | per_cpu(x86_cpu_to_apicid, query_cpu), | 96 | __x2apic_send_IPI_dest(per_cpu(x86_cpu_to_apicid, query_cpu), |
97 | vector, APIC_DEST_PHYSICAL); | 97 | vector, APIC_DEST_PHYSICAL); |
98 | } | ||
98 | local_irq_restore(flags); | 99 | local_irq_restore(flags); |
99 | } | 100 | } |
100 | 101 | ||
@@ -110,21 +111,21 @@ static int x2apic_apic_id_registered(void) | |||
110 | 111 | ||
111 | static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask) | 112 | static unsigned int x2apic_cpu_mask_to_apicid(const struct cpumask *cpumask) |
112 | { | 113 | { |
113 | int cpu; | ||
114 | |||
115 | /* | 114 | /* |
116 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 115 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
117 | * May as well be the first. | 116 | * May as well be the first. |
118 | */ | 117 | */ |
119 | cpu = cpumask_first(cpumask); | 118 | int cpu = cpumask_first(cpumask); |
119 | |||
120 | if ((unsigned)cpu < nr_cpu_ids) | 120 | if ((unsigned)cpu < nr_cpu_ids) |
121 | return per_cpu(x86_cpu_to_apicid, cpu); | 121 | return per_cpu(x86_cpu_to_apicid, cpu); |
122 | else | 122 | else |
123 | return BAD_APICID; | 123 | return BAD_APICID; |
124 | } | 124 | } |
125 | 125 | ||
126 | static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | 126 | static unsigned int |
127 | const struct cpumask *andmask) | 127 | x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, |
128 | const struct cpumask *andmask) | ||
128 | { | 129 | { |
129 | int cpu; | 130 | int cpu; |
130 | 131 | ||
@@ -132,31 +133,28 @@ static unsigned int x2apic_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
132 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 133 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
133 | * May as well be the first. | 134 | * May as well be the first. |
134 | */ | 135 | */ |
135 | for_each_cpu_and(cpu, cpumask, andmask) | 136 | for_each_cpu_and(cpu, cpumask, andmask) { |
136 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | 137 | if (cpumask_test_cpu(cpu, cpu_online_mask)) |
137 | break; | 138 | break; |
139 | } | ||
140 | |||
138 | if (cpu < nr_cpu_ids) | 141 | if (cpu < nr_cpu_ids) |
139 | return per_cpu(x86_cpu_to_apicid, cpu); | 142 | return per_cpu(x86_cpu_to_apicid, cpu); |
143 | |||
140 | return BAD_APICID; | 144 | return BAD_APICID; |
141 | } | 145 | } |
142 | 146 | ||
143 | static unsigned int get_apic_id(unsigned long x) | 147 | static unsigned int x2apic_phys_get_apic_id(unsigned long x) |
144 | { | 148 | { |
145 | unsigned int id; | 149 | return x; |
146 | |||
147 | id = x; | ||
148 | return id; | ||
149 | } | 150 | } |
150 | 151 | ||
151 | static unsigned long set_apic_id(unsigned int id) | 152 | static unsigned long set_apic_id(unsigned int id) |
152 | { | 153 | { |
153 | unsigned long x; | 154 | return id; |
154 | |||
155 | x = id; | ||
156 | return x; | ||
157 | } | 155 | } |
158 | 156 | ||
159 | static unsigned int phys_pkg_id(int index_msb) | 157 | static int x2apic_phys_pkg_id(int initial_apicid, int index_msb) |
160 | { | 158 | { |
161 | return current_cpu_data.initial_apicid >> index_msb; | 159 | return current_cpu_data.initial_apicid >> index_msb; |
162 | } | 160 | } |
@@ -168,27 +166,64 @@ static void x2apic_send_IPI_self(int vector) | |||
168 | 166 | ||
169 | static void init_x2apic_ldr(void) | 167 | static void init_x2apic_ldr(void) |
170 | { | 168 | { |
171 | return; | 169 | } |
172 | } | 170 | |
173 | 171 | struct apic apic_x2apic_phys = { | |
174 | struct genapic apic_x2apic_phys = { | 172 | |
175 | .name = "physical x2apic", | 173 | .name = "physical x2apic", |
176 | .acpi_madt_oem_check = x2apic_acpi_madt_oem_check, | 174 | .probe = NULL, |
177 | .int_delivery_mode = dest_Fixed, | 175 | .acpi_madt_oem_check = x2apic_acpi_madt_oem_check, |
178 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), | 176 | .apic_id_registered = x2apic_apic_id_registered, |
179 | .target_cpus = x2apic_target_cpus, | 177 | |
180 | .vector_allocation_domain = x2apic_vector_allocation_domain, | 178 | .irq_delivery_mode = dest_Fixed, |
181 | .apic_id_registered = x2apic_apic_id_registered, | 179 | .irq_dest_mode = 0, /* physical */ |
182 | .init_apic_ldr = init_x2apic_ldr, | 180 | |
183 | .send_IPI_all = x2apic_send_IPI_all, | 181 | .target_cpus = x2apic_target_cpus, |
184 | .send_IPI_allbutself = x2apic_send_IPI_allbutself, | 182 | .disable_esr = 0, |
185 | .send_IPI_mask = x2apic_send_IPI_mask, | 183 | .dest_logical = 0, |
186 | .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, | 184 | .check_apicid_used = NULL, |
187 | .send_IPI_self = x2apic_send_IPI_self, | 185 | .check_apicid_present = NULL, |
188 | .cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid, | 186 | |
189 | .cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and, | 187 | .vector_allocation_domain = x2apic_vector_allocation_domain, |
190 | .phys_pkg_id = phys_pkg_id, | 188 | .init_apic_ldr = init_x2apic_ldr, |
191 | .get_apic_id = get_apic_id, | 189 | |
192 | .set_apic_id = set_apic_id, | 190 | .ioapic_phys_id_map = NULL, |
193 | .apic_id_mask = (0xFFFFFFFFu), | 191 | .setup_apic_routing = NULL, |
192 | .multi_timer_check = NULL, | ||
193 | .apicid_to_node = NULL, | ||
194 | .cpu_to_logical_apicid = NULL, | ||
195 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | ||
196 | .apicid_to_cpu_present = NULL, | ||
197 | .setup_portio_remap = NULL, | ||
198 | .check_phys_apicid_present = default_check_phys_apicid_present, | ||
199 | .enable_apic_mode = NULL, | ||
200 | .phys_pkg_id = x2apic_phys_pkg_id, | ||
201 | .mps_oem_check = NULL, | ||
202 | |||
203 | .get_apic_id = x2apic_phys_get_apic_id, | ||
204 | .set_apic_id = set_apic_id, | ||
205 | .apic_id_mask = 0xFFFFFFFFu, | ||
206 | |||
207 | .cpu_mask_to_apicid = x2apic_cpu_mask_to_apicid, | ||
208 | .cpu_mask_to_apicid_and = x2apic_cpu_mask_to_apicid_and, | ||
209 | |||
210 | .send_IPI_mask = x2apic_send_IPI_mask, | ||
211 | .send_IPI_mask_allbutself = x2apic_send_IPI_mask_allbutself, | ||
212 | .send_IPI_allbutself = x2apic_send_IPI_allbutself, | ||
213 | .send_IPI_all = x2apic_send_IPI_all, | ||
214 | .send_IPI_self = x2apic_send_IPI_self, | ||
215 | |||
216 | .wakeup_cpu = NULL, | ||
217 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
218 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
219 | .wait_for_init_deassert = NULL, | ||
220 | .smp_callin_clear_local_apic = NULL, | ||
221 | .inquire_remote_apic = NULL, | ||
222 | |||
223 | .read = native_apic_msr_read, | ||
224 | .write = native_apic_msr_write, | ||
225 | .icr_read = native_x2apic_icr_read, | ||
226 | .icr_write = native_x2apic_icr_write, | ||
227 | .wait_icr_idle = native_x2apic_wait_icr_idle, | ||
228 | .safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle, | ||
194 | }; | 229 | }; |
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index bfe36249145c..20b4ad07c3a1 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
@@ -22,8 +22,8 @@ | |||
22 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
23 | #include <asm/current.h> | 23 | #include <asm/current.h> |
24 | #include <asm/smp.h> | 24 | #include <asm/smp.h> |
25 | #include <asm/apic.h> | ||
25 | #include <asm/ipi.h> | 26 | #include <asm/ipi.h> |
26 | #include <asm/genapic.h> | ||
27 | #include <asm/pgtable.h> | 27 | #include <asm/pgtable.h> |
28 | #include <asm/uv/uv.h> | 28 | #include <asm/uv/uv.h> |
29 | #include <asm/uv/uv_mmrs.h> | 29 | #include <asm/uv/uv_mmrs.h> |
@@ -114,16 +114,16 @@ int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip) | |||
114 | 114 | ||
115 | static void uv_send_IPI_one(int cpu, int vector) | 115 | static void uv_send_IPI_one(int cpu, int vector) |
116 | { | 116 | { |
117 | unsigned long val, apicid, lapicid; | 117 | unsigned long val, apicid; |
118 | int pnode; | 118 | int pnode; |
119 | 119 | ||
120 | apicid = per_cpu(x86_cpu_to_apicid, cpu); | 120 | apicid = per_cpu(x86_cpu_to_apicid, cpu); |
121 | lapicid = apicid & 0x3f; /* ZZZ macro needed */ | ||
122 | pnode = uv_apicid_to_pnode(apicid); | 121 | pnode = uv_apicid_to_pnode(apicid); |
123 | val = | 122 | |
124 | (1UL << UVH_IPI_INT_SEND_SHFT) | (lapicid << | 123 | val = (1UL << UVH_IPI_INT_SEND_SHFT) | |
125 | UVH_IPI_INT_APIC_ID_SHFT) | | 124 | (apicid << UVH_IPI_INT_APIC_ID_SHFT) | |
126 | (vector << UVH_IPI_INT_VECTOR_SHFT); | 125 | (vector << UVH_IPI_INT_VECTOR_SHFT); |
126 | |||
127 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); | 127 | uv_write_global_mmr64(pnode, UVH_IPI_INT, val); |
128 | } | 128 | } |
129 | 129 | ||
@@ -137,22 +137,24 @@ static void uv_send_IPI_mask(const struct cpumask *mask, int vector) | |||
137 | 137 | ||
138 | static void uv_send_IPI_mask_allbutself(const struct cpumask *mask, int vector) | 138 | static void uv_send_IPI_mask_allbutself(const struct cpumask *mask, int vector) |
139 | { | 139 | { |
140 | unsigned int cpu; | ||
141 | unsigned int this_cpu = smp_processor_id(); | 140 | unsigned int this_cpu = smp_processor_id(); |
141 | unsigned int cpu; | ||
142 | 142 | ||
143 | for_each_cpu(cpu, mask) | 143 | for_each_cpu(cpu, mask) { |
144 | if (cpu != this_cpu) | 144 | if (cpu != this_cpu) |
145 | uv_send_IPI_one(cpu, vector); | 145 | uv_send_IPI_one(cpu, vector); |
146 | } | ||
146 | } | 147 | } |
147 | 148 | ||
148 | static void uv_send_IPI_allbutself(int vector) | 149 | static void uv_send_IPI_allbutself(int vector) |
149 | { | 150 | { |
150 | unsigned int cpu; | ||
151 | unsigned int this_cpu = smp_processor_id(); | 151 | unsigned int this_cpu = smp_processor_id(); |
152 | unsigned int cpu; | ||
152 | 153 | ||
153 | for_each_online_cpu(cpu) | 154 | for_each_online_cpu(cpu) { |
154 | if (cpu != this_cpu) | 155 | if (cpu != this_cpu) |
155 | uv_send_IPI_one(cpu, vector); | 156 | uv_send_IPI_one(cpu, vector); |
157 | } | ||
156 | } | 158 | } |
157 | 159 | ||
158 | static void uv_send_IPI_all(int vector) | 160 | static void uv_send_IPI_all(int vector) |
@@ -171,21 +173,21 @@ static void uv_init_apic_ldr(void) | |||
171 | 173 | ||
172 | static unsigned int uv_cpu_mask_to_apicid(const struct cpumask *cpumask) | 174 | static unsigned int uv_cpu_mask_to_apicid(const struct cpumask *cpumask) |
173 | { | 175 | { |
174 | int cpu; | ||
175 | |||
176 | /* | 176 | /* |
177 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 177 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
178 | * May as well be the first. | 178 | * May as well be the first. |
179 | */ | 179 | */ |
180 | cpu = cpumask_first(cpumask); | 180 | int cpu = cpumask_first(cpumask); |
181 | |||
181 | if ((unsigned)cpu < nr_cpu_ids) | 182 | if ((unsigned)cpu < nr_cpu_ids) |
182 | return per_cpu(x86_cpu_to_apicid, cpu); | 183 | return per_cpu(x86_cpu_to_apicid, cpu); |
183 | else | 184 | else |
184 | return BAD_APICID; | 185 | return BAD_APICID; |
185 | } | 186 | } |
186 | 187 | ||
187 | static unsigned int uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | 188 | static unsigned int |
188 | const struct cpumask *andmask) | 189 | uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask, |
190 | const struct cpumask *andmask) | ||
189 | { | 191 | { |
190 | int cpu; | 192 | int cpu; |
191 | 193 | ||
@@ -193,15 +195,17 @@ static unsigned int uv_cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
193 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 195 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
194 | * May as well be the first. | 196 | * May as well be the first. |
195 | */ | 197 | */ |
196 | for_each_cpu_and(cpu, cpumask, andmask) | 198 | for_each_cpu_and(cpu, cpumask, andmask) { |
197 | if (cpumask_test_cpu(cpu, cpu_online_mask)) | 199 | if (cpumask_test_cpu(cpu, cpu_online_mask)) |
198 | break; | 200 | break; |
201 | } | ||
199 | if (cpu < nr_cpu_ids) | 202 | if (cpu < nr_cpu_ids) |
200 | return per_cpu(x86_cpu_to_apicid, cpu); | 203 | return per_cpu(x86_cpu_to_apicid, cpu); |
204 | |||
201 | return BAD_APICID; | 205 | return BAD_APICID; |
202 | } | 206 | } |
203 | 207 | ||
204 | static unsigned int get_apic_id(unsigned long x) | 208 | static unsigned int x2apic_get_apic_id(unsigned long x) |
205 | { | 209 | { |
206 | unsigned int id; | 210 | unsigned int id; |
207 | 211 | ||
@@ -223,10 +227,10 @@ static unsigned long set_apic_id(unsigned int id) | |||
223 | static unsigned int uv_read_apic_id(void) | 227 | static unsigned int uv_read_apic_id(void) |
224 | { | 228 | { |
225 | 229 | ||
226 | return get_apic_id(apic_read(APIC_ID)); | 230 | return x2apic_get_apic_id(apic_read(APIC_ID)); |
227 | } | 231 | } |
228 | 232 | ||
229 | static unsigned int phys_pkg_id(int index_msb) | 233 | static int uv_phys_pkg_id(int initial_apicid, int index_msb) |
230 | { | 234 | { |
231 | return uv_read_apic_id() >> index_msb; | 235 | return uv_read_apic_id() >> index_msb; |
232 | } | 236 | } |
@@ -236,26 +240,64 @@ static void uv_send_IPI_self(int vector) | |||
236 | apic_write(APIC_SELF_IPI, vector); | 240 | apic_write(APIC_SELF_IPI, vector); |
237 | } | 241 | } |
238 | 242 | ||
239 | struct genapic apic_x2apic_uv_x = { | 243 | struct apic apic_x2apic_uv_x = { |
240 | .name = "UV large system", | 244 | |
241 | .acpi_madt_oem_check = uv_acpi_madt_oem_check, | 245 | .name = "UV large system", |
242 | .int_delivery_mode = dest_Fixed, | 246 | .probe = NULL, |
243 | .int_dest_mode = (APIC_DEST_PHYSICAL != 0), | 247 | .acpi_madt_oem_check = uv_acpi_madt_oem_check, |
244 | .target_cpus = uv_target_cpus, | 248 | .apic_id_registered = uv_apic_id_registered, |
245 | .vector_allocation_domain = uv_vector_allocation_domain, | 249 | |
246 | .apic_id_registered = uv_apic_id_registered, | 250 | .irq_delivery_mode = dest_Fixed, |
247 | .init_apic_ldr = uv_init_apic_ldr, | 251 | .irq_dest_mode = 1, /* logical */ |
248 | .send_IPI_all = uv_send_IPI_all, | 252 | |
249 | .send_IPI_allbutself = uv_send_IPI_allbutself, | 253 | .target_cpus = uv_target_cpus, |
250 | .send_IPI_mask = uv_send_IPI_mask, | 254 | .disable_esr = 0, |
251 | .send_IPI_mask_allbutself = uv_send_IPI_mask_allbutself, | 255 | .dest_logical = APIC_DEST_LOGICAL, |
252 | .send_IPI_self = uv_send_IPI_self, | 256 | .check_apicid_used = NULL, |
253 | .cpu_mask_to_apicid = uv_cpu_mask_to_apicid, | 257 | .check_apicid_present = NULL, |
254 | .cpu_mask_to_apicid_and = uv_cpu_mask_to_apicid_and, | 258 | |
255 | .phys_pkg_id = phys_pkg_id, | 259 | .vector_allocation_domain = uv_vector_allocation_domain, |
256 | .get_apic_id = get_apic_id, | 260 | .init_apic_ldr = uv_init_apic_ldr, |
257 | .set_apic_id = set_apic_id, | 261 | |
258 | .apic_id_mask = (0xFFFFFFFFu), | 262 | .ioapic_phys_id_map = NULL, |
263 | .setup_apic_routing = NULL, | ||
264 | .multi_timer_check = NULL, | ||
265 | .apicid_to_node = NULL, | ||
266 | .cpu_to_logical_apicid = NULL, | ||
267 | .cpu_present_to_apicid = default_cpu_present_to_apicid, | ||
268 | .apicid_to_cpu_present = NULL, | ||
269 | .setup_portio_remap = NULL, | ||
270 | .check_phys_apicid_present = default_check_phys_apicid_present, | ||
271 | .enable_apic_mode = NULL, | ||
272 | .phys_pkg_id = uv_phys_pkg_id, | ||
273 | .mps_oem_check = NULL, | ||
274 | |||
275 | .get_apic_id = x2apic_get_apic_id, | ||
276 | .set_apic_id = set_apic_id, | ||
277 | .apic_id_mask = 0xFFFFFFFFu, | ||
278 | |||
279 | .cpu_mask_to_apicid = uv_cpu_mask_to_apicid, | ||
280 | .cpu_mask_to_apicid_and = uv_cpu_mask_to_apicid_and, | ||
281 | |||
282 | .send_IPI_mask = uv_send_IPI_mask, | ||
283 | .send_IPI_mask_allbutself = uv_send_IPI_mask_allbutself, | ||
284 | .send_IPI_allbutself = uv_send_IPI_allbutself, | ||
285 | .send_IPI_all = uv_send_IPI_all, | ||
286 | .send_IPI_self = uv_send_IPI_self, | ||
287 | |||
288 | .wakeup_cpu = NULL, | ||
289 | .trampoline_phys_low = DEFAULT_TRAMPOLINE_PHYS_LOW, | ||
290 | .trampoline_phys_high = DEFAULT_TRAMPOLINE_PHYS_HIGH, | ||
291 | .wait_for_init_deassert = NULL, | ||
292 | .smp_callin_clear_local_apic = NULL, | ||
293 | .inquire_remote_apic = NULL, | ||
294 | |||
295 | .read = native_apic_msr_read, | ||
296 | .write = native_apic_msr_write, | ||
297 | .icr_read = native_x2apic_icr_read, | ||
298 | .icr_write = native_x2apic_icr_write, | ||
299 | .wait_icr_idle = native_x2apic_wait_icr_idle, | ||
300 | .safe_wait_icr_idle = native_safe_x2apic_wait_icr_idle, | ||
259 | }; | 301 | }; |
260 | 302 | ||
261 | static __cpuinit void set_x2apic_extra_bits(int pnode) | 303 | static __cpuinit void set_x2apic_extra_bits(int pnode) |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 98807bb095ad..10033fe718e0 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
@@ -301,7 +301,7 @@ extern int (*console_blank_hook)(int); | |||
301 | */ | 301 | */ |
302 | #define APM_ZERO_SEGS | 302 | #define APM_ZERO_SEGS |
303 | 303 | ||
304 | #include "apm.h" | 304 | #include <asm/apm.h> |
305 | 305 | ||
306 | /* | 306 | /* |
307 | * Define to re-initialize the interrupt 0 timer to 100 Hz after a suspend. | 307 | * Define to re-initialize the interrupt 0 timer to 100 Hz after a suspend. |
@@ -1192,6 +1192,7 @@ static int suspend(int vetoable) | |||
1192 | device_suspend(PMSG_SUSPEND); | 1192 | device_suspend(PMSG_SUSPEND); |
1193 | local_irq_disable(); | 1193 | local_irq_disable(); |
1194 | device_power_down(PMSG_SUSPEND); | 1194 | device_power_down(PMSG_SUSPEND); |
1195 | sysdev_suspend(PMSG_SUSPEND); | ||
1195 | 1196 | ||
1196 | local_irq_enable(); | 1197 | local_irq_enable(); |
1197 | 1198 | ||
@@ -1208,6 +1209,7 @@ static int suspend(int vetoable) | |||
1208 | if (err != APM_SUCCESS) | 1209 | if (err != APM_SUCCESS) |
1209 | apm_error("suspend", err); | 1210 | apm_error("suspend", err); |
1210 | err = (err == APM_SUCCESS) ? 0 : -EIO; | 1211 | err = (err == APM_SUCCESS) ? 0 : -EIO; |
1212 | sysdev_resume(); | ||
1211 | device_power_up(PMSG_RESUME); | 1213 | device_power_up(PMSG_RESUME); |
1212 | local_irq_enable(); | 1214 | local_irq_enable(); |
1213 | device_resume(PMSG_RESUME); | 1215 | device_resume(PMSG_RESUME); |
@@ -1228,6 +1230,7 @@ static void standby(void) | |||
1228 | 1230 | ||
1229 | local_irq_disable(); | 1231 | local_irq_disable(); |
1230 | device_power_down(PMSG_SUSPEND); | 1232 | device_power_down(PMSG_SUSPEND); |
1233 | sysdev_suspend(PMSG_SUSPEND); | ||
1231 | local_irq_enable(); | 1234 | local_irq_enable(); |
1232 | 1235 | ||
1233 | err = set_system_power_state(APM_STATE_STANDBY); | 1236 | err = set_system_power_state(APM_STATE_STANDBY); |
@@ -1235,6 +1238,7 @@ static void standby(void) | |||
1235 | apm_error("standby", err); | 1238 | apm_error("standby", err); |
1236 | 1239 | ||
1237 | local_irq_disable(); | 1240 | local_irq_disable(); |
1241 | sysdev_resume(); | ||
1238 | device_power_up(PMSG_RESUME); | 1242 | device_power_up(PMSG_RESUME); |
1239 | local_irq_enable(); | 1243 | local_irq_enable(); |
1240 | } | 1244 | } |
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index 2cf23634b6d9..6882a735d9c0 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <asm/pat.h> | 7 | #include <asm/pat.h> |
8 | #include <asm/processor.h> | 8 | #include <asm/processor.h> |
9 | 9 | ||
10 | #include <mach_apic.h> | 10 | #include <asm/apic.h> |
11 | 11 | ||
12 | struct cpuid_bit { | 12 | struct cpuid_bit { |
13 | u16 feature; | 13 | u16 feature; |
@@ -69,7 +69,7 @@ void __cpuinit init_scattered_cpuid_features(struct cpuinfo_x86 *c) | |||
69 | */ | 69 | */ |
70 | void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | 70 | void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) |
71 | { | 71 | { |
72 | #ifdef CONFIG_X86_SMP | 72 | #ifdef CONFIG_SMP |
73 | unsigned int eax, ebx, ecx, edx, sub_index; | 73 | unsigned int eax, ebx, ecx, edx, sub_index; |
74 | unsigned int ht_mask_width, core_plus_mask_width; | 74 | unsigned int ht_mask_width, core_plus_mask_width; |
75 | unsigned int core_select_mask, core_level_siblings; | 75 | unsigned int core_select_mask, core_level_siblings; |
@@ -116,22 +116,14 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | |||
116 | 116 | ||
117 | core_select_mask = (~(-1 << core_plus_mask_width)) >> ht_mask_width; | 117 | core_select_mask = (~(-1 << core_plus_mask_width)) >> ht_mask_width; |
118 | 118 | ||
119 | #ifdef CONFIG_X86_32 | 119 | c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, ht_mask_width) |
120 | c->cpu_core_id = phys_pkg_id(c->initial_apicid, ht_mask_width) | ||
121 | & core_select_mask; | 120 | & core_select_mask; |
122 | c->phys_proc_id = phys_pkg_id(c->initial_apicid, core_plus_mask_width); | 121 | c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, core_plus_mask_width); |
123 | /* | 122 | /* |
124 | * Reinit the apicid, now that we have extended initial_apicid. | 123 | * Reinit the apicid, now that we have extended initial_apicid. |
125 | */ | 124 | */ |
126 | c->apicid = phys_pkg_id(c->initial_apicid, 0); | 125 | c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); |
127 | #else | 126 | |
128 | c->cpu_core_id = phys_pkg_id(ht_mask_width) & core_select_mask; | ||
129 | c->phys_proc_id = phys_pkg_id(core_plus_mask_width); | ||
130 | /* | ||
131 | * Reinit the apicid, now that we have extended initial_apicid. | ||
132 | */ | ||
133 | c->apicid = phys_pkg_id(0); | ||
134 | #endif | ||
135 | c->x86_max_cores = (core_level_siblings / smp_num_siblings); | 127 | c->x86_max_cores = (core_level_siblings / smp_num_siblings); |
136 | 128 | ||
137 | 129 | ||
@@ -143,37 +135,3 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | |||
143 | return; | 135 | return; |
144 | #endif | 136 | #endif |
145 | } | 137 | } |
146 | |||
147 | #ifdef CONFIG_X86_PAT | ||
148 | void __cpuinit validate_pat_support(struct cpuinfo_x86 *c) | ||
149 | { | ||
150 | if (!cpu_has_pat) | ||
151 | pat_disable("PAT not supported by CPU."); | ||
152 | |||
153 | switch (c->x86_vendor) { | ||
154 | case X86_VENDOR_INTEL: | ||
155 | /* | ||
156 | * There is a known erratum on Pentium III and Core Solo | ||
157 | * and Core Duo CPUs. | ||
158 | * " Page with PAT set to WC while associated MTRR is UC | ||
159 | * may consolidate to UC " | ||
160 | * Because of this erratum, it is better to stick with | ||
161 | * setting WC in MTRR rather than using PAT on these CPUs. | ||
162 | * | ||
163 | * Enable PAT WC only on P4, Core 2 or later CPUs. | ||
164 | */ | ||
165 | if (c->x86 > 0x6 || (c->x86 == 6 && c->x86_model >= 15)) | ||
166 | return; | ||
167 | |||
168 | pat_disable("PAT WC disabled due to known CPU erratum."); | ||
169 | return; | ||
170 | |||
171 | case X86_VENDOR_AMD: | ||
172 | case X86_VENDOR_CENTAUR: | ||
173 | case X86_VENDOR_TRANSMETA: | ||
174 | return; | ||
175 | } | ||
176 | |||
177 | pat_disable("PAT disabled. Not yet verified on this CPU type."); | ||
178 | } | ||
179 | #endif | ||
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 7c878f6aa919..25423a5b80ed 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -12,8 +12,6 @@ | |||
12 | # include <asm/cacheflush.h> | 12 | # include <asm/cacheflush.h> |
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | #include <mach_apic.h> | ||
16 | |||
17 | #include "cpu.h" | 15 | #include "cpu.h" |
18 | 16 | ||
19 | #ifdef CONFIG_X86_32 | 17 | #ifdef CONFIG_X86_32 |
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 260fe4cb2c82..826d5c876278 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -23,11 +23,9 @@ | |||
23 | #include <asm/smp.h> | 23 | #include <asm/smp.h> |
24 | #include <asm/cpu.h> | 24 | #include <asm/cpu.h> |
25 | #include <asm/cpumask.h> | 25 | #include <asm/cpumask.h> |
26 | #ifdef CONFIG_X86_LOCAL_APIC | ||
27 | #include <asm/mpspec.h> | ||
28 | #include <asm/apic.h> | 26 | #include <asm/apic.h> |
29 | #include <mach_apic.h> | 27 | |
30 | #include <asm/genapic.h> | 28 | #ifdef CONFIG_X86_LOCAL_APIC |
31 | #include <asm/uv/uv.h> | 29 | #include <asm/uv/uv.h> |
32 | #endif | 30 | #endif |
33 | 31 | ||
@@ -226,6 +224,49 @@ static inline void squash_the_stupid_serial_number(struct cpuinfo_x86 *c) | |||
226 | #endif | 224 | #endif |
227 | 225 | ||
228 | /* | 226 | /* |
227 | * Some CPU features depend on higher CPUID levels, which may not always | ||
228 | * be available due to CPUID level capping or broken virtualization | ||
229 | * software. Add those features to this table to auto-disable them. | ||
230 | */ | ||
231 | struct cpuid_dependent_feature { | ||
232 | u32 feature; | ||
233 | u32 level; | ||
234 | }; | ||
235 | static const struct cpuid_dependent_feature __cpuinitconst | ||
236 | cpuid_dependent_features[] = { | ||
237 | { X86_FEATURE_MWAIT, 0x00000005 }, | ||
238 | { X86_FEATURE_DCA, 0x00000009 }, | ||
239 | { X86_FEATURE_XSAVE, 0x0000000d }, | ||
240 | { 0, 0 } | ||
241 | }; | ||
242 | |||
243 | static void __cpuinit filter_cpuid_features(struct cpuinfo_x86 *c, bool warn) | ||
244 | { | ||
245 | const struct cpuid_dependent_feature *df; | ||
246 | for (df = cpuid_dependent_features; df->feature; df++) { | ||
247 | /* | ||
248 | * Note: cpuid_level is set to -1 if unavailable, but | ||
249 | * extended_extended_level is set to 0 if unavailable | ||
250 | * and the legitimate extended levels are all negative | ||
251 | * when signed; hence the weird messing around with | ||
252 | * signs here... | ||
253 | */ | ||
254 | if (cpu_has(c, df->feature) && | ||
255 | ((s32)df->level < 0 ? | ||
256 | (u32)df->level > (u32)c->extended_cpuid_level : | ||
257 | (s32)df->level > (s32)c->cpuid_level)) { | ||
258 | clear_cpu_cap(c, df->feature); | ||
259 | if (warn) | ||
260 | printk(KERN_WARNING | ||
261 | "CPU: CPU feature %s disabled " | ||
262 | "due to lack of CPUID level 0x%x\n", | ||
263 | x86_cap_flags[df->feature], | ||
264 | df->level); | ||
265 | } | ||
266 | } | ||
267 | } | ||
268 | |||
269 | /* | ||
229 | * Naming convention should be: <Name> [(<Codename>)] | 270 | * Naming convention should be: <Name> [(<Codename>)] |
230 | * This table only is used unless init_<vendor>() below doesn't set it; | 271 | * This table only is used unless init_<vendor>() below doesn't set it; |
231 | * in particular, if CPUID levels 0x80000002..4 are supported, this isn't used | 272 | * in particular, if CPUID levels 0x80000002..4 are supported, this isn't used |
@@ -407,11 +448,7 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
407 | } | 448 | } |
408 | 449 | ||
409 | index_msb = get_count_order(smp_num_siblings); | 450 | index_msb = get_count_order(smp_num_siblings); |
410 | #ifdef CONFIG_X86_64 | 451 | c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb); |
411 | c->phys_proc_id = phys_pkg_id(index_msb); | ||
412 | #else | ||
413 | c->phys_proc_id = phys_pkg_id(c->initial_apicid, index_msb); | ||
414 | #endif | ||
415 | 452 | ||
416 | smp_num_siblings = smp_num_siblings / c->x86_max_cores; | 453 | smp_num_siblings = smp_num_siblings / c->x86_max_cores; |
417 | 454 | ||
@@ -419,13 +456,8 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
419 | 456 | ||
420 | core_bits = get_count_order(c->x86_max_cores); | 457 | core_bits = get_count_order(c->x86_max_cores); |
421 | 458 | ||
422 | #ifdef CONFIG_X86_64 | 459 | c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) & |
423 | c->cpu_core_id = phys_pkg_id(index_msb) & | ||
424 | ((1 << core_bits) - 1); | 460 | ((1 << core_bits) - 1); |
425 | #else | ||
426 | c->cpu_core_id = phys_pkg_id(c->initial_apicid, index_msb) & | ||
427 | ((1 << core_bits) - 1); | ||
428 | #endif | ||
429 | } | 461 | } |
430 | 462 | ||
431 | out: | 463 | out: |
@@ -594,11 +626,10 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c) | |||
594 | if (this_cpu->c_early_init) | 626 | if (this_cpu->c_early_init) |
595 | this_cpu->c_early_init(c); | 627 | this_cpu->c_early_init(c); |
596 | 628 | ||
597 | validate_pat_support(c); | ||
598 | |||
599 | #ifdef CONFIG_SMP | 629 | #ifdef CONFIG_SMP |
600 | c->cpu_index = boot_cpu_id; | 630 | c->cpu_index = boot_cpu_id; |
601 | #endif | 631 | #endif |
632 | filter_cpuid_features(c, false); | ||
602 | } | 633 | } |
603 | 634 | ||
604 | void __init early_cpu_init(void) | 635 | void __init early_cpu_init(void) |
@@ -661,7 +692,7 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c) | |||
661 | c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; | 692 | c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; |
662 | #ifdef CONFIG_X86_32 | 693 | #ifdef CONFIG_X86_32 |
663 | # ifdef CONFIG_X86_HT | 694 | # ifdef CONFIG_X86_HT |
664 | c->apicid = phys_pkg_id(c->initial_apicid, 0); | 695 | c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); |
665 | # else | 696 | # else |
666 | c->apicid = c->initial_apicid; | 697 | c->apicid = c->initial_apicid; |
667 | # endif | 698 | # endif |
@@ -708,7 +739,7 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
708 | this_cpu->c_identify(c); | 739 | this_cpu->c_identify(c); |
709 | 740 | ||
710 | #ifdef CONFIG_X86_64 | 741 | #ifdef CONFIG_X86_64 |
711 | c->apicid = phys_pkg_id(0); | 742 | c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); |
712 | #endif | 743 | #endif |
713 | 744 | ||
714 | /* | 745 | /* |
@@ -732,6 +763,9 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
732 | * we do "generic changes." | 763 | * we do "generic changes." |
733 | */ | 764 | */ |
734 | 765 | ||
766 | /* Filter out anything that depends on CPUID levels we don't have */ | ||
767 | filter_cpuid_features(c, true); | ||
768 | |||
735 | /* If the model name is still unset, do table lookup. */ | 769 | /* If the model name is still unset, do table lookup. */ |
736 | if (!c->x86_model_id[0]) { | 770 | if (!c->x86_model_id[0]) { |
737 | char *p; | 771 | char *p; |
@@ -1015,7 +1049,7 @@ void __cpuinit cpu_init(void) | |||
1015 | barrier(); | 1049 | barrier(); |
1016 | 1050 | ||
1017 | check_efer(); | 1051 | check_efer(); |
1018 | if (cpu != 0 && x2apic) | 1052 | if (cpu != 0) |
1019 | enable_x2apic(); | 1053 | enable_x2apic(); |
1020 | 1054 | ||
1021 | /* | 1055 | /* |
@@ -1062,22 +1096,19 @@ void __cpuinit cpu_init(void) | |||
1062 | */ | 1096 | */ |
1063 | if (kgdb_connected && arch_kgdb_ops.correct_hw_break) | 1097 | if (kgdb_connected && arch_kgdb_ops.correct_hw_break) |
1064 | arch_kgdb_ops.correct_hw_break(); | 1098 | arch_kgdb_ops.correct_hw_break(); |
1065 | else { | 1099 | else |
1066 | #endif | 1100 | #endif |
1067 | /* | 1101 | { |
1068 | * Clear all 6 debug registers: | 1102 | /* |
1069 | */ | 1103 | * Clear all 6 debug registers: |
1070 | 1104 | */ | |
1071 | set_debugreg(0UL, 0); | 1105 | set_debugreg(0UL, 0); |
1072 | set_debugreg(0UL, 1); | 1106 | set_debugreg(0UL, 1); |
1073 | set_debugreg(0UL, 2); | 1107 | set_debugreg(0UL, 2); |
1074 | set_debugreg(0UL, 3); | 1108 | set_debugreg(0UL, 3); |
1075 | set_debugreg(0UL, 6); | 1109 | set_debugreg(0UL, 6); |
1076 | set_debugreg(0UL, 7); | 1110 | set_debugreg(0UL, 7); |
1077 | #ifdef CONFIG_KGDB | ||
1078 | /* If the kgdb is connected no debug regs should be altered. */ | ||
1079 | } | 1111 | } |
1080 | #endif | ||
1081 | 1112 | ||
1082 | fpu_init(); | 1113 | fpu_init(); |
1083 | 1114 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c index c2f930d86640..41ab3f064cb1 100644 --- a/arch/x86/kernel/cpu/cpufreq/e_powersaver.c +++ b/arch/x86/kernel/cpu/cpufreq/e_powersaver.c | |||
@@ -204,12 +204,12 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
204 | } | 204 | } |
205 | /* Enable Enhanced PowerSaver */ | 205 | /* Enable Enhanced PowerSaver */ |
206 | rdmsrl(MSR_IA32_MISC_ENABLE, val); | 206 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
207 | if (!(val & 1 << 16)) { | 207 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
208 | val |= 1 << 16; | 208 | val |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; |
209 | wrmsrl(MSR_IA32_MISC_ENABLE, val); | 209 | wrmsrl(MSR_IA32_MISC_ENABLE, val); |
210 | /* Can be locked at 0 */ | 210 | /* Can be locked at 0 */ |
211 | rdmsrl(MSR_IA32_MISC_ENABLE, val); | 211 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
212 | if (!(val & 1 << 16)) { | 212 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
213 | printk(KERN_INFO "eps: Can't enable Enhanced PowerSaver\n"); | 213 | printk(KERN_INFO "eps: Can't enable Enhanced PowerSaver\n"); |
214 | return -ENODEV; | 214 | return -ENODEV; |
215 | } | 215 | } |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 5c28b37dea11..6428aa17b40e 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -939,10 +939,25 @@ static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) | |||
939 | free_cpumask_var(data->acpi_data.shared_cpu_map); | 939 | free_cpumask_var(data->acpi_data.shared_cpu_map); |
940 | } | 940 | } |
941 | 941 | ||
942 | static int get_transition_latency(struct powernow_k8_data *data) | ||
943 | { | ||
944 | int max_latency = 0; | ||
945 | int i; | ||
946 | for (i = 0; i < data->acpi_data.state_count; i++) { | ||
947 | int cur_latency = data->acpi_data.states[i].transition_latency | ||
948 | + data->acpi_data.states[i].bus_master_latency; | ||
949 | if (cur_latency > max_latency) | ||
950 | max_latency = cur_latency; | ||
951 | } | ||
952 | /* value in usecs, needs to be in nanoseconds */ | ||
953 | return 1000 * max_latency; | ||
954 | } | ||
955 | |||
942 | #else | 956 | #else |
943 | static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; } | 957 | static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; } |
944 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; } | 958 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; } |
945 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; } | 959 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; } |
960 | static int get_transition_latency(struct powernow_k8_data *data) { return 0; } | ||
946 | #endif /* CONFIG_X86_POWERNOW_K8_ACPI */ | 961 | #endif /* CONFIG_X86_POWERNOW_K8_ACPI */ |
947 | 962 | ||
948 | /* Take a frequency, and issue the fid/vid transition command */ | 963 | /* Take a frequency, and issue the fid/vid transition command */ |
@@ -1142,8 +1157,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1142 | data->cpu = pol->cpu; | 1157 | data->cpu = pol->cpu; |
1143 | data->currpstate = HW_PSTATE_INVALID; | 1158 | data->currpstate = HW_PSTATE_INVALID; |
1144 | 1159 | ||
1145 | rc = powernow_k8_cpu_init_acpi(data); | 1160 | if (powernow_k8_cpu_init_acpi(data)) { |
1146 | if (rc) { | ||
1147 | /* | 1161 | /* |
1148 | * Use the PSB BIOS structure. This is only availabe on | 1162 | * Use the PSB BIOS structure. This is only availabe on |
1149 | * an UP version, and is deprecated by AMD. | 1163 | * an UP version, and is deprecated by AMD. |
@@ -1161,19 +1175,28 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1161 | "ACPI maintainers and complain to your BIOS " | 1175 | "ACPI maintainers and complain to your BIOS " |
1162 | "vendor.\n"); | 1176 | "vendor.\n"); |
1163 | #endif | 1177 | #endif |
1164 | goto err_out; | 1178 | kfree(data); |
1179 | return -ENODEV; | ||
1165 | } | 1180 | } |
1166 | if (pol->cpu != 0) { | 1181 | if (pol->cpu != 0) { |
1167 | printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for " | 1182 | printk(KERN_ERR FW_BUG PFX "No ACPI _PSS objects for " |
1168 | "CPU other than CPU0. Complain to your BIOS " | 1183 | "CPU other than CPU0. Complain to your BIOS " |
1169 | "vendor.\n"); | 1184 | "vendor.\n"); |
1170 | goto err_out; | 1185 | kfree(data); |
1186 | return -ENODEV; | ||
1171 | } | 1187 | } |
1172 | rc = find_psb_table(data); | 1188 | rc = find_psb_table(data); |
1173 | if (rc) { | 1189 | if (rc) { |
1174 | goto err_out; | 1190 | kfree(data); |
1191 | return -ENODEV; | ||
1175 | } | 1192 | } |
1176 | } | 1193 | /* Take a crude guess here. |
1194 | * That guess was in microseconds, so multiply with 1000 */ | ||
1195 | pol->cpuinfo.transition_latency = ( | ||
1196 | ((data->rvo + 8) * data->vstable * VST_UNITS_20US) + | ||
1197 | ((1 << data->irt) * 30)) * 1000; | ||
1198 | } else /* ACPI _PSS objects available */ | ||
1199 | pol->cpuinfo.transition_latency = get_transition_latency(data); | ||
1177 | 1200 | ||
1178 | /* only run on specific CPU from here on */ | 1201 | /* only run on specific CPU from here on */ |
1179 | oldmask = current->cpus_allowed; | 1202 | oldmask = current->cpus_allowed; |
@@ -1204,11 +1227,6 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1204 | cpumask_copy(pol->cpus, &per_cpu(cpu_core_map, pol->cpu)); | 1227 | cpumask_copy(pol->cpus, &per_cpu(cpu_core_map, pol->cpu)); |
1205 | data->available_cores = pol->cpus; | 1228 | data->available_cores = pol->cpus; |
1206 | 1229 | ||
1207 | /* Take a crude guess here. | ||
1208 | * That guess was in microseconds, so multiply with 1000 */ | ||
1209 | pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US) | ||
1210 | + (3 * (1 << data->irt) * 10)) * 1000; | ||
1211 | |||
1212 | if (cpu_family == CPU_HW_PSTATE) | 1230 | if (cpu_family == CPU_HW_PSTATE) |
1213 | pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); | 1231 | pol->cur = find_khz_freq_from_pstate(data->powernow_table, data->currpstate); |
1214 | else | 1232 | else |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index f08998278a3a..c9f1fdc02830 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -390,14 +390,14 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
390 | enable it if not. */ | 390 | enable it if not. */ |
391 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 391 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
392 | 392 | ||
393 | if (!(l & (1<<16))) { | 393 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
394 | l |= (1<<16); | 394 | l |= MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP; |
395 | dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); | 395 | dprintk("trying to enable Enhanced SpeedStep (%x)\n", l); |
396 | wrmsr(MSR_IA32_MISC_ENABLE, l, h); | 396 | wrmsr(MSR_IA32_MISC_ENABLE, l, h); |
397 | 397 | ||
398 | /* check to see if it stuck */ | 398 | /* check to see if it stuck */ |
399 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 399 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
400 | if (!(l & (1<<16))) { | 400 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
401 | printk(KERN_INFO PFX | 401 | printk(KERN_INFO PFX |
402 | "couldn't enable Enhanced SpeedStep\n"); | 402 | "couldn't enable Enhanced SpeedStep\n"); |
403 | return -ENODEV; | 403 | return -ENODEV; |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 24ff26a38ade..25c559ba8d54 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #ifdef CONFIG_X86_LOCAL_APIC | 24 | #ifdef CONFIG_X86_LOCAL_APIC |
25 | #include <asm/mpspec.h> | 25 | #include <asm/mpspec.h> |
26 | #include <asm/apic.h> | 26 | #include <asm/apic.h> |
27 | #include <mach_apic.h> | ||
28 | #endif | 27 | #endif |
29 | 28 | ||
30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) | 29 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
@@ -63,6 +62,18 @@ static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) | |||
63 | set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); | 62 | set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC); |
64 | } | 63 | } |
65 | 64 | ||
65 | /* | ||
66 | * There is a known erratum on Pentium III and Core Solo | ||
67 | * and Core Duo CPUs. | ||
68 | * " Page with PAT set to WC while associated MTRR is UC | ||
69 | * may consolidate to UC " | ||
70 | * Because of this erratum, it is better to stick with | ||
71 | * setting WC in MTRR rather than using PAT on these CPUs. | ||
72 | * | ||
73 | * Enable PAT WC only on P4, Core 2 or later CPUs. | ||
74 | */ | ||
75 | if (c->x86 == 6 && c->x86_model < 15) | ||
76 | clear_cpu_cap(c, X86_FEATURE_PAT); | ||
66 | } | 77 | } |
67 | 78 | ||
68 | #ifdef CONFIG_X86_32 | 79 | #ifdef CONFIG_X86_32 |
@@ -135,10 +146,10 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c) | |||
135 | */ | 146 | */ |
136 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { | 147 | if ((c->x86 == 15) && (c->x86_model == 1) && (c->x86_mask == 1)) { |
137 | rdmsr(MSR_IA32_MISC_ENABLE, lo, hi); | 148 | rdmsr(MSR_IA32_MISC_ENABLE, lo, hi); |
138 | if ((lo & (1<<9)) == 0) { | 149 | if ((lo & MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE) == 0) { |
139 | printk (KERN_INFO "CPU: C0 stepping P4 Xeon detected.\n"); | 150 | printk (KERN_INFO "CPU: C0 stepping P4 Xeon detected.\n"); |
140 | printk (KERN_INFO "CPU: Disabling hardware prefetching (Errata 037)\n"); | 151 | printk (KERN_INFO "CPU: Disabling hardware prefetching (Errata 037)\n"); |
141 | lo |= (1<<9); /* Disable hw prefetching */ | 152 | lo |= MSR_IA32_MISC_ENABLE_PREFETCH_DISABLE; |
142 | wrmsr (MSR_IA32_MISC_ENABLE, lo, hi); | 153 | wrmsr (MSR_IA32_MISC_ENABLE, lo, hi); |
143 | } | 154 | } |
144 | } | 155 | } |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 1c838032fd37..fe79985ce0f2 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -295,11 +295,11 @@ void do_machine_check(struct pt_regs * regs, long error_code) | |||
295 | * If we know that the error was in user space, send a | 295 | * If we know that the error was in user space, send a |
296 | * SIGBUS. Otherwise, panic if tolerance is low. | 296 | * SIGBUS. Otherwise, panic if tolerance is low. |
297 | * | 297 | * |
298 | * do_exit() takes an awful lot of locks and has a slight | 298 | * force_sig() takes an awful lot of locks and has a slight |
299 | * risk of deadlocking. | 299 | * risk of deadlocking. |
300 | */ | 300 | */ |
301 | if (user_space) { | 301 | if (user_space) { |
302 | do_exit(SIGBUS); | 302 | force_sig(SIGBUS, current); |
303 | } else if (panic_on_oops || tolerant < 2) { | 303 | } else if (panic_on_oops || tolerant < 2) { |
304 | mce_panic("Uncorrected machine check", | 304 | mce_panic("Uncorrected machine check", |
305 | &panicm, mcestart); | 305 | &panicm, mcestart); |
@@ -490,7 +490,7 @@ static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) | |||
490 | 490 | ||
491 | } | 491 | } |
492 | 492 | ||
493 | static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c) | 493 | static void mce_cpu_features(struct cpuinfo_x86 *c) |
494 | { | 494 | { |
495 | switch (c->x86_vendor) { | 495 | switch (c->x86_vendor) { |
496 | case X86_VENDOR_INTEL: | 496 | case X86_VENDOR_INTEL: |
@@ -734,6 +734,7 @@ __setup("mce=", mcheck_enable); | |||
734 | static int mce_resume(struct sys_device *dev) | 734 | static int mce_resume(struct sys_device *dev) |
735 | { | 735 | { |
736 | mce_init(NULL); | 736 | mce_init(NULL); |
737 | mce_cpu_features(¤t_cpu_data); | ||
737 | return 0; | 738 | return 0; |
738 | } | 739 | } |
739 | 740 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 4772e91e8246..9817506dd469 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c | |||
@@ -121,7 +121,7 @@ static long threshold_restart_bank(void *_tr) | |||
121 | } | 121 | } |
122 | 122 | ||
123 | /* cpu init entry point, called from mce.c with preempt off */ | 123 | /* cpu init entry point, called from mce.c with preempt off */ |
124 | void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c) | 124 | void mce_amd_feature_init(struct cpuinfo_x86 *c) |
125 | { | 125 | { |
126 | unsigned int bank, block; | 126 | unsigned int bank, block; |
127 | unsigned int cpu = smp_processor_id(); | 127 | unsigned int cpu = smp_processor_id(); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c index 5e8c79e748a6..aa5e287c98e0 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c | |||
@@ -31,7 +31,7 @@ asmlinkage void smp_thermal_interrupt(void) | |||
31 | irq_exit(); | 31 | irq_exit(); |
32 | } | 32 | } |
33 | 33 | ||
34 | static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | 34 | static void intel_init_thermal(struct cpuinfo_x86 *c) |
35 | { | 35 | { |
36 | u32 l, h; | 36 | u32 l, h; |
37 | int tm2 = 0; | 37 | int tm2 = 0; |
@@ -49,13 +49,13 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
49 | */ | 49 | */ |
50 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 50 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
51 | h = apic_read(APIC_LVTTHMR); | 51 | h = apic_read(APIC_LVTTHMR); |
52 | if ((l & (1 << 3)) && (h & APIC_DM_SMI)) { | 52 | if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) { |
53 | printk(KERN_DEBUG | 53 | printk(KERN_DEBUG |
54 | "CPU%d: Thermal monitoring handled by SMI\n", cpu); | 54 | "CPU%d: Thermal monitoring handled by SMI\n", cpu); |
55 | return; | 55 | return; |
56 | } | 56 | } |
57 | 57 | ||
58 | if (cpu_has(c, X86_FEATURE_TM2) && (l & (1 << 13))) | 58 | if (cpu_has(c, X86_FEATURE_TM2) && (l & MSR_IA32_MISC_ENABLE_TM2)) |
59 | tm2 = 1; | 59 | tm2 = 1; |
60 | 60 | ||
61 | if (h & APIC_VECTOR_MASK) { | 61 | if (h & APIC_VECTOR_MASK) { |
@@ -73,7 +73,7 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
73 | wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03, h); | 73 | wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03, h); |
74 | 74 | ||
75 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 75 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
76 | wrmsr(MSR_IA32_MISC_ENABLE, l | (1 << 3), h); | 76 | wrmsr(MSR_IA32_MISC_ENABLE, l | MSR_IA32_MISC_ENABLE_TM1, h); |
77 | 77 | ||
78 | l = apic_read(APIC_LVTTHMR); | 78 | l = apic_read(APIC_LVTTHMR); |
79 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); | 79 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); |
@@ -85,7 +85,7 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
88 | void __cpuinit mce_intel_feature_init(struct cpuinfo_x86 *c) | 88 | void mce_intel_feature_init(struct cpuinfo_x86 *c) |
89 | { | 89 | { |
90 | intel_init_thermal(c); | 90 | intel_init_thermal(c); |
91 | } | 91 | } |
diff --git a/arch/x86/kernel/cpu/mcheck/p4.c b/arch/x86/kernel/cpu/mcheck/p4.c index 9b60fce09f75..f53bdcbaf382 100644 --- a/arch/x86/kernel/cpu/mcheck/p4.c +++ b/arch/x86/kernel/cpu/mcheck/p4.c | |||
@@ -85,7 +85,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) | |||
85 | */ | 85 | */ |
86 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 86 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
87 | h = apic_read(APIC_LVTTHMR); | 87 | h = apic_read(APIC_LVTTHMR); |
88 | if ((l & (1<<3)) && (h & APIC_DM_SMI)) { | 88 | if ((l & MSR_IA32_MISC_ENABLE_TM1) && (h & APIC_DM_SMI)) { |
89 | printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n", | 89 | printk(KERN_DEBUG "CPU%d: Thermal monitoring handled by SMI\n", |
90 | cpu); | 90 | cpu); |
91 | return; /* -EBUSY */ | 91 | return; /* -EBUSY */ |
@@ -111,7 +111,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) | |||
111 | vendor_thermal_interrupt = intel_thermal_interrupt; | 111 | vendor_thermal_interrupt = intel_thermal_interrupt; |
112 | 112 | ||
113 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 113 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
114 | wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h); | 114 | wrmsr(MSR_IA32_MISC_ENABLE, l | MSR_IA32_MISC_ENABLE_TM1, h); |
115 | 115 | ||
116 | l = apic_read(APIC_LVTTHMR); | 116 | l = apic_read(APIC_LVTTHMR); |
117 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); | 117 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); |
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 9abd48b22674..f6c70a164e32 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/nmi.h> | 19 | #include <linux/nmi.h> |
20 | #include <linux/kprobes.h> | 20 | #include <linux/kprobes.h> |
21 | 21 | ||
22 | #include <asm/apic.h> | 22 | #include <asm/genapic.h> |
23 | #include <asm/intel_arch_perfmon.h> | 23 | #include <asm/intel_arch_perfmon.h> |
24 | 24 | ||
25 | struct nmi_watchdog_ctlblk { | 25 | struct nmi_watchdog_ctlblk { |
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c index 11b93cabdf78..ff958248e61d 100644 --- a/arch/x86/kernel/crash.c +++ b/arch/x86/kernel/crash.c | |||
@@ -28,8 +28,6 @@ | |||
28 | #include <asm/reboot.h> | 28 | #include <asm/reboot.h> |
29 | #include <asm/virtext.h> | 29 | #include <asm/virtext.h> |
30 | 30 | ||
31 | #include <mach_ipi.h> | ||
32 | |||
33 | 31 | ||
34 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) | 32 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_LOCAL_APIC) |
35 | 33 | ||
diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c index 6b1f6f6f8661..87d103ded1c3 100644 --- a/arch/x86/kernel/dumpstack.c +++ b/arch/x86/kernel/dumpstack.c | |||
@@ -99,7 +99,7 @@ print_context_stack(struct thread_info *tinfo, | |||
99 | frame = frame->next_frame; | 99 | frame = frame->next_frame; |
100 | bp = (unsigned long) frame; | 100 | bp = (unsigned long) frame; |
101 | } else { | 101 | } else { |
102 | ops->address(data, addr, bp == 0); | 102 | ops->address(data, addr, 0); |
103 | } | 103 | } |
104 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); | 104 | print_ftrace_graph_addr(addr, data, ops, tinfo, graph); |
105 | } | 105 | } |
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c index 504ad198e4ad..639ad98238a2 100644 --- a/arch/x86/kernel/early_printk.c +++ b/arch/x86/kernel/early_printk.c | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <asm/setup.h> | 13 | #include <asm/setup.h> |
14 | #include <xen/hvc-console.h> | 14 | #include <xen/hvc-console.h> |
15 | #include <asm/pci-direct.h> | 15 | #include <asm/pci-direct.h> |
16 | #include <asm/pgtable.h> | ||
17 | #include <asm/fixmap.h> | 16 | #include <asm/fixmap.h> |
17 | #include <asm/pgtable.h> | ||
18 | #include <linux/usb/ehci_def.h> | 18 | #include <linux/usb/ehci_def.h> |
19 | 19 | ||
20 | /* Simple VGA output */ | 20 | /* Simple VGA output */ |
diff --git a/arch/x86/kernel/efi_stub_32.S b/arch/x86/kernel/efi_stub_32.S index ef00bb77d7e4..fbe66e626c09 100644 --- a/arch/x86/kernel/efi_stub_32.S +++ b/arch/x86/kernel/efi_stub_32.S | |||
@@ -6,7 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/linkage.h> | 8 | #include <linux/linkage.h> |
9 | #include <asm/page.h> | 9 | #include <asm/page_types.h> |
10 | 10 | ||
11 | /* | 11 | /* |
12 | * efi_call_phys(void *, ...) is a function with variable parameters. | 12 | * efi_call_phys(void *, ...) is a function with variable parameters. |
@@ -113,6 +113,7 @@ ENTRY(efi_call_phys) | |||
113 | movl (%edx), %ecx | 113 | movl (%edx), %ecx |
114 | pushl %ecx | 114 | pushl %ecx |
115 | ret | 115 | ret |
116 | ENDPROC(efi_call_phys) | ||
116 | .previous | 117 | .previous |
117 | 118 | ||
118 | .data | 119 | .data |
diff --git a/arch/x86/kernel/efi_stub_64.S b/arch/x86/kernel/efi_stub_64.S index 99b47d48c9f4..4c07ccab8146 100644 --- a/arch/x86/kernel/efi_stub_64.S +++ b/arch/x86/kernel/efi_stub_64.S | |||
@@ -41,6 +41,7 @@ ENTRY(efi_call0) | |||
41 | addq $32, %rsp | 41 | addq $32, %rsp |
42 | RESTORE_XMM | 42 | RESTORE_XMM |
43 | ret | 43 | ret |
44 | ENDPROC(efi_call0) | ||
44 | 45 | ||
45 | ENTRY(efi_call1) | 46 | ENTRY(efi_call1) |
46 | SAVE_XMM | 47 | SAVE_XMM |
@@ -50,6 +51,7 @@ ENTRY(efi_call1) | |||
50 | addq $32, %rsp | 51 | addq $32, %rsp |
51 | RESTORE_XMM | 52 | RESTORE_XMM |
52 | ret | 53 | ret |
54 | ENDPROC(efi_call1) | ||
53 | 55 | ||
54 | ENTRY(efi_call2) | 56 | ENTRY(efi_call2) |
55 | SAVE_XMM | 57 | SAVE_XMM |
@@ -59,6 +61,7 @@ ENTRY(efi_call2) | |||
59 | addq $32, %rsp | 61 | addq $32, %rsp |
60 | RESTORE_XMM | 62 | RESTORE_XMM |
61 | ret | 63 | ret |
64 | ENDPROC(efi_call2) | ||
62 | 65 | ||
63 | ENTRY(efi_call3) | 66 | ENTRY(efi_call3) |
64 | SAVE_XMM | 67 | SAVE_XMM |
@@ -69,6 +72,7 @@ ENTRY(efi_call3) | |||
69 | addq $32, %rsp | 72 | addq $32, %rsp |
70 | RESTORE_XMM | 73 | RESTORE_XMM |
71 | ret | 74 | ret |
75 | ENDPROC(efi_call3) | ||
72 | 76 | ||
73 | ENTRY(efi_call4) | 77 | ENTRY(efi_call4) |
74 | SAVE_XMM | 78 | SAVE_XMM |
@@ -80,6 +84,7 @@ ENTRY(efi_call4) | |||
80 | addq $32, %rsp | 84 | addq $32, %rsp |
81 | RESTORE_XMM | 85 | RESTORE_XMM |
82 | ret | 86 | ret |
87 | ENDPROC(efi_call4) | ||
83 | 88 | ||
84 | ENTRY(efi_call5) | 89 | ENTRY(efi_call5) |
85 | SAVE_XMM | 90 | SAVE_XMM |
@@ -92,6 +97,7 @@ ENTRY(efi_call5) | |||
92 | addq $48, %rsp | 97 | addq $48, %rsp |
93 | RESTORE_XMM | 98 | RESTORE_XMM |
94 | ret | 99 | ret |
100 | ENDPROC(efi_call5) | ||
95 | 101 | ||
96 | ENTRY(efi_call6) | 102 | ENTRY(efi_call6) |
97 | SAVE_XMM | 103 | SAVE_XMM |
@@ -107,3 +113,4 @@ ENTRY(efi_call6) | |||
107 | addq $48, %rsp | 113 | addq $48, %rsp |
108 | RESTORE_XMM | 114 | RESTORE_XMM |
109 | ret | 115 | ret |
116 | ENDPROC(efi_call6) | ||
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 3de7b5710dc8..899e8938e79f 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <asm/errno.h> | 47 | #include <asm/errno.h> |
48 | #include <asm/segment.h> | 48 | #include <asm/segment.h> |
49 | #include <asm/smp.h> | 49 | #include <asm/smp.h> |
50 | #include <asm/page.h> | 50 | #include <asm/page_types.h> |
51 | #include <asm/desc.h> | 51 | #include <asm/desc.h> |
52 | #include <asm/percpu.h> | 52 | #include <asm/percpu.h> |
53 | #include <asm/dwarf2.h> | 53 | #include <asm/dwarf2.h> |
@@ -812,7 +812,7 @@ ENDPROC(name) | |||
812 | #define BUILD_INTERRUPT(name, nr) BUILD_INTERRUPT3(name, nr, smp_##name) | 812 | #define BUILD_INTERRUPT(name, nr) BUILD_INTERRUPT3(name, nr, smp_##name) |
813 | 813 | ||
814 | /* The include is where all of the SMP etc. interrupts come from */ | 814 | /* The include is where all of the SMP etc. interrupts come from */ |
815 | #include "entry_arch.h" | 815 | #include <asm/entry_arch.h> |
816 | 816 | ||
817 | ENTRY(coprocessor_error) | 817 | ENTRY(coprocessor_error) |
818 | RING0_INT_FRAME | 818 | RING0_INT_FRAME |
@@ -1359,7 +1359,7 @@ nmi_espfix_stack: | |||
1359 | CFI_ADJUST_CFA_OFFSET 4 | 1359 | CFI_ADJUST_CFA_OFFSET 4 |
1360 | pushl %esp | 1360 | pushl %esp |
1361 | CFI_ADJUST_CFA_OFFSET 4 | 1361 | CFI_ADJUST_CFA_OFFSET 4 |
1362 | addw $4, (%esp) | 1362 | addl $4, (%esp) |
1363 | /* copy the iret frame of 12 bytes */ | 1363 | /* copy the iret frame of 12 bytes */ |
1364 | .rept 3 | 1364 | .rept 3 |
1365 | pushl 16(%esp) | 1365 | pushl 16(%esp) |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 586bed677557..83d1836b9467 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -48,7 +48,7 @@ | |||
48 | #include <asm/unistd.h> | 48 | #include <asm/unistd.h> |
49 | #include <asm/thread_info.h> | 49 | #include <asm/thread_info.h> |
50 | #include <asm/hw_irq.h> | 50 | #include <asm/hw_irq.h> |
51 | #include <asm/page.h> | 51 | #include <asm/page_types.h> |
52 | #include <asm/irqflags.h> | 52 | #include <asm/irqflags.h> |
53 | #include <asm/paravirt.h> | 53 | #include <asm/paravirt.h> |
54 | #include <asm/ftrace.h> | 54 | #include <asm/ftrace.h> |
@@ -77,20 +77,17 @@ ENTRY(ftrace_caller) | |||
77 | movq 8(%rbp), %rsi | 77 | movq 8(%rbp), %rsi |
78 | subq $MCOUNT_INSN_SIZE, %rdi | 78 | subq $MCOUNT_INSN_SIZE, %rdi |
79 | 79 | ||
80 | .globl ftrace_call | 80 | GLOBAL(ftrace_call) |
81 | ftrace_call: | ||
82 | call ftrace_stub | 81 | call ftrace_stub |
83 | 82 | ||
84 | MCOUNT_RESTORE_FRAME | 83 | MCOUNT_RESTORE_FRAME |
85 | 84 | ||
86 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 85 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
87 | .globl ftrace_graph_call | 86 | GLOBAL(ftrace_graph_call) |
88 | ftrace_graph_call: | ||
89 | jmp ftrace_stub | 87 | jmp ftrace_stub |
90 | #endif | 88 | #endif |
91 | 89 | ||
92 | .globl ftrace_stub | 90 | GLOBAL(ftrace_stub) |
93 | ftrace_stub: | ||
94 | retq | 91 | retq |
95 | END(ftrace_caller) | 92 | END(ftrace_caller) |
96 | 93 | ||
@@ -110,8 +107,7 @@ ENTRY(mcount) | |||
110 | jnz ftrace_graph_caller | 107 | jnz ftrace_graph_caller |
111 | #endif | 108 | #endif |
112 | 109 | ||
113 | .globl ftrace_stub | 110 | GLOBAL(ftrace_stub) |
114 | ftrace_stub: | ||
115 | retq | 111 | retq |
116 | 112 | ||
117 | trace: | 113 | trace: |
@@ -148,9 +144,7 @@ ENTRY(ftrace_graph_caller) | |||
148 | retq | 144 | retq |
149 | END(ftrace_graph_caller) | 145 | END(ftrace_graph_caller) |
150 | 146 | ||
151 | 147 | GLOBAL(return_to_handler) | |
152 | .globl return_to_handler | ||
153 | return_to_handler: | ||
154 | subq $80, %rsp | 148 | subq $80, %rsp |
155 | 149 | ||
156 | movq %rax, (%rsp) | 150 | movq %rax, (%rsp) |
@@ -188,6 +182,7 @@ return_to_handler: | |||
188 | ENTRY(native_usergs_sysret64) | 182 | ENTRY(native_usergs_sysret64) |
189 | swapgs | 183 | swapgs |
190 | sysretq | 184 | sysretq |
185 | ENDPROC(native_usergs_sysret64) | ||
191 | #endif /* CONFIG_PARAVIRT */ | 186 | #endif /* CONFIG_PARAVIRT */ |
192 | 187 | ||
193 | 188 | ||
@@ -410,6 +405,8 @@ END(save_paranoid) | |||
410 | ENTRY(ret_from_fork) | 405 | ENTRY(ret_from_fork) |
411 | DEFAULT_FRAME | 406 | DEFAULT_FRAME |
412 | 407 | ||
408 | LOCK ; btr $TIF_FORK,TI_flags(%r8) | ||
409 | |||
413 | push kernel_eflags(%rip) | 410 | push kernel_eflags(%rip) |
414 | CFI_ADJUST_CFA_OFFSET 8 | 411 | CFI_ADJUST_CFA_OFFSET 8 |
415 | popf # reset kernel eflags | 412 | popf # reset kernel eflags |
@@ -631,16 +628,14 @@ tracesys: | |||
631 | * Syscall return path ending with IRET. | 628 | * Syscall return path ending with IRET. |
632 | * Has correct top of stack, but partial stack frame. | 629 | * Has correct top of stack, but partial stack frame. |
633 | */ | 630 | */ |
634 | .globl int_ret_from_sys_call | 631 | GLOBAL(int_ret_from_sys_call) |
635 | .globl int_with_check | ||
636 | int_ret_from_sys_call: | ||
637 | DISABLE_INTERRUPTS(CLBR_NONE) | 632 | DISABLE_INTERRUPTS(CLBR_NONE) |
638 | TRACE_IRQS_OFF | 633 | TRACE_IRQS_OFF |
639 | testl $3,CS-ARGOFFSET(%rsp) | 634 | testl $3,CS-ARGOFFSET(%rsp) |
640 | je retint_restore_args | 635 | je retint_restore_args |
641 | movl $_TIF_ALLWORK_MASK,%edi | 636 | movl $_TIF_ALLWORK_MASK,%edi |
642 | /* edi: mask to check */ | 637 | /* edi: mask to check */ |
643 | int_with_check: | 638 | GLOBAL(int_with_check) |
644 | LOCKDEP_SYS_EXIT_IRQ | 639 | LOCKDEP_SYS_EXIT_IRQ |
645 | GET_THREAD_INFO(%rcx) | 640 | GET_THREAD_INFO(%rcx) |
646 | movl TI_flags(%rcx),%edx | 641 | movl TI_flags(%rcx),%edx |
diff --git a/arch/x86/kernel/es7000_32.c b/arch/x86/kernel/es7000_32.c deleted file mode 100644 index 53699c931ad4..000000000000 --- a/arch/x86/kernel/es7000_32.c +++ /dev/null | |||
@@ -1,378 +0,0 @@ | |||
1 | /* | ||
2 | * Written by: Garry Forsgren, Unisys Corporation | ||
3 | * Natalie Protasevich, Unisys Corporation | ||
4 | * This file contains the code to configure and interface | ||
5 | * with Unisys ES7000 series hardware system manager. | ||
6 | * | ||
7 | * Copyright (c) 2003 Unisys Corporation. All Rights Reserved. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of version 2 of the GNU General Public License as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * This program is distributed in the hope that it would be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along | ||
18 | * with this program; if not, write the Free Software Foundation, Inc., 59 | ||
19 | * Temple Place - Suite 330, Boston MA 02111-1307, USA. | ||
20 | * | ||
21 | * Contact information: Unisys Corporation, Township Line & Union Meeting | ||
22 | * Roads-A, Unisys Way, Blue Bell, Pennsylvania, 19424, or: | ||
23 | * | ||
24 | * http://www.unisys.com | ||
25 | */ | ||
26 | |||
27 | #include <linux/module.h> | ||
28 | #include <linux/types.h> | ||
29 | #include <linux/kernel.h> | ||
30 | #include <linux/smp.h> | ||
31 | #include <linux/string.h> | ||
32 | #include <linux/spinlock.h> | ||
33 | #include <linux/errno.h> | ||
34 | #include <linux/notifier.h> | ||
35 | #include <linux/reboot.h> | ||
36 | #include <linux/init.h> | ||
37 | #include <linux/acpi.h> | ||
38 | #include <asm/io.h> | ||
39 | #include <asm/nmi.h> | ||
40 | #include <asm/smp.h> | ||
41 | #include <asm/atomic.h> | ||
42 | #include <asm/apicdef.h> | ||
43 | #include <mach_mpparse.h> | ||
44 | #include <asm/genapic.h> | ||
45 | #include <asm/setup.h> | ||
46 | |||
47 | /* | ||
48 | * ES7000 chipsets | ||
49 | */ | ||
50 | |||
51 | #define NON_UNISYS 0 | ||
52 | #define ES7000_CLASSIC 1 | ||
53 | #define ES7000_ZORRO 2 | ||
54 | |||
55 | |||
56 | #define MIP_REG 1 | ||
57 | #define MIP_PSAI_REG 4 | ||
58 | |||
59 | #define MIP_BUSY 1 | ||
60 | #define MIP_SPIN 0xf0000 | ||
61 | #define MIP_VALID 0x0100000000000000ULL | ||
62 | #define MIP_PORT(VALUE) ((VALUE >> 32) & 0xffff) | ||
63 | |||
64 | #define MIP_RD_LO(VALUE) (VALUE & 0xffffffff) | ||
65 | |||
66 | struct mip_reg_info { | ||
67 | unsigned long long mip_info; | ||
68 | unsigned long long delivery_info; | ||
69 | unsigned long long host_reg; | ||
70 | unsigned long long mip_reg; | ||
71 | }; | ||
72 | |||
73 | struct part_info { | ||
74 | unsigned char type; | ||
75 | unsigned char length; | ||
76 | unsigned char part_id; | ||
77 | unsigned char apic_mode; | ||
78 | unsigned long snum; | ||
79 | char ptype[16]; | ||
80 | char sname[64]; | ||
81 | char pname[64]; | ||
82 | }; | ||
83 | |||
84 | struct psai { | ||
85 | unsigned long long entry_type; | ||
86 | unsigned long long addr; | ||
87 | unsigned long long bep_addr; | ||
88 | }; | ||
89 | |||
90 | struct es7000_mem_info { | ||
91 | unsigned char type; | ||
92 | unsigned char length; | ||
93 | unsigned char resv[6]; | ||
94 | unsigned long long start; | ||
95 | unsigned long long size; | ||
96 | }; | ||
97 | |||
98 | struct es7000_oem_table { | ||
99 | unsigned long long hdr; | ||
100 | struct mip_reg_info mip; | ||
101 | struct part_info pif; | ||
102 | struct es7000_mem_info shm; | ||
103 | struct psai psai; | ||
104 | }; | ||
105 | |||
106 | #ifdef CONFIG_ACPI | ||
107 | |||
108 | struct oem_table { | ||
109 | struct acpi_table_header Header; | ||
110 | u32 OEMTableAddr; | ||
111 | u32 OEMTableSize; | ||
112 | }; | ||
113 | |||
114 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); | ||
115 | extern void unmap_unisys_acpi_oem_table(unsigned long oem_addr); | ||
116 | #endif | ||
117 | |||
118 | struct mip_reg { | ||
119 | unsigned long long off_0; | ||
120 | unsigned long long off_8; | ||
121 | unsigned long long off_10; | ||
122 | unsigned long long off_18; | ||
123 | unsigned long long off_20; | ||
124 | unsigned long long off_28; | ||
125 | unsigned long long off_30; | ||
126 | unsigned long long off_38; | ||
127 | }; | ||
128 | |||
129 | #define MIP_SW_APIC 0x1020b | ||
130 | #define MIP_FUNC(VALUE) (VALUE & 0xff) | ||
131 | |||
132 | /* | ||
133 | * ES7000 Globals | ||
134 | */ | ||
135 | |||
136 | static volatile unsigned long *psai = NULL; | ||
137 | static struct mip_reg *mip_reg; | ||
138 | static struct mip_reg *host_reg; | ||
139 | static int mip_port; | ||
140 | static unsigned long mip_addr, host_addr; | ||
141 | |||
142 | int es7000_plat; | ||
143 | |||
144 | /* | ||
145 | * GSI override for ES7000 platforms. | ||
146 | */ | ||
147 | |||
148 | static unsigned int base; | ||
149 | |||
150 | static int | ||
151 | es7000_rename_gsi(int ioapic, int gsi) | ||
152 | { | ||
153 | if (es7000_plat == ES7000_ZORRO) | ||
154 | return gsi; | ||
155 | |||
156 | if (!base) { | ||
157 | int i; | ||
158 | for (i = 0; i < nr_ioapics; i++) | ||
159 | base += nr_ioapic_registers[i]; | ||
160 | } | ||
161 | |||
162 | if (!ioapic && (gsi < 16)) | ||
163 | gsi += base; | ||
164 | return gsi; | ||
165 | } | ||
166 | |||
167 | static int wakeup_secondary_cpu_via_mip(int cpu, unsigned long eip) | ||
168 | { | ||
169 | unsigned long vect = 0, psaival = 0; | ||
170 | |||
171 | if (psai == NULL) | ||
172 | return -1; | ||
173 | |||
174 | vect = ((unsigned long)__pa(eip)/0x1000) << 16; | ||
175 | psaival = (0x1000000 | vect | cpu); | ||
176 | |||
177 | while (*psai & 0x1000000) | ||
178 | ; | ||
179 | |||
180 | *psai = psaival; | ||
181 | |||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | static void noop_wait_for_deassert(atomic_t *deassert_not_used) | ||
186 | { | ||
187 | } | ||
188 | |||
189 | static int __init es7000_update_genapic(void) | ||
190 | { | ||
191 | genapic->wakeup_cpu = wakeup_secondary_cpu_via_mip; | ||
192 | |||
193 | /* MPENTIUMIII */ | ||
194 | if (boot_cpu_data.x86 == 6 && | ||
195 | (boot_cpu_data.x86_model >= 7 || boot_cpu_data.x86_model <= 11)) { | ||
196 | es7000_update_genapic_to_cluster(); | ||
197 | genapic->wait_for_init_deassert = noop_wait_for_deassert; | ||
198 | genapic->wakeup_cpu = wakeup_secondary_cpu_via_mip; | ||
199 | } | ||
200 | |||
201 | return 0; | ||
202 | } | ||
203 | |||
204 | void __init | ||
205 | setup_unisys(void) | ||
206 | { | ||
207 | /* | ||
208 | * Determine the generation of the ES7000 currently running. | ||
209 | * | ||
210 | * es7000_plat = 1 if the machine is a 5xx ES7000 box | ||
211 | * es7000_plat = 2 if the machine is a x86_64 ES7000 box | ||
212 | * | ||
213 | */ | ||
214 | if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) | ||
215 | es7000_plat = ES7000_ZORRO; | ||
216 | else | ||
217 | es7000_plat = ES7000_CLASSIC; | ||
218 | ioapic_renumber_irq = es7000_rename_gsi; | ||
219 | |||
220 | x86_quirks->update_genapic = es7000_update_genapic; | ||
221 | } | ||
222 | |||
223 | /* | ||
224 | * Parse the OEM Table | ||
225 | */ | ||
226 | |||
227 | int __init | ||
228 | parse_unisys_oem (char *oemptr) | ||
229 | { | ||
230 | int i; | ||
231 | int success = 0; | ||
232 | unsigned char type, size; | ||
233 | unsigned long val; | ||
234 | char *tp = NULL; | ||
235 | struct psai *psaip = NULL; | ||
236 | struct mip_reg_info *mi; | ||
237 | struct mip_reg *host, *mip; | ||
238 | |||
239 | tp = oemptr; | ||
240 | |||
241 | tp += 8; | ||
242 | |||
243 | for (i=0; i <= 6; i++) { | ||
244 | type = *tp++; | ||
245 | size = *tp++; | ||
246 | tp -= 2; | ||
247 | switch (type) { | ||
248 | case MIP_REG: | ||
249 | mi = (struct mip_reg_info *)tp; | ||
250 | val = MIP_RD_LO(mi->host_reg); | ||
251 | host_addr = val; | ||
252 | host = (struct mip_reg *)val; | ||
253 | host_reg = __va(host); | ||
254 | val = MIP_RD_LO(mi->mip_reg); | ||
255 | mip_port = MIP_PORT(mi->mip_info); | ||
256 | mip_addr = val; | ||
257 | mip = (struct mip_reg *)val; | ||
258 | mip_reg = __va(mip); | ||
259 | pr_debug("es7000_mipcfg: host_reg = 0x%lx \n", | ||
260 | (unsigned long)host_reg); | ||
261 | pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n", | ||
262 | (unsigned long)mip_reg); | ||
263 | success++; | ||
264 | break; | ||
265 | case MIP_PSAI_REG: | ||
266 | psaip = (struct psai *)tp; | ||
267 | if (tp != NULL) { | ||
268 | if (psaip->addr) | ||
269 | psai = __va(psaip->addr); | ||
270 | else | ||
271 | psai = NULL; | ||
272 | success++; | ||
273 | } | ||
274 | break; | ||
275 | default: | ||
276 | break; | ||
277 | } | ||
278 | tp += size; | ||
279 | } | ||
280 | |||
281 | if (success < 2) { | ||
282 | es7000_plat = NON_UNISYS; | ||
283 | } else | ||
284 | setup_unisys(); | ||
285 | return es7000_plat; | ||
286 | } | ||
287 | |||
288 | #ifdef CONFIG_ACPI | ||
289 | static unsigned long oem_addrX; | ||
290 | static unsigned long oem_size; | ||
291 | int __init find_unisys_acpi_oem_table(unsigned long *oem_addr) | ||
292 | { | ||
293 | struct acpi_table_header *header = NULL; | ||
294 | int i = 0; | ||
295 | |||
296 | while (ACPI_SUCCESS(acpi_get_table("OEM1", i++, &header))) { | ||
297 | if (!memcmp((char *) &header->oem_id, "UNISYS", 6)) { | ||
298 | struct oem_table *t = (struct oem_table *)header; | ||
299 | |||
300 | oem_addrX = t->OEMTableAddr; | ||
301 | oem_size = t->OEMTableSize; | ||
302 | |||
303 | *oem_addr = (unsigned long)__acpi_map_table(oem_addrX, | ||
304 | oem_size); | ||
305 | return 0; | ||
306 | } | ||
307 | } | ||
308 | return -1; | ||
309 | } | ||
310 | |||
311 | void __init unmap_unisys_acpi_oem_table(unsigned long oem_addr) | ||
312 | { | ||
313 | } | ||
314 | #endif | ||
315 | |||
316 | static void | ||
317 | es7000_spin(int n) | ||
318 | { | ||
319 | int i = 0; | ||
320 | |||
321 | while (i++ < n) | ||
322 | rep_nop(); | ||
323 | } | ||
324 | |||
325 | static int __init | ||
326 | es7000_mip_write(struct mip_reg *mip_reg) | ||
327 | { | ||
328 | int status = 0; | ||
329 | int spin; | ||
330 | |||
331 | spin = MIP_SPIN; | ||
332 | while (((unsigned long long)host_reg->off_38 & | ||
333 | (unsigned long long)MIP_VALID) != 0) { | ||
334 | if (--spin <= 0) { | ||
335 | printk("es7000_mip_write: Timeout waiting for Host Valid Flag"); | ||
336 | return -1; | ||
337 | } | ||
338 | es7000_spin(MIP_SPIN); | ||
339 | } | ||
340 | |||
341 | memcpy(host_reg, mip_reg, sizeof(struct mip_reg)); | ||
342 | outb(1, mip_port); | ||
343 | |||
344 | spin = MIP_SPIN; | ||
345 | |||
346 | while (((unsigned long long)mip_reg->off_38 & | ||
347 | (unsigned long long)MIP_VALID) == 0) { | ||
348 | if (--spin <= 0) { | ||
349 | printk("es7000_mip_write: Timeout waiting for MIP Valid Flag"); | ||
350 | return -1; | ||
351 | } | ||
352 | es7000_spin(MIP_SPIN); | ||
353 | } | ||
354 | |||
355 | status = ((unsigned long long)mip_reg->off_0 & | ||
356 | (unsigned long long)0xffff0000000000ULL) >> 48; | ||
357 | mip_reg->off_38 = ((unsigned long long)mip_reg->off_38 & | ||
358 | (unsigned long long)~MIP_VALID); | ||
359 | return status; | ||
360 | } | ||
361 | |||
362 | void __init | ||
363 | es7000_sw_apic(void) | ||
364 | { | ||
365 | if (es7000_plat) { | ||
366 | int mip_status; | ||
367 | struct mip_reg es7000_mip_reg; | ||
368 | |||
369 | printk("ES7000: Enabling APIC mode.\n"); | ||
370 | memset(&es7000_mip_reg, 0, sizeof(struct mip_reg)); | ||
371 | es7000_mip_reg.off_0 = MIP_SW_APIC; | ||
372 | es7000_mip_reg.off_38 = (MIP_VALID); | ||
373 | while ((mip_status = es7000_mip_write(&es7000_mip_reg)) != 0) | ||
374 | printk("es7000_sw_apic: command failed, status = %x\n", | ||
375 | mip_status); | ||
376 | return; | ||
377 | } | ||
378 | } | ||
diff --git a/arch/x86/kernel/ftrace.c b/arch/x86/kernel/ftrace.c index 1b43086b097a..231bdd3c5b1c 100644 --- a/arch/x86/kernel/ftrace.c +++ b/arch/x86/kernel/ftrace.c | |||
@@ -488,20 +488,21 @@ void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) | |||
488 | * ignore such a protection. | 488 | * ignore such a protection. |
489 | */ | 489 | */ |
490 | asm volatile( | 490 | asm volatile( |
491 | "1: " _ASM_MOV " (%[parent_old]), %[old]\n" | 491 | "1: " _ASM_MOV " (%[parent]), %[old]\n" |
492 | "2: " _ASM_MOV " %[return_hooker], (%[parent_replaced])\n" | 492 | "2: " _ASM_MOV " %[return_hooker], (%[parent])\n" |
493 | " movl $0, %[faulted]\n" | 493 | " movl $0, %[faulted]\n" |
494 | "3:\n" | ||
494 | 495 | ||
495 | ".section .fixup, \"ax\"\n" | 496 | ".section .fixup, \"ax\"\n" |
496 | "3: movl $1, %[faulted]\n" | 497 | "4: movl $1, %[faulted]\n" |
498 | " jmp 3b\n" | ||
497 | ".previous\n" | 499 | ".previous\n" |
498 | 500 | ||
499 | _ASM_EXTABLE(1b, 3b) | 501 | _ASM_EXTABLE(1b, 4b) |
500 | _ASM_EXTABLE(2b, 3b) | 502 | _ASM_EXTABLE(2b, 4b) |
501 | 503 | ||
502 | : [parent_replaced] "=r" (parent), [old] "=r" (old), | 504 | : [old] "=r" (old), [faulted] "=r" (faulted) |
503 | [faulted] "=r" (faulted) | 505 | : [parent] "r" (parent), [return_hooker] "r" (return_hooker) |
504 | : [parent_old] "0" (parent), [return_hooker] "r" (return_hooker) | ||
505 | : "memory" | 506 | : "memory" |
506 | ); | 507 | ); |
507 | 508 | ||
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index cf21fd0cf6ac..c32ca19d591a 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -11,8 +11,8 @@ | |||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/linkage.h> | 12 | #include <linux/linkage.h> |
13 | #include <asm/segment.h> | 13 | #include <asm/segment.h> |
14 | #include <asm/page.h> | 14 | #include <asm/page_types.h> |
15 | #include <asm/pgtable.h> | 15 | #include <asm/pgtable_types.h> |
16 | #include <asm/desc.h> | 16 | #include <asm/desc.h> |
17 | #include <asm/cache.h> | 17 | #include <asm/cache.h> |
18 | #include <asm/thread_info.h> | 18 | #include <asm/thread_info.h> |
@@ -567,12 +567,8 @@ early_fault: | |||
567 | pushl %eax | 567 | pushl %eax |
568 | pushl %edx /* trapno */ | 568 | pushl %edx /* trapno */ |
569 | pushl $fault_msg | 569 | pushl $fault_msg |
570 | #ifdef CONFIG_EARLY_PRINTK | ||
571 | call early_printk | ||
572 | #else | ||
573 | call printk | 570 | call printk |
574 | #endif | 571 | #endif |
575 | #endif | ||
576 | call dump_stack | 572 | call dump_stack |
577 | hlt_loop: | 573 | hlt_loop: |
578 | hlt | 574 | hlt |
@@ -599,11 +595,10 @@ ignore_int: | |||
599 | pushl 32(%esp) | 595 | pushl 32(%esp) |
600 | pushl 40(%esp) | 596 | pushl 40(%esp) |
601 | pushl $int_msg | 597 | pushl $int_msg |
602 | #ifdef CONFIG_EARLY_PRINTK | ||
603 | call early_printk | ||
604 | #else | ||
605 | call printk | 598 | call printk |
606 | #endif | 599 | |
600 | call dump_stack | ||
601 | |||
607 | addl $(5*4),%esp | 602 | addl $(5*4),%esp |
608 | popl %ds | 603 | popl %ds |
609 | popl %es | 604 | popl %es |
@@ -679,7 +674,7 @@ early_recursion_flag: | |||
679 | .long 0 | 674 | .long 0 |
680 | 675 | ||
681 | int_msg: | 676 | int_msg: |
682 | .asciz "Unknown interrupt or fault at EIP %p %p %p\n" | 677 | .asciz "Unknown interrupt or fault at: %p %p %p\n" |
683 | 678 | ||
684 | fault_msg: | 679 | fault_msg: |
685 | /* fault info: */ | 680 | /* fault info: */ |
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index 2e648e3a5ea4..54b29bb24e71 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -329,8 +329,6 @@ early_idt_ripmsg: | |||
329 | #endif /* CONFIG_EARLY_PRINTK */ | 329 | #endif /* CONFIG_EARLY_PRINTK */ |
330 | .previous | 330 | .previous |
331 | 331 | ||
332 | .balign PAGE_SIZE | ||
333 | |||
334 | #define NEXT_PAGE(name) \ | 332 | #define NEXT_PAGE(name) \ |
335 | .balign PAGE_SIZE; \ | 333 | .balign PAGE_SIZE; \ |
336 | ENTRY(name) | 334 | ENTRY(name) |
@@ -419,7 +417,7 @@ ENTRY(phys_base) | |||
419 | .section .bss, "aw", @nobits | 417 | .section .bss, "aw", @nobits |
420 | .align L1_CACHE_BYTES | 418 | .align L1_CACHE_BYTES |
421 | ENTRY(idt_table) | 419 | ENTRY(idt_table) |
422 | .skip 256 * 16 | 420 | .skip IDT_ENTRIES * 16 |
423 | 421 | ||
424 | .section .bss.page_aligned, "aw", @nobits | 422 | .section .bss.page_aligned, "aw", @nobits |
425 | .align PAGE_SIZE | 423 | .align PAGE_SIZE |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index 64d5ad0b8add..a00545fe5cdd 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
@@ -269,6 +269,8 @@ static void hpet_set_mode(enum clock_event_mode mode, | |||
269 | now = hpet_readl(HPET_COUNTER); | 269 | now = hpet_readl(HPET_COUNTER); |
270 | cmp = now + (unsigned long) delta; | 270 | cmp = now + (unsigned long) delta; |
271 | cfg = hpet_readl(HPET_Tn_CFG(timer)); | 271 | cfg = hpet_readl(HPET_Tn_CFG(timer)); |
272 | /* Make sure we use edge triggered interrupts */ | ||
273 | cfg &= ~HPET_TN_LEVEL; | ||
272 | cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | | 274 | cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC | |
273 | HPET_TN_SETVAL | HPET_TN_32BIT; | 275 | HPET_TN_SETVAL | HPET_TN_32BIT; |
274 | hpet_writel(cfg, HPET_Tn_CFG(timer)); | 276 | hpet_writel(cfg, HPET_Tn_CFG(timer)); |
@@ -897,7 +899,7 @@ static unsigned long hpet_rtc_flags; | |||
897 | static int hpet_prev_update_sec; | 899 | static int hpet_prev_update_sec; |
898 | static struct rtc_time hpet_alarm_time; | 900 | static struct rtc_time hpet_alarm_time; |
899 | static unsigned long hpet_pie_count; | 901 | static unsigned long hpet_pie_count; |
900 | static unsigned long hpet_t1_cmp; | 902 | static u32 hpet_t1_cmp; |
901 | static unsigned long hpet_default_delta; | 903 | static unsigned long hpet_default_delta; |
902 | static unsigned long hpet_pie_delta; | 904 | static unsigned long hpet_pie_delta; |
903 | static unsigned long hpet_pie_limit; | 905 | static unsigned long hpet_pie_limit; |
@@ -905,6 +907,14 @@ static unsigned long hpet_pie_limit; | |||
905 | static rtc_irq_handler irq_handler; | 907 | static rtc_irq_handler irq_handler; |
906 | 908 | ||
907 | /* | 909 | /* |
910 | * Check that the hpet counter c1 is ahead of the c2 | ||
911 | */ | ||
912 | static inline int hpet_cnt_ahead(u32 c1, u32 c2) | ||
913 | { | ||
914 | return (s32)(c2 - c1) < 0; | ||
915 | } | ||
916 | |||
917 | /* | ||
908 | * Registers a IRQ handler. | 918 | * Registers a IRQ handler. |
909 | */ | 919 | */ |
910 | int hpet_register_irq_handler(rtc_irq_handler handler) | 920 | int hpet_register_irq_handler(rtc_irq_handler handler) |
@@ -1075,7 +1085,7 @@ static void hpet_rtc_timer_reinit(void) | |||
1075 | hpet_t1_cmp += delta; | 1085 | hpet_t1_cmp += delta; |
1076 | hpet_writel(hpet_t1_cmp, HPET_T1_CMP); | 1086 | hpet_writel(hpet_t1_cmp, HPET_T1_CMP); |
1077 | lost_ints++; | 1087 | lost_ints++; |
1078 | } while ((long)(hpet_readl(HPET_COUNTER) - hpet_t1_cmp) > 0); | 1088 | } while (!hpet_cnt_ahead(hpet_t1_cmp, hpet_readl(HPET_COUNTER))); |
1079 | 1089 | ||
1080 | if (lost_ints) { | 1090 | if (lost_ints) { |
1081 | if (hpet_rtc_flags & RTC_PIE) | 1091 | if (hpet_rtc_flags & RTC_PIE) |
diff --git a/arch/x86/kernel/i8237.c b/arch/x86/kernel/i8237.c index dbd6c1d1b638..b42ca694dc68 100644 --- a/arch/x86/kernel/i8237.c +++ b/arch/x86/kernel/i8237.c | |||
@@ -28,10 +28,10 @@ static int i8237A_resume(struct sys_device *dev) | |||
28 | 28 | ||
29 | flags = claim_dma_lock(); | 29 | flags = claim_dma_lock(); |
30 | 30 | ||
31 | dma_outb(DMA1_RESET_REG, 0); | 31 | dma_outb(0, DMA1_RESET_REG); |
32 | dma_outb(DMA2_RESET_REG, 0); | 32 | dma_outb(0, DMA2_RESET_REG); |
33 | 33 | ||
34 | for (i = 0;i < 8;i++) { | 34 | for (i = 0; i < 8; i++) { |
35 | set_dma_addr(i, 0x000000); | 35 | set_dma_addr(i, 0x000000); |
36 | /* DMA count is a bit weird so this is not 0 */ | 36 | /* DMA count is a bit weird so this is not 0 */ |
37 | set_dma_count(i, 1); | 37 | set_dma_count(i, 1); |
@@ -51,14 +51,14 @@ static int i8237A_suspend(struct sys_device *dev, pm_message_t state) | |||
51 | } | 51 | } |
52 | 52 | ||
53 | static struct sysdev_class i8237_sysdev_class = { | 53 | static struct sysdev_class i8237_sysdev_class = { |
54 | .name = "i8237", | 54 | .name = "i8237", |
55 | .suspend = i8237A_suspend, | 55 | .suspend = i8237A_suspend, |
56 | .resume = i8237A_resume, | 56 | .resume = i8237A_resume, |
57 | }; | 57 | }; |
58 | 58 | ||
59 | static struct sys_device device_i8237A = { | 59 | static struct sys_device device_i8237A = { |
60 | .id = 0, | 60 | .id = 0, |
61 | .cls = &i8237_sysdev_class, | 61 | .cls = &i8237_sysdev_class, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | static int __init i8237A_init_sysfs(void) | 64 | static int __init i8237A_init_sysfs(void) |
@@ -68,5 +68,4 @@ static int __init i8237A_init_sysfs(void) | |||
68 | error = sysdev_register(&device_i8237A); | 68 | error = sysdev_register(&device_i8237A); |
69 | return error; | 69 | return error; |
70 | } | 70 | } |
71 | |||
72 | device_initcall(i8237A_init_sysfs); | 71 | device_initcall(i8237A_init_sysfs); |
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index 11d5093eb281..df89102bef80 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <asm/pgtable.h> | 22 | #include <asm/pgtable.h> |
23 | #include <asm/desc.h> | 23 | #include <asm/desc.h> |
24 | #include <asm/apic.h> | 24 | #include <asm/apic.h> |
25 | #include <asm/arch_hooks.h> | ||
26 | #include <asm/i8259.h> | 25 | #include <asm/i8259.h> |
27 | 26 | ||
28 | /* | 27 | /* |
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c deleted file mode 100644 index 285bbf8831fa..000000000000 --- a/arch/x86/kernel/ipi.c +++ /dev/null | |||
@@ -1,190 +0,0 @@ | |||
1 | #include <linux/cpumask.h> | ||
2 | #include <linux/interrupt.h> | ||
3 | #include <linux/init.h> | ||
4 | |||
5 | #include <linux/mm.h> | ||
6 | #include <linux/delay.h> | ||
7 | #include <linux/spinlock.h> | ||
8 | #include <linux/kernel_stat.h> | ||
9 | #include <linux/mc146818rtc.h> | ||
10 | #include <linux/cache.h> | ||
11 | #include <linux/cpu.h> | ||
12 | #include <linux/module.h> | ||
13 | |||
14 | #include <asm/smp.h> | ||
15 | #include <asm/mtrr.h> | ||
16 | #include <asm/tlbflush.h> | ||
17 | #include <asm/mmu_context.h> | ||
18 | #include <asm/apic.h> | ||
19 | #include <asm/proto.h> | ||
20 | |||
21 | #ifdef CONFIG_X86_32 | ||
22 | #include <mach_apic.h> | ||
23 | #include <mach_ipi.h> | ||
24 | |||
25 | /* | ||
26 | * the following functions deal with sending IPIs between CPUs. | ||
27 | * | ||
28 | * We use 'broadcast', CPU->CPU IPIs and self-IPIs too. | ||
29 | */ | ||
30 | |||
31 | static inline int __prepare_ICR(unsigned int shortcut, int vector) | ||
32 | { | ||
33 | unsigned int icr = shortcut | APIC_DEST_LOGICAL; | ||
34 | |||
35 | switch (vector) { | ||
36 | default: | ||
37 | icr |= APIC_DM_FIXED | vector; | ||
38 | break; | ||
39 | case NMI_VECTOR: | ||
40 | icr |= APIC_DM_NMI; | ||
41 | break; | ||
42 | } | ||
43 | return icr; | ||
44 | } | ||
45 | |||
46 | static inline int __prepare_ICR2(unsigned int mask) | ||
47 | { | ||
48 | return SET_APIC_DEST_FIELD(mask); | ||
49 | } | ||
50 | |||
51 | void __send_IPI_shortcut(unsigned int shortcut, int vector) | ||
52 | { | ||
53 | /* | ||
54 | * Subtle. In the case of the 'never do double writes' workaround | ||
55 | * we have to lock out interrupts to be safe. As we don't care | ||
56 | * of the value read we use an atomic rmw access to avoid costly | ||
57 | * cli/sti. Otherwise we use an even cheaper single atomic write | ||
58 | * to the APIC. | ||
59 | */ | ||
60 | unsigned int cfg; | ||
61 | |||
62 | /* | ||
63 | * Wait for idle. | ||
64 | */ | ||
65 | apic_wait_icr_idle(); | ||
66 | |||
67 | /* | ||
68 | * No need to touch the target chip field | ||
69 | */ | ||
70 | cfg = __prepare_ICR(shortcut, vector); | ||
71 | |||
72 | /* | ||
73 | * Send the IPI. The write to APIC_ICR fires this off. | ||
74 | */ | ||
75 | apic_write(APIC_ICR, cfg); | ||
76 | } | ||
77 | |||
78 | void send_IPI_self(int vector) | ||
79 | { | ||
80 | __send_IPI_shortcut(APIC_DEST_SELF, vector); | ||
81 | } | ||
82 | |||
83 | /* | ||
84 | * This is used to send an IPI with no shorthand notation (the destination is | ||
85 | * specified in bits 56 to 63 of the ICR). | ||
86 | */ | ||
87 | static inline void __send_IPI_dest_field(unsigned long mask, int vector) | ||
88 | { | ||
89 | unsigned long cfg; | ||
90 | |||
91 | /* | ||
92 | * Wait for idle. | ||
93 | */ | ||
94 | if (unlikely(vector == NMI_VECTOR)) | ||
95 | safe_apic_wait_icr_idle(); | ||
96 | else | ||
97 | apic_wait_icr_idle(); | ||
98 | |||
99 | /* | ||
100 | * prepare target chip field | ||
101 | */ | ||
102 | cfg = __prepare_ICR2(mask); | ||
103 | apic_write(APIC_ICR2, cfg); | ||
104 | |||
105 | /* | ||
106 | * program the ICR | ||
107 | */ | ||
108 | cfg = __prepare_ICR(0, vector); | ||
109 | |||
110 | /* | ||
111 | * Send the IPI. The write to APIC_ICR fires this off. | ||
112 | */ | ||
113 | apic_write(APIC_ICR, cfg); | ||
114 | } | ||
115 | |||
116 | /* | ||
117 | * This is only used on smaller machines. | ||
118 | */ | ||
119 | void send_IPI_mask_bitmask(const struct cpumask *cpumask, int vector) | ||
120 | { | ||
121 | unsigned long mask = cpumask_bits(cpumask)[0]; | ||
122 | unsigned long flags; | ||
123 | |||
124 | local_irq_save(flags); | ||
125 | WARN_ON(mask & ~cpumask_bits(cpu_online_mask)[0]); | ||
126 | __send_IPI_dest_field(mask, vector); | ||
127 | local_irq_restore(flags); | ||
128 | } | ||
129 | |||
130 | void send_IPI_mask_sequence(const struct cpumask *mask, int vector) | ||
131 | { | ||
132 | unsigned long flags; | ||
133 | unsigned int query_cpu; | ||
134 | |||
135 | /* | ||
136 | * Hack. The clustered APIC addressing mode doesn't allow us to send | ||
137 | * to an arbitrary mask, so I do a unicasts to each CPU instead. This | ||
138 | * should be modified to do 1 message per cluster ID - mbligh | ||
139 | */ | ||
140 | |||
141 | local_irq_save(flags); | ||
142 | for_each_cpu(query_cpu, mask) | ||
143 | __send_IPI_dest_field(cpu_to_logical_apicid(query_cpu), vector); | ||
144 | local_irq_restore(flags); | ||
145 | } | ||
146 | |||
147 | void send_IPI_mask_allbutself(const struct cpumask *mask, int vector) | ||
148 | { | ||
149 | unsigned long flags; | ||
150 | unsigned int query_cpu; | ||
151 | unsigned int this_cpu = smp_processor_id(); | ||
152 | |||
153 | /* See Hack comment above */ | ||
154 | |||
155 | local_irq_save(flags); | ||
156 | for_each_cpu(query_cpu, mask) | ||
157 | if (query_cpu != this_cpu) | ||
158 | __send_IPI_dest_field(cpu_to_logical_apicid(query_cpu), | ||
159 | vector); | ||
160 | local_irq_restore(flags); | ||
161 | } | ||
162 | |||
163 | /* must come after the send_IPI functions above for inlining */ | ||
164 | static int convert_apicid_to_cpu(int apic_id) | ||
165 | { | ||
166 | int i; | ||
167 | |||
168 | for_each_possible_cpu(i) { | ||
169 | if (per_cpu(x86_cpu_to_apicid, i) == apic_id) | ||
170 | return i; | ||
171 | } | ||
172 | return -1; | ||
173 | } | ||
174 | |||
175 | int safe_smp_processor_id(void) | ||
176 | { | ||
177 | int apicid, cpuid; | ||
178 | |||
179 | if (!boot_cpu_has(X86_FEATURE_APIC)) | ||
180 | return 0; | ||
181 | |||
182 | apicid = hard_smp_processor_id(); | ||
183 | if (apicid == BAD_APICID) | ||
184 | return 0; | ||
185 | |||
186 | cpuid = convert_apicid_to_cpu(apicid); | ||
187 | |||
188 | return cpuid >= 0 ? cpuid : 0; | ||
189 | } | ||
190 | #endif | ||
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 8b30d0c2512c..f13ca1650aaf 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -6,10 +6,12 @@ | |||
6 | #include <linux/kernel_stat.h> | 6 | #include <linux/kernel_stat.h> |
7 | #include <linux/seq_file.h> | 7 | #include <linux/seq_file.h> |
8 | #include <linux/smp.h> | 8 | #include <linux/smp.h> |
9 | #include <linux/ftrace.h> | ||
9 | 10 | ||
10 | #include <asm/apic.h> | 11 | #include <asm/apic.h> |
11 | #include <asm/io_apic.h> | 12 | #include <asm/io_apic.h> |
12 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
14 | #include <asm/idle.h> | ||
13 | 15 | ||
14 | atomic_t irq_err_count; | 16 | atomic_t irq_err_count; |
15 | 17 | ||
@@ -188,4 +190,40 @@ u64 arch_irq_stat(void) | |||
188 | return sum; | 190 | return sum; |
189 | } | 191 | } |
190 | 192 | ||
193 | |||
194 | /* | ||
195 | * do_IRQ handles all normal device IRQ's (the special | ||
196 | * SMP cross-CPU interrupts have their own specific | ||
197 | * handlers). | ||
198 | */ | ||
199 | unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | ||
200 | { | ||
201 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
202 | |||
203 | /* high bit used in ret_from_ code */ | ||
204 | unsigned vector = ~regs->orig_ax; | ||
205 | unsigned irq; | ||
206 | |||
207 | exit_idle(); | ||
208 | irq_enter(); | ||
209 | |||
210 | irq = __get_cpu_var(vector_irq)[vector]; | ||
211 | |||
212 | if (!handle_irq(irq, regs)) { | ||
213 | #ifdef CONFIG_X86_64 | ||
214 | if (!disable_apic) | ||
215 | ack_APIC_irq(); | ||
216 | #endif | ||
217 | |||
218 | if (printk_ratelimit()) | ||
219 | printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n", | ||
220 | __func__, smp_processor_id(), vector, irq); | ||
221 | } | ||
222 | |||
223 | irq_exit(); | ||
224 | |||
225 | set_irq_regs(old_regs); | ||
226 | return 1; | ||
227 | } | ||
228 | |||
191 | EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); | 229 | EXPORT_SYMBOL_GPL(vector_used_by_percpu_irq); |
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index e0f29be8ab0b..9dc6b2b24275 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -191,33 +191,16 @@ static inline int | |||
191 | execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) { return 0; } | 191 | execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) { return 0; } |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | /* | 194 | bool handle_irq(unsigned irq, struct pt_regs *regs) |
195 | * do_IRQ handles all normal device IRQ's (the special | ||
196 | * SMP cross-CPU interrupts have their own specific | ||
197 | * handlers). | ||
198 | */ | ||
199 | unsigned int do_IRQ(struct pt_regs *regs) | ||
200 | { | 195 | { |
201 | struct pt_regs *old_regs; | ||
202 | /* high bit used in ret_from_ code */ | ||
203 | int overflow; | ||
204 | unsigned vector = ~regs->orig_ax; | ||
205 | struct irq_desc *desc; | 196 | struct irq_desc *desc; |
206 | unsigned irq; | 197 | int overflow; |
207 | |||
208 | |||
209 | old_regs = set_irq_regs(regs); | ||
210 | irq_enter(); | ||
211 | irq = __get_cpu_var(vector_irq)[vector]; | ||
212 | 198 | ||
213 | overflow = check_stack_overflow(); | 199 | overflow = check_stack_overflow(); |
214 | 200 | ||
215 | desc = irq_to_desc(irq); | 201 | desc = irq_to_desc(irq); |
216 | if (unlikely(!desc)) { | 202 | if (unlikely(!desc)) |
217 | printk(KERN_EMERG "%s: cannot handle IRQ %d vector %#x cpu %d\n", | 203 | return false; |
218 | __func__, irq, vector, smp_processor_id()); | ||
219 | BUG(); | ||
220 | } | ||
221 | 204 | ||
222 | if (!execute_on_irq_stack(overflow, desc, irq)) { | 205 | if (!execute_on_irq_stack(overflow, desc, irq)) { |
223 | if (unlikely(overflow)) | 206 | if (unlikely(overflow)) |
@@ -225,13 +208,10 @@ unsigned int do_IRQ(struct pt_regs *regs) | |||
225 | desc->handle_irq(irq, desc); | 208 | desc->handle_irq(irq, desc); |
226 | } | 209 | } |
227 | 210 | ||
228 | irq_exit(); | 211 | return true; |
229 | set_irq_regs(old_regs); | ||
230 | return 1; | ||
231 | } | 212 | } |
232 | 213 | ||
233 | #ifdef CONFIG_HOTPLUG_CPU | 214 | #ifdef CONFIG_HOTPLUG_CPU |
234 | #include <mach_apic.h> | ||
235 | 215 | ||
236 | /* A cpu has been removed from cpu_online_mask. Reset irq affinities. */ | 216 | /* A cpu has been removed from cpu_online_mask. Reset irq affinities. */ |
237 | void fixup_irqs(void) | 217 | void fixup_irqs(void) |
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c index 018963aa6ee3..977d8b43a0dd 100644 --- a/arch/x86/kernel/irq_64.c +++ b/arch/x86/kernel/irq_64.c | |||
@@ -48,42 +48,18 @@ static inline void stack_overflow_check(struct pt_regs *regs) | |||
48 | #endif | 48 | #endif |
49 | } | 49 | } |
50 | 50 | ||
51 | /* | 51 | bool handle_irq(unsigned irq, struct pt_regs *regs) |
52 | * do_IRQ handles all normal device IRQ's (the special | ||
53 | * SMP cross-CPU interrupts have their own specific | ||
54 | * handlers). | ||
55 | */ | ||
56 | asmlinkage unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | ||
57 | { | 52 | { |
58 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
59 | struct irq_desc *desc; | 53 | struct irq_desc *desc; |
60 | 54 | ||
61 | /* high bit used in ret_from_ code */ | ||
62 | unsigned vector = ~regs->orig_ax; | ||
63 | unsigned irq; | ||
64 | |||
65 | exit_idle(); | ||
66 | irq_enter(); | ||
67 | irq = __get_cpu_var(vector_irq)[vector]; | ||
68 | |||
69 | stack_overflow_check(regs); | 55 | stack_overflow_check(regs); |
70 | 56 | ||
71 | desc = irq_to_desc(irq); | 57 | desc = irq_to_desc(irq); |
72 | if (likely(desc)) | 58 | if (unlikely(!desc)) |
73 | generic_handle_irq_desc(irq, desc); | 59 | return false; |
74 | else { | ||
75 | if (!disable_apic) | ||
76 | ack_APIC_irq(); | ||
77 | |||
78 | if (printk_ratelimit()) | ||
79 | printk(KERN_EMERG "%s: %d.%d No irq handler for vector\n", | ||
80 | __func__, smp_processor_id(), vector); | ||
81 | } | ||
82 | |||
83 | irq_exit(); | ||
84 | 60 | ||
85 | set_irq_regs(old_regs); | 61 | generic_handle_irq_desc(irq, desc); |
86 | return 1; | 62 | return true; |
87 | } | 63 | } |
88 | 64 | ||
89 | #ifdef CONFIG_HOTPLUG_CPU | 65 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/x86/kernel/irqinit_32.c b/arch/x86/kernel/irqinit_32.c index 22608ebf831b..50b8c3a3006c 100644 --- a/arch/x86/kernel/irqinit_32.c +++ b/arch/x86/kernel/irqinit_32.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
19 | #include <asm/desc.h> | 19 | #include <asm/desc.h> |
20 | #include <asm/apic.h> | 20 | #include <asm/apic.h> |
21 | #include <asm/arch_hooks.h> | 21 | #include <asm/setup.h> |
22 | #include <asm/i8259.h> | 22 | #include <asm/i8259.h> |
23 | #include <asm/traps.h> | 23 | #include <asm/traps.h> |
24 | 24 | ||
@@ -78,6 +78,15 @@ void __init init_ISA_irqs(void) | |||
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | /* | ||
82 | * IRQ2 is cascade interrupt to second interrupt controller | ||
83 | */ | ||
84 | static struct irqaction irq2 = { | ||
85 | .handler = no_action, | ||
86 | .mask = CPU_MASK_NONE, | ||
87 | .name = "cascade", | ||
88 | }; | ||
89 | |||
81 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { | 90 | DEFINE_PER_CPU(vector_irq_t, vector_irq) = { |
82 | [0 ... IRQ0_VECTOR - 1] = -1, | 91 | [0 ... IRQ0_VECTOR - 1] = -1, |
83 | [IRQ0_VECTOR] = 0, | 92 | [IRQ0_VECTOR] = 0, |
@@ -118,8 +127,8 @@ void __init native_init_IRQ(void) | |||
118 | { | 127 | { |
119 | int i; | 128 | int i; |
120 | 129 | ||
121 | /* all the set up before the call gates are initialised */ | 130 | /* Execute any quirks before the call gates are initialised: */ |
122 | pre_intr_init_hook(); | 131 | x86_quirk_pre_intr_init(); |
123 | 132 | ||
124 | /* | 133 | /* |
125 | * Cover the whole vector space, no vector can escape | 134 | * Cover the whole vector space, no vector can escape |
@@ -176,10 +185,14 @@ void __init native_init_IRQ(void) | |||
176 | alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); | 185 | alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt); |
177 | #endif | 186 | #endif |
178 | 187 | ||
179 | /* setup after call gates are initialised (usually add in | 188 | if (!acpi_ioapic) |
180 | * the architecture specific gates) | 189 | setup_irq(2, &irq2); |
190 | |||
191 | /* | ||
192 | * Call quirks after call gates are initialised (usually add in | ||
193 | * the architecture specific gates): | ||
181 | */ | 194 | */ |
182 | intr_init_hook(); | 195 | x86_quirk_intr_init(); |
183 | 196 | ||
184 | /* | 197 | /* |
185 | * External FPU? Set up irq13 if so, for | 198 | * External FPU? Set up irq13 if so, for |
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index 10435a120d22..eedfaebe1063 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <asm/apicdef.h> | 46 | #include <asm/apicdef.h> |
47 | #include <asm/system.h> | 47 | #include <asm/system.h> |
48 | 48 | ||
49 | #include <mach_ipi.h> | 49 | #include <asm/apic.h> |
50 | 50 | ||
51 | /* | 51 | /* |
52 | * Put the error code here just in case the user cares: | 52 | * Put the error code here just in case the user cares: |
@@ -347,7 +347,7 @@ void kgdb_post_primary_code(struct pt_regs *regs, int e_vector, int err_code) | |||
347 | */ | 347 | */ |
348 | void kgdb_roundup_cpus(unsigned long flags) | 348 | void kgdb_roundup_cpus(unsigned long flags) |
349 | { | 349 | { |
350 | send_IPI_allbutself(APIC_DM_NMI); | 350 | apic->send_IPI_allbutself(APIC_DM_NMI); |
351 | } | 351 | } |
352 | #endif | 352 | #endif |
353 | 353 | ||
diff --git a/arch/x86/kernel/kvmclock.c b/arch/x86/kernel/kvmclock.c index 652fce6d2cce..137f2e8132df 100644 --- a/arch/x86/kernel/kvmclock.c +++ b/arch/x86/kernel/kvmclock.c | |||
@@ -19,7 +19,6 @@ | |||
19 | #include <linux/clocksource.h> | 19 | #include <linux/clocksource.h> |
20 | #include <linux/kvm_para.h> | 20 | #include <linux/kvm_para.h> |
21 | #include <asm/pvclock.h> | 21 | #include <asm/pvclock.h> |
22 | #include <asm/arch_hooks.h> | ||
23 | #include <asm/msr.h> | 22 | #include <asm/msr.h> |
24 | #include <asm/apic.h> | 23 | #include <asm/apic.h> |
25 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index 37f420018a41..f5fc8c781a62 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/arch/x86/kernel/machine_kexec_32.c | |||
@@ -121,7 +121,7 @@ static void machine_kexec_page_table_set_one( | |||
121 | static void machine_kexec_prepare_page_tables(struct kimage *image) | 121 | static void machine_kexec_prepare_page_tables(struct kimage *image) |
122 | { | 122 | { |
123 | void *control_page; | 123 | void *control_page; |
124 | pmd_t *pmd = 0; | 124 | pmd_t *pmd = NULL; |
125 | 125 | ||
126 | control_page = page_address(image->control_code_page); | 126 | control_page = page_address(image->control_code_page); |
127 | #ifdef CONFIG_X86_PAE | 127 | #ifdef CONFIG_X86_PAE |
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index c43caa3a91f3..6993d51b7fd8 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
@@ -18,15 +18,6 @@ | |||
18 | #include <asm/mmu_context.h> | 18 | #include <asm/mmu_context.h> |
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | 20 | ||
21 | #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) | ||
22 | static u64 kexec_pgd[512] PAGE_ALIGNED; | ||
23 | static u64 kexec_pud0[512] PAGE_ALIGNED; | ||
24 | static u64 kexec_pmd0[512] PAGE_ALIGNED; | ||
25 | static u64 kexec_pte0[512] PAGE_ALIGNED; | ||
26 | static u64 kexec_pud1[512] PAGE_ALIGNED; | ||
27 | static u64 kexec_pmd1[512] PAGE_ALIGNED; | ||
28 | static u64 kexec_pte1[512] PAGE_ALIGNED; | ||
29 | |||
30 | static void init_level2_page(pmd_t *level2p, unsigned long addr) | 21 | static void init_level2_page(pmd_t *level2p, unsigned long addr) |
31 | { | 22 | { |
32 | unsigned long end_addr; | 23 | unsigned long end_addr; |
@@ -107,12 +98,65 @@ out: | |||
107 | return result; | 98 | return result; |
108 | } | 99 | } |
109 | 100 | ||
101 | static void free_transition_pgtable(struct kimage *image) | ||
102 | { | ||
103 | free_page((unsigned long)image->arch.pud); | ||
104 | free_page((unsigned long)image->arch.pmd); | ||
105 | free_page((unsigned long)image->arch.pte); | ||
106 | } | ||
107 | |||
108 | static int init_transition_pgtable(struct kimage *image, pgd_t *pgd) | ||
109 | { | ||
110 | pud_t *pud; | ||
111 | pmd_t *pmd; | ||
112 | pte_t *pte; | ||
113 | unsigned long vaddr, paddr; | ||
114 | int result = -ENOMEM; | ||
115 | |||
116 | vaddr = (unsigned long)relocate_kernel; | ||
117 | paddr = __pa(page_address(image->control_code_page)+PAGE_SIZE); | ||
118 | pgd += pgd_index(vaddr); | ||
119 | if (!pgd_present(*pgd)) { | ||
120 | pud = (pud_t *)get_zeroed_page(GFP_KERNEL); | ||
121 | if (!pud) | ||
122 | goto err; | ||
123 | image->arch.pud = pud; | ||
124 | set_pgd(pgd, __pgd(__pa(pud) | _KERNPG_TABLE)); | ||
125 | } | ||
126 | pud = pud_offset(pgd, vaddr); | ||
127 | if (!pud_present(*pud)) { | ||
128 | pmd = (pmd_t *)get_zeroed_page(GFP_KERNEL); | ||
129 | if (!pmd) | ||
130 | goto err; | ||
131 | image->arch.pmd = pmd; | ||
132 | set_pud(pud, __pud(__pa(pmd) | _KERNPG_TABLE)); | ||
133 | } | ||
134 | pmd = pmd_offset(pud, vaddr); | ||
135 | if (!pmd_present(*pmd)) { | ||
136 | pte = (pte_t *)get_zeroed_page(GFP_KERNEL); | ||
137 | if (!pte) | ||
138 | goto err; | ||
139 | image->arch.pte = pte; | ||
140 | set_pmd(pmd, __pmd(__pa(pte) | _KERNPG_TABLE)); | ||
141 | } | ||
142 | pte = pte_offset_kernel(pmd, vaddr); | ||
143 | set_pte(pte, pfn_pte(paddr >> PAGE_SHIFT, PAGE_KERNEL_EXEC)); | ||
144 | return 0; | ||
145 | err: | ||
146 | free_transition_pgtable(image); | ||
147 | return result; | ||
148 | } | ||
149 | |||
110 | 150 | ||
111 | static int init_pgtable(struct kimage *image, unsigned long start_pgtable) | 151 | static int init_pgtable(struct kimage *image, unsigned long start_pgtable) |
112 | { | 152 | { |
113 | pgd_t *level4p; | 153 | pgd_t *level4p; |
154 | int result; | ||
114 | level4p = (pgd_t *)__va(start_pgtable); | 155 | level4p = (pgd_t *)__va(start_pgtable); |
115 | return init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT); | 156 | result = init_level4_page(image, level4p, 0, max_pfn << PAGE_SHIFT); |
157 | if (result) | ||
158 | return result; | ||
159 | return init_transition_pgtable(image, level4p); | ||
116 | } | 160 | } |
117 | 161 | ||
118 | static void set_idt(void *newidt, u16 limit) | 162 | static void set_idt(void *newidt, u16 limit) |
@@ -174,7 +218,7 @@ int machine_kexec_prepare(struct kimage *image) | |||
174 | 218 | ||
175 | void machine_kexec_cleanup(struct kimage *image) | 219 | void machine_kexec_cleanup(struct kimage *image) |
176 | { | 220 | { |
177 | return; | 221 | free_transition_pgtable(image); |
178 | } | 222 | } |
179 | 223 | ||
180 | /* | 224 | /* |
@@ -195,22 +239,6 @@ void machine_kexec(struct kimage *image) | |||
195 | memcpy(control_page, relocate_kernel, PAGE_SIZE); | 239 | memcpy(control_page, relocate_kernel, PAGE_SIZE); |
196 | 240 | ||
197 | page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page); | 241 | page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page); |
198 | page_list[VA_CONTROL_PAGE] = (unsigned long)relocate_kernel; | ||
199 | page_list[PA_PGD] = virt_to_phys(&kexec_pgd); | ||
200 | page_list[VA_PGD] = (unsigned long)kexec_pgd; | ||
201 | page_list[PA_PUD_0] = virt_to_phys(&kexec_pud0); | ||
202 | page_list[VA_PUD_0] = (unsigned long)kexec_pud0; | ||
203 | page_list[PA_PMD_0] = virt_to_phys(&kexec_pmd0); | ||
204 | page_list[VA_PMD_0] = (unsigned long)kexec_pmd0; | ||
205 | page_list[PA_PTE_0] = virt_to_phys(&kexec_pte0); | ||
206 | page_list[VA_PTE_0] = (unsigned long)kexec_pte0; | ||
207 | page_list[PA_PUD_1] = virt_to_phys(&kexec_pud1); | ||
208 | page_list[VA_PUD_1] = (unsigned long)kexec_pud1; | ||
209 | page_list[PA_PMD_1] = virt_to_phys(&kexec_pmd1); | ||
210 | page_list[VA_PMD_1] = (unsigned long)kexec_pmd1; | ||
211 | page_list[PA_PTE_1] = virt_to_phys(&kexec_pte1); | ||
212 | page_list[VA_PTE_1] = (unsigned long)kexec_pte1; | ||
213 | |||
214 | page_list[PA_TABLE_PAGE] = | 242 | page_list[PA_TABLE_PAGE] = |
215 | (unsigned long)__pa(page_address(image->control_code_page)); | 243 | (unsigned long)__pa(page_address(image->control_code_page)); |
216 | 244 | ||
diff --git a/arch/x86/kernel/mca_32.c b/arch/x86/kernel/mca_32.c index 2dc183758be3..845d80ce1ef1 100644 --- a/arch/x86/kernel/mca_32.c +++ b/arch/x86/kernel/mca_32.c | |||
@@ -51,7 +51,6 @@ | |||
51 | #include <linux/ioport.h> | 51 | #include <linux/ioport.h> |
52 | #include <asm/uaccess.h> | 52 | #include <asm/uaccess.h> |
53 | #include <linux/init.h> | 53 | #include <linux/init.h> |
54 | #include <asm/arch_hooks.h> | ||
55 | 54 | ||
56 | static unsigned char which_scsi; | 55 | static unsigned char which_scsi; |
57 | 56 | ||
@@ -474,6 +473,4 @@ void __kprobes mca_handle_nmi(void) | |||
474 | * adapter was responsible for the error. | 473 | * adapter was responsible for the error. |
475 | */ | 474 | */ |
476 | bus_for_each_dev(&mca_bus_type, NULL, NULL, mca_handle_nmi_callback); | 475 | bus_for_each_dev(&mca_bus_type, NULL, NULL, mca_handle_nmi_callback); |
477 | 476 | } | |
478 | mca_nmi_hook(); | ||
479 | } /* mca_handle_nmi */ | ||
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index fa6bb263892e..37cb1bda1baf 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * compliant MP-table parsing routines. | 3 | * compliant MP-table parsing routines. |
4 | * | 4 | * |
5 | * (c) 1995 Alan Cox, Building #3 <alan@lxorguk.ukuu.org.uk> | 5 | * (c) 1995 Alan Cox, Building #3 <alan@lxorguk.ukuu.org.uk> |
6 | * (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com> | 6 | * (c) 1998, 1999, 2000, 2009 Ingo Molnar <mingo@redhat.com> |
7 | * (c) 2008 Alexey Starikovskiy <astarikovskiy@suse.de> | 7 | * (c) 2008 Alexey Starikovskiy <astarikovskiy@suse.de> |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -29,12 +29,7 @@ | |||
29 | #include <asm/setup.h> | 29 | #include <asm/setup.h> |
30 | #include <asm/smp.h> | 30 | #include <asm/smp.h> |
31 | 31 | ||
32 | #include <mach_apic.h> | 32 | #include <asm/apic.h> |
33 | #ifdef CONFIG_X86_32 | ||
34 | #include <mach_apicdef.h> | ||
35 | #include <mach_mpparse.h> | ||
36 | #endif | ||
37 | |||
38 | /* | 33 | /* |
39 | * Checksum an MP configuration block. | 34 | * Checksum an MP configuration block. |
40 | */ | 35 | */ |
@@ -292,16 +287,7 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) | |||
292 | return 0; | 287 | return 0; |
293 | 288 | ||
294 | #ifdef CONFIG_X86_32 | 289 | #ifdef CONFIG_X86_32 |
295 | /* | 290 | generic_mps_oem_check(mpc, oem, str); |
296 | * need to make sure summit and es7000's mps_oem_check is safe to be | ||
297 | * called early via genericarch 's mps_oem_check | ||
298 | */ | ||
299 | if (early) { | ||
300 | #ifdef CONFIG_X86_NUMAQ | ||
301 | numaq_mps_oem_check(mpc, oem, str); | ||
302 | #endif | ||
303 | } else | ||
304 | mps_oem_check(mpc, oem, str); | ||
305 | #endif | 291 | #endif |
306 | /* save the local APIC address, it might be non-default */ | 292 | /* save the local APIC address, it might be non-default */ |
307 | if (!acpi_lapic) | 293 | if (!acpi_lapic) |
@@ -386,13 +372,13 @@ static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early) | |||
386 | (*x86_quirks->mpc_record)++; | 372 | (*x86_quirks->mpc_record)++; |
387 | } | 373 | } |
388 | 374 | ||
389 | #ifdef CONFIG_X86_GENERICARCH | 375 | #ifdef CONFIG_X86_BIGSMP |
390 | generic_bigsmp_probe(); | 376 | generic_bigsmp_probe(); |
391 | #endif | 377 | #endif |
392 | 378 | ||
393 | #ifdef CONFIG_X86_32 | 379 | if (apic->setup_apic_routing) |
394 | setup_apic_routing(); | 380 | apic->setup_apic_routing(); |
395 | #endif | 381 | |
396 | if (!num_processors) | 382 | if (!num_processors) |
397 | printk(KERN_ERR "MPTABLE: no processors registered!\n"); | 383 | printk(KERN_ERR "MPTABLE: no processors registered!\n"); |
398 | return num_processors; | 384 | return num_processors; |
@@ -706,8 +692,8 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
706 | #endif | 692 | #endif |
707 | mpf_found = mpf; | 693 | mpf_found = mpf; |
708 | 694 | ||
709 | printk(KERN_INFO "found SMP MP-table at [%p] %08lx\n", | 695 | printk(KERN_INFO "found SMP MP-table at [%p] %llx\n", |
710 | mpf, virt_to_phys(mpf)); | 696 | mpf, (u64)virt_to_phys(mpf)); |
711 | 697 | ||
712 | if (!reserve) | 698 | if (!reserve) |
713 | return 1; | 699 | return 1; |
@@ -724,13 +710,22 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
724 | * of physical memory; so that simply reserving | 710 | * of physical memory; so that simply reserving |
725 | * PAGE_SIZE from mpf->physptr yields BUG() | 711 | * PAGE_SIZE from mpf->physptr yields BUG() |
726 | * in reserve_bootmem. | 712 | * in reserve_bootmem. |
713 | * also need to make sure physptr is below than | ||
714 | * max_low_pfn | ||
715 | * we don't need reserve the area above max_low_pfn | ||
727 | */ | 716 | */ |
728 | unsigned long end = max_low_pfn * PAGE_SIZE; | 717 | unsigned long end = max_low_pfn * PAGE_SIZE; |
729 | if (mpf->physptr + size > end) | 718 | |
730 | size = end - mpf->physptr; | 719 | if (mpf->physptr < end) { |
731 | #endif | 720 | if (mpf->physptr + size > end) |
721 | size = end - mpf->physptr; | ||
722 | reserve_bootmem_generic(mpf->physptr, size, | ||
723 | BOOTMEM_DEFAULT); | ||
724 | } | ||
725 | #else | ||
732 | reserve_bootmem_generic(mpf->physptr, size, | 726 | reserve_bootmem_generic(mpf->physptr, size, |
733 | BOOTMEM_DEFAULT); | 727 | BOOTMEM_DEFAULT); |
728 | #endif | ||
734 | } | 729 | } |
735 | 730 | ||
736 | return 1; | 731 | return 1; |
@@ -1025,7 +1020,7 @@ static int __init update_mp_table(void) | |||
1025 | if (!smp_check_mpc(mpc, oem, str)) | 1020 | if (!smp_check_mpc(mpc, oem, str)) |
1026 | return 0; | 1021 | return 0; |
1027 | 1022 | ||
1028 | printk(KERN_INFO "mpf: %lx\n", virt_to_phys(mpf)); | 1023 | printk(KERN_INFO "mpf: %llx\n", (u64)virt_to_phys(mpf)); |
1029 | printk(KERN_INFO "physptr: %x\n", mpf->physptr); | 1024 | printk(KERN_INFO "physptr: %x\n", mpf->physptr); |
1030 | 1025 | ||
1031 | if (mpc_new_phys && mpc->length > mpc_new_length) { | 1026 | if (mpc_new_phys && mpc->length > mpc_new_length) { |
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c deleted file mode 100644 index f2191d4f2717..000000000000 --- a/arch/x86/kernel/numaq_32.c +++ /dev/null | |||
@@ -1,293 +0,0 @@ | |||
1 | /* | ||
2 | * Written by: Patricia Gaughen, IBM Corporation | ||
3 | * | ||
4 | * Copyright (C) 2002, IBM Corp. | ||
5 | * | ||
6 | * All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
16 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
17 | * details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | * | ||
23 | * Send feedback to <gone@us.ibm.com> | ||
24 | */ | ||
25 | |||
26 | #include <linux/mm.h> | ||
27 | #include <linux/bootmem.h> | ||
28 | #include <linux/mmzone.h> | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/nodemask.h> | ||
31 | #include <asm/numaq.h> | ||
32 | #include <asm/topology.h> | ||
33 | #include <asm/processor.h> | ||
34 | #include <asm/genapic.h> | ||
35 | #include <asm/e820.h> | ||
36 | #include <asm/setup.h> | ||
37 | |||
38 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) | ||
39 | |||
40 | /* | ||
41 | * Function: smp_dump_qct() | ||
42 | * | ||
43 | * Description: gets memory layout from the quad config table. This | ||
44 | * function also updates node_online_map with the nodes (quads) present. | ||
45 | */ | ||
46 | static void __init smp_dump_qct(void) | ||
47 | { | ||
48 | int node; | ||
49 | struct eachquadmem *eq; | ||
50 | struct sys_cfg_data *scd = | ||
51 | (struct sys_cfg_data *)__va(SYS_CFG_DATA_PRIV_ADDR); | ||
52 | |||
53 | nodes_clear(node_online_map); | ||
54 | for_each_node(node) { | ||
55 | if (scd->quads_present31_0 & (1 << node)) { | ||
56 | node_set_online(node); | ||
57 | eq = &scd->eq[node]; | ||
58 | /* Convert to pages */ | ||
59 | node_start_pfn[node] = MB_TO_PAGES( | ||
60 | eq->hi_shrd_mem_start - eq->priv_mem_size); | ||
61 | node_end_pfn[node] = MB_TO_PAGES( | ||
62 | eq->hi_shrd_mem_start + eq->hi_shrd_mem_size); | ||
63 | |||
64 | e820_register_active_regions(node, node_start_pfn[node], | ||
65 | node_end_pfn[node]); | ||
66 | memory_present(node, | ||
67 | node_start_pfn[node], node_end_pfn[node]); | ||
68 | node_remap_size[node] = node_memmap_size_bytes(node, | ||
69 | node_start_pfn[node], | ||
70 | node_end_pfn[node]); | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | |||
76 | void __cpuinit numaq_tsc_disable(void) | ||
77 | { | ||
78 | if (!found_numaq) | ||
79 | return; | ||
80 | |||
81 | if (num_online_nodes() > 1) { | ||
82 | printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); | ||
83 | setup_clear_cpu_cap(X86_FEATURE_TSC); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static int __init numaq_pre_time_init(void) | ||
88 | { | ||
89 | numaq_tsc_disable(); | ||
90 | return 0; | ||
91 | } | ||
92 | |||
93 | int found_numaq; | ||
94 | /* | ||
95 | * Have to match translation table entries to main table entries by counter | ||
96 | * hence the mpc_record variable .... can't see a less disgusting way of | ||
97 | * doing this .... | ||
98 | */ | ||
99 | struct mpc_config_translation { | ||
100 | unsigned char mpc_type; | ||
101 | unsigned char trans_len; | ||
102 | unsigned char trans_type; | ||
103 | unsigned char trans_quad; | ||
104 | unsigned char trans_global; | ||
105 | unsigned char trans_local; | ||
106 | unsigned short trans_reserved; | ||
107 | }; | ||
108 | |||
109 | /* x86_quirks member */ | ||
110 | static int mpc_record; | ||
111 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] | ||
112 | __cpuinitdata; | ||
113 | |||
114 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
115 | { | ||
116 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
117 | } | ||
118 | |||
119 | /* x86_quirks member */ | ||
120 | static int mpc_apic_id(struct mpc_cpu *m) | ||
121 | { | ||
122 | int quad = translation_table[mpc_record]->trans_quad; | ||
123 | int logical_apicid = generate_logical_apicid(quad, m->apicid); | ||
124 | |||
125 | printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
126 | m->apicid, (m->cpufeature & CPU_FAMILY_MASK) >> 8, | ||
127 | (m->cpufeature & CPU_MODEL_MASK) >> 4, | ||
128 | m->apicver, quad, logical_apicid); | ||
129 | return logical_apicid; | ||
130 | } | ||
131 | |||
132 | int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
133 | |||
134 | int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
135 | |||
136 | /* x86_quirks member */ | ||
137 | static void mpc_oem_bus_info(struct mpc_bus *m, char *name) | ||
138 | { | ||
139 | int quad = translation_table[mpc_record]->trans_quad; | ||
140 | int local = translation_table[mpc_record]->trans_local; | ||
141 | |||
142 | mp_bus_id_to_node[m->busid] = quad; | ||
143 | mp_bus_id_to_local[m->busid] = local; | ||
144 | printk(KERN_INFO "Bus #%d is %s (node %d)\n", | ||
145 | m->busid, name, quad); | ||
146 | } | ||
147 | |||
148 | int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
149 | |||
150 | /* x86_quirks member */ | ||
151 | static void mpc_oem_pci_bus(struct mpc_bus *m) | ||
152 | { | ||
153 | int quad = translation_table[mpc_record]->trans_quad; | ||
154 | int local = translation_table[mpc_record]->trans_local; | ||
155 | |||
156 | quad_local_to_mp_bus_id[quad][local] = m->busid; | ||
157 | } | ||
158 | |||
159 | static void __init MP_translation_info(struct mpc_config_translation *m) | ||
160 | { | ||
161 | printk(KERN_INFO | ||
162 | "Translation: record %d, type %d, quad %d, global %d, local %d\n", | ||
163 | mpc_record, m->trans_type, m->trans_quad, m->trans_global, | ||
164 | m->trans_local); | ||
165 | |||
166 | if (mpc_record >= MAX_MPC_ENTRY) | ||
167 | printk(KERN_ERR "MAX_MPC_ENTRY exceeded!\n"); | ||
168 | else | ||
169 | translation_table[mpc_record] = m; /* stash this for later */ | ||
170 | if (m->trans_quad < MAX_NUMNODES && !node_online(m->trans_quad)) | ||
171 | node_set_online(m->trans_quad); | ||
172 | } | ||
173 | |||
174 | static int __init mpf_checksum(unsigned char *mp, int len) | ||
175 | { | ||
176 | int sum = 0; | ||
177 | |||
178 | while (len--) | ||
179 | sum += *mp++; | ||
180 | |||
181 | return sum & 0xFF; | ||
182 | } | ||
183 | |||
184 | /* | ||
185 | * Read/parse the MPC oem tables | ||
186 | */ | ||
187 | |||
188 | static void __init smp_read_mpc_oem(struct mpc_oemtable *oemtable, | ||
189 | unsigned short oemsize) | ||
190 | { | ||
191 | int count = sizeof(*oemtable); /* the header size */ | ||
192 | unsigned char *oemptr = ((unsigned char *)oemtable) + count; | ||
193 | |||
194 | mpc_record = 0; | ||
195 | printk(KERN_INFO "Found an OEM MPC table at %8p - parsing it ... \n", | ||
196 | oemtable); | ||
197 | if (memcmp(oemtable->signature, MPC_OEM_SIGNATURE, 4)) { | ||
198 | printk(KERN_WARNING | ||
199 | "SMP mpc oemtable: bad signature [%c%c%c%c]!\n", | ||
200 | oemtable->signature[0], oemtable->signature[1], | ||
201 | oemtable->signature[2], oemtable->signature[3]); | ||
202 | return; | ||
203 | } | ||
204 | if (mpf_checksum((unsigned char *)oemtable, oemtable->length)) { | ||
205 | printk(KERN_WARNING "SMP oem mptable: checksum error!\n"); | ||
206 | return; | ||
207 | } | ||
208 | while (count < oemtable->length) { | ||
209 | switch (*oemptr) { | ||
210 | case MP_TRANSLATION: | ||
211 | { | ||
212 | struct mpc_config_translation *m = | ||
213 | (struct mpc_config_translation *)oemptr; | ||
214 | MP_translation_info(m); | ||
215 | oemptr += sizeof(*m); | ||
216 | count += sizeof(*m); | ||
217 | ++mpc_record; | ||
218 | break; | ||
219 | } | ||
220 | default: | ||
221 | { | ||
222 | printk(KERN_WARNING | ||
223 | "Unrecognised OEM table entry type! - %d\n", | ||
224 | (int)*oemptr); | ||
225 | return; | ||
226 | } | ||
227 | } | ||
228 | } | ||
229 | } | ||
230 | |||
231 | static int __init numaq_setup_ioapic_ids(void) | ||
232 | { | ||
233 | /* so can skip it */ | ||
234 | return 1; | ||
235 | } | ||
236 | |||
237 | static int __init numaq_update_genapic(void) | ||
238 | { | ||
239 | genapic->wakeup_cpu = wakeup_secondary_cpu_via_nmi; | ||
240 | |||
241 | return 0; | ||
242 | } | ||
243 | |||
244 | static struct x86_quirks numaq_x86_quirks __initdata = { | ||
245 | .arch_pre_time_init = numaq_pre_time_init, | ||
246 | .arch_time_init = NULL, | ||
247 | .arch_pre_intr_init = NULL, | ||
248 | .arch_memory_setup = NULL, | ||
249 | .arch_intr_init = NULL, | ||
250 | .arch_trap_init = NULL, | ||
251 | .mach_get_smp_config = NULL, | ||
252 | .mach_find_smp_config = NULL, | ||
253 | .mpc_record = &mpc_record, | ||
254 | .mpc_apic_id = mpc_apic_id, | ||
255 | .mpc_oem_bus_info = mpc_oem_bus_info, | ||
256 | .mpc_oem_pci_bus = mpc_oem_pci_bus, | ||
257 | .smp_read_mpc_oem = smp_read_mpc_oem, | ||
258 | .setup_ioapic_ids = numaq_setup_ioapic_ids, | ||
259 | .update_genapic = numaq_update_genapic, | ||
260 | }; | ||
261 | |||
262 | void numaq_mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
263 | { | ||
264 | if (strncmp(oem, "IBM NUMA", 8)) | ||
265 | printk("Warning! Not a NUMA-Q system!\n"); | ||
266 | else | ||
267 | found_numaq = 1; | ||
268 | } | ||
269 | |||
270 | static __init void early_check_numaq(void) | ||
271 | { | ||
272 | /* | ||
273 | * Find possible boot-time SMP configuration: | ||
274 | */ | ||
275 | early_find_smp_config(); | ||
276 | /* | ||
277 | * get boot-time SMP configuration: | ||
278 | */ | ||
279 | if (smp_found_config) | ||
280 | early_get_smp_config(); | ||
281 | |||
282 | if (found_numaq) | ||
283 | x86_quirks = &numaq_x86_quirks; | ||
284 | } | ||
285 | |||
286 | int __init get_memcfg_numaq(void) | ||
287 | { | ||
288 | early_check_numaq(); | ||
289 | if (!found_numaq) | ||
290 | return 0; | ||
291 | smp_dump_qct(); | ||
292 | return 1; | ||
293 | } | ||
diff --git a/arch/x86/kernel/olpc.c b/arch/x86/kernel/olpc.c index 7a13fac63a1f..4006c522adc7 100644 --- a/arch/x86/kernel/olpc.c +++ b/arch/x86/kernel/olpc.c | |||
@@ -203,7 +203,7 @@ static void __init platform_detect(void) | |||
203 | static void __init platform_detect(void) | 203 | static void __init platform_detect(void) |
204 | { | 204 | { |
205 | /* stopgap until OFW support is added to the kernel */ | 205 | /* stopgap until OFW support is added to the kernel */ |
206 | olpc_platform_info.boardrev = 0xc2; | 206 | olpc_platform_info.boardrev = olpc_board(0xc2); |
207 | } | 207 | } |
208 | #endif | 208 | #endif |
209 | 209 | ||
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index cea11c8e3049..63dd358d8ee1 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include <asm/paravirt.h> | 28 | #include <asm/paravirt.h> |
29 | #include <asm/desc.h> | 29 | #include <asm/desc.h> |
30 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
31 | #include <asm/arch_hooks.h> | ||
32 | #include <asm/pgtable.h> | 31 | #include <asm/pgtable.h> |
33 | #include <asm/time.h> | 32 | #include <asm/time.h> |
34 | #include <asm/pgalloc.h> | 33 | #include <asm/pgalloc.h> |
@@ -286,6 +285,32 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) | |||
286 | return __get_cpu_var(paravirt_lazy_mode); | 285 | return __get_cpu_var(paravirt_lazy_mode); |
287 | } | 286 | } |
288 | 287 | ||
288 | void arch_flush_lazy_mmu_mode(void) | ||
289 | { | ||
290 | preempt_disable(); | ||
291 | |||
292 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_MMU) { | ||
293 | WARN_ON(preempt_count() == 1); | ||
294 | arch_leave_lazy_mmu_mode(); | ||
295 | arch_enter_lazy_mmu_mode(); | ||
296 | } | ||
297 | |||
298 | preempt_enable(); | ||
299 | } | ||
300 | |||
301 | void arch_flush_lazy_cpu_mode(void) | ||
302 | { | ||
303 | preempt_disable(); | ||
304 | |||
305 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) { | ||
306 | WARN_ON(preempt_count() == 1); | ||
307 | arch_leave_lazy_cpu_mode(); | ||
308 | arch_enter_lazy_cpu_mode(); | ||
309 | } | ||
310 | |||
311 | preempt_enable(); | ||
312 | } | ||
313 | |||
289 | struct pv_info pv_info = { | 314 | struct pv_info pv_info = { |
290 | .name = "bare hardware", | 315 | .name = "bare hardware", |
291 | .paravirt_enabled = 0, | 316 | .paravirt_enabled = 0, |
diff --git a/arch/x86/kernel/probe_roms_32.c b/arch/x86/kernel/probe_roms_32.c index 675a48c404a5..071e7fea42e5 100644 --- a/arch/x86/kernel/probe_roms_32.c +++ b/arch/x86/kernel/probe_roms_32.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
19 | #include <asm/sections.h> | 19 | #include <asm/sections.h> |
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | #include <setup_arch.h> | 21 | #include <asm/setup_arch.h> |
22 | 22 | ||
23 | static struct resource system_rom_resource = { | 23 | static struct resource system_rom_resource = { |
24 | .name = "System ROM", | 24 | .name = "System ROM", |
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 6d12f7e37f8c..87b69d4fac16 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -350,7 +350,7 @@ static void c1e_idle(void) | |||
350 | 350 | ||
351 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) | 351 | void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) |
352 | { | 352 | { |
353 | #ifdef CONFIG_X86_SMP | 353 | #ifdef CONFIG_SMP |
354 | if (pm_idle == poll_idle && smp_num_siblings > 1) { | 354 | if (pm_idle == poll_idle && smp_num_siblings > 1) { |
355 | printk(KERN_WARNING "WARNING: polling idle and HT enabled," | 355 | printk(KERN_WARNING "WARNING: polling idle and HT enabled," |
356 | " performance may degrade.\n"); | 356 | " performance may degrade.\n"); |
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c index fec79ad85dc6..646da41a620a 100644 --- a/arch/x86/kernel/process_32.c +++ b/arch/x86/kernel/process_32.c | |||
@@ -111,9 +111,6 @@ void cpu_idle(void) | |||
111 | check_pgt_cache(); | 111 | check_pgt_cache(); |
112 | rmb(); | 112 | rmb(); |
113 | 113 | ||
114 | if (rcu_pending(cpu)) | ||
115 | rcu_check_callbacks(cpu, 0); | ||
116 | |||
117 | if (cpu_is_offline(cpu)) | 114 | if (cpu_is_offline(cpu)) |
118 | play_dead(); | 115 | play_dead(); |
119 | 116 | ||
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 7ec39ab37a2d..fb2159a5c817 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -268,7 +268,7 @@ static unsigned long debugreg_addr_limit(struct task_struct *task) | |||
268 | if (test_tsk_thread_flag(task, TIF_IA32)) | 268 | if (test_tsk_thread_flag(task, TIF_IA32)) |
269 | return IA32_PAGE_OFFSET - 3; | 269 | return IA32_PAGE_OFFSET - 3; |
270 | #endif | 270 | #endif |
271 | return TASK_SIZE64 - 7; | 271 | return TASK_SIZE_MAX - 7; |
272 | } | 272 | } |
273 | 273 | ||
274 | #endif /* CONFIG_X86_32 */ | 274 | #endif /* CONFIG_X86_32 */ |
@@ -805,12 +805,16 @@ static void ptrace_bts_untrace(struct task_struct *child) | |||
805 | 805 | ||
806 | static void ptrace_bts_detach(struct task_struct *child) | 806 | static void ptrace_bts_detach(struct task_struct *child) |
807 | { | 807 | { |
808 | if (unlikely(child->bts)) { | 808 | /* |
809 | ds_release_bts(child->bts); | 809 | * Ptrace_detach() races with ptrace_untrace() in case |
810 | child->bts = NULL; | 810 | * the child dies and is reaped by another thread. |
811 | 811 | * | |
812 | ptrace_bts_free_buffer(child); | 812 | * We only do the memory accounting at this point and |
813 | } | 813 | * leave the buffer deallocation and the bts tracer |
814 | * release to ptrace_bts_untrace() which will be called | ||
815 | * later on with tasklist_lock held. | ||
816 | */ | ||
817 | release_locked_buffer(child->bts_buffer, child->bts_size); | ||
814 | } | 818 | } |
815 | #else | 819 | #else |
816 | static inline void ptrace_bts_fork(struct task_struct *tsk) {} | 820 | static inline void ptrace_bts_fork(struct task_struct *tsk) {} |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index f8536fee5c12..1cc18d439bbb 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -24,8 +24,6 @@ | |||
24 | # include <asm/iommu.h> | 24 | # include <asm/iommu.h> |
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | #include <mach_ipi.h> | ||
28 | |||
29 | /* | 27 | /* |
30 | * Power off function, if any | 28 | * Power off function, if any |
31 | */ | 29 | */ |
@@ -651,7 +649,7 @@ static int crash_nmi_callback(struct notifier_block *self, | |||
651 | 649 | ||
652 | static void smp_send_nmi_allbutself(void) | 650 | static void smp_send_nmi_allbutself(void) |
653 | { | 651 | { |
654 | send_IPI_allbutself(NMI_VECTOR); | 652 | apic->send_IPI_allbutself(NMI_VECTOR); |
655 | } | 653 | } |
656 | 654 | ||
657 | static struct notifier_block crash_nmi_nb = { | 655 | static struct notifier_block crash_nmi_nb = { |
diff --git a/arch/x86/kernel/relocate_kernel_32.S b/arch/x86/kernel/relocate_kernel_32.S index a160f3119725..2064d0aa8d28 100644 --- a/arch/x86/kernel/relocate_kernel_32.S +++ b/arch/x86/kernel/relocate_kernel_32.S | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <asm/page.h> | 10 | #include <asm/page_types.h> |
11 | #include <asm/kexec.h> | 11 | #include <asm/kexec.h> |
12 | #include <asm/processor-flags.h> | 12 | #include <asm/processor-flags.h> |
13 | 13 | ||
diff --git a/arch/x86/kernel/relocate_kernel_64.S b/arch/x86/kernel/relocate_kernel_64.S index f5afe665a82b..d32cfb27a479 100644 --- a/arch/x86/kernel/relocate_kernel_64.S +++ b/arch/x86/kernel/relocate_kernel_64.S | |||
@@ -7,10 +7,10 @@ | |||
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <asm/page.h> | 10 | #include <asm/page_types.h> |
11 | #include <asm/kexec.h> | 11 | #include <asm/kexec.h> |
12 | #include <asm/processor-flags.h> | 12 | #include <asm/processor-flags.h> |
13 | #include <asm/pgtable.h> | 13 | #include <asm/pgtable_types.h> |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * Must be relocatable PIC code callable as a C function | 16 | * Must be relocatable PIC code callable as a C function |
@@ -29,122 +29,6 @@ relocate_kernel: | |||
29 | * %rdx start address | 29 | * %rdx start address |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* map the control page at its virtual address */ | ||
33 | |||
34 | movq $0x0000ff8000000000, %r10 /* mask */ | ||
35 | mov $(39 - 3), %cl /* bits to shift */ | ||
36 | movq PTR(VA_CONTROL_PAGE)(%rsi), %r11 /* address to map */ | ||
37 | |||
38 | movq %r11, %r9 | ||
39 | andq %r10, %r9 | ||
40 | shrq %cl, %r9 | ||
41 | |||
42 | movq PTR(VA_PGD)(%rsi), %r8 | ||
43 | addq %r8, %r9 | ||
44 | movq PTR(PA_PUD_0)(%rsi), %r8 | ||
45 | orq $PAGE_ATTR, %r8 | ||
46 | movq %r8, (%r9) | ||
47 | |||
48 | shrq $9, %r10 | ||
49 | sub $9, %cl | ||
50 | |||
51 | movq %r11, %r9 | ||
52 | andq %r10, %r9 | ||
53 | shrq %cl, %r9 | ||
54 | |||
55 | movq PTR(VA_PUD_0)(%rsi), %r8 | ||
56 | addq %r8, %r9 | ||
57 | movq PTR(PA_PMD_0)(%rsi), %r8 | ||
58 | orq $PAGE_ATTR, %r8 | ||
59 | movq %r8, (%r9) | ||
60 | |||
61 | shrq $9, %r10 | ||
62 | sub $9, %cl | ||
63 | |||
64 | movq %r11, %r9 | ||
65 | andq %r10, %r9 | ||
66 | shrq %cl, %r9 | ||
67 | |||
68 | movq PTR(VA_PMD_0)(%rsi), %r8 | ||
69 | addq %r8, %r9 | ||
70 | movq PTR(PA_PTE_0)(%rsi), %r8 | ||
71 | orq $PAGE_ATTR, %r8 | ||
72 | movq %r8, (%r9) | ||
73 | |||
74 | shrq $9, %r10 | ||
75 | sub $9, %cl | ||
76 | |||
77 | movq %r11, %r9 | ||
78 | andq %r10, %r9 | ||
79 | shrq %cl, %r9 | ||
80 | |||
81 | movq PTR(VA_PTE_0)(%rsi), %r8 | ||
82 | addq %r8, %r9 | ||
83 | movq PTR(PA_CONTROL_PAGE)(%rsi), %r8 | ||
84 | orq $PAGE_ATTR, %r8 | ||
85 | movq %r8, (%r9) | ||
86 | |||
87 | /* identity map the control page at its physical address */ | ||
88 | |||
89 | movq $0x0000ff8000000000, %r10 /* mask */ | ||
90 | mov $(39 - 3), %cl /* bits to shift */ | ||
91 | movq PTR(PA_CONTROL_PAGE)(%rsi), %r11 /* address to map */ | ||
92 | |||
93 | movq %r11, %r9 | ||
94 | andq %r10, %r9 | ||
95 | shrq %cl, %r9 | ||
96 | |||
97 | movq PTR(VA_PGD)(%rsi), %r8 | ||
98 | addq %r8, %r9 | ||
99 | movq PTR(PA_PUD_1)(%rsi), %r8 | ||
100 | orq $PAGE_ATTR, %r8 | ||
101 | movq %r8, (%r9) | ||
102 | |||
103 | shrq $9, %r10 | ||
104 | sub $9, %cl | ||
105 | |||
106 | movq %r11, %r9 | ||
107 | andq %r10, %r9 | ||
108 | shrq %cl, %r9 | ||
109 | |||
110 | movq PTR(VA_PUD_1)(%rsi), %r8 | ||
111 | addq %r8, %r9 | ||
112 | movq PTR(PA_PMD_1)(%rsi), %r8 | ||
113 | orq $PAGE_ATTR, %r8 | ||
114 | movq %r8, (%r9) | ||
115 | |||
116 | shrq $9, %r10 | ||
117 | sub $9, %cl | ||
118 | |||
119 | movq %r11, %r9 | ||
120 | andq %r10, %r9 | ||
121 | shrq %cl, %r9 | ||
122 | |||
123 | movq PTR(VA_PMD_1)(%rsi), %r8 | ||
124 | addq %r8, %r9 | ||
125 | movq PTR(PA_PTE_1)(%rsi), %r8 | ||
126 | orq $PAGE_ATTR, %r8 | ||
127 | movq %r8, (%r9) | ||
128 | |||
129 | shrq $9, %r10 | ||
130 | sub $9, %cl | ||
131 | |||
132 | movq %r11, %r9 | ||
133 | andq %r10, %r9 | ||
134 | shrq %cl, %r9 | ||
135 | |||
136 | movq PTR(VA_PTE_1)(%rsi), %r8 | ||
137 | addq %r8, %r9 | ||
138 | movq PTR(PA_CONTROL_PAGE)(%rsi), %r8 | ||
139 | orq $PAGE_ATTR, %r8 | ||
140 | movq %r8, (%r9) | ||
141 | |||
142 | relocate_new_kernel: | ||
143 | /* %rdi indirection_page | ||
144 | * %rsi page_list | ||
145 | * %rdx start address | ||
146 | */ | ||
147 | |||
148 | /* zero out flags, and disable interrupts */ | 32 | /* zero out flags, and disable interrupts */ |
149 | pushq $0 | 33 | pushq $0 |
150 | popfq | 34 | popfq |
@@ -156,9 +40,8 @@ relocate_new_kernel: | |||
156 | /* get physical address of page table now too */ | 40 | /* get physical address of page table now too */ |
157 | movq PTR(PA_TABLE_PAGE)(%rsi), %rcx | 41 | movq PTR(PA_TABLE_PAGE)(%rsi), %rcx |
158 | 42 | ||
159 | /* switch to new set of page tables */ | 43 | /* Switch to the identity mapped page tables */ |
160 | movq PTR(PA_PGD)(%rsi), %r9 | 44 | movq %rcx, %cr3 |
161 | movq %r9, %cr3 | ||
162 | 45 | ||
163 | /* setup a new stack at the end of the physical control page */ | 46 | /* setup a new stack at the end of the physical control page */ |
164 | lea PAGE_SIZE(%r8), %rsp | 47 | lea PAGE_SIZE(%r8), %rsp |
@@ -194,9 +77,7 @@ identity_mapped: | |||
194 | jmp 1f | 77 | jmp 1f |
195 | 1: | 78 | 1: |
196 | 79 | ||
197 | /* Switch to the identity mapped page tables, | 80 | /* Flush the TLB (needed?) */ |
198 | * and flush the TLB. | ||
199 | */ | ||
200 | movq %rcx, %cr3 | 81 | movq %rcx, %cr3 |
201 | 82 | ||
202 | /* Do the copies */ | 83 | /* Do the copies */ |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d5d6693b706d..5b85759e7972 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -74,14 +74,15 @@ | |||
74 | #include <asm/e820.h> | 74 | #include <asm/e820.h> |
75 | #include <asm/mpspec.h> | 75 | #include <asm/mpspec.h> |
76 | #include <asm/setup.h> | 76 | #include <asm/setup.h> |
77 | #include <asm/arch_hooks.h> | ||
78 | #include <asm/efi.h> | 77 | #include <asm/efi.h> |
78 | #include <asm/timer.h> | ||
79 | #include <asm/i8259.h> | ||
79 | #include <asm/sections.h> | 80 | #include <asm/sections.h> |
80 | #include <asm/dmi.h> | 81 | #include <asm/dmi.h> |
81 | #include <asm/io_apic.h> | 82 | #include <asm/io_apic.h> |
82 | #include <asm/ist.h> | 83 | #include <asm/ist.h> |
83 | #include <asm/vmi.h> | 84 | #include <asm/vmi.h> |
84 | #include <setup_arch.h> | 85 | #include <asm/setup_arch.h> |
85 | #include <asm/bios_ebda.h> | 86 | #include <asm/bios_ebda.h> |
86 | #include <asm/cacheflush.h> | 87 | #include <asm/cacheflush.h> |
87 | #include <asm/processor.h> | 88 | #include <asm/processor.h> |
@@ -97,7 +98,6 @@ | |||
97 | #include <asm/mmu_context.h> | 98 | #include <asm/mmu_context.h> |
98 | #include <asm/proto.h> | 99 | #include <asm/proto.h> |
99 | 100 | ||
100 | #include <mach_apic.h> | ||
101 | #include <asm/paravirt.h> | 101 | #include <asm/paravirt.h> |
102 | #include <asm/hypervisor.h> | 102 | #include <asm/hypervisor.h> |
103 | 103 | ||
@@ -112,6 +112,20 @@ | |||
112 | #define ARCH_SETUP | 112 | #define ARCH_SETUP |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | unsigned int boot_cpu_id __read_mostly; | ||
116 | |||
117 | #ifdef CONFIG_X86_64 | ||
118 | int default_cpu_present_to_apicid(int mps_cpu) | ||
119 | { | ||
120 | return __default_cpu_present_to_apicid(mps_cpu); | ||
121 | } | ||
122 | |||
123 | int default_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
124 | { | ||
125 | return __default_check_phys_apicid_present(boot_cpu_physical_apicid); | ||
126 | } | ||
127 | #endif | ||
128 | |||
115 | #ifndef CONFIG_DEBUG_BOOT_PARAMS | 129 | #ifndef CONFIG_DEBUG_BOOT_PARAMS |
116 | struct boot_params __initdata boot_params; | 130 | struct boot_params __initdata boot_params; |
117 | #else | 131 | #else |
@@ -586,19 +600,18 @@ static int __init setup_elfcorehdr(char *arg) | |||
586 | early_param("elfcorehdr", setup_elfcorehdr); | 600 | early_param("elfcorehdr", setup_elfcorehdr); |
587 | #endif | 601 | #endif |
588 | 602 | ||
589 | static int __init default_update_genapic(void) | 603 | static int __init default_update_apic(void) |
590 | { | 604 | { |
591 | #ifdef CONFIG_X86_SMP | 605 | #ifdef CONFIG_SMP |
592 | # if defined(CONFIG_X86_GENERICARCH) || defined(CONFIG_X86_64) | 606 | if (!apic->wakeup_cpu) |
593 | genapic->wakeup_cpu = wakeup_secondary_cpu_via_init; | 607 | apic->wakeup_cpu = wakeup_secondary_cpu_via_init; |
594 | # endif | ||
595 | #endif | 608 | #endif |
596 | 609 | ||
597 | return 0; | 610 | return 0; |
598 | } | 611 | } |
599 | 612 | ||
600 | static struct x86_quirks default_x86_quirks __initdata = { | 613 | static struct x86_quirks default_x86_quirks __initdata = { |
601 | .update_genapic = default_update_genapic, | 614 | .update_apic = default_update_apic, |
602 | }; | 615 | }; |
603 | 616 | ||
604 | struct x86_quirks *x86_quirks __initdata = &default_x86_quirks; | 617 | struct x86_quirks *x86_quirks __initdata = &default_x86_quirks; |
@@ -656,7 +669,6 @@ void __init setup_arch(char **cmdline_p) | |||
656 | #ifdef CONFIG_X86_32 | 669 | #ifdef CONFIG_X86_32 |
657 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); | 670 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); |
658 | visws_early_detect(); | 671 | visws_early_detect(); |
659 | pre_setup_arch_hook(); | ||
660 | #else | 672 | #else |
661 | printk(KERN_INFO "Command line: %s\n", boot_command_line); | 673 | printk(KERN_INFO "Command line: %s\n", boot_command_line); |
662 | #endif | 674 | #endif |
@@ -823,8 +835,7 @@ void __init setup_arch(char **cmdline_p) | |||
823 | #else | 835 | #else |
824 | num_physpages = max_pfn; | 836 | num_physpages = max_pfn; |
825 | 837 | ||
826 | if (cpu_has_x2apic) | 838 | check_x2apic(); |
827 | check_x2apic(); | ||
828 | 839 | ||
829 | /* How many end-of-memory variables you have, grandma! */ | 840 | /* How many end-of-memory variables you have, grandma! */ |
830 | /* need this before calling reserve_initrd */ | 841 | /* need this before calling reserve_initrd */ |
@@ -892,12 +903,11 @@ void __init setup_arch(char **cmdline_p) | |||
892 | */ | 903 | */ |
893 | acpi_reserve_bootmem(); | 904 | acpi_reserve_bootmem(); |
894 | #endif | 905 | #endif |
895 | #ifdef CONFIG_X86_FIND_SMP_CONFIG | ||
896 | /* | 906 | /* |
897 | * Find and reserve possible boot-time SMP configuration: | 907 | * Find and reserve possible boot-time SMP configuration: |
898 | */ | 908 | */ |
899 | find_smp_config(); | 909 | find_smp_config(); |
900 | #endif | 910 | |
901 | reserve_crashkernel(); | 911 | reserve_crashkernel(); |
902 | 912 | ||
903 | #ifdef CONFIG_X86_64 | 913 | #ifdef CONFIG_X86_64 |
@@ -924,9 +934,7 @@ void __init setup_arch(char **cmdline_p) | |||
924 | map_vsyscall(); | 934 | map_vsyscall(); |
925 | #endif | 935 | #endif |
926 | 936 | ||
927 | #ifdef CONFIG_X86_GENERICARCH | ||
928 | generic_apic_probe(); | 937 | generic_apic_probe(); |
929 | #endif | ||
930 | 938 | ||
931 | early_quirks(); | 939 | early_quirks(); |
932 | 940 | ||
@@ -977,4 +985,95 @@ void __init setup_arch(char **cmdline_p) | |||
977 | #endif | 985 | #endif |
978 | } | 986 | } |
979 | 987 | ||
988 | #ifdef CONFIG_X86_32 | ||
989 | |||
990 | /** | ||
991 | * x86_quirk_pre_intr_init - initialisation prior to setting up interrupt vectors | ||
992 | * | ||
993 | * Description: | ||
994 | * Perform any necessary interrupt initialisation prior to setting up | ||
995 | * the "ordinary" interrupt call gates. For legacy reasons, the ISA | ||
996 | * interrupts should be initialised here if the machine emulates a PC | ||
997 | * in any way. | ||
998 | **/ | ||
999 | void __init x86_quirk_pre_intr_init(void) | ||
1000 | { | ||
1001 | if (x86_quirks->arch_pre_intr_init) { | ||
1002 | if (x86_quirks->arch_pre_intr_init()) | ||
1003 | return; | ||
1004 | } | ||
1005 | init_ISA_irqs(); | ||
1006 | } | ||
1007 | |||
1008 | /** | ||
1009 | * x86_quirk_intr_init - post gate setup interrupt initialisation | ||
1010 | * | ||
1011 | * Description: | ||
1012 | * Fill in any interrupts that may have been left out by the general | ||
1013 | * init_IRQ() routine. interrupts having to do with the machine rather | ||
1014 | * than the devices on the I/O bus (like APIC interrupts in intel MP | ||
1015 | * systems) are started here. | ||
1016 | **/ | ||
1017 | void __init x86_quirk_intr_init(void) | ||
1018 | { | ||
1019 | if (x86_quirks->arch_intr_init) { | ||
1020 | if (x86_quirks->arch_intr_init()) | ||
1021 | return; | ||
1022 | } | ||
1023 | } | ||
1024 | |||
1025 | /** | ||
1026 | * x86_quirk_trap_init - initialise system specific traps | ||
1027 | * | ||
1028 | * Description: | ||
1029 | * Called as the final act of trap_init(). Used in VISWS to initialise | ||
1030 | * the various board specific APIC traps. | ||
1031 | **/ | ||
1032 | void __init x86_quirk_trap_init(void) | ||
1033 | { | ||
1034 | if (x86_quirks->arch_trap_init) { | ||
1035 | if (x86_quirks->arch_trap_init()) | ||
1036 | return; | ||
1037 | } | ||
1038 | } | ||
1039 | |||
1040 | static struct irqaction irq0 = { | ||
1041 | .handler = timer_interrupt, | ||
1042 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, | ||
1043 | .mask = CPU_MASK_NONE, | ||
1044 | .name = "timer" | ||
1045 | }; | ||
980 | 1046 | ||
1047 | /** | ||
1048 | * x86_quirk_pre_time_init - do any specific initialisations before. | ||
1049 | * | ||
1050 | **/ | ||
1051 | void __init x86_quirk_pre_time_init(void) | ||
1052 | { | ||
1053 | if (x86_quirks->arch_pre_time_init) | ||
1054 | x86_quirks->arch_pre_time_init(); | ||
1055 | } | ||
1056 | |||
1057 | /** | ||
1058 | * x86_quirk_time_init - do any specific initialisations for the system timer. | ||
1059 | * | ||
1060 | * Description: | ||
1061 | * Must plug the system timer interrupt source at HZ into the IRQ listed | ||
1062 | * in irq_vectors.h:TIMER_IRQ | ||
1063 | **/ | ||
1064 | void __init x86_quirk_time_init(void) | ||
1065 | { | ||
1066 | if (x86_quirks->arch_time_init) { | ||
1067 | /* | ||
1068 | * A nonzero return code does not mean failure, it means | ||
1069 | * that the architecture quirk does not want any | ||
1070 | * generic (timer) setup to be performed after this: | ||
1071 | */ | ||
1072 | if (x86_quirks->arch_time_init()) | ||
1073 | return; | ||
1074 | } | ||
1075 | |||
1076 | irq0.mask = cpumask_of_cpu(0); | ||
1077 | setup_irq(0, &irq0); | ||
1078 | } | ||
1079 | #endif /* CONFIG_X86_32 */ | ||
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index e6faa3316bd2..13f33ea8ccaa 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * Intel SMP support routines. | 2 | * Intel SMP support routines. |
3 | * | 3 | * |
4 | * (c) 1995 Alan Cox, Building #3 <alan@lxorguk.ukuu.org.uk> | 4 | * (c) 1995 Alan Cox, Building #3 <alan@lxorguk.ukuu.org.uk> |
5 | * (c) 1998-99, 2000 Ingo Molnar <mingo@redhat.com> | 5 | * (c) 1998-99, 2000, 2009 Ingo Molnar <mingo@redhat.com> |
6 | * (c) 2002,2003 Andi Kleen, SuSE Labs. | 6 | * (c) 2002,2003 Andi Kleen, SuSE Labs. |
7 | * | 7 | * |
8 | * i386 and x86_64 integration by Glauber Costa <gcosta@redhat.com> | 8 | * i386 and x86_64 integration by Glauber Costa <gcosta@redhat.com> |
@@ -26,8 +26,7 @@ | |||
26 | #include <asm/tlbflush.h> | 26 | #include <asm/tlbflush.h> |
27 | #include <asm/mmu_context.h> | 27 | #include <asm/mmu_context.h> |
28 | #include <asm/proto.h> | 28 | #include <asm/proto.h> |
29 | #include <mach_ipi.h> | 29 | #include <asm/apic.h> |
30 | #include <mach_apic.h> | ||
31 | /* | 30 | /* |
32 | * Some notes on x86 processor bugs affecting SMP operation: | 31 | * Some notes on x86 processor bugs affecting SMP operation: |
33 | * | 32 | * |
@@ -118,12 +117,12 @@ static void native_smp_send_reschedule(int cpu) | |||
118 | WARN_ON(1); | 117 | WARN_ON(1); |
119 | return; | 118 | return; |
120 | } | 119 | } |
121 | send_IPI_mask(cpumask_of(cpu), RESCHEDULE_VECTOR); | 120 | apic->send_IPI_mask(cpumask_of(cpu), RESCHEDULE_VECTOR); |
122 | } | 121 | } |
123 | 122 | ||
124 | void native_send_call_func_single_ipi(int cpu) | 123 | void native_send_call_func_single_ipi(int cpu) |
125 | { | 124 | { |
126 | send_IPI_mask(cpumask_of(cpu), CALL_FUNCTION_SINGLE_VECTOR); | 125 | apic->send_IPI_mask(cpumask_of(cpu), CALL_FUNCTION_SINGLE_VECTOR); |
127 | } | 126 | } |
128 | 127 | ||
129 | void native_send_call_func_ipi(const struct cpumask *mask) | 128 | void native_send_call_func_ipi(const struct cpumask *mask) |
@@ -131,7 +130,7 @@ void native_send_call_func_ipi(const struct cpumask *mask) | |||
131 | cpumask_var_t allbutself; | 130 | cpumask_var_t allbutself; |
132 | 131 | ||
133 | if (!alloc_cpumask_var(&allbutself, GFP_ATOMIC)) { | 132 | if (!alloc_cpumask_var(&allbutself, GFP_ATOMIC)) { |
134 | send_IPI_mask(mask, CALL_FUNCTION_VECTOR); | 133 | apic->send_IPI_mask(mask, CALL_FUNCTION_VECTOR); |
135 | return; | 134 | return; |
136 | } | 135 | } |
137 | 136 | ||
@@ -140,9 +139,9 @@ void native_send_call_func_ipi(const struct cpumask *mask) | |||
140 | 139 | ||
141 | if (cpumask_equal(mask, allbutself) && | 140 | if (cpumask_equal(mask, allbutself) && |
142 | cpumask_equal(cpu_online_mask, cpu_callout_mask)) | 141 | cpumask_equal(cpu_online_mask, cpu_callout_mask)) |
143 | send_IPI_allbutself(CALL_FUNCTION_VECTOR); | 142 | apic->send_IPI_allbutself(CALL_FUNCTION_VECTOR); |
144 | else | 143 | else |
145 | send_IPI_mask(mask, CALL_FUNCTION_VECTOR); | 144 | apic->send_IPI_mask(mask, CALL_FUNCTION_VECTOR); |
146 | 145 | ||
147 | free_cpumask_var(allbutself); | 146 | free_cpumask_var(allbutself); |
148 | } | 147 | } |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 612d3c74f6a3..9ce666387f37 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * x86 SMP booting functions | 2 | * x86 SMP booting functions |
3 | * | 3 | * |
4 | * (c) 1995 Alan Cox, Building #3 <alan@lxorguk.ukuu.org.uk> | 4 | * (c) 1995 Alan Cox, Building #3 <alan@lxorguk.ukuu.org.uk> |
5 | * (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com> | 5 | * (c) 1998, 1999, 2000, 2009 Ingo Molnar <mingo@redhat.com> |
6 | * Copyright 2001 Andi Kleen, SuSE Labs. | 6 | * Copyright 2001 Andi Kleen, SuSE Labs. |
7 | * | 7 | * |
8 | * Much of the core SMP work is based on previous work by Thomas Radke, to | 8 | * Much of the core SMP work is based on previous work by Thomas Radke, to |
@@ -60,14 +60,12 @@ | |||
60 | #include <asm/tlbflush.h> | 60 | #include <asm/tlbflush.h> |
61 | #include <asm/mtrr.h> | 61 | #include <asm/mtrr.h> |
62 | #include <asm/vmi.h> | 62 | #include <asm/vmi.h> |
63 | #include <asm/genapic.h> | 63 | #include <asm/apic.h> |
64 | #include <asm/setup.h> | 64 | #include <asm/setup.h> |
65 | #include <asm/uv/uv.h> | 65 | #include <asm/uv/uv.h> |
66 | #include <linux/mc146818rtc.h> | 66 | #include <linux/mc146818rtc.h> |
67 | 67 | ||
68 | #include <mach_apic.h> | 68 | #include <asm/smpboot_hooks.h> |
69 | #include <mach_wakecpu.h> | ||
70 | #include <smpboot_hooks.h> | ||
71 | 69 | ||
72 | #ifdef CONFIG_X86_32 | 70 | #ifdef CONFIG_X86_32 |
73 | u8 apicid_2_node[MAX_APICID]; | 71 | u8 apicid_2_node[MAX_APICID]; |
@@ -163,7 +161,7 @@ static void map_cpu_to_logical_apicid(void) | |||
163 | { | 161 | { |
164 | int cpu = smp_processor_id(); | 162 | int cpu = smp_processor_id(); |
165 | int apicid = logical_smp_processor_id(); | 163 | int apicid = logical_smp_processor_id(); |
166 | int node = apicid_to_node(apicid); | 164 | int node = apic->apicid_to_node(apicid); |
167 | 165 | ||
168 | if (!node_online(node)) | 166 | if (!node_online(node)) |
169 | node = first_online_node; | 167 | node = first_online_node; |
@@ -196,7 +194,8 @@ static void __cpuinit smp_callin(void) | |||
196 | * our local APIC. We have to wait for the IPI or we'll | 194 | * our local APIC. We have to wait for the IPI or we'll |
197 | * lock up on an APIC access. | 195 | * lock up on an APIC access. |
198 | */ | 196 | */ |
199 | wait_for_init_deassert(&init_deasserted); | 197 | if (apic->wait_for_init_deassert) |
198 | apic->wait_for_init_deassert(&init_deasserted); | ||
200 | 199 | ||
201 | /* | 200 | /* |
202 | * (This works even if the APIC is not enabled.) | 201 | * (This works even if the APIC is not enabled.) |
@@ -243,7 +242,8 @@ static void __cpuinit smp_callin(void) | |||
243 | */ | 242 | */ |
244 | 243 | ||
245 | pr_debug("CALLIN, before setup_local_APIC().\n"); | 244 | pr_debug("CALLIN, before setup_local_APIC().\n"); |
246 | smp_callin_clear_local_apic(); | 245 | if (apic->smp_callin_clear_local_apic) |
246 | apic->smp_callin_clear_local_apic(); | ||
247 | setup_local_APIC(); | 247 | setup_local_APIC(); |
248 | end_local_APIC_setup(); | 248 | end_local_APIC_setup(); |
249 | map_cpu_to_logical_apicid(); | 249 | map_cpu_to_logical_apicid(); |
@@ -583,7 +583,7 @@ wakeup_secondary_cpu_via_nmi(int logical_apicid, unsigned long start_eip) | |||
583 | /* Target chip */ | 583 | /* Target chip */ |
584 | /* Boot on the stack */ | 584 | /* Boot on the stack */ |
585 | /* Kick the second */ | 585 | /* Kick the second */ |
586 | apic_icr_write(APIC_DM_NMI | APIC_DEST_LOGICAL, logical_apicid); | 586 | apic_icr_write(APIC_DM_NMI | apic->dest_logical, logical_apicid); |
587 | 587 | ||
588 | pr_debug("Waiting for send to finish...\n"); | 588 | pr_debug("Waiting for send to finish...\n"); |
589 | send_status = safe_apic_wait_icr_idle(); | 589 | send_status = safe_apic_wait_icr_idle(); |
@@ -745,21 +745,21 @@ static void __cpuinit do_fork_idle(struct work_struct *work) | |||
745 | complete(&c_idle->done); | 745 | complete(&c_idle->done); |
746 | } | 746 | } |
747 | 747 | ||
748 | static int __cpuinit do_boot_cpu(int apicid, int cpu) | ||
749 | /* | 748 | /* |
750 | * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad | 749 | * NOTE - on most systems this is a PHYSICAL apic ID, but on multiquad |
751 | * (ie clustered apic addressing mode), this is a LOGICAL apic ID. | 750 | * (ie clustered apic addressing mode), this is a LOGICAL apic ID. |
752 | * Returns zero if CPU booted OK, else error code from wakeup_secondary_cpu. | 751 | * Returns zero if CPU booted OK, else error code from ->wakeup_cpu. |
753 | */ | 752 | */ |
753 | static int __cpuinit do_boot_cpu(int apicid, int cpu) | ||
754 | { | 754 | { |
755 | unsigned long boot_error = 0; | 755 | unsigned long boot_error = 0; |
756 | int timeout; | ||
757 | unsigned long start_ip; | 756 | unsigned long start_ip; |
758 | unsigned short nmi_high = 0, nmi_low = 0; | 757 | int timeout; |
759 | struct create_idle c_idle = { | 758 | struct create_idle c_idle = { |
760 | .cpu = cpu, | 759 | .cpu = cpu, |
761 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), | 760 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), |
762 | }; | 761 | }; |
762 | |||
763 | INIT_WORK(&c_idle.work, do_fork_idle); | 763 | INIT_WORK(&c_idle.work, do_fork_idle); |
764 | 764 | ||
765 | alternatives_smp_switch(1); | 765 | alternatives_smp_switch(1); |
@@ -824,8 +824,6 @@ do_rest: | |||
824 | 824 | ||
825 | pr_debug("Setting warm reset code and vector.\n"); | 825 | pr_debug("Setting warm reset code and vector.\n"); |
826 | 826 | ||
827 | store_NMI_vector(&nmi_high, &nmi_low); | ||
828 | |||
829 | smpboot_setup_warm_reset_vector(start_ip); | 827 | smpboot_setup_warm_reset_vector(start_ip); |
830 | /* | 828 | /* |
831 | * Be paranoid about clearing APIC errors. | 829 | * Be paranoid about clearing APIC errors. |
@@ -839,7 +837,7 @@ do_rest: | |||
839 | /* | 837 | /* |
840 | * Starting actual IPI sequence... | 838 | * Starting actual IPI sequence... |
841 | */ | 839 | */ |
842 | boot_error = wakeup_secondary_cpu(apicid, start_ip); | 840 | boot_error = apic->wakeup_cpu(apicid, start_ip); |
843 | 841 | ||
844 | if (!boot_error) { | 842 | if (!boot_error) { |
845 | /* | 843 | /* |
@@ -873,8 +871,8 @@ do_rest: | |||
873 | else | 871 | else |
874 | /* trampoline code not run */ | 872 | /* trampoline code not run */ |
875 | printk(KERN_ERR "Not responding.\n"); | 873 | printk(KERN_ERR "Not responding.\n"); |
876 | if (get_uv_system_type() != UV_NON_UNIQUE_APIC) | 874 | if (apic->inquire_remote_apic) |
877 | inquire_remote_apic(apicid); | 875 | apic->inquire_remote_apic(apicid); |
878 | } | 876 | } |
879 | } | 877 | } |
880 | 878 | ||
@@ -905,7 +903,7 @@ do_rest: | |||
905 | 903 | ||
906 | int __cpuinit native_cpu_up(unsigned int cpu) | 904 | int __cpuinit native_cpu_up(unsigned int cpu) |
907 | { | 905 | { |
908 | int apicid = cpu_present_to_apicid(cpu); | 906 | int apicid = apic->cpu_present_to_apicid(cpu); |
909 | unsigned long flags; | 907 | unsigned long flags; |
910 | int err; | 908 | int err; |
911 | 909 | ||
@@ -998,14 +996,14 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
998 | { | 996 | { |
999 | preempt_disable(); | 997 | preempt_disable(); |
1000 | 998 | ||
1001 | #if defined(CONFIG_X86_PC) && defined(CONFIG_X86_32) | 999 | #if !defined(CONFIG_X86_BIGSMP) && defined(CONFIG_X86_32) |
1002 | if (def_to_bigsmp && nr_cpu_ids > 8) { | 1000 | if (def_to_bigsmp && nr_cpu_ids > 8) { |
1003 | unsigned int cpu; | 1001 | unsigned int cpu; |
1004 | unsigned nr; | 1002 | unsigned nr; |
1005 | 1003 | ||
1006 | printk(KERN_WARNING | 1004 | printk(KERN_WARNING |
1007 | "More than 8 CPUs detected - skipping them.\n" | 1005 | "More than 8 CPUs detected - skipping them.\n" |
1008 | "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n"); | 1006 | "Use CONFIG_X86_BIGSMP.\n"); |
1009 | 1007 | ||
1010 | nr = 0; | 1008 | nr = 0; |
1011 | for_each_present_cpu(cpu) { | 1009 | for_each_present_cpu(cpu) { |
@@ -1051,7 +1049,7 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
1051 | * Should not be necessary because the MP table should list the boot | 1049 | * Should not be necessary because the MP table should list the boot |
1052 | * CPU too, but we do it for the sake of robustness anyway. | 1050 | * CPU too, but we do it for the sake of robustness anyway. |
1053 | */ | 1051 | */ |
1054 | if (!check_phys_apicid_present(boot_cpu_physical_apicid)) { | 1052 | if (!apic->check_phys_apicid_present(boot_cpu_physical_apicid)) { |
1055 | printk(KERN_NOTICE | 1053 | printk(KERN_NOTICE |
1056 | "weird, boot CPU (#%d) not listed by the BIOS.\n", | 1054 | "weird, boot CPU (#%d) not listed by the BIOS.\n", |
1057 | boot_cpu_physical_apicid); | 1055 | boot_cpu_physical_apicid); |
@@ -1069,7 +1067,7 @@ static int __init smp_sanity_check(unsigned max_cpus) | |||
1069 | printk(KERN_ERR "... forcing use of dummy APIC emulation." | 1067 | printk(KERN_ERR "... forcing use of dummy APIC emulation." |
1070 | "(tell your hw vendor)\n"); | 1068 | "(tell your hw vendor)\n"); |
1071 | smpboot_clear_io_apic(); | 1069 | smpboot_clear_io_apic(); |
1072 | disable_ioapic_setup(); | 1070 | arch_disable_smp_support(); |
1073 | return -1; | 1071 | return -1; |
1074 | } | 1072 | } |
1075 | 1073 | ||
@@ -1126,9 +1124,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1126 | current_thread_info()->cpu = 0; /* needed? */ | 1124 | current_thread_info()->cpu = 0; /* needed? */ |
1127 | set_cpu_sibling_map(0); | 1125 | set_cpu_sibling_map(0); |
1128 | 1126 | ||
1129 | #ifdef CONFIG_X86_64 | ||
1130 | enable_IR_x2apic(); | 1127 | enable_IR_x2apic(); |
1131 | setup_apic_routing(); | 1128 | #ifdef CONFIG_X86_64 |
1129 | default_setup_apic_routing(); | ||
1132 | #endif | 1130 | #endif |
1133 | 1131 | ||
1134 | if (smp_sanity_check(max_cpus) < 0) { | 1132 | if (smp_sanity_check(max_cpus) < 0) { |
@@ -1152,18 +1150,18 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1152 | */ | 1150 | */ |
1153 | setup_local_APIC(); | 1151 | setup_local_APIC(); |
1154 | 1152 | ||
1155 | #ifdef CONFIG_X86_64 | ||
1156 | /* | 1153 | /* |
1157 | * Enable IO APIC before setting up error vector | 1154 | * Enable IO APIC before setting up error vector |
1158 | */ | 1155 | */ |
1159 | if (!skip_ioapic_setup && nr_ioapics) | 1156 | if (!skip_ioapic_setup && nr_ioapics) |
1160 | enable_IO_APIC(); | 1157 | enable_IO_APIC(); |
1161 | #endif | 1158 | |
1162 | end_local_APIC_setup(); | 1159 | end_local_APIC_setup(); |
1163 | 1160 | ||
1164 | map_cpu_to_logical_apicid(); | 1161 | map_cpu_to_logical_apicid(); |
1165 | 1162 | ||
1166 | setup_portio_remap(); | 1163 | if (apic->setup_portio_remap) |
1164 | apic->setup_portio_remap(); | ||
1167 | 1165 | ||
1168 | smpboot_setup_io_apic(); | 1166 | smpboot_setup_io_apic(); |
1169 | /* | 1167 | /* |
diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c index 10786af95545..f7bddc2e37d1 100644 --- a/arch/x86/kernel/stacktrace.c +++ b/arch/x86/kernel/stacktrace.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stack trace management functions | 2 | * Stack trace management functions |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | 4 | * Copyright (C) 2006-2009 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> |
5 | */ | 5 | */ |
6 | #include <linux/sched.h> | 6 | #include <linux/sched.h> |
7 | #include <linux/stacktrace.h> | 7 | #include <linux/stacktrace.h> |
diff --git a/arch/x86/kernel/summit_32.c b/arch/x86/kernel/summit_32.c deleted file mode 100644 index 7b987852e876..000000000000 --- a/arch/x86/kernel/summit_32.c +++ /dev/null | |||
@@ -1,188 +0,0 @@ | |||
1 | /* | ||
2 | * IBM Summit-Specific Code | ||
3 | * | ||
4 | * Written By: Matthew Dobson, IBM Corporation | ||
5 | * | ||
6 | * Copyright (c) 2003 IBM Corp. | ||
7 | * | ||
8 | * All rights reserved. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or (at | ||
13 | * your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, but | ||
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or | ||
18 | * NON INFRINGEMENT. See the GNU General Public License for more | ||
19 | * details. | ||
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | * | ||
25 | * Send feedback to <colpatch@us.ibm.com> | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | #include <linux/mm.h> | ||
30 | #include <linux/init.h> | ||
31 | #include <asm/io.h> | ||
32 | #include <asm/bios_ebda.h> | ||
33 | #include <asm/summit/mpparse.h> | ||
34 | |||
35 | static struct rio_table_hdr *rio_table_hdr __initdata; | ||
36 | static struct scal_detail *scal_devs[MAX_NUMNODES] __initdata; | ||
37 | static struct rio_detail *rio_devs[MAX_NUMNODES*4] __initdata; | ||
38 | |||
39 | #ifndef CONFIG_X86_NUMAQ | ||
40 | static int mp_bus_id_to_node[MAX_MP_BUSSES] __initdata; | ||
41 | #endif | ||
42 | |||
43 | static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus) | ||
44 | { | ||
45 | int twister = 0, node = 0; | ||
46 | int i, bus, num_buses; | ||
47 | |||
48 | for (i = 0; i < rio_table_hdr->num_rio_dev; i++) { | ||
49 | if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id) { | ||
50 | twister = rio_devs[i]->owner_id; | ||
51 | break; | ||
52 | } | ||
53 | } | ||
54 | if (i == rio_table_hdr->num_rio_dev) { | ||
55 | printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __func__); | ||
56 | return last_bus; | ||
57 | } | ||
58 | |||
59 | for (i = 0; i < rio_table_hdr->num_scal_dev; i++) { | ||
60 | if (scal_devs[i]->node_id == twister) { | ||
61 | node = scal_devs[i]->node_id; | ||
62 | break; | ||
63 | } | ||
64 | } | ||
65 | if (i == rio_table_hdr->num_scal_dev) { | ||
66 | printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __func__); | ||
67 | return last_bus; | ||
68 | } | ||
69 | |||
70 | switch (rio_devs[wpeg_num]->type) { | ||
71 | case CompatWPEG: | ||
72 | /* | ||
73 | * The Compatibility Winnipeg controls the 2 legacy buses, | ||
74 | * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case | ||
75 | * a PCI-PCI bridge card is used in either slot: total 5 buses. | ||
76 | */ | ||
77 | num_buses = 5; | ||
78 | break; | ||
79 | case AltWPEG: | ||
80 | /* | ||
81 | * The Alternate Winnipeg controls the 2 133MHz buses [1 slot | ||
82 | * each], their 2 "extra" buses, the 100MHz bus [2 slots] and | ||
83 | * the "extra" buses for each of those slots: total 7 buses. | ||
84 | */ | ||
85 | num_buses = 7; | ||
86 | break; | ||
87 | case LookOutAWPEG: | ||
88 | case LookOutBWPEG: | ||
89 | /* | ||
90 | * A Lookout Winnipeg controls 3 100MHz buses [2 slots each] | ||
91 | * & the "extra" buses for each of those slots: total 9 buses. | ||
92 | */ | ||
93 | num_buses = 9; | ||
94 | break; | ||
95 | default: | ||
96 | printk(KERN_INFO "%s: Unsupported Winnipeg type!\n", __func__); | ||
97 | return last_bus; | ||
98 | } | ||
99 | |||
100 | for (bus = last_bus; bus < last_bus + num_buses; bus++) | ||
101 | mp_bus_id_to_node[bus] = node; | ||
102 | return bus; | ||
103 | } | ||
104 | |||
105 | static int __init build_detail_arrays(void) | ||
106 | { | ||
107 | unsigned long ptr; | ||
108 | int i, scal_detail_size, rio_detail_size; | ||
109 | |||
110 | if (rio_table_hdr->num_scal_dev > MAX_NUMNODES) { | ||
111 | printk(KERN_WARNING "%s: MAX_NUMNODES too low! Defined as %d, but system has %d nodes.\n", __func__, MAX_NUMNODES, rio_table_hdr->num_scal_dev); | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | switch (rio_table_hdr->version) { | ||
116 | default: | ||
117 | printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __func__, rio_table_hdr->version); | ||
118 | return 0; | ||
119 | case 2: | ||
120 | scal_detail_size = 11; | ||
121 | rio_detail_size = 13; | ||
122 | break; | ||
123 | case 3: | ||
124 | scal_detail_size = 12; | ||
125 | rio_detail_size = 15; | ||
126 | break; | ||
127 | } | ||
128 | |||
129 | ptr = (unsigned long)rio_table_hdr + 3; | ||
130 | for (i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size) | ||
131 | scal_devs[i] = (struct scal_detail *)ptr; | ||
132 | |||
133 | for (i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size) | ||
134 | rio_devs[i] = (struct rio_detail *)ptr; | ||
135 | |||
136 | return 1; | ||
137 | } | ||
138 | |||
139 | void __init setup_summit(void) | ||
140 | { | ||
141 | unsigned long ptr; | ||
142 | unsigned short offset; | ||
143 | int i, next_wpeg, next_bus = 0; | ||
144 | |||
145 | /* The pointer to the EBDA is stored in the word @ phys 0x40E(40:0E) */ | ||
146 | ptr = get_bios_ebda(); | ||
147 | ptr = (unsigned long)phys_to_virt(ptr); | ||
148 | |||
149 | rio_table_hdr = NULL; | ||
150 | offset = 0x180; | ||
151 | while (offset) { | ||
152 | /* The block id is stored in the 2nd word */ | ||
153 | if (*((unsigned short *)(ptr + offset + 2)) == 0x4752) { | ||
154 | /* set the pointer past the offset & block id */ | ||
155 | rio_table_hdr = (struct rio_table_hdr *)(ptr + offset + 4); | ||
156 | break; | ||
157 | } | ||
158 | /* The next offset is stored in the 1st word. 0 means no more */ | ||
159 | offset = *((unsigned short *)(ptr + offset)); | ||
160 | } | ||
161 | if (!rio_table_hdr) { | ||
162 | printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __func__); | ||
163 | return; | ||
164 | } | ||
165 | |||
166 | if (!build_detail_arrays()) | ||
167 | return; | ||
168 | |||
169 | /* The first Winnipeg we're looking for has an index of 0 */ | ||
170 | next_wpeg = 0; | ||
171 | do { | ||
172 | for (i = 0; i < rio_table_hdr->num_rio_dev; i++) { | ||
173 | if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg) { | ||
174 | /* It's the Winnipeg we're looking for! */ | ||
175 | next_bus = setup_pci_node_map_for_wpeg(i, next_bus); | ||
176 | next_wpeg++; | ||
177 | break; | ||
178 | } | ||
179 | } | ||
180 | /* | ||
181 | * If we go through all Rio devices and don't find one with | ||
182 | * the next index, it means we've found all the Winnipegs, | ||
183 | * and thus all the PCI buses. | ||
184 | */ | ||
185 | if (i == rio_table_hdr->num_rio_dev) | ||
186 | next_wpeg = 0; | ||
187 | } while (next_wpeg != 0); | ||
188 | } | ||
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c index 3985cac0ed47..5c5d87f0b2e1 100644 --- a/arch/x86/kernel/time_32.c +++ b/arch/x86/kernel/time_32.c | |||
@@ -33,12 +33,12 @@ | |||
33 | #include <linux/time.h> | 33 | #include <linux/time.h> |
34 | #include <linux/mca.h> | 34 | #include <linux/mca.h> |
35 | 35 | ||
36 | #include <asm/arch_hooks.h> | 36 | #include <asm/setup.h> |
37 | #include <asm/hpet.h> | 37 | #include <asm/hpet.h> |
38 | #include <asm/time.h> | 38 | #include <asm/time.h> |
39 | #include <asm/timer.h> | 39 | #include <asm/timer.h> |
40 | 40 | ||
41 | #include "do_timer.h" | 41 | #include <asm/do_timer.h> |
42 | 42 | ||
43 | int timer_ack; | 43 | int timer_ack; |
44 | 44 | ||
@@ -118,7 +118,7 @@ void __init hpet_time_init(void) | |||
118 | { | 118 | { |
119 | if (!hpet_enable()) | 119 | if (!hpet_enable()) |
120 | setup_pit_timer(); | 120 | setup_pit_timer(); |
121 | time_init_hook(); | 121 | x86_quirk_time_init(); |
122 | } | 122 | } |
123 | 123 | ||
124 | /* | 124 | /* |
@@ -131,7 +131,7 @@ void __init hpet_time_init(void) | |||
131 | */ | 131 | */ |
132 | void __init time_init(void) | 132 | void __init time_init(void) |
133 | { | 133 | { |
134 | pre_time_init_hook(); | 134 | x86_quirk_pre_time_init(); |
135 | tsc_init(); | 135 | tsc_init(); |
136 | late_time_init = choose_time_init(); | 136 | late_time_init = choose_time_init(); |
137 | } | 137 | } |
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c index e6e695acd725..241ec3923f61 100644 --- a/arch/x86/kernel/time_64.c +++ b/arch/x86/kernel/time_64.c | |||
@@ -115,7 +115,7 @@ unsigned long __init calibrate_cpu(void) | |||
115 | 115 | ||
116 | static struct irqaction irq0 = { | 116 | static struct irqaction irq0 = { |
117 | .handler = timer_interrupt, | 117 | .handler = timer_interrupt, |
118 | .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING, | 118 | .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER, |
119 | .mask = CPU_MASK_NONE, | 119 | .mask = CPU_MASK_NONE, |
120 | .name = "timer" | 120 | .name = "timer" |
121 | }; | 121 | }; |
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c index f4b2f27d19b9..f04549afcfe9 100644 --- a/arch/x86/kernel/tlb_uv.c +++ b/arch/x86/kernel/tlb_uv.c | |||
@@ -15,13 +15,11 @@ | |||
15 | #include <asm/uv/uv_mmrs.h> | 15 | #include <asm/uv/uv_mmrs.h> |
16 | #include <asm/uv/uv_hub.h> | 16 | #include <asm/uv/uv_hub.h> |
17 | #include <asm/uv/uv_bau.h> | 17 | #include <asm/uv/uv_bau.h> |
18 | #include <asm/genapic.h> | 18 | #include <asm/apic.h> |
19 | #include <asm/idle.h> | 19 | #include <asm/idle.h> |
20 | #include <asm/tsc.h> | 20 | #include <asm/tsc.h> |
21 | #include <asm/irq_vectors.h> | 21 | #include <asm/irq_vectors.h> |
22 | 22 | ||
23 | #include <mach_apic.h> | ||
24 | |||
25 | static struct bau_control **uv_bau_table_bases __read_mostly; | 23 | static struct bau_control **uv_bau_table_bases __read_mostly; |
26 | static int uv_bau_retry_limit __read_mostly; | 24 | static int uv_bau_retry_limit __read_mostly; |
27 | 25 | ||
diff --git a/arch/x86/kernel/trampoline_32.S b/arch/x86/kernel/trampoline_32.S index d8ccc3c6552f..66d874e5404c 100644 --- a/arch/x86/kernel/trampoline_32.S +++ b/arch/x86/kernel/trampoline_32.S | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | #include <linux/linkage.h> | 30 | #include <linux/linkage.h> |
31 | #include <asm/segment.h> | 31 | #include <asm/segment.h> |
32 | #include <asm/page.h> | 32 | #include <asm/page_types.h> |
33 | 33 | ||
34 | /* We can free up trampoline after bootup if cpu hotplug is not supported. */ | 34 | /* We can free up trampoline after bootup if cpu hotplug is not supported. */ |
35 | #ifndef CONFIG_HOTPLUG_CPU | 35 | #ifndef CONFIG_HOTPLUG_CPU |
diff --git a/arch/x86/kernel/trampoline_64.S b/arch/x86/kernel/trampoline_64.S index 894293c598db..cddfb8d386b9 100644 --- a/arch/x86/kernel/trampoline_64.S +++ b/arch/x86/kernel/trampoline_64.S | |||
@@ -25,10 +25,11 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <linux/linkage.h> | 27 | #include <linux/linkage.h> |
28 | #include <asm/pgtable.h> | 28 | #include <asm/pgtable_types.h> |
29 | #include <asm/page.h> | 29 | #include <asm/page_types.h> |
30 | #include <asm/msr.h> | 30 | #include <asm/msr.h> |
31 | #include <asm/segment.h> | 31 | #include <asm/segment.h> |
32 | #include <asm/processor-flags.h> | ||
32 | 33 | ||
33 | .section .rodata, "a", @progbits | 34 | .section .rodata, "a", @progbits |
34 | 35 | ||
@@ -37,7 +38,7 @@ | |||
37 | ENTRY(trampoline_data) | 38 | ENTRY(trampoline_data) |
38 | r_base = . | 39 | r_base = . |
39 | cli # We should be safe anyway | 40 | cli # We should be safe anyway |
40 | wbinvd | 41 | wbinvd |
41 | mov %cs, %ax # Code and data in the same place | 42 | mov %cs, %ax # Code and data in the same place |
42 | mov %ax, %ds | 43 | mov %ax, %ds |
43 | mov %ax, %es | 44 | mov %ax, %es |
@@ -73,9 +74,8 @@ r_base = . | |||
73 | lidtl tidt - r_base # load idt with 0, 0 | 74 | lidtl tidt - r_base # load idt with 0, 0 |
74 | lgdtl tgdt - r_base # load gdt with whatever is appropriate | 75 | lgdtl tgdt - r_base # load gdt with whatever is appropriate |
75 | 76 | ||
76 | xor %ax, %ax | 77 | mov $X86_CR0_PE, %ax # protected mode (PE) bit |
77 | inc %ax # protected mode (PE) bit | 78 | lmsw %ax # into protected mode |
78 | lmsw %ax # into protected mode | ||
79 | 79 | ||
80 | # flush prefetch and jump to startup_32 | 80 | # flush prefetch and jump to startup_32 |
81 | ljmpl *(startup_32_vector - r_base) | 81 | ljmpl *(startup_32_vector - r_base) |
@@ -86,9 +86,8 @@ startup_32: | |||
86 | movl $__KERNEL_DS, %eax # Initialize the %ds segment register | 86 | movl $__KERNEL_DS, %eax # Initialize the %ds segment register |
87 | movl %eax, %ds | 87 | movl %eax, %ds |
88 | 88 | ||
89 | xorl %eax, %eax | 89 | movl $X86_CR4_PAE, %eax |
90 | btsl $5, %eax # Enable PAE mode | 90 | movl %eax, %cr4 # Enable PAE mode |
91 | movl %eax, %cr4 | ||
92 | 91 | ||
93 | # Setup trampoline 4 level pagetables | 92 | # Setup trampoline 4 level pagetables |
94 | leal (trampoline_level4_pgt - r_base)(%esi), %eax | 93 | leal (trampoline_level4_pgt - r_base)(%esi), %eax |
@@ -99,9 +98,9 @@ startup_32: | |||
99 | xorl %edx, %edx | 98 | xorl %edx, %edx |
100 | wrmsr | 99 | wrmsr |
101 | 100 | ||
102 | xorl %eax, %eax | 101 | # Enable paging and in turn activate Long Mode |
103 | btsl $31, %eax # Enable paging and in turn activate Long Mode | 102 | # Enable protected mode |
104 | btsl $0, %eax # Enable protected mode | 103 | movl $(X86_CR0_PG | X86_CR0_PE), %eax |
105 | movl %eax, %cr0 | 104 | movl %eax, %cr0 |
106 | 105 | ||
107 | /* | 106 | /* |
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c index 71a8f871331e..c05430ac1b44 100644 --- a/arch/x86/kernel/traps.c +++ b/arch/x86/kernel/traps.c | |||
@@ -54,14 +54,14 @@ | |||
54 | #include <asm/desc.h> | 54 | #include <asm/desc.h> |
55 | #include <asm/i387.h> | 55 | #include <asm/i387.h> |
56 | 56 | ||
57 | #include <mach_traps.h> | 57 | #include <asm/mach_traps.h> |
58 | 58 | ||
59 | #ifdef CONFIG_X86_64 | 59 | #ifdef CONFIG_X86_64 |
60 | #include <asm/pgalloc.h> | 60 | #include <asm/pgalloc.h> |
61 | #include <asm/proto.h> | 61 | #include <asm/proto.h> |
62 | #else | 62 | #else |
63 | #include <asm/processor-flags.h> | 63 | #include <asm/processor-flags.h> |
64 | #include <asm/arch_hooks.h> | 64 | #include <asm/setup.h> |
65 | #include <asm/traps.h> | 65 | #include <asm/traps.h> |
66 | 66 | ||
67 | #include "cpu/mcheck/mce.h" | 67 | #include "cpu/mcheck/mce.h" |
@@ -98,6 +98,12 @@ static inline void preempt_conditional_sti(struct pt_regs *regs) | |||
98 | local_irq_enable(); | 98 | local_irq_enable(); |
99 | } | 99 | } |
100 | 100 | ||
101 | static inline void conditional_cli(struct pt_regs *regs) | ||
102 | { | ||
103 | if (regs->flags & X86_EFLAGS_IF) | ||
104 | local_irq_disable(); | ||
105 | } | ||
106 | |||
101 | static inline void preempt_conditional_cli(struct pt_regs *regs) | 107 | static inline void preempt_conditional_cli(struct pt_regs *regs) |
102 | { | 108 | { |
103 | if (regs->flags & X86_EFLAGS_IF) | 109 | if (regs->flags & X86_EFLAGS_IF) |
@@ -625,8 +631,10 @@ clear_dr7: | |||
625 | 631 | ||
626 | #ifdef CONFIG_X86_32 | 632 | #ifdef CONFIG_X86_32 |
627 | debug_vm86: | 633 | debug_vm86: |
634 | /* reenable preemption: handle_vm86_trap() might sleep */ | ||
635 | dec_preempt_count(); | ||
628 | handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1); | 636 | handle_vm86_trap((struct kernel_vm86_regs *) regs, error_code, 1); |
629 | preempt_conditional_cli(regs); | 637 | conditional_cli(regs); |
630 | return; | 638 | return; |
631 | #endif | 639 | #endif |
632 | 640 | ||
@@ -934,7 +942,7 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code) | |||
934 | info.si_signo = SIGILL; | 942 | info.si_signo = SIGILL; |
935 | info.si_errno = 0; | 943 | info.si_errno = 0; |
936 | info.si_code = ILL_BADSTK; | 944 | info.si_code = ILL_BADSTK; |
937 | info.si_addr = 0; | 945 | info.si_addr = NULL; |
938 | if (notify_die(DIE_TRAP, "iret exception", | 946 | if (notify_die(DIE_TRAP, "iret exception", |
939 | regs, error_code, 32, SIGILL) == NOTIFY_STOP) | 947 | regs, error_code, 32, SIGILL) == NOTIFY_STOP) |
940 | return; | 948 | return; |
@@ -1018,6 +1026,6 @@ void __init trap_init(void) | |||
1018 | cpu_init(); | 1026 | cpu_init(); |
1019 | 1027 | ||
1020 | #ifdef CONFIG_X86_32 | 1028 | #ifdef CONFIG_X86_32 |
1021 | trap_init_hook(); | 1029 | x86_quirk_trap_init(); |
1022 | #endif | 1030 | #endif |
1023 | } | 1031 | } |
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 599e58168631..83d53ce5d4c4 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
@@ -773,7 +773,7 @@ __cpuinit int unsynchronized_tsc(void) | |||
773 | if (!cpu_has_tsc || tsc_unstable) | 773 | if (!cpu_has_tsc || tsc_unstable) |
774 | return 1; | 774 | return 1; |
775 | 775 | ||
776 | #ifdef CONFIG_X86_SMP | 776 | #ifdef CONFIG_SMP |
777 | if (apic_is_clustered_box()) | 777 | if (apic_is_clustered_box()) |
778 | return 1; | 778 | return 1; |
779 | #endif | 779 | #endif |
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c index d801d06af068..191a876e9e87 100644 --- a/arch/x86/kernel/visws_quirks.c +++ b/arch/x86/kernel/visws_quirks.c | |||
@@ -24,18 +24,14 @@ | |||
24 | 24 | ||
25 | #include <asm/visws/cobalt.h> | 25 | #include <asm/visws/cobalt.h> |
26 | #include <asm/visws/piix4.h> | 26 | #include <asm/visws/piix4.h> |
27 | #include <asm/arch_hooks.h> | ||
28 | #include <asm/io_apic.h> | 27 | #include <asm/io_apic.h> |
29 | #include <asm/fixmap.h> | 28 | #include <asm/fixmap.h> |
30 | #include <asm/reboot.h> | 29 | #include <asm/reboot.h> |
31 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
31 | #include <asm/apic.h> | ||
32 | #include <asm/e820.h> | 32 | #include <asm/e820.h> |
33 | #include <asm/io.h> | 33 | #include <asm/io.h> |
34 | 34 | ||
35 | #include <mach_ipi.h> | ||
36 | |||
37 | #include "mach_apic.h" | ||
38 | |||
39 | #include <linux/kernel_stat.h> | 35 | #include <linux/kernel_stat.h> |
40 | 36 | ||
41 | #include <asm/i8259.h> | 37 | #include <asm/i8259.h> |
@@ -49,8 +45,6 @@ | |||
49 | 45 | ||
50 | extern int no_broadcast; | 46 | extern int no_broadcast; |
51 | 47 | ||
52 | #include <asm/apic.h> | ||
53 | |||
54 | char visws_board_type = -1; | 48 | char visws_board_type = -1; |
55 | char visws_board_rev = -1; | 49 | char visws_board_rev = -1; |
56 | 50 | ||
@@ -200,7 +194,7 @@ static void __init MP_processor_info(struct mpc_cpu *m) | |||
200 | return; | 194 | return; |
201 | } | 195 | } |
202 | 196 | ||
203 | apic_cpus = apicid_to_cpu_present(m->apicid); | 197 | apic_cpus = apic->apicid_to_cpu_present(m->apicid); |
204 | physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); | 198 | physids_or(phys_cpu_present_map, phys_cpu_present_map, apic_cpus); |
205 | /* | 199 | /* |
206 | * Validate version | 200 | * Validate version |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index f052c84ecbe4..2cc4a90e2cb3 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
@@ -798,8 +798,8 @@ static inline int __init activate_vmi(void) | |||
798 | #endif | 798 | #endif |
799 | 799 | ||
800 | #ifdef CONFIG_X86_LOCAL_APIC | 800 | #ifdef CONFIG_X86_LOCAL_APIC |
801 | para_fill(apic_ops->read, APICRead); | 801 | para_fill(apic->read, APICRead); |
802 | para_fill(apic_ops->write, APICWrite); | 802 | para_fill(apic->write, APICWrite); |
803 | #endif | 803 | #endif |
804 | 804 | ||
805 | /* | 805 | /* |
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c index c4c1f9e09402..33a788d5879c 100644 --- a/arch/x86/kernel/vmiclock_32.c +++ b/arch/x86/kernel/vmiclock_32.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <asm/vmi.h> | 29 | #include <asm/vmi.h> |
30 | #include <asm/vmi_time.h> | 30 | #include <asm/vmi_time.h> |
31 | #include <asm/arch_hooks.h> | ||
32 | #include <asm/apicdef.h> | 31 | #include <asm/apicdef.h> |
33 | #include <asm/apic.h> | 32 | #include <asm/apic.h> |
34 | #include <asm/timer.h> | 33 | #include <asm/timer.h> |
@@ -202,7 +201,7 @@ static irqreturn_t vmi_timer_interrupt(int irq, void *dev_id) | |||
202 | static struct irqaction vmi_clock_action = { | 201 | static struct irqaction vmi_clock_action = { |
203 | .name = "vmi-timer", | 202 | .name = "vmi-timer", |
204 | .handler = vmi_timer_interrupt, | 203 | .handler = vmi_timer_interrupt, |
205 | .flags = IRQF_DISABLED | IRQF_NOBALANCING, | 204 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, |
206 | .mask = CPU_MASK_ALL, | 205 | .mask = CPU_MASK_ALL, |
207 | }; | 206 | }; |
208 | 207 | ||
@@ -256,7 +255,7 @@ void __devinit vmi_time_bsp_init(void) | |||
256 | */ | 255 | */ |
257 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); | 256 | clockevents_notify(CLOCK_EVT_NOTIFY_SUSPEND, NULL); |
258 | local_irq_disable(); | 257 | local_irq_disable(); |
259 | #ifdef CONFIG_X86_SMP | 258 | #ifdef CONFIG_SMP |
260 | /* | 259 | /* |
261 | * XXX handle_percpu_irq only defined for SMP; we need to switch over | 260 | * XXX handle_percpu_irq only defined for SMP; we need to switch over |
262 | * to using it, since this is a local interrupt, which each CPU must | 261 | * to using it, since this is a local interrupt, which each CPU must |
@@ -283,10 +282,12 @@ void __devinit vmi_time_ap_init(void) | |||
283 | #endif | 282 | #endif |
284 | 283 | ||
285 | /** vmi clocksource */ | 284 | /** vmi clocksource */ |
285 | static struct clocksource clocksource_vmi; | ||
286 | 286 | ||
287 | static cycle_t read_real_cycles(void) | 287 | static cycle_t read_real_cycles(void) |
288 | { | 288 | { |
289 | return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); | 289 | cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); |
290 | return max(ret, clocksource_vmi.cycle_last); | ||
290 | } | 291 | } |
291 | 292 | ||
292 | static struct clocksource clocksource_vmi = { | 293 | static struct clocksource clocksource_vmi = { |
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S index 3eba7f7bac05..0d860963f268 100644 --- a/arch/x86/kernel/vmlinux_32.lds.S +++ b/arch/x86/kernel/vmlinux_32.lds.S | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <asm-generic/vmlinux.lds.h> | 13 | #include <asm-generic/vmlinux.lds.h> |
14 | #include <asm/thread_info.h> | 14 | #include <asm/thread_info.h> |
15 | #include <asm/page.h> | 15 | #include <asm/page_types.h> |
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | #include <asm/boot.h> | 17 | #include <asm/boot.h> |
18 | 18 | ||
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S index 087a7f2c639b..fbfced6f6800 100644 --- a/arch/x86/kernel/vmlinux_64.lds.S +++ b/arch/x86/kernel/vmlinux_64.lds.S | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #include <asm-generic/vmlinux.lds.h> | 7 | #include <asm-generic/vmlinux.lds.h> |
8 | #include <asm/asm-offsets.h> | 8 | #include <asm/asm-offsets.h> |
9 | #include <asm/page.h> | 9 | #include <asm/page_types.h> |
10 | 10 | ||
11 | #undef i386 /* in case the preprocessor is a 32bit one */ | 11 | #undef i386 /* in case the preprocessor is a 32bit one */ |
12 | 12 | ||
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c index e665d1c623ca..72bd275a9b5c 100644 --- a/arch/x86/kvm/i8254.c +++ b/arch/x86/kvm/i8254.c | |||
@@ -207,7 +207,7 @@ static int __pit_timer_fn(struct kvm_kpit_state *ps) | |||
207 | hrtimer_add_expires_ns(&pt->timer, pt->period); | 207 | hrtimer_add_expires_ns(&pt->timer, pt->period); |
208 | pt->scheduled = hrtimer_get_expires_ns(&pt->timer); | 208 | pt->scheduled = hrtimer_get_expires_ns(&pt->timer); |
209 | if (pt->period) | 209 | if (pt->period) |
210 | ps->channels[0].count_load_time = hrtimer_get_expires(&pt->timer); | 210 | ps->channels[0].count_load_time = ktime_get(); |
211 | 211 | ||
212 | return (pt->period == 0 ? 0 : 1); | 212 | return (pt->period == 0 ? 0 : 1); |
213 | } | 213 | } |
diff --git a/arch/x86/kvm/irq.c b/arch/x86/kvm/irq.c index c019b8edcdb7..cf17ed52f6fb 100644 --- a/arch/x86/kvm/irq.c +++ b/arch/x86/kvm/irq.c | |||
@@ -87,13 +87,6 @@ void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu) | |||
87 | } | 87 | } |
88 | EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs); | 88 | EXPORT_SYMBOL_GPL(kvm_inject_pending_timer_irqs); |
89 | 89 | ||
90 | void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec) | ||
91 | { | ||
92 | kvm_apic_timer_intr_post(vcpu, vec); | ||
93 | /* TODO: PIT, RTC etc. */ | ||
94 | } | ||
95 | EXPORT_SYMBOL_GPL(kvm_timer_intr_post); | ||
96 | |||
97 | void __kvm_migrate_timers(struct kvm_vcpu *vcpu) | 90 | void __kvm_migrate_timers(struct kvm_vcpu *vcpu) |
98 | { | 91 | { |
99 | __kvm_migrate_apic_timer(vcpu); | 92 | __kvm_migrate_apic_timer(vcpu); |
diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h index 2bf32a03ceec..82579ee538d0 100644 --- a/arch/x86/kvm/irq.h +++ b/arch/x86/kvm/irq.h | |||
@@ -89,7 +89,6 @@ static inline int irqchip_in_kernel(struct kvm *kvm) | |||
89 | 89 | ||
90 | void kvm_pic_reset(struct kvm_kpic_state *s); | 90 | void kvm_pic_reset(struct kvm_kpic_state *s); |
91 | 91 | ||
92 | void kvm_timer_intr_post(struct kvm_vcpu *vcpu, int vec); | ||
93 | void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu); | 92 | void kvm_inject_pending_timer_irqs(struct kvm_vcpu *vcpu); |
94 | void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu); | 93 | void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu); |
95 | void kvm_apic_nmi_wd_deliver(struct kvm_vcpu *vcpu); | 94 | void kvm_apic_nmi_wd_deliver(struct kvm_vcpu *vcpu); |
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index afac68c0815c..f0b67f2cdd69 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c | |||
@@ -35,6 +35,12 @@ | |||
35 | #include "kvm_cache_regs.h" | 35 | #include "kvm_cache_regs.h" |
36 | #include "irq.h" | 36 | #include "irq.h" |
37 | 37 | ||
38 | #ifndef CONFIG_X86_64 | ||
39 | #define mod_64(x, y) ((x) - (y) * div64_u64(x, y)) | ||
40 | #else | ||
41 | #define mod_64(x, y) ((x) % (y)) | ||
42 | #endif | ||
43 | |||
38 | #define PRId64 "d" | 44 | #define PRId64 "d" |
39 | #define PRIx64 "llx" | 45 | #define PRIx64 "llx" |
40 | #define PRIu64 "u" | 46 | #define PRIu64 "u" |
@@ -511,52 +517,22 @@ static void apic_send_ipi(struct kvm_lapic *apic) | |||
511 | 517 | ||
512 | static u32 apic_get_tmcct(struct kvm_lapic *apic) | 518 | static u32 apic_get_tmcct(struct kvm_lapic *apic) |
513 | { | 519 | { |
514 | u64 counter_passed; | 520 | ktime_t remaining; |
515 | ktime_t passed, now; | 521 | s64 ns; |
516 | u32 tmcct; | 522 | u32 tmcct; |
517 | 523 | ||
518 | ASSERT(apic != NULL); | 524 | ASSERT(apic != NULL); |
519 | 525 | ||
520 | now = apic->timer.dev.base->get_time(); | ||
521 | tmcct = apic_get_reg(apic, APIC_TMICT); | ||
522 | |||
523 | /* if initial count is 0, current count should also be 0 */ | 526 | /* if initial count is 0, current count should also be 0 */ |
524 | if (tmcct == 0) | 527 | if (apic_get_reg(apic, APIC_TMICT) == 0) |
525 | return 0; | 528 | return 0; |
526 | 529 | ||
527 | if (unlikely(ktime_to_ns(now) <= | 530 | remaining = hrtimer_expires_remaining(&apic->timer.dev); |
528 | ktime_to_ns(apic->timer.last_update))) { | 531 | if (ktime_to_ns(remaining) < 0) |
529 | /* Wrap around */ | 532 | remaining = ktime_set(0, 0); |
530 | passed = ktime_add(( { | 533 | |
531 | (ktime_t) { | 534 | ns = mod_64(ktime_to_ns(remaining), apic->timer.period); |
532 | .tv64 = KTIME_MAX - | 535 | tmcct = div64_u64(ns, (APIC_BUS_CYCLE_NS * apic->timer.divide_count)); |
533 | (apic->timer.last_update).tv64}; } | ||
534 | ), now); | ||
535 | apic_debug("time elapsed\n"); | ||
536 | } else | ||
537 | passed = ktime_sub(now, apic->timer.last_update); | ||
538 | |||
539 | counter_passed = div64_u64(ktime_to_ns(passed), | ||
540 | (APIC_BUS_CYCLE_NS * apic->timer.divide_count)); | ||
541 | |||
542 | if (counter_passed > tmcct) { | ||
543 | if (unlikely(!apic_lvtt_period(apic))) { | ||
544 | /* one-shot timers stick at 0 until reset */ | ||
545 | tmcct = 0; | ||
546 | } else { | ||
547 | /* | ||
548 | * periodic timers reset to APIC_TMICT when they | ||
549 | * hit 0. The while loop simulates this happening N | ||
550 | * times. (counter_passed %= tmcct) would also work, | ||
551 | * but might be slower or not work on 32-bit?? | ||
552 | */ | ||
553 | while (counter_passed > tmcct) | ||
554 | counter_passed -= tmcct; | ||
555 | tmcct -= counter_passed; | ||
556 | } | ||
557 | } else { | ||
558 | tmcct -= counter_passed; | ||
559 | } | ||
560 | 536 | ||
561 | return tmcct; | 537 | return tmcct; |
562 | } | 538 | } |
@@ -653,8 +629,6 @@ static void start_apic_timer(struct kvm_lapic *apic) | |||
653 | { | 629 | { |
654 | ktime_t now = apic->timer.dev.base->get_time(); | 630 | ktime_t now = apic->timer.dev.base->get_time(); |
655 | 631 | ||
656 | apic->timer.last_update = now; | ||
657 | |||
658 | apic->timer.period = apic_get_reg(apic, APIC_TMICT) * | 632 | apic->timer.period = apic_get_reg(apic, APIC_TMICT) * |
659 | APIC_BUS_CYCLE_NS * apic->timer.divide_count; | 633 | APIC_BUS_CYCLE_NS * apic->timer.divide_count; |
660 | atomic_set(&apic->timer.pending, 0); | 634 | atomic_set(&apic->timer.pending, 0); |
@@ -1110,16 +1084,6 @@ void kvm_inject_apic_timer_irqs(struct kvm_vcpu *vcpu) | |||
1110 | } | 1084 | } |
1111 | } | 1085 | } |
1112 | 1086 | ||
1113 | void kvm_apic_timer_intr_post(struct kvm_vcpu *vcpu, int vec) | ||
1114 | { | ||
1115 | struct kvm_lapic *apic = vcpu->arch.apic; | ||
1116 | |||
1117 | if (apic && apic_lvt_vector(apic, APIC_LVTT) == vec) | ||
1118 | apic->timer.last_update = ktime_add_ns( | ||
1119 | apic->timer.last_update, | ||
1120 | apic->timer.period); | ||
1121 | } | ||
1122 | |||
1123 | int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu) | 1087 | int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu) |
1124 | { | 1088 | { |
1125 | int vector = kvm_apic_has_interrupt(vcpu); | 1089 | int vector = kvm_apic_has_interrupt(vcpu); |
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index 81858881287e..45ab6ee71209 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h | |||
@@ -12,7 +12,6 @@ struct kvm_lapic { | |||
12 | atomic_t pending; | 12 | atomic_t pending; |
13 | s64 period; /* unit: ns */ | 13 | s64 period; /* unit: ns */ |
14 | u32 divide_count; | 14 | u32 divide_count; |
15 | ktime_t last_update; | ||
16 | struct hrtimer dev; | 15 | struct hrtimer dev; |
17 | } timer; | 16 | } timer; |
18 | struct kvm_vcpu *vcpu; | 17 | struct kvm_vcpu *vcpu; |
@@ -42,7 +41,6 @@ void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data); | |||
42 | void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu); | 41 | void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu); |
43 | int kvm_lapic_enabled(struct kvm_vcpu *vcpu); | 42 | int kvm_lapic_enabled(struct kvm_vcpu *vcpu); |
44 | int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu); | 43 | int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu); |
45 | void kvm_apic_timer_intr_post(struct kvm_vcpu *vcpu, int vec); | ||
46 | 44 | ||
47 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); | 45 | void kvm_lapic_set_vapic_addr(struct kvm_vcpu *vcpu, gpa_t vapic_addr); |
48 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); | 46 | void kvm_lapic_sync_from_vapic(struct kvm_vcpu *vcpu); |
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 83f11c7474a1..2d4477c71473 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c | |||
@@ -1698,8 +1698,13 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *shadow_pte, | |||
1698 | if (largepage) | 1698 | if (largepage) |
1699 | spte |= PT_PAGE_SIZE_MASK; | 1699 | spte |= PT_PAGE_SIZE_MASK; |
1700 | if (mt_mask) { | 1700 | if (mt_mask) { |
1701 | mt_mask = get_memory_type(vcpu, gfn) << | 1701 | if (!kvm_is_mmio_pfn(pfn)) { |
1702 | kvm_x86_ops->get_mt_mask_shift(); | 1702 | mt_mask = get_memory_type(vcpu, gfn) << |
1703 | kvm_x86_ops->get_mt_mask_shift(); | ||
1704 | mt_mask |= VMX_EPT_IGMT_BIT; | ||
1705 | } else | ||
1706 | mt_mask = MTRR_TYPE_UNCACHABLE << | ||
1707 | kvm_x86_ops->get_mt_mask_shift(); | ||
1703 | spte |= mt_mask; | 1708 | spte |= mt_mask; |
1704 | } | 1709 | } |
1705 | 1710 | ||
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1452851ae258..a9e769e4e251 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1600,7 +1600,6 @@ static void svm_intr_assist(struct kvm_vcpu *vcpu) | |||
1600 | /* Okay, we can deliver the interrupt: grab it and update PIC state. */ | 1600 | /* Okay, we can deliver the interrupt: grab it and update PIC state. */ |
1601 | intr_vector = kvm_cpu_get_interrupt(vcpu); | 1601 | intr_vector = kvm_cpu_get_interrupt(vcpu); |
1602 | svm_inject_irq(svm, intr_vector); | 1602 | svm_inject_irq(svm, intr_vector); |
1603 | kvm_timer_intr_post(vcpu, intr_vector); | ||
1604 | out: | 1603 | out: |
1605 | update_cr8_intercept(vcpu); | 1604 | update_cr8_intercept(vcpu); |
1606 | } | 1605 | } |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6259d7467648..7611af576829 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -903,6 +903,7 @@ static int vmx_get_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 *pdata) | |||
903 | data = vmcs_readl(GUEST_SYSENTER_ESP); | 903 | data = vmcs_readl(GUEST_SYSENTER_ESP); |
904 | break; | 904 | break; |
905 | default: | 905 | default: |
906 | vmx_load_host_state(to_vmx(vcpu)); | ||
906 | msr = find_msr_entry(to_vmx(vcpu), msr_index); | 907 | msr = find_msr_entry(to_vmx(vcpu), msr_index); |
907 | if (msr) { | 908 | if (msr) { |
908 | data = msr->data; | 909 | data = msr->data; |
@@ -3285,7 +3286,6 @@ static void vmx_intr_assist(struct kvm_vcpu *vcpu) | |||
3285 | } | 3286 | } |
3286 | if (vcpu->arch.interrupt.pending) { | 3287 | if (vcpu->arch.interrupt.pending) { |
3287 | vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr); | 3288 | vmx_inject_irq(vcpu, vcpu->arch.interrupt.nr); |
3288 | kvm_timer_intr_post(vcpu, vcpu->arch.interrupt.nr); | ||
3289 | if (kvm_cpu_has_interrupt(vcpu)) | 3289 | if (kvm_cpu_has_interrupt(vcpu)) |
3290 | enable_irq_window(vcpu); | 3290 | enable_irq_window(vcpu); |
3291 | } | 3291 | } |
@@ -3687,8 +3687,7 @@ static int __init vmx_init(void) | |||
3687 | if (vm_need_ept()) { | 3687 | if (vm_need_ept()) { |
3688 | bypass_guest_pf = 0; | 3688 | bypass_guest_pf = 0; |
3689 | kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK | | 3689 | kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK | |
3690 | VMX_EPT_WRITABLE_MASK | | 3690 | VMX_EPT_WRITABLE_MASK); |
3691 | VMX_EPT_IGMT_BIT); | ||
3692 | kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull, | 3691 | kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull, |
3693 | VMX_EPT_EXECUTABLE_MASK, | 3692 | VMX_EPT_EXECUTABLE_MASK, |
3694 | VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT); | 3693 | VMX_EPT_DEFAULT_MT << VMX_EPT_MT_EPTE_SHIFT); |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cc17546a2406..758b7a155ae9 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -967,7 +967,6 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
967 | case KVM_CAP_MMU_SHADOW_CACHE_CONTROL: | 967 | case KVM_CAP_MMU_SHADOW_CACHE_CONTROL: |
968 | case KVM_CAP_SET_TSS_ADDR: | 968 | case KVM_CAP_SET_TSS_ADDR: |
969 | case KVM_CAP_EXT_CPUID: | 969 | case KVM_CAP_EXT_CPUID: |
970 | case KVM_CAP_CLOCKSOURCE: | ||
971 | case KVM_CAP_PIT: | 970 | case KVM_CAP_PIT: |
972 | case KVM_CAP_NOP_IO_DELAY: | 971 | case KVM_CAP_NOP_IO_DELAY: |
973 | case KVM_CAP_MP_STATE: | 972 | case KVM_CAP_MP_STATE: |
@@ -992,6 +991,9 @@ int kvm_dev_ioctl_check_extension(long ext) | |||
992 | case KVM_CAP_IOMMU: | 991 | case KVM_CAP_IOMMU: |
993 | r = iommu_found(); | 992 | r = iommu_found(); |
994 | break; | 993 | break; |
994 | case KVM_CAP_CLOCKSOURCE: | ||
995 | r = boot_cpu_has(X86_FEATURE_CONSTANT_TSC); | ||
996 | break; | ||
995 | default: | 997 | default: |
996 | r = 0; | 998 | r = 0; |
997 | break; | 999 | break; |
@@ -4127,9 +4129,13 @@ static void kvm_free_vcpus(struct kvm *kvm) | |||
4127 | 4129 | ||
4128 | } | 4130 | } |
4129 | 4131 | ||
4130 | void kvm_arch_destroy_vm(struct kvm *kvm) | 4132 | void kvm_arch_sync_events(struct kvm *kvm) |
4131 | { | 4133 | { |
4132 | kvm_free_all_assigned_devices(kvm); | 4134 | kvm_free_all_assigned_devices(kvm); |
4135 | } | ||
4136 | |||
4137 | void kvm_arch_destroy_vm(struct kvm *kvm) | ||
4138 | { | ||
4133 | kvm_iommu_unmap_guest(kvm); | 4139 | kvm_iommu_unmap_guest(kvm); |
4134 | kvm_free_pit(kvm); | 4140 | kvm_free_pit(kvm); |
4135 | kfree(kvm->arch.vpic); | 4141 | kfree(kvm->arch.vpic); |
diff --git a/arch/x86/lguest/Kconfig b/arch/x86/lguest/Kconfig index c70e12b1a637..8dab8f7844d3 100644 --- a/arch/x86/lguest/Kconfig +++ b/arch/x86/lguest/Kconfig | |||
@@ -3,7 +3,6 @@ config LGUEST_GUEST | |||
3 | select PARAVIRT | 3 | select PARAVIRT |
4 | depends on X86_32 | 4 | depends on X86_32 |
5 | depends on !X86_PAE | 5 | depends on !X86_PAE |
6 | depends on !X86_VOYAGER | ||
7 | select VIRTIO | 6 | select VIRTIO |
8 | select VIRTIO_RING | 7 | select VIRTIO_RING |
9 | select VIRTIO_CONSOLE | 8 | select VIRTIO_CONSOLE |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index da2e314f61b5..f3a5305b8adf 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -828,13 +828,14 @@ static u32 lguest_apic_safe_wait_icr_idle(void) | |||
828 | return 0; | 828 | return 0; |
829 | } | 829 | } |
830 | 830 | ||
831 | static struct apic_ops lguest_basic_apic_ops = { | 831 | static void set_lguest_basic_apic_ops(void) |
832 | .read = lguest_apic_read, | 832 | { |
833 | .write = lguest_apic_write, | 833 | apic->read = lguest_apic_read; |
834 | .icr_read = lguest_apic_icr_read, | 834 | apic->write = lguest_apic_write; |
835 | .icr_write = lguest_apic_icr_write, | 835 | apic->icr_read = lguest_apic_icr_read; |
836 | .wait_icr_idle = lguest_apic_wait_icr_idle, | 836 | apic->icr_write = lguest_apic_icr_write; |
837 | .safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle, | 837 | apic->wait_icr_idle = lguest_apic_wait_icr_idle; |
838 | apic->safe_wait_icr_idle = lguest_apic_safe_wait_icr_idle; | ||
838 | }; | 839 | }; |
839 | #endif | 840 | #endif |
840 | 841 | ||
@@ -1035,7 +1036,7 @@ __init void lguest_init(void) | |||
1035 | 1036 | ||
1036 | #ifdef CONFIG_X86_LOCAL_APIC | 1037 | #ifdef CONFIG_X86_LOCAL_APIC |
1037 | /* apic read/write intercepts */ | 1038 | /* apic read/write intercepts */ |
1038 | apic_ops = &lguest_basic_apic_ops; | 1039 | set_lguest_basic_apic_ops(); |
1039 | #endif | 1040 | #endif |
1040 | 1041 | ||
1041 | /* time operations */ | 1042 | /* time operations */ |
diff --git a/arch/x86/lib/getuser.S b/arch/x86/lib/getuser.S index ad374003742f..51f1504cddd9 100644 --- a/arch/x86/lib/getuser.S +++ b/arch/x86/lib/getuser.S | |||
@@ -28,7 +28,7 @@ | |||
28 | 28 | ||
29 | #include <linux/linkage.h> | 29 | #include <linux/linkage.h> |
30 | #include <asm/dwarf2.h> | 30 | #include <asm/dwarf2.h> |
31 | #include <asm/page.h> | 31 | #include <asm/page_types.h> |
32 | #include <asm/errno.h> | 32 | #include <asm/errno.h> |
33 | #include <asm/asm-offsets.h> | 33 | #include <asm/asm-offsets.h> |
34 | #include <asm/thread_info.h> | 34 | #include <asm/thread_info.h> |
diff --git a/arch/x86/mach-default/Makefile b/arch/x86/mach-default/Makefile deleted file mode 100644 index 012fe34459e6..000000000000 --- a/arch/x86/mach-default/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o | ||
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c deleted file mode 100644 index a265a7c63190..000000000000 --- a/arch/x86/mach-default/setup.c +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | /* | ||
2 | * Machine specific setup for generic | ||
3 | */ | ||
4 | |||
5 | #include <linux/smp.h> | ||
6 | #include <linux/init.h> | ||
7 | #include <linux/interrupt.h> | ||
8 | #include <asm/acpi.h> | ||
9 | #include <asm/arch_hooks.h> | ||
10 | #include <asm/e820.h> | ||
11 | #include <asm/setup.h> | ||
12 | |||
13 | #include <mach_ipi.h> | ||
14 | |||
15 | #ifdef CONFIG_HOTPLUG_CPU | ||
16 | #define DEFAULT_SEND_IPI (1) | ||
17 | #else | ||
18 | #define DEFAULT_SEND_IPI (0) | ||
19 | #endif | ||
20 | |||
21 | int no_broadcast = DEFAULT_SEND_IPI; | ||
22 | |||
23 | /** | ||
24 | * pre_intr_init_hook - initialisation prior to setting up interrupt vectors | ||
25 | * | ||
26 | * Description: | ||
27 | * Perform any necessary interrupt initialisation prior to setting up | ||
28 | * the "ordinary" interrupt call gates. For legacy reasons, the ISA | ||
29 | * interrupts should be initialised here if the machine emulates a PC | ||
30 | * in any way. | ||
31 | **/ | ||
32 | void __init pre_intr_init_hook(void) | ||
33 | { | ||
34 | if (x86_quirks->arch_pre_intr_init) { | ||
35 | if (x86_quirks->arch_pre_intr_init()) | ||
36 | return; | ||
37 | } | ||
38 | init_ISA_irqs(); | ||
39 | } | ||
40 | |||
41 | /* | ||
42 | * IRQ2 is cascade interrupt to second interrupt controller | ||
43 | */ | ||
44 | static struct irqaction irq2 = { | ||
45 | .handler = no_action, | ||
46 | .mask = CPU_MASK_NONE, | ||
47 | .name = "cascade", | ||
48 | }; | ||
49 | |||
50 | /** | ||
51 | * intr_init_hook - post gate setup interrupt initialisation | ||
52 | * | ||
53 | * Description: | ||
54 | * Fill in any interrupts that may have been left out by the general | ||
55 | * init_IRQ() routine. interrupts having to do with the machine rather | ||
56 | * than the devices on the I/O bus (like APIC interrupts in intel MP | ||
57 | * systems) are started here. | ||
58 | **/ | ||
59 | void __init intr_init_hook(void) | ||
60 | { | ||
61 | if (x86_quirks->arch_intr_init) { | ||
62 | if (x86_quirks->arch_intr_init()) | ||
63 | return; | ||
64 | } | ||
65 | if (!acpi_ioapic) | ||
66 | setup_irq(2, &irq2); | ||
67 | |||
68 | } | ||
69 | |||
70 | /** | ||
71 | * pre_setup_arch_hook - hook called prior to any setup_arch() execution | ||
72 | * | ||
73 | * Description: | ||
74 | * generally used to activate any machine specific identification | ||
75 | * routines that may be needed before setup_arch() runs. On Voyager | ||
76 | * this is used to get the board revision and type. | ||
77 | **/ | ||
78 | void __init pre_setup_arch_hook(void) | ||
79 | { | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * trap_init_hook - initialise system specific traps | ||
84 | * | ||
85 | * Description: | ||
86 | * Called as the final act of trap_init(). Used in VISWS to initialise | ||
87 | * the various board specific APIC traps. | ||
88 | **/ | ||
89 | void __init trap_init_hook(void) | ||
90 | { | ||
91 | if (x86_quirks->arch_trap_init) { | ||
92 | if (x86_quirks->arch_trap_init()) | ||
93 | return; | ||
94 | } | ||
95 | } | ||
96 | |||
97 | static struct irqaction irq0 = { | ||
98 | .handler = timer_interrupt, | ||
99 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, | ||
100 | .mask = CPU_MASK_NONE, | ||
101 | .name = "timer" | ||
102 | }; | ||
103 | |||
104 | /** | ||
105 | * pre_time_init_hook - do any specific initialisations before. | ||
106 | * | ||
107 | **/ | ||
108 | void __init pre_time_init_hook(void) | ||
109 | { | ||
110 | if (x86_quirks->arch_pre_time_init) | ||
111 | x86_quirks->arch_pre_time_init(); | ||
112 | } | ||
113 | |||
114 | /** | ||
115 | * time_init_hook - do any specific initialisations for the system timer. | ||
116 | * | ||
117 | * Description: | ||
118 | * Must plug the system timer interrupt source at HZ into the IRQ listed | ||
119 | * in irq_vectors.h:TIMER_IRQ | ||
120 | **/ | ||
121 | void __init time_init_hook(void) | ||
122 | { | ||
123 | if (x86_quirks->arch_time_init) { | ||
124 | /* | ||
125 | * A nonzero return code does not mean failure, it means | ||
126 | * that the architecture quirk does not want any | ||
127 | * generic (timer) setup to be performed after this: | ||
128 | */ | ||
129 | if (x86_quirks->arch_time_init()) | ||
130 | return; | ||
131 | } | ||
132 | |||
133 | irq0.mask = cpumask_of_cpu(0); | ||
134 | setup_irq(0, &irq0); | ||
135 | } | ||
136 | |||
137 | #ifdef CONFIG_MCA | ||
138 | /** | ||
139 | * mca_nmi_hook - hook into MCA specific NMI chain | ||
140 | * | ||
141 | * Description: | ||
142 | * The MCA (Microchannel Architecture) has an NMI chain for NMI sources | ||
143 | * along the MCA bus. Use this to hook into that chain if you will need | ||
144 | * it. | ||
145 | **/ | ||
146 | void mca_nmi_hook(void) | ||
147 | { | ||
148 | /* | ||
149 | * If I recall correctly, there's a whole bunch of other things that | ||
150 | * we can do to check for NMI problems, but that's all I know about | ||
151 | * at the moment. | ||
152 | */ | ||
153 | pr_warning("NMI generated from unknown source!\n"); | ||
154 | } | ||
155 | #endif | ||
156 | |||
157 | static __init int no_ipi_broadcast(char *str) | ||
158 | { | ||
159 | get_option(&str, &no_broadcast); | ||
160 | pr_info("Using %s mode\n", | ||
161 | no_broadcast ? "No IPI Broadcast" : "IPI Broadcast"); | ||
162 | return 1; | ||
163 | } | ||
164 | __setup("no_ipi_broadcast=", no_ipi_broadcast); | ||
165 | |||
166 | static int __init print_ipi_mode(void) | ||
167 | { | ||
168 | pr_info("Using IPI %s mode\n", | ||
169 | no_broadcast ? "No-Shortcut" : "Shortcut"); | ||
170 | return 0; | ||
171 | } | ||
172 | |||
173 | late_initcall(print_ipi_mode); | ||
174 | |||
diff --git a/arch/x86/mach-generic/Makefile b/arch/x86/mach-generic/Makefile deleted file mode 100644 index 6730f4e7c744..000000000000 --- a/arch/x86/mach-generic/Makefile +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the generic architecture | ||
3 | # | ||
4 | |||
5 | EXTRA_CFLAGS := -Iarch/x86/kernel | ||
6 | |||
7 | obj-y := probe.o default.o | ||
8 | obj-$(CONFIG_X86_NUMAQ) += numaq.o | ||
9 | obj-$(CONFIG_X86_SUMMIT) += summit.o | ||
10 | obj-$(CONFIG_X86_BIGSMP) += bigsmp.o | ||
11 | obj-$(CONFIG_X86_ES7000) += es7000.o | ||
diff --git a/arch/x86/mach-generic/bigsmp.c b/arch/x86/mach-generic/bigsmp.c deleted file mode 100644 index bc4c7840b2a8..000000000000 --- a/arch/x86/mach-generic/bigsmp.c +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | /* | ||
2 | * APIC driver for "bigsmp" XAPIC machines with more than 8 virtual CPUs. | ||
3 | * Drives the local APIC in "clustered mode". | ||
4 | */ | ||
5 | #define APIC_DEFINITION 1 | ||
6 | #include <linux/threads.h> | ||
7 | #include <linux/cpumask.h> | ||
8 | #include <asm/mpspec.h> | ||
9 | #include <asm/genapic.h> | ||
10 | #include <asm/fixmap.h> | ||
11 | #include <asm/apicdef.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/dmi.h> | ||
15 | #include <asm/bigsmp/apicdef.h> | ||
16 | #include <linux/smp.h> | ||
17 | #include <asm/bigsmp/apic.h> | ||
18 | #include <asm/bigsmp/ipi.h> | ||
19 | #include <asm/mach-default/mach_mpparse.h> | ||
20 | #include <asm/mach-default/mach_wakecpu.h> | ||
21 | |||
22 | static int dmi_bigsmp; /* can be set by dmi scanners */ | ||
23 | |||
24 | static int hp_ht_bigsmp(const struct dmi_system_id *d) | ||
25 | { | ||
26 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); | ||
27 | dmi_bigsmp = 1; | ||
28 | return 0; | ||
29 | } | ||
30 | |||
31 | |||
32 | static const struct dmi_system_id bigsmp_dmi_table[] = { | ||
33 | { hp_ht_bigsmp, "HP ProLiant DL760 G2", | ||
34 | { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), | ||
35 | DMI_MATCH(DMI_BIOS_VERSION, "P44-"),} | ||
36 | }, | ||
37 | |||
38 | { hp_ht_bigsmp, "HP ProLiant DL740", | ||
39 | { DMI_MATCH(DMI_BIOS_VENDOR, "HP"), | ||
40 | DMI_MATCH(DMI_BIOS_VERSION, "P47-"),} | ||
41 | }, | ||
42 | { } | ||
43 | }; | ||
44 | |||
45 | static void vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
46 | { | ||
47 | cpus_clear(*retmask); | ||
48 | cpu_set(cpu, *retmask); | ||
49 | } | ||
50 | |||
51 | static int probe_bigsmp(void) | ||
52 | { | ||
53 | if (def_to_bigsmp) | ||
54 | dmi_bigsmp = 1; | ||
55 | else | ||
56 | dmi_check_system(bigsmp_dmi_table); | ||
57 | return dmi_bigsmp; | ||
58 | } | ||
59 | |||
60 | struct genapic apic_bigsmp = APIC_INIT("bigsmp", probe_bigsmp); | ||
diff --git a/arch/x86/mach-generic/default.c b/arch/x86/mach-generic/default.c deleted file mode 100644 index e63a4a76d8cd..000000000000 --- a/arch/x86/mach-generic/default.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Default generic APIC driver. This handles up to 8 CPUs. | ||
3 | */ | ||
4 | #define APIC_DEFINITION 1 | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/cpumask.h> | ||
7 | #include <asm/mpspec.h> | ||
8 | #include <asm/mach-default/mach_apicdef.h> | ||
9 | #include <asm/genapic.h> | ||
10 | #include <asm/fixmap.h> | ||
11 | #include <asm/apicdef.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/string.h> | ||
14 | #include <linux/smp.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <asm/mach-default/mach_apic.h> | ||
17 | #include <asm/mach-default/mach_ipi.h> | ||
18 | #include <asm/mach-default/mach_mpparse.h> | ||
19 | #include <asm/mach-default/mach_wakecpu.h> | ||
20 | |||
21 | /* should be called last. */ | ||
22 | static int probe_default(void) | ||
23 | { | ||
24 | return 1; | ||
25 | } | ||
26 | |||
27 | struct genapic apic_default = APIC_INIT("default", probe_default); | ||
diff --git a/arch/x86/mach-generic/es7000.c b/arch/x86/mach-generic/es7000.c deleted file mode 100644 index c2ded1448024..000000000000 --- a/arch/x86/mach-generic/es7000.c +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | /* | ||
2 | * APIC driver for the Unisys ES7000 chipset. | ||
3 | */ | ||
4 | #define APIC_DEFINITION 1 | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/cpumask.h> | ||
7 | #include <asm/mpspec.h> | ||
8 | #include <asm/genapic.h> | ||
9 | #include <asm/fixmap.h> | ||
10 | #include <asm/apicdef.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/string.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/es7000/apicdef.h> | ||
15 | #include <linux/smp.h> | ||
16 | #include <asm/es7000/apic.h> | ||
17 | #include <asm/es7000/ipi.h> | ||
18 | #include <asm/es7000/mpparse.h> | ||
19 | #include <asm/mach-default/mach_wakecpu.h> | ||
20 | |||
21 | void __init es7000_update_genapic_to_cluster(void) | ||
22 | { | ||
23 | genapic->target_cpus = target_cpus_cluster; | ||
24 | genapic->int_delivery_mode = INT_DELIVERY_MODE_CLUSTER; | ||
25 | genapic->int_dest_mode = INT_DEST_MODE_CLUSTER; | ||
26 | genapic->no_balance_irq = NO_BALANCE_IRQ_CLUSTER; | ||
27 | |||
28 | genapic->init_apic_ldr = init_apic_ldr_cluster; | ||
29 | |||
30 | genapic->cpu_mask_to_apicid = cpu_mask_to_apicid_cluster; | ||
31 | } | ||
32 | |||
33 | static int probe_es7000(void) | ||
34 | { | ||
35 | /* probed later in mptable/ACPI hooks */ | ||
36 | return 0; | ||
37 | } | ||
38 | |||
39 | extern void es7000_sw_apic(void); | ||
40 | static void __init enable_apic_mode(void) | ||
41 | { | ||
42 | es7000_sw_apic(); | ||
43 | return; | ||
44 | } | ||
45 | |||
46 | static __init int | ||
47 | mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
48 | { | ||
49 | if (mpc->oemptr) { | ||
50 | struct mpc_oemtable *oem_table = | ||
51 | (struct mpc_oemtable *)mpc->oemptr; | ||
52 | if (!strncmp(oem, "UNISYS", 6)) | ||
53 | return parse_unisys_oem((char *)oem_table); | ||
54 | } | ||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | #ifdef CONFIG_ACPI | ||
59 | /* Hook from generic ACPI tables.c */ | ||
60 | static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
61 | { | ||
62 | unsigned long oem_addr = 0; | ||
63 | int check_dsdt; | ||
64 | int ret = 0; | ||
65 | |||
66 | /* check dsdt at first to avoid clear fix_map for oem_addr */ | ||
67 | check_dsdt = es7000_check_dsdt(); | ||
68 | |||
69 | if (!find_unisys_acpi_oem_table(&oem_addr)) { | ||
70 | if (check_dsdt) | ||
71 | ret = parse_unisys_oem((char *)oem_addr); | ||
72 | else { | ||
73 | setup_unisys(); | ||
74 | ret = 1; | ||
75 | } | ||
76 | /* | ||
77 | * we need to unmap it | ||
78 | */ | ||
79 | unmap_unisys_acpi_oem_table(oem_addr); | ||
80 | } | ||
81 | return ret; | ||
82 | } | ||
83 | #else | ||
84 | static int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
85 | { | ||
86 | return 0; | ||
87 | } | ||
88 | #endif | ||
89 | |||
90 | static void vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
91 | { | ||
92 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
93 | * specified in the interrupt destination when using lowest | ||
94 | * priority interrupt delivery mode. | ||
95 | * | ||
96 | * In particular there was a hyperthreading cpu observed to | ||
97 | * deliver interrupts to the wrong hyperthread when only one | ||
98 | * hyperthread was specified in the interrupt desitination. | ||
99 | */ | ||
100 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | ||
101 | } | ||
102 | |||
103 | struct genapic __initdata_refok apic_es7000 = APIC_INIT("es7000", probe_es7000); | ||
diff --git a/arch/x86/mach-generic/numaq.c b/arch/x86/mach-generic/numaq.c deleted file mode 100644 index 3679e2255645..000000000000 --- a/arch/x86/mach-generic/numaq.c +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | /* | ||
2 | * APIC driver for the IBM NUMAQ chipset. | ||
3 | */ | ||
4 | #define APIC_DEFINITION 1 | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/cpumask.h> | ||
7 | #include <asm/mpspec.h> | ||
8 | #include <asm/genapic.h> | ||
9 | #include <asm/fixmap.h> | ||
10 | #include <asm/apicdef.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/string.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/numaq/apicdef.h> | ||
15 | #include <linux/smp.h> | ||
16 | #include <asm/numaq/apic.h> | ||
17 | #include <asm/numaq/ipi.h> | ||
18 | #include <asm/numaq/mpparse.h> | ||
19 | #include <asm/numaq/wakecpu.h> | ||
20 | #include <asm/numaq.h> | ||
21 | |||
22 | static int mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
23 | { | ||
24 | numaq_mps_oem_check(mpc, oem, productid); | ||
25 | return found_numaq; | ||
26 | } | ||
27 | |||
28 | static int probe_numaq(void) | ||
29 | { | ||
30 | /* already know from get_memcfg_numaq() */ | ||
31 | return found_numaq; | ||
32 | } | ||
33 | |||
34 | /* Hook from generic ACPI tables.c */ | ||
35 | static int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
36 | { | ||
37 | return 0; | ||
38 | } | ||
39 | |||
40 | static void vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
41 | { | ||
42 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
43 | * specified in the interrupt destination when using lowest | ||
44 | * priority interrupt delivery mode. | ||
45 | * | ||
46 | * In particular there was a hyperthreading cpu observed to | ||
47 | * deliver interrupts to the wrong hyperthread when only one | ||
48 | * hyperthread was specified in the interrupt desitination. | ||
49 | */ | ||
50 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | ||
51 | } | ||
52 | |||
53 | struct genapic apic_numaq = APIC_INIT("NUMAQ", probe_numaq); | ||
diff --git a/arch/x86/mach-generic/probe.c b/arch/x86/mach-generic/probe.c deleted file mode 100644 index 15a38daef1a8..000000000000 --- a/arch/x86/mach-generic/probe.c +++ /dev/null | |||
@@ -1,152 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2003 Andi Kleen, SuSE Labs. | ||
3 | * Subject to the GNU Public License, v.2 | ||
4 | * | ||
5 | * Generic x86 APIC driver probe layer. | ||
6 | */ | ||
7 | #include <linux/threads.h> | ||
8 | #include <linux/cpumask.h> | ||
9 | #include <linux/string.h> | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/ctype.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/errno.h> | ||
14 | #include <asm/fixmap.h> | ||
15 | #include <asm/mpspec.h> | ||
16 | #include <asm/apicdef.h> | ||
17 | #include <asm/genapic.h> | ||
18 | #include <asm/setup.h> | ||
19 | |||
20 | extern struct genapic apic_numaq; | ||
21 | extern struct genapic apic_summit; | ||
22 | extern struct genapic apic_bigsmp; | ||
23 | extern struct genapic apic_es7000; | ||
24 | extern struct genapic apic_default; | ||
25 | |||
26 | struct genapic *genapic = &apic_default; | ||
27 | |||
28 | static struct genapic *apic_probe[] __initdata = { | ||
29 | #ifdef CONFIG_X86_NUMAQ | ||
30 | &apic_numaq, | ||
31 | #endif | ||
32 | #ifdef CONFIG_X86_SUMMIT | ||
33 | &apic_summit, | ||
34 | #endif | ||
35 | #ifdef CONFIG_X86_BIGSMP | ||
36 | &apic_bigsmp, | ||
37 | #endif | ||
38 | #ifdef CONFIG_X86_ES7000 | ||
39 | &apic_es7000, | ||
40 | #endif | ||
41 | &apic_default, /* must be last */ | ||
42 | NULL, | ||
43 | }; | ||
44 | |||
45 | static int cmdline_apic __initdata; | ||
46 | static int __init parse_apic(char *arg) | ||
47 | { | ||
48 | int i; | ||
49 | |||
50 | if (!arg) | ||
51 | return -EINVAL; | ||
52 | |||
53 | for (i = 0; apic_probe[i]; i++) { | ||
54 | if (!strcmp(apic_probe[i]->name, arg)) { | ||
55 | genapic = apic_probe[i]; | ||
56 | cmdline_apic = 1; | ||
57 | return 0; | ||
58 | } | ||
59 | } | ||
60 | |||
61 | if (x86_quirks->update_genapic) | ||
62 | x86_quirks->update_genapic(); | ||
63 | |||
64 | /* Parsed again by __setup for debug/verbose */ | ||
65 | return 0; | ||
66 | } | ||
67 | early_param("apic", parse_apic); | ||
68 | |||
69 | void __init generic_bigsmp_probe(void) | ||
70 | { | ||
71 | #ifdef CONFIG_X86_BIGSMP | ||
72 | /* | ||
73 | * This routine is used to switch to bigsmp mode when | ||
74 | * - There is no apic= option specified by the user | ||
75 | * - generic_apic_probe() has chosen apic_default as the sub_arch | ||
76 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support | ||
77 | */ | ||
78 | |||
79 | if (!cmdline_apic && genapic == &apic_default) { | ||
80 | if (apic_bigsmp.probe()) { | ||
81 | genapic = &apic_bigsmp; | ||
82 | if (x86_quirks->update_genapic) | ||
83 | x86_quirks->update_genapic(); | ||
84 | printk(KERN_INFO "Overriding APIC driver with %s\n", | ||
85 | genapic->name); | ||
86 | } | ||
87 | } | ||
88 | #endif | ||
89 | } | ||
90 | |||
91 | void __init generic_apic_probe(void) | ||
92 | { | ||
93 | if (!cmdline_apic) { | ||
94 | int i; | ||
95 | for (i = 0; apic_probe[i]; i++) { | ||
96 | if (apic_probe[i]->probe()) { | ||
97 | genapic = apic_probe[i]; | ||
98 | break; | ||
99 | } | ||
100 | } | ||
101 | /* Not visible without early console */ | ||
102 | if (!apic_probe[i]) | ||
103 | panic("Didn't find an APIC driver"); | ||
104 | |||
105 | if (x86_quirks->update_genapic) | ||
106 | x86_quirks->update_genapic(); | ||
107 | } | ||
108 | printk(KERN_INFO "Using APIC driver %s\n", genapic->name); | ||
109 | } | ||
110 | |||
111 | /* These functions can switch the APIC even after the initial ->probe() */ | ||
112 | |||
113 | int __init mps_oem_check(struct mpc_table *mpc, char *oem, char *productid) | ||
114 | { | ||
115 | int i; | ||
116 | for (i = 0; apic_probe[i]; ++i) { | ||
117 | if (apic_probe[i]->mps_oem_check(mpc, oem, productid)) { | ||
118 | if (!cmdline_apic) { | ||
119 | genapic = apic_probe[i]; | ||
120 | if (x86_quirks->update_genapic) | ||
121 | x86_quirks->update_genapic(); | ||
122 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", | ||
123 | genapic->name); | ||
124 | } | ||
125 | return 1; | ||
126 | } | ||
127 | } | ||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | ||
132 | { | ||
133 | int i; | ||
134 | for (i = 0; apic_probe[i]; ++i) { | ||
135 | if (apic_probe[i]->acpi_madt_oem_check(oem_id, oem_table_id)) { | ||
136 | if (!cmdline_apic) { | ||
137 | genapic = apic_probe[i]; | ||
138 | if (x86_quirks->update_genapic) | ||
139 | x86_quirks->update_genapic(); | ||
140 | printk(KERN_INFO "Switched to APIC driver `%s'.\n", | ||
141 | genapic->name); | ||
142 | } | ||
143 | return 1; | ||
144 | } | ||
145 | } | ||
146 | return 0; | ||
147 | } | ||
148 | |||
149 | int hard_smp_processor_id(void) | ||
150 | { | ||
151 | return genapic->get_apic_id(*(unsigned long *)(APIC_BASE+APIC_ID)); | ||
152 | } | ||
diff --git a/arch/x86/mach-generic/summit.c b/arch/x86/mach-generic/summit.c deleted file mode 100644 index 2821ffc188b5..000000000000 --- a/arch/x86/mach-generic/summit.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * APIC driver for the IBM "Summit" chipset. | ||
3 | */ | ||
4 | #define APIC_DEFINITION 1 | ||
5 | #include <linux/threads.h> | ||
6 | #include <linux/cpumask.h> | ||
7 | #include <asm/mpspec.h> | ||
8 | #include <asm/genapic.h> | ||
9 | #include <asm/fixmap.h> | ||
10 | #include <asm/apicdef.h> | ||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/string.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <asm/summit/apicdef.h> | ||
15 | #include <linux/smp.h> | ||
16 | #include <asm/summit/apic.h> | ||
17 | #include <asm/summit/ipi.h> | ||
18 | #include <asm/summit/mpparse.h> | ||
19 | #include <asm/mach-default/mach_wakecpu.h> | ||
20 | |||
21 | static int probe_summit(void) | ||
22 | { | ||
23 | /* probed later in mptable/ACPI hooks */ | ||
24 | return 0; | ||
25 | } | ||
26 | |||
27 | static void vector_allocation_domain(int cpu, cpumask_t *retmask) | ||
28 | { | ||
29 | /* Careful. Some cpus do not strictly honor the set of cpus | ||
30 | * specified in the interrupt destination when using lowest | ||
31 | * priority interrupt delivery mode. | ||
32 | * | ||
33 | * In particular there was a hyperthreading cpu observed to | ||
34 | * deliver interrupts to the wrong hyperthread when only one | ||
35 | * hyperthread was specified in the interrupt desitination. | ||
36 | */ | ||
37 | *retmask = (cpumask_t){ { [0] = APIC_ALL_CPUS, } }; | ||
38 | } | ||
39 | |||
40 | struct genapic apic_summit = APIC_INIT("summit", probe_summit); | ||
diff --git a/arch/x86/mach-rdc321x/Makefile b/arch/x86/mach-rdc321x/Makefile deleted file mode 100644 index 8325b4ca431c..000000000000 --- a/arch/x86/mach-rdc321x/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the RDC321x specific parts of the kernel | ||
3 | # | ||
4 | obj-$(CONFIG_X86_RDC321X) := gpio.o platform.o | ||
5 | |||
diff --git a/arch/x86/mach-rdc321x/gpio.c b/arch/x86/mach-rdc321x/gpio.c deleted file mode 100644 index 247f33d3a407..000000000000 --- a/arch/x86/mach-rdc321x/gpio.c +++ /dev/null | |||
@@ -1,194 +0,0 @@ | |||
1 | /* | ||
2 | * GPIO support for RDC SoC R3210/R8610 | ||
3 | * | ||
4 | * Copyright (C) 2007, Florian Fainelli <florian@openwrt.org> | ||
5 | * Copyright (C) 2008, Volker Weiss <dev@tintuc.de> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | |||
24 | #include <linux/spinlock.h> | ||
25 | #include <linux/io.h> | ||
26 | #include <linux/types.h> | ||
27 | #include <linux/module.h> | ||
28 | |||
29 | #include <asm/gpio.h> | ||
30 | #include <asm/mach-rdc321x/rdc321x_defs.h> | ||
31 | |||
32 | |||
33 | /* spin lock to protect our private copy of GPIO data register plus | ||
34 | the access to PCI conf registers. */ | ||
35 | static DEFINE_SPINLOCK(gpio_lock); | ||
36 | |||
37 | /* copy of GPIO data registers */ | ||
38 | static u32 gpio_data_reg1; | ||
39 | static u32 gpio_data_reg2; | ||
40 | |||
41 | static u32 gpio_request_data[2]; | ||
42 | |||
43 | |||
44 | static inline void rdc321x_conf_write(unsigned addr, u32 value) | ||
45 | { | ||
46 | outl((1 << 31) | (7 << 11) | addr, RDC3210_CFGREG_ADDR); | ||
47 | outl(value, RDC3210_CFGREG_DATA); | ||
48 | } | ||
49 | |||
50 | static inline void rdc321x_conf_or(unsigned addr, u32 value) | ||
51 | { | ||
52 | outl((1 << 31) | (7 << 11) | addr, RDC3210_CFGREG_ADDR); | ||
53 | value |= inl(RDC3210_CFGREG_DATA); | ||
54 | outl(value, RDC3210_CFGREG_DATA); | ||
55 | } | ||
56 | |||
57 | static inline u32 rdc321x_conf_read(unsigned addr) | ||
58 | { | ||
59 | outl((1 << 31) | (7 << 11) | addr, RDC3210_CFGREG_ADDR); | ||
60 | |||
61 | return inl(RDC3210_CFGREG_DATA); | ||
62 | } | ||
63 | |||
64 | /* configure pin as GPIO */ | ||
65 | static void rdc321x_configure_gpio(unsigned gpio) | ||
66 | { | ||
67 | unsigned long flags; | ||
68 | |||
69 | spin_lock_irqsave(&gpio_lock, flags); | ||
70 | rdc321x_conf_or(gpio < 32 | ||
71 | ? RDC321X_GPIO_CTRL_REG1 : RDC321X_GPIO_CTRL_REG2, | ||
72 | 1 << (gpio & 0x1f)); | ||
73 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
74 | } | ||
75 | |||
76 | /* initially setup the 2 copies of the gpio data registers. | ||
77 | This function must be called by the platform setup code. */ | ||
78 | void __init rdc321x_gpio_setup() | ||
79 | { | ||
80 | /* this might not be, what others (BIOS, bootloader, etc.) | ||
81 | wrote to these registers before, but it's a good guess. Still | ||
82 | better than just using 0xffffffff. */ | ||
83 | |||
84 | gpio_data_reg1 = rdc321x_conf_read(RDC321X_GPIO_DATA_REG1); | ||
85 | gpio_data_reg2 = rdc321x_conf_read(RDC321X_GPIO_DATA_REG2); | ||
86 | } | ||
87 | |||
88 | /* determine, if gpio number is valid */ | ||
89 | static inline int rdc321x_is_gpio(unsigned gpio) | ||
90 | { | ||
91 | return gpio <= RDC321X_MAX_GPIO; | ||
92 | } | ||
93 | |||
94 | /* request GPIO */ | ||
95 | int rdc_gpio_request(unsigned gpio, const char *label) | ||
96 | { | ||
97 | unsigned long flags; | ||
98 | |||
99 | if (!rdc321x_is_gpio(gpio)) | ||
100 | return -EINVAL; | ||
101 | |||
102 | spin_lock_irqsave(&gpio_lock, flags); | ||
103 | if (gpio_request_data[(gpio & 0x20) ? 1 : 0] & (1 << (gpio & 0x1f))) | ||
104 | goto inuse; | ||
105 | gpio_request_data[(gpio & 0x20) ? 1 : 0] |= (1 << (gpio & 0x1f)); | ||
106 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
107 | |||
108 | return 0; | ||
109 | inuse: | ||
110 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
111 | return -EINVAL; | ||
112 | } | ||
113 | EXPORT_SYMBOL(rdc_gpio_request); | ||
114 | |||
115 | /* release previously-claimed GPIO */ | ||
116 | void rdc_gpio_free(unsigned gpio) | ||
117 | { | ||
118 | unsigned long flags; | ||
119 | |||
120 | if (!rdc321x_is_gpio(gpio)) | ||
121 | return; | ||
122 | |||
123 | spin_lock_irqsave(&gpio_lock, flags); | ||
124 | gpio_request_data[(gpio & 0x20) ? 1 : 0] &= ~(1 << (gpio & 0x1f)); | ||
125 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
126 | } | ||
127 | EXPORT_SYMBOL(rdc_gpio_free); | ||
128 | |||
129 | /* read GPIO pin */ | ||
130 | int rdc_gpio_get_value(unsigned gpio) | ||
131 | { | ||
132 | u32 reg; | ||
133 | unsigned long flags; | ||
134 | |||
135 | spin_lock_irqsave(&gpio_lock, flags); | ||
136 | reg = rdc321x_conf_read(gpio < 32 | ||
137 | ? RDC321X_GPIO_DATA_REG1 : RDC321X_GPIO_DATA_REG2); | ||
138 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
139 | |||
140 | return (1 << (gpio & 0x1f)) & reg ? 1 : 0; | ||
141 | } | ||
142 | EXPORT_SYMBOL(rdc_gpio_get_value); | ||
143 | |||
144 | /* set GPIO pin to value */ | ||
145 | void rdc_gpio_set_value(unsigned gpio, int value) | ||
146 | { | ||
147 | unsigned long flags; | ||
148 | u32 reg; | ||
149 | |||
150 | reg = 1 << (gpio & 0x1f); | ||
151 | if (gpio < 32) { | ||
152 | spin_lock_irqsave(&gpio_lock, flags); | ||
153 | if (value) | ||
154 | gpio_data_reg1 |= reg; | ||
155 | else | ||
156 | gpio_data_reg1 &= ~reg; | ||
157 | rdc321x_conf_write(RDC321X_GPIO_DATA_REG1, gpio_data_reg1); | ||
158 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
159 | } else { | ||
160 | spin_lock_irqsave(&gpio_lock, flags); | ||
161 | if (value) | ||
162 | gpio_data_reg2 |= reg; | ||
163 | else | ||
164 | gpio_data_reg2 &= ~reg; | ||
165 | rdc321x_conf_write(RDC321X_GPIO_DATA_REG2, gpio_data_reg2); | ||
166 | spin_unlock_irqrestore(&gpio_lock, flags); | ||
167 | } | ||
168 | } | ||
169 | EXPORT_SYMBOL(rdc_gpio_set_value); | ||
170 | |||
171 | /* configure GPIO pin as input */ | ||
172 | int rdc_gpio_direction_input(unsigned gpio) | ||
173 | { | ||
174 | if (!rdc321x_is_gpio(gpio)) | ||
175 | return -EINVAL; | ||
176 | |||
177 | rdc321x_configure_gpio(gpio); | ||
178 | |||
179 | return 0; | ||
180 | } | ||
181 | EXPORT_SYMBOL(rdc_gpio_direction_input); | ||
182 | |||
183 | /* configure GPIO pin as output and set value */ | ||
184 | int rdc_gpio_direction_output(unsigned gpio, int value) | ||
185 | { | ||
186 | if (!rdc321x_is_gpio(gpio)) | ||
187 | return -EINVAL; | ||
188 | |||
189 | gpio_set_value(gpio, value); | ||
190 | rdc321x_configure_gpio(gpio); | ||
191 | |||
192 | return 0; | ||
193 | } | ||
194 | EXPORT_SYMBOL(rdc_gpio_direction_output); | ||
diff --git a/arch/x86/mach-rdc321x/platform.c b/arch/x86/mach-rdc321x/platform.c deleted file mode 100644 index 4f4e50c3ad3b..000000000000 --- a/arch/x86/mach-rdc321x/platform.c +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | /* | ||
2 | * Generic RDC321x platform devices | ||
3 | * | ||
4 | * Copyright (C) 2007 Florian Fainelli <florian@openwrt.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version 2 | ||
9 | * of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the | ||
18 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
19 | * Boston, MA 02110-1301, USA. | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <linux/init.h> | ||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/list.h> | ||
26 | #include <linux/device.h> | ||
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/leds.h> | ||
29 | |||
30 | #include <asm/gpio.h> | ||
31 | |||
32 | /* LEDS */ | ||
33 | static struct gpio_led default_leds[] = { | ||
34 | { .name = "rdc:dmz", .gpio = 1, }, | ||
35 | }; | ||
36 | |||
37 | static struct gpio_led_platform_data rdc321x_led_data = { | ||
38 | .num_leds = ARRAY_SIZE(default_leds), | ||
39 | .leds = default_leds, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device rdc321x_leds = { | ||
43 | .name = "leds-gpio", | ||
44 | .id = -1, | ||
45 | .dev = { | ||
46 | .platform_data = &rdc321x_led_data, | ||
47 | } | ||
48 | }; | ||
49 | |||
50 | /* Watchdog */ | ||
51 | static struct platform_device rdc321x_wdt = { | ||
52 | .name = "rdc321x-wdt", | ||
53 | .id = -1, | ||
54 | .num_resources = 0, | ||
55 | }; | ||
56 | |||
57 | static struct platform_device *rdc321x_devs[] = { | ||
58 | &rdc321x_leds, | ||
59 | &rdc321x_wdt | ||
60 | }; | ||
61 | |||
62 | static int __init rdc_board_setup(void) | ||
63 | { | ||
64 | rdc321x_gpio_setup(); | ||
65 | |||
66 | return platform_add_devices(rdc321x_devs, ARRAY_SIZE(rdc321x_devs)); | ||
67 | } | ||
68 | |||
69 | arch_initcall(rdc_board_setup); | ||
diff --git a/arch/x86/mach-voyager/Makefile b/arch/x86/mach-voyager/Makefile deleted file mode 100644 index 15c250b371d3..000000000000 --- a/arch/x86/mach-voyager/Makefile +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | EXTRA_CFLAGS := -Iarch/x86/kernel | ||
6 | obj-y := setup.o voyager_basic.o voyager_thread.o | ||
7 | |||
8 | obj-$(CONFIG_SMP) += voyager_smp.o voyager_cat.o | ||
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c deleted file mode 100644 index 66b7eb57d8e4..000000000000 --- a/arch/x86/mach-voyager/setup.c +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | /* | ||
2 | * Machine specific setup for generic | ||
3 | */ | ||
4 | |||
5 | #include <linux/init.h> | ||
6 | #include <linux/interrupt.h> | ||
7 | #include <asm/arch_hooks.h> | ||
8 | #include <asm/voyager.h> | ||
9 | #include <asm/e820.h> | ||
10 | #include <asm/io.h> | ||
11 | #include <asm/setup.h> | ||
12 | #include <asm/cpu.h> | ||
13 | |||
14 | void __init pre_intr_init_hook(void) | ||
15 | { | ||
16 | init_ISA_irqs(); | ||
17 | } | ||
18 | |||
19 | /* | ||
20 | * IRQ2 is cascade interrupt to second interrupt controller | ||
21 | */ | ||
22 | static struct irqaction irq2 = { | ||
23 | .handler = no_action, | ||
24 | .mask = CPU_MASK_NONE, | ||
25 | .name = "cascade", | ||
26 | }; | ||
27 | |||
28 | void __init intr_init_hook(void) | ||
29 | { | ||
30 | #ifdef CONFIG_SMP | ||
31 | voyager_smp_intr_init(); | ||
32 | #endif | ||
33 | |||
34 | setup_irq(2, &irq2); | ||
35 | } | ||
36 | |||
37 | static void voyager_disable_tsc(void) | ||
38 | { | ||
39 | /* Voyagers run their CPUs from independent clocks, so disable | ||
40 | * the TSC code because we can't sync them */ | ||
41 | setup_clear_cpu_cap(X86_FEATURE_TSC); | ||
42 | } | ||
43 | |||
44 | void __init pre_setup_arch_hook(void) | ||
45 | { | ||
46 | voyager_disable_tsc(); | ||
47 | } | ||
48 | |||
49 | void __init pre_time_init_hook(void) | ||
50 | { | ||
51 | voyager_disable_tsc(); | ||
52 | } | ||
53 | |||
54 | void __init trap_init_hook(void) | ||
55 | { | ||
56 | } | ||
57 | |||
58 | static struct irqaction irq0 = { | ||
59 | .handler = timer_interrupt, | ||
60 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, | ||
61 | .mask = CPU_MASK_NONE, | ||
62 | .name = "timer" | ||
63 | }; | ||
64 | |||
65 | void __init time_init_hook(void) | ||
66 | { | ||
67 | irq0.mask = cpumask_of_cpu(safe_smp_processor_id()); | ||
68 | setup_irq(0, &irq0); | ||
69 | } | ||
70 | |||
71 | /* Hook for machine specific memory setup. */ | ||
72 | |||
73 | char *__init machine_specific_memory_setup(void) | ||
74 | { | ||
75 | char *who; | ||
76 | int new_nr; | ||
77 | |||
78 | who = "NOT VOYAGER"; | ||
79 | |||
80 | if (voyager_level == 5) { | ||
81 | __u32 addr, length; | ||
82 | int i; | ||
83 | |||
84 | who = "Voyager-SUS"; | ||
85 | |||
86 | e820.nr_map = 0; | ||
87 | for (i = 0; voyager_memory_detect(i, &addr, &length); i++) { | ||
88 | e820_add_region(addr, length, E820_RAM); | ||
89 | } | ||
90 | return who; | ||
91 | } else if (voyager_level == 4) { | ||
92 | __u32 tom; | ||
93 | __u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT) << 8; | ||
94 | /* select the DINO config space */ | ||
95 | outb(VOYAGER_DINO, VOYAGER_CAT_CONFIG_PORT); | ||
96 | /* Read DINO top of memory register */ | ||
97 | tom = ((inb(catbase + 0x4) & 0xf0) << 16) | ||
98 | + ((inb(catbase + 0x5) & 0x7f) << 24); | ||
99 | |||
100 | if (inb(catbase) != VOYAGER_DINO) { | ||
101 | printk(KERN_ERR | ||
102 | "Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n"); | ||
103 | tom = (boot_params.screen_info.ext_mem_k) << 10; | ||
104 | } | ||
105 | who = "Voyager-TOM"; | ||
106 | e820_add_region(0, 0x9f000, E820_RAM); | ||
107 | /* map from 1M to top of memory */ | ||
108 | e820_add_region(1 * 1024 * 1024, tom - 1 * 1024 * 1024, | ||
109 | E820_RAM); | ||
110 | /* FIXME: Should check the ASICs to see if I need to | ||
111 | * take out the 8M window. Just do it at the moment | ||
112 | * */ | ||
113 | e820_add_region(8 * 1024 * 1024, 8 * 1024 * 1024, | ||
114 | E820_RESERVED); | ||
115 | return who; | ||
116 | } | ||
117 | |||
118 | return default_machine_specific_memory_setup(); | ||
119 | } | ||
diff --git a/arch/x86/mach-voyager/voyager_basic.c b/arch/x86/mach-voyager/voyager_basic.c deleted file mode 100644 index 46d6f8067690..000000000000 --- a/arch/x86/mach-voyager/voyager_basic.c +++ /dev/null | |||
@@ -1,317 +0,0 @@ | |||
1 | /* Copyright (C) 1999,2001 | ||
2 | * | ||
3 | * Author: J.E.J.Bottomley@HansenPartnership.com | ||
4 | * | ||
5 | * This file contains all the voyager specific routines for getting | ||
6 | * initialisation of the architecture to function. For additional | ||
7 | * features see: | ||
8 | * | ||
9 | * voyager_cat.c - Voyager CAT bus interface | ||
10 | * voyager_smp.c - Voyager SMP hal (emulates linux smp.c) | ||
11 | */ | ||
12 | |||
13 | #include <linux/module.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/sched.h> | ||
16 | #include <linux/ptrace.h> | ||
17 | #include <linux/ioport.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/delay.h> | ||
21 | #include <linux/reboot.h> | ||
22 | #include <linux/sysrq.h> | ||
23 | #include <linux/smp.h> | ||
24 | #include <linux/nodemask.h> | ||
25 | #include <asm/io.h> | ||
26 | #include <asm/voyager.h> | ||
27 | #include <asm/vic.h> | ||
28 | #include <linux/pm.h> | ||
29 | #include <asm/tlbflush.h> | ||
30 | #include <asm/arch_hooks.h> | ||
31 | #include <asm/i8253.h> | ||
32 | |||
33 | /* | ||
34 | * Power off function, if any | ||
35 | */ | ||
36 | void (*pm_power_off) (void); | ||
37 | EXPORT_SYMBOL(pm_power_off); | ||
38 | |||
39 | int voyager_level = 0; | ||
40 | |||
41 | struct voyager_SUS *voyager_SUS = NULL; | ||
42 | |||
43 | #ifdef CONFIG_SMP | ||
44 | static void voyager_dump(int dummy1, struct tty_struct *dummy3) | ||
45 | { | ||
46 | /* get here via a sysrq */ | ||
47 | voyager_smp_dump(); | ||
48 | } | ||
49 | |||
50 | static struct sysrq_key_op sysrq_voyager_dump_op = { | ||
51 | .handler = voyager_dump, | ||
52 | .help_msg = "Voyager", | ||
53 | .action_msg = "Dump Voyager Status", | ||
54 | }; | ||
55 | #endif | ||
56 | |||
57 | void voyager_detect(struct voyager_bios_info *bios) | ||
58 | { | ||
59 | if (bios->len != 0xff) { | ||
60 | int class = (bios->class_1 << 8) | ||
61 | | (bios->class_2 & 0xff); | ||
62 | |||
63 | printk("Voyager System detected.\n" | ||
64 | " Class %x, Revision %d.%d\n", | ||
65 | class, bios->major, bios->minor); | ||
66 | if (class == VOYAGER_LEVEL4) | ||
67 | voyager_level = 4; | ||
68 | else if (class < VOYAGER_LEVEL5_AND_ABOVE) | ||
69 | voyager_level = 3; | ||
70 | else | ||
71 | voyager_level = 5; | ||
72 | printk(" Architecture Level %d\n", voyager_level); | ||
73 | if (voyager_level < 4) | ||
74 | printk | ||
75 | ("\n**WARNING**: Voyager HAL only supports Levels 4 and 5 Architectures at the moment\n\n"); | ||
76 | /* install the power off handler */ | ||
77 | pm_power_off = voyager_power_off; | ||
78 | #ifdef CONFIG_SMP | ||
79 | register_sysrq_key('v', &sysrq_voyager_dump_op); | ||
80 | #endif | ||
81 | } else { | ||
82 | printk("\n\n**WARNING**: No Voyager Subsystem Found\n"); | ||
83 | } | ||
84 | } | ||
85 | |||
86 | void voyager_system_interrupt(int cpl, void *dev_id) | ||
87 | { | ||
88 | printk("Voyager: detected system interrupt\n"); | ||
89 | } | ||
90 | |||
91 | /* Routine to read information from the extended CMOS area */ | ||
92 | __u8 voyager_extended_cmos_read(__u16 addr) | ||
93 | { | ||
94 | outb(addr & 0xff, 0x74); | ||
95 | outb((addr >> 8) & 0xff, 0x75); | ||
96 | return inb(0x76); | ||
97 | } | ||
98 | |||
99 | /* internal definitions for the SUS Click Map of memory */ | ||
100 | |||
101 | #define CLICK_ENTRIES 16 | ||
102 | #define CLICK_SIZE 4096 /* click to byte conversion for Length */ | ||
103 | |||
104 | typedef struct ClickMap { | ||
105 | struct Entry { | ||
106 | __u32 Address; | ||
107 | __u32 Length; | ||
108 | } Entry[CLICK_ENTRIES]; | ||
109 | } ClickMap_t; | ||
110 | |||
111 | /* This routine is pretty much an awful hack to read the bios clickmap by | ||
112 | * mapping it into page 0. There are usually three regions in the map: | ||
113 | * Base Memory | ||
114 | * Extended Memory | ||
115 | * zero length marker for end of map | ||
116 | * | ||
117 | * Returns are 0 for failure and 1 for success on extracting region. | ||
118 | */ | ||
119 | int __init voyager_memory_detect(int region, __u32 * start, __u32 * length) | ||
120 | { | ||
121 | int i; | ||
122 | int retval = 0; | ||
123 | __u8 cmos[4]; | ||
124 | ClickMap_t *map; | ||
125 | unsigned long map_addr; | ||
126 | unsigned long old; | ||
127 | |||
128 | if (region >= CLICK_ENTRIES) { | ||
129 | printk("Voyager: Illegal ClickMap region %d\n", region); | ||
130 | return 0; | ||
131 | } | ||
132 | |||
133 | for (i = 0; i < sizeof(cmos); i++) | ||
134 | cmos[i] = | ||
135 | voyager_extended_cmos_read(VOYAGER_MEMORY_CLICKMAP + i); | ||
136 | |||
137 | map_addr = *(unsigned long *)cmos; | ||
138 | |||
139 | /* steal page 0 for this */ | ||
140 | old = pg0[0]; | ||
141 | pg0[0] = ((map_addr & PAGE_MASK) | _PAGE_RW | _PAGE_PRESENT); | ||
142 | local_flush_tlb(); | ||
143 | /* now clear everything out but page 0 */ | ||
144 | map = (ClickMap_t *) (map_addr & (~PAGE_MASK)); | ||
145 | |||
146 | /* zero length is the end of the clickmap */ | ||
147 | if (map->Entry[region].Length != 0) { | ||
148 | *length = map->Entry[region].Length * CLICK_SIZE; | ||
149 | *start = map->Entry[region].Address; | ||
150 | retval = 1; | ||
151 | } | ||
152 | |||
153 | /* replace the mapping */ | ||
154 | pg0[0] = old; | ||
155 | local_flush_tlb(); | ||
156 | return retval; | ||
157 | } | ||
158 | |||
159 | /* voyager specific handling code for timer interrupts. Used to hand | ||
160 | * off the timer tick to the SMP code, since the VIC doesn't have an | ||
161 | * internal timer (The QIC does, but that's another story). */ | ||
162 | void voyager_timer_interrupt(void) | ||
163 | { | ||
164 | if ((jiffies & 0x3ff) == 0) { | ||
165 | |||
166 | /* There seems to be something flaky in either | ||
167 | * hardware or software that is resetting the timer 0 | ||
168 | * count to something much higher than it should be | ||
169 | * This seems to occur in the boot sequence, just | ||
170 | * before root is mounted. Therefore, every 10 | ||
171 | * seconds or so, we sanity check the timer zero count | ||
172 | * and kick it back to where it should be. | ||
173 | * | ||
174 | * FIXME: This is the most awful hack yet seen. I | ||
175 | * should work out exactly what is interfering with | ||
176 | * the timer count settings early in the boot sequence | ||
177 | * and swiftly introduce it to something sharp and | ||
178 | * pointy. */ | ||
179 | __u16 val; | ||
180 | |||
181 | spin_lock(&i8253_lock); | ||
182 | |||
183 | outb_p(0x00, 0x43); | ||
184 | val = inb_p(0x40); | ||
185 | val |= inb(0x40) << 8; | ||
186 | spin_unlock(&i8253_lock); | ||
187 | |||
188 | if (val > LATCH) { | ||
189 | printk | ||
190 | ("\nVOYAGER: countdown timer value too high (%d), resetting\n\n", | ||
191 | val); | ||
192 | spin_lock(&i8253_lock); | ||
193 | outb(0x34, 0x43); | ||
194 | outb_p(LATCH & 0xff, 0x40); /* LSB */ | ||
195 | outb(LATCH >> 8, 0x40); /* MSB */ | ||
196 | spin_unlock(&i8253_lock); | ||
197 | } | ||
198 | } | ||
199 | #ifdef CONFIG_SMP | ||
200 | smp_vic_timer_interrupt(); | ||
201 | #endif | ||
202 | } | ||
203 | |||
204 | void voyager_power_off(void) | ||
205 | { | ||
206 | printk("VOYAGER Power Off\n"); | ||
207 | |||
208 | if (voyager_level == 5) { | ||
209 | voyager_cat_power_off(); | ||
210 | } else if (voyager_level == 4) { | ||
211 | /* This doesn't apparently work on most L4 machines, | ||
212 | * but the specs say to do this to get automatic power | ||
213 | * off. Unfortunately, if it doesn't power off the | ||
214 | * machine, it ends up doing a cold restart, which | ||
215 | * isn't really intended, so comment out the code */ | ||
216 | #if 0 | ||
217 | int port; | ||
218 | |||
219 | /* enable the voyager Configuration Space */ | ||
220 | outb((inb(VOYAGER_MC_SETUP) & 0xf0) | 0x8, VOYAGER_MC_SETUP); | ||
221 | /* the port for the power off flag is an offset from the | ||
222 | floating base */ | ||
223 | port = (inb(VOYAGER_SSPB_RELOCATION_PORT) << 8) + 0x21; | ||
224 | /* set the power off flag */ | ||
225 | outb(inb(port) | 0x1, port); | ||
226 | #endif | ||
227 | } | ||
228 | /* and wait for it to happen */ | ||
229 | local_irq_disable(); | ||
230 | for (;;) | ||
231 | halt(); | ||
232 | } | ||
233 | |||
234 | /* copied from process.c */ | ||
235 | static inline void kb_wait(void) | ||
236 | { | ||
237 | int i; | ||
238 | |||
239 | for (i = 0; i < 0x10000; i++) | ||
240 | if ((inb_p(0x64) & 0x02) == 0) | ||
241 | break; | ||
242 | } | ||
243 | |||
244 | void machine_shutdown(void) | ||
245 | { | ||
246 | /* Architecture specific shutdown needed before a kexec */ | ||
247 | } | ||
248 | |||
249 | void machine_restart(char *cmd) | ||
250 | { | ||
251 | printk("Voyager Warm Restart\n"); | ||
252 | kb_wait(); | ||
253 | |||
254 | if (voyager_level == 5) { | ||
255 | /* write magic values to the RTC to inform system that | ||
256 | * shutdown is beginning */ | ||
257 | outb(0x8f, 0x70); | ||
258 | outb(0x5, 0x71); | ||
259 | |||
260 | udelay(50); | ||
261 | outb(0xfe, 0x64); /* pull reset low */ | ||
262 | } else if (voyager_level == 4) { | ||
263 | __u16 catbase = inb(VOYAGER_SSPB_RELOCATION_PORT) << 8; | ||
264 | __u8 basebd = inb(VOYAGER_MC_SETUP); | ||
265 | |||
266 | outb(basebd | 0x08, VOYAGER_MC_SETUP); | ||
267 | outb(0x02, catbase + 0x21); | ||
268 | } | ||
269 | local_irq_disable(); | ||
270 | for (;;) | ||
271 | halt(); | ||
272 | } | ||
273 | |||
274 | void machine_emergency_restart(void) | ||
275 | { | ||
276 | /*for now, just hook this to a warm restart */ | ||
277 | machine_restart(NULL); | ||
278 | } | ||
279 | |||
280 | void mca_nmi_hook(void) | ||
281 | { | ||
282 | __u8 dumpval __maybe_unused = inb(0xf823); | ||
283 | __u8 swnmi __maybe_unused = inb(0xf813); | ||
284 | |||
285 | /* FIXME: assume dump switch pressed */ | ||
286 | /* check to see if the dump switch was pressed */ | ||
287 | VDEBUG(("VOYAGER: dumpval = 0x%x, swnmi = 0x%x\n", dumpval, swnmi)); | ||
288 | /* clear swnmi */ | ||
289 | outb(0xff, 0xf813); | ||
290 | /* tell SUS to ignore dump */ | ||
291 | if (voyager_level == 5 && voyager_SUS != NULL) { | ||
292 | if (voyager_SUS->SUS_mbox == VOYAGER_DUMP_BUTTON_NMI) { | ||
293 | voyager_SUS->kernel_mbox = VOYAGER_NO_COMMAND; | ||
294 | voyager_SUS->kernel_flags |= VOYAGER_OS_IN_PROGRESS; | ||
295 | udelay(1000); | ||
296 | voyager_SUS->kernel_mbox = VOYAGER_IGNORE_DUMP; | ||
297 | voyager_SUS->kernel_flags &= ~VOYAGER_OS_IN_PROGRESS; | ||
298 | } | ||
299 | } | ||
300 | printk(KERN_ERR | ||
301 | "VOYAGER: Dump switch pressed, printing CPU%d tracebacks\n", | ||
302 | smp_processor_id()); | ||
303 | show_stack(NULL, NULL); | ||
304 | show_state(); | ||
305 | } | ||
306 | |||
307 | void machine_halt(void) | ||
308 | { | ||
309 | /* treat a halt like a power off */ | ||
310 | machine_power_off(); | ||
311 | } | ||
312 | |||
313 | void machine_power_off(void) | ||
314 | { | ||
315 | if (pm_power_off) | ||
316 | pm_power_off(); | ||
317 | } | ||
diff --git a/arch/x86/mach-voyager/voyager_cat.c b/arch/x86/mach-voyager/voyager_cat.c deleted file mode 100644 index 2ad598c104af..000000000000 --- a/arch/x86/mach-voyager/voyager_cat.c +++ /dev/null | |||
@@ -1,1197 +0,0 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8 -*- */ | ||
2 | |||
3 | /* Copyright (C) 1999,2001 | ||
4 | * | ||
5 | * Author: J.E.J.Bottomley@HansenPartnership.com | ||
6 | * | ||
7 | * This file contains all the logic for manipulating the CAT bus | ||
8 | * in a level 5 machine. | ||
9 | * | ||
10 | * The CAT bus is a serial configuration and test bus. Its primary | ||
11 | * uses are to probe the initial configuration of the system and to | ||
12 | * diagnose error conditions when a system interrupt occurs. The low | ||
13 | * level interface is fairly primitive, so most of this file consists | ||
14 | * of bit shift manipulations to send and receive packets on the | ||
15 | * serial bus */ | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/completion.h> | ||
19 | #include <linux/sched.h> | ||
20 | #include <asm/voyager.h> | ||
21 | #include <asm/vic.h> | ||
22 | #include <linux/ioport.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/slab.h> | ||
25 | #include <linux/delay.h> | ||
26 | #include <asm/io.h> | ||
27 | |||
28 | #ifdef VOYAGER_CAT_DEBUG | ||
29 | #define CDEBUG(x) printk x | ||
30 | #else | ||
31 | #define CDEBUG(x) | ||
32 | #endif | ||
33 | |||
34 | /* the CAT command port */ | ||
35 | #define CAT_CMD (sspb + 0xe) | ||
36 | /* the CAT data port */ | ||
37 | #define CAT_DATA (sspb + 0xd) | ||
38 | |||
39 | /* the internal cat functions */ | ||
40 | static void cat_pack(__u8 * msg, __u16 start_bit, __u8 * data, __u16 num_bits); | ||
41 | static void cat_unpack(__u8 * msg, __u16 start_bit, __u8 * data, | ||
42 | __u16 num_bits); | ||
43 | static void cat_build_header(__u8 * header, const __u16 len, | ||
44 | const __u16 smallest_reg_bits, | ||
45 | const __u16 longest_reg_bits); | ||
46 | static int cat_sendinst(voyager_module_t * modp, voyager_asic_t * asicp, | ||
47 | __u8 reg, __u8 op); | ||
48 | static int cat_getdata(voyager_module_t * modp, voyager_asic_t * asicp, | ||
49 | __u8 reg, __u8 * value); | ||
50 | static int cat_shiftout(__u8 * data, __u16 data_bytes, __u16 header_bytes, | ||
51 | __u8 pad_bits); | ||
52 | static int cat_write(voyager_module_t * modp, voyager_asic_t * asicp, __u8 reg, | ||
53 | __u8 value); | ||
54 | static int cat_read(voyager_module_t * modp, voyager_asic_t * asicp, __u8 reg, | ||
55 | __u8 * value); | ||
56 | static int cat_subread(voyager_module_t * modp, voyager_asic_t * asicp, | ||
57 | __u16 offset, __u16 len, void *buf); | ||
58 | static int cat_senddata(voyager_module_t * modp, voyager_asic_t * asicp, | ||
59 | __u8 reg, __u8 value); | ||
60 | static int cat_disconnect(voyager_module_t * modp, voyager_asic_t * asicp); | ||
61 | static int cat_connect(voyager_module_t * modp, voyager_asic_t * asicp); | ||
62 | |||
63 | static inline const char *cat_module_name(int module_id) | ||
64 | { | ||
65 | switch (module_id) { | ||
66 | case 0x10: | ||
67 | return "Processor Slot 0"; | ||
68 | case 0x11: | ||
69 | return "Processor Slot 1"; | ||
70 | case 0x12: | ||
71 | return "Processor Slot 2"; | ||
72 | case 0x13: | ||
73 | return "Processor Slot 4"; | ||
74 | case 0x14: | ||
75 | return "Memory Slot 0"; | ||
76 | case 0x15: | ||
77 | return "Memory Slot 1"; | ||
78 | case 0x18: | ||
79 | return "Primary Microchannel"; | ||
80 | case 0x19: | ||
81 | return "Secondary Microchannel"; | ||
82 | case 0x1a: | ||
83 | return "Power Supply Interface"; | ||
84 | case 0x1c: | ||
85 | return "Processor Slot 5"; | ||
86 | case 0x1d: | ||
87 | return "Processor Slot 6"; | ||
88 | case 0x1e: | ||
89 | return "Processor Slot 7"; | ||
90 | case 0x1f: | ||
91 | return "Processor Slot 8"; | ||
92 | default: | ||
93 | return "Unknown Module"; | ||
94 | } | ||
95 | } | ||
96 | |||
97 | static int sspb = 0; /* stores the super port location */ | ||
98 | int voyager_8slot = 0; /* set to true if a 51xx monster */ | ||
99 | |||
100 | voyager_module_t *voyager_cat_list; | ||
101 | |||
102 | /* the I/O port assignments for the VIC and QIC */ | ||
103 | static struct resource vic_res = { | ||
104 | .name = "Voyager Interrupt Controller", | ||
105 | .start = 0xFC00, | ||
106 | .end = 0xFC6F | ||
107 | }; | ||
108 | static struct resource qic_res = { | ||
109 | .name = "Quad Interrupt Controller", | ||
110 | .start = 0xFC70, | ||
111 | .end = 0xFCFF | ||
112 | }; | ||
113 | |||
114 | /* This function is used to pack a data bit stream inside a message. | ||
115 | * It writes num_bits of the data buffer in msg starting at start_bit. | ||
116 | * Note: This function assumes that any unused bit in the data stream | ||
117 | * is set to zero so that the ors will work correctly */ | ||
118 | static void | ||
119 | cat_pack(__u8 * msg, const __u16 start_bit, __u8 * data, const __u16 num_bits) | ||
120 | { | ||
121 | /* compute initial shift needed */ | ||
122 | const __u16 offset = start_bit % BITS_PER_BYTE; | ||
123 | __u16 len = num_bits / BITS_PER_BYTE; | ||
124 | __u16 byte = start_bit / BITS_PER_BYTE; | ||
125 | __u16 residue = (num_bits % BITS_PER_BYTE) + offset; | ||
126 | int i; | ||
127 | |||
128 | /* adjust if we have more than a byte of residue */ | ||
129 | if (residue >= BITS_PER_BYTE) { | ||
130 | residue -= BITS_PER_BYTE; | ||
131 | len++; | ||
132 | } | ||
133 | |||
134 | /* clear out the bits. We assume here that if len==0 then | ||
135 | * residue >= offset. This is always true for the catbus | ||
136 | * operations */ | ||
137 | msg[byte] &= 0xff << (BITS_PER_BYTE - offset); | ||
138 | msg[byte++] |= data[0] >> offset; | ||
139 | if (len == 0) | ||
140 | return; | ||
141 | for (i = 1; i < len; i++) | ||
142 | msg[byte++] = (data[i - 1] << (BITS_PER_BYTE - offset)) | ||
143 | | (data[i] >> offset); | ||
144 | if (residue != 0) { | ||
145 | __u8 mask = 0xff >> residue; | ||
146 | __u8 last_byte = data[i - 1] << (BITS_PER_BYTE - offset) | ||
147 | | (data[i] >> offset); | ||
148 | |||
149 | last_byte &= ~mask; | ||
150 | msg[byte] &= mask; | ||
151 | msg[byte] |= last_byte; | ||
152 | } | ||
153 | return; | ||
154 | } | ||
155 | |||
156 | /* unpack the data again (same arguments as cat_pack()). data buffer | ||
157 | * must be zero populated. | ||
158 | * | ||
159 | * Function: given a message string move to start_bit and copy num_bits into | ||
160 | * data (starting at bit 0 in data). | ||
161 | */ | ||
162 | static void | ||
163 | cat_unpack(__u8 * msg, const __u16 start_bit, __u8 * data, const __u16 num_bits) | ||
164 | { | ||
165 | /* compute initial shift needed */ | ||
166 | const __u16 offset = start_bit % BITS_PER_BYTE; | ||
167 | __u16 len = num_bits / BITS_PER_BYTE; | ||
168 | const __u8 last_bits = num_bits % BITS_PER_BYTE; | ||
169 | __u16 byte = start_bit / BITS_PER_BYTE; | ||
170 | int i; | ||
171 | |||
172 | if (last_bits != 0) | ||
173 | len++; | ||
174 | |||
175 | /* special case: want < 8 bits from msg and we can get it from | ||
176 | * a single byte of the msg */ | ||
177 | if (len == 0 && BITS_PER_BYTE - offset >= num_bits) { | ||
178 | data[0] = msg[byte] << offset; | ||
179 | data[0] &= 0xff >> (BITS_PER_BYTE - num_bits); | ||
180 | return; | ||
181 | } | ||
182 | for (i = 0; i < len; i++) { | ||
183 | /* this annoying if has to be done just in case a read of | ||
184 | * msg one beyond the array causes a panic */ | ||
185 | if (offset != 0) { | ||
186 | data[i] = msg[byte++] << offset; | ||
187 | data[i] |= msg[byte] >> (BITS_PER_BYTE - offset); | ||
188 | } else { | ||
189 | data[i] = msg[byte++]; | ||
190 | } | ||
191 | } | ||
192 | /* do we need to truncate the final byte */ | ||
193 | if (last_bits != 0) { | ||
194 | data[i - 1] &= 0xff << (BITS_PER_BYTE - last_bits); | ||
195 | } | ||
196 | return; | ||
197 | } | ||
198 | |||
199 | static void | ||
200 | cat_build_header(__u8 * header, const __u16 len, const __u16 smallest_reg_bits, | ||
201 | const __u16 longest_reg_bits) | ||
202 | { | ||
203 | int i; | ||
204 | __u16 start_bit = (smallest_reg_bits - 1) % BITS_PER_BYTE; | ||
205 | __u8 *last_byte = &header[len - 1]; | ||
206 | |||
207 | if (start_bit == 0) | ||
208 | start_bit = 1; /* must have at least one bit in the hdr */ | ||
209 | |||
210 | for (i = 0; i < len; i++) | ||
211 | header[i] = 0; | ||
212 | |||
213 | for (i = start_bit; i > 0; i--) | ||
214 | *last_byte = ((*last_byte) << 1) + 1; | ||
215 | |||
216 | } | ||
217 | |||
218 | static int | ||
219 | cat_sendinst(voyager_module_t * modp, voyager_asic_t * asicp, __u8 reg, __u8 op) | ||
220 | { | ||
221 | __u8 parity, inst, inst_buf[4] = { 0 }; | ||
222 | __u8 iseq[VOYAGER_MAX_SCAN_PATH], hseq[VOYAGER_MAX_REG_SIZE]; | ||
223 | __u16 ibytes, hbytes, padbits; | ||
224 | int i; | ||
225 | |||
226 | /* | ||
227 | * Parity is the parity of the register number + 1 (READ_REGISTER | ||
228 | * and WRITE_REGISTER always add '1' to the number of bits == 1) | ||
229 | */ | ||
230 | parity = (__u8) (1 + (reg & 0x01) + | ||
231 | ((__u8) (reg & 0x02) >> 1) + | ||
232 | ((__u8) (reg & 0x04) >> 2) + | ||
233 | ((__u8) (reg & 0x08) >> 3)) % 2; | ||
234 | |||
235 | inst = ((parity << 7) | (reg << 2) | op); | ||
236 | |||
237 | outb(VOYAGER_CAT_IRCYC, CAT_CMD); | ||
238 | if (!modp->scan_path_connected) { | ||
239 | if (asicp->asic_id != VOYAGER_CAT_ID) { | ||
240 | printk | ||
241 | ("**WARNING***: cat_sendinst has disconnected scan path not to CAT asic\n"); | ||
242 | return 1; | ||
243 | } | ||
244 | outb(VOYAGER_CAT_HEADER, CAT_DATA); | ||
245 | outb(inst, CAT_DATA); | ||
246 | if (inb(CAT_DATA) != VOYAGER_CAT_HEADER) { | ||
247 | CDEBUG(("VOYAGER CAT: cat_sendinst failed to get CAT_HEADER\n")); | ||
248 | return 1; | ||
249 | } | ||
250 | return 0; | ||
251 | } | ||
252 | ibytes = modp->inst_bits / BITS_PER_BYTE; | ||
253 | if ((padbits = modp->inst_bits % BITS_PER_BYTE) != 0) { | ||
254 | padbits = BITS_PER_BYTE - padbits; | ||
255 | ibytes++; | ||
256 | } | ||
257 | hbytes = modp->largest_reg / BITS_PER_BYTE; | ||
258 | if (modp->largest_reg % BITS_PER_BYTE) | ||
259 | hbytes++; | ||
260 | CDEBUG(("cat_sendinst: ibytes=%d, hbytes=%d\n", ibytes, hbytes)); | ||
261 | /* initialise the instruction sequence to 0xff */ | ||
262 | for (i = 0; i < ibytes + hbytes; i++) | ||
263 | iseq[i] = 0xff; | ||
264 | cat_build_header(hseq, hbytes, modp->smallest_reg, modp->largest_reg); | ||
265 | cat_pack(iseq, modp->inst_bits, hseq, hbytes * BITS_PER_BYTE); | ||
266 | inst_buf[0] = inst; | ||
267 | inst_buf[1] = 0xFF >> (modp->largest_reg % BITS_PER_BYTE); | ||
268 | cat_pack(iseq, asicp->bit_location, inst_buf, asicp->ireg_length); | ||
269 | #ifdef VOYAGER_CAT_DEBUG | ||
270 | printk("ins = 0x%x, iseq: ", inst); | ||
271 | for (i = 0; i < ibytes + hbytes; i++) | ||
272 | printk("0x%x ", iseq[i]); | ||
273 | printk("\n"); | ||
274 | #endif | ||
275 | if (cat_shiftout(iseq, ibytes, hbytes, padbits)) { | ||
276 | CDEBUG(("VOYAGER CAT: cat_sendinst: cat_shiftout failed\n")); | ||
277 | return 1; | ||
278 | } | ||
279 | CDEBUG(("CAT SHIFTOUT DONE\n")); | ||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | static int | ||
284 | cat_getdata(voyager_module_t * modp, voyager_asic_t * asicp, __u8 reg, | ||
285 | __u8 * value) | ||
286 | { | ||
287 | if (!modp->scan_path_connected) { | ||
288 | if (asicp->asic_id != VOYAGER_CAT_ID) { | ||
289 | CDEBUG(("VOYAGER CAT: ERROR: cat_getdata to CAT asic with scan path connected\n")); | ||
290 | return 1; | ||
291 | } | ||
292 | if (reg > VOYAGER_SUBADDRHI) | ||
293 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
294 | outb(VOYAGER_CAT_DRCYC, CAT_CMD); | ||
295 | outb(VOYAGER_CAT_HEADER, CAT_DATA); | ||
296 | *value = inb(CAT_DATA); | ||
297 | outb(0xAA, CAT_DATA); | ||
298 | if (inb(CAT_DATA) != VOYAGER_CAT_HEADER) { | ||
299 | CDEBUG(("cat_getdata: failed to get VOYAGER_CAT_HEADER\n")); | ||
300 | return 1; | ||
301 | } | ||
302 | return 0; | ||
303 | } else { | ||
304 | __u16 sbits = modp->num_asics - 1 + asicp->ireg_length; | ||
305 | __u16 sbytes = sbits / BITS_PER_BYTE; | ||
306 | __u16 tbytes; | ||
307 | __u8 string[VOYAGER_MAX_SCAN_PATH], | ||
308 | trailer[VOYAGER_MAX_REG_SIZE]; | ||
309 | __u8 padbits; | ||
310 | int i; | ||
311 | |||
312 | outb(VOYAGER_CAT_DRCYC, CAT_CMD); | ||
313 | |||
314 | if ((padbits = sbits % BITS_PER_BYTE) != 0) { | ||
315 | padbits = BITS_PER_BYTE - padbits; | ||
316 | sbytes++; | ||
317 | } | ||
318 | tbytes = asicp->ireg_length / BITS_PER_BYTE; | ||
319 | if (asicp->ireg_length % BITS_PER_BYTE) | ||
320 | tbytes++; | ||
321 | CDEBUG(("cat_getdata: tbytes = %d, sbytes = %d, padbits = %d\n", | ||
322 | tbytes, sbytes, padbits)); | ||
323 | cat_build_header(trailer, tbytes, 1, asicp->ireg_length); | ||
324 | |||
325 | for (i = tbytes - 1; i >= 0; i--) { | ||
326 | outb(trailer[i], CAT_DATA); | ||
327 | string[sbytes + i] = inb(CAT_DATA); | ||
328 | } | ||
329 | |||
330 | for (i = sbytes - 1; i >= 0; i--) { | ||
331 | outb(0xaa, CAT_DATA); | ||
332 | string[i] = inb(CAT_DATA); | ||
333 | } | ||
334 | *value = 0; | ||
335 | cat_unpack(string, | ||
336 | padbits + (tbytes * BITS_PER_BYTE) + | ||
337 | asicp->asic_location, value, asicp->ireg_length); | ||
338 | #ifdef VOYAGER_CAT_DEBUG | ||
339 | printk("value=0x%x, string: ", *value); | ||
340 | for (i = 0; i < tbytes + sbytes; i++) | ||
341 | printk("0x%x ", string[i]); | ||
342 | printk("\n"); | ||
343 | #endif | ||
344 | |||
345 | /* sanity check the rest of the return */ | ||
346 | for (i = 0; i < tbytes; i++) { | ||
347 | __u8 input = 0; | ||
348 | |||
349 | cat_unpack(string, padbits + (i * BITS_PER_BYTE), | ||
350 | &input, BITS_PER_BYTE); | ||
351 | if (trailer[i] != input) { | ||
352 | CDEBUG(("cat_getdata: failed to sanity check rest of ret(%d) 0x%x != 0x%x\n", i, input, trailer[i])); | ||
353 | return 1; | ||
354 | } | ||
355 | } | ||
356 | CDEBUG(("cat_getdata DONE\n")); | ||
357 | return 0; | ||
358 | } | ||
359 | } | ||
360 | |||
361 | static int | ||
362 | cat_shiftout(__u8 * data, __u16 data_bytes, __u16 header_bytes, __u8 pad_bits) | ||
363 | { | ||
364 | int i; | ||
365 | |||
366 | for (i = data_bytes + header_bytes - 1; i >= header_bytes; i--) | ||
367 | outb(data[i], CAT_DATA); | ||
368 | |||
369 | for (i = header_bytes - 1; i >= 0; i--) { | ||
370 | __u8 header = 0; | ||
371 | __u8 input; | ||
372 | |||
373 | outb(data[i], CAT_DATA); | ||
374 | input = inb(CAT_DATA); | ||
375 | CDEBUG(("cat_shiftout: returned 0x%x\n", input)); | ||
376 | cat_unpack(data, ((data_bytes + i) * BITS_PER_BYTE) - pad_bits, | ||
377 | &header, BITS_PER_BYTE); | ||
378 | if (input != header) { | ||
379 | CDEBUG(("VOYAGER CAT: cat_shiftout failed to return header 0x%x != 0x%x\n", input, header)); | ||
380 | return 1; | ||
381 | } | ||
382 | } | ||
383 | return 0; | ||
384 | } | ||
385 | |||
386 | static int | ||
387 | cat_senddata(voyager_module_t * modp, voyager_asic_t * asicp, | ||
388 | __u8 reg, __u8 value) | ||
389 | { | ||
390 | outb(VOYAGER_CAT_DRCYC, CAT_CMD); | ||
391 | if (!modp->scan_path_connected) { | ||
392 | if (asicp->asic_id != VOYAGER_CAT_ID) { | ||
393 | CDEBUG(("VOYAGER CAT: ERROR: scan path disconnected when asic != CAT\n")); | ||
394 | return 1; | ||
395 | } | ||
396 | outb(VOYAGER_CAT_HEADER, CAT_DATA); | ||
397 | outb(value, CAT_DATA); | ||
398 | if (inb(CAT_DATA) != VOYAGER_CAT_HEADER) { | ||
399 | CDEBUG(("cat_senddata: failed to get correct header response to sent data\n")); | ||
400 | return 1; | ||
401 | } | ||
402 | if (reg > VOYAGER_SUBADDRHI) { | ||
403 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
404 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
405 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
406 | } | ||
407 | |||
408 | return 0; | ||
409 | } else { | ||
410 | __u16 hbytes = asicp->ireg_length / BITS_PER_BYTE; | ||
411 | __u16 dbytes = | ||
412 | (modp->num_asics - 1 + asicp->ireg_length) / BITS_PER_BYTE; | ||
413 | __u8 padbits, dseq[VOYAGER_MAX_SCAN_PATH], | ||
414 | hseq[VOYAGER_MAX_REG_SIZE]; | ||
415 | int i; | ||
416 | |||
417 | if ((padbits = (modp->num_asics - 1 | ||
418 | + asicp->ireg_length) % BITS_PER_BYTE) != 0) { | ||
419 | padbits = BITS_PER_BYTE - padbits; | ||
420 | dbytes++; | ||
421 | } | ||
422 | if (asicp->ireg_length % BITS_PER_BYTE) | ||
423 | hbytes++; | ||
424 | |||
425 | cat_build_header(hseq, hbytes, 1, asicp->ireg_length); | ||
426 | |||
427 | for (i = 0; i < dbytes + hbytes; i++) | ||
428 | dseq[i] = 0xff; | ||
429 | CDEBUG(("cat_senddata: dbytes=%d, hbytes=%d, padbits=%d\n", | ||
430 | dbytes, hbytes, padbits)); | ||
431 | cat_pack(dseq, modp->num_asics - 1 + asicp->ireg_length, | ||
432 | hseq, hbytes * BITS_PER_BYTE); | ||
433 | cat_pack(dseq, asicp->asic_location, &value, | ||
434 | asicp->ireg_length); | ||
435 | #ifdef VOYAGER_CAT_DEBUG | ||
436 | printk("dseq "); | ||
437 | for (i = 0; i < hbytes + dbytes; i++) { | ||
438 | printk("0x%x ", dseq[i]); | ||
439 | } | ||
440 | printk("\n"); | ||
441 | #endif | ||
442 | return cat_shiftout(dseq, dbytes, hbytes, padbits); | ||
443 | } | ||
444 | } | ||
445 | |||
446 | static int | ||
447 | cat_write(voyager_module_t * modp, voyager_asic_t * asicp, __u8 reg, __u8 value) | ||
448 | { | ||
449 | if (cat_sendinst(modp, asicp, reg, VOYAGER_WRITE_CONFIG)) | ||
450 | return 1; | ||
451 | return cat_senddata(modp, asicp, reg, value); | ||
452 | } | ||
453 | |||
454 | static int | ||
455 | cat_read(voyager_module_t * modp, voyager_asic_t * asicp, __u8 reg, | ||
456 | __u8 * value) | ||
457 | { | ||
458 | if (cat_sendinst(modp, asicp, reg, VOYAGER_READ_CONFIG)) | ||
459 | return 1; | ||
460 | return cat_getdata(modp, asicp, reg, value); | ||
461 | } | ||
462 | |||
463 | static int | ||
464 | cat_subaddrsetup(voyager_module_t * modp, voyager_asic_t * asicp, __u16 offset, | ||
465 | __u16 len) | ||
466 | { | ||
467 | __u8 val; | ||
468 | |||
469 | if (len > 1) { | ||
470 | /* set auto increment */ | ||
471 | __u8 newval; | ||
472 | |||
473 | if (cat_read(modp, asicp, VOYAGER_AUTO_INC_REG, &val)) { | ||
474 | CDEBUG(("cat_subaddrsetup: read of VOYAGER_AUTO_INC_REG failed\n")); | ||
475 | return 1; | ||
476 | } | ||
477 | CDEBUG(("cat_subaddrsetup: VOYAGER_AUTO_INC_REG = 0x%x\n", | ||
478 | val)); | ||
479 | newval = val | VOYAGER_AUTO_INC; | ||
480 | if (newval != val) { | ||
481 | if (cat_write(modp, asicp, VOYAGER_AUTO_INC_REG, val)) { | ||
482 | CDEBUG(("cat_subaddrsetup: write to VOYAGER_AUTO_INC_REG failed\n")); | ||
483 | return 1; | ||
484 | } | ||
485 | } | ||
486 | } | ||
487 | if (cat_write(modp, asicp, VOYAGER_SUBADDRLO, (__u8) (offset & 0xff))) { | ||
488 | CDEBUG(("cat_subaddrsetup: write to SUBADDRLO failed\n")); | ||
489 | return 1; | ||
490 | } | ||
491 | if (asicp->subaddr > VOYAGER_SUBADDR_LO) { | ||
492 | if (cat_write | ||
493 | (modp, asicp, VOYAGER_SUBADDRHI, (__u8) (offset >> 8))) { | ||
494 | CDEBUG(("cat_subaddrsetup: write to SUBADDRHI failed\n")); | ||
495 | return 1; | ||
496 | } | ||
497 | cat_read(modp, asicp, VOYAGER_SUBADDRHI, &val); | ||
498 | CDEBUG(("cat_subaddrsetup: offset = %d, hi = %d\n", offset, | ||
499 | val)); | ||
500 | } | ||
501 | cat_read(modp, asicp, VOYAGER_SUBADDRLO, &val); | ||
502 | CDEBUG(("cat_subaddrsetup: offset = %d, lo = %d\n", offset, val)); | ||
503 | return 0; | ||
504 | } | ||
505 | |||
506 | static int | ||
507 | cat_subwrite(voyager_module_t * modp, voyager_asic_t * asicp, __u16 offset, | ||
508 | __u16 len, void *buf) | ||
509 | { | ||
510 | int i, retval; | ||
511 | |||
512 | /* FIXME: need special actions for VOYAGER_CAT_ID here */ | ||
513 | if (asicp->asic_id == VOYAGER_CAT_ID) { | ||
514 | CDEBUG(("cat_subwrite: ATTEMPT TO WRITE TO CAT ASIC\n")); | ||
515 | /* FIXME -- This is supposed to be handled better | ||
516 | * There is a problem writing to the cat asic in the | ||
517 | * PSI. The 30us delay seems to work, though */ | ||
518 | udelay(30); | ||
519 | } | ||
520 | |||
521 | if ((retval = cat_subaddrsetup(modp, asicp, offset, len)) != 0) { | ||
522 | printk("cat_subwrite: cat_subaddrsetup FAILED\n"); | ||
523 | return retval; | ||
524 | } | ||
525 | |||
526 | if (cat_sendinst | ||
527 | (modp, asicp, VOYAGER_SUBADDRDATA, VOYAGER_WRITE_CONFIG)) { | ||
528 | printk("cat_subwrite: cat_sendinst FAILED\n"); | ||
529 | return 1; | ||
530 | } | ||
531 | for (i = 0; i < len; i++) { | ||
532 | if (cat_senddata(modp, asicp, 0xFF, ((__u8 *) buf)[i])) { | ||
533 | printk | ||
534 | ("cat_subwrite: cat_sendata element at %d FAILED\n", | ||
535 | i); | ||
536 | return 1; | ||
537 | } | ||
538 | } | ||
539 | return 0; | ||
540 | } | ||
541 | static int | ||
542 | cat_subread(voyager_module_t * modp, voyager_asic_t * asicp, __u16 offset, | ||
543 | __u16 len, void *buf) | ||
544 | { | ||
545 | int i, retval; | ||
546 | |||
547 | if ((retval = cat_subaddrsetup(modp, asicp, offset, len)) != 0) { | ||
548 | CDEBUG(("cat_subread: cat_subaddrsetup FAILED\n")); | ||
549 | return retval; | ||
550 | } | ||
551 | |||
552 | if (cat_sendinst(modp, asicp, VOYAGER_SUBADDRDATA, VOYAGER_READ_CONFIG)) { | ||
553 | CDEBUG(("cat_subread: cat_sendinst failed\n")); | ||
554 | return 1; | ||
555 | } | ||
556 | for (i = 0; i < len; i++) { | ||
557 | if (cat_getdata(modp, asicp, 0xFF, &((__u8 *) buf)[i])) { | ||
558 | CDEBUG(("cat_subread: cat_getdata element %d failed\n", | ||
559 | i)); | ||
560 | return 1; | ||
561 | } | ||
562 | } | ||
563 | return 0; | ||
564 | } | ||
565 | |||
566 | /* buffer for storing EPROM data read in during initialisation */ | ||
567 | static __initdata __u8 eprom_buf[0xFFFF]; | ||
568 | static voyager_module_t *voyager_initial_module; | ||
569 | |||
570 | /* Initialise the cat bus components. We assume this is called by the | ||
571 | * boot cpu *after* all memory initialisation has been done (so we can | ||
572 | * use kmalloc) but before smp initialisation, so we can probe the SMP | ||
573 | * configuration and pick up necessary information. */ | ||
574 | void __init voyager_cat_init(void) | ||
575 | { | ||
576 | voyager_module_t **modpp = &voyager_initial_module; | ||
577 | voyager_asic_t **asicpp; | ||
578 | voyager_asic_t *qabc_asic = NULL; | ||
579 | int i, j; | ||
580 | unsigned long qic_addr = 0; | ||
581 | __u8 qabc_data[0x20]; | ||
582 | __u8 num_submodules, val; | ||
583 | voyager_eprom_hdr_t *eprom_hdr = (voyager_eprom_hdr_t *) & eprom_buf[0]; | ||
584 | |||
585 | __u8 cmos[4]; | ||
586 | unsigned long addr; | ||
587 | |||
588 | /* initiallise the SUS mailbox */ | ||
589 | for (i = 0; i < sizeof(cmos); i++) | ||
590 | cmos[i] = voyager_extended_cmos_read(VOYAGER_DUMP_LOCATION + i); | ||
591 | addr = *(unsigned long *)cmos; | ||
592 | if ((addr & 0xff000000) != 0xff000000) { | ||
593 | printk(KERN_ERR | ||
594 | "Voyager failed to get SUS mailbox (addr = 0x%lx\n", | ||
595 | addr); | ||
596 | } else { | ||
597 | static struct resource res; | ||
598 | |||
599 | res.name = "voyager SUS"; | ||
600 | res.start = addr; | ||
601 | res.end = addr + 0x3ff; | ||
602 | |||
603 | request_resource(&iomem_resource, &res); | ||
604 | voyager_SUS = (struct voyager_SUS *) | ||
605 | ioremap(addr, 0x400); | ||
606 | printk(KERN_NOTICE "Voyager SUS mailbox version 0x%x\n", | ||
607 | voyager_SUS->SUS_version); | ||
608 | voyager_SUS->kernel_version = VOYAGER_MAILBOX_VERSION; | ||
609 | voyager_SUS->kernel_flags = VOYAGER_OS_HAS_SYSINT; | ||
610 | } | ||
611 | |||
612 | /* clear the processor counts */ | ||
613 | voyager_extended_vic_processors = 0; | ||
614 | voyager_quad_processors = 0; | ||
615 | |||
616 | printk("VOYAGER: beginning CAT bus probe\n"); | ||
617 | /* set up the SuperSet Port Block which tells us where the | ||
618 | * CAT communication port is */ | ||
619 | sspb = inb(VOYAGER_SSPB_RELOCATION_PORT) * 0x100; | ||
620 | VDEBUG(("VOYAGER DEBUG: sspb = 0x%x\n", sspb)); | ||
621 | |||
622 | /* now find out if were 8 slot or normal */ | ||
623 | if ((inb(VIC_PROC_WHO_AM_I) & EIGHT_SLOT_IDENTIFIER) | ||
624 | == EIGHT_SLOT_IDENTIFIER) { | ||
625 | voyager_8slot = 1; | ||
626 | printk(KERN_NOTICE | ||
627 | "Voyager: Eight slot 51xx configuration detected\n"); | ||
628 | } | ||
629 | |||
630 | for (i = VOYAGER_MIN_MODULE; i <= VOYAGER_MAX_MODULE; i++) { | ||
631 | __u8 input; | ||
632 | int asic; | ||
633 | __u16 eprom_size; | ||
634 | __u16 sp_offset; | ||
635 | |||
636 | outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT); | ||
637 | outb(i, VOYAGER_CAT_CONFIG_PORT); | ||
638 | |||
639 | /* check the presence of the module */ | ||
640 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
641 | outb(VOYAGER_CAT_IRCYC, CAT_CMD); | ||
642 | outb(VOYAGER_CAT_HEADER, CAT_DATA); | ||
643 | /* stream series of alternating 1's and 0's to stimulate | ||
644 | * response */ | ||
645 | outb(0xAA, CAT_DATA); | ||
646 | input = inb(CAT_DATA); | ||
647 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
648 | if (input != VOYAGER_CAT_HEADER) { | ||
649 | continue; | ||
650 | } | ||
651 | CDEBUG(("VOYAGER DEBUG: found module id 0x%x, %s\n", i, | ||
652 | cat_module_name(i))); | ||
653 | *modpp = kmalloc(sizeof(voyager_module_t), GFP_KERNEL); /*&voyager_module_storage[cat_count++]; */ | ||
654 | if (*modpp == NULL) { | ||
655 | printk("**WARNING** kmalloc failure in cat_init\n"); | ||
656 | continue; | ||
657 | } | ||
658 | memset(*modpp, 0, sizeof(voyager_module_t)); | ||
659 | /* need temporary asic for cat_subread. It will be | ||
660 | * filled in correctly later */ | ||
661 | (*modpp)->asic = kmalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count]; */ | ||
662 | if ((*modpp)->asic == NULL) { | ||
663 | printk("**WARNING** kmalloc failure in cat_init\n"); | ||
664 | continue; | ||
665 | } | ||
666 | memset((*modpp)->asic, 0, sizeof(voyager_asic_t)); | ||
667 | (*modpp)->asic->asic_id = VOYAGER_CAT_ID; | ||
668 | (*modpp)->asic->subaddr = VOYAGER_SUBADDR_HI; | ||
669 | (*modpp)->module_addr = i; | ||
670 | (*modpp)->scan_path_connected = 0; | ||
671 | if (i == VOYAGER_PSI) { | ||
672 | /* Exception leg for modules with no EEPROM */ | ||
673 | printk("Module \"%s\"\n", cat_module_name(i)); | ||
674 | continue; | ||
675 | } | ||
676 | |||
677 | CDEBUG(("cat_init: Reading eeprom for module 0x%x at offset %d\n", i, VOYAGER_XSUM_END_OFFSET)); | ||
678 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
679 | cat_disconnect(*modpp, (*modpp)->asic); | ||
680 | if (cat_subread(*modpp, (*modpp)->asic, | ||
681 | VOYAGER_XSUM_END_OFFSET, sizeof(eprom_size), | ||
682 | &eprom_size)) { | ||
683 | printk | ||
684 | ("**WARNING**: Voyager couldn't read EPROM size for module 0x%x\n", | ||
685 | i); | ||
686 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
687 | continue; | ||
688 | } | ||
689 | if (eprom_size > sizeof(eprom_buf)) { | ||
690 | printk | ||
691 | ("**WARNING**: Voyager insufficient size to read EPROM data, module 0x%x. Need %d\n", | ||
692 | i, eprom_size); | ||
693 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
694 | continue; | ||
695 | } | ||
696 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
697 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
698 | CDEBUG(("cat_init: module 0x%x, eeprom_size %d\n", i, | ||
699 | eprom_size)); | ||
700 | if (cat_subread | ||
701 | (*modpp, (*modpp)->asic, 0, eprom_size, eprom_buf)) { | ||
702 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
703 | continue; | ||
704 | } | ||
705 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
706 | printk("Module \"%s\", version 0x%x, tracer 0x%x, asics %d\n", | ||
707 | cat_module_name(i), eprom_hdr->version_id, | ||
708 | *((__u32 *) eprom_hdr->tracer), eprom_hdr->num_asics); | ||
709 | (*modpp)->ee_size = eprom_hdr->ee_size; | ||
710 | (*modpp)->num_asics = eprom_hdr->num_asics; | ||
711 | asicpp = &((*modpp)->asic); | ||
712 | sp_offset = eprom_hdr->scan_path_offset; | ||
713 | /* All we really care about are the Quad cards. We | ||
714 | * identify them because they are in a processor slot | ||
715 | * and have only four asics */ | ||
716 | if ((i < 0x10 || (i >= 0x14 && i < 0x1c) || i > 0x1f)) { | ||
717 | modpp = &((*modpp)->next); | ||
718 | continue; | ||
719 | } | ||
720 | /* Now we know it's in a processor slot, does it have | ||
721 | * a quad baseboard submodule */ | ||
722 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
723 | cat_read(*modpp, (*modpp)->asic, VOYAGER_SUBMODPRESENT, | ||
724 | &num_submodules); | ||
725 | /* lowest two bits, active low */ | ||
726 | num_submodules = ~(0xfc | num_submodules); | ||
727 | CDEBUG(("VOYAGER CAT: %d submodules present\n", | ||
728 | num_submodules)); | ||
729 | if (num_submodules == 0) { | ||
730 | /* fill in the dyadic extended processors */ | ||
731 | __u8 cpu = i & 0x07; | ||
732 | |||
733 | printk("Module \"%s\": Dyadic Processor Card\n", | ||
734 | cat_module_name(i)); | ||
735 | voyager_extended_vic_processors |= (1 << cpu); | ||
736 | cpu += 4; | ||
737 | voyager_extended_vic_processors |= (1 << cpu); | ||
738 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
739 | continue; | ||
740 | } | ||
741 | |||
742 | /* now we want to read the asics on the first submodule, | ||
743 | * which should be the quad base board */ | ||
744 | |||
745 | cat_read(*modpp, (*modpp)->asic, VOYAGER_SUBMODSELECT, &val); | ||
746 | CDEBUG(("cat_init: SUBMODSELECT value = 0x%x\n", val)); | ||
747 | val = (val & 0x7c) | VOYAGER_QUAD_BASEBOARD; | ||
748 | cat_write(*modpp, (*modpp)->asic, VOYAGER_SUBMODSELECT, val); | ||
749 | |||
750 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
751 | |||
752 | CDEBUG(("cat_init: Reading eeprom for module 0x%x at offset %d\n", i, VOYAGER_XSUM_END_OFFSET)); | ||
753 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
754 | cat_disconnect(*modpp, (*modpp)->asic); | ||
755 | if (cat_subread(*modpp, (*modpp)->asic, | ||
756 | VOYAGER_XSUM_END_OFFSET, sizeof(eprom_size), | ||
757 | &eprom_size)) { | ||
758 | printk | ||
759 | ("**WARNING**: Voyager couldn't read EPROM size for module 0x%x\n", | ||
760 | i); | ||
761 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
762 | continue; | ||
763 | } | ||
764 | if (eprom_size > sizeof(eprom_buf)) { | ||
765 | printk | ||
766 | ("**WARNING**: Voyager insufficient size to read EPROM data, module 0x%x. Need %d\n", | ||
767 | i, eprom_size); | ||
768 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
769 | continue; | ||
770 | } | ||
771 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
772 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
773 | CDEBUG(("cat_init: module 0x%x, eeprom_size %d\n", i, | ||
774 | eprom_size)); | ||
775 | if (cat_subread | ||
776 | (*modpp, (*modpp)->asic, 0, eprom_size, eprom_buf)) { | ||
777 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
778 | continue; | ||
779 | } | ||
780 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
781 | /* Now do everything for the QBB submodule 1 */ | ||
782 | (*modpp)->ee_size = eprom_hdr->ee_size; | ||
783 | (*modpp)->num_asics = eprom_hdr->num_asics; | ||
784 | asicpp = &((*modpp)->asic); | ||
785 | sp_offset = eprom_hdr->scan_path_offset; | ||
786 | /* get rid of the dummy CAT asic and read the real one */ | ||
787 | kfree((*modpp)->asic); | ||
788 | for (asic = 0; asic < (*modpp)->num_asics; asic++) { | ||
789 | int j; | ||
790 | voyager_asic_t *asicp = *asicpp = kzalloc(sizeof(voyager_asic_t), GFP_KERNEL); /*&voyager_asic_storage[asic_count++]; */ | ||
791 | voyager_sp_table_t *sp_table; | ||
792 | voyager_at_t *asic_table; | ||
793 | voyager_jtt_t *jtag_table; | ||
794 | |||
795 | if (asicp == NULL) { | ||
796 | printk | ||
797 | ("**WARNING** kmalloc failure in cat_init\n"); | ||
798 | continue; | ||
799 | } | ||
800 | asicpp = &(asicp->next); | ||
801 | asicp->asic_location = asic; | ||
802 | sp_table = | ||
803 | (voyager_sp_table_t *) (eprom_buf + sp_offset); | ||
804 | asicp->asic_id = sp_table->asic_id; | ||
805 | asic_table = | ||
806 | (voyager_at_t *) (eprom_buf + | ||
807 | sp_table->asic_data_offset); | ||
808 | for (j = 0; j < 4; j++) | ||
809 | asicp->jtag_id[j] = asic_table->jtag_id[j]; | ||
810 | jtag_table = | ||
811 | (voyager_jtt_t *) (eprom_buf + | ||
812 | asic_table->jtag_offset); | ||
813 | asicp->ireg_length = jtag_table->ireg_len; | ||
814 | asicp->bit_location = (*modpp)->inst_bits; | ||
815 | (*modpp)->inst_bits += asicp->ireg_length; | ||
816 | if (asicp->ireg_length > (*modpp)->largest_reg) | ||
817 | (*modpp)->largest_reg = asicp->ireg_length; | ||
818 | if (asicp->ireg_length < (*modpp)->smallest_reg || | ||
819 | (*modpp)->smallest_reg == 0) | ||
820 | (*modpp)->smallest_reg = asicp->ireg_length; | ||
821 | CDEBUG(("asic 0x%x, ireg_length=%d, bit_location=%d\n", | ||
822 | asicp->asic_id, asicp->ireg_length, | ||
823 | asicp->bit_location)); | ||
824 | if (asicp->asic_id == VOYAGER_QUAD_QABC) { | ||
825 | CDEBUG(("VOYAGER CAT: QABC ASIC found\n")); | ||
826 | qabc_asic = asicp; | ||
827 | } | ||
828 | sp_offset += sizeof(voyager_sp_table_t); | ||
829 | } | ||
830 | CDEBUG(("Module inst_bits = %d, largest_reg = %d, smallest_reg=%d\n", (*modpp)->inst_bits, (*modpp)->largest_reg, (*modpp)->smallest_reg)); | ||
831 | /* OK, now we have the QUAD ASICs set up, use them. | ||
832 | * we need to: | ||
833 | * | ||
834 | * 1. Find the Memory area for the Quad CPIs. | ||
835 | * 2. Find the Extended VIC processor | ||
836 | * 3. Configure a second extended VIC processor (This | ||
837 | * cannot be done for the 51xx. | ||
838 | * */ | ||
839 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
840 | cat_connect(*modpp, (*modpp)->asic); | ||
841 | CDEBUG(("CAT CONNECTED!!\n")); | ||
842 | cat_subread(*modpp, qabc_asic, 0, sizeof(qabc_data), qabc_data); | ||
843 | qic_addr = qabc_data[5] << 8; | ||
844 | qic_addr = (qic_addr | qabc_data[6]) << 8; | ||
845 | qic_addr = (qic_addr | qabc_data[7]) << 8; | ||
846 | printk | ||
847 | ("Module \"%s\": Quad Processor Card; CPI 0x%lx, SET=0x%x\n", | ||
848 | cat_module_name(i), qic_addr, qabc_data[8]); | ||
849 | #if 0 /* plumbing fails---FIXME */ | ||
850 | if ((qabc_data[8] & 0xf0) == 0) { | ||
851 | /* FIXME: 32 way 8 CPU slot monster cannot be | ||
852 | * plumbed this way---need to check for it */ | ||
853 | |||
854 | printk("Plumbing second Extended Quad Processor\n"); | ||
855 | /* second VIC line hardwired to Quad CPU 1 */ | ||
856 | qabc_data[8] |= 0x20; | ||
857 | cat_subwrite(*modpp, qabc_asic, 8, 1, &qabc_data[8]); | ||
858 | #ifdef VOYAGER_CAT_DEBUG | ||
859 | /* verify plumbing */ | ||
860 | cat_subread(*modpp, qabc_asic, 8, 1, &qabc_data[8]); | ||
861 | if ((qabc_data[8] & 0xf0) == 0) { | ||
862 | CDEBUG(("PLUMBING FAILED: 0x%x\n", | ||
863 | qabc_data[8])); | ||
864 | } | ||
865 | #endif | ||
866 | } | ||
867 | #endif | ||
868 | |||
869 | { | ||
870 | struct resource *res = | ||
871 | kzalloc(sizeof(struct resource), GFP_KERNEL); | ||
872 | res->name = kmalloc(128, GFP_KERNEL); | ||
873 | sprintf((char *)res->name, "Voyager %s Quad CPI", | ||
874 | cat_module_name(i)); | ||
875 | res->start = qic_addr; | ||
876 | res->end = qic_addr + 0x3ff; | ||
877 | request_resource(&iomem_resource, res); | ||
878 | } | ||
879 | |||
880 | qic_addr = (unsigned long)ioremap_cache(qic_addr, 0x400); | ||
881 | |||
882 | for (j = 0; j < 4; j++) { | ||
883 | __u8 cpu; | ||
884 | |||
885 | if (voyager_8slot) { | ||
886 | /* 8 slot has a different mapping, | ||
887 | * each slot has only one vic line, so | ||
888 | * 1 cpu in each slot must be < 8 */ | ||
889 | cpu = (i & 0x07) + j * 8; | ||
890 | } else { | ||
891 | cpu = (i & 0x03) + j * 4; | ||
892 | } | ||
893 | if ((qabc_data[8] & (1 << j))) { | ||
894 | voyager_extended_vic_processors |= (1 << cpu); | ||
895 | } | ||
896 | if (qabc_data[8] & (1 << (j + 4))) { | ||
897 | /* Second SET register plumbed: Quad | ||
898 | * card has two VIC connected CPUs. | ||
899 | * Secondary cannot be booted as a VIC | ||
900 | * CPU */ | ||
901 | voyager_extended_vic_processors |= (1 << cpu); | ||
902 | voyager_allowed_boot_processors &= | ||
903 | (~(1 << cpu)); | ||
904 | } | ||
905 | |||
906 | voyager_quad_processors |= (1 << cpu); | ||
907 | voyager_quad_cpi_addr[cpu] = (struct voyager_qic_cpi *) | ||
908 | (qic_addr + (j << 8)); | ||
909 | CDEBUG(("CPU%d: CPI address 0x%lx\n", cpu, | ||
910 | (unsigned long)voyager_quad_cpi_addr[cpu])); | ||
911 | } | ||
912 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
913 | |||
914 | *asicpp = NULL; | ||
915 | modpp = &((*modpp)->next); | ||
916 | } | ||
917 | *modpp = NULL; | ||
918 | printk | ||
919 | ("CAT Bus Initialisation finished: extended procs 0x%x, quad procs 0x%x, allowed vic boot = 0x%x\n", | ||
920 | voyager_extended_vic_processors, voyager_quad_processors, | ||
921 | voyager_allowed_boot_processors); | ||
922 | request_resource(&ioport_resource, &vic_res); | ||
923 | if (voyager_quad_processors) | ||
924 | request_resource(&ioport_resource, &qic_res); | ||
925 | /* set up the front power switch */ | ||
926 | } | ||
927 | |||
928 | int voyager_cat_readb(__u8 module, __u8 asic, int reg) | ||
929 | { | ||
930 | return 0; | ||
931 | } | ||
932 | |||
933 | static int cat_disconnect(voyager_module_t * modp, voyager_asic_t * asicp) | ||
934 | { | ||
935 | __u8 val; | ||
936 | int err = 0; | ||
937 | |||
938 | if (!modp->scan_path_connected) | ||
939 | return 0; | ||
940 | if (asicp->asic_id != VOYAGER_CAT_ID) { | ||
941 | CDEBUG(("cat_disconnect: ASIC is not CAT\n")); | ||
942 | return 1; | ||
943 | } | ||
944 | err = cat_read(modp, asicp, VOYAGER_SCANPATH, &val); | ||
945 | if (err) { | ||
946 | CDEBUG(("cat_disconnect: failed to read SCANPATH\n")); | ||
947 | return err; | ||
948 | } | ||
949 | val &= VOYAGER_DISCONNECT_ASIC; | ||
950 | err = cat_write(modp, asicp, VOYAGER_SCANPATH, val); | ||
951 | if (err) { | ||
952 | CDEBUG(("cat_disconnect: failed to write SCANPATH\n")); | ||
953 | return err; | ||
954 | } | ||
955 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
956 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
957 | modp->scan_path_connected = 0; | ||
958 | |||
959 | return 0; | ||
960 | } | ||
961 | |||
962 | static int cat_connect(voyager_module_t * modp, voyager_asic_t * asicp) | ||
963 | { | ||
964 | __u8 val; | ||
965 | int err = 0; | ||
966 | |||
967 | if (modp->scan_path_connected) | ||
968 | return 0; | ||
969 | if (asicp->asic_id != VOYAGER_CAT_ID) { | ||
970 | CDEBUG(("cat_connect: ASIC is not CAT\n")); | ||
971 | return 1; | ||
972 | } | ||
973 | |||
974 | err = cat_read(modp, asicp, VOYAGER_SCANPATH, &val); | ||
975 | if (err) { | ||
976 | CDEBUG(("cat_connect: failed to read SCANPATH\n")); | ||
977 | return err; | ||
978 | } | ||
979 | val |= VOYAGER_CONNECT_ASIC; | ||
980 | err = cat_write(modp, asicp, VOYAGER_SCANPATH, val); | ||
981 | if (err) { | ||
982 | CDEBUG(("cat_connect: failed to write SCANPATH\n")); | ||
983 | return err; | ||
984 | } | ||
985 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
986 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
987 | modp->scan_path_connected = 1; | ||
988 | |||
989 | return 0; | ||
990 | } | ||
991 | |||
992 | void voyager_cat_power_off(void) | ||
993 | { | ||
994 | /* Power the machine off by writing to the PSI over the CAT | ||
995 | * bus */ | ||
996 | __u8 data; | ||
997 | voyager_module_t psi = { 0 }; | ||
998 | voyager_asic_t psi_asic = { 0 }; | ||
999 | |||
1000 | psi.asic = &psi_asic; | ||
1001 | psi.asic->asic_id = VOYAGER_CAT_ID; | ||
1002 | psi.asic->subaddr = VOYAGER_SUBADDR_HI; | ||
1003 | psi.module_addr = VOYAGER_PSI; | ||
1004 | psi.scan_path_connected = 0; | ||
1005 | |||
1006 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1007 | /* Connect the PSI to the CAT Bus */ | ||
1008 | outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT); | ||
1009 | outb(VOYAGER_PSI, VOYAGER_CAT_CONFIG_PORT); | ||
1010 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1011 | cat_disconnect(&psi, &psi_asic); | ||
1012 | /* Read the status */ | ||
1013 | cat_subread(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, 1, &data); | ||
1014 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1015 | CDEBUG(("PSI STATUS 0x%x\n", data)); | ||
1016 | /* These two writes are power off prep and perform */ | ||
1017 | data = PSI_CLEAR; | ||
1018 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1019 | cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, 1, &data); | ||
1020 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1021 | data = PSI_POWER_DOWN; | ||
1022 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1023 | cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, 1, &data); | ||
1024 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1025 | } | ||
1026 | |||
1027 | struct voyager_status voyager_status = { 0 }; | ||
1028 | |||
1029 | void voyager_cat_psi(__u8 cmd, __u16 reg, __u8 * data) | ||
1030 | { | ||
1031 | voyager_module_t psi = { 0 }; | ||
1032 | voyager_asic_t psi_asic = { 0 }; | ||
1033 | |||
1034 | psi.asic = &psi_asic; | ||
1035 | psi.asic->asic_id = VOYAGER_CAT_ID; | ||
1036 | psi.asic->subaddr = VOYAGER_SUBADDR_HI; | ||
1037 | psi.module_addr = VOYAGER_PSI; | ||
1038 | psi.scan_path_connected = 0; | ||
1039 | |||
1040 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1041 | /* Connect the PSI to the CAT Bus */ | ||
1042 | outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT); | ||
1043 | outb(VOYAGER_PSI, VOYAGER_CAT_CONFIG_PORT); | ||
1044 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1045 | cat_disconnect(&psi, &psi_asic); | ||
1046 | switch (cmd) { | ||
1047 | case VOYAGER_PSI_READ: | ||
1048 | cat_read(&psi, &psi_asic, reg, data); | ||
1049 | break; | ||
1050 | case VOYAGER_PSI_WRITE: | ||
1051 | cat_write(&psi, &psi_asic, reg, *data); | ||
1052 | break; | ||
1053 | case VOYAGER_PSI_SUBREAD: | ||
1054 | cat_subread(&psi, &psi_asic, reg, 1, data); | ||
1055 | break; | ||
1056 | case VOYAGER_PSI_SUBWRITE: | ||
1057 | cat_subwrite(&psi, &psi_asic, reg, 1, data); | ||
1058 | break; | ||
1059 | default: | ||
1060 | printk(KERN_ERR "Voyager PSI, unrecognised command %d\n", cmd); | ||
1061 | break; | ||
1062 | } | ||
1063 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1064 | } | ||
1065 | |||
1066 | void voyager_cat_do_common_interrupt(void) | ||
1067 | { | ||
1068 | /* This is caused either by a memory parity error or something | ||
1069 | * in the PSI */ | ||
1070 | __u8 data; | ||
1071 | voyager_module_t psi = { 0 }; | ||
1072 | voyager_asic_t psi_asic = { 0 }; | ||
1073 | struct voyager_psi psi_reg; | ||
1074 | int i; | ||
1075 | re_read: | ||
1076 | psi.asic = &psi_asic; | ||
1077 | psi.asic->asic_id = VOYAGER_CAT_ID; | ||
1078 | psi.asic->subaddr = VOYAGER_SUBADDR_HI; | ||
1079 | psi.module_addr = VOYAGER_PSI; | ||
1080 | psi.scan_path_connected = 0; | ||
1081 | |||
1082 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1083 | /* Connect the PSI to the CAT Bus */ | ||
1084 | outb(VOYAGER_CAT_DESELECT, VOYAGER_CAT_CONFIG_PORT); | ||
1085 | outb(VOYAGER_PSI, VOYAGER_CAT_CONFIG_PORT); | ||
1086 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1087 | cat_disconnect(&psi, &psi_asic); | ||
1088 | /* Read the status. NOTE: Need to read *all* the PSI regs here | ||
1089 | * otherwise the cmn int will be reasserted */ | ||
1090 | for (i = 0; i < sizeof(psi_reg.regs); i++) { | ||
1091 | cat_read(&psi, &psi_asic, i, &((__u8 *) & psi_reg.regs)[i]); | ||
1092 | } | ||
1093 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1094 | if ((psi_reg.regs.checkbit & 0x02) == 0) { | ||
1095 | psi_reg.regs.checkbit |= 0x02; | ||
1096 | cat_write(&psi, &psi_asic, 5, psi_reg.regs.checkbit); | ||
1097 | printk("VOYAGER RE-READ PSI\n"); | ||
1098 | goto re_read; | ||
1099 | } | ||
1100 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1101 | for (i = 0; i < sizeof(psi_reg.subregs); i++) { | ||
1102 | /* This looks strange, but the PSI doesn't do auto increment | ||
1103 | * correctly */ | ||
1104 | cat_subread(&psi, &psi_asic, VOYAGER_PSI_SUPPLY_REG + i, | ||
1105 | 1, &((__u8 *) & psi_reg.subregs)[i]); | ||
1106 | } | ||
1107 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1108 | #ifdef VOYAGER_CAT_DEBUG | ||
1109 | printk("VOYAGER PSI: "); | ||
1110 | for (i = 0; i < sizeof(psi_reg.regs); i++) | ||
1111 | printk("%02x ", ((__u8 *) & psi_reg.regs)[i]); | ||
1112 | printk("\n "); | ||
1113 | for (i = 0; i < sizeof(psi_reg.subregs); i++) | ||
1114 | printk("%02x ", ((__u8 *) & psi_reg.subregs)[i]); | ||
1115 | printk("\n"); | ||
1116 | #endif | ||
1117 | if (psi_reg.regs.intstatus & PSI_MON) { | ||
1118 | /* switch off or power fail */ | ||
1119 | |||
1120 | if (psi_reg.subregs.supply & PSI_SWITCH_OFF) { | ||
1121 | if (voyager_status.switch_off) { | ||
1122 | printk(KERN_ERR | ||
1123 | "Voyager front panel switch turned off again---Immediate power off!\n"); | ||
1124 | voyager_cat_power_off(); | ||
1125 | /* not reached */ | ||
1126 | } else { | ||
1127 | printk(KERN_ERR | ||
1128 | "Voyager front panel switch turned off\n"); | ||
1129 | voyager_status.switch_off = 1; | ||
1130 | voyager_status.request_from_kernel = 1; | ||
1131 | wake_up_process(voyager_thread); | ||
1132 | } | ||
1133 | /* Tell the hardware we're taking care of the | ||
1134 | * shutdown, otherwise it will power the box off | ||
1135 | * within 3 seconds of the switch being pressed and, | ||
1136 | * which is much more important to us, continue to | ||
1137 | * assert the common interrupt */ | ||
1138 | data = PSI_CLR_SWITCH_OFF; | ||
1139 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1140 | cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_SUPPLY_REG, | ||
1141 | 1, &data); | ||
1142 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1143 | } else { | ||
1144 | |||
1145 | VDEBUG(("Voyager ac fail reg 0x%x\n", | ||
1146 | psi_reg.subregs.ACfail)); | ||
1147 | if ((psi_reg.subregs.ACfail & AC_FAIL_STAT_CHANGE) == 0) { | ||
1148 | /* No further update */ | ||
1149 | return; | ||
1150 | } | ||
1151 | #if 0 | ||
1152 | /* Don't bother trying to find out who failed. | ||
1153 | * FIXME: This probably makes the code incorrect on | ||
1154 | * anything other than a 345x */ | ||
1155 | for (i = 0; i < 5; i++) { | ||
1156 | if (psi_reg.subregs.ACfail & (1 << i)) { | ||
1157 | break; | ||
1158 | } | ||
1159 | } | ||
1160 | printk(KERN_NOTICE "AC FAIL IN SUPPLY %d\n", i); | ||
1161 | #endif | ||
1162 | /* DON'T do this: it shuts down the AC PSI | ||
1163 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1164 | data = PSI_MASK_MASK | i; | ||
1165 | cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_MASK, | ||
1166 | 1, &data); | ||
1167 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1168 | */ | ||
1169 | printk(KERN_ERR "Voyager AC power failure\n"); | ||
1170 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1171 | data = PSI_COLD_START; | ||
1172 | cat_subwrite(&psi, &psi_asic, VOYAGER_PSI_GENERAL_REG, | ||
1173 | 1, &data); | ||
1174 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1175 | voyager_status.power_fail = 1; | ||
1176 | voyager_status.request_from_kernel = 1; | ||
1177 | wake_up_process(voyager_thread); | ||
1178 | } | ||
1179 | |||
1180 | } else if (psi_reg.regs.intstatus & PSI_FAULT) { | ||
1181 | /* Major fault! */ | ||
1182 | printk(KERN_ERR | ||
1183 | "Voyager PSI Detected major fault, immediate power off!\n"); | ||
1184 | voyager_cat_power_off(); | ||
1185 | /* not reached */ | ||
1186 | } else if (psi_reg.regs.intstatus & (PSI_DC_FAIL | PSI_ALARM | ||
1187 | | PSI_CURRENT | PSI_DVM | ||
1188 | | PSI_PSCFAULT | PSI_STAT_CHG)) { | ||
1189 | /* other psi fault */ | ||
1190 | |||
1191 | printk(KERN_WARNING "Voyager PSI status 0x%x\n", data); | ||
1192 | /* clear the PSI fault */ | ||
1193 | outb(VOYAGER_CAT_RUN, CAT_CMD); | ||
1194 | cat_write(&psi, &psi_asic, VOYAGER_PSI_STATUS_REG, 0); | ||
1195 | outb(VOYAGER_CAT_END, CAT_CMD); | ||
1196 | } | ||
1197 | } | ||
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c deleted file mode 100644 index 6f5a38c7f900..000000000000 --- a/arch/x86/mach-voyager/voyager_smp.c +++ /dev/null | |||
@@ -1,1804 +0,0 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8 -*- */ | ||
2 | |||
3 | /* Copyright (C) 1999,2001 | ||
4 | * | ||
5 | * Author: J.E.J.Bottomley@HansenPartnership.com | ||
6 | * | ||
7 | * This file provides all the same external entries as smp.c but uses | ||
8 | * the voyager hal to provide the functionality | ||
9 | */ | ||
10 | #include <linux/cpu.h> | ||
11 | #include <linux/module.h> | ||
12 | #include <linux/mm.h> | ||
13 | #include <linux/kernel_stat.h> | ||
14 | #include <linux/delay.h> | ||
15 | #include <linux/mc146818rtc.h> | ||
16 | #include <linux/cache.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <linux/bootmem.h> | ||
21 | #include <linux/completion.h> | ||
22 | #include <asm/desc.h> | ||
23 | #include <asm/voyager.h> | ||
24 | #include <asm/vic.h> | ||
25 | #include <asm/mtrr.h> | ||
26 | #include <asm/pgalloc.h> | ||
27 | #include <asm/tlbflush.h> | ||
28 | #include <asm/arch_hooks.h> | ||
29 | #include <asm/trampoline.h> | ||
30 | |||
31 | /* TLB state -- visible externally, indexed physically */ | ||
32 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = { &init_mm, 0 }; | ||
33 | |||
34 | /* CPU IRQ affinity -- set to all ones initially */ | ||
35 | static unsigned long cpu_irq_affinity[NR_CPUS] __cacheline_aligned = | ||
36 | {[0 ... NR_CPUS-1] = ~0UL }; | ||
37 | |||
38 | /* per CPU data structure (for /proc/cpuinfo et al), visible externally | ||
39 | * indexed physically */ | ||
40 | DEFINE_PER_CPU_SHARED_ALIGNED(struct cpuinfo_x86, cpu_info); | ||
41 | EXPORT_PER_CPU_SYMBOL(cpu_info); | ||
42 | |||
43 | /* physical ID of the CPU used to boot the system */ | ||
44 | unsigned char boot_cpu_id; | ||
45 | |||
46 | /* The memory line addresses for the Quad CPIs */ | ||
47 | struct voyager_qic_cpi *voyager_quad_cpi_addr[NR_CPUS] __cacheline_aligned; | ||
48 | |||
49 | /* The masks for the Extended VIC processors, filled in by cat_init */ | ||
50 | __u32 voyager_extended_vic_processors = 0; | ||
51 | |||
52 | /* Masks for the extended Quad processors which cannot be VIC booted */ | ||
53 | __u32 voyager_allowed_boot_processors = 0; | ||
54 | |||
55 | /* The mask for the Quad Processors (both extended and non-extended) */ | ||
56 | __u32 voyager_quad_processors = 0; | ||
57 | |||
58 | /* Total count of live CPUs, used in process.c to display | ||
59 | * the CPU information and in irq.c for the per CPU irq | ||
60 | * activity count. Finally exported by i386_ksyms.c */ | ||
61 | static int voyager_extended_cpus = 1; | ||
62 | |||
63 | /* Used for the invalidate map that's also checked in the spinlock */ | ||
64 | static volatile unsigned long smp_invalidate_needed; | ||
65 | |||
66 | /* Bitmask of CPUs present in the system - exported by i386_syms.c, used | ||
67 | * by scheduler but indexed physically */ | ||
68 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | ||
69 | |||
70 | /* The internal functions */ | ||
71 | static void send_CPI(__u32 cpuset, __u8 cpi); | ||
72 | static void ack_CPI(__u8 cpi); | ||
73 | static int ack_QIC_CPI(__u8 cpi); | ||
74 | static void ack_special_QIC_CPI(__u8 cpi); | ||
75 | static void ack_VIC_CPI(__u8 cpi); | ||
76 | static void send_CPI_allbutself(__u8 cpi); | ||
77 | static void mask_vic_irq(unsigned int irq); | ||
78 | static void unmask_vic_irq(unsigned int irq); | ||
79 | static unsigned int startup_vic_irq(unsigned int irq); | ||
80 | static void enable_local_vic_irq(unsigned int irq); | ||
81 | static void disable_local_vic_irq(unsigned int irq); | ||
82 | static void before_handle_vic_irq(unsigned int irq); | ||
83 | static void after_handle_vic_irq(unsigned int irq); | ||
84 | static void set_vic_irq_affinity(unsigned int irq, const struct cpumask *mask); | ||
85 | static void ack_vic_irq(unsigned int irq); | ||
86 | static void vic_enable_cpi(void); | ||
87 | static void do_boot_cpu(__u8 cpuid); | ||
88 | static void do_quad_bootstrap(void); | ||
89 | static void initialize_secondary(void); | ||
90 | |||
91 | int hard_smp_processor_id(void); | ||
92 | int safe_smp_processor_id(void); | ||
93 | |||
94 | /* Inline functions */ | ||
95 | static inline void send_one_QIC_CPI(__u8 cpu, __u8 cpi) | ||
96 | { | ||
97 | voyager_quad_cpi_addr[cpu]->qic_cpi[cpi].cpi = | ||
98 | (smp_processor_id() << 16) + cpi; | ||
99 | } | ||
100 | |||
101 | static inline void send_QIC_CPI(__u32 cpuset, __u8 cpi) | ||
102 | { | ||
103 | int cpu; | ||
104 | |||
105 | for_each_online_cpu(cpu) { | ||
106 | if (cpuset & (1 << cpu)) { | ||
107 | #ifdef VOYAGER_DEBUG | ||
108 | if (!cpu_online(cpu)) | ||
109 | VDEBUG(("CPU%d sending cpi %d to CPU%d not in " | ||
110 | "cpu_online_map\n", | ||
111 | hard_smp_processor_id(), cpi, cpu)); | ||
112 | #endif | ||
113 | send_one_QIC_CPI(cpu, cpi - QIC_CPI_OFFSET); | ||
114 | } | ||
115 | } | ||
116 | } | ||
117 | |||
118 | static inline void wrapper_smp_local_timer_interrupt(void) | ||
119 | { | ||
120 | irq_enter(); | ||
121 | smp_local_timer_interrupt(); | ||
122 | irq_exit(); | ||
123 | } | ||
124 | |||
125 | static inline void send_one_CPI(__u8 cpu, __u8 cpi) | ||
126 | { | ||
127 | if (voyager_quad_processors & (1 << cpu)) | ||
128 | send_one_QIC_CPI(cpu, cpi - QIC_CPI_OFFSET); | ||
129 | else | ||
130 | send_CPI(1 << cpu, cpi); | ||
131 | } | ||
132 | |||
133 | static inline void send_CPI_allbutself(__u8 cpi) | ||
134 | { | ||
135 | __u8 cpu = smp_processor_id(); | ||
136 | __u32 mask = cpus_addr(cpu_online_map)[0] & ~(1 << cpu); | ||
137 | send_CPI(mask, cpi); | ||
138 | } | ||
139 | |||
140 | static inline int is_cpu_quad(void) | ||
141 | { | ||
142 | __u8 cpumask = inb(VIC_PROC_WHO_AM_I); | ||
143 | return ((cpumask & QUAD_IDENTIFIER) == QUAD_IDENTIFIER); | ||
144 | } | ||
145 | |||
146 | static inline int is_cpu_extended(void) | ||
147 | { | ||
148 | __u8 cpu = hard_smp_processor_id(); | ||
149 | |||
150 | return (voyager_extended_vic_processors & (1 << cpu)); | ||
151 | } | ||
152 | |||
153 | static inline int is_cpu_vic_boot(void) | ||
154 | { | ||
155 | __u8 cpu = hard_smp_processor_id(); | ||
156 | |||
157 | return (voyager_extended_vic_processors | ||
158 | & voyager_allowed_boot_processors & (1 << cpu)); | ||
159 | } | ||
160 | |||
161 | static inline void ack_CPI(__u8 cpi) | ||
162 | { | ||
163 | switch (cpi) { | ||
164 | case VIC_CPU_BOOT_CPI: | ||
165 | if (is_cpu_quad() && !is_cpu_vic_boot()) | ||
166 | ack_QIC_CPI(cpi); | ||
167 | else | ||
168 | ack_VIC_CPI(cpi); | ||
169 | break; | ||
170 | case VIC_SYS_INT: | ||
171 | case VIC_CMN_INT: | ||
172 | /* These are slightly strange. Even on the Quad card, | ||
173 | * They are vectored as VIC CPIs */ | ||
174 | if (is_cpu_quad()) | ||
175 | ack_special_QIC_CPI(cpi); | ||
176 | else | ||
177 | ack_VIC_CPI(cpi); | ||
178 | break; | ||
179 | default: | ||
180 | printk("VOYAGER ERROR: CPI%d is in common CPI code\n", cpi); | ||
181 | break; | ||
182 | } | ||
183 | } | ||
184 | |||
185 | /* local variables */ | ||
186 | |||
187 | /* The VIC IRQ descriptors -- these look almost identical to the | ||
188 | * 8259 IRQs except that masks and things must be kept per processor | ||
189 | */ | ||
190 | static struct irq_chip vic_chip = { | ||
191 | .name = "VIC", | ||
192 | .startup = startup_vic_irq, | ||
193 | .mask = mask_vic_irq, | ||
194 | .unmask = unmask_vic_irq, | ||
195 | .set_affinity = set_vic_irq_affinity, | ||
196 | }; | ||
197 | |||
198 | /* used to count up as CPUs are brought on line (starts at 0) */ | ||
199 | static int cpucount = 0; | ||
200 | |||
201 | /* The per cpu profile stuff - used in smp_local_timer_interrupt */ | ||
202 | static DEFINE_PER_CPU(int, prof_multiplier) = 1; | ||
203 | static DEFINE_PER_CPU(int, prof_old_multiplier) = 1; | ||
204 | static DEFINE_PER_CPU(int, prof_counter) = 1; | ||
205 | |||
206 | /* the map used to check if a CPU has booted */ | ||
207 | static __u32 cpu_booted_map; | ||
208 | |||
209 | /* the synchronize flag used to hold all secondary CPUs spinning in | ||
210 | * a tight loop until the boot sequence is ready for them */ | ||
211 | static cpumask_t smp_commenced_mask = CPU_MASK_NONE; | ||
212 | |||
213 | /* This is for the new dynamic CPU boot code */ | ||
214 | |||
215 | /* The per processor IRQ masks (these are usually kept in sync) */ | ||
216 | static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned; | ||
217 | |||
218 | /* the list of IRQs to be enabled by the VIC_ENABLE_IRQ_CPI */ | ||
219 | static __u16 vic_irq_enable_mask[NR_CPUS] __cacheline_aligned = { 0 }; | ||
220 | |||
221 | /* Lock for enable/disable of VIC interrupts */ | ||
222 | static __cacheline_aligned DEFINE_SPINLOCK(vic_irq_lock); | ||
223 | |||
224 | /* The boot processor is correctly set up in PC mode when it | ||
225 | * comes up, but the secondaries need their master/slave 8259 | ||
226 | * pairs initializing correctly */ | ||
227 | |||
228 | /* Interrupt counters (per cpu) and total - used to try to | ||
229 | * even up the interrupt handling routines */ | ||
230 | static long vic_intr_total = 0; | ||
231 | static long vic_intr_count[NR_CPUS] __cacheline_aligned = { 0 }; | ||
232 | static unsigned long vic_tick[NR_CPUS] __cacheline_aligned = { 0 }; | ||
233 | |||
234 | /* Since we can only use CPI0, we fake all the other CPIs */ | ||
235 | static unsigned long vic_cpi_mailbox[NR_CPUS] __cacheline_aligned; | ||
236 | |||
237 | /* debugging routine to read the isr of the cpu's pic */ | ||
238 | static inline __u16 vic_read_isr(void) | ||
239 | { | ||
240 | __u16 isr; | ||
241 | |||
242 | outb(0x0b, 0xa0); | ||
243 | isr = inb(0xa0) << 8; | ||
244 | outb(0x0b, 0x20); | ||
245 | isr |= inb(0x20); | ||
246 | |||
247 | return isr; | ||
248 | } | ||
249 | |||
250 | static __init void qic_setup(void) | ||
251 | { | ||
252 | if (!is_cpu_quad()) { | ||
253 | /* not a quad, no setup */ | ||
254 | return; | ||
255 | } | ||
256 | outb(QIC_DEFAULT_MASK0, QIC_MASK_REGISTER0); | ||
257 | outb(QIC_CPI_ENABLE, QIC_MASK_REGISTER1); | ||
258 | |||
259 | if (is_cpu_extended()) { | ||
260 | /* the QIC duplicate of the VIC base register */ | ||
261 | outb(VIC_DEFAULT_CPI_BASE, QIC_VIC_CPI_BASE_REGISTER); | ||
262 | outb(QIC_DEFAULT_CPI_BASE, QIC_CPI_BASE_REGISTER); | ||
263 | |||
264 | /* FIXME: should set up the QIC timer and memory parity | ||
265 | * error vectors here */ | ||
266 | } | ||
267 | } | ||
268 | |||
269 | static __init void vic_setup_pic(void) | ||
270 | { | ||
271 | outb(1, VIC_REDIRECT_REGISTER_1); | ||
272 | /* clear the claim registers for dynamic routing */ | ||
273 | outb(0, VIC_CLAIM_REGISTER_0); | ||
274 | outb(0, VIC_CLAIM_REGISTER_1); | ||
275 | |||
276 | outb(0, VIC_PRIORITY_REGISTER); | ||
277 | /* Set the Primary and Secondary Microchannel vector | ||
278 | * bases to be the same as the ordinary interrupts | ||
279 | * | ||
280 | * FIXME: This would be more efficient using separate | ||
281 | * vectors. */ | ||
282 | outb(FIRST_EXTERNAL_VECTOR, VIC_PRIMARY_MC_BASE); | ||
283 | outb(FIRST_EXTERNAL_VECTOR, VIC_SECONDARY_MC_BASE); | ||
284 | /* Now initiallise the master PIC belonging to this CPU by | ||
285 | * sending the four ICWs */ | ||
286 | |||
287 | /* ICW1: level triggered, ICW4 needed */ | ||
288 | outb(0x19, 0x20); | ||
289 | |||
290 | /* ICW2: vector base */ | ||
291 | outb(FIRST_EXTERNAL_VECTOR, 0x21); | ||
292 | |||
293 | /* ICW3: slave at line 2 */ | ||
294 | outb(0x04, 0x21); | ||
295 | |||
296 | /* ICW4: 8086 mode */ | ||
297 | outb(0x01, 0x21); | ||
298 | |||
299 | /* now the same for the slave PIC */ | ||
300 | |||
301 | /* ICW1: level trigger, ICW4 needed */ | ||
302 | outb(0x19, 0xA0); | ||
303 | |||
304 | /* ICW2: slave vector base */ | ||
305 | outb(FIRST_EXTERNAL_VECTOR + 8, 0xA1); | ||
306 | |||
307 | /* ICW3: slave ID */ | ||
308 | outb(0x02, 0xA1); | ||
309 | |||
310 | /* ICW4: 8086 mode */ | ||
311 | outb(0x01, 0xA1); | ||
312 | } | ||
313 | |||
314 | static void do_quad_bootstrap(void) | ||
315 | { | ||
316 | if (is_cpu_quad() && is_cpu_vic_boot()) { | ||
317 | int i; | ||
318 | unsigned long flags; | ||
319 | __u8 cpuid = hard_smp_processor_id(); | ||
320 | |||
321 | local_irq_save(flags); | ||
322 | |||
323 | for (i = 0; i < 4; i++) { | ||
324 | /* FIXME: this would be >>3 &0x7 on the 32 way */ | ||
325 | if (((cpuid >> 2) & 0x03) == i) | ||
326 | /* don't lower our own mask! */ | ||
327 | continue; | ||
328 | |||
329 | /* masquerade as local Quad CPU */ | ||
330 | outb(QIC_CPUID_ENABLE | i, QIC_PROCESSOR_ID); | ||
331 | /* enable the startup CPI */ | ||
332 | outb(QIC_BOOT_CPI_MASK, QIC_MASK_REGISTER1); | ||
333 | /* restore cpu id */ | ||
334 | outb(0, QIC_PROCESSOR_ID); | ||
335 | } | ||
336 | local_irq_restore(flags); | ||
337 | } | ||
338 | } | ||
339 | |||
340 | void prefill_possible_map(void) | ||
341 | { | ||
342 | /* This is empty on voyager because we need a much | ||
343 | * earlier detection which is done in find_smp_config */ | ||
344 | } | ||
345 | |||
346 | /* Set up all the basic stuff: read the SMP config and make all the | ||
347 | * SMP information reflect only the boot cpu. All others will be | ||
348 | * brought on-line later. */ | ||
349 | void __init find_smp_config(void) | ||
350 | { | ||
351 | int i; | ||
352 | |||
353 | boot_cpu_id = hard_smp_processor_id(); | ||
354 | |||
355 | printk("VOYAGER SMP: Boot cpu is %d\n", boot_cpu_id); | ||
356 | |||
357 | /* initialize the CPU structures (moved from smp_boot_cpus) */ | ||
358 | for (i = 0; i < nr_cpu_ids; i++) | ||
359 | cpu_irq_affinity[i] = ~0; | ||
360 | cpu_online_map = cpumask_of_cpu(boot_cpu_id); | ||
361 | |||
362 | /* The boot CPU must be extended */ | ||
363 | voyager_extended_vic_processors = 1 << boot_cpu_id; | ||
364 | /* initially, all of the first 8 CPUs can boot */ | ||
365 | voyager_allowed_boot_processors = 0xff; | ||
366 | /* set up everything for just this CPU, we can alter | ||
367 | * this as we start the other CPUs later */ | ||
368 | /* now get the CPU disposition from the extended CMOS */ | ||
369 | cpus_addr(phys_cpu_present_map)[0] = | ||
370 | voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK); | ||
371 | cpus_addr(phys_cpu_present_map)[0] |= | ||
372 | voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + 1) << 8; | ||
373 | cpus_addr(phys_cpu_present_map)[0] |= | ||
374 | voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + | ||
375 | 2) << 16; | ||
376 | cpus_addr(phys_cpu_present_map)[0] |= | ||
377 | voyager_extended_cmos_read(VOYAGER_PROCESSOR_PRESENT_MASK + | ||
378 | 3) << 24; | ||
379 | init_cpu_possible(&phys_cpu_present_map); | ||
380 | printk("VOYAGER SMP: phys_cpu_present_map = 0x%lx\n", | ||
381 | cpus_addr(phys_cpu_present_map)[0]); | ||
382 | /* Here we set up the VIC to enable SMP */ | ||
383 | /* enable the CPIs by writing the base vector to their register */ | ||
384 | outb(VIC_DEFAULT_CPI_BASE, VIC_CPI_BASE_REGISTER); | ||
385 | outb(1, VIC_REDIRECT_REGISTER_1); | ||
386 | /* set the claim registers for static routing --- Boot CPU gets | ||
387 | * all interrupts untill all other CPUs started */ | ||
388 | outb(0xff, VIC_CLAIM_REGISTER_0); | ||
389 | outb(0xff, VIC_CLAIM_REGISTER_1); | ||
390 | /* Set the Primary and Secondary Microchannel vector | ||
391 | * bases to be the same as the ordinary interrupts | ||
392 | * | ||
393 | * FIXME: This would be more efficient using separate | ||
394 | * vectors. */ | ||
395 | outb(FIRST_EXTERNAL_VECTOR, VIC_PRIMARY_MC_BASE); | ||
396 | outb(FIRST_EXTERNAL_VECTOR, VIC_SECONDARY_MC_BASE); | ||
397 | |||
398 | /* Finally tell the firmware that we're driving */ | ||
399 | outb(inb(VOYAGER_SUS_IN_CONTROL_PORT) | VOYAGER_IN_CONTROL_FLAG, | ||
400 | VOYAGER_SUS_IN_CONTROL_PORT); | ||
401 | |||
402 | current_thread_info()->cpu = boot_cpu_id; | ||
403 | percpu_write(cpu_number, boot_cpu_id); | ||
404 | } | ||
405 | |||
406 | /* | ||
407 | * The bootstrap kernel entry code has set these up. Save them | ||
408 | * for a given CPU, id is physical */ | ||
409 | void __init smp_store_cpu_info(int id) | ||
410 | { | ||
411 | struct cpuinfo_x86 *c = &cpu_data(id); | ||
412 | |||
413 | *c = boot_cpu_data; | ||
414 | c->cpu_index = id; | ||
415 | |||
416 | identify_secondary_cpu(c); | ||
417 | } | ||
418 | |||
419 | /* Routine initially called when a non-boot CPU is brought online */ | ||
420 | static void __init start_secondary(void *unused) | ||
421 | { | ||
422 | __u8 cpuid = hard_smp_processor_id(); | ||
423 | |||
424 | cpu_init(); | ||
425 | |||
426 | /* OK, we're in the routine */ | ||
427 | ack_CPI(VIC_CPU_BOOT_CPI); | ||
428 | |||
429 | /* setup the 8259 master slave pair belonging to this CPU --- | ||
430 | * we won't actually receive any until the boot CPU | ||
431 | * relinquishes it's static routing mask */ | ||
432 | vic_setup_pic(); | ||
433 | |||
434 | qic_setup(); | ||
435 | |||
436 | if (is_cpu_quad() && !is_cpu_vic_boot()) { | ||
437 | /* clear the boot CPI */ | ||
438 | __u8 dummy; | ||
439 | |||
440 | dummy = | ||
441 | voyager_quad_cpi_addr[cpuid]->qic_cpi[VIC_CPU_BOOT_CPI].cpi; | ||
442 | printk("read dummy %d\n", dummy); | ||
443 | } | ||
444 | |||
445 | /* lower the mask to receive CPIs */ | ||
446 | vic_enable_cpi(); | ||
447 | |||
448 | VDEBUG(("VOYAGER SMP: CPU%d, stack at about %p\n", cpuid, &cpuid)); | ||
449 | |||
450 | notify_cpu_starting(cpuid); | ||
451 | |||
452 | /* enable interrupts */ | ||
453 | local_irq_enable(); | ||
454 | |||
455 | /* get our bogomips */ | ||
456 | calibrate_delay(); | ||
457 | |||
458 | /* save our processor parameters */ | ||
459 | smp_store_cpu_info(cpuid); | ||
460 | |||
461 | /* if we're a quad, we may need to bootstrap other CPUs */ | ||
462 | do_quad_bootstrap(); | ||
463 | |||
464 | /* FIXME: this is rather a poor hack to prevent the CPU | ||
465 | * activating softirqs while it's supposed to be waiting for | ||
466 | * permission to proceed. Without this, the new per CPU stuff | ||
467 | * in the softirqs will fail */ | ||
468 | local_irq_disable(); | ||
469 | cpu_set(cpuid, cpu_callin_map); | ||
470 | |||
471 | /* signal that we're done */ | ||
472 | cpu_booted_map = 1; | ||
473 | |||
474 | while (!cpu_isset(cpuid, smp_commenced_mask)) | ||
475 | rep_nop(); | ||
476 | local_irq_enable(); | ||
477 | |||
478 | local_flush_tlb(); | ||
479 | |||
480 | cpu_set(cpuid, cpu_online_map); | ||
481 | wmb(); | ||
482 | cpu_idle(); | ||
483 | } | ||
484 | |||
485 | /* Routine to kick start the given CPU and wait for it to report ready | ||
486 | * (or timeout in startup). When this routine returns, the requested | ||
487 | * CPU is either fully running and configured or known to be dead. | ||
488 | * | ||
489 | * We call this routine sequentially 1 CPU at a time, so no need for | ||
490 | * locking */ | ||
491 | |||
492 | static void __init do_boot_cpu(__u8 cpu) | ||
493 | { | ||
494 | struct task_struct *idle; | ||
495 | int timeout; | ||
496 | unsigned long flags; | ||
497 | int quad_boot = (1 << cpu) & voyager_quad_processors | ||
498 | & ~(voyager_extended_vic_processors | ||
499 | & voyager_allowed_boot_processors); | ||
500 | |||
501 | /* This is the format of the CPI IDT gate (in real mode) which | ||
502 | * we're hijacking to boot the CPU */ | ||
503 | union IDTFormat { | ||
504 | struct seg { | ||
505 | __u16 Offset; | ||
506 | __u16 Segment; | ||
507 | } idt; | ||
508 | __u32 val; | ||
509 | } hijack_source; | ||
510 | |||
511 | __u32 *hijack_vector; | ||
512 | __u32 start_phys_address = setup_trampoline(); | ||
513 | |||
514 | /* There's a clever trick to this: The linux trampoline is | ||
515 | * compiled to begin at absolute location zero, so make the | ||
516 | * address zero but have the data segment selector compensate | ||
517 | * for the actual address */ | ||
518 | hijack_source.idt.Offset = start_phys_address & 0x000F; | ||
519 | hijack_source.idt.Segment = (start_phys_address >> 4) & 0xFFFF; | ||
520 | |||
521 | cpucount++; | ||
522 | alternatives_smp_switch(1); | ||
523 | |||
524 | idle = fork_idle(cpu); | ||
525 | if (IS_ERR(idle)) | ||
526 | panic("failed fork for CPU%d", cpu); | ||
527 | idle->thread.ip = (unsigned long)start_secondary; | ||
528 | /* init_tasks (in sched.c) is indexed logically */ | ||
529 | stack_start.sp = (void *)idle->thread.sp; | ||
530 | |||
531 | per_cpu(current_task, cpu) = idle; | ||
532 | early_gdt_descr.address = (unsigned long)get_cpu_gdt_table(cpu); | ||
533 | irq_ctx_init(cpu); | ||
534 | |||
535 | /* Note: Don't modify initial ss override */ | ||
536 | VDEBUG(("VOYAGER SMP: Booting CPU%d at 0x%lx[%x:%x], stack %p\n", cpu, | ||
537 | (unsigned long)hijack_source.val, hijack_source.idt.Segment, | ||
538 | hijack_source.idt.Offset, stack_start.sp)); | ||
539 | |||
540 | /* init lowmem identity mapping */ | ||
541 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, | ||
542 | min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY)); | ||
543 | flush_tlb_all(); | ||
544 | |||
545 | if (quad_boot) { | ||
546 | printk("CPU %d: non extended Quad boot\n", cpu); | ||
547 | hijack_vector = | ||
548 | (__u32 *) | ||
549 | phys_to_virt((VIC_CPU_BOOT_CPI + QIC_DEFAULT_CPI_BASE) * 4); | ||
550 | *hijack_vector = hijack_source.val; | ||
551 | } else { | ||
552 | printk("CPU%d: extended VIC boot\n", cpu); | ||
553 | hijack_vector = | ||
554 | (__u32 *) | ||
555 | phys_to_virt((VIC_CPU_BOOT_CPI + VIC_DEFAULT_CPI_BASE) * 4); | ||
556 | *hijack_vector = hijack_source.val; | ||
557 | /* VIC errata, may also receive interrupt at this address */ | ||
558 | hijack_vector = | ||
559 | (__u32 *) | ||
560 | phys_to_virt((VIC_CPU_BOOT_ERRATA_CPI + | ||
561 | VIC_DEFAULT_CPI_BASE) * 4); | ||
562 | *hijack_vector = hijack_source.val; | ||
563 | } | ||
564 | /* All non-boot CPUs start with interrupts fully masked. Need | ||
565 | * to lower the mask of the CPI we're about to send. We do | ||
566 | * this in the VIC by masquerading as the processor we're | ||
567 | * about to boot and lowering its interrupt mask */ | ||
568 | local_irq_save(flags); | ||
569 | if (quad_boot) { | ||
570 | send_one_QIC_CPI(cpu, VIC_CPU_BOOT_CPI); | ||
571 | } else { | ||
572 | outb(VIC_CPU_MASQUERADE_ENABLE | cpu, VIC_PROCESSOR_ID); | ||
573 | /* here we're altering registers belonging to `cpu' */ | ||
574 | |||
575 | outb(VIC_BOOT_INTERRUPT_MASK, 0x21); | ||
576 | /* now go back to our original identity */ | ||
577 | outb(boot_cpu_id, VIC_PROCESSOR_ID); | ||
578 | |||
579 | /* and boot the CPU */ | ||
580 | |||
581 | send_CPI((1 << cpu), VIC_CPU_BOOT_CPI); | ||
582 | } | ||
583 | cpu_booted_map = 0; | ||
584 | local_irq_restore(flags); | ||
585 | |||
586 | /* now wait for it to become ready (or timeout) */ | ||
587 | for (timeout = 0; timeout < 50000; timeout++) { | ||
588 | if (cpu_booted_map) | ||
589 | break; | ||
590 | udelay(100); | ||
591 | } | ||
592 | /* reset the page table */ | ||
593 | zap_low_mappings(); | ||
594 | |||
595 | if (cpu_booted_map) { | ||
596 | VDEBUG(("CPU%d: Booted successfully, back in CPU %d\n", | ||
597 | cpu, smp_processor_id())); | ||
598 | |||
599 | printk("CPU%d: ", cpu); | ||
600 | print_cpu_info(&cpu_data(cpu)); | ||
601 | wmb(); | ||
602 | cpu_set(cpu, cpu_callout_map); | ||
603 | cpu_set(cpu, cpu_present_map); | ||
604 | } else { | ||
605 | printk("CPU%d FAILED TO BOOT: ", cpu); | ||
606 | if (* | ||
607 | ((volatile unsigned char *)phys_to_virt(start_phys_address)) | ||
608 | == 0xA5) | ||
609 | printk("Stuck.\n"); | ||
610 | else | ||
611 | printk("Not responding.\n"); | ||
612 | |||
613 | cpucount--; | ||
614 | } | ||
615 | } | ||
616 | |||
617 | void __init smp_boot_cpus(void) | ||
618 | { | ||
619 | int i; | ||
620 | |||
621 | /* CAT BUS initialisation must be done after the memory */ | ||
622 | /* FIXME: The L4 has a catbus too, it just needs to be | ||
623 | * accessed in a totally different way */ | ||
624 | if (voyager_level == 5) { | ||
625 | voyager_cat_init(); | ||
626 | |||
627 | /* now that the cat has probed the Voyager System Bus, sanity | ||
628 | * check the cpu map */ | ||
629 | if (((voyager_quad_processors | voyager_extended_vic_processors) | ||
630 | & cpus_addr(phys_cpu_present_map)[0]) != | ||
631 | cpus_addr(phys_cpu_present_map)[0]) { | ||
632 | /* should panic */ | ||
633 | printk("\n\n***WARNING*** " | ||
634 | "Sanity check of CPU present map FAILED\n"); | ||
635 | } | ||
636 | } else if (voyager_level == 4) | ||
637 | voyager_extended_vic_processors = | ||
638 | cpus_addr(phys_cpu_present_map)[0]; | ||
639 | |||
640 | /* this sets up the idle task to run on the current cpu */ | ||
641 | voyager_extended_cpus = 1; | ||
642 | /* Remove the global_irq_holder setting, it triggers a BUG() on | ||
643 | * schedule at the moment */ | ||
644 | //global_irq_holder = boot_cpu_id; | ||
645 | |||
646 | /* FIXME: Need to do something about this but currently only works | ||
647 | * on CPUs with a tsc which none of mine have. | ||
648 | smp_tune_scheduling(); | ||
649 | */ | ||
650 | smp_store_cpu_info(boot_cpu_id); | ||
651 | /* setup the jump vector */ | ||
652 | initial_code = (unsigned long)initialize_secondary; | ||
653 | printk("CPU%d: ", boot_cpu_id); | ||
654 | print_cpu_info(&cpu_data(boot_cpu_id)); | ||
655 | |||
656 | if (is_cpu_quad()) { | ||
657 | /* booting on a Quad CPU */ | ||
658 | printk("VOYAGER SMP: Boot CPU is Quad\n"); | ||
659 | qic_setup(); | ||
660 | do_quad_bootstrap(); | ||
661 | } | ||
662 | |||
663 | /* enable our own CPIs */ | ||
664 | vic_enable_cpi(); | ||
665 | |||
666 | cpu_set(boot_cpu_id, cpu_online_map); | ||
667 | cpu_set(boot_cpu_id, cpu_callout_map); | ||
668 | |||
669 | /* loop over all the extended VIC CPUs and boot them. The | ||
670 | * Quad CPUs must be bootstrapped by their extended VIC cpu */ | ||
671 | for (i = 0; i < nr_cpu_ids; i++) { | ||
672 | if (i == boot_cpu_id || !cpu_isset(i, phys_cpu_present_map)) | ||
673 | continue; | ||
674 | do_boot_cpu(i); | ||
675 | /* This udelay seems to be needed for the Quad boots | ||
676 | * don't remove unless you know what you're doing */ | ||
677 | udelay(1000); | ||
678 | } | ||
679 | /* we could compute the total bogomips here, but why bother?, | ||
680 | * Code added from smpboot.c */ | ||
681 | { | ||
682 | unsigned long bogosum = 0; | ||
683 | |||
684 | for_each_online_cpu(i) | ||
685 | bogosum += cpu_data(i).loops_per_jiffy; | ||
686 | printk(KERN_INFO "Total of %d processors activated " | ||
687 | "(%lu.%02lu BogoMIPS).\n", | ||
688 | cpucount + 1, bogosum / (500000 / HZ), | ||
689 | (bogosum / (5000 / HZ)) % 100); | ||
690 | } | ||
691 | voyager_extended_cpus = hweight32(voyager_extended_vic_processors); | ||
692 | printk("VOYAGER: Extended (interrupt handling CPUs): " | ||
693 | "%d, non-extended: %d\n", voyager_extended_cpus, | ||
694 | num_booting_cpus() - voyager_extended_cpus); | ||
695 | /* that's it, switch to symmetric mode */ | ||
696 | outb(0, VIC_PRIORITY_REGISTER); | ||
697 | outb(0, VIC_CLAIM_REGISTER_0); | ||
698 | outb(0, VIC_CLAIM_REGISTER_1); | ||
699 | |||
700 | VDEBUG(("VOYAGER SMP: Booted with %d CPUs\n", num_booting_cpus())); | ||
701 | } | ||
702 | |||
703 | /* Reload the secondary CPUs task structure (this function does not | ||
704 | * return ) */ | ||
705 | static void __init initialize_secondary(void) | ||
706 | { | ||
707 | #if 0 | ||
708 | // AC kernels only | ||
709 | set_current(hard_get_current()); | ||
710 | #endif | ||
711 | |||
712 | /* | ||
713 | * We don't actually need to load the full TSS, | ||
714 | * basically just the stack pointer and the eip. | ||
715 | */ | ||
716 | |||
717 | asm volatile ("movl %0,%%esp\n\t" | ||
718 | "jmp *%1"::"r" (current->thread.sp), | ||
719 | "r"(current->thread.ip)); | ||
720 | } | ||
721 | |||
722 | /* handle a Voyager SYS_INT -- If we don't, the base board will | ||
723 | * panic the system. | ||
724 | * | ||
725 | * System interrupts occur because some problem was detected on the | ||
726 | * various busses. To find out what you have to probe all the | ||
727 | * hardware via the CAT bus. FIXME: At the moment we do nothing. */ | ||
728 | void smp_vic_sys_interrupt(struct pt_regs *regs) | ||
729 | { | ||
730 | ack_CPI(VIC_SYS_INT); | ||
731 | printk("Voyager SYSTEM INTERRUPT\n"); | ||
732 | } | ||
733 | |||
734 | /* Handle a voyager CMN_INT; These interrupts occur either because of | ||
735 | * a system status change or because a single bit memory error | ||
736 | * occurred. FIXME: At the moment, ignore all this. */ | ||
737 | void smp_vic_cmn_interrupt(struct pt_regs *regs) | ||
738 | { | ||
739 | static __u8 in_cmn_int = 0; | ||
740 | static DEFINE_SPINLOCK(cmn_int_lock); | ||
741 | |||
742 | /* common ints are broadcast, so make sure we only do this once */ | ||
743 | _raw_spin_lock(&cmn_int_lock); | ||
744 | if (in_cmn_int) | ||
745 | goto unlock_end; | ||
746 | |||
747 | in_cmn_int++; | ||
748 | _raw_spin_unlock(&cmn_int_lock); | ||
749 | |||
750 | VDEBUG(("Voyager COMMON INTERRUPT\n")); | ||
751 | |||
752 | if (voyager_level == 5) | ||
753 | voyager_cat_do_common_interrupt(); | ||
754 | |||
755 | _raw_spin_lock(&cmn_int_lock); | ||
756 | in_cmn_int = 0; | ||
757 | unlock_end: | ||
758 | _raw_spin_unlock(&cmn_int_lock); | ||
759 | ack_CPI(VIC_CMN_INT); | ||
760 | } | ||
761 | |||
762 | /* | ||
763 | * Reschedule call back. Nothing to do, all the work is done | ||
764 | * automatically when we return from the interrupt. */ | ||
765 | static void smp_reschedule_interrupt(void) | ||
766 | { | ||
767 | /* do nothing */ | ||
768 | } | ||
769 | |||
770 | static struct mm_struct *flush_mm; | ||
771 | static unsigned long flush_va; | ||
772 | static DEFINE_SPINLOCK(tlbstate_lock); | ||
773 | |||
774 | /* | ||
775 | * We cannot call mmdrop() because we are in interrupt context, | ||
776 | * instead update mm->cpu_vm_mask. | ||
777 | * | ||
778 | * We need to reload %cr3 since the page tables may be going | ||
779 | * away from under us.. | ||
780 | */ | ||
781 | static inline void voyager_leave_mm(unsigned long cpu) | ||
782 | { | ||
783 | if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) | ||
784 | BUG(); | ||
785 | cpu_clear(cpu, per_cpu(cpu_tlbstate, cpu).active_mm->cpu_vm_mask); | ||
786 | load_cr3(swapper_pg_dir); | ||
787 | } | ||
788 | |||
789 | /* | ||
790 | * Invalidate call-back | ||
791 | */ | ||
792 | static void smp_invalidate_interrupt(void) | ||
793 | { | ||
794 | __u8 cpu = smp_processor_id(); | ||
795 | |||
796 | if (!test_bit(cpu, &smp_invalidate_needed)) | ||
797 | return; | ||
798 | /* This will flood messages. Don't uncomment unless you see | ||
799 | * Problems with cross cpu invalidation | ||
800 | VDEBUG(("VOYAGER SMP: CPU%d received INVALIDATE_CPI\n", | ||
801 | smp_processor_id())); | ||
802 | */ | ||
803 | |||
804 | if (flush_mm == per_cpu(cpu_tlbstate, cpu).active_mm) { | ||
805 | if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) { | ||
806 | if (flush_va == TLB_FLUSH_ALL) | ||
807 | local_flush_tlb(); | ||
808 | else | ||
809 | __flush_tlb_one(flush_va); | ||
810 | } else | ||
811 | voyager_leave_mm(cpu); | ||
812 | } | ||
813 | smp_mb__before_clear_bit(); | ||
814 | clear_bit(cpu, &smp_invalidate_needed); | ||
815 | smp_mb__after_clear_bit(); | ||
816 | } | ||
817 | |||
818 | /* All the new flush operations for 2.4 */ | ||
819 | |||
820 | /* This routine is called with a physical cpu mask */ | ||
821 | static void | ||
822 | voyager_flush_tlb_others(unsigned long cpumask, struct mm_struct *mm, | ||
823 | unsigned long va) | ||
824 | { | ||
825 | int stuck = 50000; | ||
826 | |||
827 | if (!cpumask) | ||
828 | BUG(); | ||
829 | if ((cpumask & cpus_addr(cpu_online_map)[0]) != cpumask) | ||
830 | BUG(); | ||
831 | if (cpumask & (1 << smp_processor_id())) | ||
832 | BUG(); | ||
833 | if (!mm) | ||
834 | BUG(); | ||
835 | |||
836 | spin_lock(&tlbstate_lock); | ||
837 | |||
838 | flush_mm = mm; | ||
839 | flush_va = va; | ||
840 | atomic_set_mask(cpumask, &smp_invalidate_needed); | ||
841 | /* | ||
842 | * We have to send the CPI only to | ||
843 | * CPUs affected. | ||
844 | */ | ||
845 | send_CPI(cpumask, VIC_INVALIDATE_CPI); | ||
846 | |||
847 | while (smp_invalidate_needed) { | ||
848 | mb(); | ||
849 | if (--stuck == 0) { | ||
850 | printk("***WARNING*** Stuck doing invalidate CPI " | ||
851 | "(CPU%d)\n", smp_processor_id()); | ||
852 | break; | ||
853 | } | ||
854 | } | ||
855 | |||
856 | /* Uncomment only to debug invalidation problems | ||
857 | VDEBUG(("VOYAGER SMP: Completed invalidate CPI (CPU%d)\n", cpu)); | ||
858 | */ | ||
859 | |||
860 | flush_mm = NULL; | ||
861 | flush_va = 0; | ||
862 | spin_unlock(&tlbstate_lock); | ||
863 | } | ||
864 | |||
865 | void flush_tlb_current_task(void) | ||
866 | { | ||
867 | struct mm_struct *mm = current->mm; | ||
868 | unsigned long cpu_mask; | ||
869 | |||
870 | preempt_disable(); | ||
871 | |||
872 | cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id()); | ||
873 | local_flush_tlb(); | ||
874 | if (cpu_mask) | ||
875 | voyager_flush_tlb_others(cpu_mask, mm, TLB_FLUSH_ALL); | ||
876 | |||
877 | preempt_enable(); | ||
878 | } | ||
879 | |||
880 | void flush_tlb_mm(struct mm_struct *mm) | ||
881 | { | ||
882 | unsigned long cpu_mask; | ||
883 | |||
884 | preempt_disable(); | ||
885 | |||
886 | cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id()); | ||
887 | |||
888 | if (current->active_mm == mm) { | ||
889 | if (current->mm) | ||
890 | local_flush_tlb(); | ||
891 | else | ||
892 | voyager_leave_mm(smp_processor_id()); | ||
893 | } | ||
894 | if (cpu_mask) | ||
895 | voyager_flush_tlb_others(cpu_mask, mm, TLB_FLUSH_ALL); | ||
896 | |||
897 | preempt_enable(); | ||
898 | } | ||
899 | |||
900 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long va) | ||
901 | { | ||
902 | struct mm_struct *mm = vma->vm_mm; | ||
903 | unsigned long cpu_mask; | ||
904 | |||
905 | preempt_disable(); | ||
906 | |||
907 | cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id()); | ||
908 | if (current->active_mm == mm) { | ||
909 | if (current->mm) | ||
910 | __flush_tlb_one(va); | ||
911 | else | ||
912 | voyager_leave_mm(smp_processor_id()); | ||
913 | } | ||
914 | |||
915 | if (cpu_mask) | ||
916 | voyager_flush_tlb_others(cpu_mask, mm, va); | ||
917 | |||
918 | preempt_enable(); | ||
919 | } | ||
920 | |||
921 | EXPORT_SYMBOL(flush_tlb_page); | ||
922 | |||
923 | /* enable the requested IRQs */ | ||
924 | static void smp_enable_irq_interrupt(void) | ||
925 | { | ||
926 | __u8 irq; | ||
927 | __u8 cpu = get_cpu(); | ||
928 | |||
929 | VDEBUG(("VOYAGER SMP: CPU%d enabling irq mask 0x%x\n", cpu, | ||
930 | vic_irq_enable_mask[cpu])); | ||
931 | |||
932 | spin_lock(&vic_irq_lock); | ||
933 | for (irq = 0; irq < 16; irq++) { | ||
934 | if (vic_irq_enable_mask[cpu] & (1 << irq)) | ||
935 | enable_local_vic_irq(irq); | ||
936 | } | ||
937 | vic_irq_enable_mask[cpu] = 0; | ||
938 | spin_unlock(&vic_irq_lock); | ||
939 | |||
940 | put_cpu_no_resched(); | ||
941 | } | ||
942 | |||
943 | /* | ||
944 | * CPU halt call-back | ||
945 | */ | ||
946 | static void smp_stop_cpu_function(void *dummy) | ||
947 | { | ||
948 | VDEBUG(("VOYAGER SMP: CPU%d is STOPPING\n", smp_processor_id())); | ||
949 | cpu_clear(smp_processor_id(), cpu_online_map); | ||
950 | local_irq_disable(); | ||
951 | for (;;) | ||
952 | halt(); | ||
953 | } | ||
954 | |||
955 | /* execute a thread on a new CPU. The function to be called must be | ||
956 | * previously set up. This is used to schedule a function for | ||
957 | * execution on all CPUs - set up the function then broadcast a | ||
958 | * function_interrupt CPI to come here on each CPU */ | ||
959 | static void smp_call_function_interrupt(void) | ||
960 | { | ||
961 | irq_enter(); | ||
962 | generic_smp_call_function_interrupt(); | ||
963 | __get_cpu_var(irq_stat).irq_call_count++; | ||
964 | irq_exit(); | ||
965 | } | ||
966 | |||
967 | static void smp_call_function_single_interrupt(void) | ||
968 | { | ||
969 | irq_enter(); | ||
970 | generic_smp_call_function_single_interrupt(); | ||
971 | __get_cpu_var(irq_stat).irq_call_count++; | ||
972 | irq_exit(); | ||
973 | } | ||
974 | |||
975 | /* Sorry about the name. In an APIC based system, the APICs | ||
976 | * themselves are programmed to send a timer interrupt. This is used | ||
977 | * by linux to reschedule the processor. Voyager doesn't have this, | ||
978 | * so we use the system clock to interrupt one processor, which in | ||
979 | * turn, broadcasts a timer CPI to all the others --- we receive that | ||
980 | * CPI here. We don't use this actually for counting so losing | ||
981 | * ticks doesn't matter | ||
982 | * | ||
983 | * FIXME: For those CPUs which actually have a local APIC, we could | ||
984 | * try to use it to trigger this interrupt instead of having to | ||
985 | * broadcast the timer tick. Unfortunately, all my pentium DYADs have | ||
986 | * no local APIC, so I can't do this | ||
987 | * | ||
988 | * This function is currently a placeholder and is unused in the code */ | ||
989 | void smp_apic_timer_interrupt(struct pt_regs *regs) | ||
990 | { | ||
991 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
992 | wrapper_smp_local_timer_interrupt(); | ||
993 | set_irq_regs(old_regs); | ||
994 | } | ||
995 | |||
996 | /* All of the QUAD interrupt GATES */ | ||
997 | void smp_qic_timer_interrupt(struct pt_regs *regs) | ||
998 | { | ||
999 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
1000 | ack_QIC_CPI(QIC_TIMER_CPI); | ||
1001 | wrapper_smp_local_timer_interrupt(); | ||
1002 | set_irq_regs(old_regs); | ||
1003 | } | ||
1004 | |||
1005 | void smp_qic_invalidate_interrupt(struct pt_regs *regs) | ||
1006 | { | ||
1007 | ack_QIC_CPI(QIC_INVALIDATE_CPI); | ||
1008 | smp_invalidate_interrupt(); | ||
1009 | } | ||
1010 | |||
1011 | void smp_qic_reschedule_interrupt(struct pt_regs *regs) | ||
1012 | { | ||
1013 | ack_QIC_CPI(QIC_RESCHEDULE_CPI); | ||
1014 | smp_reschedule_interrupt(); | ||
1015 | } | ||
1016 | |||
1017 | void smp_qic_enable_irq_interrupt(struct pt_regs *regs) | ||
1018 | { | ||
1019 | ack_QIC_CPI(QIC_ENABLE_IRQ_CPI); | ||
1020 | smp_enable_irq_interrupt(); | ||
1021 | } | ||
1022 | |||
1023 | void smp_qic_call_function_interrupt(struct pt_regs *regs) | ||
1024 | { | ||
1025 | ack_QIC_CPI(QIC_CALL_FUNCTION_CPI); | ||
1026 | smp_call_function_interrupt(); | ||
1027 | } | ||
1028 | |||
1029 | void smp_qic_call_function_single_interrupt(struct pt_regs *regs) | ||
1030 | { | ||
1031 | ack_QIC_CPI(QIC_CALL_FUNCTION_SINGLE_CPI); | ||
1032 | smp_call_function_single_interrupt(); | ||
1033 | } | ||
1034 | |||
1035 | void smp_vic_cpi_interrupt(struct pt_regs *regs) | ||
1036 | { | ||
1037 | struct pt_regs *old_regs = set_irq_regs(regs); | ||
1038 | __u8 cpu = smp_processor_id(); | ||
1039 | |||
1040 | if (is_cpu_quad()) | ||
1041 | ack_QIC_CPI(VIC_CPI_LEVEL0); | ||
1042 | else | ||
1043 | ack_VIC_CPI(VIC_CPI_LEVEL0); | ||
1044 | |||
1045 | if (test_and_clear_bit(VIC_TIMER_CPI, &vic_cpi_mailbox[cpu])) | ||
1046 | wrapper_smp_local_timer_interrupt(); | ||
1047 | if (test_and_clear_bit(VIC_INVALIDATE_CPI, &vic_cpi_mailbox[cpu])) | ||
1048 | smp_invalidate_interrupt(); | ||
1049 | if (test_and_clear_bit(VIC_RESCHEDULE_CPI, &vic_cpi_mailbox[cpu])) | ||
1050 | smp_reschedule_interrupt(); | ||
1051 | if (test_and_clear_bit(VIC_ENABLE_IRQ_CPI, &vic_cpi_mailbox[cpu])) | ||
1052 | smp_enable_irq_interrupt(); | ||
1053 | if (test_and_clear_bit(VIC_CALL_FUNCTION_CPI, &vic_cpi_mailbox[cpu])) | ||
1054 | smp_call_function_interrupt(); | ||
1055 | if (test_and_clear_bit(VIC_CALL_FUNCTION_SINGLE_CPI, &vic_cpi_mailbox[cpu])) | ||
1056 | smp_call_function_single_interrupt(); | ||
1057 | set_irq_regs(old_regs); | ||
1058 | } | ||
1059 | |||
1060 | static void do_flush_tlb_all(void *info) | ||
1061 | { | ||
1062 | unsigned long cpu = smp_processor_id(); | ||
1063 | |||
1064 | __flush_tlb_all(); | ||
1065 | if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_LAZY) | ||
1066 | voyager_leave_mm(cpu); | ||
1067 | } | ||
1068 | |||
1069 | /* flush the TLB of every active CPU in the system */ | ||
1070 | void flush_tlb_all(void) | ||
1071 | { | ||
1072 | on_each_cpu(do_flush_tlb_all, 0, 1); | ||
1073 | } | ||
1074 | |||
1075 | /* send a reschedule CPI to one CPU by physical CPU number*/ | ||
1076 | static void voyager_smp_send_reschedule(int cpu) | ||
1077 | { | ||
1078 | send_one_CPI(cpu, VIC_RESCHEDULE_CPI); | ||
1079 | } | ||
1080 | |||
1081 | int hard_smp_processor_id(void) | ||
1082 | { | ||
1083 | __u8 i; | ||
1084 | __u8 cpumask = inb(VIC_PROC_WHO_AM_I); | ||
1085 | if ((cpumask & QUAD_IDENTIFIER) == QUAD_IDENTIFIER) | ||
1086 | return cpumask & 0x1F; | ||
1087 | |||
1088 | for (i = 0; i < 8; i++) { | ||
1089 | if (cpumask & (1 << i)) | ||
1090 | return i; | ||
1091 | } | ||
1092 | printk("** WARNING ** Illegal cpuid returned by VIC: %d", cpumask); | ||
1093 | return 0; | ||
1094 | } | ||
1095 | |||
1096 | int safe_smp_processor_id(void) | ||
1097 | { | ||
1098 | return hard_smp_processor_id(); | ||
1099 | } | ||
1100 | |||
1101 | /* broadcast a halt to all other CPUs */ | ||
1102 | static void voyager_smp_send_stop(void) | ||
1103 | { | ||
1104 | smp_call_function(smp_stop_cpu_function, NULL, 1); | ||
1105 | } | ||
1106 | |||
1107 | /* this function is triggered in time.c when a clock tick fires | ||
1108 | * we need to re-broadcast the tick to all CPUs */ | ||
1109 | void smp_vic_timer_interrupt(void) | ||
1110 | { | ||
1111 | send_CPI_allbutself(VIC_TIMER_CPI); | ||
1112 | smp_local_timer_interrupt(); | ||
1113 | } | ||
1114 | |||
1115 | /* local (per CPU) timer interrupt. It does both profiling and | ||
1116 | * process statistics/rescheduling. | ||
1117 | * | ||
1118 | * We do profiling in every local tick, statistics/rescheduling | ||
1119 | * happen only every 'profiling multiplier' ticks. The default | ||
1120 | * multiplier is 1 and it can be changed by writing the new multiplier | ||
1121 | * value into /proc/profile. | ||
1122 | */ | ||
1123 | void smp_local_timer_interrupt(void) | ||
1124 | { | ||
1125 | int cpu = smp_processor_id(); | ||
1126 | long weight; | ||
1127 | |||
1128 | profile_tick(CPU_PROFILING); | ||
1129 | if (--per_cpu(prof_counter, cpu) <= 0) { | ||
1130 | /* | ||
1131 | * The multiplier may have changed since the last time we got | ||
1132 | * to this point as a result of the user writing to | ||
1133 | * /proc/profile. In this case we need to adjust the APIC | ||
1134 | * timer accordingly. | ||
1135 | * | ||
1136 | * Interrupts are already masked off at this point. | ||
1137 | */ | ||
1138 | per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu); | ||
1139 | if (per_cpu(prof_counter, cpu) != | ||
1140 | per_cpu(prof_old_multiplier, cpu)) { | ||
1141 | /* FIXME: need to update the vic timer tick here */ | ||
1142 | per_cpu(prof_old_multiplier, cpu) = | ||
1143 | per_cpu(prof_counter, cpu); | ||
1144 | } | ||
1145 | |||
1146 | update_process_times(user_mode_vm(get_irq_regs())); | ||
1147 | } | ||
1148 | |||
1149 | if (((1 << cpu) & voyager_extended_vic_processors) == 0) | ||
1150 | /* only extended VIC processors participate in | ||
1151 | * interrupt distribution */ | ||
1152 | return; | ||
1153 | |||
1154 | /* | ||
1155 | * We take the 'long' return path, and there every subsystem | ||
1156 | * grabs the appropriate locks (kernel lock/ irq lock). | ||
1157 | * | ||
1158 | * we might want to decouple profiling from the 'long path', | ||
1159 | * and do the profiling totally in assembly. | ||
1160 | * | ||
1161 | * Currently this isn't too much of an issue (performance wise), | ||
1162 | * we can take more than 100K local irqs per second on a 100 MHz P5. | ||
1163 | */ | ||
1164 | |||
1165 | if ((++vic_tick[cpu] & 0x7) != 0) | ||
1166 | return; | ||
1167 | /* get here every 16 ticks (about every 1/6 of a second) */ | ||
1168 | |||
1169 | /* Change our priority to give someone else a chance at getting | ||
1170 | * the IRQ. The algorithm goes like this: | ||
1171 | * | ||
1172 | * In the VIC, the dynamically routed interrupt is always | ||
1173 | * handled by the lowest priority eligible (i.e. receiving | ||
1174 | * interrupts) CPU. If >1 eligible CPUs are equal lowest, the | ||
1175 | * lowest processor number gets it. | ||
1176 | * | ||
1177 | * The priority of a CPU is controlled by a special per-CPU | ||
1178 | * VIC priority register which is 3 bits wide 0 being lowest | ||
1179 | * and 7 highest priority.. | ||
1180 | * | ||
1181 | * Therefore we subtract the average number of interrupts from | ||
1182 | * the number we've fielded. If this number is negative, we | ||
1183 | * lower the activity count and if it is positive, we raise | ||
1184 | * it. | ||
1185 | * | ||
1186 | * I'm afraid this still leads to odd looking interrupt counts: | ||
1187 | * the totals are all roughly equal, but the individual ones | ||
1188 | * look rather skewed. | ||
1189 | * | ||
1190 | * FIXME: This algorithm is total crap when mixed with SMP | ||
1191 | * affinity code since we now try to even up the interrupt | ||
1192 | * counts when an affinity binding is keeping them on a | ||
1193 | * particular CPU*/ | ||
1194 | weight = (vic_intr_count[cpu] * voyager_extended_cpus | ||
1195 | - vic_intr_total) >> 4; | ||
1196 | weight += 4; | ||
1197 | if (weight > 7) | ||
1198 | weight = 7; | ||
1199 | if (weight < 0) | ||
1200 | weight = 0; | ||
1201 | |||
1202 | outb((__u8) weight, VIC_PRIORITY_REGISTER); | ||
1203 | |||
1204 | #ifdef VOYAGER_DEBUG | ||
1205 | if ((vic_tick[cpu] & 0xFFF) == 0) { | ||
1206 | /* print this message roughly every 25 secs */ | ||
1207 | printk("VOYAGER SMP: vic_tick[%d] = %lu, weight = %ld\n", | ||
1208 | cpu, vic_tick[cpu], weight); | ||
1209 | } | ||
1210 | #endif | ||
1211 | } | ||
1212 | |||
1213 | /* setup the profiling timer */ | ||
1214 | int setup_profiling_timer(unsigned int multiplier) | ||
1215 | { | ||
1216 | int i; | ||
1217 | |||
1218 | if ((!multiplier)) | ||
1219 | return -EINVAL; | ||
1220 | |||
1221 | /* | ||
1222 | * Set the new multiplier for each CPU. CPUs don't start using the | ||
1223 | * new values until the next timer interrupt in which they do process | ||
1224 | * accounting. | ||
1225 | */ | ||
1226 | for (i = 0; i < nr_cpu_ids; ++i) | ||
1227 | per_cpu(prof_multiplier, i) = multiplier; | ||
1228 | |||
1229 | return 0; | ||
1230 | } | ||
1231 | |||
1232 | /* This is a bit of a mess, but forced on us by the genirq changes | ||
1233 | * there's no genirq handler that really does what voyager wants | ||
1234 | * so hack it up with the simple IRQ handler */ | ||
1235 | static void handle_vic_irq(unsigned int irq, struct irq_desc *desc) | ||
1236 | { | ||
1237 | before_handle_vic_irq(irq); | ||
1238 | handle_simple_irq(irq, desc); | ||
1239 | after_handle_vic_irq(irq); | ||
1240 | } | ||
1241 | |||
1242 | /* The CPIs are handled in the per cpu 8259s, so they must be | ||
1243 | * enabled to be received: FIX: enabling the CPIs in the early | ||
1244 | * boot sequence interferes with bug checking; enable them later | ||
1245 | * on in smp_init */ | ||
1246 | #define VIC_SET_GATE(cpi, vector) \ | ||
1247 | set_intr_gate((cpi) + VIC_DEFAULT_CPI_BASE, (vector)) | ||
1248 | #define QIC_SET_GATE(cpi, vector) \ | ||
1249 | set_intr_gate((cpi) + QIC_DEFAULT_CPI_BASE, (vector)) | ||
1250 | |||
1251 | void __init voyager_smp_intr_init(void) | ||
1252 | { | ||
1253 | int i; | ||
1254 | |||
1255 | /* initialize the per cpu irq mask to all disabled */ | ||
1256 | for (i = 0; i < nr_cpu_ids; i++) | ||
1257 | vic_irq_mask[i] = 0xFFFF; | ||
1258 | |||
1259 | VIC_SET_GATE(VIC_CPI_LEVEL0, vic_cpi_interrupt); | ||
1260 | |||
1261 | VIC_SET_GATE(VIC_SYS_INT, vic_sys_interrupt); | ||
1262 | VIC_SET_GATE(VIC_CMN_INT, vic_cmn_interrupt); | ||
1263 | |||
1264 | QIC_SET_GATE(QIC_TIMER_CPI, qic_timer_interrupt); | ||
1265 | QIC_SET_GATE(QIC_INVALIDATE_CPI, qic_invalidate_interrupt); | ||
1266 | QIC_SET_GATE(QIC_RESCHEDULE_CPI, qic_reschedule_interrupt); | ||
1267 | QIC_SET_GATE(QIC_ENABLE_IRQ_CPI, qic_enable_irq_interrupt); | ||
1268 | QIC_SET_GATE(QIC_CALL_FUNCTION_CPI, qic_call_function_interrupt); | ||
1269 | |||
1270 | /* now put the VIC descriptor into the first 48 IRQs | ||
1271 | * | ||
1272 | * This is for later: first 16 correspond to PC IRQs; next 16 | ||
1273 | * are Primary MC IRQs and final 16 are Secondary MC IRQs */ | ||
1274 | for (i = 0; i < 48; i++) | ||
1275 | set_irq_chip_and_handler(i, &vic_chip, handle_vic_irq); | ||
1276 | } | ||
1277 | |||
1278 | /* send a CPI at level cpi to a set of cpus in cpuset (set 1 bit per | ||
1279 | * processor to receive CPI */ | ||
1280 | static void send_CPI(__u32 cpuset, __u8 cpi) | ||
1281 | { | ||
1282 | int cpu; | ||
1283 | __u32 quad_cpuset = (cpuset & voyager_quad_processors); | ||
1284 | |||
1285 | if (cpi < VIC_START_FAKE_CPI) { | ||
1286 | /* fake CPI are only used for booting, so send to the | ||
1287 | * extended quads as well---Quads must be VIC booted */ | ||
1288 | outb((__u8) (cpuset), VIC_CPI_Registers[cpi]); | ||
1289 | return; | ||
1290 | } | ||
1291 | if (quad_cpuset) | ||
1292 | send_QIC_CPI(quad_cpuset, cpi); | ||
1293 | cpuset &= ~quad_cpuset; | ||
1294 | cpuset &= 0xff; /* only first 8 CPUs vaild for VIC CPI */ | ||
1295 | if (cpuset == 0) | ||
1296 | return; | ||
1297 | for_each_online_cpu(cpu) { | ||
1298 | if (cpuset & (1 << cpu)) | ||
1299 | set_bit(cpi, &vic_cpi_mailbox[cpu]); | ||
1300 | } | ||
1301 | if (cpuset) | ||
1302 | outb((__u8) cpuset, VIC_CPI_Registers[VIC_CPI_LEVEL0]); | ||
1303 | } | ||
1304 | |||
1305 | /* Acknowledge receipt of CPI in the QIC, clear in QIC hardware and | ||
1306 | * set the cache line to shared by reading it. | ||
1307 | * | ||
1308 | * DON'T make this inline otherwise the cache line read will be | ||
1309 | * optimised away | ||
1310 | * */ | ||
1311 | static int ack_QIC_CPI(__u8 cpi) | ||
1312 | { | ||
1313 | __u8 cpu = hard_smp_processor_id(); | ||
1314 | |||
1315 | cpi &= 7; | ||
1316 | |||
1317 | outb(1 << cpi, QIC_INTERRUPT_CLEAR1); | ||
1318 | return voyager_quad_cpi_addr[cpu]->qic_cpi[cpi].cpi; | ||
1319 | } | ||
1320 | |||
1321 | static void ack_special_QIC_CPI(__u8 cpi) | ||
1322 | { | ||
1323 | switch (cpi) { | ||
1324 | case VIC_CMN_INT: | ||
1325 | outb(QIC_CMN_INT, QIC_INTERRUPT_CLEAR0); | ||
1326 | break; | ||
1327 | case VIC_SYS_INT: | ||
1328 | outb(QIC_SYS_INT, QIC_INTERRUPT_CLEAR0); | ||
1329 | break; | ||
1330 | } | ||
1331 | /* also clear at the VIC, just in case (nop for non-extended proc) */ | ||
1332 | ack_VIC_CPI(cpi); | ||
1333 | } | ||
1334 | |||
1335 | /* Acknowledge receipt of CPI in the VIC (essentially an EOI) */ | ||
1336 | static void ack_VIC_CPI(__u8 cpi) | ||
1337 | { | ||
1338 | #ifdef VOYAGER_DEBUG | ||
1339 | unsigned long flags; | ||
1340 | __u16 isr; | ||
1341 | __u8 cpu = smp_processor_id(); | ||
1342 | |||
1343 | local_irq_save(flags); | ||
1344 | isr = vic_read_isr(); | ||
1345 | if ((isr & (1 << (cpi & 7))) == 0) { | ||
1346 | printk("VOYAGER SMP: CPU%d lost CPI%d\n", cpu, cpi); | ||
1347 | } | ||
1348 | #endif | ||
1349 | /* send specific EOI; the two system interrupts have | ||
1350 | * bit 4 set for a separate vector but behave as the | ||
1351 | * corresponding 3 bit intr */ | ||
1352 | outb_p(0x60 | (cpi & 7), 0x20); | ||
1353 | |||
1354 | #ifdef VOYAGER_DEBUG | ||
1355 | if ((vic_read_isr() & (1 << (cpi & 7))) != 0) { | ||
1356 | printk("VOYAGER SMP: CPU%d still asserting CPI%d\n", cpu, cpi); | ||
1357 | } | ||
1358 | local_irq_restore(flags); | ||
1359 | #endif | ||
1360 | } | ||
1361 | |||
1362 | /* cribbed with thanks from irq.c */ | ||
1363 | #define __byte(x,y) (((unsigned char *)&(y))[x]) | ||
1364 | #define cached_21(cpu) (__byte(0,vic_irq_mask[cpu])) | ||
1365 | #define cached_A1(cpu) (__byte(1,vic_irq_mask[cpu])) | ||
1366 | |||
1367 | static unsigned int startup_vic_irq(unsigned int irq) | ||
1368 | { | ||
1369 | unmask_vic_irq(irq); | ||
1370 | |||
1371 | return 0; | ||
1372 | } | ||
1373 | |||
1374 | /* The enable and disable routines. This is where we run into | ||
1375 | * conflicting architectural philosophy. Fundamentally, the voyager | ||
1376 | * architecture does not expect to have to disable interrupts globally | ||
1377 | * (the IRQ controllers belong to each CPU). The processor masquerade | ||
1378 | * which is used to start the system shouldn't be used in a running OS | ||
1379 | * since it will cause great confusion if two separate CPUs drive to | ||
1380 | * the same IRQ controller (I know, I've tried it). | ||
1381 | * | ||
1382 | * The solution is a variant on the NCR lazy SPL design: | ||
1383 | * | ||
1384 | * 1) To disable an interrupt, do nothing (other than set the | ||
1385 | * IRQ_DISABLED flag). This dares the interrupt actually to arrive. | ||
1386 | * | ||
1387 | * 2) If the interrupt dares to come in, raise the local mask against | ||
1388 | * it (this will result in all the CPU masks being raised | ||
1389 | * eventually). | ||
1390 | * | ||
1391 | * 3) To enable the interrupt, lower the mask on the local CPU and | ||
1392 | * broadcast an Interrupt enable CPI which causes all other CPUs to | ||
1393 | * adjust their masks accordingly. */ | ||
1394 | |||
1395 | static void unmask_vic_irq(unsigned int irq) | ||
1396 | { | ||
1397 | /* linux doesn't to processor-irq affinity, so enable on | ||
1398 | * all CPUs we know about */ | ||
1399 | int cpu = smp_processor_id(), real_cpu; | ||
1400 | __u16 mask = (1 << irq); | ||
1401 | __u32 processorList = 0; | ||
1402 | unsigned long flags; | ||
1403 | |||
1404 | VDEBUG(("VOYAGER: unmask_vic_irq(%d) CPU%d affinity 0x%lx\n", | ||
1405 | irq, cpu, cpu_irq_affinity[cpu])); | ||
1406 | spin_lock_irqsave(&vic_irq_lock, flags); | ||
1407 | for_each_online_cpu(real_cpu) { | ||
1408 | if (!(voyager_extended_vic_processors & (1 << real_cpu))) | ||
1409 | continue; | ||
1410 | if (!(cpu_irq_affinity[real_cpu] & mask)) { | ||
1411 | /* irq has no affinity for this CPU, ignore */ | ||
1412 | continue; | ||
1413 | } | ||
1414 | if (real_cpu == cpu) { | ||
1415 | enable_local_vic_irq(irq); | ||
1416 | } else if (vic_irq_mask[real_cpu] & mask) { | ||
1417 | vic_irq_enable_mask[real_cpu] |= mask; | ||
1418 | processorList |= (1 << real_cpu); | ||
1419 | } | ||
1420 | } | ||
1421 | spin_unlock_irqrestore(&vic_irq_lock, flags); | ||
1422 | if (processorList) | ||
1423 | send_CPI(processorList, VIC_ENABLE_IRQ_CPI); | ||
1424 | } | ||
1425 | |||
1426 | static void mask_vic_irq(unsigned int irq) | ||
1427 | { | ||
1428 | /* lazy disable, do nothing */ | ||
1429 | } | ||
1430 | |||
1431 | static void enable_local_vic_irq(unsigned int irq) | ||
1432 | { | ||
1433 | __u8 cpu = smp_processor_id(); | ||
1434 | __u16 mask = ~(1 << irq); | ||
1435 | __u16 old_mask = vic_irq_mask[cpu]; | ||
1436 | |||
1437 | vic_irq_mask[cpu] &= mask; | ||
1438 | if (vic_irq_mask[cpu] == old_mask) | ||
1439 | return; | ||
1440 | |||
1441 | VDEBUG(("VOYAGER DEBUG: Enabling irq %d in hardware on CPU %d\n", | ||
1442 | irq, cpu)); | ||
1443 | |||
1444 | if (irq & 8) { | ||
1445 | outb_p(cached_A1(cpu), 0xA1); | ||
1446 | (void)inb_p(0xA1); | ||
1447 | } else { | ||
1448 | outb_p(cached_21(cpu), 0x21); | ||
1449 | (void)inb_p(0x21); | ||
1450 | } | ||
1451 | } | ||
1452 | |||
1453 | static void disable_local_vic_irq(unsigned int irq) | ||
1454 | { | ||
1455 | __u8 cpu = smp_processor_id(); | ||
1456 | __u16 mask = (1 << irq); | ||
1457 | __u16 old_mask = vic_irq_mask[cpu]; | ||
1458 | |||
1459 | if (irq == 7) | ||
1460 | return; | ||
1461 | |||
1462 | vic_irq_mask[cpu] |= mask; | ||
1463 | if (old_mask == vic_irq_mask[cpu]) | ||
1464 | return; | ||
1465 | |||
1466 | VDEBUG(("VOYAGER DEBUG: Disabling irq %d in hardware on CPU %d\n", | ||
1467 | irq, cpu)); | ||
1468 | |||
1469 | if (irq & 8) { | ||
1470 | outb_p(cached_A1(cpu), 0xA1); | ||
1471 | (void)inb_p(0xA1); | ||
1472 | } else { | ||
1473 | outb_p(cached_21(cpu), 0x21); | ||
1474 | (void)inb_p(0x21); | ||
1475 | } | ||
1476 | } | ||
1477 | |||
1478 | /* The VIC is level triggered, so the ack can only be issued after the | ||
1479 | * interrupt completes. However, we do Voyager lazy interrupt | ||
1480 | * handling here: It is an extremely expensive operation to mask an | ||
1481 | * interrupt in the vic, so we merely set a flag (IRQ_DISABLED). If | ||
1482 | * this interrupt actually comes in, then we mask and ack here to push | ||
1483 | * the interrupt off to another CPU */ | ||
1484 | static void before_handle_vic_irq(unsigned int irq) | ||
1485 | { | ||
1486 | irq_desc_t *desc = irq_to_desc(irq); | ||
1487 | __u8 cpu = smp_processor_id(); | ||
1488 | |||
1489 | _raw_spin_lock(&vic_irq_lock); | ||
1490 | vic_intr_total++; | ||
1491 | vic_intr_count[cpu]++; | ||
1492 | |||
1493 | if (!(cpu_irq_affinity[cpu] & (1 << irq))) { | ||
1494 | /* The irq is not in our affinity mask, push it off | ||
1495 | * onto another CPU */ | ||
1496 | VDEBUG(("VOYAGER DEBUG: affinity triggered disable of irq %d " | ||
1497 | "on cpu %d\n", irq, cpu)); | ||
1498 | disable_local_vic_irq(irq); | ||
1499 | /* set IRQ_INPROGRESS to prevent the handler in irq.c from | ||
1500 | * actually calling the interrupt routine */ | ||
1501 | desc->status |= IRQ_REPLAY | IRQ_INPROGRESS; | ||
1502 | } else if (desc->status & IRQ_DISABLED) { | ||
1503 | /* Damn, the interrupt actually arrived, do the lazy | ||
1504 | * disable thing. The interrupt routine in irq.c will | ||
1505 | * not handle a IRQ_DISABLED interrupt, so nothing more | ||
1506 | * need be done here */ | ||
1507 | VDEBUG(("VOYAGER DEBUG: lazy disable of irq %d on CPU %d\n", | ||
1508 | irq, cpu)); | ||
1509 | disable_local_vic_irq(irq); | ||
1510 | desc->status |= IRQ_REPLAY; | ||
1511 | } else { | ||
1512 | desc->status &= ~IRQ_REPLAY; | ||
1513 | } | ||
1514 | |||
1515 | _raw_spin_unlock(&vic_irq_lock); | ||
1516 | } | ||
1517 | |||
1518 | /* Finish the VIC interrupt: basically mask */ | ||
1519 | static void after_handle_vic_irq(unsigned int irq) | ||
1520 | { | ||
1521 | irq_desc_t *desc = irq_to_desc(irq); | ||
1522 | |||
1523 | _raw_spin_lock(&vic_irq_lock); | ||
1524 | { | ||
1525 | unsigned int status = desc->status & ~IRQ_INPROGRESS; | ||
1526 | #ifdef VOYAGER_DEBUG | ||
1527 | __u16 isr; | ||
1528 | #endif | ||
1529 | |||
1530 | desc->status = status; | ||
1531 | if ((status & IRQ_DISABLED)) | ||
1532 | disable_local_vic_irq(irq); | ||
1533 | #ifdef VOYAGER_DEBUG | ||
1534 | /* DEBUG: before we ack, check what's in progress */ | ||
1535 | isr = vic_read_isr(); | ||
1536 | if ((isr & (1 << irq) && !(status & IRQ_REPLAY)) == 0) { | ||
1537 | int i; | ||
1538 | __u8 cpu = smp_processor_id(); | ||
1539 | __u8 real_cpu; | ||
1540 | int mask; /* Um... initialize me??? --RR */ | ||
1541 | |||
1542 | printk("VOYAGER SMP: CPU%d lost interrupt %d\n", | ||
1543 | cpu, irq); | ||
1544 | for_each_possible_cpu(real_cpu, mask) { | ||
1545 | |||
1546 | outb(VIC_CPU_MASQUERADE_ENABLE | real_cpu, | ||
1547 | VIC_PROCESSOR_ID); | ||
1548 | isr = vic_read_isr(); | ||
1549 | if (isr & (1 << irq)) { | ||
1550 | printk | ||
1551 | ("VOYAGER SMP: CPU%d ack irq %d\n", | ||
1552 | real_cpu, irq); | ||
1553 | ack_vic_irq(irq); | ||
1554 | } | ||
1555 | outb(cpu, VIC_PROCESSOR_ID); | ||
1556 | } | ||
1557 | } | ||
1558 | #endif /* VOYAGER_DEBUG */ | ||
1559 | /* as soon as we ack, the interrupt is eligible for | ||
1560 | * receipt by another CPU so everything must be in | ||
1561 | * order here */ | ||
1562 | ack_vic_irq(irq); | ||
1563 | if (status & IRQ_REPLAY) { | ||
1564 | /* replay is set if we disable the interrupt | ||
1565 | * in the before_handle_vic_irq() routine, so | ||
1566 | * clear the in progress bit here to allow the | ||
1567 | * next CPU to handle this correctly */ | ||
1568 | desc->status &= ~(IRQ_REPLAY | IRQ_INPROGRESS); | ||
1569 | } | ||
1570 | #ifdef VOYAGER_DEBUG | ||
1571 | isr = vic_read_isr(); | ||
1572 | if ((isr & (1 << irq)) != 0) | ||
1573 | printk("VOYAGER SMP: after_handle_vic_irq() after " | ||
1574 | "ack irq=%d, isr=0x%x\n", irq, isr); | ||
1575 | #endif /* VOYAGER_DEBUG */ | ||
1576 | } | ||
1577 | _raw_spin_unlock(&vic_irq_lock); | ||
1578 | |||
1579 | /* All code after this point is out of the main path - the IRQ | ||
1580 | * may be intercepted by another CPU if reasserted */ | ||
1581 | } | ||
1582 | |||
1583 | /* Linux processor - interrupt affinity manipulations. | ||
1584 | * | ||
1585 | * For each processor, we maintain a 32 bit irq affinity mask. | ||
1586 | * Initially it is set to all 1's so every processor accepts every | ||
1587 | * interrupt. In this call, we change the processor's affinity mask: | ||
1588 | * | ||
1589 | * Change from enable to disable: | ||
1590 | * | ||
1591 | * If the interrupt ever comes in to the processor, we will disable it | ||
1592 | * and ack it to push it off to another CPU, so just accept the mask here. | ||
1593 | * | ||
1594 | * Change from disable to enable: | ||
1595 | * | ||
1596 | * change the mask and then do an interrupt enable CPI to re-enable on | ||
1597 | * the selected processors */ | ||
1598 | |||
1599 | void set_vic_irq_affinity(unsigned int irq, const struct cpumask *mask) | ||
1600 | { | ||
1601 | /* Only extended processors handle interrupts */ | ||
1602 | unsigned long real_mask; | ||
1603 | unsigned long irq_mask = 1 << irq; | ||
1604 | int cpu; | ||
1605 | |||
1606 | real_mask = cpus_addr(*mask)[0] & voyager_extended_vic_processors; | ||
1607 | |||
1608 | if (cpus_addr(*mask)[0] == 0) | ||
1609 | /* can't have no CPUs to accept the interrupt -- extremely | ||
1610 | * bad things will happen */ | ||
1611 | return; | ||
1612 | |||
1613 | if (irq == 0) | ||
1614 | /* can't change the affinity of the timer IRQ. This | ||
1615 | * is due to the constraint in the voyager | ||
1616 | * architecture that the CPI also comes in on and IRQ | ||
1617 | * line and we have chosen IRQ0 for this. If you | ||
1618 | * raise the mask on this interrupt, the processor | ||
1619 | * will no-longer be able to accept VIC CPIs */ | ||
1620 | return; | ||
1621 | |||
1622 | if (irq >= 32) | ||
1623 | /* You can only have 32 interrupts in a voyager system | ||
1624 | * (and 32 only if you have a secondary microchannel | ||
1625 | * bus) */ | ||
1626 | return; | ||
1627 | |||
1628 | for_each_online_cpu(cpu) { | ||
1629 | unsigned long cpu_mask = 1 << cpu; | ||
1630 | |||
1631 | if (cpu_mask & real_mask) { | ||
1632 | /* enable the interrupt for this cpu */ | ||
1633 | cpu_irq_affinity[cpu] |= irq_mask; | ||
1634 | } else { | ||
1635 | /* disable the interrupt for this cpu */ | ||
1636 | cpu_irq_affinity[cpu] &= ~irq_mask; | ||
1637 | } | ||
1638 | } | ||
1639 | /* this is magic, we now have the correct affinity maps, so | ||
1640 | * enable the interrupt. This will send an enable CPI to | ||
1641 | * those CPUs who need to enable it in their local masks, | ||
1642 | * causing them to correct for the new affinity . If the | ||
1643 | * interrupt is currently globally disabled, it will simply be | ||
1644 | * disabled again as it comes in (voyager lazy disable). If | ||
1645 | * the affinity map is tightened to disable the interrupt on a | ||
1646 | * cpu, it will be pushed off when it comes in */ | ||
1647 | unmask_vic_irq(irq); | ||
1648 | } | ||
1649 | |||
1650 | static void ack_vic_irq(unsigned int irq) | ||
1651 | { | ||
1652 | if (irq & 8) { | ||
1653 | outb(0x62, 0x20); /* Specific EOI to cascade */ | ||
1654 | outb(0x60 | (irq & 7), 0xA0); | ||
1655 | } else { | ||
1656 | outb(0x60 | (irq & 7), 0x20); | ||
1657 | } | ||
1658 | } | ||
1659 | |||
1660 | /* enable the CPIs. In the VIC, the CPIs are delivered by the 8259 | ||
1661 | * but are not vectored by it. This means that the 8259 mask must be | ||
1662 | * lowered to receive them */ | ||
1663 | static __init void vic_enable_cpi(void) | ||
1664 | { | ||
1665 | __u8 cpu = smp_processor_id(); | ||
1666 | |||
1667 | /* just take a copy of the current mask (nop for boot cpu) */ | ||
1668 | vic_irq_mask[cpu] = vic_irq_mask[boot_cpu_id]; | ||
1669 | |||
1670 | enable_local_vic_irq(VIC_CPI_LEVEL0); | ||
1671 | enable_local_vic_irq(VIC_CPI_LEVEL1); | ||
1672 | /* for sys int and cmn int */ | ||
1673 | enable_local_vic_irq(7); | ||
1674 | |||
1675 | if (is_cpu_quad()) { | ||
1676 | outb(QIC_DEFAULT_MASK0, QIC_MASK_REGISTER0); | ||
1677 | outb(QIC_CPI_ENABLE, QIC_MASK_REGISTER1); | ||
1678 | VDEBUG(("VOYAGER SMP: QIC ENABLE CPI: CPU%d: MASK 0x%x\n", | ||
1679 | cpu, QIC_CPI_ENABLE)); | ||
1680 | } | ||
1681 | |||
1682 | VDEBUG(("VOYAGER SMP: ENABLE CPI: CPU%d: MASK 0x%x\n", | ||
1683 | cpu, vic_irq_mask[cpu])); | ||
1684 | } | ||
1685 | |||
1686 | void voyager_smp_dump() | ||
1687 | { | ||
1688 | int old_cpu = smp_processor_id(), cpu; | ||
1689 | |||
1690 | /* dump the interrupt masks of each processor */ | ||
1691 | for_each_online_cpu(cpu) { | ||
1692 | __u16 imr, isr, irr; | ||
1693 | unsigned long flags; | ||
1694 | |||
1695 | local_irq_save(flags); | ||
1696 | outb(VIC_CPU_MASQUERADE_ENABLE | cpu, VIC_PROCESSOR_ID); | ||
1697 | imr = (inb(0xa1) << 8) | inb(0x21); | ||
1698 | outb(0x0a, 0xa0); | ||
1699 | irr = inb(0xa0) << 8; | ||
1700 | outb(0x0a, 0x20); | ||
1701 | irr |= inb(0x20); | ||
1702 | outb(0x0b, 0xa0); | ||
1703 | isr = inb(0xa0) << 8; | ||
1704 | outb(0x0b, 0x20); | ||
1705 | isr |= inb(0x20); | ||
1706 | outb(old_cpu, VIC_PROCESSOR_ID); | ||
1707 | local_irq_restore(flags); | ||
1708 | printk("\tCPU%d: mask=0x%x, IMR=0x%x, IRR=0x%x, ISR=0x%x\n", | ||
1709 | cpu, vic_irq_mask[cpu], imr, irr, isr); | ||
1710 | #if 0 | ||
1711 | /* These lines are put in to try to unstick an un ack'd irq */ | ||
1712 | if (isr != 0) { | ||
1713 | int irq; | ||
1714 | for (irq = 0; irq < 16; irq++) { | ||
1715 | if (isr & (1 << irq)) { | ||
1716 | printk("\tCPU%d: ack irq %d\n", | ||
1717 | cpu, irq); | ||
1718 | local_irq_save(flags); | ||
1719 | outb(VIC_CPU_MASQUERADE_ENABLE | cpu, | ||
1720 | VIC_PROCESSOR_ID); | ||
1721 | ack_vic_irq(irq); | ||
1722 | outb(old_cpu, VIC_PROCESSOR_ID); | ||
1723 | local_irq_restore(flags); | ||
1724 | } | ||
1725 | } | ||
1726 | } | ||
1727 | #endif | ||
1728 | } | ||
1729 | } | ||
1730 | |||
1731 | void smp_voyager_power_off(void *dummy) | ||
1732 | { | ||
1733 | if (smp_processor_id() == boot_cpu_id) | ||
1734 | voyager_power_off(); | ||
1735 | else | ||
1736 | smp_stop_cpu_function(NULL); | ||
1737 | } | ||
1738 | |||
1739 | static void __init voyager_smp_prepare_cpus(unsigned int max_cpus) | ||
1740 | { | ||
1741 | /* FIXME: ignore max_cpus for now */ | ||
1742 | smp_boot_cpus(); | ||
1743 | } | ||
1744 | |||
1745 | static void __cpuinit voyager_smp_prepare_boot_cpu(void) | ||
1746 | { | ||
1747 | int cpu = smp_processor_id(); | ||
1748 | switch_to_new_gdt(cpu); | ||
1749 | |||
1750 | cpu_online_map = cpumask_of_cpu(smp_processor_id()); | ||
1751 | cpu_callout_map = cpumask_of_cpu(smp_processor_id()); | ||
1752 | cpu_callin_map = CPU_MASK_NONE; | ||
1753 | cpu_present_map = cpumask_of_cpu(smp_processor_id()); | ||
1754 | } | ||
1755 | |||
1756 | static int __cpuinit voyager_cpu_up(unsigned int cpu) | ||
1757 | { | ||
1758 | /* This only works at boot for x86. See "rewrite" above. */ | ||
1759 | if (cpu_isset(cpu, smp_commenced_mask)) | ||
1760 | return -ENOSYS; | ||
1761 | |||
1762 | /* In case one didn't come up */ | ||
1763 | if (!cpu_isset(cpu, cpu_callin_map)) | ||
1764 | return -EIO; | ||
1765 | /* Unleash the CPU! */ | ||
1766 | cpu_set(cpu, smp_commenced_mask); | ||
1767 | while (!cpu_online(cpu)) | ||
1768 | mb(); | ||
1769 | return 0; | ||
1770 | } | ||
1771 | |||
1772 | static void __init voyager_smp_cpus_done(unsigned int max_cpus) | ||
1773 | { | ||
1774 | zap_low_mappings(); | ||
1775 | } | ||
1776 | |||
1777 | void __init smp_setup_processor_id(void) | ||
1778 | { | ||
1779 | current_thread_info()->cpu = hard_smp_processor_id(); | ||
1780 | } | ||
1781 | |||
1782 | static void voyager_send_call_func(const struct cpumask *callmask) | ||
1783 | { | ||
1784 | __u32 mask = cpus_addr(*callmask)[0] & ~(1 << smp_processor_id()); | ||
1785 | send_CPI(mask, VIC_CALL_FUNCTION_CPI); | ||
1786 | } | ||
1787 | |||
1788 | static void voyager_send_call_func_single(int cpu) | ||
1789 | { | ||
1790 | send_CPI(1 << cpu, VIC_CALL_FUNCTION_SINGLE_CPI); | ||
1791 | } | ||
1792 | |||
1793 | struct smp_ops smp_ops = { | ||
1794 | .smp_prepare_boot_cpu = voyager_smp_prepare_boot_cpu, | ||
1795 | .smp_prepare_cpus = voyager_smp_prepare_cpus, | ||
1796 | .cpu_up = voyager_cpu_up, | ||
1797 | .smp_cpus_done = voyager_smp_cpus_done, | ||
1798 | |||
1799 | .smp_send_stop = voyager_smp_send_stop, | ||
1800 | .smp_send_reschedule = voyager_smp_send_reschedule, | ||
1801 | |||
1802 | .send_call_func_ipi = voyager_send_call_func, | ||
1803 | .send_call_func_single_ipi = voyager_send_call_func_single, | ||
1804 | }; | ||
diff --git a/arch/x86/mach-voyager/voyager_thread.c b/arch/x86/mach-voyager/voyager_thread.c deleted file mode 100644 index 15464a20fb38..000000000000 --- a/arch/x86/mach-voyager/voyager_thread.c +++ /dev/null | |||
@@ -1,128 +0,0 @@ | |||
1 | /* -*- mode: c; c-basic-offset: 8 -*- */ | ||
2 | |||
3 | /* Copyright (C) 2001 | ||
4 | * | ||
5 | * Author: J.E.J.Bottomley@HansenPartnership.com | ||
6 | * | ||
7 | * This module provides the machine status monitor thread for the | ||
8 | * voyager architecture. This allows us to monitor the machine | ||
9 | * environment (temp, voltage, fan function) and the front panel and | ||
10 | * internal UPS. If a fault is detected, this thread takes corrective | ||
11 | * action (usually just informing init) | ||
12 | * */ | ||
13 | |||
14 | #include <linux/module.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/kernel_stat.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/mc146818rtc.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/bootmem.h> | ||
21 | #include <linux/kmod.h> | ||
22 | #include <linux/completion.h> | ||
23 | #include <linux/sched.h> | ||
24 | #include <linux/kthread.h> | ||
25 | #include <asm/desc.h> | ||
26 | #include <asm/voyager.h> | ||
27 | #include <asm/vic.h> | ||
28 | #include <asm/mtrr.h> | ||
29 | #include <asm/msr.h> | ||
30 | |||
31 | struct task_struct *voyager_thread; | ||
32 | static __u8 set_timeout; | ||
33 | |||
34 | static int execute(const char *string) | ||
35 | { | ||
36 | int ret; | ||
37 | |||
38 | char *envp[] = { | ||
39 | "HOME=/", | ||
40 | "TERM=linux", | ||
41 | "PATH=/sbin:/usr/sbin:/bin:/usr/bin", | ||
42 | NULL, | ||
43 | }; | ||
44 | char *argv[] = { | ||
45 | "/bin/bash", | ||
46 | "-c", | ||
47 | (char *)string, | ||
48 | NULL, | ||
49 | }; | ||
50 | |||
51 | if ((ret = | ||
52 | call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC)) != 0) { | ||
53 | printk(KERN_ERR "Voyager failed to run \"%s\": %i\n", string, | ||
54 | ret); | ||
55 | } | ||
56 | return ret; | ||
57 | } | ||
58 | |||
59 | static void check_from_kernel(void) | ||
60 | { | ||
61 | if (voyager_status.switch_off) { | ||
62 | |||
63 | /* FIXME: This should be configurable via proc */ | ||
64 | execute("umask 600; echo 0 > /etc/initrunlvl; kill -HUP 1"); | ||
65 | } else if (voyager_status.power_fail) { | ||
66 | VDEBUG(("Voyager daemon detected AC power failure\n")); | ||
67 | |||
68 | /* FIXME: This should be configureable via proc */ | ||
69 | execute("umask 600; echo F > /etc/powerstatus; kill -PWR 1"); | ||
70 | set_timeout = 1; | ||
71 | } | ||
72 | } | ||
73 | |||
74 | static void check_continuing_condition(void) | ||
75 | { | ||
76 | if (voyager_status.power_fail) { | ||
77 | __u8 data; | ||
78 | voyager_cat_psi(VOYAGER_PSI_SUBREAD, | ||
79 | VOYAGER_PSI_AC_FAIL_REG, &data); | ||
80 | if ((data & 0x1f) == 0) { | ||
81 | /* all power restored */ | ||
82 | printk(KERN_NOTICE | ||
83 | "VOYAGER AC power restored, cancelling shutdown\n"); | ||
84 | /* FIXME: should be user configureable */ | ||
85 | execute | ||
86 | ("umask 600; echo O > /etc/powerstatus; kill -PWR 1"); | ||
87 | set_timeout = 0; | ||
88 | } | ||
89 | } | ||
90 | } | ||
91 | |||
92 | static int thread(void *unused) | ||
93 | { | ||
94 | printk(KERN_NOTICE "Voyager starting monitor thread\n"); | ||
95 | |||
96 | for (;;) { | ||
97 | set_current_state(TASK_INTERRUPTIBLE); | ||
98 | schedule_timeout(set_timeout ? HZ : MAX_SCHEDULE_TIMEOUT); | ||
99 | |||
100 | VDEBUG(("Voyager Daemon awoken\n")); | ||
101 | if (voyager_status.request_from_kernel == 0) { | ||
102 | /* probably awoken from timeout */ | ||
103 | check_continuing_condition(); | ||
104 | } else { | ||
105 | check_from_kernel(); | ||
106 | voyager_status.request_from_kernel = 0; | ||
107 | } | ||
108 | } | ||
109 | } | ||
110 | |||
111 | static int __init voyager_thread_start(void) | ||
112 | { | ||
113 | voyager_thread = kthread_run(thread, NULL, "kvoyagerd"); | ||
114 | if (IS_ERR(voyager_thread)) { | ||
115 | printk(KERN_ERR | ||
116 | "Voyager: Failed to create system monitor thread.\n"); | ||
117 | return PTR_ERR(voyager_thread); | ||
118 | } | ||
119 | return 0; | ||
120 | } | ||
121 | |||
122 | static void __exit voyager_thread_stop(void) | ||
123 | { | ||
124 | kthread_stop(voyager_thread); | ||
125 | } | ||
126 | |||
127 | module_init(voyager_thread_start); | ||
128 | module_exit(voyager_thread_stop); | ||
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 9f05157220f5..2b938a384910 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ | 1 | obj-y := init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \ |
2 | pat.o pgtable.o gup.o | 2 | pat.o pgtable.o gup.o |
3 | 3 | ||
4 | obj-$(CONFIG_X86_SMP) += tlb.o | 4 | obj-$(CONFIG_SMP) += tlb.o |
5 | 5 | ||
6 | obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o | 6 | obj-$(CONFIG_X86_32) += pgtable_32.o iomap_32.o |
7 | 7 | ||
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 8c3f3113a6ec..a03b7279efa0 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c | |||
@@ -1,74 +1,79 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 1995 Linus Torvalds | 2 | * Copyright (C) 1995 Linus Torvalds |
3 | * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs. | 3 | * Copyright (C) 2001, 2002 Andi Kleen, SuSE Labs. |
4 | * Copyright (C) 2008-2009, Red Hat Inc., Ingo Molnar | ||
4 | */ | 5 | */ |
5 | |||
6 | #include <linux/signal.h> | ||
7 | #include <linux/sched.h> | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/errno.h> | ||
10 | #include <linux/string.h> | ||
11 | #include <linux/types.h> | ||
12 | #include <linux/ptrace.h> | ||
13 | #include <linux/mmiotrace.h> | ||
14 | #include <linux/mman.h> | ||
15 | #include <linux/mm.h> | ||
16 | #include <linux/smp.h> | ||
17 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
18 | #include <linux/init.h> | 7 | #include <linux/mmiotrace.h> |
19 | #include <linux/tty.h> | 8 | #include <linux/bootmem.h> |
20 | #include <linux/vt_kern.h> /* For unblank_screen() */ | ||
21 | #include <linux/compiler.h> | 9 | #include <linux/compiler.h> |
22 | #include <linux/highmem.h> | 10 | #include <linux/highmem.h> |
23 | #include <linux/bootmem.h> /* for max_low_pfn */ | ||
24 | #include <linux/vmalloc.h> | ||
25 | #include <linux/module.h> | ||
26 | #include <linux/kprobes.h> | 11 | #include <linux/kprobes.h> |
27 | #include <linux/uaccess.h> | 12 | #include <linux/uaccess.h> |
13 | #include <linux/vmalloc.h> | ||
14 | #include <linux/vt_kern.h> | ||
15 | #include <linux/signal.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/ptrace.h> | ||
18 | #include <linux/string.h> | ||
19 | #include <linux/module.h> | ||
28 | #include <linux/kdebug.h> | 20 | #include <linux/kdebug.h> |
21 | #include <linux/errno.h> | ||
29 | #include <linux/magic.h> | 22 | #include <linux/magic.h> |
23 | #include <linux/sched.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/mman.h> | ||
27 | #include <linux/tty.h> | ||
28 | #include <linux/smp.h> | ||
29 | #include <linux/mm.h> | ||
30 | |||
31 | #include <asm-generic/sections.h> | ||
30 | 32 | ||
31 | #include <asm/system.h> | ||
32 | #include <asm/desc.h> | ||
33 | #include <asm/segment.h> | ||
34 | #include <asm/pgalloc.h> | ||
35 | #include <asm/smp.h> | ||
36 | #include <asm/tlbflush.h> | 33 | #include <asm/tlbflush.h> |
34 | #include <asm/pgalloc.h> | ||
35 | #include <asm/segment.h> | ||
36 | #include <asm/system.h> | ||
37 | #include <asm/proto.h> | 37 | #include <asm/proto.h> |
38 | #include <asm-generic/sections.h> | ||
39 | #include <asm/traps.h> | 38 | #include <asm/traps.h> |
39 | #include <asm/desc.h> | ||
40 | 40 | ||
41 | /* | 41 | /* |
42 | * Page fault error code bits | 42 | * Page fault error code bits: |
43 | * bit 0 == 0 means no page found, 1 means protection fault | 43 | * |
44 | * bit 1 == 0 means read, 1 means write | 44 | * bit 0 == 0: no page found 1: protection fault |
45 | * bit 2 == 0 means kernel, 1 means user-mode | 45 | * bit 1 == 0: read access 1: write access |
46 | * bit 3 == 1 means use of reserved bit detected | 46 | * bit 2 == 0: kernel-mode access 1: user-mode access |
47 | * bit 4 == 1 means fault was an instruction fetch | 47 | * bit 3 == 1: use of reserved bit detected |
48 | * bit 4 == 1: fault was an instruction fetch | ||
48 | */ | 49 | */ |
49 | #define PF_PROT (1<<0) | 50 | enum x86_pf_error_code { |
50 | #define PF_WRITE (1<<1) | 51 | |
51 | #define PF_USER (1<<2) | 52 | PF_PROT = 1 << 0, |
52 | #define PF_RSVD (1<<3) | 53 | PF_WRITE = 1 << 1, |
53 | #define PF_INSTR (1<<4) | 54 | PF_USER = 1 << 2, |
55 | PF_RSVD = 1 << 3, | ||
56 | PF_INSTR = 1 << 4, | ||
57 | }; | ||
54 | 58 | ||
59 | /* | ||
60 | * Returns 0 if mmiotrace is disabled, or if the fault is not | ||
61 | * handled by mmiotrace: | ||
62 | */ | ||
55 | static inline int kmmio_fault(struct pt_regs *regs, unsigned long addr) | 63 | static inline int kmmio_fault(struct pt_regs *regs, unsigned long addr) |
56 | { | 64 | { |
57 | #ifdef CONFIG_MMIOTRACE | ||
58 | if (unlikely(is_kmmio_active())) | 65 | if (unlikely(is_kmmio_active())) |
59 | if (kmmio_handler(regs, addr) == 1) | 66 | if (kmmio_handler(regs, addr) == 1) |
60 | return -1; | 67 | return -1; |
61 | #endif | ||
62 | return 0; | 68 | return 0; |
63 | } | 69 | } |
64 | 70 | ||
65 | static inline int notify_page_fault(struct pt_regs *regs) | 71 | static inline int notify_page_fault(struct pt_regs *regs) |
66 | { | 72 | { |
67 | #ifdef CONFIG_KPROBES | ||
68 | int ret = 0; | 73 | int ret = 0; |
69 | 74 | ||
70 | /* kprobe_running() needs smp_processor_id() */ | 75 | /* kprobe_running() needs smp_processor_id() */ |
71 | if (!user_mode_vm(regs)) { | 76 | if (kprobes_built_in() && !user_mode_vm(regs)) { |
72 | preempt_disable(); | 77 | preempt_disable(); |
73 | if (kprobe_running() && kprobe_fault_handler(regs, 14)) | 78 | if (kprobe_running() && kprobe_fault_handler(regs, 14)) |
74 | ret = 1; | 79 | ret = 1; |
@@ -76,29 +81,76 @@ static inline int notify_page_fault(struct pt_regs *regs) | |||
76 | } | 81 | } |
77 | 82 | ||
78 | return ret; | 83 | return ret; |
79 | #else | ||
80 | return 0; | ||
81 | #endif | ||
82 | } | 84 | } |
83 | 85 | ||
84 | /* | 86 | /* |
85 | * X86_32 | 87 | * Prefetch quirks: |
86 | * Sometimes AMD Athlon/Opteron CPUs report invalid exceptions on prefetch. | 88 | * |
87 | * Check that here and ignore it. | 89 | * 32-bit mode: |
88 | * | 90 | * |
89 | * X86_64 | 91 | * Sometimes AMD Athlon/Opteron CPUs report invalid exceptions on prefetch. |
90 | * Sometimes the CPU reports invalid exceptions on prefetch. | 92 | * Check that here and ignore it. |
91 | * Check that here and ignore it. | ||
92 | * | 93 | * |
93 | * Opcode checker based on code by Richard Brunner | 94 | * 64-bit mode: |
95 | * | ||
96 | * Sometimes the CPU reports invalid exceptions on prefetch. | ||
97 | * Check that here and ignore it. | ||
98 | * | ||
99 | * Opcode checker based on code by Richard Brunner. | ||
94 | */ | 100 | */ |
95 | static int is_prefetch(struct pt_regs *regs, unsigned long error_code, | 101 | static inline int |
96 | unsigned long addr) | 102 | check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr, |
103 | unsigned char opcode, int *prefetch) | ||
104 | { | ||
105 | unsigned char instr_hi = opcode & 0xf0; | ||
106 | unsigned char instr_lo = opcode & 0x0f; | ||
107 | |||
108 | switch (instr_hi) { | ||
109 | case 0x20: | ||
110 | case 0x30: | ||
111 | /* | ||
112 | * Values 0x26,0x2E,0x36,0x3E are valid x86 prefixes. | ||
113 | * In X86_64 long mode, the CPU will signal invalid | ||
114 | * opcode if some of these prefixes are present so | ||
115 | * X86_64 will never get here anyway | ||
116 | */ | ||
117 | return ((instr_lo & 7) == 0x6); | ||
118 | #ifdef CONFIG_X86_64 | ||
119 | case 0x40: | ||
120 | /* | ||
121 | * In AMD64 long mode 0x40..0x4F are valid REX prefixes | ||
122 | * Need to figure out under what instruction mode the | ||
123 | * instruction was issued. Could check the LDT for lm, | ||
124 | * but for now it's good enough to assume that long | ||
125 | * mode only uses well known segments or kernel. | ||
126 | */ | ||
127 | return (!user_mode(regs)) || (regs->cs == __USER_CS); | ||
128 | #endif | ||
129 | case 0x60: | ||
130 | /* 0x64 thru 0x67 are valid prefixes in all modes. */ | ||
131 | return (instr_lo & 0xC) == 0x4; | ||
132 | case 0xF0: | ||
133 | /* 0xF0, 0xF2, 0xF3 are valid prefixes in all modes. */ | ||
134 | return !instr_lo || (instr_lo>>1) == 1; | ||
135 | case 0x00: | ||
136 | /* Prefetch instruction is 0x0F0D or 0x0F18 */ | ||
137 | if (probe_kernel_address(instr, opcode)) | ||
138 | return 0; | ||
139 | |||
140 | *prefetch = (instr_lo == 0xF) && | ||
141 | (opcode == 0x0D || opcode == 0x18); | ||
142 | return 0; | ||
143 | default: | ||
144 | return 0; | ||
145 | } | ||
146 | } | ||
147 | |||
148 | static int | ||
149 | is_prefetch(struct pt_regs *regs, unsigned long error_code, unsigned long addr) | ||
97 | { | 150 | { |
151 | unsigned char *max_instr; | ||
98 | unsigned char *instr; | 152 | unsigned char *instr; |
99 | int scan_more = 1; | ||
100 | int prefetch = 0; | 153 | int prefetch = 0; |
101 | unsigned char *max_instr; | ||
102 | 154 | ||
103 | /* | 155 | /* |
104 | * If it was a exec (instruction fetch) fault on NX page, then | 156 | * If it was a exec (instruction fetch) fault on NX page, then |
@@ -107,106 +159,170 @@ static int is_prefetch(struct pt_regs *regs, unsigned long error_code, | |||
107 | if (error_code & PF_INSTR) | 159 | if (error_code & PF_INSTR) |
108 | return 0; | 160 | return 0; |
109 | 161 | ||
110 | instr = (unsigned char *)convert_ip_to_linear(current, regs); | 162 | instr = (void *)convert_ip_to_linear(current, regs); |
111 | max_instr = instr + 15; | 163 | max_instr = instr + 15; |
112 | 164 | ||
113 | if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE) | 165 | if (user_mode(regs) && instr >= (unsigned char *)TASK_SIZE) |
114 | return 0; | 166 | return 0; |
115 | 167 | ||
116 | while (scan_more && instr < max_instr) { | 168 | while (instr < max_instr) { |
117 | unsigned char opcode; | 169 | unsigned char opcode; |
118 | unsigned char instr_hi; | ||
119 | unsigned char instr_lo; | ||
120 | 170 | ||
121 | if (probe_kernel_address(instr, opcode)) | 171 | if (probe_kernel_address(instr, opcode)) |
122 | break; | 172 | break; |
123 | 173 | ||
124 | instr_hi = opcode & 0xf0; | ||
125 | instr_lo = opcode & 0x0f; | ||
126 | instr++; | 174 | instr++; |
127 | 175 | ||
128 | switch (instr_hi) { | 176 | if (!check_prefetch_opcode(regs, instr, opcode, &prefetch)) |
129 | case 0x20: | ||
130 | case 0x30: | ||
131 | /* | ||
132 | * Values 0x26,0x2E,0x36,0x3E are valid x86 prefixes. | ||
133 | * In X86_64 long mode, the CPU will signal invalid | ||
134 | * opcode if some of these prefixes are present so | ||
135 | * X86_64 will never get here anyway | ||
136 | */ | ||
137 | scan_more = ((instr_lo & 7) == 0x6); | ||
138 | break; | ||
139 | #ifdef CONFIG_X86_64 | ||
140 | case 0x40: | ||
141 | /* | ||
142 | * In AMD64 long mode 0x40..0x4F are valid REX prefixes | ||
143 | * Need to figure out under what instruction mode the | ||
144 | * instruction was issued. Could check the LDT for lm, | ||
145 | * but for now it's good enough to assume that long | ||
146 | * mode only uses well known segments or kernel. | ||
147 | */ | ||
148 | scan_more = (!user_mode(regs)) || (regs->cs == __USER_CS); | ||
149 | break; | 177 | break; |
150 | #endif | ||
151 | case 0x60: | ||
152 | /* 0x64 thru 0x67 are valid prefixes in all modes. */ | ||
153 | scan_more = (instr_lo & 0xC) == 0x4; | ||
154 | break; | ||
155 | case 0xF0: | ||
156 | /* 0xF0, 0xF2, 0xF3 are valid prefixes in all modes. */ | ||
157 | scan_more = !instr_lo || (instr_lo>>1) == 1; | ||
158 | break; | ||
159 | case 0x00: | ||
160 | /* Prefetch instruction is 0x0F0D or 0x0F18 */ | ||
161 | scan_more = 0; | ||
162 | |||
163 | if (probe_kernel_address(instr, opcode)) | ||
164 | break; | ||
165 | prefetch = (instr_lo == 0xF) && | ||
166 | (opcode == 0x0D || opcode == 0x18); | ||
167 | break; | ||
168 | default: | ||
169 | scan_more = 0; | ||
170 | break; | ||
171 | } | ||
172 | } | 178 | } |
173 | return prefetch; | 179 | return prefetch; |
174 | } | 180 | } |
175 | 181 | ||
176 | static void force_sig_info_fault(int si_signo, int si_code, | 182 | static void |
177 | unsigned long address, struct task_struct *tsk) | 183 | force_sig_info_fault(int si_signo, int si_code, unsigned long address, |
184 | struct task_struct *tsk) | ||
178 | { | 185 | { |
179 | siginfo_t info; | 186 | siginfo_t info; |
180 | 187 | ||
181 | info.si_signo = si_signo; | 188 | info.si_signo = si_signo; |
182 | info.si_errno = 0; | 189 | info.si_errno = 0; |
183 | info.si_code = si_code; | 190 | info.si_code = si_code; |
184 | info.si_addr = (void __user *)address; | 191 | info.si_addr = (void __user *)address; |
192 | |||
185 | force_sig_info(si_signo, &info, tsk); | 193 | force_sig_info(si_signo, &info, tsk); |
186 | } | 194 | } |
187 | 195 | ||
188 | #ifdef CONFIG_X86_64 | 196 | DEFINE_SPINLOCK(pgd_lock); |
189 | static int bad_address(void *p) | 197 | LIST_HEAD(pgd_list); |
198 | |||
199 | #ifdef CONFIG_X86_32 | ||
200 | static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) | ||
190 | { | 201 | { |
191 | unsigned long dummy; | 202 | unsigned index = pgd_index(address); |
192 | return probe_kernel_address((unsigned long *)p, dummy); | 203 | pgd_t *pgd_k; |
204 | pud_t *pud, *pud_k; | ||
205 | pmd_t *pmd, *pmd_k; | ||
206 | |||
207 | pgd += index; | ||
208 | pgd_k = init_mm.pgd + index; | ||
209 | |||
210 | if (!pgd_present(*pgd_k)) | ||
211 | return NULL; | ||
212 | |||
213 | /* | ||
214 | * set_pgd(pgd, *pgd_k); here would be useless on PAE | ||
215 | * and redundant with the set_pmd() on non-PAE. As would | ||
216 | * set_pud. | ||
217 | */ | ||
218 | pud = pud_offset(pgd, address); | ||
219 | pud_k = pud_offset(pgd_k, address); | ||
220 | if (!pud_present(*pud_k)) | ||
221 | return NULL; | ||
222 | |||
223 | pmd = pmd_offset(pud, address); | ||
224 | pmd_k = pmd_offset(pud_k, address); | ||
225 | if (!pmd_present(*pmd_k)) | ||
226 | return NULL; | ||
227 | |||
228 | if (!pmd_present(*pmd)) { | ||
229 | set_pmd(pmd, *pmd_k); | ||
230 | arch_flush_lazy_mmu_mode(); | ||
231 | } else { | ||
232 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); | ||
233 | } | ||
234 | |||
235 | return pmd_k; | ||
236 | } | ||
237 | |||
238 | void vmalloc_sync_all(void) | ||
239 | { | ||
240 | unsigned long address; | ||
241 | |||
242 | if (SHARED_KERNEL_PMD) | ||
243 | return; | ||
244 | |||
245 | for (address = VMALLOC_START & PMD_MASK; | ||
246 | address >= TASK_SIZE && address < FIXADDR_TOP; | ||
247 | address += PMD_SIZE) { | ||
248 | |||
249 | unsigned long flags; | ||
250 | struct page *page; | ||
251 | |||
252 | spin_lock_irqsave(&pgd_lock, flags); | ||
253 | list_for_each_entry(page, &pgd_list, lru) { | ||
254 | if (!vmalloc_sync_one(page_address(page), address)) | ||
255 | break; | ||
256 | } | ||
257 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
258 | } | ||
259 | } | ||
260 | |||
261 | /* | ||
262 | * 32-bit: | ||
263 | * | ||
264 | * Handle a fault on the vmalloc or module mapping area | ||
265 | */ | ||
266 | static noinline int vmalloc_fault(unsigned long address) | ||
267 | { | ||
268 | unsigned long pgd_paddr; | ||
269 | pmd_t *pmd_k; | ||
270 | pte_t *pte_k; | ||
271 | |||
272 | /* Make sure we are in vmalloc area: */ | ||
273 | if (!(address >= VMALLOC_START && address < VMALLOC_END)) | ||
274 | return -1; | ||
275 | |||
276 | /* | ||
277 | * Synchronize this task's top level page-table | ||
278 | * with the 'reference' page table. | ||
279 | * | ||
280 | * Do _not_ use "current" here. We might be inside | ||
281 | * an interrupt in the middle of a task switch.. | ||
282 | */ | ||
283 | pgd_paddr = read_cr3(); | ||
284 | pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); | ||
285 | if (!pmd_k) | ||
286 | return -1; | ||
287 | |||
288 | pte_k = pte_offset_kernel(pmd_k, address); | ||
289 | if (!pte_present(*pte_k)) | ||
290 | return -1; | ||
291 | |||
292 | return 0; | ||
293 | } | ||
294 | |||
295 | /* | ||
296 | * Did it hit the DOS screen memory VA from vm86 mode? | ||
297 | */ | ||
298 | static inline void | ||
299 | check_v8086_mode(struct pt_regs *regs, unsigned long address, | ||
300 | struct task_struct *tsk) | ||
301 | { | ||
302 | unsigned long bit; | ||
303 | |||
304 | if (!v8086_mode(regs)) | ||
305 | return; | ||
306 | |||
307 | bit = (address - 0xA0000) >> PAGE_SHIFT; | ||
308 | if (bit < 32) | ||
309 | tsk->thread.screen_bitmap |= 1 << bit; | ||
193 | } | 310 | } |
194 | #endif | ||
195 | 311 | ||
196 | static void dump_pagetable(unsigned long address) | 312 | static void dump_pagetable(unsigned long address) |
197 | { | 313 | { |
198 | #ifdef CONFIG_X86_32 | ||
199 | __typeof__(pte_val(__pte(0))) page; | 314 | __typeof__(pte_val(__pte(0))) page; |
200 | 315 | ||
201 | page = read_cr3(); | 316 | page = read_cr3(); |
202 | page = ((__typeof__(page) *) __va(page))[address >> PGDIR_SHIFT]; | 317 | page = ((__typeof__(page) *) __va(page))[address >> PGDIR_SHIFT]; |
318 | |||
203 | #ifdef CONFIG_X86_PAE | 319 | #ifdef CONFIG_X86_PAE |
204 | printk("*pdpt = %016Lx ", page); | 320 | printk("*pdpt = %016Lx ", page); |
205 | if ((page >> PAGE_SHIFT) < max_low_pfn | 321 | if ((page >> PAGE_SHIFT) < max_low_pfn |
206 | && page & _PAGE_PRESENT) { | 322 | && page & _PAGE_PRESENT) { |
207 | page &= PAGE_MASK; | 323 | page &= PAGE_MASK; |
208 | page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT) | 324 | page = ((__typeof__(page) *) __va(page))[(address >> PMD_SHIFT) |
209 | & (PTRS_PER_PMD - 1)]; | 325 | & (PTRS_PER_PMD - 1)]; |
210 | printk(KERN_CONT "*pde = %016Lx ", page); | 326 | printk(KERN_CONT "*pde = %016Lx ", page); |
211 | page &= ~_PAGE_NX; | 327 | page &= ~_PAGE_NX; |
212 | } | 328 | } |
@@ -218,19 +334,145 @@ static void dump_pagetable(unsigned long address) | |||
218 | * We must not directly access the pte in the highpte | 334 | * We must not directly access the pte in the highpte |
219 | * case if the page table is located in highmem. | 335 | * case if the page table is located in highmem. |
220 | * And let's rather not kmap-atomic the pte, just in case | 336 | * And let's rather not kmap-atomic the pte, just in case |
221 | * it's allocated already. | 337 | * it's allocated already: |
222 | */ | 338 | */ |
223 | if ((page >> PAGE_SHIFT) < max_low_pfn | 339 | if ((page >> PAGE_SHIFT) < max_low_pfn |
224 | && (page & _PAGE_PRESENT) | 340 | && (page & _PAGE_PRESENT) |
225 | && !(page & _PAGE_PSE)) { | 341 | && !(page & _PAGE_PSE)) { |
342 | |||
226 | page &= PAGE_MASK; | 343 | page &= PAGE_MASK; |
227 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) | 344 | page = ((__typeof__(page) *) __va(page))[(address >> PAGE_SHIFT) |
228 | & (PTRS_PER_PTE - 1)]; | 345 | & (PTRS_PER_PTE - 1)]; |
229 | printk("*pte = %0*Lx ", sizeof(page)*2, (u64)page); | 346 | printk("*pte = %0*Lx ", sizeof(page)*2, (u64)page); |
230 | } | 347 | } |
231 | 348 | ||
232 | printk("\n"); | 349 | printk("\n"); |
233 | #else /* CONFIG_X86_64 */ | 350 | } |
351 | |||
352 | #else /* CONFIG_X86_64: */ | ||
353 | |||
354 | void vmalloc_sync_all(void) | ||
355 | { | ||
356 | unsigned long address; | ||
357 | |||
358 | for (address = VMALLOC_START & PGDIR_MASK; address <= VMALLOC_END; | ||
359 | address += PGDIR_SIZE) { | ||
360 | |||
361 | const pgd_t *pgd_ref = pgd_offset_k(address); | ||
362 | unsigned long flags; | ||
363 | struct page *page; | ||
364 | |||
365 | if (pgd_none(*pgd_ref)) | ||
366 | continue; | ||
367 | |||
368 | spin_lock_irqsave(&pgd_lock, flags); | ||
369 | list_for_each_entry(page, &pgd_list, lru) { | ||
370 | pgd_t *pgd; | ||
371 | pgd = (pgd_t *)page_address(page) + pgd_index(address); | ||
372 | if (pgd_none(*pgd)) | ||
373 | set_pgd(pgd, *pgd_ref); | ||
374 | else | ||
375 | BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); | ||
376 | } | ||
377 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
378 | } | ||
379 | } | ||
380 | |||
381 | /* | ||
382 | * 64-bit: | ||
383 | * | ||
384 | * Handle a fault on the vmalloc area | ||
385 | * | ||
386 | * This assumes no large pages in there. | ||
387 | */ | ||
388 | static noinline int vmalloc_fault(unsigned long address) | ||
389 | { | ||
390 | pgd_t *pgd, *pgd_ref; | ||
391 | pud_t *pud, *pud_ref; | ||
392 | pmd_t *pmd, *pmd_ref; | ||
393 | pte_t *pte, *pte_ref; | ||
394 | |||
395 | /* Make sure we are in vmalloc area: */ | ||
396 | if (!(address >= VMALLOC_START && address < VMALLOC_END)) | ||
397 | return -1; | ||
398 | |||
399 | /* | ||
400 | * Copy kernel mappings over when needed. This can also | ||
401 | * happen within a race in page table update. In the later | ||
402 | * case just flush: | ||
403 | */ | ||
404 | pgd = pgd_offset(current->active_mm, address); | ||
405 | pgd_ref = pgd_offset_k(address); | ||
406 | if (pgd_none(*pgd_ref)) | ||
407 | return -1; | ||
408 | |||
409 | if (pgd_none(*pgd)) | ||
410 | set_pgd(pgd, *pgd_ref); | ||
411 | else | ||
412 | BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); | ||
413 | |||
414 | /* | ||
415 | * Below here mismatches are bugs because these lower tables | ||
416 | * are shared: | ||
417 | */ | ||
418 | |||
419 | pud = pud_offset(pgd, address); | ||
420 | pud_ref = pud_offset(pgd_ref, address); | ||
421 | if (pud_none(*pud_ref)) | ||
422 | return -1; | ||
423 | |||
424 | if (pud_none(*pud) || pud_page_vaddr(*pud) != pud_page_vaddr(*pud_ref)) | ||
425 | BUG(); | ||
426 | |||
427 | pmd = pmd_offset(pud, address); | ||
428 | pmd_ref = pmd_offset(pud_ref, address); | ||
429 | if (pmd_none(*pmd_ref)) | ||
430 | return -1; | ||
431 | |||
432 | if (pmd_none(*pmd) || pmd_page(*pmd) != pmd_page(*pmd_ref)) | ||
433 | BUG(); | ||
434 | |||
435 | pte_ref = pte_offset_kernel(pmd_ref, address); | ||
436 | if (!pte_present(*pte_ref)) | ||
437 | return -1; | ||
438 | |||
439 | pte = pte_offset_kernel(pmd, address); | ||
440 | |||
441 | /* | ||
442 | * Don't use pte_page here, because the mappings can point | ||
443 | * outside mem_map, and the NUMA hash lookup cannot handle | ||
444 | * that: | ||
445 | */ | ||
446 | if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref)) | ||
447 | BUG(); | ||
448 | |||
449 | return 0; | ||
450 | } | ||
451 | |||
452 | static const char errata93_warning[] = | ||
453 | KERN_ERR "******* Your BIOS seems to not contain a fix for K8 errata #93\n" | ||
454 | KERN_ERR "******* Working around it, but it may cause SEGVs or burn power.\n" | ||
455 | KERN_ERR "******* Please consider a BIOS update.\n" | ||
456 | KERN_ERR "******* Disabling USB legacy in the BIOS may also help.\n"; | ||
457 | |||
458 | /* | ||
459 | * No vm86 mode in 64-bit mode: | ||
460 | */ | ||
461 | static inline void | ||
462 | check_v8086_mode(struct pt_regs *regs, unsigned long address, | ||
463 | struct task_struct *tsk) | ||
464 | { | ||
465 | } | ||
466 | |||
467 | static int bad_address(void *p) | ||
468 | { | ||
469 | unsigned long dummy; | ||
470 | |||
471 | return probe_kernel_address((unsigned long *)p, dummy); | ||
472 | } | ||
473 | |||
474 | static void dump_pagetable(unsigned long address) | ||
475 | { | ||
234 | pgd_t *pgd; | 476 | pgd_t *pgd; |
235 | pud_t *pud; | 477 | pud_t *pud; |
236 | pmd_t *pmd; | 478 | pmd_t *pmd; |
@@ -239,102 +481,77 @@ static void dump_pagetable(unsigned long address) | |||
239 | pgd = (pgd_t *)read_cr3(); | 481 | pgd = (pgd_t *)read_cr3(); |
240 | 482 | ||
241 | pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); | 483 | pgd = __va((unsigned long)pgd & PHYSICAL_PAGE_MASK); |
484 | |||
242 | pgd += pgd_index(address); | 485 | pgd += pgd_index(address); |
243 | if (bad_address(pgd)) goto bad; | 486 | if (bad_address(pgd)) |
487 | goto bad; | ||
488 | |||
244 | printk("PGD %lx ", pgd_val(*pgd)); | 489 | printk("PGD %lx ", pgd_val(*pgd)); |
245 | if (!pgd_present(*pgd)) goto ret; | 490 | |
491 | if (!pgd_present(*pgd)) | ||
492 | goto out; | ||
246 | 493 | ||
247 | pud = pud_offset(pgd, address); | 494 | pud = pud_offset(pgd, address); |
248 | if (bad_address(pud)) goto bad; | 495 | if (bad_address(pud)) |
496 | goto bad; | ||
497 | |||
249 | printk("PUD %lx ", pud_val(*pud)); | 498 | printk("PUD %lx ", pud_val(*pud)); |
250 | if (!pud_present(*pud) || pud_large(*pud)) | 499 | if (!pud_present(*pud) || pud_large(*pud)) |
251 | goto ret; | 500 | goto out; |
252 | 501 | ||
253 | pmd = pmd_offset(pud, address); | 502 | pmd = pmd_offset(pud, address); |
254 | if (bad_address(pmd)) goto bad; | 503 | if (bad_address(pmd)) |
504 | goto bad; | ||
505 | |||
255 | printk("PMD %lx ", pmd_val(*pmd)); | 506 | printk("PMD %lx ", pmd_val(*pmd)); |
256 | if (!pmd_present(*pmd) || pmd_large(*pmd)) goto ret; | 507 | if (!pmd_present(*pmd) || pmd_large(*pmd)) |
508 | goto out; | ||
257 | 509 | ||
258 | pte = pte_offset_kernel(pmd, address); | 510 | pte = pte_offset_kernel(pmd, address); |
259 | if (bad_address(pte)) goto bad; | 511 | if (bad_address(pte)) |
512 | goto bad; | ||
513 | |||
260 | printk("PTE %lx", pte_val(*pte)); | 514 | printk("PTE %lx", pte_val(*pte)); |
261 | ret: | 515 | out: |
262 | printk("\n"); | 516 | printk("\n"); |
263 | return; | 517 | return; |
264 | bad: | 518 | bad: |
265 | printk("BAD\n"); | 519 | printk("BAD\n"); |
266 | #endif | ||
267 | } | ||
268 | |||
269 | #ifdef CONFIG_X86_32 | ||
270 | static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) | ||
271 | { | ||
272 | unsigned index = pgd_index(address); | ||
273 | pgd_t *pgd_k; | ||
274 | pud_t *pud, *pud_k; | ||
275 | pmd_t *pmd, *pmd_k; | ||
276 | |||
277 | pgd += index; | ||
278 | pgd_k = init_mm.pgd + index; | ||
279 | |||
280 | if (!pgd_present(*pgd_k)) | ||
281 | return NULL; | ||
282 | |||
283 | /* | ||
284 | * set_pgd(pgd, *pgd_k); here would be useless on PAE | ||
285 | * and redundant with the set_pmd() on non-PAE. As would | ||
286 | * set_pud. | ||
287 | */ | ||
288 | |||
289 | pud = pud_offset(pgd, address); | ||
290 | pud_k = pud_offset(pgd_k, address); | ||
291 | if (!pud_present(*pud_k)) | ||
292 | return NULL; | ||
293 | |||
294 | pmd = pmd_offset(pud, address); | ||
295 | pmd_k = pmd_offset(pud_k, address); | ||
296 | if (!pmd_present(*pmd_k)) | ||
297 | return NULL; | ||
298 | if (!pmd_present(*pmd)) { | ||
299 | set_pmd(pmd, *pmd_k); | ||
300 | arch_flush_lazy_mmu_mode(); | ||
301 | } else | ||
302 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); | ||
303 | return pmd_k; | ||
304 | } | 520 | } |
305 | #endif | ||
306 | 521 | ||
307 | #ifdef CONFIG_X86_64 | 522 | #endif /* CONFIG_X86_64 */ |
308 | static const char errata93_warning[] = | ||
309 | KERN_ERR "******* Your BIOS seems to not contain a fix for K8 errata #93\n" | ||
310 | KERN_ERR "******* Working around it, but it may cause SEGVs or burn power.\n" | ||
311 | KERN_ERR "******* Please consider a BIOS update.\n" | ||
312 | KERN_ERR "******* Disabling USB legacy in the BIOS may also help.\n"; | ||
313 | #endif | ||
314 | 523 | ||
315 | /* Workaround for K8 erratum #93 & buggy BIOS. | 524 | /* |
316 | BIOS SMM functions are required to use a specific workaround | 525 | * Workaround for K8 erratum #93 & buggy BIOS. |
317 | to avoid corruption of the 64bit RIP register on C stepping K8. | 526 | * |
318 | A lot of BIOS that didn't get tested properly miss this. | 527 | * BIOS SMM functions are required to use a specific workaround |
319 | The OS sees this as a page fault with the upper 32bits of RIP cleared. | 528 | * to avoid corruption of the 64bit RIP register on C stepping K8. |
320 | Try to work around it here. | 529 | * |
321 | Note we only handle faults in kernel here. | 530 | * A lot of BIOS that didn't get tested properly miss this. |
322 | Does nothing for X86_32 | 531 | * |
532 | * The OS sees this as a page fault with the upper 32bits of RIP cleared. | ||
533 | * Try to work around it here. | ||
534 | * | ||
535 | * Note we only handle faults in kernel here. | ||
536 | * Does nothing on 32-bit. | ||
323 | */ | 537 | */ |
324 | static int is_errata93(struct pt_regs *regs, unsigned long address) | 538 | static int is_errata93(struct pt_regs *regs, unsigned long address) |
325 | { | 539 | { |
326 | #ifdef CONFIG_X86_64 | 540 | #ifdef CONFIG_X86_64 |
327 | static int warned; | 541 | static int once; |
542 | |||
328 | if (address != regs->ip) | 543 | if (address != regs->ip) |
329 | return 0; | 544 | return 0; |
545 | |||
330 | if ((address >> 32) != 0) | 546 | if ((address >> 32) != 0) |
331 | return 0; | 547 | return 0; |
548 | |||
332 | address |= 0xffffffffUL << 32; | 549 | address |= 0xffffffffUL << 32; |
333 | if ((address >= (u64)_stext && address <= (u64)_etext) || | 550 | if ((address >= (u64)_stext && address <= (u64)_etext) || |
334 | (address >= MODULES_VADDR && address <= MODULES_END)) { | 551 | (address >= MODULES_VADDR && address <= MODULES_END)) { |
335 | if (!warned) { | 552 | if (!once) { |
336 | printk(errata93_warning); | 553 | printk(errata93_warning); |
337 | warned = 1; | 554 | once = 1; |
338 | } | 555 | } |
339 | regs->ip = address; | 556 | regs->ip = address; |
340 | return 1; | 557 | return 1; |
@@ -344,16 +561,17 @@ static int is_errata93(struct pt_regs *regs, unsigned long address) | |||
344 | } | 561 | } |
345 | 562 | ||
346 | /* | 563 | /* |
347 | * Work around K8 erratum #100 K8 in compat mode occasionally jumps to illegal | 564 | * Work around K8 erratum #100 K8 in compat mode occasionally jumps |
348 | * addresses >4GB. We catch this in the page fault handler because these | 565 | * to illegal addresses >4GB. |
349 | * addresses are not reachable. Just detect this case and return. Any code | 566 | * |
567 | * We catch this in the page fault handler because these addresses | ||
568 | * are not reachable. Just detect this case and return. Any code | ||
350 | * segment in LDT is compatibility mode. | 569 | * segment in LDT is compatibility mode. |
351 | */ | 570 | */ |
352 | static int is_errata100(struct pt_regs *regs, unsigned long address) | 571 | static int is_errata100(struct pt_regs *regs, unsigned long address) |
353 | { | 572 | { |
354 | #ifdef CONFIG_X86_64 | 573 | #ifdef CONFIG_X86_64 |
355 | if ((regs->cs == __USER32_CS || (regs->cs & (1<<2))) && | 574 | if ((regs->cs == __USER32_CS || (regs->cs & (1<<2))) && (address >> 32)) |
356 | (address >> 32)) | ||
357 | return 1; | 575 | return 1; |
358 | #endif | 576 | #endif |
359 | return 0; | 577 | return 0; |
@@ -363,8 +581,9 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) | |||
363 | { | 581 | { |
364 | #ifdef CONFIG_X86_F00F_BUG | 582 | #ifdef CONFIG_X86_F00F_BUG |
365 | unsigned long nr; | 583 | unsigned long nr; |
584 | |||
366 | /* | 585 | /* |
367 | * Pentium F0 0F C7 C8 bug workaround. | 586 | * Pentium F0 0F C7 C8 bug workaround: |
368 | */ | 587 | */ |
369 | if (boot_cpu_data.f00f_bug) { | 588 | if (boot_cpu_data.f00f_bug) { |
370 | nr = (address - idt_descr.address) >> 3; | 589 | nr = (address - idt_descr.address) >> 3; |
@@ -378,81 +597,87 @@ static int is_f00f_bug(struct pt_regs *regs, unsigned long address) | |||
378 | return 0; | 597 | return 0; |
379 | } | 598 | } |
380 | 599 | ||
381 | static void show_fault_oops(struct pt_regs *regs, unsigned long error_code, | 600 | static const char nx_warning[] = KERN_CRIT |
382 | unsigned long address) | 601 | "kernel tried to execute NX-protected page - exploit attempt? (uid: %d)\n"; |
602 | |||
603 | static void | ||
604 | show_fault_oops(struct pt_regs *regs, unsigned long error_code, | ||
605 | unsigned long address) | ||
383 | { | 606 | { |
384 | #ifdef CONFIG_X86_32 | ||
385 | if (!oops_may_print()) | 607 | if (!oops_may_print()) |
386 | return; | 608 | return; |
387 | #endif | ||
388 | 609 | ||
389 | #ifdef CONFIG_X86_PAE | ||
390 | if (error_code & PF_INSTR) { | 610 | if (error_code & PF_INSTR) { |
391 | unsigned int level; | 611 | unsigned int level; |
612 | |||
392 | pte_t *pte = lookup_address(address, &level); | 613 | pte_t *pte = lookup_address(address, &level); |
393 | 614 | ||
394 | if (pte && pte_present(*pte) && !pte_exec(*pte)) | 615 | if (pte && pte_present(*pte) && !pte_exec(*pte)) |
395 | printk(KERN_CRIT "kernel tried to execute " | 616 | printk(nx_warning, current_uid()); |
396 | "NX-protected page - exploit attempt? " | ||
397 | "(uid: %d)\n", current_uid()); | ||
398 | } | 617 | } |
399 | #endif | ||
400 | 618 | ||
401 | printk(KERN_ALERT "BUG: unable to handle kernel "); | 619 | printk(KERN_ALERT "BUG: unable to handle kernel "); |
402 | if (address < PAGE_SIZE) | 620 | if (address < PAGE_SIZE) |
403 | printk(KERN_CONT "NULL pointer dereference"); | 621 | printk(KERN_CONT "NULL pointer dereference"); |
404 | else | 622 | else |
405 | printk(KERN_CONT "paging request"); | 623 | printk(KERN_CONT "paging request"); |
624 | |||
406 | printk(KERN_CONT " at %p\n", (void *) address); | 625 | printk(KERN_CONT " at %p\n", (void *) address); |
407 | printk(KERN_ALERT "IP:"); | 626 | printk(KERN_ALERT "IP:"); |
408 | printk_address(regs->ip, 1); | 627 | printk_address(regs->ip, 1); |
628 | |||
409 | dump_pagetable(address); | 629 | dump_pagetable(address); |
410 | } | 630 | } |
411 | 631 | ||
412 | #ifdef CONFIG_X86_64 | 632 | static noinline void |
413 | static noinline void pgtable_bad(struct pt_regs *regs, | 633 | pgtable_bad(struct pt_regs *regs, unsigned long error_code, |
414 | unsigned long error_code, unsigned long address) | 634 | unsigned long address) |
415 | { | 635 | { |
416 | unsigned long flags = oops_begin(); | 636 | struct task_struct *tsk; |
417 | int sig = SIGKILL; | 637 | unsigned long flags; |
418 | struct task_struct *tsk = current; | 638 | int sig; |
639 | |||
640 | flags = oops_begin(); | ||
641 | tsk = current; | ||
642 | sig = SIGKILL; | ||
419 | 643 | ||
420 | printk(KERN_ALERT "%s: Corrupted page table at address %lx\n", | 644 | printk(KERN_ALERT "%s: Corrupted page table at address %lx\n", |
421 | tsk->comm, address); | 645 | tsk->comm, address); |
422 | dump_pagetable(address); | 646 | dump_pagetable(address); |
423 | tsk = current; | 647 | |
424 | tsk->thread.cr2 = address; | 648 | tsk->thread.cr2 = address; |
425 | tsk->thread.trap_no = 14; | 649 | tsk->thread.trap_no = 14; |
426 | tsk->thread.error_code = error_code; | 650 | tsk->thread.error_code = error_code; |
651 | |||
427 | if (__die("Bad pagetable", regs, error_code)) | 652 | if (__die("Bad pagetable", regs, error_code)) |
428 | sig = 0; | 653 | sig = 0; |
654 | |||
429 | oops_end(flags, regs, sig); | 655 | oops_end(flags, regs, sig); |
430 | } | 656 | } |
431 | #endif | ||
432 | 657 | ||
433 | static noinline void no_context(struct pt_regs *regs, | 658 | static noinline void |
434 | unsigned long error_code, unsigned long address) | 659 | no_context(struct pt_regs *regs, unsigned long error_code, |
660 | unsigned long address) | ||
435 | { | 661 | { |
436 | struct task_struct *tsk = current; | 662 | struct task_struct *tsk = current; |
437 | unsigned long *stackend; | 663 | unsigned long *stackend; |
438 | |||
439 | #ifdef CONFIG_X86_64 | ||
440 | unsigned long flags; | 664 | unsigned long flags; |
441 | int sig; | 665 | int sig; |
442 | #endif | ||
443 | 666 | ||
444 | /* Are we prepared to handle this kernel fault? */ | 667 | /* Are we prepared to handle this kernel fault? */ |
445 | if (fixup_exception(regs)) | 668 | if (fixup_exception(regs)) |
446 | return; | 669 | return; |
447 | 670 | ||
448 | /* | 671 | /* |
449 | * X86_32 | 672 | * 32-bit: |
450 | * Valid to do another page fault here, because if this fault | 673 | * |
451 | * had been triggered by is_prefetch fixup_exception would have | 674 | * Valid to do another page fault here, because if this fault |
452 | * handled it. | 675 | * had been triggered by is_prefetch fixup_exception would have |
676 | * handled it. | ||
677 | * | ||
678 | * 64-bit: | ||
453 | * | 679 | * |
454 | * X86_64 | 680 | * Hall of shame of CPU/BIOS bugs. |
455 | * Hall of shame of CPU/BIOS bugs. | ||
456 | */ | 681 | */ |
457 | if (is_prefetch(regs, error_code, address)) | 682 | if (is_prefetch(regs, error_code, address)) |
458 | return; | 683 | return; |
@@ -462,54 +687,70 @@ static noinline void no_context(struct pt_regs *regs, | |||
462 | 687 | ||
463 | /* | 688 | /* |
464 | * Oops. The kernel tried to access some bad page. We'll have to | 689 | * Oops. The kernel tried to access some bad page. We'll have to |
465 | * terminate things with extreme prejudice. | 690 | * terminate things with extreme prejudice: |
466 | */ | 691 | */ |
467 | #ifdef CONFIG_X86_32 | ||
468 | bust_spinlocks(1); | ||
469 | #else | ||
470 | flags = oops_begin(); | 692 | flags = oops_begin(); |
471 | #endif | ||
472 | 693 | ||
473 | show_fault_oops(regs, error_code, address); | 694 | show_fault_oops(regs, error_code, address); |
474 | 695 | ||
475 | stackend = end_of_stack(tsk); | 696 | stackend = end_of_stack(tsk); |
476 | if (*stackend != STACK_END_MAGIC) | 697 | if (*stackend != STACK_END_MAGIC) |
477 | printk(KERN_ALERT "Thread overran stack, or stack corrupted\n"); | 698 | printk(KERN_ALERT "Thread overran stack, or stack corrupted\n"); |
478 | 699 | ||
479 | tsk->thread.cr2 = address; | 700 | tsk->thread.cr2 = address; |
480 | tsk->thread.trap_no = 14; | 701 | tsk->thread.trap_no = 14; |
481 | tsk->thread.error_code = error_code; | 702 | tsk->thread.error_code = error_code; |
482 | 703 | ||
483 | #ifdef CONFIG_X86_32 | ||
484 | die("Oops", regs, error_code); | ||
485 | bust_spinlocks(0); | ||
486 | do_exit(SIGKILL); | ||
487 | #else | ||
488 | sig = SIGKILL; | 704 | sig = SIGKILL; |
489 | if (__die("Oops", regs, error_code)) | 705 | if (__die("Oops", regs, error_code)) |
490 | sig = 0; | 706 | sig = 0; |
707 | |||
491 | /* Executive summary in case the body of the oops scrolled away */ | 708 | /* Executive summary in case the body of the oops scrolled away */ |
492 | printk(KERN_EMERG "CR2: %016lx\n", address); | 709 | printk(KERN_EMERG "CR2: %016lx\n", address); |
710 | |||
493 | oops_end(flags, regs, sig); | 711 | oops_end(flags, regs, sig); |
494 | #endif | ||
495 | } | 712 | } |
496 | 713 | ||
497 | static void __bad_area_nosemaphore(struct pt_regs *regs, | 714 | /* |
498 | unsigned long error_code, unsigned long address, | 715 | * Print out info about fatal segfaults, if the show_unhandled_signals |
499 | int si_code) | 716 | * sysctl is set: |
717 | */ | ||
718 | static inline void | ||
719 | show_signal_msg(struct pt_regs *regs, unsigned long error_code, | ||
720 | unsigned long address, struct task_struct *tsk) | ||
721 | { | ||
722 | if (!unhandled_signal(tsk, SIGSEGV)) | ||
723 | return; | ||
724 | |||
725 | if (!printk_ratelimit()) | ||
726 | return; | ||
727 | |||
728 | printk(KERN_CONT "%s%s[%d]: segfault at %lx ip %p sp %p error %lx", | ||
729 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, | ||
730 | tsk->comm, task_pid_nr(tsk), address, | ||
731 | (void *)regs->ip, (void *)regs->sp, error_code); | ||
732 | |||
733 | print_vma_addr(KERN_CONT " in ", regs->ip); | ||
734 | |||
735 | printk(KERN_CONT "\n"); | ||
736 | } | ||
737 | |||
738 | static void | ||
739 | __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, | ||
740 | unsigned long address, int si_code) | ||
500 | { | 741 | { |
501 | struct task_struct *tsk = current; | 742 | struct task_struct *tsk = current; |
502 | 743 | ||
503 | /* User mode accesses just cause a SIGSEGV */ | 744 | /* User mode accesses just cause a SIGSEGV */ |
504 | if (error_code & PF_USER) { | 745 | if (error_code & PF_USER) { |
505 | /* | 746 | /* |
506 | * It's possible to have interrupts off here. | 747 | * It's possible to have interrupts off here: |
507 | */ | 748 | */ |
508 | local_irq_enable(); | 749 | local_irq_enable(); |
509 | 750 | ||
510 | /* | 751 | /* |
511 | * Valid to do another page fault here because this one came | 752 | * Valid to do another page fault here because this one came |
512 | * from user space. | 753 | * from user space: |
513 | */ | 754 | */ |
514 | if (is_prefetch(regs, error_code, address)) | 755 | if (is_prefetch(regs, error_code, address)) |
515 | return; | 756 | return; |
@@ -517,22 +758,16 @@ static void __bad_area_nosemaphore(struct pt_regs *regs, | |||
517 | if (is_errata100(regs, address)) | 758 | if (is_errata100(regs, address)) |
518 | return; | 759 | return; |
519 | 760 | ||
520 | if (show_unhandled_signals && unhandled_signal(tsk, SIGSEGV) && | 761 | if (unlikely(show_unhandled_signals)) |
521 | printk_ratelimit()) { | 762 | show_signal_msg(regs, error_code, address, tsk); |
522 | printk( | 763 | |
523 | "%s%s[%d]: segfault at %lx ip %p sp %p error %lx", | 764 | /* Kernel addresses are always protection faults: */ |
524 | task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG, | 765 | tsk->thread.cr2 = address; |
525 | tsk->comm, task_pid_nr(tsk), address, | 766 | tsk->thread.error_code = error_code | (address >= TASK_SIZE); |
526 | (void *) regs->ip, (void *) regs->sp, error_code); | 767 | tsk->thread.trap_no = 14; |
527 | print_vma_addr(" in ", regs->ip); | ||
528 | printk("\n"); | ||
529 | } | ||
530 | 768 | ||
531 | tsk->thread.cr2 = address; | ||
532 | /* Kernel addresses are always protection faults */ | ||
533 | tsk->thread.error_code = error_code | (address >= TASK_SIZE); | ||
534 | tsk->thread.trap_no = 14; | ||
535 | force_sig_info_fault(SIGSEGV, si_code, address, tsk); | 769 | force_sig_info_fault(SIGSEGV, si_code, address, tsk); |
770 | |||
536 | return; | 771 | return; |
537 | } | 772 | } |
538 | 773 | ||
@@ -542,15 +777,16 @@ static void __bad_area_nosemaphore(struct pt_regs *regs, | |||
542 | no_context(regs, error_code, address); | 777 | no_context(regs, error_code, address); |
543 | } | 778 | } |
544 | 779 | ||
545 | static noinline void bad_area_nosemaphore(struct pt_regs *regs, | 780 | static noinline void |
546 | unsigned long error_code, unsigned long address) | 781 | bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, |
782 | unsigned long address) | ||
547 | { | 783 | { |
548 | __bad_area_nosemaphore(regs, error_code, address, SEGV_MAPERR); | 784 | __bad_area_nosemaphore(regs, error_code, address, SEGV_MAPERR); |
549 | } | 785 | } |
550 | 786 | ||
551 | static void __bad_area(struct pt_regs *regs, | 787 | static void |
552 | unsigned long error_code, unsigned long address, | 788 | __bad_area(struct pt_regs *regs, unsigned long error_code, |
553 | int si_code) | 789 | unsigned long address, int si_code) |
554 | { | 790 | { |
555 | struct mm_struct *mm = current->mm; | 791 | struct mm_struct *mm = current->mm; |
556 | 792 | ||
@@ -563,67 +799,75 @@ static void __bad_area(struct pt_regs *regs, | |||
563 | __bad_area_nosemaphore(regs, error_code, address, si_code); | 799 | __bad_area_nosemaphore(regs, error_code, address, si_code); |
564 | } | 800 | } |
565 | 801 | ||
566 | static noinline void bad_area(struct pt_regs *regs, | 802 | static noinline void |
567 | unsigned long error_code, unsigned long address) | 803 | bad_area(struct pt_regs *regs, unsigned long error_code, unsigned long address) |
568 | { | 804 | { |
569 | __bad_area(regs, error_code, address, SEGV_MAPERR); | 805 | __bad_area(regs, error_code, address, SEGV_MAPERR); |
570 | } | 806 | } |
571 | 807 | ||
572 | static noinline void bad_area_access_error(struct pt_regs *regs, | 808 | static noinline void |
573 | unsigned long error_code, unsigned long address) | 809 | bad_area_access_error(struct pt_regs *regs, unsigned long error_code, |
810 | unsigned long address) | ||
574 | { | 811 | { |
575 | __bad_area(regs, error_code, address, SEGV_ACCERR); | 812 | __bad_area(regs, error_code, address, SEGV_ACCERR); |
576 | } | 813 | } |
577 | 814 | ||
578 | /* TODO: fixup for "mm-invoke-oom-killer-from-page-fault.patch" */ | 815 | /* TODO: fixup for "mm-invoke-oom-killer-from-page-fault.patch" */ |
579 | static void out_of_memory(struct pt_regs *regs, | 816 | static void |
580 | unsigned long error_code, unsigned long address) | 817 | out_of_memory(struct pt_regs *regs, unsigned long error_code, |
818 | unsigned long address) | ||
581 | { | 819 | { |
582 | /* | 820 | /* |
583 | * We ran out of memory, call the OOM killer, and return the userspace | 821 | * We ran out of memory, call the OOM killer, and return the userspace |
584 | * (which will retry the fault, or kill us if we got oom-killed). | 822 | * (which will retry the fault, or kill us if we got oom-killed): |
585 | */ | 823 | */ |
586 | up_read(¤t->mm->mmap_sem); | 824 | up_read(¤t->mm->mmap_sem); |
825 | |||
587 | pagefault_out_of_memory(); | 826 | pagefault_out_of_memory(); |
588 | } | 827 | } |
589 | 828 | ||
590 | static void do_sigbus(struct pt_regs *regs, | 829 | static void |
591 | unsigned long error_code, unsigned long address) | 830 | do_sigbus(struct pt_regs *regs, unsigned long error_code, unsigned long address) |
592 | { | 831 | { |
593 | struct task_struct *tsk = current; | 832 | struct task_struct *tsk = current; |
594 | struct mm_struct *mm = tsk->mm; | 833 | struct mm_struct *mm = tsk->mm; |
595 | 834 | ||
596 | up_read(&mm->mmap_sem); | 835 | up_read(&mm->mmap_sem); |
597 | 836 | ||
598 | /* Kernel mode? Handle exceptions or die */ | 837 | /* Kernel mode? Handle exceptions or die: */ |
599 | if (!(error_code & PF_USER)) | 838 | if (!(error_code & PF_USER)) |
600 | no_context(regs, error_code, address); | 839 | no_context(regs, error_code, address); |
601 | #ifdef CONFIG_X86_32 | 840 | |
602 | /* User space => ok to do another page fault */ | 841 | /* User-space => ok to do another page fault: */ |
603 | if (is_prefetch(regs, error_code, address)) | 842 | if (is_prefetch(regs, error_code, address)) |
604 | return; | 843 | return; |
605 | #endif | 844 | |
606 | tsk->thread.cr2 = address; | 845 | tsk->thread.cr2 = address; |
607 | tsk->thread.error_code = error_code; | 846 | tsk->thread.error_code = error_code; |
608 | tsk->thread.trap_no = 14; | 847 | tsk->thread.trap_no = 14; |
848 | |||
609 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); | 849 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); |
610 | } | 850 | } |
611 | 851 | ||
612 | static noinline void mm_fault_error(struct pt_regs *regs, | 852 | static noinline void |
613 | unsigned long error_code, unsigned long address, unsigned int fault) | 853 | mm_fault_error(struct pt_regs *regs, unsigned long error_code, |
854 | unsigned long address, unsigned int fault) | ||
614 | { | 855 | { |
615 | if (fault & VM_FAULT_OOM) | 856 | if (fault & VM_FAULT_OOM) { |
616 | out_of_memory(regs, error_code, address); | 857 | out_of_memory(regs, error_code, address); |
617 | else if (fault & VM_FAULT_SIGBUS) | 858 | } else { |
618 | do_sigbus(regs, error_code, address); | 859 | if (fault & VM_FAULT_SIGBUS) |
619 | else | 860 | do_sigbus(regs, error_code, address); |
620 | BUG(); | 861 | else |
862 | BUG(); | ||
863 | } | ||
621 | } | 864 | } |
622 | 865 | ||
623 | static int spurious_fault_check(unsigned long error_code, pte_t *pte) | 866 | static int spurious_fault_check(unsigned long error_code, pte_t *pte) |
624 | { | 867 | { |
625 | if ((error_code & PF_WRITE) && !pte_write(*pte)) | 868 | if ((error_code & PF_WRITE) && !pte_write(*pte)) |
626 | return 0; | 869 | return 0; |
870 | |||
627 | if ((error_code & PF_INSTR) && !pte_exec(*pte)) | 871 | if ((error_code & PF_INSTR) && !pte_exec(*pte)) |
628 | return 0; | 872 | return 0; |
629 | 873 | ||
@@ -631,21 +875,25 @@ static int spurious_fault_check(unsigned long error_code, pte_t *pte) | |||
631 | } | 875 | } |
632 | 876 | ||
633 | /* | 877 | /* |
634 | * Handle a spurious fault caused by a stale TLB entry. This allows | 878 | * Handle a spurious fault caused by a stale TLB entry. |
635 | * us to lazily refresh the TLB when increasing the permissions of a | 879 | * |
636 | * kernel page (RO -> RW or NX -> X). Doing it eagerly is very | 880 | * This allows us to lazily refresh the TLB when increasing the |
637 | * expensive since that implies doing a full cross-processor TLB | 881 | * permissions of a kernel page (RO -> RW or NX -> X). Doing it |
638 | * flush, even if no stale TLB entries exist on other processors. | 882 | * eagerly is very expensive since that implies doing a full |
883 | * cross-processor TLB flush, even if no stale TLB entries exist | ||
884 | * on other processors. | ||
885 | * | ||
639 | * There are no security implications to leaving a stale TLB when | 886 | * There are no security implications to leaving a stale TLB when |
640 | * increasing the permissions on a page. | 887 | * increasing the permissions on a page. |
641 | */ | 888 | */ |
642 | static noinline int spurious_fault(unsigned long error_code, | 889 | static noinline int |
643 | unsigned long address) | 890 | spurious_fault(unsigned long error_code, unsigned long address) |
644 | { | 891 | { |
645 | pgd_t *pgd; | 892 | pgd_t *pgd; |
646 | pud_t *pud; | 893 | pud_t *pud; |
647 | pmd_t *pmd; | 894 | pmd_t *pmd; |
648 | pte_t *pte; | 895 | pte_t *pte; |
896 | int ret; | ||
649 | 897 | ||
650 | /* Reserved-bit violation or user access to kernel space? */ | 898 | /* Reserved-bit violation or user access to kernel space? */ |
651 | if (error_code & (PF_USER | PF_RSVD)) | 899 | if (error_code & (PF_USER | PF_RSVD)) |
@@ -673,138 +921,69 @@ static noinline int spurious_fault(unsigned long error_code, | |||
673 | if (!pte_present(*pte)) | 921 | if (!pte_present(*pte)) |
674 | return 0; | 922 | return 0; |
675 | 923 | ||
676 | return spurious_fault_check(error_code, pte); | 924 | ret = spurious_fault_check(error_code, pte); |
677 | } | 925 | if (!ret) |
678 | 926 | return 0; | |
679 | /* | ||
680 | * X86_32 | ||
681 | * Handle a fault on the vmalloc or module mapping area | ||
682 | * | ||
683 | * X86_64 | ||
684 | * Handle a fault on the vmalloc area | ||
685 | * | ||
686 | * This assumes no large pages in there. | ||
687 | */ | ||
688 | static noinline int vmalloc_fault(unsigned long address) | ||
689 | { | ||
690 | #ifdef CONFIG_X86_32 | ||
691 | unsigned long pgd_paddr; | ||
692 | pmd_t *pmd_k; | ||
693 | pte_t *pte_k; | ||
694 | |||
695 | /* Make sure we are in vmalloc area */ | ||
696 | if (!(address >= VMALLOC_START && address < VMALLOC_END)) | ||
697 | return -1; | ||
698 | 927 | ||
699 | /* | 928 | /* |
700 | * Synchronize this task's top level page-table | 929 | * Make sure we have permissions in PMD. |
701 | * with the 'reference' page table. | 930 | * If not, then there's a bug in the page tables: |
702 | * | ||
703 | * Do _not_ use "current" here. We might be inside | ||
704 | * an interrupt in the middle of a task switch.. | ||
705 | */ | 931 | */ |
706 | pgd_paddr = read_cr3(); | 932 | ret = spurious_fault_check(error_code, (pte_t *) pmd); |
707 | pmd_k = vmalloc_sync_one(__va(pgd_paddr), address); | 933 | WARN_ONCE(!ret, "PMD has incorrect permission bits\n"); |
708 | if (!pmd_k) | ||
709 | return -1; | ||
710 | pte_k = pte_offset_kernel(pmd_k, address); | ||
711 | if (!pte_present(*pte_k)) | ||
712 | return -1; | ||
713 | return 0; | ||
714 | #else | ||
715 | pgd_t *pgd, *pgd_ref; | ||
716 | pud_t *pud, *pud_ref; | ||
717 | pmd_t *pmd, *pmd_ref; | ||
718 | pte_t *pte, *pte_ref; | ||
719 | |||
720 | /* Make sure we are in vmalloc area */ | ||
721 | if (!(address >= VMALLOC_START && address < VMALLOC_END)) | ||
722 | return -1; | ||
723 | |||
724 | /* Copy kernel mappings over when needed. This can also | ||
725 | happen within a race in page table update. In the later | ||
726 | case just flush. */ | ||
727 | |||
728 | pgd = pgd_offset(current->active_mm, address); | ||
729 | pgd_ref = pgd_offset_k(address); | ||
730 | if (pgd_none(*pgd_ref)) | ||
731 | return -1; | ||
732 | if (pgd_none(*pgd)) | ||
733 | set_pgd(pgd, *pgd_ref); | ||
734 | else | ||
735 | BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); | ||
736 | |||
737 | /* Below here mismatches are bugs because these lower tables | ||
738 | are shared */ | ||
739 | 934 | ||
740 | pud = pud_offset(pgd, address); | 935 | return ret; |
741 | pud_ref = pud_offset(pgd_ref, address); | ||
742 | if (pud_none(*pud_ref)) | ||
743 | return -1; | ||
744 | if (pud_none(*pud) || pud_page_vaddr(*pud) != pud_page_vaddr(*pud_ref)) | ||
745 | BUG(); | ||
746 | pmd = pmd_offset(pud, address); | ||
747 | pmd_ref = pmd_offset(pud_ref, address); | ||
748 | if (pmd_none(*pmd_ref)) | ||
749 | return -1; | ||
750 | if (pmd_none(*pmd) || pmd_page(*pmd) != pmd_page(*pmd_ref)) | ||
751 | BUG(); | ||
752 | pte_ref = pte_offset_kernel(pmd_ref, address); | ||
753 | if (!pte_present(*pte_ref)) | ||
754 | return -1; | ||
755 | pte = pte_offset_kernel(pmd, address); | ||
756 | /* Don't use pte_page here, because the mappings can point | ||
757 | outside mem_map, and the NUMA hash lookup cannot handle | ||
758 | that. */ | ||
759 | if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref)) | ||
760 | BUG(); | ||
761 | return 0; | ||
762 | #endif | ||
763 | } | 936 | } |
764 | 937 | ||
765 | int show_unhandled_signals = 1; | 938 | int show_unhandled_signals = 1; |
766 | 939 | ||
767 | static inline int access_error(unsigned long error_code, int write, | 940 | static inline int |
768 | struct vm_area_struct *vma) | 941 | access_error(unsigned long error_code, int write, struct vm_area_struct *vma) |
769 | { | 942 | { |
770 | if (write) { | 943 | if (write) { |
771 | /* write, present and write, not present */ | 944 | /* write, present and write, not present: */ |
772 | if (unlikely(!(vma->vm_flags & VM_WRITE))) | 945 | if (unlikely(!(vma->vm_flags & VM_WRITE))) |
773 | return 1; | 946 | return 1; |
774 | } else if (unlikely(error_code & PF_PROT)) { | 947 | return 0; |
775 | /* read, present */ | ||
776 | return 1; | ||
777 | } else { | ||
778 | /* read, not present */ | ||
779 | if (unlikely(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))) | ||
780 | return 1; | ||
781 | } | 948 | } |
782 | 949 | ||
950 | /* read, present: */ | ||
951 | if (unlikely(error_code & PF_PROT)) | ||
952 | return 1; | ||
953 | |||
954 | /* read, not present: */ | ||
955 | if (unlikely(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))) | ||
956 | return 1; | ||
957 | |||
783 | return 0; | 958 | return 0; |
784 | } | 959 | } |
785 | 960 | ||
961 | static int fault_in_kernel_space(unsigned long address) | ||
962 | { | ||
963 | return address >= TASK_SIZE_MAX; | ||
964 | } | ||
965 | |||
786 | /* | 966 | /* |
787 | * This routine handles page faults. It determines the address, | 967 | * This routine handles page faults. It determines the address, |
788 | * and the problem, and then passes it off to one of the appropriate | 968 | * and the problem, and then passes it off to one of the appropriate |
789 | * routines. | 969 | * routines. |
790 | */ | 970 | */ |
791 | #ifdef CONFIG_X86_64 | 971 | dotraplinkage void __kprobes |
792 | asmlinkage | 972 | do_page_fault(struct pt_regs *regs, unsigned long error_code) |
793 | #endif | ||
794 | void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | ||
795 | { | 973 | { |
796 | unsigned long address; | 974 | struct vm_area_struct *vma; |
797 | struct task_struct *tsk; | 975 | struct task_struct *tsk; |
976 | unsigned long address; | ||
798 | struct mm_struct *mm; | 977 | struct mm_struct *mm; |
799 | struct vm_area_struct *vma; | ||
800 | int write; | 978 | int write; |
801 | int fault; | 979 | int fault; |
802 | 980 | ||
803 | tsk = current; | 981 | tsk = current; |
804 | mm = tsk->mm; | 982 | mm = tsk->mm; |
983 | |||
805 | prefetchw(&mm->mmap_sem); | 984 | prefetchw(&mm->mmap_sem); |
806 | 985 | ||
807 | /* get the address */ | 986 | /* Get the faulting address: */ |
808 | address = read_cr2(); | 987 | address = read_cr2(); |
809 | 988 | ||
810 | if (unlikely(kmmio_fault(regs, address))) | 989 | if (unlikely(kmmio_fault(regs, address))) |
@@ -823,30 +1002,28 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
823 | * (error_code & 4) == 0, and that the fault was not a | 1002 | * (error_code & 4) == 0, and that the fault was not a |
824 | * protection error (error_code & 9) == 0. | 1003 | * protection error (error_code & 9) == 0. |
825 | */ | 1004 | */ |
826 | #ifdef CONFIG_X86_32 | 1005 | if (unlikely(fault_in_kernel_space(address))) { |
827 | if (unlikely(address >= TASK_SIZE)) { | ||
828 | #else | ||
829 | if (unlikely(address >= TASK_SIZE64)) { | ||
830 | #endif | ||
831 | if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) && | 1006 | if (!(error_code & (PF_RSVD|PF_USER|PF_PROT)) && |
832 | vmalloc_fault(address) >= 0) | 1007 | vmalloc_fault(address) >= 0) |
833 | return; | 1008 | return; |
834 | 1009 | ||
835 | /* Can handle a stale RO->RW TLB */ | 1010 | /* Can handle a stale RO->RW TLB: */ |
836 | if (spurious_fault(error_code, address)) | 1011 | if (spurious_fault(error_code, address)) |
837 | return; | 1012 | return; |
838 | 1013 | ||
839 | /* kprobes don't want to hook the spurious faults. */ | 1014 | /* kprobes don't want to hook the spurious faults: */ |
840 | if (notify_page_fault(regs)) | 1015 | if (notify_page_fault(regs)) |
841 | return; | 1016 | return; |
842 | /* | 1017 | /* |
843 | * Don't take the mm semaphore here. If we fixup a prefetch | 1018 | * Don't take the mm semaphore here. If we fixup a prefetch |
844 | * fault we could otherwise deadlock. | 1019 | * fault we could otherwise deadlock: |
845 | */ | 1020 | */ |
846 | bad_area_nosemaphore(regs, error_code, address); | 1021 | bad_area_nosemaphore(regs, error_code, address); |
1022 | |||
847 | return; | 1023 | return; |
848 | } | 1024 | } |
849 | 1025 | ||
1026 | /* kprobes don't want to hook the spurious faults: */ | ||
850 | if (unlikely(notify_page_fault(regs))) | 1027 | if (unlikely(notify_page_fault(regs))) |
851 | return; | 1028 | return; |
852 | /* | 1029 | /* |
@@ -854,22 +1031,22 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
854 | * vmalloc fault has been handled. | 1031 | * vmalloc fault has been handled. |
855 | * | 1032 | * |
856 | * User-mode registers count as a user access even for any | 1033 | * User-mode registers count as a user access even for any |
857 | * potential system fault or CPU buglet. | 1034 | * potential system fault or CPU buglet: |
858 | */ | 1035 | */ |
859 | if (user_mode_vm(regs)) { | 1036 | if (user_mode_vm(regs)) { |
860 | local_irq_enable(); | 1037 | local_irq_enable(); |
861 | error_code |= PF_USER; | 1038 | error_code |= PF_USER; |
862 | } else if (regs->flags & X86_EFLAGS_IF) | 1039 | } else { |
863 | local_irq_enable(); | 1040 | if (regs->flags & X86_EFLAGS_IF) |
1041 | local_irq_enable(); | ||
1042 | } | ||
864 | 1043 | ||
865 | #ifdef CONFIG_X86_64 | ||
866 | if (unlikely(error_code & PF_RSVD)) | 1044 | if (unlikely(error_code & PF_RSVD)) |
867 | pgtable_bad(regs, error_code, address); | 1045 | pgtable_bad(regs, error_code, address); |
868 | #endif | ||
869 | 1046 | ||
870 | /* | 1047 | /* |
871 | * If we're in an interrupt, have no user context or are running in an | 1048 | * If we're in an interrupt, have no user context or are running |
872 | * atomic region then we must not take the fault. | 1049 | * in an atomic region then we must not take the fault: |
873 | */ | 1050 | */ |
874 | if (unlikely(in_atomic() || !mm)) { | 1051 | if (unlikely(in_atomic() || !mm)) { |
875 | bad_area_nosemaphore(regs, error_code, address); | 1052 | bad_area_nosemaphore(regs, error_code, address); |
@@ -878,19 +1055,19 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
878 | 1055 | ||
879 | /* | 1056 | /* |
880 | * When running in the kernel we expect faults to occur only to | 1057 | * When running in the kernel we expect faults to occur only to |
881 | * addresses in user space. All other faults represent errors in the | 1058 | * addresses in user space. All other faults represent errors in |
882 | * kernel and should generate an OOPS. Unfortunately, in the case of an | 1059 | * the kernel and should generate an OOPS. Unfortunately, in the |
883 | * erroneous fault occurring in a code path which already holds mmap_sem | 1060 | * case of an erroneous fault occurring in a code path which already |
884 | * we will deadlock attempting to validate the fault against the | 1061 | * holds mmap_sem we will deadlock attempting to validate the fault |
885 | * address space. Luckily the kernel only validly references user | 1062 | * against the address space. Luckily the kernel only validly |
886 | * space from well defined areas of code, which are listed in the | 1063 | * references user space from well defined areas of code, which are |
887 | * exceptions table. | 1064 | * listed in the exceptions table. |
888 | * | 1065 | * |
889 | * As the vast majority of faults will be valid we will only perform | 1066 | * As the vast majority of faults will be valid we will only perform |
890 | * the source reference check when there is a possibility of a deadlock. | 1067 | * the source reference check when there is a possibility of a |
891 | * Attempt to lock the address space, if we cannot we then validate the | 1068 | * deadlock. Attempt to lock the address space, if we cannot we then |
892 | * source. If this is invalid we can skip the address space check, | 1069 | * validate the source. If this is invalid we can skip the address |
893 | * thus avoiding the deadlock. | 1070 | * space check, thus avoiding the deadlock: |
894 | */ | 1071 | */ |
895 | if (unlikely(!down_read_trylock(&mm->mmap_sem))) { | 1072 | if (unlikely(!down_read_trylock(&mm->mmap_sem))) { |
896 | if ((error_code & PF_USER) == 0 && | 1073 | if ((error_code & PF_USER) == 0 && |
@@ -899,6 +1076,13 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
899 | return; | 1076 | return; |
900 | } | 1077 | } |
901 | down_read(&mm->mmap_sem); | 1078 | down_read(&mm->mmap_sem); |
1079 | } else { | ||
1080 | /* | ||
1081 | * The above down_read_trylock() might have succeeded in | ||
1082 | * which case we'll have missed the might_sleep() from | ||
1083 | * down_read(): | ||
1084 | */ | ||
1085 | might_sleep(); | ||
902 | } | 1086 | } |
903 | 1087 | ||
904 | vma = find_vma(mm, address); | 1088 | vma = find_vma(mm, address); |
@@ -916,7 +1100,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
916 | /* | 1100 | /* |
917 | * Accessing the stack below %sp is always a bug. | 1101 | * Accessing the stack below %sp is always a bug. |
918 | * The large cushion allows instructions like enter | 1102 | * The large cushion allows instructions like enter |
919 | * and pusha to work. ("enter $65535,$31" pushes | 1103 | * and pusha to work. ("enter $65535, $31" pushes |
920 | * 32 pointers and then decrements %sp by 65535.) | 1104 | * 32 pointers and then decrements %sp by 65535.) |
921 | */ | 1105 | */ |
922 | if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) { | 1106 | if (unlikely(address + 65536 + 32 * sizeof(unsigned long) < regs->sp)) { |
@@ -935,6 +1119,7 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
935 | */ | 1119 | */ |
936 | good_area: | 1120 | good_area: |
937 | write = error_code & PF_WRITE; | 1121 | write = error_code & PF_WRITE; |
1122 | |||
938 | if (unlikely(access_error(error_code, write, vma))) { | 1123 | if (unlikely(access_error(error_code, write, vma))) { |
939 | bad_area_access_error(regs, error_code, address); | 1124 | bad_area_access_error(regs, error_code, address); |
940 | return; | 1125 | return; |
@@ -943,75 +1128,21 @@ good_area: | |||
943 | /* | 1128 | /* |
944 | * If for any reason at all we couldn't handle the fault, | 1129 | * If for any reason at all we couldn't handle the fault, |
945 | * make sure we exit gracefully rather than endlessly redo | 1130 | * make sure we exit gracefully rather than endlessly redo |
946 | * the fault. | 1131 | * the fault: |
947 | */ | 1132 | */ |
948 | fault = handle_mm_fault(mm, vma, address, write); | 1133 | fault = handle_mm_fault(mm, vma, address, write); |
1134 | |||
949 | if (unlikely(fault & VM_FAULT_ERROR)) { | 1135 | if (unlikely(fault & VM_FAULT_ERROR)) { |
950 | mm_fault_error(regs, error_code, address, fault); | 1136 | mm_fault_error(regs, error_code, address, fault); |
951 | return; | 1137 | return; |
952 | } | 1138 | } |
1139 | |||
953 | if (fault & VM_FAULT_MAJOR) | 1140 | if (fault & VM_FAULT_MAJOR) |
954 | tsk->maj_flt++; | 1141 | tsk->maj_flt++; |
955 | else | 1142 | else |
956 | tsk->min_flt++; | 1143 | tsk->min_flt++; |
957 | 1144 | ||
958 | #ifdef CONFIG_X86_32 | 1145 | check_v8086_mode(regs, address, tsk); |
959 | /* | ||
960 | * Did it hit the DOS screen memory VA from vm86 mode? | ||
961 | */ | ||
962 | if (v8086_mode(regs)) { | ||
963 | unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT; | ||
964 | if (bit < 32) | ||
965 | tsk->thread.screen_bitmap |= 1 << bit; | ||
966 | } | ||
967 | #endif | ||
968 | up_read(&mm->mmap_sem); | ||
969 | } | ||
970 | |||
971 | DEFINE_SPINLOCK(pgd_lock); | ||
972 | LIST_HEAD(pgd_list); | ||
973 | |||
974 | void vmalloc_sync_all(void) | ||
975 | { | ||
976 | unsigned long address; | ||
977 | |||
978 | #ifdef CONFIG_X86_32 | ||
979 | if (SHARED_KERNEL_PMD) | ||
980 | return; | ||
981 | |||
982 | for (address = VMALLOC_START & PMD_MASK; | ||
983 | address >= TASK_SIZE && address < FIXADDR_TOP; | ||
984 | address += PMD_SIZE) { | ||
985 | unsigned long flags; | ||
986 | struct page *page; | ||
987 | |||
988 | spin_lock_irqsave(&pgd_lock, flags); | ||
989 | list_for_each_entry(page, &pgd_list, lru) { | ||
990 | if (!vmalloc_sync_one(page_address(page), | ||
991 | address)) | ||
992 | break; | ||
993 | } | ||
994 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
995 | } | ||
996 | #else /* CONFIG_X86_64 */ | ||
997 | for (address = VMALLOC_START & PGDIR_MASK; address <= VMALLOC_END; | ||
998 | address += PGDIR_SIZE) { | ||
999 | const pgd_t *pgd_ref = pgd_offset_k(address); | ||
1000 | unsigned long flags; | ||
1001 | struct page *page; | ||
1002 | 1146 | ||
1003 | if (pgd_none(*pgd_ref)) | 1147 | up_read(&mm->mmap_sem); |
1004 | continue; | ||
1005 | spin_lock_irqsave(&pgd_lock, flags); | ||
1006 | list_for_each_entry(page, &pgd_list, lru) { | ||
1007 | pgd_t *pgd; | ||
1008 | pgd = (pgd_t *)page_address(page) + pgd_index(address); | ||
1009 | if (pgd_none(*pgd)) | ||
1010 | set_pgd(pgd, *pgd_ref); | ||
1011 | else | ||
1012 | BUG_ON(pgd_page_vaddr(*pgd) != pgd_page_vaddr(*pgd_ref)); | ||
1013 | } | ||
1014 | spin_unlock_irqrestore(&pgd_lock, flags); | ||
1015 | } | ||
1016 | #endif | ||
1017 | } | 1148 | } |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 00263bf07a88..06708ee94aa4 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -674,75 +674,97 @@ static int __init parse_highmem(char *arg) | |||
674 | } | 674 | } |
675 | early_param("highmem", parse_highmem); | 675 | early_param("highmem", parse_highmem); |
676 | 676 | ||
677 | #define MSG_HIGHMEM_TOO_BIG \ | ||
678 | "highmem size (%luMB) is bigger than pages available (%luMB)!\n" | ||
679 | |||
680 | #define MSG_LOWMEM_TOO_SMALL \ | ||
681 | "highmem size (%luMB) results in <64MB lowmem, ignoring it!\n" | ||
677 | /* | 682 | /* |
678 | * Determine low and high memory ranges: | 683 | * All of RAM fits into lowmem - but if user wants highmem |
684 | * artificially via the highmem=x boot parameter then create | ||
685 | * it: | ||
679 | */ | 686 | */ |
680 | void __init find_low_pfn_range(void) | 687 | void __init lowmem_pfn_init(void) |
681 | { | 688 | { |
682 | /* it could update max_pfn */ | ||
683 | |||
684 | /* max_low_pfn is 0, we already have early_res support */ | 689 | /* max_low_pfn is 0, we already have early_res support */ |
685 | |||
686 | max_low_pfn = max_pfn; | 690 | max_low_pfn = max_pfn; |
687 | if (max_low_pfn > MAXMEM_PFN) { | 691 | |
688 | if (highmem_pages == -1) | 692 | if (highmem_pages == -1) |
689 | highmem_pages = max_pfn - MAXMEM_PFN; | 693 | highmem_pages = 0; |
690 | if (highmem_pages + MAXMEM_PFN < max_pfn) | 694 | #ifdef CONFIG_HIGHMEM |
691 | max_pfn = MAXMEM_PFN + highmem_pages; | 695 | if (highmem_pages >= max_pfn) { |
692 | if (highmem_pages + MAXMEM_PFN > max_pfn) { | 696 | printk(KERN_ERR MSG_HIGHMEM_TOO_BIG, |
693 | printk(KERN_WARNING "only %luMB highmem pages " | 697 | pages_to_mb(highmem_pages), pages_to_mb(max_pfn)); |
694 | "available, ignoring highmem size of %uMB.\n", | 698 | highmem_pages = 0; |
695 | pages_to_mb(max_pfn - MAXMEM_PFN), | 699 | } |
700 | if (highmem_pages) { | ||
701 | if (max_low_pfn - highmem_pages < 64*1024*1024/PAGE_SIZE) { | ||
702 | printk(KERN_ERR MSG_LOWMEM_TOO_SMALL, | ||
696 | pages_to_mb(highmem_pages)); | 703 | pages_to_mb(highmem_pages)); |
697 | highmem_pages = 0; | 704 | highmem_pages = 0; |
698 | } | 705 | } |
699 | max_low_pfn = MAXMEM_PFN; | 706 | max_low_pfn -= highmem_pages; |
707 | } | ||
708 | #else | ||
709 | if (highmem_pages) | ||
710 | printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n"); | ||
711 | #endif | ||
712 | } | ||
713 | |||
714 | #define MSG_HIGHMEM_TOO_SMALL \ | ||
715 | "only %luMB highmem pages available, ignoring highmem size of %luMB!\n" | ||
716 | |||
717 | #define MSG_HIGHMEM_TRIMMED \ | ||
718 | "Warning: only 4GB will be used. Use a HIGHMEM64G enabled kernel!\n" | ||
719 | /* | ||
720 | * We have more RAM than fits into lowmem - we try to put it into | ||
721 | * highmem, also taking the highmem=x boot parameter into account: | ||
722 | */ | ||
723 | void __init highmem_pfn_init(void) | ||
724 | { | ||
725 | max_low_pfn = MAXMEM_PFN; | ||
726 | |||
727 | if (highmem_pages == -1) | ||
728 | highmem_pages = max_pfn - MAXMEM_PFN; | ||
729 | |||
730 | if (highmem_pages + MAXMEM_PFN < max_pfn) | ||
731 | max_pfn = MAXMEM_PFN + highmem_pages; | ||
732 | |||
733 | if (highmem_pages + MAXMEM_PFN > max_pfn) { | ||
734 | printk(KERN_WARNING MSG_HIGHMEM_TOO_SMALL, | ||
735 | pages_to_mb(max_pfn - MAXMEM_PFN), | ||
736 | pages_to_mb(highmem_pages)); | ||
737 | highmem_pages = 0; | ||
738 | } | ||
700 | #ifndef CONFIG_HIGHMEM | 739 | #ifndef CONFIG_HIGHMEM |
701 | /* Maximum memory usable is what is directly addressable */ | 740 | /* Maximum memory usable is what is directly addressable */ |
702 | printk(KERN_WARNING "Warning only %ldMB will be used.\n", | 741 | printk(KERN_WARNING "Warning only %ldMB will be used.\n", MAXMEM>>20); |
703 | MAXMEM>>20); | 742 | if (max_pfn > MAX_NONPAE_PFN) |
704 | if (max_pfn > MAX_NONPAE_PFN) | 743 | printk(KERN_WARNING "Use a HIGHMEM64G enabled kernel.\n"); |
705 | printk(KERN_WARNING | 744 | else |
706 | "Use a HIGHMEM64G enabled kernel.\n"); | 745 | printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n"); |
707 | else | 746 | max_pfn = MAXMEM_PFN; |
708 | printk(KERN_WARNING "Use a HIGHMEM enabled kernel.\n"); | ||
709 | max_pfn = MAXMEM_PFN; | ||
710 | #else /* !CONFIG_HIGHMEM */ | 747 | #else /* !CONFIG_HIGHMEM */ |
711 | #ifndef CONFIG_HIGHMEM64G | 748 | #ifndef CONFIG_HIGHMEM64G |
712 | if (max_pfn > MAX_NONPAE_PFN) { | 749 | if (max_pfn > MAX_NONPAE_PFN) { |
713 | max_pfn = MAX_NONPAE_PFN; | 750 | max_pfn = MAX_NONPAE_PFN; |
714 | printk(KERN_WARNING "Warning only 4GB will be used." | 751 | printk(KERN_WARNING MSG_HIGHMEM_TRIMMED); |
715 | "Use a HIGHMEM64G enabled kernel.\n"); | 752 | } |
716 | } | ||
717 | #endif /* !CONFIG_HIGHMEM64G */ | 753 | #endif /* !CONFIG_HIGHMEM64G */ |
718 | #endif /* !CONFIG_HIGHMEM */ | 754 | #endif /* !CONFIG_HIGHMEM */ |
719 | } else { | 755 | } |
720 | if (highmem_pages == -1) | 756 | |
721 | highmem_pages = 0; | 757 | /* |
722 | #ifdef CONFIG_HIGHMEM | 758 | * Determine low and high memory ranges: |
723 | if (highmem_pages >= max_pfn) { | 759 | */ |
724 | printk(KERN_ERR "highmem size specified (%uMB) is " | 760 | void __init find_low_pfn_range(void) |
725 | "bigger than pages available (%luMB)!.\n", | 761 | { |
726 | pages_to_mb(highmem_pages), | 762 | /* it could update max_pfn */ |
727 | pages_to_mb(max_pfn)); | 763 | |
728 | highmem_pages = 0; | 764 | if (max_pfn <= MAXMEM_PFN) |
729 | } | 765 | lowmem_pfn_init(); |
730 | if (highmem_pages) { | 766 | else |
731 | if (max_low_pfn - highmem_pages < | 767 | highmem_pfn_init(); |
732 | 64*1024*1024/PAGE_SIZE){ | ||
733 | printk(KERN_ERR "highmem size %uMB results in " | ||
734 | "smaller than 64MB lowmem, ignoring it.\n" | ||
735 | , pages_to_mb(highmem_pages)); | ||
736 | highmem_pages = 0; | ||
737 | } | ||
738 | max_low_pfn -= highmem_pages; | ||
739 | } | ||
740 | #else | ||
741 | if (highmem_pages) | ||
742 | printk(KERN_ERR "ignoring highmem size on non-highmem" | ||
743 | " kernel!\n"); | ||
744 | #endif | ||
745 | } | ||
746 | } | 768 | } |
747 | 769 | ||
748 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 770 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index af750ab973b6..433f7bd4648a 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -134,25 +134,6 @@ int page_is_ram(unsigned long pagenr) | |||
134 | return 0; | 134 | return 0; |
135 | } | 135 | } |
136 | 136 | ||
137 | int pagerange_is_ram(unsigned long start, unsigned long end) | ||
138 | { | ||
139 | int ram_page = 0, not_rampage = 0; | ||
140 | unsigned long page_nr; | ||
141 | |||
142 | for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT); | ||
143 | ++page_nr) { | ||
144 | if (page_is_ram(page_nr)) | ||
145 | ram_page = 1; | ||
146 | else | ||
147 | not_rampage = 1; | ||
148 | |||
149 | if (ram_page == not_rampage) | ||
150 | return -1; | ||
151 | } | ||
152 | |||
153 | return ram_page; | ||
154 | } | ||
155 | |||
156 | /* | 137 | /* |
157 | * Fix up the linear direct mapping of the kernel to avoid cache attribute | 138 | * Fix up the linear direct mapping of the kernel to avoid cache attribute |
158 | * conflicts. | 139 | * conflicts. |
@@ -367,7 +348,7 @@ EXPORT_SYMBOL(ioremap_nocache); | |||
367 | * | 348 | * |
368 | * Must be freed with iounmap. | 349 | * Must be freed with iounmap. |
369 | */ | 350 | */ |
370 | void __iomem *ioremap_wc(unsigned long phys_addr, unsigned long size) | 351 | void __iomem *ioremap_wc(resource_size_t phys_addr, unsigned long size) |
371 | { | 352 | { |
372 | if (pat_enabled) | 353 | if (pat_enabled) |
373 | return __ioremap_caller(phys_addr, size, _PAGE_CACHE_WC, | 354 | return __ioremap_caller(phys_addr, size, _PAGE_CACHE_WC, |
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c index 56fe7124fbec..165829600566 100644 --- a/arch/x86/mm/mmap.c +++ b/arch/x86/mm/mmap.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Based on code by Ingo Molnar and Andi Kleen, copyrighted | 4 | * Based on code by Ingo Molnar and Andi Kleen, copyrighted |
5 | * as follows: | 5 | * as follows: |
6 | * | 6 | * |
7 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. | 7 | * Copyright 2003-2009 Red Hat Inc. |
8 | * All Rights Reserved. | 8 | * All Rights Reserved. |
9 | * Copyright 2005 Andi Kleen, SUSE Labs. | 9 | * Copyright 2005 Andi Kleen, SUSE Labs. |
10 | * Copyright 2007 Jiri Kosina, SUSE Labs. | 10 | * Copyright 2007 Jiri Kosina, SUSE Labs. |
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c index d1f7439d173c..3957cd6d6454 100644 --- a/arch/x86/mm/numa_32.c +++ b/arch/x86/mm/numa_32.c | |||
@@ -194,7 +194,7 @@ void *alloc_remap(int nid, unsigned long size) | |||
194 | size = ALIGN(size, L1_CACHE_BYTES); | 194 | size = ALIGN(size, L1_CACHE_BYTES); |
195 | 195 | ||
196 | if (!allocation || (allocation + size) >= node_remap_end_vaddr[nid]) | 196 | if (!allocation || (allocation + size) >= node_remap_end_vaddr[nid]) |
197 | return 0; | 197 | return NULL; |
198 | 198 | ||
199 | node_remap_alloc_vaddr[nid] += size; | 199 | node_remap_alloc_vaddr[nid] += size; |
200 | memset(allocation, 0, size); | 200 | memset(allocation, 0, size); |
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index deb1c1ab7868..64c9cf043cdd 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -166,7 +166,7 @@ int __init compute_hash_shift(struct bootnode *nodes, int numnodes, | |||
166 | return shift; | 166 | return shift; |
167 | } | 167 | } |
168 | 168 | ||
169 | int early_pfn_to_nid(unsigned long pfn) | 169 | int __meminit __early_pfn_to_nid(unsigned long pfn) |
170 | { | 170 | { |
171 | return phys_to_nid(pfn << PAGE_SHIFT); | 171 | return phys_to_nid(pfn << PAGE_SHIFT); |
172 | } | 172 | } |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 84ba74820ad6..8253bc97587e 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -482,6 +482,13 @@ static int split_large_page(pte_t *kpte, unsigned long address) | |||
482 | pbase = (pte_t *)page_address(base); | 482 | pbase = (pte_t *)page_address(base); |
483 | paravirt_alloc_pte(&init_mm, page_to_pfn(base)); | 483 | paravirt_alloc_pte(&init_mm, page_to_pfn(base)); |
484 | ref_prot = pte_pgprot(pte_clrhuge(*kpte)); | 484 | ref_prot = pte_pgprot(pte_clrhuge(*kpte)); |
485 | /* | ||
486 | * If we ever want to utilize the PAT bit, we need to | ||
487 | * update this function to make sure it's converted from | ||
488 | * bit 12 to bit 7 when we cross from the 2MB level to | ||
489 | * the 4K level: | ||
490 | */ | ||
491 | WARN_ON_ONCE(pgprot_val(ref_prot) & _PAGE_PAT_LARGE); | ||
485 | 492 | ||
486 | #ifdef CONFIG_X86_64 | 493 | #ifdef CONFIG_X86_64 |
487 | if (level == PG_LEVEL_1G) { | 494 | if (level == PG_LEVEL_1G) { |
@@ -508,18 +515,13 @@ static int split_large_page(pte_t *kpte, unsigned long address) | |||
508 | #endif | 515 | #endif |
509 | 516 | ||
510 | /* | 517 | /* |
511 | * Install the new, split up pagetable. Important details here: | 518 | * Install the new, split up pagetable. |
512 | * | ||
513 | * On Intel the NX bit of all levels must be cleared to make a | ||
514 | * page executable. See section 4.13.2 of Intel 64 and IA-32 | ||
515 | * Architectures Software Developer's Manual). | ||
516 | * | 519 | * |
517 | * Mark the entry present. The current mapping might be | 520 | * We use the standard kernel pagetable protections for the new |
518 | * set to not present, which we preserved above. | 521 | * pagetable protections, the actual ptes set above control the |
522 | * primary protection behavior: | ||
519 | */ | 523 | */ |
520 | ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte))); | 524 | __set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE))); |
521 | pgprot_val(ref_prot) |= _PAGE_PRESENT; | ||
522 | __set_pmd_pte(kpte, address, mk_pte(base, ref_prot)); | ||
523 | base = NULL; | 525 | base = NULL; |
524 | 526 | ||
525 | out_unlock: | 527 | out_unlock: |
@@ -575,7 +577,6 @@ static int __change_page_attr(struct cpa_data *cpa, int primary) | |||
575 | address = cpa->vaddr[cpa->curpage]; | 577 | address = cpa->vaddr[cpa->curpage]; |
576 | else | 578 | else |
577 | address = *cpa->vaddr; | 579 | address = *cpa->vaddr; |
578 | |||
579 | repeat: | 580 | repeat: |
580 | kpte = lookup_address(address, &level); | 581 | kpte = lookup_address(address, &level); |
581 | if (!kpte) | 582 | if (!kpte) |
@@ -812,6 +813,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, | |||
812 | 813 | ||
813 | vm_unmap_aliases(); | 814 | vm_unmap_aliases(); |
814 | 815 | ||
816 | /* | ||
817 | * If we're called with lazy mmu updates enabled, the | ||
818 | * in-memory pte state may be stale. Flush pending updates to | ||
819 | * bring them up to date. | ||
820 | */ | ||
821 | arch_flush_lazy_mmu_mode(); | ||
822 | |||
815 | cpa.vaddr = addr; | 823 | cpa.vaddr = addr; |
816 | cpa.numpages = numpages; | 824 | cpa.numpages = numpages; |
817 | cpa.mask_set = mask_set; | 825 | cpa.mask_set = mask_set; |
@@ -854,6 +862,13 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages, | |||
854 | } else | 862 | } else |
855 | cpa_flush_all(cache); | 863 | cpa_flush_all(cache); |
856 | 864 | ||
865 | /* | ||
866 | * If we've been called with lazy mmu updates enabled, then | ||
867 | * make sure that everything gets flushed out before we | ||
868 | * return. | ||
869 | */ | ||
870 | arch_flush_lazy_mmu_mode(); | ||
871 | |||
857 | out: | 872 | out: |
858 | return ret; | 873 | return ret; |
859 | } | 874 | } |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 7b61036427df..05f9aef6818a 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #ifdef CONFIG_X86_PAT | 30 | #ifdef CONFIG_X86_PAT |
31 | int __read_mostly pat_enabled = 1; | 31 | int __read_mostly pat_enabled = 1; |
32 | 32 | ||
33 | void __cpuinit pat_disable(char *reason) | 33 | void __cpuinit pat_disable(const char *reason) |
34 | { | 34 | { |
35 | pat_enabled = 0; | 35 | pat_enabled = 0; |
36 | printk(KERN_INFO "%s\n", reason); | 36 | printk(KERN_INFO "%s\n", reason); |
@@ -42,6 +42,11 @@ static int __init nopat(char *str) | |||
42 | return 0; | 42 | return 0; |
43 | } | 43 | } |
44 | early_param("nopat", nopat); | 44 | early_param("nopat", nopat); |
45 | #else | ||
46 | static inline void pat_disable(const char *reason) | ||
47 | { | ||
48 | (void)reason; | ||
49 | } | ||
45 | #endif | 50 | #endif |
46 | 51 | ||
47 | 52 | ||
@@ -78,16 +83,20 @@ void pat_init(void) | |||
78 | if (!pat_enabled) | 83 | if (!pat_enabled) |
79 | return; | 84 | return; |
80 | 85 | ||
81 | /* Paranoia check. */ | 86 | if (!cpu_has_pat) { |
82 | if (!cpu_has_pat && boot_pat_state) { | 87 | if (!boot_pat_state) { |
83 | /* | 88 | pat_disable("PAT not supported by CPU."); |
84 | * If this happens we are on a secondary CPU, but | 89 | return; |
85 | * switched to PAT on the boot CPU. We have no way to | 90 | } else { |
86 | * undo PAT. | 91 | /* |
87 | */ | 92 | * If this happens we are on a secondary CPU, but |
88 | printk(KERN_ERR "PAT enabled, " | 93 | * switched to PAT on the boot CPU. We have no way to |
89 | "but not supported by secondary CPU\n"); | 94 | * undo PAT. |
90 | BUG(); | 95 | */ |
96 | printk(KERN_ERR "PAT enabled, " | ||
97 | "but not supported by secondary CPU\n"); | ||
98 | BUG(); | ||
99 | } | ||
91 | } | 100 | } |
92 | 101 | ||
93 | /* Set PWT to Write-Combining. All other bits stay the same */ | 102 | /* Set PWT to Write-Combining. All other bits stay the same */ |
@@ -211,6 +220,33 @@ chk_conflict(struct memtype *new, struct memtype *entry, unsigned long *type) | |||
211 | static struct memtype *cached_entry; | 220 | static struct memtype *cached_entry; |
212 | static u64 cached_start; | 221 | static u64 cached_start; |
213 | 222 | ||
223 | static int pat_pagerange_is_ram(unsigned long start, unsigned long end) | ||
224 | { | ||
225 | int ram_page = 0, not_rampage = 0; | ||
226 | unsigned long page_nr; | ||
227 | |||
228 | for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT); | ||
229 | ++page_nr) { | ||
230 | /* | ||
231 | * For legacy reasons, physical address range in the legacy ISA | ||
232 | * region is tracked as non-RAM. This will allow users of | ||
233 | * /dev/mem to map portions of legacy ISA region, even when | ||
234 | * some of those portions are listed(or not even listed) with | ||
235 | * different e820 types(RAM/reserved/..) | ||
236 | */ | ||
237 | if (page_nr >= (ISA_END_ADDRESS >> PAGE_SHIFT) && | ||
238 | page_is_ram(page_nr)) | ||
239 | ram_page = 1; | ||
240 | else | ||
241 | not_rampage = 1; | ||
242 | |||
243 | if (ram_page == not_rampage) | ||
244 | return -1; | ||
245 | } | ||
246 | |||
247 | return ram_page; | ||
248 | } | ||
249 | |||
214 | /* | 250 | /* |
215 | * For RAM pages, mark the pages as non WB memory type using | 251 | * For RAM pages, mark the pages as non WB memory type using |
216 | * PageNonWB (PG_arch_1). We allow only one set_memory_uc() or | 252 | * PageNonWB (PG_arch_1). We allow only one set_memory_uc() or |
@@ -336,20 +372,12 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type, | |||
336 | if (new_type) | 372 | if (new_type) |
337 | *new_type = actual_type; | 373 | *new_type = actual_type; |
338 | 374 | ||
339 | /* | 375 | is_range_ram = pat_pagerange_is_ram(start, end); |
340 | * For legacy reasons, some parts of the physical address range in the | 376 | if (is_range_ram == 1) |
341 | * legacy 1MB region is treated as non-RAM (even when listed as RAM in | 377 | return reserve_ram_pages_type(start, end, req_type, |
342 | * the e820 tables). So we will track the memory attributes of this | 378 | new_type); |
343 | * legacy 1MB region using the linear memtype_list always. | 379 | else if (is_range_ram < 0) |
344 | */ | 380 | return -EINVAL; |
345 | if (end >= ISA_END_ADDRESS) { | ||
346 | is_range_ram = pagerange_is_ram(start, end); | ||
347 | if (is_range_ram == 1) | ||
348 | return reserve_ram_pages_type(start, end, req_type, | ||
349 | new_type); | ||
350 | else if (is_range_ram < 0) | ||
351 | return -EINVAL; | ||
352 | } | ||
353 | 381 | ||
354 | new = kmalloc(sizeof(struct memtype), GFP_KERNEL); | 382 | new = kmalloc(sizeof(struct memtype), GFP_KERNEL); |
355 | if (!new) | 383 | if (!new) |
@@ -446,19 +474,11 @@ int free_memtype(u64 start, u64 end) | |||
446 | if (is_ISA_range(start, end - 1)) | 474 | if (is_ISA_range(start, end - 1)) |
447 | return 0; | 475 | return 0; |
448 | 476 | ||
449 | /* | 477 | is_range_ram = pat_pagerange_is_ram(start, end); |
450 | * For legacy reasons, some parts of the physical address range in the | 478 | if (is_range_ram == 1) |
451 | * legacy 1MB region is treated as non-RAM (even when listed as RAM in | 479 | return free_ram_pages_type(start, end); |
452 | * the e820 tables). So we will track the memory attributes of this | 480 | else if (is_range_ram < 0) |
453 | * legacy 1MB region using the linear memtype_list always. | 481 | return -EINVAL; |
454 | */ | ||
455 | if (end >= ISA_END_ADDRESS) { | ||
456 | is_range_ram = pagerange_is_ram(start, end); | ||
457 | if (is_range_ram == 1) | ||
458 | return free_ram_pages_type(start, end); | ||
459 | else if (is_range_ram < 0) | ||
460 | return -EINVAL; | ||
461 | } | ||
462 | 482 | ||
463 | spin_lock(&memtype_lock); | 483 | spin_lock(&memtype_lock); |
464 | list_for_each_entry(entry, &memtype_list, nd) { | 484 | list_for_each_entry(entry, &memtype_list, nd) { |
@@ -626,17 +646,13 @@ static int reserve_pfn_range(u64 paddr, unsigned long size, pgprot_t *vma_prot, | |||
626 | unsigned long flags; | 646 | unsigned long flags; |
627 | unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK); | 647 | unsigned long want_flags = (pgprot_val(*vma_prot) & _PAGE_CACHE_MASK); |
628 | 648 | ||
629 | is_ram = pagerange_is_ram(paddr, paddr + size); | 649 | is_ram = pat_pagerange_is_ram(paddr, paddr + size); |
630 | 650 | ||
631 | if (is_ram != 0) { | 651 | /* |
632 | /* | 652 | * reserve_pfn_range() doesn't support RAM pages. |
633 | * For mapping RAM pages, drivers need to call | 653 | */ |
634 | * set_memory_[uc|wc|wb] directly, for reserve and free, before | 654 | if (is_ram != 0) |
635 | * setting up the PTE. | 655 | return -EINVAL; |
636 | */ | ||
637 | WARN_ON_ONCE(1); | ||
638 | return 0; | ||
639 | } | ||
640 | 656 | ||
641 | ret = reserve_memtype(paddr, paddr + size, want_flags, &flags); | 657 | ret = reserve_memtype(paddr, paddr + size, want_flags, &flags); |
642 | if (ret) | 658 | if (ret) |
@@ -693,7 +709,7 @@ static void free_pfn_range(u64 paddr, unsigned long size) | |||
693 | { | 709 | { |
694 | int is_ram; | 710 | int is_ram; |
695 | 711 | ||
696 | is_ram = pagerange_is_ram(paddr, paddr + size); | 712 | is_ram = pat_pagerange_is_ram(paddr, paddr + size); |
697 | if (is_ram == 0) | 713 | if (is_ram == 0) |
698 | free_memtype(paddr, paddr + size); | 714 | free_memtype(paddr, paddr + size); |
699 | } | 715 | } |
diff --git a/arch/x86/mm/srat_64.c b/arch/x86/mm/srat_64.c index 15df1baee100..574c8bc95ef0 100644 --- a/arch/x86/mm/srat_64.c +++ b/arch/x86/mm/srat_64.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <asm/proto.h> | 20 | #include <asm/proto.h> |
21 | #include <asm/numa.h> | 21 | #include <asm/numa.h> |
22 | #include <asm/e820.h> | 22 | #include <asm/e820.h> |
23 | #include <asm/genapic.h> | 23 | #include <asm/apic.h> |
24 | #include <asm/uv/uv.h> | 24 | #include <asm/uv/uv.h> |
25 | 25 | ||
26 | int acpi_numa __initdata; | 26 | int acpi_numa __initdata; |
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c index 72a6d4ebe34d..a654d59e4483 100644 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c | |||
@@ -14,7 +14,6 @@ | |||
14 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) | 14 | DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) |
15 | = { &init_mm, 0, }; | 15 | = { &init_mm, 0, }; |
16 | 16 | ||
17 | #include <mach_ipi.h> | ||
18 | /* | 17 | /* |
19 | * Smarter SMP flushing macros. | 18 | * Smarter SMP flushing macros. |
20 | * c/o Linus Torvalds. | 19 | * c/o Linus Torvalds. |
@@ -196,7 +195,7 @@ static void flush_tlb_others_ipi(const struct cpumask *cpumask, | |||
196 | * We have to send the IPI only to | 195 | * We have to send the IPI only to |
197 | * CPUs affected. | 196 | * CPUs affected. |
198 | */ | 197 | */ |
199 | send_IPI_mask(to_cpumask(f->flush_cpumask), | 198 | apic->send_IPI_mask(to_cpumask(f->flush_cpumask), |
200 | INVALIDATE_TLB_VECTOR_START + sender); | 199 | INVALIDATE_TLB_VECTOR_START + sender); |
201 | 200 | ||
202 | while (!cpumask_empty(to_cpumask(f->flush_cpumask))) | 201 | while (!cpumask_empty(to_cpumask(f->flush_cpumask))) |
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 2089354968a2..8eb295e116f6 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/pci.h> | 5 | #include <linux/pci.h> |
6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
7 | #include <linux/nodemask.h> | 7 | #include <linux/nodemask.h> |
8 | #include <mach_apic.h> | 8 | #include <asm/apic.h> |
9 | #include <asm/mpspec.h> | 9 | #include <asm/mpspec.h> |
10 | #include <asm/pci_x86.h> | 10 | #include <asm/pci_x86.h> |
11 | 11 | ||
@@ -18,10 +18,6 @@ | |||
18 | 18 | ||
19 | #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) | 19 | #define QUADLOCAL2BUS(quad,local) (quad_local_to_mp_bus_id[quad][local]) |
20 | 20 | ||
21 | /* Where the IO area was mapped on multiquad, always 0 otherwise */ | ||
22 | void *xquad_portio; | ||
23 | EXPORT_SYMBOL(xquad_portio); | ||
24 | |||
25 | #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) | 21 | #define XQUAD_PORT_ADDR(port, quad) (xquad_portio + (XQUAD_PORTIO_QUAD*quad) + port) |
26 | 22 | ||
27 | #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ | 23 | #define PCI_CONF1_MQ_ADDRESS(bus, devfn, reg) \ |
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index b82cae970dfd..1c975cc9839e 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/uaccess.h> | 8 | #include <linux/uaccess.h> |
9 | #include <asm/pci_x86.h> | 9 | #include <asm/pci_x86.h> |
10 | #include <asm/mach-default/pci-functions.h> | 10 | #include <asm/pci-functions.h> |
11 | 11 | ||
12 | /* BIOS32 signature: "_32_" */ | 12 | /* BIOS32 signature: "_32_" */ |
13 | #define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24)) | 13 | #define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24)) |
diff --git a/arch/x86/power/hibernate_asm_32.S b/arch/x86/power/hibernate_asm_32.S index d1e9b53f9d33..b641388d8286 100644 --- a/arch/x86/power/hibernate_asm_32.S +++ b/arch/x86/power/hibernate_asm_32.S | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/linkage.h> | 9 | #include <linux/linkage.h> |
10 | #include <asm/segment.h> | 10 | #include <asm/segment.h> |
11 | #include <asm/page.h> | 11 | #include <asm/page_types.h> |
12 | #include <asm/asm-offsets.h> | 12 | #include <asm/asm-offsets.h> |
13 | #include <asm/processor-flags.h> | 13 | #include <asm/processor-flags.h> |
14 | 14 | ||
diff --git a/arch/x86/power/hibernate_asm_64.S b/arch/x86/power/hibernate_asm_64.S index 000415947d93..9356547d8c01 100644 --- a/arch/x86/power/hibernate_asm_64.S +++ b/arch/x86/power/hibernate_asm_64.S | |||
@@ -18,7 +18,7 @@ | |||
18 | .text | 18 | .text |
19 | #include <linux/linkage.h> | 19 | #include <linux/linkage.h> |
20 | #include <asm/segment.h> | 20 | #include <asm/segment.h> |
21 | #include <asm/page.h> | 21 | #include <asm/page_types.h> |
22 | #include <asm/asm-offsets.h> | 22 | #include <asm/asm-offsets.h> |
23 | #include <asm/processor-flags.h> | 23 | #include <asm/processor-flags.h> |
24 | 24 | ||
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c index 9c98cc6ba978..7133cdf9098b 100644 --- a/arch/x86/vdso/vma.c +++ b/arch/x86/vdso/vma.c | |||
@@ -85,8 +85,8 @@ static unsigned long vdso_addr(unsigned long start, unsigned len) | |||
85 | unsigned long addr, end; | 85 | unsigned long addr, end; |
86 | unsigned offset; | 86 | unsigned offset; |
87 | end = (start + PMD_SIZE - 1) & PMD_MASK; | 87 | end = (start + PMD_SIZE - 1) & PMD_MASK; |
88 | if (end >= TASK_SIZE64) | 88 | if (end >= TASK_SIZE_MAX) |
89 | end = TASK_SIZE64; | 89 | end = TASK_SIZE_MAX; |
90 | end -= len; | 90 | end -= len; |
91 | /* This loses some more bits than a modulo, but is cheaper */ | 91 | /* This loses some more bits than a modulo, but is cheaper */ |
92 | offset = get_random_int() & (PTRS_PER_PTE - 1); | 92 | offset = get_random_int() & (PTRS_PER_PTE - 1); |
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 87b9ab166423..b83e119fbeb0 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig | |||
@@ -6,7 +6,7 @@ config XEN | |||
6 | bool "Xen guest support" | 6 | bool "Xen guest support" |
7 | select PARAVIRT | 7 | select PARAVIRT |
8 | select PARAVIRT_CLOCK | 8 | select PARAVIRT_CLOCK |
9 | depends on X86_64 || (X86_32 && X86_PAE && !(X86_VISWS || X86_VOYAGER)) | 9 | depends on X86_64 || (X86_32 && X86_PAE && !X86_VISWS) |
10 | depends on X86_CMPXCHG && X86_TSC | 10 | depends on X86_CMPXCHG && X86_TSC |
11 | help | 11 | help |
12 | This is the Linux Xen port. Enabling this will allow the | 12 | This is the Linux Xen port. Enabling this will allow the |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 95ff6a0e942a..86497d5f44cd 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -554,14 +554,15 @@ static u32 xen_safe_apic_wait_icr_idle(void) | |||
554 | return 0; | 554 | return 0; |
555 | } | 555 | } |
556 | 556 | ||
557 | static struct apic_ops xen_basic_apic_ops = { | 557 | static void set_xen_basic_apic_ops(void) |
558 | .read = xen_apic_read, | 558 | { |
559 | .write = xen_apic_write, | 559 | apic->read = xen_apic_read; |
560 | .icr_read = xen_apic_icr_read, | 560 | apic->write = xen_apic_write; |
561 | .icr_write = xen_apic_icr_write, | 561 | apic->icr_read = xen_apic_icr_read; |
562 | .wait_icr_idle = xen_apic_wait_icr_idle, | 562 | apic->icr_write = xen_apic_icr_write; |
563 | .safe_wait_icr_idle = xen_safe_apic_wait_icr_idle, | 563 | apic->wait_icr_idle = xen_apic_wait_icr_idle; |
564 | }; | 564 | apic->safe_wait_icr_idle = xen_safe_apic_wait_icr_idle; |
565 | } | ||
565 | 566 | ||
566 | #endif | 567 | #endif |
567 | 568 | ||
@@ -898,7 +899,7 @@ asmlinkage void __init xen_start_kernel(void) | |||
898 | /* | 899 | /* |
899 | * set up the basic apic ops. | 900 | * set up the basic apic ops. |
900 | */ | 901 | */ |
901 | apic_ops = &xen_basic_apic_ops; | 902 | set_xen_basic_apic_ops(); |
902 | #endif | 903 | #endif |
903 | 904 | ||
904 | if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { | 905 | if (xen_feature(XENFEAT_mmu_pt_update_preserve_ad)) { |
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c index 5a070900ad35..cfd17799bd6d 100644 --- a/arch/x86/xen/irq.c +++ b/arch/x86/xen/irq.c | |||
@@ -19,21 +19,6 @@ void xen_force_evtchn_callback(void) | |||
19 | (void)HYPERVISOR_xen_version(0, NULL); | 19 | (void)HYPERVISOR_xen_version(0, NULL); |
20 | } | 20 | } |
21 | 21 | ||
22 | static void __init __xen_init_IRQ(void) | ||
23 | { | ||
24 | int i; | ||
25 | |||
26 | /* Create identity vector->irq map */ | ||
27 | for(i = 0; i < NR_VECTORS; i++) { | ||
28 | int cpu; | ||
29 | |||
30 | for_each_possible_cpu(cpu) | ||
31 | per_cpu(vector_irq, cpu)[i] = i; | ||
32 | } | ||
33 | |||
34 | xen_init_IRQ(); | ||
35 | } | ||
36 | |||
37 | static unsigned long xen_save_fl(void) | 22 | static unsigned long xen_save_fl(void) |
38 | { | 23 | { |
39 | struct vcpu_info *vcpu; | 24 | struct vcpu_info *vcpu; |
@@ -127,7 +112,7 @@ static void xen_halt(void) | |||
127 | } | 112 | } |
128 | 113 | ||
129 | static const struct pv_irq_ops xen_irq_ops __initdata = { | 114 | static const struct pv_irq_ops xen_irq_ops __initdata = { |
130 | .init_IRQ = __xen_init_IRQ, | 115 | .init_IRQ = xen_init_IRQ, |
131 | 116 | ||
132 | .save_fl = PV_CALLEE_SAVE(xen_save_fl), | 117 | .save_fl = PV_CALLEE_SAVE(xen_save_fl), |
133 | .restore_fl = PV_CALLEE_SAVE(xen_restore_fl), | 118 | .restore_fl = PV_CALLEE_SAVE(xen_restore_fl), |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index d2e8ed1aff3d..319bd40a57c2 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -1273,8 +1273,6 @@ static void xen_flush_tlb_others(const struct cpumask *cpus, | |||
1273 | /* Remove us, and any offline CPUS. */ | 1273 | /* Remove us, and any offline CPUS. */ |
1274 | cpumask_and(to_cpumask(args->mask), cpus, cpu_online_mask); | 1274 | cpumask_and(to_cpumask(args->mask), cpus, cpu_online_mask); |
1275 | cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask)); | 1275 | cpumask_clear_cpu(smp_processor_id(), to_cpumask(args->mask)); |
1276 | if (unlikely(cpumask_empty(to_cpumask(args->mask)))) | ||
1277 | goto issue; | ||
1278 | 1276 | ||
1279 | if (va == TLB_FLUSH_ALL) { | 1277 | if (va == TLB_FLUSH_ALL) { |
1280 | args->op.cmd = MMUEXT_TLB_FLUSH_MULTI; | 1278 | args->op.cmd = MMUEXT_TLB_FLUSH_MULTI; |
@@ -1285,7 +1283,6 @@ static void xen_flush_tlb_others(const struct cpumask *cpus, | |||
1285 | 1283 | ||
1286 | MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF); | 1284 | MULTI_mmuext_op(mcs.mc, &args->op, 1, NULL, DOMID_SELF); |
1287 | 1285 | ||
1288 | issue: | ||
1289 | xen_mc_issue(PARAVIRT_LAZY_MMU); | 1286 | xen_mc_issue(PARAVIRT_LAZY_MMU); |
1290 | } | 1287 | } |
1291 | 1288 | ||
diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index c738644b5435..8bff7e7c290b 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c | |||
@@ -39,6 +39,7 @@ struct mc_buffer { | |||
39 | struct multicall_entry entries[MC_BATCH]; | 39 | struct multicall_entry entries[MC_BATCH]; |
40 | #if MC_DEBUG | 40 | #if MC_DEBUG |
41 | struct multicall_entry debug[MC_BATCH]; | 41 | struct multicall_entry debug[MC_BATCH]; |
42 | void *caller[MC_BATCH]; | ||
42 | #endif | 43 | #endif |
43 | unsigned char args[MC_ARGS]; | 44 | unsigned char args[MC_ARGS]; |
44 | struct callback { | 45 | struct callback { |
@@ -154,11 +155,12 @@ void xen_mc_flush(void) | |||
154 | ret, smp_processor_id()); | 155 | ret, smp_processor_id()); |
155 | dump_stack(); | 156 | dump_stack(); |
156 | for (i = 0; i < b->mcidx; i++) { | 157 | for (i = 0; i < b->mcidx; i++) { |
157 | printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\n", | 158 | printk(KERN_DEBUG " call %2d/%d: op=%lu arg=[%lx] result=%ld\t%pF\n", |
158 | i+1, b->mcidx, | 159 | i+1, b->mcidx, |
159 | b->debug[i].op, | 160 | b->debug[i].op, |
160 | b->debug[i].args[0], | 161 | b->debug[i].args[0], |
161 | b->entries[i].result); | 162 | b->entries[i].result, |
163 | b->caller[i]); | ||
162 | } | 164 | } |
163 | } | 165 | } |
164 | #endif | 166 | #endif |
@@ -168,8 +170,6 @@ void xen_mc_flush(void) | |||
168 | } else | 170 | } else |
169 | BUG_ON(b->argidx != 0); | 171 | BUG_ON(b->argidx != 0); |
170 | 172 | ||
171 | local_irq_restore(flags); | ||
172 | |||
173 | for (i = 0; i < b->cbidx; i++) { | 173 | for (i = 0; i < b->cbidx; i++) { |
174 | struct callback *cb = &b->callbacks[i]; | 174 | struct callback *cb = &b->callbacks[i]; |
175 | 175 | ||
@@ -177,7 +177,9 @@ void xen_mc_flush(void) | |||
177 | } | 177 | } |
178 | b->cbidx = 0; | 178 | b->cbidx = 0; |
179 | 179 | ||
180 | BUG_ON(ret); | 180 | local_irq_restore(flags); |
181 | |||
182 | WARN_ON(ret); | ||
181 | } | 183 | } |
182 | 184 | ||
183 | struct multicall_space __xen_mc_entry(size_t args) | 185 | struct multicall_space __xen_mc_entry(size_t args) |
@@ -197,6 +199,9 @@ struct multicall_space __xen_mc_entry(size_t args) | |||
197 | } | 199 | } |
198 | 200 | ||
199 | ret.mc = &b->entries[b->mcidx]; | 201 | ret.mc = &b->entries[b->mcidx]; |
202 | #ifdef MC_DEBUG | ||
203 | b->caller[b->mcidx] = __builtin_return_address(0); | ||
204 | #endif | ||
200 | b->mcidx++; | 205 | b->mcidx++; |
201 | ret.args = &b->args[argidx]; | 206 | ret.args = &b->args[argidx]; |
202 | b->argidx = argidx + args; | 207 | b->argidx = argidx + args; |
diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S index 63d49a523ed3..1a5ff24e29c0 100644 --- a/arch/x86/xen/xen-head.S +++ b/arch/x86/xen/xen-head.S | |||
@@ -8,7 +8,7 @@ | |||
8 | 8 | ||
9 | #include <asm/boot.h> | 9 | #include <asm/boot.h> |
10 | #include <asm/asm.h> | 10 | #include <asm/asm.h> |
11 | #include <asm/page.h> | 11 | #include <asm/page_types.h> |
12 | 12 | ||
13 | #include <xen/interface/elfnote.h> | 13 | #include <xen/interface/elfnote.h> |
14 | #include <asm/xen/interface.h> | 14 | #include <asm/xen/interface.h> |
diff --git a/arch/xtensa/include/asm/swab.h b/arch/xtensa/include/asm/swab.h index f50b697eb601..226a39162310 100644 --- a/arch/xtensa/include/asm/swab.h +++ b/arch/xtensa/include/asm/swab.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef _XTENSA_SWAB_H | 11 | #ifndef _XTENSA_SWAB_H |
12 | #define _XTENSA_SWAB_H | 12 | #define _XTENSA_SWAB_H |
13 | 13 | ||
14 | #include <asm/types.h> | 14 | #include <linux/types.h> |
15 | #include <linux/compiler.h> | 15 | #include <linux/compiler.h> |
16 | 16 | ||
17 | #define __SWAB_64_THRU_32__ | 17 | #define __SWAB_64_THRU_32__ |