diff options
Diffstat (limited to 'arch/x86/kernel')
55 files changed, 139 insertions, 61 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 0061ea263061..cd40aba6aa95 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
| 32 | #include <linux/dmi.h> | 32 | #include <linux/dmi.h> |
| 33 | #include <linux/irq.h> | 33 | #include <linux/irq.h> |
| 34 | #include <linux/slab.h> | ||
| 34 | #include <linux/bootmem.h> | 35 | #include <linux/bootmem.h> |
| 35 | #include <linux/ioport.h> | 36 | #include <linux/ioport.h> |
| 36 | #include <linux/pci.h> | 37 | #include <linux/pci.h> |
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index 3a4bf35c179b..1a160d5d44d0 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/vmalloc.h> | 8 | #include <linux/vmalloc.h> |
| 9 | #include <linux/memory.h> | 9 | #include <linux/memory.h> |
| 10 | #include <linux/stop_machine.h> | 10 | #include <linux/stop_machine.h> |
| 11 | #include <linux/slab.h> | ||
| 11 | #include <asm/alternative.h> | 12 | #include <asm/alternative.h> |
| 12 | #include <asm/sections.h> | 13 | #include <asm/sections.h> |
| 13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index adb0ba025702..f3dadb571d9b 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
| @@ -18,8 +18,8 @@ | |||
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
| 21 | #include <linux/gfp.h> | ||
| 22 | #include <linux/bitmap.h> | 21 | #include <linux/bitmap.h> |
| 22 | #include <linux/slab.h> | ||
| 23 | #include <linux/debugfs.h> | 23 | #include <linux/debugfs.h> |
| 24 | #include <linux/scatterlist.h> | 24 | #include <linux/scatterlist.h> |
| 25 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 9dc91b431470..42f5350b908f 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
| @@ -19,8 +19,8 @@ | |||
| 19 | 19 | ||
| 20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
| 21 | #include <linux/acpi.h> | 21 | #include <linux/acpi.h> |
| 22 | #include <linux/gfp.h> | ||
| 23 | #include <linux/list.h> | 22 | #include <linux/list.h> |
| 23 | #include <linux/slab.h> | ||
| 24 | #include <linux/sysdev.h> | 24 | #include <linux/sysdev.h> |
| 25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
| 26 | #include <linux/msi.h> | 26 | #include <linux/msi.h> |
diff --git a/arch/x86/kernel/apb_timer.c b/arch/x86/kernel/apb_timer.c index 4b7099526d2c..ff469e470059 100644 --- a/arch/x86/kernel/apb_timer.c +++ b/arch/x86/kernel/apb_timer.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/errno.h> | 33 | #include <linux/errno.h> |
| 34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
| 35 | #include <linux/sysdev.h> | 35 | #include <linux/sysdev.h> |
| 36 | #include <linux/slab.h> | ||
| 36 | #include <linux/pm.h> | 37 | #include <linux/pm.h> |
| 37 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
| 38 | #include <linux/sfi.h> | 39 | #include <linux/sfi.h> |
diff --git a/arch/x86/kernel/apic/es7000_32.c b/arch/x86/kernel/apic/es7000_32.c index dd2b5f264643..03ba1b895f5e 100644 --- a/arch/x86/kernel/apic/es7000_32.c +++ b/arch/x86/kernel/apic/es7000_32.c | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | #include <linux/errno.h> | 42 | #include <linux/errno.h> |
| 43 | #include <linux/acpi.h> | 43 | #include <linux/acpi.h> |
| 44 | #include <linux/init.h> | 44 | #include <linux/init.h> |
| 45 | #include <linux/gfp.h> | ||
| 45 | #include <linux/nmi.h> | 46 | #include <linux/nmi.h> |
| 46 | #include <linux/smp.h> | 47 | #include <linux/smp.h> |
| 47 | #include <linux/io.h> | 48 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 463de9a858ad..127b8718abfb 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/freezer.h> | 36 | #include <linux/freezer.h> |
| 37 | #include <linux/kthread.h> | 37 | #include <linux/kthread.h> |
| 38 | #include <linux/jiffies.h> /* time_after() */ | 38 | #include <linux/jiffies.h> /* time_after() */ |
| 39 | #include <linux/slab.h> | ||
| 39 | #ifdef CONFIG_ACPI | 40 | #ifdef CONFIG_ACPI |
| 40 | #include <acpi/acpi_bus.h> | 41 | #include <acpi/acpi_bus.h> |
| 41 | #endif | 42 | #endif |
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index 8aa65adbd25d..1edaf15c0b8e 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
| 19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| 21 | #include <linux/slab.h> | ||
| 21 | #include <linux/sysdev.h> | 22 | #include <linux/sysdev.h> |
| 22 | #include <linux/sysctl.h> | 23 | #include <linux/sysctl.h> |
| 23 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 49dbeaef2a27..c085d52dbaf2 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/ctype.h> | 17 | #include <linux/ctype.h> |
| 18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 19 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
| 20 | #include <linux/slab.h> | ||
| 20 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
| 21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
| 22 | #include <linux/io.h> | 23 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/bootflag.c b/arch/x86/kernel/bootflag.c index 30f25a75fe28..5de7f4c56971 100644 --- a/arch/x86/kernel/bootflag.c +++ b/arch/x86/kernel/bootflag.c | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #include <linux/kernel.h> | 5 | #include <linux/kernel.h> |
| 6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
| 7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
| 8 | #include <linux/slab.h> | ||
| 9 | #include <linux/spinlock.h> | 8 | #include <linux/spinlock.h> |
| 10 | #include <linux/acpi.h> | 9 | #include <linux/acpi.h> |
| 11 | #include <asm/io.h> | 10 | #include <asm/io.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 1b1920fa7c80..459168083b77 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/cpufreq.h> | 33 | #include <linux/cpufreq.h> |
| 34 | #include <linux/compiler.h> | 34 | #include <linux/compiler.h> |
| 35 | #include <linux/dmi.h> | 35 | #include <linux/dmi.h> |
| 36 | #include <linux/slab.h> | ||
| 36 | #include <trace/events/power.h> | 37 | #include <trace/events/power.h> |
| 37 | 38 | ||
| 38 | #include <linux/acpi.h> | 39 | #include <linux/acpi.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/elanfreq.c b/arch/x86/kernel/cpu/cpufreq/elanfreq.c index 006b278b0d5d..c587db472a75 100644 --- a/arch/x86/kernel/cpu/cpufreq/elanfreq.c +++ b/arch/x86/kernel/cpu/cpufreq/elanfreq.c | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
| 21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
| 22 | 22 | ||
| 23 | #include <linux/slab.h> | ||
| 24 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
| 25 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
| 26 | 25 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c index ac27ec2264d5..16e3483be9e3 100644 --- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c | |||
| @@ -80,6 +80,7 @@ | |||
| 80 | #include <linux/cpufreq.h> | 80 | #include <linux/cpufreq.h> |
| 81 | #include <linux/pci.h> | 81 | #include <linux/pci.h> |
| 82 | #include <linux/errno.h> | 82 | #include <linux/errno.h> |
| 83 | #include <linux/slab.h> | ||
| 83 | 84 | ||
| 84 | #include <asm/processor-cyrix.h> | 85 | #include <asm/processor-cyrix.h> |
| 85 | 86 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/longrun.c b/arch/x86/kernel/cpu/cpufreq/longrun.c index da5f70fcb766..e7b559d74c52 100644 --- a/arch/x86/kernel/cpu/cpufreq/longrun.c +++ b/arch/x86/kernel/cpu/cpufreq/longrun.c | |||
| @@ -9,7 +9,6 @@ | |||
| 9 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
| 10 | #include <linux/module.h> | 10 | #include <linux/module.h> |
| 11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
| 12 | #include <linux/slab.h> | ||
| 13 | #include <linux/cpufreq.h> | 12 | #include <linux/cpufreq.h> |
| 14 | #include <linux/timex.h> | 13 | #include <linux/timex.h> |
| 15 | 14 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index 869615193720..7b8a8ba67b07 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
| @@ -25,7 +25,6 @@ | |||
| 25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 26 | #include <linux/smp.h> | 26 | #include <linux/smp.h> |
| 27 | #include <linux/cpufreq.h> | 27 | #include <linux/cpufreq.h> |
| 28 | #include <linux/slab.h> | ||
| 29 | #include <linux/cpumask.h> | 28 | #include <linux/cpumask.h> |
| 30 | #include <linux/timex.h> | 29 | #include <linux/timex.h> |
| 31 | 30 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index ff36d2979a90..ce7cde713e71 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | |||
| @@ -30,6 +30,7 @@ | |||
| 30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
| 31 | #include <linux/cpufreq.h> | 31 | #include <linux/cpufreq.h> |
| 32 | #include <linux/compiler.h> | 32 | #include <linux/compiler.h> |
| 33 | #include <linux/slab.h> | ||
| 33 | 34 | ||
| 34 | #include <linux/acpi.h> | 35 | #include <linux/acpi.h> |
| 35 | #include <linux/io.h> | 36 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c index cb01dac267d3..b3379d6a5c57 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k6.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k6.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 14 | #include <linux/cpufreq.h> | 14 | #include <linux/cpufreq.h> |
| 15 | #include <linux/ioport.h> | 15 | #include <linux/ioport.h> |
| 16 | #include <linux/slab.h> | ||
| 17 | #include <linux/timex.h> | 16 | #include <linux/timex.h> |
| 18 | #include <linux/io.h> | 17 | #include <linux/io.h> |
| 19 | 18 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index 8d672ef162ce..9b1ff37de46a 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/sched.h> /* current */ | 20 | #include <linux/sched.h> /* current */ |
| 21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
| 22 | #include <linux/compiler.h> | 22 | #include <linux/compiler.h> |
| 23 | #include <linux/gfp.h> | ||
| 23 | 24 | ||
| 24 | #include <asm/msr.h> | 25 | #include <asm/msr.h> |
| 25 | #include <asm/processor.h> | 26 | #include <asm/processor.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c index 2ce8e0b5cc54..561758e95180 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-ich.c | |||
| @@ -23,7 +23,6 @@ | |||
| 23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| 24 | #include <linux/cpufreq.h> | 24 | #include <linux/cpufreq.h> |
| 25 | #include <linux/pci.h> | 25 | #include <linux/pci.h> |
| 26 | #include <linux/slab.h> | ||
| 27 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 28 | 27 | ||
| 29 | #include "speedstep-lib.h" | 28 | #include "speedstep-lib.h" |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c index ad0083abfa23..a94ec6be69fa 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-lib.c | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
| 14 | #include <linux/init.h> | 14 | #include <linux/init.h> |
| 15 | #include <linux/cpufreq.h> | 15 | #include <linux/cpufreq.h> |
| 16 | #include <linux/slab.h> | ||
| 17 | 16 | ||
| 18 | #include <asm/msr.h> | 17 | #include <asm/msr.h> |
| 19 | #include <asm/tsc.h> | 18 | #include <asm/tsc.h> |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c index 04d73c114e49..8abd869baabf 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | |||
| @@ -17,7 +17,6 @@ | |||
| 17 | #include <linux/moduleparam.h> | 17 | #include <linux/moduleparam.h> |
| 18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
| 19 | #include <linux/cpufreq.h> | 19 | #include <linux/cpufreq.h> |
| 20 | #include <linux/slab.h> | ||
| 21 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
| 22 | #include <linux/io.h> | 21 | #include <linux/io.h> |
| 23 | #include <asm/ist.h> | 22 | #include <asm/ist.h> |
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c index 73734baa50f2..e7dbde7bfedb 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-inject.c +++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <linux/kdebug.h> | 22 | #include <linux/kdebug.h> |
| 23 | #include <linux/cpu.h> | 23 | #include <linux/cpu.h> |
| 24 | #include <linux/sched.h> | 24 | #include <linux/sched.h> |
| 25 | #include <linux/gfp.h> | ||
| 25 | #include <asm/mce.h> | 26 | #include <asm/mce.h> |
| 26 | #include <asm/apic.h> | 27 | #include <asm/apic.h> |
| 27 | 28 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 3ab9c886b613..8a6f0afa767e 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/sched.h> | 26 | #include <linux/sched.h> |
| 27 | #include <linux/sysfs.h> | 27 | #include <linux/sysfs.h> |
| 28 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <linux/slab.h> | ||
| 29 | #include <linux/init.h> | 30 | #include <linux/init.h> |
| 30 | #include <linux/kmod.h> | 31 | #include <linux/kmod.h> |
| 31 | #include <linux/poll.h> | 32 | #include <linux/poll.h> |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index cda932ca3ade..224392d8fe8c 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
| 22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
| 23 | #include <linux/sysfs.h> | 23 | #include <linux/sysfs.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 25 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
| 26 | #include <linux/smp.h> | 27 | #include <linux/smp.h> |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel.c b/arch/x86/kernel/cpu/mcheck/mce_intel.c index d15df6e49bf0..62b48e40920a 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | * Author: Andi Kleen | 5 | * Author: Andi Kleen |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/gfp.h> | ||
| 8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| 9 | #include <linux/interrupt.h> | 10 | #include <linux/interrupt.h> |
| 10 | #include <linux/percpu.h> | 11 | #include <linux/percpu.h> |
diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index 9aa5dc76ff4a..fd31a441c61c 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | 6 | ||
| 7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
| 8 | #include <linux/init.h> | 8 | #include <linux/init.h> |
| 9 | #include <linux/slab.h> | ||
| 10 | #include <linux/io.h> | 9 | #include <linux/io.h> |
| 11 | #include <linux/mm.h> | 10 | #include <linux/mm.h> |
| 12 | 11 | ||
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c index e006e56f699c..79289632cb27 100644 --- a/arch/x86/kernel/cpu/mtrr/if.c +++ b/arch/x86/kernel/cpu/mtrr/if.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
| 6 | #include <linux/ctype.h> | 6 | #include <linux/ctype.h> |
| 7 | #include <linux/string.h> | 7 | #include <linux/string.h> |
| 8 | #include <linux/slab.h> | ||
| 8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| 9 | 10 | ||
| 10 | #define LINE_SIZE 80 | 11 | #define LINE_SIZE 80 |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 60398a0d947c..db5bdc8addf8 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
| 22 | #include <linux/sched.h> | 22 | #include <linux/sched.h> |
| 23 | #include <linux/uaccess.h> | 23 | #include <linux/uaccess.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | #include <linux/highmem.h> | 25 | #include <linux/highmem.h> |
| 25 | #include <linux/cpu.h> | 26 | #include <linux/cpu.h> |
| 26 | #include <linux/bitops.h> | 27 | #include <linux/bitops.h> |
| @@ -28,6 +29,7 @@ | |||
| 28 | #include <asm/apic.h> | 29 | #include <asm/apic.h> |
| 29 | #include <asm/stacktrace.h> | 30 | #include <asm/stacktrace.h> |
| 30 | #include <asm/nmi.h> | 31 | #include <asm/nmi.h> |
| 32 | #include <asm/compat.h> | ||
| 31 | 33 | ||
| 32 | static u64 perf_event_mask __read_mostly; | 34 | static u64 perf_event_mask __read_mostly; |
| 33 | 35 | ||
| @@ -158,7 +160,7 @@ struct x86_pmu { | |||
| 158 | struct perf_event *event); | 160 | struct perf_event *event); |
| 159 | struct event_constraint *event_constraints; | 161 | struct event_constraint *event_constraints; |
| 160 | 162 | ||
| 161 | void (*cpu_prepare)(int cpu); | 163 | int (*cpu_prepare)(int cpu); |
| 162 | void (*cpu_starting)(int cpu); | 164 | void (*cpu_starting)(int cpu); |
| 163 | void (*cpu_dying)(int cpu); | 165 | void (*cpu_dying)(int cpu); |
| 164 | void (*cpu_dead)(int cpu); | 166 | void (*cpu_dead)(int cpu); |
| @@ -1333,11 +1335,12 @@ static int __cpuinit | |||
| 1333 | x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) | 1335 | x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) |
| 1334 | { | 1336 | { |
| 1335 | unsigned int cpu = (long)hcpu; | 1337 | unsigned int cpu = (long)hcpu; |
| 1338 | int ret = NOTIFY_OK; | ||
| 1336 | 1339 | ||
| 1337 | switch (action & ~CPU_TASKS_FROZEN) { | 1340 | switch (action & ~CPU_TASKS_FROZEN) { |
| 1338 | case CPU_UP_PREPARE: | 1341 | case CPU_UP_PREPARE: |
| 1339 | if (x86_pmu.cpu_prepare) | 1342 | if (x86_pmu.cpu_prepare) |
| 1340 | x86_pmu.cpu_prepare(cpu); | 1343 | ret = x86_pmu.cpu_prepare(cpu); |
| 1341 | break; | 1344 | break; |
| 1342 | 1345 | ||
| 1343 | case CPU_STARTING: | 1346 | case CPU_STARTING: |
| @@ -1350,6 +1353,7 @@ x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) | |||
| 1350 | x86_pmu.cpu_dying(cpu); | 1353 | x86_pmu.cpu_dying(cpu); |
| 1351 | break; | 1354 | break; |
| 1352 | 1355 | ||
| 1356 | case CPU_UP_CANCELED: | ||
| 1353 | case CPU_DEAD: | 1357 | case CPU_DEAD: |
| 1354 | if (x86_pmu.cpu_dead) | 1358 | if (x86_pmu.cpu_dead) |
| 1355 | x86_pmu.cpu_dead(cpu); | 1359 | x86_pmu.cpu_dead(cpu); |
| @@ -1359,7 +1363,7 @@ x86_pmu_notifier(struct notifier_block *self, unsigned long action, void *hcpu) | |||
| 1359 | break; | 1363 | break; |
| 1360 | } | 1364 | } |
| 1361 | 1365 | ||
| 1362 | return NOTIFY_OK; | 1366 | return ret; |
| 1363 | } | 1367 | } |
| 1364 | 1368 | ||
| 1365 | static void __init pmu_check_apic(void) | 1369 | static void __init pmu_check_apic(void) |
| @@ -1628,14 +1632,42 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n) | |||
| 1628 | return len; | 1632 | return len; |
| 1629 | } | 1633 | } |
| 1630 | 1634 | ||
| 1631 | static int copy_stack_frame(const void __user *fp, struct stack_frame *frame) | 1635 | #ifdef CONFIG_COMPAT |
| 1636 | static inline int | ||
| 1637 | perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) | ||
| 1632 | { | 1638 | { |
| 1633 | unsigned long bytes; | 1639 | /* 32-bit process in 64-bit kernel. */ |
| 1640 | struct stack_frame_ia32 frame; | ||
| 1641 | const void __user *fp; | ||
| 1634 | 1642 | ||
| 1635 | bytes = copy_from_user_nmi(frame, fp, sizeof(*frame)); | 1643 | if (!test_thread_flag(TIF_IA32)) |
| 1644 | return 0; | ||
| 1645 | |||
| 1646 | fp = compat_ptr(regs->bp); | ||
| 1647 | while (entry->nr < PERF_MAX_STACK_DEPTH) { | ||
| 1648 | unsigned long bytes; | ||
| 1649 | frame.next_frame = 0; | ||
| 1650 | frame.return_address = 0; | ||
| 1651 | |||
| 1652 | bytes = copy_from_user_nmi(&frame, fp, sizeof(frame)); | ||
| 1653 | if (bytes != sizeof(frame)) | ||
| 1654 | break; | ||
| 1655 | |||
| 1656 | if (fp < compat_ptr(regs->sp)) | ||
| 1657 | break; | ||
| 1636 | 1658 | ||
| 1637 | return bytes == sizeof(*frame); | 1659 | callchain_store(entry, frame.return_address); |
| 1660 | fp = compat_ptr(frame.next_frame); | ||
| 1661 | } | ||
| 1662 | return 1; | ||
| 1663 | } | ||
| 1664 | #else | ||
| 1665 | static inline int | ||
| 1666 | perf_callchain_user32(struct pt_regs *regs, struct perf_callchain_entry *entry) | ||
| 1667 | { | ||
| 1668 | return 0; | ||
| 1638 | } | 1669 | } |
| 1670 | #endif | ||
| 1639 | 1671 | ||
| 1640 | static void | 1672 | static void |
| 1641 | perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) | 1673 | perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) |
| @@ -1651,11 +1683,16 @@ perf_callchain_user(struct pt_regs *regs, struct perf_callchain_entry *entry) | |||
| 1651 | callchain_store(entry, PERF_CONTEXT_USER); | 1683 | callchain_store(entry, PERF_CONTEXT_USER); |
| 1652 | callchain_store(entry, regs->ip); | 1684 | callchain_store(entry, regs->ip); |
| 1653 | 1685 | ||
| 1686 | if (perf_callchain_user32(regs, entry)) | ||
| 1687 | return; | ||
| 1688 | |||
| 1654 | while (entry->nr < PERF_MAX_STACK_DEPTH) { | 1689 | while (entry->nr < PERF_MAX_STACK_DEPTH) { |
| 1690 | unsigned long bytes; | ||
| 1655 | frame.next_frame = NULL; | 1691 | frame.next_frame = NULL; |
| 1656 | frame.return_address = 0; | 1692 | frame.return_address = 0; |
| 1657 | 1693 | ||
| 1658 | if (!copy_stack_frame(fp, &frame)) | 1694 | bytes = copy_from_user_nmi(&frame, fp, sizeof(frame)); |
| 1695 | if (bytes != sizeof(frame)) | ||
| 1659 | break; | 1696 | break; |
| 1660 | 1697 | ||
| 1661 | if ((unsigned long)fp < regs->sp) | 1698 | if ((unsigned long)fp < regs->sp) |
| @@ -1702,7 +1739,6 @@ struct perf_callchain_entry *perf_callchain(struct pt_regs *regs) | |||
| 1702 | return entry; | 1739 | return entry; |
| 1703 | } | 1740 | } |
| 1704 | 1741 | ||
| 1705 | #ifdef CONFIG_EVENT_TRACING | ||
| 1706 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) | 1742 | void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int skip) |
| 1707 | { | 1743 | { |
| 1708 | regs->ip = ip; | 1744 | regs->ip = ip; |
| @@ -1714,4 +1750,3 @@ void perf_arch_fetch_caller_regs(struct pt_regs *regs, unsigned long ip, int ski | |||
| 1714 | regs->cs = __KERNEL_CS; | 1750 | regs->cs = __KERNEL_CS; |
| 1715 | local_save_flags(regs->flags); | 1751 | local_save_flags(regs->flags); |
| 1716 | } | 1752 | } |
| 1717 | #endif | ||
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index b87e0b6970cb..db6f7d4056e1 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
| @@ -137,6 +137,13 @@ static inline int amd_is_nb_event(struct hw_perf_event *hwc) | |||
| 137 | return (hwc->config & 0xe0) == 0xe0; | 137 | return (hwc->config & 0xe0) == 0xe0; |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | static inline int amd_has_nb(struct cpu_hw_events *cpuc) | ||
| 141 | { | ||
| 142 | struct amd_nb *nb = cpuc->amd_nb; | ||
| 143 | |||
| 144 | return nb && nb->nb_id != -1; | ||
| 145 | } | ||
| 146 | |||
| 140 | static void amd_put_event_constraints(struct cpu_hw_events *cpuc, | 147 | static void amd_put_event_constraints(struct cpu_hw_events *cpuc, |
| 141 | struct perf_event *event) | 148 | struct perf_event *event) |
| 142 | { | 149 | { |
| @@ -147,7 +154,7 @@ static void amd_put_event_constraints(struct cpu_hw_events *cpuc, | |||
| 147 | /* | 154 | /* |
| 148 | * only care about NB events | 155 | * only care about NB events |
| 149 | */ | 156 | */ |
| 150 | if (!(nb && amd_is_nb_event(hwc))) | 157 | if (!(amd_has_nb(cpuc) && amd_is_nb_event(hwc))) |
| 151 | return; | 158 | return; |
| 152 | 159 | ||
| 153 | /* | 160 | /* |
| @@ -214,7 +221,7 @@ amd_get_event_constraints(struct cpu_hw_events *cpuc, struct perf_event *event) | |||
| 214 | /* | 221 | /* |
| 215 | * if not NB event or no NB, then no constraints | 222 | * if not NB event or no NB, then no constraints |
| 216 | */ | 223 | */ |
| 217 | if (!(nb && amd_is_nb_event(hwc))) | 224 | if (!(amd_has_nb(cpuc) && amd_is_nb_event(hwc))) |
| 218 | return &unconstrained; | 225 | return &unconstrained; |
| 219 | 226 | ||
| 220 | /* | 227 | /* |
| @@ -293,51 +300,55 @@ static struct amd_nb *amd_alloc_nb(int cpu, int nb_id) | |||
| 293 | return nb; | 300 | return nb; |
| 294 | } | 301 | } |
| 295 | 302 | ||
| 296 | static void amd_pmu_cpu_online(int cpu) | 303 | static int amd_pmu_cpu_prepare(int cpu) |
| 304 | { | ||
| 305 | struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); | ||
| 306 | |||
| 307 | WARN_ON_ONCE(cpuc->amd_nb); | ||
| 308 | |||
| 309 | if (boot_cpu_data.x86_max_cores < 2) | ||
| 310 | return NOTIFY_OK; | ||
| 311 | |||
| 312 | cpuc->amd_nb = amd_alloc_nb(cpu, -1); | ||
| 313 | if (!cpuc->amd_nb) | ||
| 314 | return NOTIFY_BAD; | ||
| 315 | |||
| 316 | return NOTIFY_OK; | ||
| 317 | } | ||
| 318 | |||
| 319 | static void amd_pmu_cpu_starting(int cpu) | ||
| 297 | { | 320 | { |
| 298 | struct cpu_hw_events *cpu1, *cpu2; | 321 | struct cpu_hw_events *cpuc = &per_cpu(cpu_hw_events, cpu); |
| 299 | struct amd_nb *nb = NULL; | 322 | struct amd_nb *nb; |
| 300 | int i, nb_id; | 323 | int i, nb_id; |
| 301 | 324 | ||
| 302 | if (boot_cpu_data.x86_max_cores < 2) | 325 | if (boot_cpu_data.x86_max_cores < 2) |
| 303 | return; | 326 | return; |
| 304 | 327 | ||
| 305 | /* | ||
| 306 | * function may be called too early in the | ||
| 307 | * boot process, in which case nb_id is bogus | ||
| 308 | */ | ||
| 309 | nb_id = amd_get_nb_id(cpu); | 328 | nb_id = amd_get_nb_id(cpu); |
| 310 | if (nb_id == BAD_APICID) | 329 | WARN_ON_ONCE(nb_id == BAD_APICID); |
| 311 | return; | ||
| 312 | |||
| 313 | cpu1 = &per_cpu(cpu_hw_events, cpu); | ||
| 314 | cpu1->amd_nb = NULL; | ||
| 315 | 330 | ||
| 316 | raw_spin_lock(&amd_nb_lock); | 331 | raw_spin_lock(&amd_nb_lock); |
| 317 | 332 | ||
| 318 | for_each_online_cpu(i) { | 333 | for_each_online_cpu(i) { |
| 319 | cpu2 = &per_cpu(cpu_hw_events, i); | 334 | nb = per_cpu(cpu_hw_events, i).amd_nb; |
| 320 | nb = cpu2->amd_nb; | 335 | if (WARN_ON_ONCE(!nb)) |
| 321 | if (!nb) | ||
| 322 | continue; | 336 | continue; |
| 323 | if (nb->nb_id == nb_id) | ||
| 324 | goto found; | ||
| 325 | } | ||
| 326 | 337 | ||
| 327 | nb = amd_alloc_nb(cpu, nb_id); | 338 | if (nb->nb_id == nb_id) { |
| 328 | if (!nb) { | 339 | kfree(cpuc->amd_nb); |
| 329 | pr_err("perf_events: failed NB allocation for CPU%d\n", cpu); | 340 | cpuc->amd_nb = nb; |
| 330 | raw_spin_unlock(&amd_nb_lock); | 341 | break; |
| 331 | return; | 342 | } |
| 332 | } | 343 | } |
| 333 | found: | 344 | |
| 334 | nb->refcnt++; | 345 | cpuc->amd_nb->nb_id = nb_id; |
| 335 | cpu1->amd_nb = nb; | 346 | cpuc->amd_nb->refcnt++; |
| 336 | 347 | ||
| 337 | raw_spin_unlock(&amd_nb_lock); | 348 | raw_spin_unlock(&amd_nb_lock); |
| 338 | } | 349 | } |
| 339 | 350 | ||
| 340 | static void amd_pmu_cpu_offline(int cpu) | 351 | static void amd_pmu_cpu_dead(int cpu) |
| 341 | { | 352 | { |
| 342 | struct cpu_hw_events *cpuhw; | 353 | struct cpu_hw_events *cpuhw; |
| 343 | 354 | ||
| @@ -349,8 +360,10 @@ static void amd_pmu_cpu_offline(int cpu) | |||
| 349 | raw_spin_lock(&amd_nb_lock); | 360 | raw_spin_lock(&amd_nb_lock); |
| 350 | 361 | ||
| 351 | if (cpuhw->amd_nb) { | 362 | if (cpuhw->amd_nb) { |
| 352 | if (--cpuhw->amd_nb->refcnt == 0) | 363 | struct amd_nb *nb = cpuhw->amd_nb; |
| 353 | kfree(cpuhw->amd_nb); | 364 | |
| 365 | if (nb->nb_id == -1 || --nb->refcnt == 0) | ||
| 366 | kfree(nb); | ||
| 354 | 367 | ||
| 355 | cpuhw->amd_nb = NULL; | 368 | cpuhw->amd_nb = NULL; |
| 356 | } | 369 | } |
| @@ -379,8 +392,9 @@ static __initconst struct x86_pmu amd_pmu = { | |||
| 379 | .get_event_constraints = amd_get_event_constraints, | 392 | .get_event_constraints = amd_get_event_constraints, |
| 380 | .put_event_constraints = amd_put_event_constraints, | 393 | .put_event_constraints = amd_put_event_constraints, |
| 381 | 394 | ||
| 382 | .cpu_prepare = amd_pmu_cpu_online, | 395 | .cpu_prepare = amd_pmu_cpu_prepare, |
| 383 | .cpu_dead = amd_pmu_cpu_offline, | 396 | .cpu_starting = amd_pmu_cpu_starting, |
| 397 | .cpu_dead = amd_pmu_cpu_dead, | ||
| 384 | }; | 398 | }; |
| 385 | 399 | ||
| 386 | static __init int amd_pmu_init(void) | 400 | static __init int amd_pmu_init(void) |
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 83e5e628de73..8b862d5900fe 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/cpu.h> | 40 | #include <linux/cpu.h> |
| 41 | #include <linux/notifier.h> | 41 | #include <linux/notifier.h> |
| 42 | #include <linux/uaccess.h> | 42 | #include <linux/uaccess.h> |
| 43 | #include <linux/gfp.h> | ||
| 43 | 44 | ||
| 44 | #include <asm/processor.h> | 45 | #include <asm/processor.h> |
| 45 | #include <asm/msr.h> | 46 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/crash_dump_32.c b/arch/x86/kernel/crash_dump_32.c index cd97ce18c29d..67414550c3cc 100644 --- a/arch/x86/kernel/crash_dump_32.c +++ b/arch/x86/kernel/crash_dump_32.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | * Copyright (C) IBM Corporation, 2004. All rights reserved | 5 | * Copyright (C) IBM Corporation, 2004. All rights reserved |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/slab.h> | ||
| 8 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
| 9 | #include <linux/highmem.h> | 10 | #include <linux/highmem.h> |
| 10 | #include <linux/crash_dump.h> | 11 | #include <linux/crash_dump.h> |
diff --git a/arch/x86/kernel/dumpstack.h b/arch/x86/kernel/dumpstack.h index 29e5f7c845b2..e39e77168a37 100644 --- a/arch/x86/kernel/dumpstack.h +++ b/arch/x86/kernel/dumpstack.h | |||
| @@ -30,6 +30,11 @@ struct stack_frame { | |||
| 30 | unsigned long return_address; | 30 | unsigned long return_address; |
| 31 | }; | 31 | }; |
| 32 | 32 | ||
| 33 | struct stack_frame_ia32 { | ||
| 34 | u32 next_frame; | ||
| 35 | u32 return_address; | ||
| 36 | }; | ||
| 37 | |||
| 33 | static inline unsigned long rewind_frame_pointer(int n) | 38 | static inline unsigned long rewind_frame_pointer(int n) |
| 34 | { | 39 | { |
| 35 | struct stack_frame *frame; | 40 | struct stack_frame *frame; |
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c index ee4fa1bfcb33..d10a7e7294f4 100644 --- a/arch/x86/kernel/hpet.c +++ b/arch/x86/kernel/hpet.c | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/sysdev.h> | 4 | #include <linux/sysdev.h> |
| 5 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
| 6 | #include <linux/errno.h> | 6 | #include <linux/errno.h> |
| 7 | #include <linux/slab.h> | ||
| 7 | #include <linux/hpet.h> | 8 | #include <linux/hpet.h> |
| 8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| 9 | #include <linux/cpu.h> | 10 | #include <linux/cpu.h> |
diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c index c01a2b846d47..54c31c285488 100644 --- a/arch/x86/kernel/i387.c +++ b/arch/x86/kernel/i387.c | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
| 9 | #include <linux/regset.h> | 9 | #include <linux/regset.h> |
| 10 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
| 11 | #include <linux/slab.h> | ||
| 11 | 12 | ||
| 12 | #include <asm/sigcontext.h> | 13 | #include <asm/sigcontext.h> |
| 13 | #include <asm/processor.h> | 14 | #include <asm/processor.h> |
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c index fb725ee15f55..7c9f02c130f3 100644 --- a/arch/x86/kernel/i8259.c +++ b/arch/x86/kernel/i8259.c | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
| 6 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
| 7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
| 8 | #include <linux/slab.h> | ||
| 9 | #include <linux/random.h> | 8 | #include <linux/random.h> |
| 10 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| 11 | #include <linux/kernel_stat.h> | 10 | #include <linux/kernel_stat.h> |
diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c index f01d390f9c5b..0ed2d300cd46 100644 --- a/arch/x86/kernel/irqinit.c +++ b/arch/x86/kernel/irqinit.c | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #include <linux/ioport.h> | 5 | #include <linux/ioport.h> |
| 6 | #include <linux/interrupt.h> | 6 | #include <linux/interrupt.h> |
| 7 | #include <linux/timex.h> | 7 | #include <linux/timex.h> |
| 8 | #include <linux/slab.h> | ||
| 9 | #include <linux/random.h> | 8 | #include <linux/random.h> |
| 10 | #include <linux/kprobes.h> | 9 | #include <linux/kprobes.h> |
| 11 | #include <linux/init.h> | 10 | #include <linux/init.h> |
diff --git a/arch/x86/kernel/k8.c b/arch/x86/kernel/k8.c index 9b895464dd03..0f7bc20cfcde 100644 --- a/arch/x86/kernel/k8.c +++ b/arch/x86/kernel/k8.c | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | * Shared support code for AMD K8 northbridges and derivates. | 2 | * Shared support code for AMD K8 northbridges and derivates. |
| 3 | * Copyright 2006 Andi Kleen, SUSE Labs. Subject to GPLv2. | 3 | * Copyright 2006 Andi Kleen, SUSE Labs. Subject to GPLv2. |
| 4 | */ | 4 | */ |
| 5 | #include <linux/gfp.h> | ||
| 6 | #include <linux/types.h> | 5 | #include <linux/types.h> |
| 6 | #include <linux/slab.h> | ||
| 7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
| 8 | #include <linux/errno.h> | 8 | #include <linux/errno.h> |
| 9 | #include <linux/module.h> | 9 | #include <linux/module.h> |
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c index e444357375ce..8afd9f321f10 100644 --- a/arch/x86/kernel/kdebugfs.c +++ b/arch/x86/kernel/kdebugfs.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/debugfs.h> | 9 | #include <linux/debugfs.h> |
| 10 | #include <linux/uaccess.h> | 10 | #include <linux/uaccess.h> |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 13 | #include <linux/stat.h> | 14 | #include <linux/stat.h> |
| 14 | #include <linux/io.h> | 15 | #include <linux/io.h> |
diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c index bfba6019d762..b2258ca91003 100644 --- a/arch/x86/kernel/kgdb.c +++ b/arch/x86/kernel/kgdb.c | |||
| @@ -618,8 +618,8 @@ int kgdb_arch_init(void) | |||
| 618 | * portion of kgdb because this operation requires mutexs to | 618 | * portion of kgdb because this operation requires mutexs to |
| 619 | * complete. | 619 | * complete. |
| 620 | */ | 620 | */ |
| 621 | hw_breakpoint_init(&attr); | ||
| 621 | attr.bp_addr = (unsigned long)kgdb_arch_init; | 622 | attr.bp_addr = (unsigned long)kgdb_arch_init; |
| 622 | attr.type = PERF_TYPE_BREAKPOINT; | ||
| 623 | attr.bp_len = HW_BREAKPOINT_LEN_1; | 623 | attr.bp_len = HW_BREAKPOINT_LEN_1; |
| 624 | attr.bp_type = HW_BREAKPOINT_W; | 624 | attr.bp_type = HW_BREAKPOINT_W; |
| 625 | attr.disabled = 1; | 625 | attr.disabled = 1; |
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c index ec6ef60cbd17..ea697263b373 100644 --- a/arch/x86/kernel/ldt.c +++ b/arch/x86/kernel/ldt.c | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | */ | 7 | */ |
| 8 | 8 | ||
| 9 | #include <linux/errno.h> | 9 | #include <linux/errno.h> |
| 10 | #include <linux/gfp.h> | ||
| 10 | #include <linux/sched.h> | 11 | #include <linux/sched.h> |
| 11 | #include <linux/string.h> | 12 | #include <linux/string.h> |
| 12 | #include <linux/mm.h> | 13 | #include <linux/mm.h> |
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 4a8bb82248ae..035c8c529181 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/arch/x86/kernel/machine_kexec_64.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
| 10 | #include <linux/kexec.h> | 10 | #include <linux/kexec.h> |
| 11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
| 12 | #include <linux/gfp.h> | ||
| 12 | #include <linux/reboot.h> | 13 | #include <linux/reboot.h> |
| 13 | #include <linux/numa.h> | 14 | #include <linux/numa.h> |
| 14 | #include <linux/ftrace.h> | 15 | #include <linux/ftrace.h> |
diff --git a/arch/x86/kernel/mca_32.c b/arch/x86/kernel/mca_32.c index 845d80ce1ef1..63eaf6596233 100644 --- a/arch/x86/kernel/mca_32.c +++ b/arch/x86/kernel/mca_32.c | |||
| @@ -42,6 +42,7 @@ | |||
| 42 | #include <linux/kernel.h> | 42 | #include <linux/kernel.h> |
| 43 | #include <linux/mca.h> | 43 | #include <linux/mca.h> |
| 44 | #include <linux/kprobes.h> | 44 | #include <linux/kprobes.h> |
| 45 | #include <linux/slab.h> | ||
| 45 | #include <asm/system.h> | 46 | #include <asm/system.h> |
| 46 | #include <asm/io.h> | 47 | #include <asm/io.h> |
| 47 | #include <linux/proc_fs.h> | 48 | #include <linux/proc_fs.h> |
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c index 89f386f044e4..e0bc186d7501 100644 --- a/arch/x86/kernel/module.c +++ b/arch/x86/kernel/module.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
| 24 | #include <linux/bug.h> | 24 | #include <linux/bug.h> |
| 25 | #include <linux/mm.h> | 25 | #include <linux/mm.h> |
| 26 | #include <linux/gfp.h> | ||
| 26 | 27 | ||
| 27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
| 28 | #include <asm/page.h> | 29 | #include <asm/page.h> |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index 206735ac8cbd..4d4468e9f47c 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include <linux/cpu.h> | 37 | #include <linux/cpu.h> |
| 38 | #include <linux/notifier.h> | 38 | #include <linux/notifier.h> |
| 39 | #include <linux/uaccess.h> | 39 | #include <linux/uaccess.h> |
| 40 | #include <linux/gfp.h> | ||
| 40 | 41 | ||
| 41 | #include <asm/processor.h> | 42 | #include <asm/processor.h> |
| 42 | #include <asm/msr.h> | 43 | #include <asm/msr.h> |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index a4ac764a6880..4b7e3d8b01dd 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #include <linux/dma-debug.h> | 2 | #include <linux/dma-debug.h> |
| 3 | #include <linux/dmar.h> | 3 | #include <linux/dmar.h> |
| 4 | #include <linux/bootmem.h> | 4 | #include <linux/bootmem.h> |
| 5 | #include <linux/gfp.h> | ||
| 5 | #include <linux/pci.h> | 6 | #include <linux/pci.h> |
| 6 | #include <linux/kmemleak.h> | 7 | #include <linux/kmemleak.h> |
| 7 | 8 | ||
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index f3af115a573a..68cd24f9deae 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/iommu-helper.h> | 29 | #include <linux/iommu-helper.h> |
| 30 | #include <linux/sysdev.h> | 30 | #include <linux/sysdev.h> |
| 31 | #include <linux/io.h> | 31 | #include <linux/io.h> |
| 32 | #include <linux/gfp.h> | ||
| 32 | #include <asm/atomic.h> | 33 | #include <asm/atomic.h> |
| 33 | #include <asm/mtrr.h> | 34 | #include <asm/mtrr.h> |
| 34 | #include <asm/pgtable.h> | 35 | #include <asm/pgtable.h> |
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index 22be12b60a8f..3af4af810c07 100644 --- a/arch/x86/kernel/pci-nommu.c +++ b/arch/x86/kernel/pci-nommu.c | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <linux/scatterlist.h> | 4 | #include <linux/scatterlist.h> |
| 5 | #include <linux/string.h> | 5 | #include <linux/string.h> |
| 6 | #include <linux/init.h> | 6 | #include <linux/init.h> |
| 7 | #include <linux/gfp.h> | ||
| 7 | #include <linux/pci.h> | 8 | #include <linux/pci.h> |
| 8 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
| 9 | 10 | ||
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index a503b1fd04e5..2e9b55027b7e 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/mm.h> | 12 | #include <linux/mm.h> |
| 13 | #include <linux/smp.h> | 13 | #include <linux/smp.h> |
| 14 | #include <linux/errno.h> | 14 | #include <linux/errno.h> |
| 15 | #include <linux/slab.h> | ||
| 15 | #include <linux/ptrace.h> | 16 | #include <linux/ptrace.h> |
| 16 | #include <linux/regset.h> | 17 | #include <linux/regset.h> |
| 17 | #include <linux/tracehook.h> | 18 | #include <linux/tracehook.h> |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index d76e18570c60..9570541caf7c 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
| @@ -55,7 +55,6 @@ | |||
| 55 | #include <linux/stddef.h> | 55 | #include <linux/stddef.h> |
| 56 | #include <linux/unistd.h> | 56 | #include <linux/unistd.h> |
| 57 | #include <linux/ptrace.h> | 57 | #include <linux/ptrace.h> |
| 58 | #include <linux/slab.h> | ||
| 59 | #include <linux/user.h> | 58 | #include <linux/user.h> |
| 60 | #include <linux/delay.h> | 59 | #include <linux/delay.h> |
| 61 | 60 | ||
diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c index ec1de97600e7..d801210945d6 100644 --- a/arch/x86/kernel/smp.c +++ b/arch/x86/kernel/smp.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/cache.h> | 21 | #include <linux/cache.h> |
| 22 | #include <linux/interrupt.h> | 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/cpu.h> | 23 | #include <linux/cpu.h> |
| 24 | #include <linux/gfp.h> | ||
| 24 | 25 | ||
| 25 | #include <asm/mtrr.h> | 26 | #include <asm/mtrr.h> |
| 26 | #include <asm/tlbflush.h> | 27 | #include <asm/tlbflush.h> |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 06d98ae5a802..763d815e27a0 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
| @@ -49,6 +49,7 @@ | |||
| 49 | #include <linux/nmi.h> | 49 | #include <linux/nmi.h> |
| 50 | #include <linux/tboot.h> | 50 | #include <linux/tboot.h> |
| 51 | #include <linux/stackprotector.h> | 51 | #include <linux/stackprotector.h> |
| 52 | #include <linux/gfp.h> | ||
| 52 | 53 | ||
| 53 | #include <asm/acpi.h> | 54 | #include <asm/acpi.h> |
| 54 | #include <asm/desc.h> | 55 | #include <asm/desc.h> |
| @@ -242,8 +243,6 @@ static void __cpuinit smp_callin(void) | |||
| 242 | end_local_APIC_setup(); | 243 | end_local_APIC_setup(); |
| 243 | map_cpu_to_logical_apicid(); | 244 | map_cpu_to_logical_apicid(); |
| 244 | 245 | ||
| 245 | notify_cpu_starting(cpuid); | ||
| 246 | |||
| 247 | /* | 246 | /* |
| 248 | * Need to setup vector mappings before we enable interrupts. | 247 | * Need to setup vector mappings before we enable interrupts. |
| 249 | */ | 248 | */ |
| @@ -264,6 +263,8 @@ static void __cpuinit smp_callin(void) | |||
| 264 | */ | 263 | */ |
| 265 | smp_store_cpu_info(cpuid); | 264 | smp_store_cpu_info(cpuid); |
| 266 | 265 | ||
| 266 | notify_cpu_starting(cpuid); | ||
| 267 | |||
| 267 | /* | 268 | /* |
| 268 | * Allow the master to continue. | 269 | * Allow the master to continue. |
| 269 | */ | 270 | */ |
diff --git a/arch/x86/kernel/tlb_uv.c b/arch/x86/kernel/tlb_uv.c index 364d015efebc..17b03dd3a6b5 100644 --- a/arch/x86/kernel/tlb_uv.c +++ b/arch/x86/kernel/tlb_uv.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/seq_file.h> | 9 | #include <linux/seq_file.h> |
| 10 | #include <linux/proc_fs.h> | 10 | #include <linux/proc_fs.h> |
| 11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | 13 | ||
| 13 | #include <asm/mmu_context.h> | 14 | #include <asm/mmu_context.h> |
| 14 | #include <asm/uv/uv.h> | 15 | #include <asm/uv/uv.h> |
diff --git a/arch/x86/kernel/uv_irq.c b/arch/x86/kernel/uv_irq.c index ece73d8e3240..1d40336b030a 100644 --- a/arch/x86/kernel/uv_irq.c +++ b/arch/x86/kernel/uv_irq.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/rbtree.h> | 12 | #include <linux/rbtree.h> |
| 13 | #include <linux/slab.h> | ||
| 13 | #include <linux/irq.h> | 14 | #include <linux/irq.h> |
| 14 | 15 | ||
| 15 | #include <asm/apic.h> | 16 | #include <asm/apic.h> |
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c index 2b75ef638dbc..56e421bc379b 100644 --- a/arch/x86/kernel/uv_time.c +++ b/arch/x86/kernel/uv_time.c | |||
| @@ -19,6 +19,7 @@ | |||
| 19 | * Copyright (c) Dimitri Sivanich | 19 | * Copyright (c) Dimitri Sivanich |
| 20 | */ | 20 | */ |
| 21 | #include <linux/clockchips.h> | 21 | #include <linux/clockchips.h> |
| 22 | #include <linux/slab.h> | ||
| 22 | 23 | ||
| 23 | #include <asm/uv/uv_mmrs.h> | 24 | #include <asm/uv/uv_mmrs.h> |
| 24 | #include <asm/uv/uv_hub.h> | 25 | #include <asm/uv/uv_hub.h> |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index 7dd599deca4a..ce9fbacb7526 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/mm.h> | 28 | #include <linux/mm.h> |
| 29 | #include <linux/highmem.h> | 29 | #include <linux/highmem.h> |
| 30 | #include <linux/sched.h> | 30 | #include <linux/sched.h> |
| 31 | #include <linux/gfp.h> | ||
| 31 | #include <asm/vmi.h> | 32 | #include <asm/vmi.h> |
| 32 | #include <asm/io.h> | 33 | #include <asm/io.h> |
| 33 | #include <asm/fixmap.h> | 34 | #include <asm/fixmap.h> |
