aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 20:03:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-26 20:03:51 -0500
commit312a466155108329c458049dc76a21ad56106960 (patch)
treed195001a1d258992820b7d7eaf1c0f7941e9de59
parent6e54df001ac9262e3b78b34b87390fcb54677a0d (diff)
parent4b1bacab61aa252d15dde99cd0440a965bd863e5 (diff)
Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 cleanups from Ingo Molnar: "Misc cleanups" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/kprobes: Remove trampoline_handler() prototype x86/kernel: Fix more -Wmissing-prototypes warnings x86: Fix various typos in comments x86/headers: Fix -Wmissing-prototypes warning x86/process: Avoid unnecessary NULL check in get_wchan() x86/traps: Complete prototype declarations x86/mce: Fix -Wmissing-prototypes warnings x86/gart: Rewrite early_gart_iommu_check() comment
-rw-r--r--arch/x86/crypto/cast5_avx_glue.c2
-rw-r--r--arch/x86/crypto/cast6_avx_glue.c2
-rw-r--r--arch/x86/entry/common.c2
-rw-r--r--arch/x86/entry/vdso/vma.c2
-rw-r--r--arch/x86/events/intel/bts.c2
-rw-r--r--arch/x86/events/intel/core.c2
-rw-r--r--arch/x86/events/intel/ds.c2
-rw-r--r--arch/x86/events/intel/p4.c2
-rw-r--r--arch/x86/include/asm/alternative.h2
-rw-r--r--arch/x86/include/asm/cmpxchg.h2
-rw-r--r--arch/x86/include/asm/crash.h1
-rw-r--r--arch/x86/include/asm/efi.h2
-rw-r--r--arch/x86/include/asm/irq.h7
-rw-r--r--arch/x86/include/asm/irq_work.h1
-rw-r--r--arch/x86/include/asm/kvm_para.h1
-rw-r--r--arch/x86/include/asm/paravirt.h5
-rw-r--r--arch/x86/include/asm/reboot.h1
-rw-r--r--arch/x86/include/asm/setup.h3
-rw-r--r--arch/x86/include/asm/sighandling.h5
-rw-r--r--arch/x86/include/asm/smp.h6
-rw-r--r--arch/x86/include/asm/trace/exceptions.h1
-rw-r--r--arch/x86/include/asm/trace/irq_vectors.h1
-rw-r--r--arch/x86/include/asm/traps.h59
-rw-r--r--arch/x86/include/asm/tsc.h1
-rw-r--r--arch/x86/kernel/acpi/boot.c2
-rw-r--r--arch/x86/kernel/aperture_64.c25
-rw-r--r--arch/x86/kernel/apic/apic.c1
-rw-r--r--arch/x86/kernel/apic/apic_flat_64.c7
-rw-r--r--arch/x86/kernel/apic/vector.c1
-rw-r--r--arch/x86/kernel/apic/x2apic_uv_x.c4
-rw-r--r--arch/x86/kernel/asm-offsets.c3
-rw-r--r--arch/x86/kernel/check.c3
-rw-r--r--arch/x86/kernel/cpu/amd.c1
-rw-r--r--arch/x86/kernel/cpu/aperfmperf.c1
-rw-r--r--arch/x86/kernel/cpu/bugs.c2
-rw-r--r--arch/x86/kernel/cpu/cacheinfo.c1
-rw-r--r--arch/x86/kernel/cpu/mce/amd.c5
-rw-r--r--arch/x86/kernel/cpu/mce/core.c2
-rw-r--r--arch/x86/kernel/cpu/mce/therm_throt.c3
-rw-r--r--arch/x86/kernel/cpu/mce/threshold.c3
-rw-r--r--arch/x86/kernel/cpu/scattered.c3
-rw-r--r--arch/x86/kernel/cpu/topology.c2
-rw-r--r--arch/x86/kernel/crash.c1
-rw-r--r--arch/x86/kernel/crash_dump_64.c2
-rw-r--r--arch/x86/kernel/devicetree.c1
-rw-r--r--arch/x86/kernel/fpu/xstate.c2
-rw-r--r--arch/x86/kernel/jailhouse.c1
-rw-r--r--arch/x86/kernel/kprobes/core.c2
-rw-r--r--arch/x86/kernel/process.c5
-rw-r--r--arch/x86/kernel/process_64.c2
-rw-r--r--arch/x86/kernel/quirks.c1
-rw-r--r--arch/x86/kernel/sysfb_efi.c3
-rw-r--r--arch/x86/kernel/tracepoint.c2
-rw-r--r--arch/x86/kvm/vmx/vmx.c2
-rw-r--r--arch/x86/mm/pageattr.c2
-rw-r--r--arch/x86/platform/ce4100/ce4100.c4
-rw-r--r--arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c2
-rw-r--r--arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c2
-rw-r--r--arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c2
-rw-r--r--arch/x86/platform/intel/iosf_mbi.c2
-rw-r--r--arch/x86/platform/olpc/olpc-xo1-sci.c2
-rw-r--r--arch/x86/platform/uv/uv_nmi.c2
-rw-r--r--arch/x86/xen/setup.c2
-rw-r--r--include/acpi/cppc_acpi.h3
-rw-r--r--include/linux/ftrace.h3
-rw-r--r--include/linux/kexec.h1
-rw-r--r--include/linux/kprobes.h3
-rw-r--r--include/linux/of_fdt.h1
-rw-r--r--include/linux/ptrace.h1
69 files changed, 163 insertions, 76 deletions
diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c
index 41034745d6a2..d1ce49119da8 100644
--- a/arch/x86/crypto/cast5_avx_glue.c
+++ b/arch/x86/crypto/cast5_avx_glue.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Glue Code for the AVX assembler implemention of the Cast5 Cipher 2 * Glue Code for the AVX assembler implementation of the Cast5 Cipher
3 * 3 *
4 * Copyright (C) 2012 Johannes Goetzfried 4 * Copyright (C) 2012 Johannes Goetzfried
5 * <Johannes.Goetzfried@informatik.stud.uni-erlangen.de> 5 * <Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
diff --git a/arch/x86/crypto/cast6_avx_glue.c b/arch/x86/crypto/cast6_avx_glue.c
index 9fb66b5e94b2..18965c39305e 100644
--- a/arch/x86/crypto/cast6_avx_glue.c
+++ b/arch/x86/crypto/cast6_avx_glue.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Glue Code for the AVX assembler implemention of the Cast6 Cipher 2 * Glue Code for the AVX assembler implementation of the Cast6 Cipher
3 * 3 *
4 * Copyright (C) 2012 Johannes Goetzfried 4 * Copyright (C) 2012 Johannes Goetzfried
5 * <Johannes.Goetzfried@informatik.stud.uni-erlangen.de> 5 * <Johannes.Goetzfried@informatik.stud.uni-erlangen.de>
diff --git a/arch/x86/entry/common.c b/arch/x86/entry/common.c
index 3b2490b81918..7bc105f47d21 100644
--- a/arch/x86/entry/common.c
+++ b/arch/x86/entry/common.c
@@ -140,7 +140,7 @@ static void exit_to_usermode_loop(struct pt_regs *regs, u32 cached_flags)
140 /* 140 /*
141 * In order to return to user mode, we need to have IRQs off with 141 * In order to return to user mode, we need to have IRQs off with
142 * none of EXIT_TO_USERMODE_LOOP_FLAGS set. Several of these flags 142 * none of EXIT_TO_USERMODE_LOOP_FLAGS set. Several of these flags
143 * can be set at any time on preemptable kernels if we have IRQs on, 143 * can be set at any time on preemptible kernels if we have IRQs on,
144 * so we need to loop. Disabling preemption wouldn't help: doing the 144 * so we need to loop. Disabling preemption wouldn't help: doing the
145 * work to clear some of the flags can sleep. 145 * work to clear some of the flags can sleep.
146 */ 146 */
diff --git a/arch/x86/entry/vdso/vma.c b/arch/x86/entry/vdso/vma.c
index 7eb878561910..babc4e7a519c 100644
--- a/arch/x86/entry/vdso/vma.c
+++ b/arch/x86/entry/vdso/vma.c
@@ -261,7 +261,7 @@ int map_vdso_once(const struct vdso_image *image, unsigned long addr)
261 * abusing from userspace install_speciall_mapping, which may 261 * abusing from userspace install_speciall_mapping, which may
262 * not do accounting and rlimit right. 262 * not do accounting and rlimit right.
263 * We could search vma near context.vdso, but it's a slowpath, 263 * We could search vma near context.vdso, but it's a slowpath,
264 * so let's explicitely check all VMAs to be completely sure. 264 * so let's explicitly check all VMAs to be completely sure.
265 */ 265 */
266 for (vma = mm->mmap; vma; vma = vma->vm_next) { 266 for (vma = mm->mmap; vma; vma = vma->vm_next) {
267 if (vma_is_special_mapping(vma, &vdso_mapping) || 267 if (vma_is_special_mapping(vma, &vdso_mapping) ||
diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c
index 24ffa1e88cf9..a01ef1b0f883 100644
--- a/arch/x86/events/intel/bts.c
+++ b/arch/x86/events/intel/bts.c
@@ -589,7 +589,7 @@ static __init int bts_init(void)
589 * the AUX buffer. 589 * the AUX buffer.
590 * 590 *
591 * However, since this driver supports per-CPU and per-task inherit 591 * However, since this driver supports per-CPU and per-task inherit
592 * we cannot use the user mapping since it will not be availble 592 * we cannot use the user mapping since it will not be available
593 * if we're not running the owning process. 593 * if we're not running the owning process.
594 * 594 *
595 * With PTI we can't use the kernal map either, because its not 595 * With PTI we can't use the kernal map either, because its not
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index ecc3e34ca955..40e12cfc87f6 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -1930,7 +1930,7 @@ static void intel_pmu_enable_all(int added)
1930 * in sequence on the same PMC or on different PMCs. 1930 * in sequence on the same PMC or on different PMCs.
1931 * 1931 *
1932 * In practise it appears some of these events do in fact count, and 1932 * In practise it appears some of these events do in fact count, and
1933 * we need to programm all 4 events. 1933 * we need to program all 4 events.
1934 */ 1934 */
1935static void intel_pmu_nhm_workaround(void) 1935static void intel_pmu_nhm_workaround(void)
1936{ 1936{
diff --git a/arch/x86/events/intel/ds.c b/arch/x86/events/intel/ds.c
index b7b01d762d32..e9acf1d2e7b2 100644
--- a/arch/x86/events/intel/ds.c
+++ b/arch/x86/events/intel/ds.c
@@ -1199,7 +1199,7 @@ static void setup_pebs_sample_data(struct perf_event *event,
1199 /* 1199 /*
1200 * We must however always use iregs for the unwinder to stay sane; the 1200 * We must however always use iregs for the unwinder to stay sane; the
1201 * record BP,SP,IP can point into thin air when the record is from a 1201 * record BP,SP,IP can point into thin air when the record is from a
1202 * previous PMI context or an (I)RET happend between the record and 1202 * previous PMI context or an (I)RET happened between the record and
1203 * PMI. 1203 * PMI.
1204 */ 1204 */
1205 if (sample_type & PERF_SAMPLE_CALLCHAIN) 1205 if (sample_type & PERF_SAMPLE_CALLCHAIN)
diff --git a/arch/x86/events/intel/p4.c b/arch/x86/events/intel/p4.c
index d32c0eed38ca..dee579efb2b2 100644
--- a/arch/x86/events/intel/p4.c
+++ b/arch/x86/events/intel/p4.c
@@ -1259,7 +1259,7 @@ again:
1259 } 1259 }
1260 /* 1260 /*
1261 * Perf does test runs to see if a whole group can be assigned 1261 * Perf does test runs to see if a whole group can be assigned
1262 * together succesfully. There can be multiple rounds of this. 1262 * together successfully. There can be multiple rounds of this.
1263 * Unfortunately, p4_pmu_swap_config_ts touches the hwc->config 1263 * Unfortunately, p4_pmu_swap_config_ts touches the hwc->config
1264 * bits, such that the next round of group assignments will 1264 * bits, such that the next round of group assignments will
1265 * cause the above p4_should_swap_ts to pass instead of fail. 1265 * cause the above p4_should_swap_ts to pass instead of fail.
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index 4cd6a3b71824..0660e14690c8 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -174,7 +174,7 @@ static inline int alternatives_text_reserved(void *start, void *end)
174/* 174/*
175 * Alternative inline assembly with input. 175 * Alternative inline assembly with input.
176 * 176 *
177 * Pecularities: 177 * Peculiarities:
178 * No memory clobber here. 178 * No memory clobber here.
179 * Argument numbers start with 1. 179 * Argument numbers start with 1.
180 * Best is to use constraints that are fixed size (like (%1) ... "r") 180 * Best is to use constraints that are fixed size (like (%1) ... "r")
diff --git a/arch/x86/include/asm/cmpxchg.h b/arch/x86/include/asm/cmpxchg.h
index bfb85e5844ab..a8bfac131256 100644
--- a/arch/x86/include/asm/cmpxchg.h
+++ b/arch/x86/include/asm/cmpxchg.h
@@ -7,7 +7,7 @@
7#include <asm/alternative.h> /* Provides LOCK_PREFIX */ 7#include <asm/alternative.h> /* Provides LOCK_PREFIX */
8 8
9/* 9/*
10 * Non-existant functions to indicate usage errors at link time 10 * Non-existent functions to indicate usage errors at link time
11 * (or compile-time if the compiler implements __compiletime_error(). 11 * (or compile-time if the compiler implements __compiletime_error().
12 */ 12 */
13extern void __xchg_wrong_size(void) 13extern void __xchg_wrong_size(void)
diff --git a/arch/x86/include/asm/crash.h b/arch/x86/include/asm/crash.h
index a7adb2bfbf0b..0acf5ee45a21 100644
--- a/arch/x86/include/asm/crash.h
+++ b/arch/x86/include/asm/crash.h
@@ -6,5 +6,6 @@ int crash_load_segments(struct kimage *image);
6int crash_copy_backup_region(struct kimage *image); 6int crash_copy_backup_region(struct kimage *image);
7int crash_setup_memmap_entries(struct kimage *image, 7int crash_setup_memmap_entries(struct kimage *image,
8 struct boot_params *params); 8 struct boot_params *params);
9void crash_smp_send_stop(void);
9 10
10#endif /* _ASM_X86_CRASH_H */ 11#endif /* _ASM_X86_CRASH_H */
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index d1e64ac80b9c..42982a6cc6cf 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -19,7 +19,7 @@
19 * This is the main reason why we're doing stable VA mappings for RT 19 * This is the main reason why we're doing stable VA mappings for RT
20 * services. 20 * services.
21 * 21 *
22 * This flag is used in conjuction with a chicken bit called 22 * This flag is used in conjunction with a chicken bit called
23 * "efi=old_map" which can be used as a fallback to the old runtime 23 * "efi=old_map" which can be used as a fallback to the old runtime
24 * services mapping method in case there's some b0rkage with a 24 * services mapping method in case there's some b0rkage with a
25 * particular EFI implementation (haha, it is hard to hold up the 25 * particular EFI implementation (haha, it is hard to hold up the
diff --git a/arch/x86/include/asm/irq.h b/arch/x86/include/asm/irq.h
index 2395bb794c7b..fbb16e6b6c18 100644
--- a/arch/x86/include/asm/irq.h
+++ b/arch/x86/include/asm/irq.h
@@ -30,6 +30,9 @@ extern void fixup_irqs(void);
30 30
31#ifdef CONFIG_HAVE_KVM 31#ifdef CONFIG_HAVE_KVM
32extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void)); 32extern void kvm_set_posted_intr_wakeup_handler(void (*handler)(void));
33extern __visible void smp_kvm_posted_intr_ipi(struct pt_regs *regs);
34extern __visible void smp_kvm_posted_intr_wakeup_ipi(struct pt_regs *regs);
35extern __visible void smp_kvm_posted_intr_nested_ipi(struct pt_regs *regs);
33#endif 36#endif
34 37
35extern void (*x86_platform_ipi_callback)(void); 38extern void (*x86_platform_ipi_callback)(void);
@@ -41,9 +44,13 @@ extern __visible unsigned int do_IRQ(struct pt_regs *regs);
41 44
42extern void init_ISA_irqs(void); 45extern void init_ISA_irqs(void);
43 46
47extern void __init init_IRQ(void);
48
44#ifdef CONFIG_X86_LOCAL_APIC 49#ifdef CONFIG_X86_LOCAL_APIC
45void arch_trigger_cpumask_backtrace(const struct cpumask *mask, 50void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
46 bool exclude_self); 51 bool exclude_self);
52
53extern __visible void smp_x86_platform_ipi(struct pt_regs *regs);
47#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace 54#define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
48#endif 55#endif
49 56
diff --git a/arch/x86/include/asm/irq_work.h b/arch/x86/include/asm/irq_work.h
index 800ffce0db29..80b35e3adf03 100644
--- a/arch/x86/include/asm/irq_work.h
+++ b/arch/x86/include/asm/irq_work.h
@@ -10,6 +10,7 @@ static inline bool arch_irq_work_has_interrupt(void)
10 return boot_cpu_has(X86_FEATURE_APIC); 10 return boot_cpu_has(X86_FEATURE_APIC);
11} 11}
12extern void arch_irq_work_raise(void); 12extern void arch_irq_work_raise(void);
13extern __visible void smp_irq_work_interrupt(struct pt_regs *regs);
13#else 14#else
14static inline bool arch_irq_work_has_interrupt(void) 15static inline bool arch_irq_work_has_interrupt(void)
15{ 16{
diff --git a/arch/x86/include/asm/kvm_para.h b/arch/x86/include/asm/kvm_para.h
index 4c723632c036..5ed3cf1c3934 100644
--- a/arch/x86/include/asm/kvm_para.h
+++ b/arch/x86/include/asm/kvm_para.h
@@ -92,6 +92,7 @@ void kvm_async_pf_task_wait(u32 token, int interrupt_kernel);
92void kvm_async_pf_task_wake(u32 token); 92void kvm_async_pf_task_wake(u32 token);
93u32 kvm_read_and_reset_pf_reason(void); 93u32 kvm_read_and_reset_pf_reason(void);
94extern void kvm_disable_steal_time(void); 94extern void kvm_disable_steal_time(void);
95void do_async_page_fault(struct pt_regs *regs, unsigned long error_code);
95 96
96#ifdef CONFIG_PARAVIRT_SPINLOCKS 97#ifdef CONFIG_PARAVIRT_SPINLOCKS
97void __init kvm_spinlock_init(void); 98void __init kvm_spinlock_init(void);
diff --git a/arch/x86/include/asm/paravirt.h b/arch/x86/include/asm/paravirt.h
index 4bf42f9e4eea..a97f28d914d5 100644
--- a/arch/x86/include/asm/paravirt.h
+++ b/arch/x86/include/asm/paravirt.h
@@ -26,6 +26,11 @@ struct static_key;
26extern struct static_key paravirt_steal_enabled; 26extern struct static_key paravirt_steal_enabled;
27extern struct static_key paravirt_steal_rq_enabled; 27extern struct static_key paravirt_steal_rq_enabled;
28 28
29__visible void __native_queued_spin_unlock(struct qspinlock *lock);
30bool pv_is_native_spin_unlock(void);
31__visible bool __native_vcpu_is_preempted(long cpu);
32bool pv_is_native_vcpu_is_preempted(void);
33
29static inline u64 paravirt_steal_clock(int cpu) 34static inline u64 paravirt_steal_clock(int cpu)
30{ 35{
31 return PVOP_CALL1(u64, time.steal_clock, cpu); 36 return PVOP_CALL1(u64, time.steal_clock, cpu);
diff --git a/arch/x86/include/asm/reboot.h b/arch/x86/include/asm/reboot.h
index a671a1145906..04c17be9b5fd 100644
--- a/arch/x86/include/asm/reboot.h
+++ b/arch/x86/include/asm/reboot.h
@@ -26,6 +26,7 @@ void __noreturn machine_real_restart(unsigned int type);
26#define MRR_APM 1 26#define MRR_APM 1
27 27
28typedef void (*nmi_shootdown_cb)(int, struct pt_regs*); 28typedef void (*nmi_shootdown_cb)(int, struct pt_regs*);
29void nmi_panic_self_stop(struct pt_regs *regs);
29void nmi_shootdown_cpus(nmi_shootdown_cb callback); 30void nmi_shootdown_cpus(nmi_shootdown_cb callback);
30void run_crash_ipi_callback(struct pt_regs *regs); 31void run_crash_ipi_callback(struct pt_regs *regs);
31 32
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index ae13bc974416..ed8ec011a9fd 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -46,6 +46,9 @@ extern unsigned long saved_video_mode;
46 46
47extern void reserve_standard_io_resources(void); 47extern void reserve_standard_io_resources(void);
48extern void i386_reserve_resources(void); 48extern void i386_reserve_resources(void);
49extern unsigned long __startup_64(unsigned long physaddr, struct boot_params *bp);
50extern unsigned long __startup_secondary_64(void);
51extern int early_make_pgtable(unsigned long address);
49 52
50#ifdef CONFIG_X86_INTEL_MID 53#ifdef CONFIG_X86_INTEL_MID
51extern void x86_intel_mid_early_setup(void); 54extern void x86_intel_mid_early_setup(void);
diff --git a/arch/x86/include/asm/sighandling.h b/arch/x86/include/asm/sighandling.h
index bd26834724e5..2fcbd6f33ef7 100644
--- a/arch/x86/include/asm/sighandling.h
+++ b/arch/x86/include/asm/sighandling.h
@@ -17,4 +17,9 @@ void signal_fault(struct pt_regs *regs, void __user *frame, char *where);
17int setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate, 17int setup_sigcontext(struct sigcontext __user *sc, void __user *fpstate,
18 struct pt_regs *regs, unsigned long mask); 18 struct pt_regs *regs, unsigned long mask);
19 19
20
21#ifdef CONFIG_X86_X32_ABI
22asmlinkage long sys32_x32_rt_sigreturn(void);
23#endif
24
20#endif /* _ASM_X86_SIGHANDLING_H */ 25#endif /* _ASM_X86_SIGHANDLING_H */
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 547c4fe50711..2e95b6c1bca3 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -148,6 +148,12 @@ void x86_idle_thread_init(unsigned int cpu, struct task_struct *idle);
148 148
149void smp_store_boot_cpu_info(void); 149void smp_store_boot_cpu_info(void);
150void smp_store_cpu_info(int id); 150void smp_store_cpu_info(int id);
151
152asmlinkage __visible void smp_reboot_interrupt(void);
153__visible void smp_reschedule_interrupt(struct pt_regs *regs);
154__visible void smp_call_function_interrupt(struct pt_regs *regs);
155__visible void smp_call_function_single_interrupt(struct pt_regs *r);
156
151#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) 157#define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
152#define cpu_acpi_id(cpu) per_cpu(x86_cpu_to_acpiid, cpu) 158#define cpu_acpi_id(cpu) per_cpu(x86_cpu_to_acpiid, cpu)
153 159
diff --git a/arch/x86/include/asm/trace/exceptions.h b/arch/x86/include/asm/trace/exceptions.h
index 69615e387973..e0e6d7f21399 100644
--- a/arch/x86/include/asm/trace/exceptions.h
+++ b/arch/x86/include/asm/trace/exceptions.h
@@ -45,6 +45,7 @@ DEFINE_PAGE_FAULT_EVENT(page_fault_user);
45DEFINE_PAGE_FAULT_EVENT(page_fault_kernel); 45DEFINE_PAGE_FAULT_EVENT(page_fault_kernel);
46 46
47#undef TRACE_INCLUDE_PATH 47#undef TRACE_INCLUDE_PATH
48#undef TRACE_INCLUDE_FILE
48#define TRACE_INCLUDE_PATH . 49#define TRACE_INCLUDE_PATH .
49#define TRACE_INCLUDE_FILE exceptions 50#define TRACE_INCLUDE_FILE exceptions
50#endif /* _TRACE_PAGE_FAULT_H */ 51#endif /* _TRACE_PAGE_FAULT_H */
diff --git a/arch/x86/include/asm/trace/irq_vectors.h b/arch/x86/include/asm/trace/irq_vectors.h
index 0af81b590a0c..33b9d0f0aafe 100644
--- a/arch/x86/include/asm/trace/irq_vectors.h
+++ b/arch/x86/include/asm/trace/irq_vectors.h
@@ -389,6 +389,7 @@ TRACE_EVENT(vector_free_moved,
389#endif /* CONFIG_X86_LOCAL_APIC */ 389#endif /* CONFIG_X86_LOCAL_APIC */
390 390
391#undef TRACE_INCLUDE_PATH 391#undef TRACE_INCLUDE_PATH
392#undef TRACE_INCLUDE_FILE
392#define TRACE_INCLUDE_PATH . 393#define TRACE_INCLUDE_PATH .
393#define TRACE_INCLUDE_FILE irq_vectors 394#define TRACE_INCLUDE_FILE irq_vectors
394#endif /* _TRACE_IRQ_VECTORS_H */ 395#endif /* _TRACE_IRQ_VECTORS_H */
diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index 3de69330e6c5..7d6f3f3fad78 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -61,34 +61,38 @@ asmlinkage void xen_machine_check(void);
61asmlinkage void xen_simd_coprocessor_error(void); 61asmlinkage void xen_simd_coprocessor_error(void);
62#endif 62#endif
63 63
64dotraplinkage void do_divide_error(struct pt_regs *, long); 64dotraplinkage void do_divide_error(struct pt_regs *regs, long error_code);
65dotraplinkage void do_debug(struct pt_regs *, long); 65dotraplinkage void do_debug(struct pt_regs *regs, long error_code);
66dotraplinkage void do_nmi(struct pt_regs *, long); 66dotraplinkage void do_nmi(struct pt_regs *regs, long error_code);
67dotraplinkage void do_int3(struct pt_regs *, long); 67dotraplinkage void do_int3(struct pt_regs *regs, long error_code);
68dotraplinkage void do_overflow(struct pt_regs *, long); 68dotraplinkage void do_overflow(struct pt_regs *regs, long error_code);
69dotraplinkage void do_bounds(struct pt_regs *, long); 69dotraplinkage void do_bounds(struct pt_regs *regs, long error_code);
70dotraplinkage void do_invalid_op(struct pt_regs *, long); 70dotraplinkage void do_invalid_op(struct pt_regs *regs, long error_code);
71dotraplinkage void do_device_not_available(struct pt_regs *, long); 71dotraplinkage void do_device_not_available(struct pt_regs *regs, long error_code);
72dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long); 72dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *regs, long error_code);
73dotraplinkage void do_invalid_TSS(struct pt_regs *, long); 73dotraplinkage void do_invalid_TSS(struct pt_regs *regs, long error_code);
74dotraplinkage void do_segment_not_present(struct pt_regs *, long); 74dotraplinkage void do_segment_not_present(struct pt_regs *regs, long error_code);
75dotraplinkage void do_stack_segment(struct pt_regs *, long); 75dotraplinkage void do_stack_segment(struct pt_regs *regs, long error_code);
76#ifdef CONFIG_X86_64 76#ifdef CONFIG_X86_64
77dotraplinkage void do_double_fault(struct pt_regs *, long); 77dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code);
78asmlinkage __visible notrace struct pt_regs *sync_regs(struct pt_regs *eregs);
79asmlinkage __visible notrace
80struct bad_iret_stack *fixup_bad_iret(struct bad_iret_stack *s);
81void __init trap_init(void);
78#endif 82#endif
79dotraplinkage void do_general_protection(struct pt_regs *, long); 83dotraplinkage void do_general_protection(struct pt_regs *regs, long error_code);
80dotraplinkage void do_page_fault(struct pt_regs *, unsigned long); 84dotraplinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code);
81dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long); 85dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *regs, long error_code);
82dotraplinkage void do_coprocessor_error(struct pt_regs *, long); 86dotraplinkage void do_coprocessor_error(struct pt_regs *regs, long error_code);
83dotraplinkage void do_alignment_check(struct pt_regs *, long); 87dotraplinkage void do_alignment_check(struct pt_regs *regs, long error_code);
84#ifdef CONFIG_X86_MCE 88#ifdef CONFIG_X86_MCE
85dotraplinkage void do_machine_check(struct pt_regs *, long); 89dotraplinkage void do_machine_check(struct pt_regs *regs, long error_code);
86#endif 90#endif
87dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long); 91dotraplinkage void do_simd_coprocessor_error(struct pt_regs *regs, long error_code);
88#ifdef CONFIG_X86_32 92#ifdef CONFIG_X86_32
89dotraplinkage void do_iret_error(struct pt_regs *, long); 93dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code);
90#endif 94#endif
91dotraplinkage void do_mce(struct pt_regs *, long); 95dotraplinkage void do_mce(struct pt_regs *regs, long error_code);
92 96
93static inline int get_si_code(unsigned long condition) 97static inline int get_si_code(unsigned long condition)
94{ 98{
@@ -104,11 +108,16 @@ extern int panic_on_unrecovered_nmi;
104 108
105void math_emulate(struct math_emu_info *); 109void math_emulate(struct math_emu_info *);
106#ifndef CONFIG_X86_32 110#ifndef CONFIG_X86_32
107asmlinkage void smp_thermal_interrupt(void); 111asmlinkage void smp_thermal_interrupt(struct pt_regs *regs);
108asmlinkage void smp_threshold_interrupt(void); 112asmlinkage void smp_threshold_interrupt(struct pt_regs *regs);
109asmlinkage void smp_deferred_error_interrupt(void); 113asmlinkage void smp_deferred_error_interrupt(struct pt_regs *regs);
110#endif 114#endif
111 115
116void smp_apic_timer_interrupt(struct pt_regs *regs);
117void smp_spurious_interrupt(struct pt_regs *regs);
118void smp_error_interrupt(struct pt_regs *regs);
119asmlinkage void smp_irq_move_cleanup_interrupt(void);
120
112extern void ist_enter(struct pt_regs *regs); 121extern void ist_enter(struct pt_regs *regs);
113extern void ist_exit(struct pt_regs *regs); 122extern void ist_exit(struct pt_regs *regs);
114extern void ist_begin_non_atomic(struct pt_regs *regs); 123extern void ist_begin_non_atomic(struct pt_regs *regs);
diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h
index eb5bbfeccb66..8a0c25c6bf09 100644
--- a/arch/x86/include/asm/tsc.h
+++ b/arch/x86/include/asm/tsc.h
@@ -35,6 +35,7 @@ extern struct system_counterval_t convert_art_ns_to_tsc(u64 art_ns);
35 35
36extern void tsc_early_init(void); 36extern void tsc_early_init(void);
37extern void tsc_init(void); 37extern void tsc_init(void);
38extern unsigned long calibrate_delay_is_known(void);
38extern void mark_tsc_unstable(char *reason); 39extern void mark_tsc_unstable(char *reason);
39extern int unsynchronized_tsc(void); 40extern int unsynchronized_tsc(void);
40extern int check_tsc_unstable(void); 41extern int check_tsc_unstable(void);
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 06635fbca81c..2624de16cd7a 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -848,7 +848,7 @@ EXPORT_SYMBOL(acpi_unregister_ioapic);
848/** 848/**
849 * acpi_ioapic_registered - Check whether IOAPIC assoicatied with @gsi_base 849 * acpi_ioapic_registered - Check whether IOAPIC assoicatied with @gsi_base
850 * has been registered 850 * has been registered
851 * @handle: ACPI handle of the IOAPIC deivce 851 * @handle: ACPI handle of the IOAPIC device
852 * @gsi_base: GSI base associated with the IOAPIC 852 * @gsi_base: GSI base associated with the IOAPIC
853 * 853 *
854 * Assume caller holds some type of lock to serialize acpi_ioapic_registered() 854 * Assume caller holds some type of lock to serialize acpi_ioapic_registered()
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 2c4d5ece7456..58176b56354e 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -264,18 +264,23 @@ static int __init parse_gart_mem(char *p)
264} 264}
265early_param("gart_fix_e820", parse_gart_mem); 265early_param("gart_fix_e820", parse_gart_mem);
266 266
267/*
268 * With kexec/kdump, if the first kernel doesn't shut down the GART and the
269 * second kernel allocates a different GART region, there might be two
270 * overlapping GART regions present:
271 *
272 * - the first still used by the GART initialized in the first kernel.
273 * - (sub-)set of it used as normal RAM by the second kernel.
274 *
275 * which leads to memory corruptions and a kernel panic eventually.
276 *
277 * This can also happen if the BIOS has forgotten to mark the GART region
278 * as reserved.
279 *
280 * Try to update the e820 map to mark that new region as reserved.
281 */
267void __init early_gart_iommu_check(void) 282void __init early_gart_iommu_check(void)
268{ 283{
269 /*
270 * in case it is enabled before, esp for kexec/kdump,
271 * previous kernel already enable that. memset called
272 * by allocate_aperture/__alloc_bootmem_nopanic cause restart.
273 * or second kernel have different position for GART hole. and new
274 * kernel could use hole as RAM that is still used by GART set by
275 * first kernel
276 * or BIOS forget to put that in reserved.
277 * try to update e820 to make that region as reserved.
278 */
279 u32 agp_aper_order = 0; 284 u32 agp_aper_order = 0;
280 int i, fix, slot, valid_agp = 0; 285 int i, fix, slot, valid_agp = 0;
281 u32 ctl; 286 u32 ctl;
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 32b2b7a41ef5..b7bcdd781651 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -44,6 +44,7 @@
44#include <asm/mpspec.h> 44#include <asm/mpspec.h>
45#include <asm/i8259.h> 45#include <asm/i8259.h>
46#include <asm/proto.h> 46#include <asm/proto.h>
47#include <asm/traps.h>
47#include <asm/apic.h> 48#include <asm/apic.h>
48#include <asm/io_apic.h> 49#include <asm/io_apic.h>
49#include <asm/desc.h> 50#include <asm/desc.h>
diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
index e84c9eb4e5b4..0005c284a5c5 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -8,6 +8,7 @@
8 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and 8 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
9 * James Cleverdon. 9 * James Cleverdon.
10 */ 10 */
11#include <linux/acpi.h>
11#include <linux/errno.h> 12#include <linux/errno.h>
12#include <linux/threads.h> 13#include <linux/threads.h>
13#include <linux/cpumask.h> 14#include <linux/cpumask.h>
@@ -16,13 +17,13 @@
16#include <linux/ctype.h> 17#include <linux/ctype.h>
17#include <linux/hardirq.h> 18#include <linux/hardirq.h>
18#include <linux/export.h> 19#include <linux/export.h>
20
19#include <asm/smp.h> 21#include <asm/smp.h>
20#include <asm/apic.h>
21#include <asm/ipi.h> 22#include <asm/ipi.h>
23#include <asm/apic.h>
24#include <asm/apic_flat_64.h>
22#include <asm/jailhouse_para.h> 25#include <asm/jailhouse_para.h>
23 26
24#include <linux/acpi.h>
25
26static struct apic apic_physflat; 27static struct apic apic_physflat;
27static struct apic apic_flat; 28static struct apic apic_flat;
28 29
diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c
index 652e7ffa9b9d..3173e07d3791 100644
--- a/arch/x86/kernel/apic/vector.c
+++ b/arch/x86/kernel/apic/vector.c
@@ -18,6 +18,7 @@
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <asm/irqdomain.h> 19#include <asm/irqdomain.h>
20#include <asm/hw_irq.h> 20#include <asm/hw_irq.h>
21#include <asm/traps.h>
21#include <asm/apic.h> 22#include <asm/apic.h>
22#include <asm/i8259.h> 23#include <asm/i8259.h>
23#include <asm/desc.h> 24#include <asm/desc.h>
diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c
index 391f358ebb4c..a555da094157 100644
--- a/arch/x86/kernel/apic/x2apic_uv_x.c
+++ b/arch/x86/kernel/apic/x2apic_uv_x.c
@@ -1079,7 +1079,7 @@ late_initcall(uv_init_heartbeat);
1079#endif /* !CONFIG_HOTPLUG_CPU */ 1079#endif /* !CONFIG_HOTPLUG_CPU */
1080 1080
1081/* Direct Legacy VGA I/O traffic to designated IOH */ 1081/* Direct Legacy VGA I/O traffic to designated IOH */
1082int uv_set_vga_state(struct pci_dev *pdev, bool decode, unsigned int command_bits, u32 flags) 1082static int uv_set_vga_state(struct pci_dev *pdev, bool decode, unsigned int command_bits, u32 flags)
1083{ 1083{
1084 int domain, bus, rc; 1084 int domain, bus, rc;
1085 1085
@@ -1148,7 +1148,7 @@ static void get_mn(struct mn *mnp)
1148 mnp->m_shift = mnp->m_val ? 64 - mnp->m_val : 0; 1148 mnp->m_shift = mnp->m_val ? 64 - mnp->m_val : 0;
1149} 1149}
1150 1150
1151void __init uv_init_hub_info(struct uv_hub_info_s *hi) 1151static void __init uv_init_hub_info(struct uv_hub_info_s *hi)
1152{ 1152{
1153 union uvh_node_id_u node_id; 1153 union uvh_node_id_u node_id;
1154 struct mn mn; 1154 struct mn mn;
diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
index 72adf6c335dc..168543d077d7 100644
--- a/arch/x86/kernel/asm-offsets.c
+++ b/arch/x86/kernel/asm-offsets.c
@@ -29,7 +29,8 @@
29# include "asm-offsets_64.c" 29# include "asm-offsets_64.c"
30#endif 30#endif
31 31
32void common(void) { 32static void __used common(void)
33{
33 BLANK(); 34 BLANK();
34 OFFSET(TASK_threadsp, task_struct, thread.sp); 35 OFFSET(TASK_threadsp, task_struct, thread.sp);
35#ifdef CONFIG_STACKPROTECTOR 36#ifdef CONFIG_STACKPROTECTOR
diff --git a/arch/x86/kernel/check.c b/arch/x86/kernel/check.c
index 1979a76bfadd..5136e6818da8 100644
--- a/arch/x86/kernel/check.c
+++ b/arch/x86/kernel/check.c
@@ -9,6 +9,7 @@
9#include <linux/memblock.h> 9#include <linux/memblock.h>
10 10
11#include <asm/proto.h> 11#include <asm/proto.h>
12#include <asm/setup.h>
12 13
13/* 14/*
14 * Some BIOSes seem to corrupt the low 64k of memory during events 15 * Some BIOSes seem to corrupt the low 64k of memory during events
@@ -136,7 +137,7 @@ void __init setup_bios_corruption_check(void)
136} 137}
137 138
138 139
139void check_for_bios_corruption(void) 140static void check_for_bios_corruption(void)
140{ 141{
141 int i; 142 int i;
142 int corruption = 0; 143 int corruption = 0;
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index eeea634bee0a..69f6bbb41be0 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -15,6 +15,7 @@
15#include <asm/smp.h> 15#include <asm/smp.h>
16#include <asm/pci-direct.h> 16#include <asm/pci-direct.h>
17#include <asm/delay.h> 17#include <asm/delay.h>
18#include <asm/debugreg.h>
18 19
19#ifdef CONFIG_X86_64 20#ifdef CONFIG_X86_64
20# include <asm/mmconfig.h> 21# include <asm/mmconfig.h>
diff --git a/arch/x86/kernel/cpu/aperfmperf.c b/arch/x86/kernel/cpu/aperfmperf.c
index 7eba34df54c3..804c49493938 100644
--- a/arch/x86/kernel/cpu/aperfmperf.c
+++ b/arch/x86/kernel/cpu/aperfmperf.c
@@ -12,6 +12,7 @@
12#include <linux/ktime.h> 12#include <linux/ktime.h>
13#include <linux/math64.h> 13#include <linux/math64.h>
14#include <linux/percpu.h> 14#include <linux/percpu.h>
15#include <linux/cpufreq.h>
15#include <linux/smp.h> 16#include <linux/smp.h>
16 17
17#include "cpu.h" 18#include "cpu.h"
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 77bf22546ddd..8654b8b0c848 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -32,6 +32,8 @@
32#include <asm/e820/api.h> 32#include <asm/e820/api.h>
33#include <asm/hypervisor.h> 33#include <asm/hypervisor.h>
34 34
35#include "cpu.h"
36
35static void __init spectre_v2_select_mitigation(void); 37static void __init spectre_v2_select_mitigation(void);
36static void __init ssb_select_mitigation(void); 38static void __init ssb_select_mitigation(void);
37static void __init l1tf_select_mitigation(void); 39static void __init l1tf_select_mitigation(void);
diff --git a/arch/x86/kernel/cpu/cacheinfo.c b/arch/x86/kernel/cpu/cacheinfo.c
index dc1b9342e9c4..c4d1023fb0ab 100644
--- a/arch/x86/kernel/cpu/cacheinfo.c
+++ b/arch/x86/kernel/cpu/cacheinfo.c
@@ -17,6 +17,7 @@
17#include <linux/pci.h> 17#include <linux/pci.h>
18 18
19#include <asm/cpufeature.h> 19#include <asm/cpufeature.h>
20#include <asm/cacheinfo.h>
20#include <asm/amd_nb.h> 21#include <asm/amd_nb.h>
21#include <asm/smp.h> 22#include <asm/smp.h>
22 23
diff --git a/arch/x86/kernel/cpu/mce/amd.c b/arch/x86/kernel/cpu/mce/amd.c
index 4a2fb59a372e..89298c83de53 100644
--- a/arch/x86/kernel/cpu/mce/amd.c
+++ b/arch/x86/kernel/cpu/mce/amd.c
@@ -23,6 +23,7 @@
23#include <linux/string.h> 23#include <linux/string.h>
24 24
25#include <asm/amd_nb.h> 25#include <asm/amd_nb.h>
26#include <asm/traps.h>
26#include <asm/apic.h> 27#include <asm/apic.h>
27#include <asm/mce.h> 28#include <asm/mce.h>
28#include <asm/msr.h> 29#include <asm/msr.h>
@@ -99,7 +100,7 @@ static u32 smca_bank_addrs[MAX_NR_BANKS][NR_BLOCKS] __ro_after_init =
99 [0 ... MAX_NR_BANKS - 1] = { [0 ... NR_BLOCKS - 1] = -1 } 100 [0 ... MAX_NR_BANKS - 1] = { [0 ... NR_BLOCKS - 1] = -1 }
100}; 101};
101 102
102const char *smca_get_name(enum smca_bank_types t) 103static const char *smca_get_name(enum smca_bank_types t)
103{ 104{
104 if (t >= N_SMCA_BANK_TYPES) 105 if (t >= N_SMCA_BANK_TYPES)
105 return NULL; 106 return NULL;
@@ -824,7 +825,7 @@ static void __log_error(unsigned int bank, u64 status, u64 addr, u64 misc)
824 mce_log(&m); 825 mce_log(&m);
825} 826}
826 827
827asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(void) 828asmlinkage __visible void __irq_entry smp_deferred_error_interrupt(struct pt_regs *regs)
828{ 829{
829 entering_irq(); 830 entering_irq();
830 trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR); 831 trace_deferred_error_apic_entry(DEFERRED_ERROR_VECTOR);
diff --git a/arch/x86/kernel/cpu/mce/core.c b/arch/x86/kernel/cpu/mce/core.c
index ad8f62a0c706..672c7225cb1b 100644
--- a/arch/x86/kernel/cpu/mce/core.c
+++ b/arch/x86/kernel/cpu/mce/core.c
@@ -684,7 +684,7 @@ DEFINE_PER_CPU(unsigned, mce_poll_count);
684 * errors here. However this would be quite problematic -- 684 * errors here. However this would be quite problematic --
685 * we would need to reimplement the Monarch handling and 685 * we would need to reimplement the Monarch handling and
686 * it would mess up the exclusion between exception handler 686 * it would mess up the exclusion between exception handler
687 * and poll hander -- * so we skip this for now. 687 * and poll handler -- * so we skip this for now.
688 * These cases should not happen anyways, or only when the CPU 688 * These cases should not happen anyways, or only when the CPU
689 * is already totally * confused. In this case it's likely it will 689 * is already totally * confused. In this case it's likely it will
690 * not fully execute the machine check handler either. 690 * not fully execute the machine check handler either.
diff --git a/arch/x86/kernel/cpu/mce/therm_throt.c b/arch/x86/kernel/cpu/mce/therm_throt.c
index df01ff8513a5..10a3b0599300 100644
--- a/arch/x86/kernel/cpu/mce/therm_throt.c
+++ b/arch/x86/kernel/cpu/mce/therm_throt.c
@@ -25,6 +25,7 @@
25#include <linux/cpu.h> 25#include <linux/cpu.h>
26 26
27#include <asm/processor.h> 27#include <asm/processor.h>
28#include <asm/traps.h>
28#include <asm/apic.h> 29#include <asm/apic.h>
29#include <asm/mce.h> 30#include <asm/mce.h>
30#include <asm/msr.h> 31#include <asm/msr.h>
@@ -392,7 +393,7 @@ static void unexpected_thermal_interrupt(void)
392 393
393static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt; 394static void (*smp_thermal_vector)(void) = unexpected_thermal_interrupt;
394 395
395asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *r) 396asmlinkage __visible void __irq_entry smp_thermal_interrupt(struct pt_regs *regs)
396{ 397{
397 entering_irq(); 398 entering_irq();
398 trace_thermal_apic_entry(THERMAL_APIC_VECTOR); 399 trace_thermal_apic_entry(THERMAL_APIC_VECTOR);
diff --git a/arch/x86/kernel/cpu/mce/threshold.c b/arch/x86/kernel/cpu/mce/threshold.c
index 10586a85c23f..28812cc15300 100644
--- a/arch/x86/kernel/cpu/mce/threshold.c
+++ b/arch/x86/kernel/cpu/mce/threshold.c
@@ -6,6 +6,7 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7 7
8#include <asm/irq_vectors.h> 8#include <asm/irq_vectors.h>
9#include <asm/traps.h>
9#include <asm/apic.h> 10#include <asm/apic.h>
10#include <asm/mce.h> 11#include <asm/mce.h>
11#include <asm/trace/irq_vectors.h> 12#include <asm/trace/irq_vectors.h>
@@ -20,7 +21,7 @@ static void default_threshold_interrupt(void)
20 21
21void (*mce_threshold_vector)(void) = default_threshold_interrupt; 22void (*mce_threshold_vector)(void) = default_threshold_interrupt;
22 23
23asmlinkage __visible void __irq_entry smp_threshold_interrupt(void) 24asmlinkage __visible void __irq_entry smp_threshold_interrupt(struct pt_regs *regs)
24{ 25{
25 entering_irq(); 26 entering_irq();
26 trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR); 27 trace_threshold_apic_entry(THRESHOLD_APIC_VECTOR);
diff --git a/arch/x86/kernel/cpu/scattered.c b/arch/x86/kernel/cpu/scattered.c
index a4d74d616222..0277267239f2 100644
--- a/arch/x86/kernel/cpu/scattered.c
+++ b/arch/x86/kernel/cpu/scattered.c
@@ -5,9 +5,10 @@
5#include <linux/cpu.h> 5#include <linux/cpu.h>
6 6
7#include <asm/pat.h> 7#include <asm/pat.h>
8#include <asm/apic.h>
8#include <asm/processor.h> 9#include <asm/processor.h>
9 10
10#include <asm/apic.h> 11#include "cpu.h"
11 12
12struct cpuid_bit { 13struct cpuid_bit {
13 u16 feature; 14 u16 feature;
diff --git a/arch/x86/kernel/cpu/topology.c b/arch/x86/kernel/cpu/topology.c
index 71ca064e3794..8f6c784141d1 100644
--- a/arch/x86/kernel/cpu/topology.c
+++ b/arch/x86/kernel/cpu/topology.c
@@ -10,6 +10,8 @@
10#include <asm/pat.h> 10#include <asm/pat.h>
11#include <asm/processor.h> 11#include <asm/processor.h>
12 12
13#include "cpu.h"
14
13/* leaf 0xb SMT level */ 15/* leaf 0xb SMT level */
14#define SMT_LEVEL 0 16#define SMT_LEVEL 0
15 17
diff --git a/arch/x86/kernel/crash.c b/arch/x86/kernel/crash.c
index f631a3f15587..c8b07d8ea5a2 100644
--- a/arch/x86/kernel/crash.c
+++ b/arch/x86/kernel/crash.c
@@ -37,6 +37,7 @@
37#include <asm/reboot.h> 37#include <asm/reboot.h>
38#include <asm/virtext.h> 38#include <asm/virtext.h>
39#include <asm/intel_pt.h> 39#include <asm/intel_pt.h>
40#include <asm/crash.h>
40 41
41/* Used while preparing memory map entries for second kernel */ 42/* Used while preparing memory map entries for second kernel */
42struct crash_memmap_data { 43struct crash_memmap_data {
diff --git a/arch/x86/kernel/crash_dump_64.c b/arch/x86/kernel/crash_dump_64.c
index eb8ab3915268..22369dd5de3b 100644
--- a/arch/x86/kernel/crash_dump_64.c
+++ b/arch/x86/kernel/crash_dump_64.c
@@ -62,7 +62,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf, size_t csize,
62 62
63/** 63/**
64 * copy_oldmem_page_encrypted - same as copy_oldmem_page() above but ioremap the 64 * copy_oldmem_page_encrypted - same as copy_oldmem_page() above but ioremap the
65 * memory with the encryption mask set to accomodate kdump on SME-enabled 65 * memory with the encryption mask set to accommodate kdump on SME-enabled
66 * machines. 66 * machines.
67 */ 67 */
68ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize, 68ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize,
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 7299dcbf8e85..8d85e00bb40a 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -23,6 +23,7 @@
23#include <asm/pci_x86.h> 23#include <asm/pci_x86.h>
24#include <asm/setup.h> 24#include <asm/setup.h>
25#include <asm/i8259.h> 25#include <asm/i8259.h>
26#include <asm/prom.h>
26 27
27__initdata u64 initial_dtb; 28__initdata u64 initial_dtb;
28char __initdata cmd_line[COMMAND_LINE_SIZE]; 29char __initdata cmd_line[COMMAND_LINE_SIZE];
diff --git a/arch/x86/kernel/fpu/xstate.c b/arch/x86/kernel/fpu/xstate.c
index 87a57b7642d3..cd3956fc8158 100644
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@ -811,7 +811,7 @@ void fpu__resume_cpu(void)
811 * 811 *
812 * Note: does not work for compacted buffers. 812 * Note: does not work for compacted buffers.
813 */ 813 */
814void *__raw_xsave_addr(struct xregs_state *xsave, int xstate_feature_mask) 814static void *__raw_xsave_addr(struct xregs_state *xsave, int xstate_feature_mask)
815{ 815{
816 int feature_nr = fls64(xstate_feature_mask) - 1; 816 int feature_nr = fls64(xstate_feature_mask) - 1;
817 817
diff --git a/arch/x86/kernel/jailhouse.c b/arch/x86/kernel/jailhouse.c
index 108c48d0d40e..1b2ee55a2dfb 100644
--- a/arch/x86/kernel/jailhouse.c
+++ b/arch/x86/kernel/jailhouse.c
@@ -19,6 +19,7 @@
19#include <asm/pci_x86.h> 19#include <asm/pci_x86.h>
20#include <asm/reboot.h> 20#include <asm/reboot.h>
21#include <asm/setup.h> 21#include <asm/setup.h>
22#include <asm/jailhouse_para.h>
22 23
23static __initdata struct jailhouse_setup_data setup_data; 24static __initdata struct jailhouse_setup_data setup_data;
24static unsigned int precalibrated_tsc_khz; 25static unsigned int precalibrated_tsc_khz;
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index d5f88fe57064..4ba75afba527 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -751,7 +751,7 @@ STACK_FRAME_NON_STANDARD(kretprobe_trampoline);
751/* 751/*
752 * Called from kretprobe_trampoline 752 * Called from kretprobe_trampoline
753 */ 753 */
754__visible __used void *trampoline_handler(struct pt_regs *regs) 754static __used void *trampoline_handler(struct pt_regs *regs)
755{ 755{
756 struct kretprobe_instance *ri = NULL; 756 struct kretprobe_instance *ri = NULL;
757 struct hlist_head *head, empty_rp; 757 struct hlist_head *head, empty_rp;
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 7d31192296a8..90ae0ca51083 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -22,6 +22,8 @@
22#include <linux/utsname.h> 22#include <linux/utsname.h>
23#include <linux/stackprotector.h> 23#include <linux/stackprotector.h>
24#include <linux/cpuidle.h> 24#include <linux/cpuidle.h>
25#include <linux/acpi.h>
26#include <linux/elf-randomize.h>
25#include <trace/events/power.h> 27#include <trace/events/power.h>
26#include <linux/hw_breakpoint.h> 28#include <linux/hw_breakpoint.h>
27#include <asm/cpu.h> 29#include <asm/cpu.h>
@@ -39,6 +41,7 @@
39#include <asm/desc.h> 41#include <asm/desc.h>
40#include <asm/prctl.h> 42#include <asm/prctl.h>
41#include <asm/spec-ctrl.h> 43#include <asm/spec-ctrl.h>
44#include <asm/proto.h>
42 45
43#include "process.h" 46#include "process.h"
44 47
@@ -793,7 +796,7 @@ unsigned long get_wchan(struct task_struct *p)
793 unsigned long start, bottom, top, sp, fp, ip, ret = 0; 796 unsigned long start, bottom, top, sp, fp, ip, ret = 0;
794 int count = 0; 797 int count = 0;
795 798
796 if (!p || p == current || p->state == TASK_RUNNING) 799 if (p == current || p->state == TASK_RUNNING)
797 return 0; 800 return 0;
798 801
799 if (!try_get_task_stack(p)) 802 if (!try_get_task_stack(p))
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 60783b318936..721d02bd2d0d 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -646,7 +646,7 @@ void set_personality_64bit(void)
646 /* TBD: overwrites user setup. Should have two bits. 646 /* TBD: overwrites user setup. Should have two bits.
647 But 64bit processes have always behaved this way, 647 But 64bit processes have always behaved this way,
648 so it's not too bad. The main problem is just that 648 so it's not too bad. The main problem is just that
649 32bit childs are affected again. */ 649 32bit children are affected again. */
650 current->personality &= ~READ_IMPLIES_EXEC; 650 current->personality &= ~READ_IMPLIES_EXEC;
651} 651}
652 652
diff --git a/arch/x86/kernel/quirks.c b/arch/x86/kernel/quirks.c
index 736348ead421..8451f38ad399 100644
--- a/arch/x86/kernel/quirks.c
+++ b/arch/x86/kernel/quirks.c
@@ -7,6 +7,7 @@
7#include <linux/irq.h> 7#include <linux/irq.h>
8 8
9#include <asm/hpet.h> 9#include <asm/hpet.h>
10#include <asm/setup.h>
10 11
11#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI) 12#if defined(CONFIG_X86_IO_APIC) && defined(CONFIG_SMP) && defined(CONFIG_PCI)
12 13
diff --git a/arch/x86/kernel/sysfb_efi.c b/arch/x86/kernel/sysfb_efi.c
index 623965e86b65..fa51723571c8 100644
--- a/arch/x86/kernel/sysfb_efi.c
+++ b/arch/x86/kernel/sysfb_efi.c
@@ -19,12 +19,15 @@
19 19
20#include <linux/dmi.h> 20#include <linux/dmi.h>
21#include <linux/err.h> 21#include <linux/err.h>
22#include <linux/efi.h>
22#include <linux/init.h> 23#include <linux/init.h>
23#include <linux/kernel.h> 24#include <linux/kernel.h>
24#include <linux/mm.h> 25#include <linux/mm.h>
25#include <linux/pci.h> 26#include <linux/pci.h>
26#include <linux/screen_info.h> 27#include <linux/screen_info.h>
27#include <video/vga.h> 28#include <video/vga.h>
29
30#include <asm/efi.h>
28#include <asm/sysfb.h> 31#include <asm/sysfb.h>
29 32
30enum { 33enum {
diff --git a/arch/x86/kernel/tracepoint.c b/arch/x86/kernel/tracepoint.c
index 5bd30c442794..496748ed266a 100644
--- a/arch/x86/kernel/tracepoint.c
+++ b/arch/x86/kernel/tracepoint.c
@@ -10,6 +10,8 @@
10 10
11#include <asm/hw_irq.h> 11#include <asm/hw_irq.h>
12#include <asm/desc.h> 12#include <asm/desc.h>
13#include <asm/trace/exceptions.h>
14#include <asm/trace/irq_vectors.h>
13 15
14DEFINE_STATIC_KEY_FALSE(trace_pagefault_key); 16DEFINE_STATIC_KEY_FALSE(trace_pagefault_key);
15 17
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 41d6f7081ff7..4d39f731bc33 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -2494,7 +2494,7 @@ static __init int alloc_kvm_area(void)
2494 * vmcs->revision_id to KVM_EVMCS_VERSION instead of 2494 * vmcs->revision_id to KVM_EVMCS_VERSION instead of
2495 * revision_id reported by MSR_IA32_VMX_BASIC. 2495 * revision_id reported by MSR_IA32_VMX_BASIC.
2496 * 2496 *
2497 * However, even though not explictly documented by 2497 * However, even though not explicitly documented by
2498 * TLFS, VMXArea passed as VMXON argument should 2498 * TLFS, VMXArea passed as VMXON argument should
2499 * still be marked with revision_id reported by 2499 * still be marked with revision_id reported by
2500 * physical CPU. 2500 * physical CPU.
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 61bc7d1800d7..e44fe1a63f72 100644
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -1712,7 +1712,7 @@ static int change_page_attr_set_clr(unsigned long *addr, int numpages,
1712 } else if (!(in_flag & CPA_PAGES_ARRAY)) { 1712 } else if (!(in_flag & CPA_PAGES_ARRAY)) {
1713 /* 1713 /*
1714 * in_flag of CPA_PAGES_ARRAY implies it is aligned. 1714 * in_flag of CPA_PAGES_ARRAY implies it is aligned.
1715 * No need to cehck in that case 1715 * No need to check in that case
1716 */ 1716 */
1717 if (*addr & ~PAGE_MASK) { 1717 if (*addr & ~PAGE_MASK) {
1718 *addr &= PAGE_MASK; 1718 *addr &= PAGE_MASK;
diff --git a/arch/x86/platform/ce4100/ce4100.c b/arch/x86/platform/ce4100/ce4100.c
index ce4b06733c09..b3233b1835ea 100644
--- a/arch/x86/platform/ce4100/ce4100.c
+++ b/arch/x86/platform/ce4100/ce4100.c
@@ -84,7 +84,7 @@ static void ce4100_mem_serial_out(struct uart_port *p, int offset, int value)
84} 84}
85 85
86static void ce4100_serial_fixup(int port, struct uart_port *up, 86static void ce4100_serial_fixup(int port, struct uart_port *up,
87 u32 *capabilites) 87 u32 *capabilities)
88{ 88{
89#ifdef CONFIG_EARLY_PRINTK 89#ifdef CONFIG_EARLY_PRINTK
90 /* 90 /*
@@ -111,7 +111,7 @@ static void ce4100_serial_fixup(int port, struct uart_port *up,
111 up->serial_in = ce4100_mem_serial_in; 111 up->serial_in = ce4100_mem_serial_in;
112 up->serial_out = ce4100_mem_serial_out; 112 up->serial_out = ce4100_mem_serial_out;
113 113
114 *capabilites |= (1 << 12); 114 *capabilities |= (1 << 12);
115} 115}
116 116
117static __init void sdv_serial_fixup(void) 117static __init void sdv_serial_fixup(void)
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c b/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c
index dbfc5cf2aa93..96f438d4b026 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_bcm43xx.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * platform_bcm43xx.c: bcm43xx platform data initilization file 2 * platform_bcm43xx.c: bcm43xx platform data initialization file
3 * 3 *
4 * (C) Copyright 2016 Intel Corporation 4 * (C) Copyright 2016 Intel Corporation
5 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 5 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c
index 27186ad654c9..7a7fc54c449b 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_mrfld_spidev.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * spidev platform data initilization file 2 * spidev platform data initialization file
3 * 3 *
4 * (C) Copyright 2014, 2016 Intel Corporation 4 * (C) Copyright 2014, 2016 Intel Corporation
5 * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 5 * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
diff --git a/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c b/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
index 429a94192671..8344d5a928c9 100644
--- a/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
+++ b/arch/x86/platform/intel-mid/device_libs/platform_pcal9555a.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * PCAL9555a platform data initilization file 2 * PCAL9555a platform data initialization file
3 * 3 *
4 * Copyright (C) 2016, Intel Corporation 4 * Copyright (C) 2016, Intel Corporation
5 * 5 *
diff --git a/arch/x86/platform/intel/iosf_mbi.c b/arch/x86/platform/intel/iosf_mbi.c
index 2e569d10f2d0..a9f2e888e135 100644
--- a/arch/x86/platform/intel/iosf_mbi.c
+++ b/arch/x86/platform/intel/iosf_mbi.c
@@ -13,7 +13,7 @@
13 * 13 *
14 * 14 *
15 * The IOSF-SB is a fabric bus available on Atom based SOC's that uses a 15 * The IOSF-SB is a fabric bus available on Atom based SOC's that uses a
16 * mailbox interface (MBI) to communicate with mutiple devices. This 16 * mailbox interface (MBI) to communicate with multiple devices. This
17 * driver implements access to this interface for those platforms that can 17 * driver implements access to this interface for those platforms that can
18 * enumerate the device using PCI. 18 * enumerate the device using PCI.
19 */ 19 */
diff --git a/arch/x86/platform/olpc/olpc-xo1-sci.c b/arch/x86/platform/olpc/olpc-xo1-sci.c
index 7fa8b3b53bc0..d9b8a1c1ab0f 100644
--- a/arch/x86/platform/olpc/olpc-xo1-sci.c
+++ b/arch/x86/platform/olpc/olpc-xo1-sci.c
@@ -109,7 +109,7 @@ static void detect_lid_state(void)
109 * the edge detector hookup on the gpio inputs on the geode is 109 * the edge detector hookup on the gpio inputs on the geode is
110 * odd, to say the least. See http://dev.laptop.org/ticket/5703 110 * odd, to say the least. See http://dev.laptop.org/ticket/5703
111 * for details, but in a nutshell: we don't use the edge 111 * for details, but in a nutshell: we don't use the edge
112 * detectors. instead, we make use of an anomoly: with the both 112 * detectors. instead, we make use of an anomaly: with the both
113 * edge detectors turned off, we still get an edge event on a 113 * edge detectors turned off, we still get an edge event on a
114 * positive edge transition. to take advantage of this, we use the 114 * positive edge transition. to take advantage of this, we use the
115 * front-end inverter to ensure that that's the edge we're always 115 * front-end inverter to ensure that that's the edge we're always
diff --git a/arch/x86/platform/uv/uv_nmi.c b/arch/x86/platform/uv/uv_nmi.c
index 5f64f30873e2..b21a932c220c 100644
--- a/arch/x86/platform/uv/uv_nmi.c
+++ b/arch/x86/platform/uv/uv_nmi.c
@@ -560,7 +560,7 @@ static inline void uv_clear_nmi(int cpu)
560 } 560 }
561} 561}
562 562
563/* Ping non-responding CPU's attemping to force them into the NMI handler */ 563/* Ping non-responding CPU's attempting to force them into the NMI handler */
564static void uv_nmi_nr_cpus_ping(void) 564static void uv_nmi_nr_cpus_ping(void)
565{ 565{
566 int cpu; 566 int cpu;
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index 075ed47993bb..d5f303c0e656 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -493,7 +493,7 @@ static unsigned long __init xen_foreach_remap_area(unsigned long nr_pages,
493 * The remap information (which mfn remap to which pfn) is contained in the 493 * The remap information (which mfn remap to which pfn) is contained in the
494 * to be remapped memory itself in a linked list anchored at xen_remap_mfn. 494 * to be remapped memory itself in a linked list anchored at xen_remap_mfn.
495 * This scheme allows to remap the different chunks in arbitrary order while 495 * This scheme allows to remap the different chunks in arbitrary order while
496 * the resulting mapping will be independant from the order. 496 * the resulting mapping will be independent from the order.
497 */ 497 */
498void __init xen_remap_memory(void) 498void __init xen_remap_memory(void)
499{ 499{
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h
index cf59e6210d27..4f34734e7f36 100644
--- a/include/acpi/cppc_acpi.h
+++ b/include/acpi/cppc_acpi.h
@@ -142,5 +142,8 @@ extern int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls);
142extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps); 142extern int cppc_get_perf_caps(int cpu, struct cppc_perf_caps *caps);
143extern int acpi_get_psd_map(struct cppc_cpudata **); 143extern int acpi_get_psd_map(struct cppc_cpudata **);
144extern unsigned int cppc_get_transition_latency(int cpu); 144extern unsigned int cppc_get_transition_latency(int cpu);
145extern bool cpc_ffh_supported(void);
146extern int cpc_read_ffh(int cpunum, struct cpc_reg *reg, u64 *val);
147extern int cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val);
145 148
146#endif /* _CPPC_ACPI_H*/ 149#endif /* _CPPC_ACPI_H*/
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index dd16e8218db3..5c990e891d6a 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -420,6 +420,9 @@ enum {
420}; 420};
421 421
422void arch_ftrace_update_code(int command); 422void arch_ftrace_update_code(int command);
423void arch_ftrace_update_trampoline(struct ftrace_ops *ops);
424void *arch_ftrace_trampoline_func(struct ftrace_ops *ops, struct dyn_ftrace *rec);
425void arch_ftrace_trampoline_free(struct ftrace_ops *ops);
423 426
424struct ftrace_rec_iter; 427struct ftrace_rec_iter;
425 428
diff --git a/include/linux/kexec.h b/include/linux/kexec.h
index d58d1f2fab10..b9b1bc5f9669 100644
--- a/include/linux/kexec.h
+++ b/include/linux/kexec.h
@@ -183,6 +183,7 @@ int kexec_purgatory_get_set_symbol(struct kimage *image, const char *name,
183 bool get_value); 183 bool get_value);
184void *kexec_purgatory_get_symbol_addr(struct kimage *image, const char *name); 184void *kexec_purgatory_get_symbol_addr(struct kimage *image, const char *name);
185 185
186void * __weak arch_kexec_kernel_image_load(struct kimage *image);
186int __weak arch_kexec_apply_relocations_add(struct purgatory_info *pi, 187int __weak arch_kexec_apply_relocations_add(struct purgatory_info *pi,
187 Elf_Shdr *section, 188 Elf_Shdr *section,
188 const Elf_Shdr *relsec, 189 const Elf_Shdr *relsec,
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 5da8a1de2187..e07e91daaacc 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -382,6 +382,9 @@ int enable_kprobe(struct kprobe *kp);
382 382
383void dump_kprobe(struct kprobe *kp); 383void dump_kprobe(struct kprobe *kp);
384 384
385void *alloc_insn_page(void);
386void free_insn_page(void *page);
387
385#else /* !CONFIG_KPROBES: */ 388#else /* !CONFIG_KPROBES: */
386 389
387static inline int kprobes_built_in(void) 390static inline int kprobes_built_in(void)
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index b9cd9ebdf9b9..a713e5d156d8 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -76,6 +76,7 @@ extern int early_init_dt_scan_memory(unsigned long node, const char *uname,
76extern int early_init_dt_scan_chosen_stdout(void); 76extern int early_init_dt_scan_chosen_stdout(void);
77extern void early_init_fdt_scan_reserved_mem(void); 77extern void early_init_fdt_scan_reserved_mem(void);
78extern void early_init_fdt_reserve_self(void); 78extern void early_init_fdt_reserve_self(void);
79extern void __init early_init_dt_scan_chosen_arch(unsigned long node);
79extern void early_init_dt_add_memory_arch(u64 base, u64 size); 80extern void early_init_dt_add_memory_arch(u64 base, u64 size);
80extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size); 81extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size);
81extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size, 82extern int early_init_dt_reserve_memory_arch(phys_addr_t base, phys_addr_t size,
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h
index de20ede2c5c8..edb9b040c94c 100644
--- a/include/linux/ptrace.h
+++ b/include/linux/ptrace.h
@@ -411,4 +411,5 @@ extern int task_current_syscall(struct task_struct *target, long *callno,
411 unsigned long args[6], unsigned int maxargs, 411 unsigned long args[6], unsigned int maxargs,
412 unsigned long *sp, unsigned long *pc); 412 unsigned long *sp, unsigned long *pc);
413 413
414extern void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact);
414#endif 415#endif