[PATCH] Fix cpuid opcode detection in lscpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes commit c9239f23acdc8b50f8bcbfadf967c6a490fd4693. The author didn't
care for matching constraints when resorting the register constraints.
The eax register (with the cpuid opcode) is now in operand 1, not zero
anymore.

Signed-off-by: Henne Vogelsang <hvogel@xxxxxxxxxxxx>

---
diff --git a/sys-utils/lscpu.c b/sys-utils/lscpu.c
index c200fb3..77a3e5c 100644
--- a/sys-utils/lscpu.c
+++ b/sys-utils/lscpu.c
@@ -360,7 +360,7 @@ cpuid(unsigned int op, unsigned int *eax, unsigned
int *ebx,
                  "=a" (*eax),
                  "=c" (*ecx),
                  "=d" (*edx)
-               : "0" (op), "c"(0));
+               : "1" (op), "c"(0));
 }

 static void
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux