aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/boot/video.S4
-rw-r--r--arch/i386/kernel/Makefile1
-rw-r--r--arch/i386/kernel/apic.c1
-rw-r--r--arch/i386/kernel/apm.c3
-rw-r--r--arch/i386/kernel/crash.c2
-rw-r--r--arch/i386/kernel/efi.c12
-rw-r--r--arch/i386/kernel/i8259.c1
-rw-r--r--arch/i386/kernel/io_apic.c1
-rw-r--r--arch/i386/kernel/ioport.c1
-rw-r--r--arch/i386/kernel/kprobes.c27
-rw-r--r--arch/i386/kernel/ldt.c1
-rw-r--r--arch/i386/kernel/legacy_serial.c67
-rw-r--r--arch/i386/kernel/mpparse.c1
-rw-r--r--arch/i386/kernel/nmi.c2
-rw-r--r--arch/i386/kernel/pci-dma.c2
-rw-r--r--arch/i386/kernel/process.c1
-rw-r--r--arch/i386/kernel/ptrace.c1
-rw-r--r--arch/i386/kernel/signal.c1
-rw-r--r--arch/i386/kernel/smp.c1
-rw-r--r--arch/i386/kernel/smpboot.c1
-rw-r--r--arch/i386/kernel/sys_i386.c1
-rw-r--r--arch/i386/kernel/syscall_table.S1
-rw-r--r--arch/i386/kernel/traps.c21
-rw-r--r--arch/i386/kernel/vm86.c1
-rw-r--r--arch/i386/mach-default/setup.c2
-rw-r--r--arch/i386/mach-visws/setup.c2
-rw-r--r--arch/i386/mach-visws/visws_apic.c1
-rw-r--r--arch/i386/mach-voyager/setup.c2
-rw-r--r--arch/i386/mach-voyager/voyager_smp.c1
-rw-r--r--arch/i386/mach-voyager/voyager_thread.c1
-rw-r--r--arch/i386/mm/fault.c4
-rw-r--r--arch/i386/mm/hugetlbpage.c1
-rw-r--r--arch/i386/mm/init.c9
-rw-r--r--arch/i386/oprofile/nmi_int.c2
-rw-r--r--arch/i386/oprofile/nmi_timer_int.c3
35 files changed, 107 insertions, 76 deletions
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
index 8143c9516cb4..5e2280cf4456 100644
--- a/arch/i386/boot/video.S
+++ b/arch/i386/boot/video.S
@@ -496,9 +496,11 @@ mode_set:
496 cmpb $VIDEO_FIRST_V7>>8, %ah 496 cmpb $VIDEO_FIRST_V7>>8, %ah
497 jz setv7 497 jz setv7
498 498
499#ifdef CONFIG_FB
499 cmpb $VIDEO_FIRST_VESA>>8, %ah 500 cmpb $VIDEO_FIRST_VESA>>8, %ah
500 jnc check_vesa 501 jnc check_vesa
501 502#endif
503
502 orb %ah, %ah 504 orb %ah, %ah
503 jz setmenu 505 jz setmenu
504 506
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 4f98516b9f94..91cff8dc9e1a 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -34,6 +34,7 @@ obj-y += sysenter.o vsyscall.o
34obj-$(CONFIG_ACPI_SRAT) += srat.o 34obj-$(CONFIG_ACPI_SRAT) += srat.o
35obj-$(CONFIG_EFI) += efi.o efi_stub.o 35obj-$(CONFIG_EFI) += efi.o efi_stub.o
36obj-$(CONFIG_DOUBLEFAULT) += doublefault.o 36obj-$(CONFIG_DOUBLEFAULT) += doublefault.o
37obj-$(CONFIG_SERIAL_8250) += legacy_serial.o
37obj-$(CONFIG_VM86) += vm86.o 38obj-$(CONFIG_VM86) += vm86.o
38obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 39obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
39obj-$(CONFIG_HPET_TIMER) += hpet.o 40obj-$(CONFIG_HPET_TIMER) += hpet.o
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index aca054cc0552..67824f3bb974 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -19,7 +19,6 @@
19#include <linux/mm.h> 19#include <linux/mm.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/bootmem.h> 21#include <linux/bootmem.h>
22#include <linux/smp_lock.h>
23#include <linux/interrupt.h> 22#include <linux/interrupt.h>
24#include <linux/mc146818rtc.h> 23#include <linux/mc146818rtc.h>
25#include <linux/kernel_stat.h> 24#include <linux/kernel_stat.h>
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 367ff1d930cb..4112afe712b9 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -223,7 +223,6 @@
223#include <linux/device.h> 223#include <linux/device.h>
224#include <linux/kernel.h> 224#include <linux/kernel.h>
225#include <linux/smp.h> 225#include <linux/smp.h>
226#include <linux/smp_lock.h>
227#include <linux/dmi.h> 226#include <linux/dmi.h>
228#include <linux/suspend.h> 227#include <linux/suspend.h>
229#include <linux/kthread.h> 228#include <linux/kthread.h>
@@ -1173,7 +1172,7 @@ static void reinit_timer(void)
1173 unsigned long flags; 1172 unsigned long flags;
1174 1173
1175 spin_lock_irqsave(&i8253_lock, flags); 1174 spin_lock_irqsave(&i8253_lock, flags);
1176 /* set the clock to 100 Hz */ 1175 /* set the clock to HZ */
1177 outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */ 1176 outb_p(0x34, PIT_MODE); /* binary, mode 2, LSB/MSB, ch 0 */
1178 udelay(10); 1177 udelay(10);
1179 outb_p(LATCH & 0xff, PIT_CH0); /* LSB */ 1178 outb_p(LATCH & 0xff, PIT_CH0); /* LSB */
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c
index a5e0e990ea95..53589d1b1a05 100644
--- a/arch/i386/kernel/crash.c
+++ b/arch/i386/kernel/crash.c
@@ -22,7 +22,7 @@
22#include <asm/nmi.h> 22#include <asm/nmi.h>
23#include <asm/hw_irq.h> 23#include <asm/hw_irq.h>
24#include <asm/apic.h> 24#include <asm/apic.h>
25#include <asm/kdebug.h> 25#include <linux/kdebug.h>
26#include <asm/smp.h> 26#include <asm/smp.h>
27 27
28#include <mach_ipi.h> 28#include <mach_ipi.h>
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index dd9e7faafa7c..a1808022ea19 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -347,14 +347,12 @@ void __init efi_init(void)
347 printk(KERN_ERR PFX "Woah! Couldn't map the EFI system table.\n"); 347 printk(KERN_ERR PFX "Woah! Couldn't map the EFI system table.\n");
348 if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) 348 if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
349 printk(KERN_ERR PFX "Woah! EFI system table signature incorrect\n"); 349 printk(KERN_ERR PFX "Woah! EFI system table signature incorrect\n");
350 if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0) 350 if ((efi.systab->hdr.revision >> 16) == 0)
351 printk(KERN_ERR PFX 351 printk(KERN_ERR PFX "Warning: EFI system table version "
352 "Warning: EFI system table major version mismatch: " 352 "%d.%02d, expected 1.00 or greater\n",
353 "got %d.%02d, expected %d.%02d\n",
354 efi.systab->hdr.revision >> 16, 353 efi.systab->hdr.revision >> 16,
355 efi.systab->hdr.revision & 0xffff, 354 efi.systab->hdr.revision & 0xffff);
356 EFI_SYSTEM_TABLE_REVISION >> 16, 355
357 EFI_SYSTEM_TABLE_REVISION & 0xffff);
358 /* 356 /*
359 * Grab some details from the system table 357 * Grab some details from the system table
360 */ 358 */
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
index 03abfdb1a6e4..0499cbe9871a 100644
--- a/arch/i386/kernel/i8259.c
+++ b/arch/i386/kernel/i8259.c
@@ -5,7 +5,6 @@
5#include <linux/interrupt.h> 5#include <linux/interrupt.h>
6#include <linux/slab.h> 6#include <linux/slab.h>
7#include <linux/random.h> 7#include <linux/random.h>
8#include <linux/smp_lock.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/kernel_stat.h> 9#include <linux/kernel_stat.h>
11#include <linux/sysdev.h> 10#include <linux/sysdev.h>
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index 1b623cda3a64..7f8b7af2b95f 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -25,7 +25,6 @@
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/sched.h> 27#include <linux/sched.h>
28#include <linux/smp_lock.h>
29#include <linux/mc146818rtc.h> 28#include <linux/mc146818rtc.h>
30#include <linux/compiler.h> 29#include <linux/compiler.h>
31#include <linux/acpi.h> 30#include <linux/acpi.h>
diff --git a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c
index d1e42e0dbe67..3d310a946d76 100644
--- a/arch/i386/kernel/ioport.c
+++ b/arch/i386/kernel/ioport.c
@@ -12,7 +12,6 @@
12#include <linux/types.h> 12#include <linux/types.h>
13#include <linux/ioport.h> 13#include <linux/ioport.h>
14#include <linux/smp.h> 14#include <linux/smp.h>
15#include <linux/smp_lock.h>
16#include <linux/stddef.h> 15#include <linux/stddef.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
18#include <linux/thread_info.h> 17#include <linux/thread_info.h>
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c
index b545bc746fce..dde828a333c3 100644
--- a/arch/i386/kernel/kprobes.c
+++ b/arch/i386/kernel/kprobes.c
@@ -31,8 +31,8 @@
31#include <linux/kprobes.h> 31#include <linux/kprobes.h>
32#include <linux/ptrace.h> 32#include <linux/ptrace.h>
33#include <linux/preempt.h> 33#include <linux/preempt.h>
34#include <linux/kdebug.h>
34#include <asm/cacheflush.h> 35#include <asm/cacheflush.h>
35#include <asm/kdebug.h>
36#include <asm/desc.h> 36#include <asm/desc.h>
37#include <asm/uaccess.h> 37#include <asm/uaccess.h>
38 38
@@ -226,24 +226,15 @@ static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
226} 226}
227 227
228/* Called with kretprobe_lock held */ 228/* Called with kretprobe_lock held */
229void __kprobes arch_prepare_kretprobe(struct kretprobe *rp, 229void __kprobes arch_prepare_kretprobe(struct kretprobe_instance *ri,
230 struct pt_regs *regs) 230 struct pt_regs *regs)
231{ 231{
232 unsigned long *sara = (unsigned long *)&regs->esp; 232 unsigned long *sara = (unsigned long *)&regs->esp;
233 233
234 struct kretprobe_instance *ri; 234 ri->ret_addr = (kprobe_opcode_t *) *sara;
235 235
236 if ((ri = get_free_rp_inst(rp)) != NULL) { 236 /* Replace the return addr with trampoline addr */
237 ri->rp = rp; 237 *sara = (unsigned long) &kretprobe_trampoline;
238 ri->task = current;
239 ri->ret_addr = (kprobe_opcode_t *) *sara;
240
241 /* Replace the return addr with trampoline addr */
242 *sara = (unsigned long) &kretprobe_trampoline;
243 add_rp_inst(ri);
244 } else {
245 rp->nmissed++;
246 }
247} 238}
248 239
249/* 240/*
@@ -449,8 +440,7 @@ fastcall void *__kprobes trampoline_handler(struct pt_regs *regs)
449 break; 440 break;
450 } 441 }
451 442
452 BUG_ON(!orig_ret_address || (orig_ret_address == trampoline_address)); 443 kretprobe_assert(ri, orig_ret_address, trampoline_address);
453
454 spin_unlock_irqrestore(&kretprobe_lock, flags); 444 spin_unlock_irqrestore(&kretprobe_lock, flags);
455 445
456 hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) { 446 hlist_for_each_entry_safe(ri, node, tmp, &empty_rp, hlist) {
@@ -753,6 +743,11 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs)
753 return 0; 743 return 0;
754} 744}
755 745
746int __kprobes arch_trampoline_kprobe(struct kprobe *p)
747{
748 return 0;
749}
750
756int __init arch_init_kprobes(void) 751int __init arch_init_kprobes(void)
757{ 752{
758 return 0; 753 return 0;
diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c
index b410e5fb034f..e0b2d17f4f10 100644
--- a/arch/i386/kernel/ldt.c
+++ b/arch/i386/kernel/ldt.c
@@ -10,7 +10,6 @@
10#include <linux/string.h> 10#include <linux/string.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <linux/smp_lock.h>
14#include <linux/vmalloc.h> 13#include <linux/vmalloc.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16 15
diff --git a/arch/i386/kernel/legacy_serial.c b/arch/i386/kernel/legacy_serial.c
new file mode 100644
index 000000000000..21510118544e
--- /dev/null
+++ b/arch/i386/kernel/legacy_serial.c
@@ -0,0 +1,67 @@
1/*
2 * Legacy COM port devices for x86 platforms without PNPBIOS or ACPI.
3 * Data taken from include/asm-i386/serial.h.
4 *
5 * (c) Copyright 2007 Hewlett-Packard Development Company, L.P.
6 * Bjorn Helgaas <bjorn.helgaas@hp.com>
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 version 2 as
10 * published by the Free Software Foundation.
11 */
12#include <linux/module.h>
13#include <linux/init.h>
14#include <linux/pnp.h>
15#include <linux/serial_8250.h>
16
17/* Standard COM flags (except for COM4, because of the 8514 problem) */
18#ifdef CONFIG_SERIAL_DETECT_IRQ
19#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_AUTO_IRQ)
20#define COM4_FLAGS (UPF_BOOT_AUTOCONF | UPF_AUTO_IRQ)
21#else
22#define COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)
23#define COM4_FLAGS UPF_BOOT_AUTOCONF
24#endif
25
26#define PORT(_base,_irq,_flags) \
27 { \
28 .iobase = _base, \
29 .irq = _irq, \
30 .uartclk = 1843200, \
31 .iotype = UPIO_PORT, \
32 .flags = _flags, \
33 }
34
35static struct plat_serial8250_port x86_com_data[] = {
36 PORT(0x3F8, 4, COM_FLAGS),
37 PORT(0x2F8, 3, COM_FLAGS),
38 PORT(0x3E8, 4, COM_FLAGS),
39 PORT(0x2E8, 3, COM4_FLAGS),
40 { },
41};
42
43static struct platform_device x86_com_device = {
44 .name = "serial8250",
45 .id = PLAT8250_DEV_PLATFORM,
46 .dev = {
47 .platform_data = x86_com_data,
48 },
49};
50
51static int force_legacy_probe;
52module_param_named(force, force_legacy_probe, bool, 0);
53MODULE_PARM_DESC(force, "Force legacy serial port probe");
54
55static int __init serial8250_x86_com_init(void)
56{
57 if (pnp_platform_devices && !force_legacy_probe)
58 return -ENODEV;
59
60 return platform_device_register(&x86_com_device);
61}
62
63module_init(serial8250_x86_com_init);
64
65MODULE_AUTHOR("Bjorn Helgaas");
66MODULE_LICENSE("GPL");
67MODULE_DESCRIPTION("Generic 8250/16x50 legacy probe module");
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index 0952eccd8f28..13abb4ebfb79 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -18,7 +18,6 @@
18#include <linux/acpi.h> 18#include <linux/acpi.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/bootmem.h> 20#include <linux/bootmem.h>
21#include <linux/smp_lock.h>
22#include <linux/kernel_stat.h> 21#include <linux/kernel_stat.h>
23#include <linux/mc146818rtc.h> 22#include <linux/mc146818rtc.h>
24#include <linux/bitops.h> 23#include <linux/bitops.h>
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 33cf2f3c444f..fba121f7973f 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -23,10 +23,10 @@
23#include <linux/kprobes.h> 23#include <linux/kprobes.h>
24#include <linux/cpumask.h> 24#include <linux/cpumask.h>
25#include <linux/kernel_stat.h> 25#include <linux/kernel_stat.h>
26#include <linux/kdebug.h>
26 27
27#include <asm/smp.h> 28#include <asm/smp.h>
28#include <asm/nmi.h> 29#include <asm/nmi.h>
29#include <asm/kdebug.h>
30 30
31#include "mach_traps.h" 31#include "mach_traps.h"
32 32
diff --git a/arch/i386/kernel/pci-dma.c b/arch/i386/kernel/pci-dma.c
index 3ebcea033623..30b754f7cbec 100644
--- a/arch/i386/kernel/pci-dma.c
+++ b/arch/i386/kernel/pci-dma.c
@@ -77,7 +77,7 @@ int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
77{ 77{
78 void __iomem *mem_base = NULL; 78 void __iomem *mem_base = NULL;
79 int pages = size >> PAGE_SHIFT; 79 int pages = size >> PAGE_SHIFT;
80 int bitmap_size = (pages + 31)/32; 80 int bitmap_size = BITS_TO_LONGS(pages) * sizeof(long);
81 81
82 if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0) 82 if ((flags & (DMA_MEMORY_MAP | DMA_MEMORY_IO)) == 0)
83 goto out; 83 goto out;
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 61999479b7a4..d76d9bc33b30 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -21,7 +21,6 @@
21#include <linux/mm.h> 21#include <linux/mm.h>
22#include <linux/elfcore.h> 22#include <linux/elfcore.h>
23#include <linux/smp.h> 23#include <linux/smp.h>
24#include <linux/smp_lock.h>
25#include <linux/stddef.h> 24#include <linux/stddef.h>
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/vmalloc.h> 26#include <linux/vmalloc.h>
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c
index 4a8f8a259723..0c0ceec5de00 100644
--- a/arch/i386/kernel/ptrace.c
+++ b/arch/i386/kernel/ptrace.c
@@ -9,7 +9,6 @@
9#include <linux/sched.h> 9#include <linux/sched.h>
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/smp.h> 11#include <linux/smp.h>
12#include <linux/smp_lock.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/ptrace.h> 13#include <linux/ptrace.h>
15#include <linux/user.h> 14#include <linux/user.h>
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c
index 4f99e870c986..d574e38f0f77 100644
--- a/arch/i386/kernel/signal.c
+++ b/arch/i386/kernel/signal.c
@@ -10,7 +10,6 @@
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <linux/smp_lock.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/signal.h> 14#include <linux/signal.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c
index 89a45a9ddcd4..93f202a855fa 100644
--- a/arch/i386/kernel/smp.c
+++ b/arch/i386/kernel/smp.c
@@ -13,7 +13,6 @@
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/spinlock.h> 15#include <linux/spinlock.h>
16#include <linux/smp_lock.h>
17#include <linux/kernel_stat.h> 16#include <linux/kernel_stat.h>
18#include <linux/mc146818rtc.h> 17#include <linux/mc146818rtc.h>
19#include <linux/cache.h> 18#include <linux/cache.h>
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index a4b7ad283f49..b92cc4e8b3bb 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -40,7 +40,6 @@
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/sched.h> 41#include <linux/sched.h>
42#include <linux/kernel_stat.h> 42#include <linux/kernel_stat.h>
43#include <linux/smp_lock.h>
44#include <linux/bootmem.h> 43#include <linux/bootmem.h>
45#include <linux/notifier.h> 44#include <linux/notifier.h>
46#include <linux/cpu.h> 45#include <linux/cpu.h>
diff --git a/arch/i386/kernel/sys_i386.c b/arch/i386/kernel/sys_i386.c
index 4048397f1740..e5dcb9379018 100644
--- a/arch/i386/kernel/sys_i386.c
+++ b/arch/i386/kernel/sys_i386.c
@@ -10,7 +10,6 @@
10#include <linux/sched.h> 10#include <linux/sched.h>
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/smp.h> 12#include <linux/smp.h>
13#include <linux/smp_lock.h>
14#include <linux/sem.h> 13#include <linux/sem.h>
15#include <linux/msg.h> 14#include <linux/msg.h>
16#include <linux/shm.h> 15#include <linux/shm.h>
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S
index 2697e9210e92..0772678ceecf 100644
--- a/arch/i386/kernel/syscall_table.S
+++ b/arch/i386/kernel/syscall_table.S
@@ -319,3 +319,4 @@ ENTRY(sys_call_table)
319 .long sys_move_pages 319 .long sys_move_pages
320 .long sys_getcpu 320 .long sys_getcpu
321 .long sys_epoll_pwait 321 .long sys_epoll_pwait
322 .long sys_utimensat /* 320 */
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index f21b41e7770c..4bec0cbf407a 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -52,7 +52,7 @@
52#include <asm/unwind.h> 52#include <asm/unwind.h>
53#include <asm/smp.h> 53#include <asm/smp.h>
54#include <asm/arch_hooks.h> 54#include <asm/arch_hooks.h>
55#include <asm/kdebug.h> 55#include <linux/kdebug.h>
56#include <asm/stacktrace.h> 56#include <asm/stacktrace.h>
57 57
58#include <linux/module.h> 58#include <linux/module.h>
@@ -95,20 +95,6 @@ asmlinkage void machine_check(void);
95 95
96int kstack_depth_to_print = 24; 96int kstack_depth_to_print = 24;
97static unsigned int code_bytes = 64; 97static unsigned int code_bytes = 64;
98ATOMIC_NOTIFIER_HEAD(i386die_chain);
99
100int register_die_notifier(struct notifier_block *nb)
101{
102 vmalloc_sync_all();
103 return atomic_notifier_chain_register(&i386die_chain, nb);
104}
105EXPORT_SYMBOL(register_die_notifier); /* used modular by kdb */
106
107int unregister_die_notifier(struct notifier_block *nb)
108{
109 return atomic_notifier_chain_unregister(&i386die_chain, nb);
110}
111EXPORT_SYMBOL(unregister_die_notifier); /* used modular by kdb */
112 98
113static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) 99static inline int valid_stack_ptr(struct thread_info *tinfo, void *p)
114{ 100{
@@ -747,6 +733,11 @@ static __kprobes void default_do_nmi(struct pt_regs * regs)
747 */ 733 */
748 if (nmi_watchdog_tick(regs, reason)) 734 if (nmi_watchdog_tick(regs, reason))
749 return; 735 return;
736#endif
737 if (notify_die(DIE_NMI_POST, "nmi_post", regs, reason, 2, 0)
738 == NOTIFY_STOP)
739 return;
740#ifdef CONFIG_X86_LOCAL_APIC
750 if (!do_nmi_callback(regs, smp_processor_id())) 741 if (!do_nmi_callback(regs, smp_processor_id()))
751#endif 742#endif
752 unknown_nmi_error(reason, regs); 743 unknown_nmi_error(reason, regs);
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
index d1b8f2b7aea6..f2dcd1d27c0a 100644
--- a/arch/i386/kernel/vm86.c
+++ b/arch/i386/kernel/vm86.c
@@ -39,7 +39,6 @@
39#include <linux/string.h> 39#include <linux/string.h>
40#include <linux/mm.h> 40#include <linux/mm.h>
41#include <linux/smp.h> 41#include <linux/smp.h>
42#include <linux/smp_lock.h>
43#include <linux/highmem.h> 42#include <linux/highmem.h>
44#include <linux/ptrace.h> 43#include <linux/ptrace.h>
45#include <linux/audit.h> 44#include <linux/audit.h>
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c
index c78816210706..7f635c7a2381 100644
--- a/arch/i386/mach-default/setup.c
+++ b/arch/i386/mach-default/setup.c
@@ -81,7 +81,7 @@ void __init trap_init_hook(void)
81 81
82static struct irqaction irq0 = { 82static struct irqaction irq0 = {
83 .handler = timer_interrupt, 83 .handler = timer_interrupt,
84 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 84 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL,
85 .mask = CPU_MASK_NONE, 85 .mask = CPU_MASK_NONE,
86 .name = "timer" 86 .name = "timer"
87}; 87};
diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c
index 233ee20907b9..1f81f10e03a0 100644
--- a/arch/i386/mach-visws/setup.c
+++ b/arch/i386/mach-visws/setup.c
@@ -116,7 +116,7 @@ void __init pre_setup_arch_hook()
116 116
117static struct irqaction irq0 = { 117static struct irqaction irq0 = {
118 .handler = timer_interrupt, 118 .handler = timer_interrupt,
119 .flags = IRQF_DISABLED, 119 .flags = IRQF_DISABLED | IRQF_IRQPOLL,
120 .name = "timer", 120 .name = "timer",
121}; 121};
122 122
diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c
index 38c2b13124d9..710faf71a650 100644
--- a/arch/i386/mach-visws/visws_apic.c
+++ b/arch/i386/mach-visws/visws_apic.c
@@ -18,7 +18,6 @@
18 18
19#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/smp_lock.h>
22#include <linux/init.h> 21#include <linux/init.h>
23 22
24#include <asm/io.h> 23#include <asm/io.h>
diff --git a/arch/i386/mach-voyager/setup.c b/arch/i386/mach-voyager/setup.c
index 447bb105cf58..2b55694e6400 100644
--- a/arch/i386/mach-voyager/setup.c
+++ b/arch/i386/mach-voyager/setup.c
@@ -42,7 +42,7 @@ void __init trap_init_hook(void)
42 42
43static struct irqaction irq0 = { 43static struct irqaction irq0 = {
44 .handler = timer_interrupt, 44 .handler = timer_interrupt,
45 .flags = IRQF_DISABLED | IRQF_NOBALANCING, 45 .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL,
46 .mask = CPU_MASK_NONE, 46 .mask = CPU_MASK_NONE,
47 .name = "timer" 47 .name = "timer"
48}; 48};
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index 1a5e448a29c7..50d9c52070b1 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -16,7 +16,6 @@
16#include <linux/mc146818rtc.h> 16#include <linux/mc146818rtc.h>
17#include <linux/cache.h> 17#include <linux/cache.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/smp_lock.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/bootmem.h> 21#include <linux/bootmem.h>
diff --git a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c
index fdc1d926fb2a..b4b24e0e45e1 100644
--- a/arch/i386/mach-voyager/voyager_thread.c
+++ b/arch/i386/mach-voyager/voyager_thread.c
@@ -18,7 +18,6 @@
18#include <linux/kernel_stat.h> 18#include <linux/kernel_stat.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/mc146818rtc.h> 20#include <linux/mc146818rtc.h>
21#include <linux/smp_lock.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/bootmem.h> 22#include <linux/bootmem.h>
24#include <linux/kmod.h> 23#include <linux/kmod.h>
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index f534c29e80b2..29d7d61543a1 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -14,20 +14,20 @@
14#include <linux/mman.h> 14#include <linux/mman.h>
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <linux/smp.h> 16#include <linux/smp.h>
17#include <linux/smp_lock.h>
18#include <linux/interrupt.h> 17#include <linux/interrupt.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/tty.h> 19#include <linux/tty.h>
21#include <linux/vt_kern.h> /* For unblank_screen() */ 20#include <linux/vt_kern.h> /* For unblank_screen() */
22#include <linux/highmem.h> 21#include <linux/highmem.h>
23#include <linux/bootmem.h> /* for max_low_pfn */ 22#include <linux/bootmem.h> /* for max_low_pfn */
23#include <linux/vmalloc.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/kprobes.h> 25#include <linux/kprobes.h>
26#include <linux/uaccess.h> 26#include <linux/uaccess.h>
27#include <linux/kdebug.h>
27 28
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/desc.h> 30#include <asm/desc.h>
30#include <asm/kdebug.h>
31#include <asm/segment.h> 31#include <asm/segment.h>
32 32
33extern void die(const char *,struct pt_regs *,long); 33extern void die(const char *,struct pt_regs *,long);
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
index 6272a4fd9e7c..efdf95ac8031 100644
--- a/arch/i386/mm/hugetlbpage.c
+++ b/arch/i386/mm/hugetlbpage.c
@@ -9,7 +9,6 @@
9#include <linux/mm.h> 9#include <linux/mm.h>
10#include <linux/hugetlb.h> 10#include <linux/hugetlb.h>
11#include <linux/pagemap.h> 11#include <linux/pagemap.h>
12#include <linux/smp_lock.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/err.h> 13#include <linux/err.h>
15#include <linux/sysctl.h> 14#include <linux/sysctl.h>
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index 1a7197e89eb4..c50782efa5c3 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -751,12 +751,9 @@ void __init pgtable_cache_init(void)
751 pmd_cache = kmem_cache_create("pmd", 751 pmd_cache = kmem_cache_create("pmd",
752 PTRS_PER_PMD*sizeof(pmd_t), 752 PTRS_PER_PMD*sizeof(pmd_t),
753 PTRS_PER_PMD*sizeof(pmd_t), 753 PTRS_PER_PMD*sizeof(pmd_t),
754 0, 754 SLAB_PANIC,
755 pmd_ctor, 755 pmd_ctor,
756 NULL); 756 NULL);
757 if (!pmd_cache)
758 panic("pgtable_cache_init(): cannot create pmd cache");
759
760 if (!SHARED_KERNEL_PMD) { 757 if (!SHARED_KERNEL_PMD) {
761 /* If we're in PAE mode and have a non-shared 758 /* If we're in PAE mode and have a non-shared
762 kernel pmd, then the pgd size must be a 759 kernel pmd, then the pgd size must be a
@@ -770,11 +767,9 @@ void __init pgtable_cache_init(void)
770 pgd_cache = kmem_cache_create("pgd", 767 pgd_cache = kmem_cache_create("pgd",
771 pgd_size, 768 pgd_size,
772 pgd_size, 769 pgd_size,
773 0, 770 SLAB_PANIC,
774 pgd_ctor, 771 pgd_ctor,
775 (!SHARED_KERNEL_PMD) ? pgd_dtor : NULL); 772 (!SHARED_KERNEL_PMD) ? pgd_dtor : NULL);
776 if (!pgd_cache)
777 panic("pgtable_cache_init(): Cannot create pgd cache");
778} 773}
779 774
780/* 775/*
diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c
index 695f737516ae..8e185208dfd4 100644
--- a/arch/i386/oprofile/nmi_int.c
+++ b/arch/i386/oprofile/nmi_int.c
@@ -14,10 +14,10 @@
14#include <linux/sysdev.h> 14#include <linux/sysdev.h>
15#include <linux/slab.h> 15#include <linux/slab.h>
16#include <linux/moduleparam.h> 16#include <linux/moduleparam.h>
17#include <linux/kdebug.h>
17#include <asm/nmi.h> 18#include <asm/nmi.h>
18#include <asm/msr.h> 19#include <asm/msr.h>
19#include <asm/apic.h> 20#include <asm/apic.h>
20#include <asm/kdebug.h>
21 21
22#include "op_counter.h" 22#include "op_counter.h"
23#include "op_x86_model.h" 23#include "op_x86_model.h"
diff --git a/arch/i386/oprofile/nmi_timer_int.c b/arch/i386/oprofile/nmi_timer_int.c
index abf0ba52a635..1418e36ae7ab 100644
--- a/arch/i386/oprofile/nmi_timer_int.c
+++ b/arch/i386/oprofile/nmi_timer_int.c
@@ -12,12 +12,11 @@
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/oprofile.h> 13#include <linux/oprofile.h>
14#include <linux/rcupdate.h> 14#include <linux/rcupdate.h>
15 15#include <linux/kdebug.h>
16 16
17#include <asm/nmi.h> 17#include <asm/nmi.h>
18#include <asm/apic.h> 18#include <asm/apic.h>
19#include <asm/ptrace.h> 19#include <asm/ptrace.h>
20#include <asm/kdebug.h>
21 20
22static int profile_timer_exceptions_notify(struct notifier_block *self, 21static int profile_timer_exceptions_notify(struct notifier_block *self,
23 unsigned long val, void *data) 22 unsigned long val, void *data)