mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Properly handle prefetch only for amd64 and i386 as we do elsewhere.
In general theraven is right that we should factr this out and provide a general and per-arch implementation that everything can use. MFC after: 3 days X-MFC with: r270755
This commit is contained in:
parent
d3b06cf2be
commit
f894ad8848
1 changed files with 4 additions and 0 deletions
|
|
@ -137,11 +137,15 @@ struct i40e_spinlock {
|
|||
|
||||
#define le16_to_cpu
|
||||
|
||||
#if defined(__amd64__) || defined(i386)
|
||||
static __inline
|
||||
void prefetch(void *x)
|
||||
{
|
||||
__asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x));
|
||||
}
|
||||
#else
|
||||
#define prefetch(x)
|
||||
#endif
|
||||
|
||||
struct i40e_osdep
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue