diff options
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/Kconfig | 13 | ||||
-rw-r--r-- | arch/i386/Makefile | 4 | ||||
-rw-r--r-- | arch/i386/boot/edd.c | 54 | ||||
-rw-r--r-- | arch/i386/boot/video.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/alternative.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/apic.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/nmi.c | 4 | ||||
-rw-r--r-- | arch/i386/kernel/tsc.c | 1 | ||||
-rw-r--r-- | arch/i386/mm/fault.c | 5 | ||||
-rw-r--r-- | arch/i386/xen/xen-head.S | 6 |
10 files changed, 37 insertions, 56 deletions
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index f9524933258a..97b64d7d6bf6 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -614,10 +614,14 @@ config X86_PAE | |||
614 | 614 | ||
615 | # Common NUMA Features | 615 | # Common NUMA Features |
616 | config NUMA | 616 | config NUMA |
617 | bool "Numa Memory Allocation and Scheduler Support" | 617 | bool "Numa Memory Allocation and Scheduler Support (EXPERIMENTAL)" |
618 | depends on SMP && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI) | 618 | depends on SMP && HIGHMEM64G && (X86_NUMAQ || (X86_SUMMIT || X86_GENERICARCH) && ACPI) && EXPERIMENTAL |
619 | default n if X86_PC | 619 | default n if X86_PC |
620 | default y if (X86_NUMAQ || X86_SUMMIT) | 620 | default y if (X86_NUMAQ || X86_SUMMIT) |
621 | help | ||
622 | NUMA support for i386. This is currently high experimental | ||
623 | and should be only used for kernel development. It might also | ||
624 | cause boot failures. | ||
621 | 625 | ||
622 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" | 626 | comment "NUMA (Summit) requires SMP, 64GB highmem support, ACPI" |
623 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) | 627 | depends on X86_SUMMIT && (!HIGHMEM64G || !ACPI) |
@@ -1228,6 +1232,11 @@ menuconfig INSTRUMENTATION | |||
1228 | bool "Instrumentation Support" | 1232 | bool "Instrumentation Support" |
1229 | depends on EXPERIMENTAL | 1233 | depends on EXPERIMENTAL |
1230 | default y | 1234 | default y |
1235 | ---help--- | ||
1236 | Say Y here to get to see options related to performance measurement, | ||
1237 | debugging, and testing. This option alone does not add any kernel code. | ||
1238 | |||
1239 | If you say N, all options in this submenu will be skipped and disabled. | ||
1231 | 1240 | ||
1232 | if INSTRUMENTATION | 1241 | if INSTRUMENTATION |
1233 | 1242 | ||
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 01f0ff0daaf4..52b932478c6d 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -51,8 +51,8 @@ cflags-y += -maccumulate-outgoing-args | |||
51 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) | 51 | CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then echo $(call cc-option,-fno-unit-at-a-time); fi ;) |
52 | 52 | ||
53 | # do binutils support CFI? | 53 | # do binutils support CFI? |
54 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 54 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) |
55 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_endproc,-DCONFIG_AS_CFI=1,) | 55 | AFLAGS += $(call as-instr,.cfi_startproc\n.cfi_rel_offset esp${comma}0\n.cfi_endproc,-DCONFIG_AS_CFI=1,) |
56 | 56 | ||
57 | # is .cfi_signal_frame supported too? | 57 | # is .cfi_signal_frame supported too? |
58 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) | 58 | cflags-y += $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1,) |
diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c index 658834d9f92a..82b5c846a194 100644 --- a/arch/i386/boot/edd.c +++ b/arch/i386/boot/edd.c | |||
@@ -19,40 +19,12 @@ | |||
19 | 19 | ||
20 | #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) | 20 | #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) |
21 | 21 | ||
22 | struct edd_dapa { | ||
23 | u8 pkt_size; | ||
24 | u8 rsvd; | ||
25 | u16 sector_cnt; | ||
26 | u16 buf_off, buf_seg; | ||
27 | u64 lba; | ||
28 | u64 buf_lin_addr; | ||
29 | }; | ||
30 | |||
31 | /* | 22 | /* |
32 | * Read the MBR (first sector) from a specific device. | 23 | * Read the MBR (first sector) from a specific device. |
33 | */ | 24 | */ |
34 | static int read_mbr(u8 devno, void *buf) | 25 | static int read_mbr(u8 devno, void *buf) |
35 | { | 26 | { |
36 | struct edd_dapa dapa; | 27 | u16 ax, bx, cx, dx; |
37 | u16 ax, bx, cx, dx, si; | ||
38 | |||
39 | memset(&dapa, 0, sizeof dapa); | ||
40 | dapa.pkt_size = sizeof(dapa); | ||
41 | dapa.sector_cnt = 1; | ||
42 | dapa.buf_off = (size_t)buf; | ||
43 | dapa.buf_seg = ds(); | ||
44 | /* dapa.lba = 0; */ | ||
45 | |||
46 | ax = 0x4200; /* Extended Read */ | ||
47 | si = (size_t)&dapa; | ||
48 | dx = devno; | ||
49 | asm("pushfl; stc; int $0x13; setc %%al; popfl" | ||
50 | : "+a" (ax), "+S" (si), "+d" (dx) | ||
51 | : "m" (dapa) | ||
52 | : "ebx", "ecx", "edi", "memory"); | ||
53 | |||
54 | if (!(u8)ax) | ||
55 | return 0; /* OK */ | ||
56 | 28 | ||
57 | ax = 0x0201; /* Legacy Read, one sector */ | 29 | ax = 0x0201; /* Legacy Read, one sector */ |
58 | cx = 0x0001; /* Sector 0-0-1 */ | 30 | cx = 0x0001; /* Sector 0-0-1 */ |
@@ -65,11 +37,10 @@ static int read_mbr(u8 devno, void *buf) | |||
65 | return -(u8)ax; /* 0 or -1 */ | 37 | return -(u8)ax; /* 0 or -1 */ |
66 | } | 38 | } |
67 | 39 | ||
68 | static u32 read_mbr_sig(u8 devno, struct edd_info *ei) | 40 | static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig) |
69 | { | 41 | { |
70 | int sector_size; | 42 | int sector_size; |
71 | char *mbrbuf_ptr, *mbrbuf_end; | 43 | char *mbrbuf_ptr, *mbrbuf_end; |
72 | u32 mbrsig; | ||
73 | u32 buf_base, mbr_base; | 44 | u32 buf_base, mbr_base; |
74 | extern char _end[]; | 45 | extern char _end[]; |
75 | 46 | ||
@@ -85,15 +56,15 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei) | |||
85 | 56 | ||
86 | /* Make sure we actually have space on the heap... */ | 57 | /* Make sure we actually have space on the heap... */ |
87 | if (!(boot_params.hdr.loadflags & CAN_USE_HEAP)) | 58 | if (!(boot_params.hdr.loadflags & CAN_USE_HEAP)) |
88 | return 0; | 59 | return -1; |
89 | if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) | 60 | if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) |
90 | return 0; | 61 | return -1; |
91 | 62 | ||
92 | if (read_mbr(devno, mbrbuf_ptr)) | 63 | if (read_mbr(devno, mbrbuf_ptr)) |
93 | return 0; | 64 | return -1; |
94 | 65 | ||
95 | mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET]; | 66 | *mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET]; |
96 | return mbrsig; | 67 | return 0; |
97 | } | 68 | } |
98 | 69 | ||
99 | static int get_edd_info(u8 devno, struct edd_info *ei) | 70 | static int get_edd_info(u8 devno, struct edd_info *ei) |
@@ -160,6 +131,7 @@ void query_edd(void) | |||
160 | int do_edd = 1; | 131 | int do_edd = 1; |
161 | int devno; | 132 | int devno; |
162 | struct edd_info ei, *edp; | 133 | struct edd_info ei, *edp; |
134 | u32 *mbrptr; | ||
163 | 135 | ||
164 | if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { | 136 | if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) { |
165 | if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) | 137 | if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip")) |
@@ -168,7 +140,8 @@ void query_edd(void) | |||
168 | do_edd = 0; | 140 | do_edd = 0; |
169 | } | 141 | } |
170 | 142 | ||
171 | edp = (struct edd_info *)boot_params.eddbuf; | 143 | edp = boot_params.eddbuf; |
144 | mbrptr = boot_params.edd_mbr_sig_buffer; | ||
172 | 145 | ||
173 | if (!do_edd) | 146 | if (!do_edd) |
174 | return; | 147 | return; |
@@ -186,11 +159,8 @@ void query_edd(void) | |||
186 | boot_params.eddbuf_entries++; | 159 | boot_params.eddbuf_entries++; |
187 | } | 160 | } |
188 | 161 | ||
189 | if (do_mbr) { | 162 | if (do_mbr && !read_mbr_sig(devno, &ei, mbrptr++)) |
190 | u32 mbr_sig; | 163 | boot_params.edd_mbr_sig_buf_entries = devno-0x80+1; |
191 | mbr_sig = read_mbr_sig(devno, &ei); | ||
192 | boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig; | ||
193 | } | ||
194 | } | 164 | } |
195 | } | 165 | } |
196 | 166 | ||
diff --git a/arch/i386/boot/video.c b/arch/i386/boot/video.c index 958130ef0042..693f20d3102e 100644 --- a/arch/i386/boot/video.c +++ b/arch/i386/boot/video.c | |||
@@ -61,7 +61,7 @@ static void store_video_mode(void) | |||
61 | 61 | ||
62 | /* Not all BIOSes are clean with respect to the top bit */ | 62 | /* Not all BIOSes are clean with respect to the top bit */ |
63 | boot_params.screen_info.orig_video_mode = ax & 0x7f; | 63 | boot_params.screen_info.orig_video_mode = ax & 0x7f; |
64 | boot_params.screen_info.orig_video_page = page; | 64 | boot_params.screen_info.orig_video_page = page >> 8; |
65 | } | 65 | } |
66 | 66 | ||
67 | /* | 67 | /* |
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 1b66d5c70eaf..9f4ac8b02de4 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c | |||
@@ -366,6 +366,8 @@ void apply_paravirt(struct paravirt_patch_site *start, | |||
366 | unsigned int used; | 366 | unsigned int used; |
367 | 367 | ||
368 | BUG_ON(p->len > MAX_PATCH_LEN); | 368 | BUG_ON(p->len > MAX_PATCH_LEN); |
369 | /* prep the buffer with the original instructions */ | ||
370 | memcpy(insnbuf, p->instr, p->len); | ||
369 | used = paravirt_ops.patch(p->instrtype, p->clobbers, insnbuf, | 371 | used = paravirt_ops.patch(p->instrtype, p->clobbers, insnbuf, |
370 | (unsigned long)p->instr, p->len); | 372 | (unsigned long)p->instr, p->len); |
371 | 373 | ||
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c index f9fff29e01a9..3d67ae18d762 100644 --- a/arch/i386/kernel/apic.c +++ b/arch/i386/kernel/apic.c | |||
@@ -1085,7 +1085,7 @@ static int __init detect_init_APIC (void) | |||
1085 | if (l & MSR_IA32_APICBASE_ENABLE) | 1085 | if (l & MSR_IA32_APICBASE_ENABLE) |
1086 | mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; | 1086 | mp_lapic_addr = l & MSR_IA32_APICBASE_BASE; |
1087 | 1087 | ||
1088 | if (nmi_watchdog != NMI_NONE) | 1088 | if (nmi_watchdog != NMI_NONE && nmi_watchdog != NMI_DISABLED) |
1089 | nmi_watchdog = NMI_LOCAL_APIC; | 1089 | nmi_watchdog = NMI_LOCAL_APIC; |
1090 | 1090 | ||
1091 | printk(KERN_INFO "Found and enabled local APIC!\n"); | 1091 | printk(KERN_INFO "Found and enabled local APIC!\n"); |
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 99beac7f96ce..8c1c965eb2a8 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -77,7 +77,7 @@ static int __init check_nmi_watchdog(void) | |||
77 | unsigned int *prev_nmi_count; | 77 | unsigned int *prev_nmi_count; |
78 | int cpu; | 78 | int cpu; |
79 | 79 | ||
80 | if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DEFAULT)) | 80 | if ((nmi_watchdog == NMI_NONE) || (nmi_watchdog == NMI_DISABLED)) |
81 | return 0; | 81 | return 0; |
82 | 82 | ||
83 | if (!atomic_read(&nmi_active)) | 83 | if (!atomic_read(&nmi_active)) |
@@ -424,7 +424,7 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
424 | if (!!old_state == !!nmi_watchdog_enabled) | 424 | if (!!old_state == !!nmi_watchdog_enabled) |
425 | return 0; | 425 | return 0; |
426 | 426 | ||
427 | if (atomic_read(&nmi_active) < 0) { | 427 | if (atomic_read(&nmi_active) < 0 || nmi_watchdog == NMI_DISABLED) { |
428 | printk( KERN_WARNING "NMI watchdog is permanently disabled\n"); | 428 | printk( KERN_WARNING "NMI watchdog is permanently disabled\n"); |
429 | return -EIO; | 429 | return -EIO; |
430 | } | 430 | } |
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c index debd7dbb4158..a39280b4dd3a 100644 --- a/arch/i386/kernel/tsc.c +++ b/arch/i386/kernel/tsc.c | |||
@@ -292,7 +292,6 @@ static struct clocksource clocksource_tsc = { | |||
292 | 292 | ||
293 | void mark_tsc_unstable(char *reason) | 293 | void mark_tsc_unstable(char *reason) |
294 | { | 294 | { |
295 | sched_clock_unstable_event(); | ||
296 | if (!tsc_unstable) { | 295 | if (!tsc_unstable) { |
297 | tsc_unstable = 1; | 296 | tsc_unstable = 1; |
298 | tsc_enabled = 0; | 297 | tsc_enabled = 0; |
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 01ffdd4964f0..fcb38e7f3543 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -249,9 +249,10 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address) | |||
249 | pmd_k = pmd_offset(pud_k, address); | 249 | pmd_k = pmd_offset(pud_k, address); |
250 | if (!pmd_present(*pmd_k)) | 250 | if (!pmd_present(*pmd_k)) |
251 | return NULL; | 251 | return NULL; |
252 | if (!pmd_present(*pmd)) | 252 | if (!pmd_present(*pmd)) { |
253 | set_pmd(pmd, *pmd_k); | 253 | set_pmd(pmd, *pmd_k); |
254 | else | 254 | arch_flush_lazy_mmu_mode(); |
255 | } else | ||
255 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); | 256 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); |
256 | return pmd_k; | 257 | return pmd_k; |
257 | } | 258 | } |
diff --git a/arch/i386/xen/xen-head.S b/arch/i386/xen/xen-head.S index bc71f3bc4014..f8d6937db2ec 100644 --- a/arch/i386/xen/xen-head.S +++ b/arch/i386/xen/xen-head.S | |||
@@ -7,20 +7,20 @@ | |||
7 | #include <asm/boot.h> | 7 | #include <asm/boot.h> |
8 | #include <xen/interface/elfnote.h> | 8 | #include <xen/interface/elfnote.h> |
9 | 9 | ||
10 | .section .init.text | 10 | .pushsection .init.text |
11 | ENTRY(startup_xen) | 11 | ENTRY(startup_xen) |
12 | movl %esi,xen_start_info | 12 | movl %esi,xen_start_info |
13 | cld | 13 | cld |
14 | movl $(init_thread_union+THREAD_SIZE),%esp | 14 | movl $(init_thread_union+THREAD_SIZE),%esp |
15 | jmp xen_start_kernel | 15 | jmp xen_start_kernel |
16 | .popsection | ||
16 | 17 | ||
17 | .pushsection ".bss.page_aligned" | 18 | .pushsection .bss.page_aligned |
18 | .align PAGE_SIZE_asm | 19 | .align PAGE_SIZE_asm |
19 | ENTRY(hypercall_page) | 20 | ENTRY(hypercall_page) |
20 | .skip 0x1000 | 21 | .skip 0x1000 |
21 | .popsection | 22 | .popsection |
22 | 23 | ||
23 | .section .text | ||
24 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux") | 24 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux") |
25 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6") | 25 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6") |
26 | ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0") | 26 | ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0") |