From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leon Romanovsky Subject: [PATCH rdma-core 2/3] util/mmio.c: Fix compilation errors when __SSE__ is not set on 32 bit Date: Mon, 13 Nov 2017 08:08:05 +0200 Message-ID: <20171113060806.27354-3-leon@kernel.org> References: <20171113060806.27354-1-leon@kernel.org> Return-path: In-Reply-To: <20171113060806.27354-1-leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Doug Ledford Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Leon Romanovsky , Benjamin Drung , Alaa Hleihel , Jason Gunthorpe , Sean Hefty , Hal Rosenstock , Yishai Hadas , Nicolas Morey-Chaisemartin List-Id: linux-rdma@vger.kernel.org From: Alaa Hleihel 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 Signed-off-by: Leon Romanovsky --- 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 #include @@ -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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html