diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-04 15:12:48 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-03-04 15:12:48 -0500 |
| commit | e64b9562ba281dc1dc613408707375cb9c5660e5 (patch) | |
| tree | 46caa9c76d12573273a43df525e81e12845bceef | |
| parent | 7225a442788e20ee108ef2cb97d511375e20acf9 (diff) | |
| parent | 30009746168da0f1f648881f77083c40e226a8a0 (diff) | |
Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"A small set of fixes for x86:
- Add missing instruction suffixes to assembly code so it can be
compiled by newer GAS versions without warnings.
- Switch refcount WARN exceptions to UD2 as we did in general
- Make the reboot on Intel Edison platforms work
- A small documentation update so text and sample command match"
* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Documentation, x86, resctrl: Make text and sample command match
x86/platform/intel-mid: Handle Intel Edison reboot correctly
x86/asm: Add instruction suffixes to bitops
x86/entry/64: Add instruction suffix
x86/refcounts: Switch to UD2 for exceptions
| -rw-r--r-- | Documentation/x86/intel_rdt_ui.txt | 2 | ||||
| -rw-r--r-- | arch/x86/entry/entry_64.S | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/bitops.h | 29 | ||||
| -rw-r--r-- | arch/x86/include/asm/percpu.h | 2 | ||||
| -rw-r--r-- | arch/x86/include/asm/refcount.h | 2 | ||||
| -rw-r--r-- | arch/x86/platform/intel-mid/intel-mid.c | 2 |
6 files changed, 21 insertions, 18 deletions
diff --git a/Documentation/x86/intel_rdt_ui.txt b/Documentation/x86/intel_rdt_ui.txt index 756fd76b78a6..71c30984e94d 100644 --- a/Documentation/x86/intel_rdt_ui.txt +++ b/Documentation/x86/intel_rdt_ui.txt | |||
| @@ -671,7 +671,7 @@ occupancy of the real time threads on these cores. | |||
| 671 | # mkdir p1 | 671 | # mkdir p1 |
| 672 | 672 | ||
| 673 | Move the cpus 4-7 over to p1 | 673 | Move the cpus 4-7 over to p1 |
| 674 | # echo f0 > p0/cpus | 674 | # echo f0 > p1/cpus |
| 675 | 675 | ||
| 676 | View the llc occupancy snapshot | 676 | View the llc occupancy snapshot |
| 677 | 677 | ||
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index d5c7f18f79ac..805f52703ee3 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S | |||
| @@ -55,7 +55,7 @@ END(native_usergs_sysret64) | |||
| 55 | 55 | ||
| 56 | .macro TRACE_IRQS_FLAGS flags:req | 56 | .macro TRACE_IRQS_FLAGS flags:req |
| 57 | #ifdef CONFIG_TRACE_IRQFLAGS | 57 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 58 | bt $9, \flags /* interrupts off? */ | 58 | btl $9, \flags /* interrupts off? */ |
| 59 | jnc 1f | 59 | jnc 1f |
| 60 | TRACE_IRQS_ON | 60 | TRACE_IRQS_ON |
| 61 | 1: | 61 | 1: |
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index 3fa039855b8f..9f645ba57dbb 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h | |||
| @@ -78,7 +78,7 @@ set_bit(long nr, volatile unsigned long *addr) | |||
| 78 | : "iq" ((u8)CONST_MASK(nr)) | 78 | : "iq" ((u8)CONST_MASK(nr)) |
| 79 | : "memory"); | 79 | : "memory"); |
| 80 | } else { | 80 | } else { |
| 81 | asm volatile(LOCK_PREFIX "bts %1,%0" | 81 | asm volatile(LOCK_PREFIX __ASM_SIZE(bts) " %1,%0" |
| 82 | : BITOP_ADDR(addr) : "Ir" (nr) : "memory"); | 82 | : BITOP_ADDR(addr) : "Ir" (nr) : "memory"); |
| 83 | } | 83 | } |
| 84 | } | 84 | } |
| @@ -94,7 +94,7 @@ set_bit(long nr, volatile unsigned long *addr) | |||
| 94 | */ | 94 | */ |
| 95 | static __always_inline void __set_bit(long nr, volatile unsigned long *addr) | 95 | static __always_inline void __set_bit(long nr, volatile unsigned long *addr) |
| 96 | { | 96 | { |
| 97 | asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); | 97 | asm volatile(__ASM_SIZE(bts) " %1,%0" : ADDR : "Ir" (nr) : "memory"); |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | /** | 100 | /** |
| @@ -115,7 +115,7 @@ clear_bit(long nr, volatile unsigned long *addr) | |||
| 115 | : CONST_MASK_ADDR(nr, addr) | 115 | : CONST_MASK_ADDR(nr, addr) |
| 116 | : "iq" ((u8)~CONST_MASK(nr))); | 116 | : "iq" ((u8)~CONST_MASK(nr))); |
| 117 | } else { | 117 | } else { |
| 118 | asm volatile(LOCK_PREFIX "btr %1,%0" | 118 | asm volatile(LOCK_PREFIX __ASM_SIZE(btr) " %1,%0" |
| 119 | : BITOP_ADDR(addr) | 119 | : BITOP_ADDR(addr) |
| 120 | : "Ir" (nr)); | 120 | : "Ir" (nr)); |
| 121 | } | 121 | } |
| @@ -137,7 +137,7 @@ static __always_inline void clear_bit_unlock(long nr, volatile unsigned long *ad | |||
| 137 | 137 | ||
| 138 | static __always_inline void __clear_bit(long nr, volatile unsigned long *addr) | 138 | static __always_inline void __clear_bit(long nr, volatile unsigned long *addr) |
| 139 | { | 139 | { |
| 140 | asm volatile("btr %1,%0" : ADDR : "Ir" (nr)); | 140 | asm volatile(__ASM_SIZE(btr) " %1,%0" : ADDR : "Ir" (nr)); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | static __always_inline bool clear_bit_unlock_is_negative_byte(long nr, volatile unsigned long *addr) | 143 | static __always_inline bool clear_bit_unlock_is_negative_byte(long nr, volatile unsigned long *addr) |
| @@ -182,7 +182,7 @@ static __always_inline void __clear_bit_unlock(long nr, volatile unsigned long * | |||
| 182 | */ | 182 | */ |
| 183 | static __always_inline void __change_bit(long nr, volatile unsigned long *addr) | 183 | static __always_inline void __change_bit(long nr, volatile unsigned long *addr) |
| 184 | { | 184 | { |
| 185 | asm volatile("btc %1,%0" : ADDR : "Ir" (nr)); | 185 | asm volatile(__ASM_SIZE(btc) " %1,%0" : ADDR : "Ir" (nr)); |
| 186 | } | 186 | } |
| 187 | 187 | ||
| 188 | /** | 188 | /** |
| @@ -201,7 +201,7 @@ static __always_inline void change_bit(long nr, volatile unsigned long *addr) | |||
| 201 | : CONST_MASK_ADDR(nr, addr) | 201 | : CONST_MASK_ADDR(nr, addr) |
| 202 | : "iq" ((u8)CONST_MASK(nr))); | 202 | : "iq" ((u8)CONST_MASK(nr))); |
| 203 | } else { | 203 | } else { |
| 204 | asm volatile(LOCK_PREFIX "btc %1,%0" | 204 | asm volatile(LOCK_PREFIX __ASM_SIZE(btc) " %1,%0" |
| 205 | : BITOP_ADDR(addr) | 205 | : BITOP_ADDR(addr) |
| 206 | : "Ir" (nr)); | 206 | : "Ir" (nr)); |
| 207 | } | 207 | } |
| @@ -217,7 +217,8 @@ static __always_inline void change_bit(long nr, volatile unsigned long *addr) | |||
| 217 | */ | 217 | */ |
| 218 | static __always_inline bool test_and_set_bit(long nr, volatile unsigned long *addr) | 218 | static __always_inline bool test_and_set_bit(long nr, volatile unsigned long *addr) |
| 219 | { | 219 | { |
| 220 | GEN_BINARY_RMWcc(LOCK_PREFIX "bts", *addr, "Ir", nr, "%0", c); | 220 | GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(bts), |
| 221 | *addr, "Ir", nr, "%0", c); | ||
| 221 | } | 222 | } |
| 222 | 223 | ||
| 223 | /** | 224 | /** |
| @@ -246,7 +247,7 @@ static __always_inline bool __test_and_set_bit(long nr, volatile unsigned long * | |||
| 246 | { | 247 | { |
| 247 | bool oldbit; | 248 | bool oldbit; |
| 248 | 249 | ||
| 249 | asm("bts %2,%1" | 250 | asm(__ASM_SIZE(bts) " %2,%1" |
| 250 | CC_SET(c) | 251 | CC_SET(c) |
| 251 | : CC_OUT(c) (oldbit), ADDR | 252 | : CC_OUT(c) (oldbit), ADDR |
| 252 | : "Ir" (nr)); | 253 | : "Ir" (nr)); |
| @@ -263,7 +264,8 @@ static __always_inline bool __test_and_set_bit(long nr, volatile unsigned long * | |||
| 263 | */ | 264 | */ |
| 264 | static __always_inline bool test_and_clear_bit(long nr, volatile unsigned long *addr) | 265 | static __always_inline bool test_and_clear_bit(long nr, volatile unsigned long *addr) |
| 265 | { | 266 | { |
| 266 | GEN_BINARY_RMWcc(LOCK_PREFIX "btr", *addr, "Ir", nr, "%0", c); | 267 | GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(btr), |
| 268 | *addr, "Ir", nr, "%0", c); | ||
| 267 | } | 269 | } |
| 268 | 270 | ||
| 269 | /** | 271 | /** |
| @@ -286,7 +288,7 @@ static __always_inline bool __test_and_clear_bit(long nr, volatile unsigned long | |||
| 286 | { | 288 | { |
| 287 | bool oldbit; | 289 | bool oldbit; |
| 288 | 290 | ||
| 289 | asm volatile("btr %2,%1" | 291 | asm volatile(__ASM_SIZE(btr) " %2,%1" |
| 290 | CC_SET(c) | 292 | CC_SET(c) |
| 291 | : CC_OUT(c) (oldbit), ADDR | 293 | : CC_OUT(c) (oldbit), ADDR |
| 292 | : "Ir" (nr)); | 294 | : "Ir" (nr)); |
| @@ -298,7 +300,7 @@ static __always_inline bool __test_and_change_bit(long nr, volatile unsigned lon | |||
| 298 | { | 300 | { |
| 299 | bool oldbit; | 301 | bool oldbit; |
| 300 | 302 | ||
| 301 | asm volatile("btc %2,%1" | 303 | asm volatile(__ASM_SIZE(btc) " %2,%1" |
| 302 | CC_SET(c) | 304 | CC_SET(c) |
| 303 | : CC_OUT(c) (oldbit), ADDR | 305 | : CC_OUT(c) (oldbit), ADDR |
| 304 | : "Ir" (nr) : "memory"); | 306 | : "Ir" (nr) : "memory"); |
| @@ -316,7 +318,8 @@ static __always_inline bool __test_and_change_bit(long nr, volatile unsigned lon | |||
| 316 | */ | 318 | */ |
| 317 | static __always_inline bool test_and_change_bit(long nr, volatile unsigned long *addr) | 319 | static __always_inline bool test_and_change_bit(long nr, volatile unsigned long *addr) |
| 318 | { | 320 | { |
| 319 | GEN_BINARY_RMWcc(LOCK_PREFIX "btc", *addr, "Ir", nr, "%0", c); | 321 | GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(btc), |
| 322 | *addr, "Ir", nr, "%0", c); | ||
| 320 | } | 323 | } |
| 321 | 324 | ||
| 322 | static __always_inline bool constant_test_bit(long nr, const volatile unsigned long *addr) | 325 | static __always_inline bool constant_test_bit(long nr, const volatile unsigned long *addr) |
| @@ -329,7 +332,7 @@ static __always_inline bool variable_test_bit(long nr, volatile const unsigned l | |||
| 329 | { | 332 | { |
| 330 | bool oldbit; | 333 | bool oldbit; |
| 331 | 334 | ||
| 332 | asm volatile("bt %2,%1" | 335 | asm volatile(__ASM_SIZE(bt) " %2,%1" |
| 333 | CC_SET(c) | 336 | CC_SET(c) |
| 334 | : CC_OUT(c) (oldbit) | 337 | : CC_OUT(c) (oldbit) |
| 335 | : "m" (*(unsigned long *)addr), "Ir" (nr)); | 338 | : "m" (*(unsigned long *)addr), "Ir" (nr)); |
diff --git a/arch/x86/include/asm/percpu.h b/arch/x86/include/asm/percpu.h index ba3c523aaf16..a06b07399d17 100644 --- a/arch/x86/include/asm/percpu.h +++ b/arch/x86/include/asm/percpu.h | |||
| @@ -526,7 +526,7 @@ static inline bool x86_this_cpu_variable_test_bit(int nr, | |||
| 526 | { | 526 | { |
| 527 | bool oldbit; | 527 | bool oldbit; |
| 528 | 528 | ||
| 529 | asm volatile("bt "__percpu_arg(2)",%1" | 529 | asm volatile("btl "__percpu_arg(2)",%1" |
| 530 | CC_SET(c) | 530 | CC_SET(c) |
| 531 | : CC_OUT(c) (oldbit) | 531 | : CC_OUT(c) (oldbit) |
| 532 | : "m" (*(unsigned long __percpu *)addr), "Ir" (nr)); | 532 | : "m" (*(unsigned long __percpu *)addr), "Ir" (nr)); |
diff --git a/arch/x86/include/asm/refcount.h b/arch/x86/include/asm/refcount.h index d65171120e90..4cf11d88d3b3 100644 --- a/arch/x86/include/asm/refcount.h +++ b/arch/x86/include/asm/refcount.h | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | #define _REFCOUNT_EXCEPTION \ | 17 | #define _REFCOUNT_EXCEPTION \ |
| 18 | ".pushsection .text..refcount\n" \ | 18 | ".pushsection .text..refcount\n" \ |
| 19 | "111:\tlea %[counter], %%" _ASM_CX "\n" \ | 19 | "111:\tlea %[counter], %%" _ASM_CX "\n" \ |
| 20 | "112:\t" ASM_UD0 "\n" \ | 20 | "112:\t" ASM_UD2 "\n" \ |
| 21 | ASM_UNREACHABLE \ | 21 | ASM_UNREACHABLE \ |
| 22 | ".popsection\n" \ | 22 | ".popsection\n" \ |
| 23 | "113:\n" \ | 23 | "113:\n" \ |
diff --git a/arch/x86/platform/intel-mid/intel-mid.c b/arch/x86/platform/intel-mid/intel-mid.c index 2c67bae6bb53..fb1df9488e98 100644 --- a/arch/x86/platform/intel-mid/intel-mid.c +++ b/arch/x86/platform/intel-mid/intel-mid.c | |||
| @@ -79,7 +79,7 @@ static void intel_mid_power_off(void) | |||
| 79 | 79 | ||
| 80 | static void intel_mid_reboot(void) | 80 | static void intel_mid_reboot(void) |
| 81 | { | 81 | { |
| 82 | intel_scu_ipc_simple_command(IPCMSG_COLD_BOOT, 0); | 82 | intel_scu_ipc_simple_command(IPCMSG_COLD_RESET, 0); |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | static unsigned long __init intel_mid_calibrate_tsc(void) | 85 | static unsigned long __init intel_mid_calibrate_tsc(void) |
