aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 16:01:09 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 16:01:09 -0500
commit3ccabd6d9d9b0da5780e0386b4bf7c5f07669e37 (patch)
treea9159e4621186178e577a3899f57dece27b986f6
parent5289d3005a36c305a71e6c9187cddf990bdcfc8b (diff)
parent782bf20c2a1795f35dcd526aa8005cd1870745da (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: Remove unused IOMMU_STRESS Kconfig x86/extable: Mark exception handler functions visible x86/timer: Don't inline __const_udelay x86/headers: Remove duplicate #includes
-rw-r--r--arch/x86/Kconfig.debug8
-rw-r--r--arch/x86/kernel/itmt.c1
-rw-r--r--arch/x86/kernel/process.c1
-rw-r--r--arch/x86/kernel/setup.c1
-rw-r--r--arch/x86/kernel/smpboot.c1
-rw-r--r--arch/x86/lib/delay.c2
-rw-r--r--arch/x86/mm/extable.c34
-rw-r--r--arch/x86/platform/efi/efi_64.c1
-rw-r--r--arch/x86/xen/spinlock.c2
9 files changed, 18 insertions, 33 deletions
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index 672441c008c7..192e4d2f9efc 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -169,14 +169,6 @@ config IOMMU_DEBUG
169 options. See Documentation/x86/x86_64/boot-options.txt for more 169 options. See Documentation/x86/x86_64/boot-options.txt for more
170 details. 170 details.
171 171
172config IOMMU_STRESS
173 bool "Enable IOMMU stress-test mode"
174 ---help---
175 This option disables various optimizations in IOMMU related
176 code to do real stress testing of the IOMMU code. This option
177 will cause a performance drop and should only be enabled for
178 testing.
179
180config IOMMU_LEAK 172config IOMMU_LEAK
181 bool "IOMMU leak tracing" 173 bool "IOMMU leak tracing"
182 depends on IOMMU_DEBUG && DMA_API_DEBUG 174 depends on IOMMU_DEBUG && DMA_API_DEBUG
diff --git a/arch/x86/kernel/itmt.c b/arch/x86/kernel/itmt.c
index f73f475d0573..d177940aa090 100644
--- a/arch/x86/kernel/itmt.c
+++ b/arch/x86/kernel/itmt.c
@@ -24,7 +24,6 @@
24#include <linux/cpumask.h> 24#include <linux/cpumask.h>
25#include <linux/cpuset.h> 25#include <linux/cpuset.h>
26#include <linux/mutex.h> 26#include <linux/mutex.h>
27#include <linux/sched.h>
28#include <linux/sysctl.h> 27#include <linux/sysctl.h>
29#include <linux/nodemask.h> 28#include <linux/nodemask.h>
30 29
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index cb368c2a22ab..03408b942adb 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -21,7 +21,6 @@
21#include <linux/dmi.h> 21#include <linux/dmi.h>
22#include <linux/utsname.h> 22#include <linux/utsname.h>
23#include <linux/stackprotector.h> 23#include <linux/stackprotector.h>
24#include <linux/tick.h>
25#include <linux/cpuidle.h> 24#include <linux/cpuidle.h>
26#include <trace/events/power.h> 25#include <trace/events/power.h>
27#include <linux/hw_breakpoint.h> 26#include <linux/hw_breakpoint.h>
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 68d7ab81c62f..1ae67e982af7 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -114,7 +114,6 @@
114#include <asm/alternative.h> 114#include <asm/alternative.h>
115#include <asm/prom.h> 115#include <asm/prom.h>
116#include <asm/microcode.h> 116#include <asm/microcode.h>
117#include <asm/mmu_context.h>
118#include <asm/kaslr.h> 117#include <asm/kaslr.h>
119#include <asm/unwind.h> 118#include <asm/unwind.h>
120 119
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 9adcae1b135c..6f27facbaa9b 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -75,7 +75,6 @@
75#include <asm/uv/uv.h> 75#include <asm/uv/uv.h>
76#include <linux/mc146818rtc.h> 76#include <linux/mc146818rtc.h>
77#include <asm/i8259.h> 77#include <asm/i8259.h>
78#include <asm/realmode.h>
79#include <asm/misc.h> 78#include <asm/misc.h>
80#include <asm/qspinlock.h> 79#include <asm/qspinlock.h>
81 80
diff --git a/arch/x86/lib/delay.c b/arch/x86/lib/delay.c
index 4846eff7e4c8..f5b7f1b3b6d7 100644
--- a/arch/x86/lib/delay.c
+++ b/arch/x86/lib/delay.c
@@ -162,7 +162,7 @@ void __delay(unsigned long loops)
162} 162}
163EXPORT_SYMBOL(__delay); 163EXPORT_SYMBOL(__delay);
164 164
165inline void __const_udelay(unsigned long xloops) 165void __const_udelay(unsigned long xloops)
166{ 166{
167 unsigned long lpj = this_cpu_read(cpu_info.loops_per_jiffy) ? : loops_per_jiffy; 167 unsigned long lpj = this_cpu_read(cpu_info.loops_per_jiffy) ? : loops_per_jiffy;
168 int d0; 168 int d0;
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c
index 9fe656c42aa5..45f5d6cf65ae 100644
--- a/arch/x86/mm/extable.c
+++ b/arch/x86/mm/extable.c
@@ -21,16 +21,16 @@ ex_fixup_handler(const struct exception_table_entry *x)
21 return (ex_handler_t)((unsigned long)&x->handler + x->handler); 21 return (ex_handler_t)((unsigned long)&x->handler + x->handler);
22} 22}
23 23
24bool ex_handler_default(const struct exception_table_entry *fixup, 24__visible bool ex_handler_default(const struct exception_table_entry *fixup,
25 struct pt_regs *regs, int trapnr) 25 struct pt_regs *regs, int trapnr)
26{ 26{
27 regs->ip = ex_fixup_addr(fixup); 27 regs->ip = ex_fixup_addr(fixup);
28 return true; 28 return true;
29} 29}
30EXPORT_SYMBOL(ex_handler_default); 30EXPORT_SYMBOL(ex_handler_default);
31 31
32bool ex_handler_fault(const struct exception_table_entry *fixup, 32__visible bool ex_handler_fault(const struct exception_table_entry *fixup,
33 struct pt_regs *regs, int trapnr) 33 struct pt_regs *regs, int trapnr)
34{ 34{
35 regs->ip = ex_fixup_addr(fixup); 35 regs->ip = ex_fixup_addr(fixup);
36 regs->ax = trapnr; 36 regs->ax = trapnr;
@@ -42,8 +42,8 @@ EXPORT_SYMBOL_GPL(ex_handler_fault);
42 * Handler for UD0 exception following a failed test against the 42 * Handler for UD0 exception following a failed test against the
43 * result of a refcount inc/dec/add/sub. 43 * result of a refcount inc/dec/add/sub.
44 */ 44 */
45bool ex_handler_refcount(const struct exception_table_entry *fixup, 45__visible bool ex_handler_refcount(const struct exception_table_entry *fixup,
46 struct pt_regs *regs, int trapnr) 46 struct pt_regs *regs, int trapnr)
47{ 47{
48 /* First unconditionally saturate the refcount. */ 48 /* First unconditionally saturate the refcount. */
49 *(int *)regs->cx = INT_MIN / 2; 49 *(int *)regs->cx = INT_MIN / 2;
@@ -95,8 +95,8 @@ EXPORT_SYMBOL(ex_handler_refcount);
95 * of vulnerability by restoring from the initial state (essentially, zeroing 95 * of vulnerability by restoring from the initial state (essentially, zeroing
96 * out all the FPU registers) if we can't restore from the task's FPU state. 96 * out all the FPU registers) if we can't restore from the task's FPU state.
97 */ 97 */
98bool ex_handler_fprestore(const struct exception_table_entry *fixup, 98__visible bool ex_handler_fprestore(const struct exception_table_entry *fixup,
99 struct pt_regs *regs, int trapnr) 99 struct pt_regs *regs, int trapnr)
100{ 100{
101 regs->ip = ex_fixup_addr(fixup); 101 regs->ip = ex_fixup_addr(fixup);
102 102
@@ -108,8 +108,8 @@ bool ex_handler_fprestore(const struct exception_table_entry *fixup,
108} 108}
109EXPORT_SYMBOL_GPL(ex_handler_fprestore); 109EXPORT_SYMBOL_GPL(ex_handler_fprestore);
110 110
111bool ex_handler_ext(const struct exception_table_entry *fixup, 111__visible bool ex_handler_ext(const struct exception_table_entry *fixup,
112 struct pt_regs *regs, int trapnr) 112 struct pt_regs *regs, int trapnr)
113{ 113{
114 /* Special hack for uaccess_err */ 114 /* Special hack for uaccess_err */
115 current->thread.uaccess_err = 1; 115 current->thread.uaccess_err = 1;
@@ -118,8 +118,8 @@ bool ex_handler_ext(const struct exception_table_entry *fixup,
118} 118}
119EXPORT_SYMBOL(ex_handler_ext); 119EXPORT_SYMBOL(ex_handler_ext);
120 120
121bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup, 121__visible bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup,
122 struct pt_regs *regs, int trapnr) 122 struct pt_regs *regs, int trapnr)
123{ 123{
124 if (pr_warn_once("unchecked MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pF)\n", 124 if (pr_warn_once("unchecked MSR access error: RDMSR from 0x%x at rIP: 0x%lx (%pF)\n",
125 (unsigned int)regs->cx, regs->ip, (void *)regs->ip)) 125 (unsigned int)regs->cx, regs->ip, (void *)regs->ip))
@@ -133,8 +133,8 @@ bool ex_handler_rdmsr_unsafe(const struct exception_table_entry *fixup,
133} 133}
134EXPORT_SYMBOL(ex_handler_rdmsr_unsafe); 134EXPORT_SYMBOL(ex_handler_rdmsr_unsafe);
135 135
136bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup, 136__visible bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup,
137 struct pt_regs *regs, int trapnr) 137 struct pt_regs *regs, int trapnr)
138{ 138{
139 if (pr_warn_once("unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pF)\n", 139 if (pr_warn_once("unchecked MSR access error: WRMSR to 0x%x (tried to write 0x%08x%08x) at rIP: 0x%lx (%pF)\n",
140 (unsigned int)regs->cx, (unsigned int)regs->dx, 140 (unsigned int)regs->cx, (unsigned int)regs->dx,
@@ -147,8 +147,8 @@ bool ex_handler_wrmsr_unsafe(const struct exception_table_entry *fixup,
147} 147}
148EXPORT_SYMBOL(ex_handler_wrmsr_unsafe); 148EXPORT_SYMBOL(ex_handler_wrmsr_unsafe);
149 149
150bool ex_handler_clear_fs(const struct exception_table_entry *fixup, 150__visible bool ex_handler_clear_fs(const struct exception_table_entry *fixup,
151 struct pt_regs *regs, int trapnr) 151 struct pt_regs *regs, int trapnr)
152{ 152{
153 if (static_cpu_has(X86_BUG_NULL_SEG)) 153 if (static_cpu_has(X86_BUG_NULL_SEG))
154 asm volatile ("mov %0, %%fs" : : "rm" (__USER_DS)); 154 asm volatile ("mov %0, %%fs" : : "rm" (__USER_DS));
@@ -157,7 +157,7 @@ bool ex_handler_clear_fs(const struct exception_table_entry *fixup,
157} 157}
158EXPORT_SYMBOL(ex_handler_clear_fs); 158EXPORT_SYMBOL(ex_handler_clear_fs);
159 159
160bool ex_has_fault_handler(unsigned long ip) 160__visible bool ex_has_fault_handler(unsigned long ip)
161{ 161{
162 const struct exception_table_entry *e; 162 const struct exception_table_entry *e;
163 ex_handler_t handler; 163 ex_handler_t handler;
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 2dd15e967c3f..c310a8284358 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -25,7 +25,6 @@
25#include <linux/spinlock.h> 25#include <linux/spinlock.h>
26#include <linux/bootmem.h> 26#include <linux/bootmem.h>
27#include <linux/ioport.h> 27#include <linux/ioport.h>
28#include <linux/init.h>
29#include <linux/mc146818rtc.h> 28#include <linux/mc146818rtc.h>
30#include <linux/efi.h> 29#include <linux/efi.h>
31#include <linux/uaccess.h> 30#include <linux/uaccess.h>
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c
index 02f3445a2b5f..cd97a62394e7 100644
--- a/arch/x86/xen/spinlock.c
+++ b/arch/x86/xen/spinlock.c
@@ -23,8 +23,6 @@ static DEFINE_PER_CPU(int, lock_kicker_irq) = -1;
23static DEFINE_PER_CPU(char *, irq_name); 23static DEFINE_PER_CPU(char *, irq_name);
24static bool xen_pvspin = true; 24static bool xen_pvspin = true;
25 25
26#include <asm/qspinlock.h>
27
28static void xen_qlock_kick(int cpu) 26static void xen_qlock_kick(int cpu)
29{ 27{
30 int irq = per_cpu(lock_kicker_irq, cpu); 28 int irq = per_cpu(lock_kicker_irq, cpu);