[PATCH rdma-core 2/3] util/mmio.c: Fix compilation errors when __SSE__ is not set on 32 bit

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

 



From: Alaa Hleihel <alaa@xxxxxxxxxxxx>

When building for 32 bit, the compilation may fail with the following
errors in case that __SSE__ is not set:

In file included from ../util/mmio.c:37:0:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/xmmintrin.h:31:3: error: #error "SSE instruction set not enabled"

Signed-off-by: Alaa Hleihel <alaa@xxxxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leon@xxxxxxxxxx>
---
 util/mmio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/util/mmio.c b/util/mmio.c
index b362a65e..cea4a727 100644
--- a/util/mmio.c
+++ b/util/mmio.c
@@ -33,7 +33,7 @@ static void pthread_mmio_write64_be(void *addr, __be64 val)
 	mmio_wc_spinunlock(&mmio_spinlock);
 }
 
-#if defined(__i386__)
+#if defined(__i386__) && defined(__SSE__)
 #include <xmmintrin.h>
 #include <cpuid.h>
 
@@ -73,7 +73,7 @@ write64_fn_t resolve_mmio_write64_be(void) __asm__("mmio_write64_be");
 
 write64_fn_t resolve_mmio_write64_be(void)
 {
-#if defined(__i386__)
+#if defined(__i386__) && defined(__SSE__)
 	if (have_sse())
 		return &sse_mmio_write64_be;
 #endif
-- 
2.15.0

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



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux