Date: Sat, 9 Apr 2022 00:28:07 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: d08cb45362e0 - main - iflib: Use empty inline functions for prefetch*() on non-x86. Message-ID: <202204090028.2390S7Ho056918@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d08cb45362e0c00f29bf0a1f9c639f22042df34b commit d08cb45362e0c00f29bf0a1f9c639f22042df34b Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-09 00:25:14 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-04-09 00:25:14 +0000 iflib: Use empty inline functions for prefetch*() on non-x86. This avoids warnings about unused variables in expressions passed to prefetch*(). --- sys/net/iflib.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index 2971a22d799e..d088571b09c0 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -1399,6 +1399,7 @@ prefetch(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); } + static __inline void prefetch2cachelines(void *x) { @@ -1408,8 +1409,15 @@ prefetch2cachelines(void *x) #endif } #else -#define prefetch(x) -#define prefetch2cachelines(x) +static __inline void +prefetch(void *x) +{ +} + +static __inline void +prefetch2cachelines(void *x) +{ +} #endif static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204090028.2390S7Ho056918>