History

x86/vdso: Fix lsl operand order

In the __getcpu function, lsl is using the wrong target and destination registers. Luckily, the compiler tends to choose %eax for both variables, so it has been working so far.

Samuel Neves committed 8 years ago

Commit e78e5a91 parent c7486101 file · +1 −1Browse files

Unified · Split

arch/x86/include/asm/vgtod.h+1−1
@@ -93,7 +93,7 @@ static inline unsigned int __getcpu(void) · 92 unmodified lines
9393 *
9494 * If RDPID is available, use it.
9595 */
96− alternative_io ("lsl %[p],%[seg]",
96+ alternative_io ("lsl %[seg],%[p]",
9797 ".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */
9898 X86_FEATURE_RDPID,
9999 [p] "=a" (p), [seg] "r" (__PER_CPU_SEG));

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t