Thread (44 messages) 44 messages, 4 authors, 2016-09-28

Re: [PATCH v3 2/4] virtio: move SSE based Rx implementation to separate file

From: Yuanhan Liu <hidden>
Date: 2016-08-18 06:43:41

On Tue, Jul 05, 2016 at 06:19:24PM +0530, Jerin Jacob wrote:
Split out SSE instruction based virtio simple Rx
implementation to a separate file

Signed-off-by: Jerin Jacob <redacted>
Hi,

I was about to apply this set. I then did some build test and found a
weird issue: it breaks the build with clang (ubuntu 16.04).

    drivers/net/virtio/virtio_rxtx_simple_sse.c:130:2: error: cast from 'const void *' to 'void *' drops const qualifier [-Werror,-Wcast-qual]
            _mm_prefetch((const void *)rused, _MM_HINT_T0);
            ^
    /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58: note: expanded from macro '_mm_prefetch'
    #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
                                                         ^
    1 error generated.

Weird enough I don't see this issue before this commit: the error
line is exactly the same before and after this commit.

Another note is that _mm_prefetch() is actually with different prototype
for gcc and clang. For gcc, we have:

    _mm_prefetch (const void *__P, enum _mm_hint __I)

Any thoughts?

	--yliu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help