diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/defconfig | 66 | ||||
-rw-r--r-- | arch/x86_64/ia32/ia32_binfmt.c | 57 | ||||
-rw-r--r-- | arch/x86_64/kernel/e820.c | 35 | ||||
-rw-r--r-- | arch/x86_64/kernel/entry.S | 3 | ||||
-rw-r--r-- | arch/x86_64/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/x86_64/kernel/init_task.c | 5 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup64.c | 3 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 32 | ||||
-rw-r--r-- | arch/x86_64/pci/mmconfig.c | 34 |
10 files changed, 108 insertions, 134 deletions
diff --git a/arch/x86_64/defconfig b/arch/x86_64/defconfig index 840d5d93d5cc..5fb970715941 100644 --- a/arch/x86_64/defconfig +++ b/arch/x86_64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.18-rc2 | 3 | # Linux kernel version: 2.6.18-rc4 |
4 | # Tue Jul 18 17:13:20 2006 | 4 | # Thu Aug 24 21:05:55 2006 |
5 | # | 5 | # |
6 | CONFIG_X86_64=y | 6 | CONFIG_X86_64=y |
7 | CONFIG_64BIT=y | 7 | CONFIG_64BIT=y |
@@ -201,7 +201,7 @@ CONFIG_ACPI_THERMAL=y | |||
201 | CONFIG_ACPI_NUMA=y | 201 | CONFIG_ACPI_NUMA=y |
202 | # CONFIG_ACPI_ASUS is not set | 202 | # CONFIG_ACPI_ASUS is not set |
203 | # CONFIG_ACPI_IBM is not set | 203 | # CONFIG_ACPI_IBM is not set |
204 | CONFIG_ACPI_TOSHIBA=y | 204 | # CONFIG_ACPI_TOSHIBA is not set |
205 | CONFIG_ACPI_BLACKLIST_YEAR=0 | 205 | CONFIG_ACPI_BLACKLIST_YEAR=0 |
206 | # CONFIG_ACPI_DEBUG is not set | 206 | # CONFIG_ACPI_DEBUG is not set |
207 | CONFIG_ACPI_EC=y | 207 | CONFIG_ACPI_EC=y |
@@ -216,7 +216,7 @@ CONFIG_ACPI_CONTAINER=y | |||
216 | # | 216 | # |
217 | CONFIG_CPU_FREQ=y | 217 | CONFIG_CPU_FREQ=y |
218 | CONFIG_CPU_FREQ_TABLE=y | 218 | CONFIG_CPU_FREQ_TABLE=y |
219 | # CONFIG_CPU_FREQ_DEBUG is not set | 219 | CONFIG_CPU_FREQ_DEBUG=y |
220 | CONFIG_CPU_FREQ_STAT=y | 220 | CONFIG_CPU_FREQ_STAT=y |
221 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 221 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
222 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 222 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y |
@@ -495,8 +495,9 @@ CONFIG_SCSI=y | |||
495 | CONFIG_BLK_DEV_SD=y | 495 | CONFIG_BLK_DEV_SD=y |
496 | # CONFIG_CHR_DEV_ST is not set | 496 | # CONFIG_CHR_DEV_ST is not set |
497 | # CONFIG_CHR_DEV_OSST is not set | 497 | # CONFIG_CHR_DEV_OSST is not set |
498 | # CONFIG_BLK_DEV_SR is not set | 498 | CONFIG_BLK_DEV_SR=y |
499 | # CONFIG_CHR_DEV_SG is not set | 499 | # CONFIG_BLK_DEV_SR_VENDOR is not set |
500 | CONFIG_CHR_DEV_SG=y | ||
500 | # CONFIG_CHR_DEV_SCH is not set | 501 | # CONFIG_CHR_DEV_SCH is not set |
501 | 502 | ||
502 | # | 503 | # |
@@ -512,7 +513,7 @@ CONFIG_SCSI_CONSTANTS=y | |||
512 | CONFIG_SCSI_SPI_ATTRS=y | 513 | CONFIG_SCSI_SPI_ATTRS=y |
513 | CONFIG_SCSI_FC_ATTRS=y | 514 | CONFIG_SCSI_FC_ATTRS=y |
514 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 515 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
515 | # CONFIG_SCSI_SAS_ATTRS is not set | 516 | CONFIG_SCSI_SAS_ATTRS=y |
516 | 517 | ||
517 | # | 518 | # |
518 | # SCSI low-level drivers | 519 | # SCSI low-level drivers |
@@ -538,7 +539,7 @@ CONFIG_MEGARAID_MAILBOX=y | |||
538 | CONFIG_MEGARAID_SAS=y | 539 | CONFIG_MEGARAID_SAS=y |
539 | CONFIG_SCSI_SATA=y | 540 | CONFIG_SCSI_SATA=y |
540 | CONFIG_SCSI_SATA_AHCI=y | 541 | CONFIG_SCSI_SATA_AHCI=y |
541 | # CONFIG_SCSI_SATA_SVW is not set | 542 | CONFIG_SCSI_SATA_SVW=y |
542 | CONFIG_SCSI_ATA_PIIX=y | 543 | CONFIG_SCSI_ATA_PIIX=y |
543 | # CONFIG_SCSI_SATA_MV is not set | 544 | # CONFIG_SCSI_SATA_MV is not set |
544 | CONFIG_SCSI_SATA_NV=y | 545 | CONFIG_SCSI_SATA_NV=y |
@@ -589,7 +590,7 @@ CONFIG_BLK_DEV_DM=y | |||
589 | CONFIG_FUSION=y | 590 | CONFIG_FUSION=y |
590 | CONFIG_FUSION_SPI=y | 591 | CONFIG_FUSION_SPI=y |
591 | # CONFIG_FUSION_FC is not set | 592 | # CONFIG_FUSION_FC is not set |
592 | # CONFIG_FUSION_SAS is not set | 593 | CONFIG_FUSION_SAS=y |
593 | CONFIG_FUSION_MAX_SGE=128 | 594 | CONFIG_FUSION_MAX_SGE=128 |
594 | # CONFIG_FUSION_CTL is not set | 595 | # CONFIG_FUSION_CTL is not set |
595 | 596 | ||
@@ -675,7 +676,7 @@ CONFIG_NET_PCI=y | |||
675 | # CONFIG_PCNET32 is not set | 676 | # CONFIG_PCNET32 is not set |
676 | # CONFIG_AMD8111_ETH is not set | 677 | # CONFIG_AMD8111_ETH is not set |
677 | # CONFIG_ADAPTEC_STARFIRE is not set | 678 | # CONFIG_ADAPTEC_STARFIRE is not set |
678 | # CONFIG_B44 is not set | 679 | CONFIG_B44=y |
679 | CONFIG_FORCEDETH=y | 680 | CONFIG_FORCEDETH=y |
680 | # CONFIG_DGRS is not set | 681 | # CONFIG_DGRS is not set |
681 | # CONFIG_EEPRO100 is not set | 682 | # CONFIG_EEPRO100 is not set |
@@ -712,7 +713,7 @@ CONFIG_E1000=y | |||
712 | # CONFIG_SK98LIN is not set | 713 | # CONFIG_SK98LIN is not set |
713 | # CONFIG_VIA_VELOCITY is not set | 714 | # CONFIG_VIA_VELOCITY is not set |
714 | CONFIG_TIGON3=y | 715 | CONFIG_TIGON3=y |
715 | # CONFIG_BNX2 is not set | 716 | CONFIG_BNX2=y |
716 | 717 | ||
717 | # | 718 | # |
718 | # Ethernet (10000 Mbit) | 719 | # Ethernet (10000 Mbit) |
@@ -842,44 +843,7 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
842 | # | 843 | # |
843 | # Watchdog Cards | 844 | # Watchdog Cards |
844 | # | 845 | # |
845 | CONFIG_WATCHDOG=y | 846 | # CONFIG_WATCHDOG is not set |
846 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
847 | |||
848 | # | ||
849 | # Watchdog Device Drivers | ||
850 | # | ||
851 | CONFIG_SOFT_WATCHDOG=y | ||
852 | # CONFIG_ACQUIRE_WDT is not set | ||
853 | # CONFIG_ADVANTECH_WDT is not set | ||
854 | # CONFIG_ALIM1535_WDT is not set | ||
855 | # CONFIG_ALIM7101_WDT is not set | ||
856 | # CONFIG_SC520_WDT is not set | ||
857 | # CONFIG_EUROTECH_WDT is not set | ||
858 | # CONFIG_IB700_WDT is not set | ||
859 | # CONFIG_IBMASR is not set | ||
860 | # CONFIG_WAFER_WDT is not set | ||
861 | # CONFIG_I6300ESB_WDT is not set | ||
862 | # CONFIG_I8XX_TCO is not set | ||
863 | # CONFIG_SC1200_WDT is not set | ||
864 | # CONFIG_60XX_WDT is not set | ||
865 | # CONFIG_SBC8360_WDT is not set | ||
866 | # CONFIG_CPU5_WDT is not set | ||
867 | # CONFIG_W83627HF_WDT is not set | ||
868 | # CONFIG_W83877F_WDT is not set | ||
869 | # CONFIG_W83977F_WDT is not set | ||
870 | # CONFIG_MACHZ_WDT is not set | ||
871 | # CONFIG_SBC_EPX_C3_WATCHDOG is not set | ||
872 | |||
873 | # | ||
874 | # PCI-based Watchdog Cards | ||
875 | # | ||
876 | # CONFIG_PCIPCWATCHDOG is not set | ||
877 | # CONFIG_WDTPCI is not set | ||
878 | |||
879 | # | ||
880 | # USB-based Watchdog Cards | ||
881 | # | ||
882 | # CONFIG_USBPCWATCHDOG is not set | ||
883 | CONFIG_HW_RANDOM=y | 847 | CONFIG_HW_RANDOM=y |
884 | CONFIG_HW_RANDOM_INTEL=y | 848 | CONFIG_HW_RANDOM_INTEL=y |
885 | CONFIG_HW_RANDOM_AMD=y | 849 | CONFIG_HW_RANDOM_AMD=y |
@@ -1056,6 +1020,7 @@ CONFIG_VGACON_SOFT_SCROLLBACK=y | |||
1056 | CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 | 1020 | CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256 |
1057 | CONFIG_VIDEO_SELECT=y | 1021 | CONFIG_VIDEO_SELECT=y |
1058 | CONFIG_DUMMY_CONSOLE=y | 1022 | CONFIG_DUMMY_CONSOLE=y |
1023 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
1059 | 1024 | ||
1060 | # | 1025 | # |
1061 | # Sound | 1026 | # Sound |
@@ -1301,7 +1266,7 @@ CONFIG_INOTIFY=y | |||
1301 | CONFIG_INOTIFY_USER=y | 1266 | CONFIG_INOTIFY_USER=y |
1302 | # CONFIG_QUOTA is not set | 1267 | # CONFIG_QUOTA is not set |
1303 | CONFIG_DNOTIFY=y | 1268 | CONFIG_DNOTIFY=y |
1304 | CONFIG_AUTOFS_FS=y | 1269 | # CONFIG_AUTOFS_FS is not set |
1305 | CONFIG_AUTOFS4_FS=y | 1270 | CONFIG_AUTOFS4_FS=y |
1306 | # CONFIG_FUSE_FS is not set | 1271 | # CONFIG_FUSE_FS is not set |
1307 | 1272 | ||
@@ -1494,4 +1459,5 @@ CONFIG_DEBUG_STACKOVERFLOW=y | |||
1494 | # CONFIG_CRC16 is not set | 1459 | # CONFIG_CRC16 is not set |
1495 | CONFIG_CRC32=y | 1460 | CONFIG_CRC32=y |
1496 | # CONFIG_LIBCRC32C is not set | 1461 | # CONFIG_LIBCRC32C is not set |
1462 | CONFIG_ZLIB_INFLATE=y | ||
1497 | CONFIG_PLIST=y | 1463 | CONFIG_PLIST=y |
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index a9dc0f3b5b51..2fd5a67fd435 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -73,39 +73,44 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | |||
73 | * Dumping its extra ELF program headers includes all the other information | 73 | * Dumping its extra ELF program headers includes all the other information |
74 | * a debugger needs to easily find how the vsyscall DSO was being used. | 74 | * a debugger needs to easily find how the vsyscall DSO was being used. |
75 | */ | 75 | */ |
76 | #define ELF_CORE_EXTRA_PHDRS (VSYSCALL32_EHDR->e_phnum) | 76 | #define ELF_CORE_EXTRA_PHDRS (find_vma(current->mm, VSYSCALL32_BASE) ? \ |
77 | (VSYSCALL32_EHDR->e_phnum) : 0) | ||
77 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | 78 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ |
78 | do { \ | 79 | do { \ |
79 | const struct elf32_phdr *const vsyscall_phdrs = \ | 80 | if (find_vma(current->mm, VSYSCALL32_BASE)) { \ |
80 | (const struct elf32_phdr *) (VSYSCALL32_BASE \ | 81 | const struct elf32_phdr *const vsyscall_phdrs = \ |
81 | + VSYSCALL32_EHDR->e_phoff); \ | 82 | (const struct elf32_phdr *) (VSYSCALL32_BASE \ |
82 | int i; \ | 83 | + VSYSCALL32_EHDR->e_phoff);\ |
83 | Elf32_Off ofs = 0; \ | 84 | int i; \ |
84 | for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ | 85 | Elf32_Off ofs = 0; \ |
85 | struct elf32_phdr phdr = vsyscall_phdrs[i]; \ | 86 | for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ |
86 | if (phdr.p_type == PT_LOAD) { \ | 87 | struct elf32_phdr phdr = vsyscall_phdrs[i]; \ |
87 | BUG_ON(ofs != 0); \ | 88 | if (phdr.p_type == PT_LOAD) { \ |
88 | ofs = phdr.p_offset = offset; \ | 89 | BUG_ON(ofs != 0); \ |
89 | phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \ | 90 | ofs = phdr.p_offset = offset; \ |
90 | phdr.p_filesz = phdr.p_memsz; \ | 91 | phdr.p_memsz = PAGE_ALIGN(phdr.p_memsz); \ |
91 | offset += phdr.p_filesz; \ | 92 | phdr.p_filesz = phdr.p_memsz; \ |
93 | offset += phdr.p_filesz; \ | ||
94 | } \ | ||
95 | else \ | ||
96 | phdr.p_offset += ofs; \ | ||
97 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
98 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
92 | } \ | 99 | } \ |
93 | else \ | ||
94 | phdr.p_offset += ofs; \ | ||
95 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
96 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
97 | } \ | 100 | } \ |
98 | } while (0) | 101 | } while (0) |
99 | #define ELF_CORE_WRITE_EXTRA_DATA \ | 102 | #define ELF_CORE_WRITE_EXTRA_DATA \ |
100 | do { \ | 103 | do { \ |
101 | const struct elf32_phdr *const vsyscall_phdrs = \ | 104 | if (find_vma(current->mm, VSYSCALL32_BASE)) { \ |
102 | (const struct elf32_phdr *) (VSYSCALL32_BASE \ | 105 | const struct elf32_phdr *const vsyscall_phdrs = \ |
103 | + VSYSCALL32_EHDR->e_phoff); \ | 106 | (const struct elf32_phdr *) (VSYSCALL32_BASE \ |
104 | int i; \ | 107 | + VSYSCALL32_EHDR->e_phoff); \ |
105 | for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ | 108 | int i; \ |
106 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ | 109 | for (i = 0; i < VSYSCALL32_EHDR->e_phnum; ++i) { \ |
107 | DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr, \ | 110 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ |
108 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ | 111 | DUMP_WRITE((void *) (u64) vsyscall_phdrs[i].p_vaddr,\ |
112 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ | ||
113 | } \ | ||
109 | } \ | 114 | } \ |
110 | } while (0) | 115 | } while (0) |
111 | 116 | ||
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index e56c2adf57a4..764bf23c7103 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -71,7 +71,11 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) | |||
71 | #endif | 71 | #endif |
72 | /* kernel code + 640k memory hole (later should not be needed, but | 72 | /* kernel code + 640k memory hole (later should not be needed, but |
73 | be paranoid for now) */ | 73 | be paranoid for now) */ |
74 | if (last >= 640*1024 && addr < __pa_symbol(&_end)) { | 74 | if (last >= 640*1024 && addr < 1024*1024) { |
75 | *addrp = 1024*1024; | ||
76 | return 1; | ||
77 | } | ||
78 | if (last >= __pa_symbol(&_text) && last < __pa_symbol(&_end)) { | ||
75 | *addrp = __pa_symbol(&_end); | 79 | *addrp = __pa_symbol(&_end); |
76 | return 1; | 80 | return 1; |
77 | } | 81 | } |
@@ -104,35 +108,6 @@ e820_any_mapped(unsigned long start, unsigned long end, unsigned type) | |||
104 | return 0; | 108 | return 0; |
105 | } | 109 | } |
106 | 110 | ||
107 | /* | ||
108 | * This function checks if the entire range <start,end> is mapped with type. | ||
109 | * | ||
110 | * Note: this function only works correct if the e820 table is sorted and | ||
111 | * not-overlapping, which is the case | ||
112 | */ | ||
113 | int __init e820_all_mapped(unsigned long start, unsigned long end, unsigned type) | ||
114 | { | ||
115 | int i; | ||
116 | for (i = 0; i < e820.nr_map; i++) { | ||
117 | struct e820entry *ei = &e820.map[i]; | ||
118 | if (type && ei->type != type) | ||
119 | continue; | ||
120 | /* is the region (part) in overlap with the current region ?*/ | ||
121 | if (ei->addr >= end || ei->addr + ei->size <= start) | ||
122 | continue; | ||
123 | |||
124 | /* if the region is at the beginning of <start,end> we move | ||
125 | * start to the end of the region since it's ok until there | ||
126 | */ | ||
127 | if (ei->addr <= start) | ||
128 | start = ei->addr + ei->size; | ||
129 | /* if start is now at or beyond end, we're done, full coverage */ | ||
130 | if (start >= end) | ||
131 | return 1; /* we're done */ | ||
132 | } | ||
133 | return 0; | ||
134 | } | ||
135 | |||
136 | /* | 111 | /* |
137 | * Find a free area in a specific range. | 112 | * Find a free area in a specific range. |
138 | */ | 113 | */ |
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S index 6f810424df44..aa8d8939abc1 100644 --- a/arch/x86_64/kernel/entry.S +++ b/arch/x86_64/kernel/entry.S | |||
@@ -973,6 +973,8 @@ ENTRY(kernel_thread) | |||
973 | ENDPROC(kernel_thread) | 973 | ENDPROC(kernel_thread) |
974 | 974 | ||
975 | child_rip: | 975 | child_rip: |
976 | pushq $0 # fake return address | ||
977 | CFI_STARTPROC | ||
976 | /* | 978 | /* |
977 | * Here we are in the child and the registers are set as they were | 979 | * Here we are in the child and the registers are set as they were |
978 | * at kernel_thread() invocation in the parent. | 980 | * at kernel_thread() invocation in the parent. |
@@ -983,6 +985,7 @@ child_rip: | |||
983 | # exit | 985 | # exit |
984 | xorl %edi, %edi | 986 | xorl %edi, %edi |
985 | call do_exit | 987 | call do_exit |
988 | CFI_ENDPROC | ||
986 | ENDPROC(child_rip) | 989 | ENDPROC(child_rip) |
987 | 990 | ||
988 | /* | 991 | /* |
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S index 6df05e6034fa..c9739ca81d06 100644 --- a/arch/x86_64/kernel/head.S +++ b/arch/x86_64/kernel/head.S | |||
@@ -191,6 +191,7 @@ startup_64: | |||
191 | * jump | 191 | * jump |
192 | */ | 192 | */ |
193 | movq initial_code(%rip),%rax | 193 | movq initial_code(%rip),%rax |
194 | pushq $0 # fake return address | ||
194 | jmp *%rax | 195 | jmp *%rax |
195 | 196 | ||
196 | /* SMP bootup changes these two */ | 197 | /* SMP bootup changes these two */ |
diff --git a/arch/x86_64/kernel/init_task.c b/arch/x86_64/kernel/init_task.c index ce31d904d601..3dc5854ba21e 100644 --- a/arch/x86_64/kernel/init_task.c +++ b/arch/x86_64/kernel/init_task.c | |||
@@ -46,4 +46,9 @@ EXPORT_SYMBOL(init_task); | |||
46 | */ | 46 | */ |
47 | DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; | 47 | DEFINE_PER_CPU(struct tss_struct, init_tss) ____cacheline_internodealigned_in_smp = INIT_TSS; |
48 | 48 | ||
49 | /* Copies of the original ist values from the tss are only accessed during | ||
50 | * debugging, no special alignment required. | ||
51 | */ | ||
52 | DEFINE_PER_CPU(struct orig_ist, orig_ist); | ||
53 | |||
49 | #define ALIGN_TO_4K __attribute__((section(".data.init_task"))) | 54 | #define ALIGN_TO_4K __attribute__((section(".data.init_task"))) |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 8a099ff1f8bc..34afad704824 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -521,8 +521,6 @@ static void discover_ebda(void) | |||
521 | 521 | ||
522 | void __init setup_arch(char **cmdline_p) | 522 | void __init setup_arch(char **cmdline_p) |
523 | { | 523 | { |
524 | unsigned long kernel_end; | ||
525 | |||
526 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); | 524 | ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV); |
527 | screen_info = SCREEN_INFO; | 525 | screen_info = SCREEN_INFO; |
528 | edid_info = EDID_INFO; | 526 | edid_info = EDID_INFO; |
@@ -596,8 +594,8 @@ void __init setup_arch(char **cmdline_p) | |||
596 | (table_end - table_start) << PAGE_SHIFT); | 594 | (table_end - table_start) << PAGE_SHIFT); |
597 | 595 | ||
598 | /* reserve kernel */ | 596 | /* reserve kernel */ |
599 | kernel_end = round_up(__pa_symbol(&_end),PAGE_SIZE); | 597 | reserve_bootmem_generic(__pa_symbol(&_text), |
600 | reserve_bootmem_generic(HIGH_MEMORY, kernel_end - HIGH_MEMORY); | 598 | __pa_symbol(&_end) - __pa_symbol(&_text)); |
601 | 599 | ||
602 | /* | 600 | /* |
603 | * reserve physical page 0 - it's a special BIOS page on many boxes, | 601 | * reserve physical page 0 - it's a special BIOS page on many boxes, |
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index 6fe58a634b5f..417de564456e 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -189,6 +189,7 @@ void __cpuinit cpu_init (void) | |||
189 | { | 189 | { |
190 | int cpu = stack_smp_processor_id(); | 190 | int cpu = stack_smp_processor_id(); |
191 | struct tss_struct *t = &per_cpu(init_tss, cpu); | 191 | struct tss_struct *t = &per_cpu(init_tss, cpu); |
192 | struct orig_ist *orig_ist = &per_cpu(orig_ist, cpu); | ||
192 | unsigned long v; | 193 | unsigned long v; |
193 | char *estacks = NULL; | 194 | char *estacks = NULL; |
194 | struct task_struct *me; | 195 | struct task_struct *me; |
@@ -256,7 +257,7 @@ void __cpuinit cpu_init (void) | |||
256 | estacks += EXCEPTION_STKSZ; | 257 | estacks += EXCEPTION_STKSZ; |
257 | break; | 258 | break; |
258 | } | 259 | } |
259 | t->ist[v] = (unsigned long)estacks; | 260 | orig_ist->ist[v] = t->ist[v] = (unsigned long)estacks; |
260 | } | 261 | } |
261 | 262 | ||
262 | t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap); | 263 | t->io_bitmap_base = offsetof(struct tss_struct, io_bitmap); |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 4e9938dee060..b1249774d1e8 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -107,7 +107,11 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) | |||
107 | } | 107 | } |
108 | 108 | ||
109 | static int kstack_depth_to_print = 12; | 109 | static int kstack_depth_to_print = 12; |
110 | #ifdef CONFIG_STACK_UNWIND | ||
110 | static int call_trace = 1; | 111 | static int call_trace = 1; |
112 | #else | ||
113 | #define call_trace (-1) | ||
114 | #endif | ||
111 | 115 | ||
112 | #ifdef CONFIG_KALLSYMS | 116 | #ifdef CONFIG_KALLSYMS |
113 | # include <linux/kallsyms.h> | 117 | # include <linux/kallsyms.h> |
@@ -174,7 +178,7 @@ static unsigned long *in_exception_stack(unsigned cpu, unsigned long stack, | |||
174 | break; | 178 | break; |
175 | #endif | 179 | #endif |
176 | default: | 180 | default: |
177 | end = per_cpu(init_tss, cpu).ist[k]; | 181 | end = per_cpu(orig_ist, cpu).ist[k]; |
178 | break; | 182 | break; |
179 | } | 183 | } |
180 | /* | 184 | /* |
@@ -274,21 +278,21 @@ void show_trace(struct task_struct *tsk, struct pt_regs *regs, unsigned long * s | |||
274 | if (unwind_init_blocked(&info, tsk) == 0) | 278 | if (unwind_init_blocked(&info, tsk) == 0) |
275 | unw_ret = show_trace_unwind(&info, NULL); | 279 | unw_ret = show_trace_unwind(&info, NULL); |
276 | } | 280 | } |
277 | if (unw_ret > 0 && !arch_unw_user_mode(&info)) { | 281 | if (unw_ret > 0) { |
278 | #ifdef CONFIG_STACK_UNWIND | 282 | if (call_trace == 1 && !arch_unw_user_mode(&info)) { |
279 | unsigned long rip = info.regs.rip; | 283 | print_symbol("DWARF2 unwinder stuck at %s\n", |
280 | print_symbol("DWARF2 unwinder stuck at %s\n", rip); | 284 | UNW_PC(&info)); |
281 | if (call_trace == 1) { | 285 | if ((long)UNW_SP(&info) < 0) { |
282 | printk("Leftover inexact backtrace:\n"); | 286 | printk("Leftover inexact backtrace:\n"); |
283 | stack = (unsigned long *)info.regs.rsp; | 287 | stack = (unsigned long *)UNW_SP(&info); |
284 | } else if (call_trace > 1) | 288 | } else |
289 | printk("Full inexact backtrace again:\n"); | ||
290 | } else if (call_trace >= 1) | ||
285 | return; | 291 | return; |
286 | else | 292 | else |
287 | printk("Full inexact backtrace again:\n"); | 293 | printk("Full inexact backtrace again:\n"); |
288 | #else | 294 | } else |
289 | printk("Inexact backtrace:\n"); | 295 | printk("Inexact backtrace:\n"); |
290 | #endif | ||
291 | } | ||
292 | } | 296 | } |
293 | 297 | ||
294 | /* | 298 | /* |
@@ -529,7 +533,7 @@ void __kprobes oops_end(unsigned long flags) | |||
529 | /* Nest count reaches zero, release the lock. */ | 533 | /* Nest count reaches zero, release the lock. */ |
530 | spin_unlock_irqrestore(&die_lock, flags); | 534 | spin_unlock_irqrestore(&die_lock, flags); |
531 | if (panic_on_oops) | 535 | if (panic_on_oops) |
532 | panic("Fatal exception: panic_on_oops"); | 536 | panic("Fatal exception"); |
533 | } | 537 | } |
534 | 538 | ||
535 | void __kprobes __die(const char * str, struct pt_regs * regs, long err) | 539 | void __kprobes __die(const char * str, struct pt_regs * regs, long err) |
@@ -1120,6 +1124,7 @@ static int __init kstack_setup(char *s) | |||
1120 | } | 1124 | } |
1121 | __setup("kstack=", kstack_setup); | 1125 | __setup("kstack=", kstack_setup); |
1122 | 1126 | ||
1127 | #ifdef CONFIG_STACK_UNWIND | ||
1123 | static int __init call_trace_setup(char *s) | 1128 | static int __init call_trace_setup(char *s) |
1124 | { | 1129 | { |
1125 | if (strcmp(s, "old") == 0) | 1130 | if (strcmp(s, "old") == 0) |
@@ -1133,3 +1138,4 @@ static int __init call_trace_setup(char *s) | |||
1133 | return 1; | 1138 | return 1; |
1134 | } | 1139 | } |
1135 | __setup("call_trace=", call_trace_setup); | 1140 | __setup("call_trace=", call_trace_setup); |
1141 | #endif | ||
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index 3c55c76c6fd5..2d48a7941d48 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
10 | #include <linux/acpi.h> | 10 | #include <linux/acpi.h> |
11 | #include <linux/bitmap.h> | 11 | #include <linux/bitmap.h> |
12 | #include <linux/dmi.h> | ||
12 | #include <asm/e820.h> | 13 | #include <asm/e820.h> |
13 | 14 | ||
14 | #include "pci.h" | 15 | #include "pci.h" |
@@ -164,11 +165,33 @@ static __init void unreachable_devices(void) | |||
164 | } | 165 | } |
165 | } | 166 | } |
166 | 167 | ||
168 | static int disable_mcfg(struct dmi_system_id *d) | ||
169 | { | ||
170 | printk("PCI: %s detected. Disabling MCFG.\n", d->ident); | ||
171 | pci_probe &= ~PCI_PROBE_MMCONF; | ||
172 | return 0; | ||
173 | } | ||
174 | |||
175 | static struct dmi_system_id __initdata dmi_bad_mcfg[] = { | ||
176 | /* Has broken MCFG table that makes the system hang when used */ | ||
177 | { | ||
178 | .callback = disable_mcfg, | ||
179 | .ident = "Intel D3C5105 SDV", | ||
180 | .matches = { | ||
181 | DMI_MATCH(DMI_BIOS_VENDOR, "Intel"), | ||
182 | DMI_MATCH(DMI_BOARD_NAME, "D26928"), | ||
183 | }, | ||
184 | }, | ||
185 | {} | ||
186 | }; | ||
187 | |||
167 | void __init pci_mmcfg_init(void) | 188 | void __init pci_mmcfg_init(void) |
168 | { | 189 | { |
169 | int i; | 190 | int i; |
170 | 191 | ||
171 | if ((pci_probe & PCI_PROBE_MMCONF) == 0) | 192 | dmi_check_system(dmi_bad_mcfg); |
193 | |||
194 | if ((pci_probe & (PCI_PROBE_MMCONF|PCI_PROBE_MMCONF_FORCE)) == 0) | ||
172 | return; | 195 | return; |
173 | 196 | ||
174 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); | 197 | acpi_table_parse(ACPI_MCFG, acpi_parse_mcfg); |
@@ -177,15 +200,6 @@ void __init pci_mmcfg_init(void) | |||
177 | (pci_mmcfg_config[0].base_address == 0)) | 200 | (pci_mmcfg_config[0].base_address == 0)) |
178 | return; | 201 | return; |
179 | 202 | ||
180 | if (!e820_all_mapped(pci_mmcfg_config[0].base_address, | ||
181 | pci_mmcfg_config[0].base_address + MMCONFIG_APER_MIN, | ||
182 | E820_RESERVED)) { | ||
183 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %x is not E820-reserved\n", | ||
184 | pci_mmcfg_config[0].base_address); | ||
185 | printk(KERN_ERR "PCI: Not using MMCONFIG.\n"); | ||
186 | return; | ||
187 | } | ||
188 | |||
189 | /* RED-PEN i386 doesn't do _nocache right now */ | 203 | /* RED-PEN i386 doesn't do _nocache right now */ |
190 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); | 204 | pci_mmcfg_virt = kmalloc(sizeof(*pci_mmcfg_virt) * pci_mmcfg_config_num, GFP_KERNEL); |
191 | if (pci_mmcfg_virt == NULL) { | 205 | if (pci_mmcfg_virt == NULL) { |