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.
Unified · Split
| @@ -93,7 +93,7 @@ static inline unsigned int __getcpu(void) · 92 unmodified lines | ||
| 93 | 93 | * |
| 94 | 94 | * If RDPID is available, use it. |
| 95 | 95 | */ |
| 96 | − alternative_io ("lsl %[p],%[seg]", | |
| 96 | + alternative_io ("lsl %[seg],%[p]", | |
| 97 | 97 | ".byte 0xf3,0x0f,0xc7,0xf8", /* RDPID %eax/rax */ |
| 98 | 98 | X86_FEATURE_RDPID, |
| 99 | 99 | [p] "=a" (p), [seg] "r" (__PER_CPU_SEG)); |