summaryrefslogtreecommitdiff
path: root/arch/x86/boot/boot.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-07-15 10:26:04 +0200
committerIngo Molnar <mingo@kernel.org>2016-07-15 10:26:04 +0200
commit38452af2424dc99854c78523d74b260fa8a984f0 (patch)
tree0dc49c27e1a58a0b35c23db05d85d2e8571ea471 /arch/x86/boot/boot.h
parentdcb32d9913b7ed527b135a7e221f8d14b67bb952 (diff)
parentbe8a18e2e98e04a5def5887d913b267865562448 (diff)
Merge branch 'x86/asm' into x86/mm, to resolve conflicts
Conflicts: tools/testing/selftests/x86/Makefile Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/boot/boot.h')
-rw-r--r--arch/x86/boot/boot.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h
index a5ce666a2423..e5612f3e3b57 100644
--- a/arch/x86/boot/boot.h
+++ b/arch/x86/boot/boot.h
@@ -24,6 +24,7 @@
#include <linux/types.h>
#include <linux/edd.h>
#include <asm/setup.h>
+#include <asm/asm.h>
#include "bitops.h"
#include "ctype.h"
#include "cpuflags.h"
@@ -176,18 +177,18 @@ static inline void wrgs32(u32 v, addr_t addr)
}
/* Note: these only return true/false, not a signed return value! */
-static inline int memcmp_fs(const void *s1, addr_t s2, size_t len)
+static inline bool memcmp_fs(const void *s1, addr_t s2, size_t len)
{
- u8 diff;
- asm volatile("fs; repe; cmpsb; setnz %0"
- : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
+ bool diff;
+ asm volatile("fs; repe; cmpsb" CC_SET(nz)
+ : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}
-static inline int memcmp_gs(const void *s1, addr_t s2, size_t len)
+static inline bool memcmp_gs(const void *s1, addr_t s2, size_t len)
{
- u8 diff;
- asm volatile("gs; repe; cmpsb; setnz %0"
- : "=qm" (diff), "+D" (s1), "+S" (s2), "+c" (len));
+ bool diff;
+ asm volatile("gs; repe; cmpsb" CC_SET(nz)
+ : CC_OUT(nz) (diff), "+D" (s1), "+S" (s2), "+c" (len));
return diff;
}