Changeset View
Changeset View
Standalone View
Standalone View
sys/kern_prefetch.h
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
svn:keywords | null | FreeBSD=%H \ No newline at end of property |
svn:mime-type | null | text/plain \ No newline at end of property |
#ifndef __kern_prefetch_h__ | |||||
jtl: Needs a copyright/license/SPDX tag. | |||||
rrsAuthorUnsubmitted Not Done Inline Actionsack rrs: ack | |||||
#define __kern_prefetch_h__ | |||||
#ifdef _KERNEL | |||||
#if defined(__amd64__) | |||||
/* Includes to get the DMAP addresses */ | |||||
#include <vm/vm.h> | |||||
#include <vm/vm_extern.h> | |||||
#include <vm/vm_page.h> | |||||
#include <vm/vm_map.h> | |||||
#include <vm/pmap.h> | |||||
#endif | |||||
static __inline void | |||||
kern_prefetch(const volatile void *addr, void* before) | |||||
{ | |||||
#if defined(__amd64__) | |||||
__asm __volatile("prefetcht1 (%1)":"=rm"(*((int32_t *)before)):"r"(addr):); | |||||
#else | |||||
__builtin_prefetch(addr); | |||||
#endif | |||||
} | |||||
#endif | |||||
#endif |
Needs a copyright/license/SPDX tag.