diff options
author | alc <alc@FreeBSD.org> | 2004-04-18 07:11:12 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2004-04-18 07:11:12 +0000 |
commit | 815fa94ff6d40ccd3e54fc18be92ca82a444ade1 (patch) | |
tree | 6f25ffdce4620d291a3a0c6fe8ed6c0c4087d5f4 /sys/ia64/include | |
parent | b6f1351303cdd80bc08ad4ac02d4bda1522c9e78 (diff) | |
download | FreeBSD-src-815fa94ff6d40ccd3e54fc18be92ca82a444ade1.zip FreeBSD-src-815fa94ff6d40ccd3e54fc18be92ca82a444ade1.tar.gz |
MFamd64
Simplify the sf_buf implementation. In short, make it a veneer
over the direct virtual-to-physical mapping.
Diffstat (limited to 'sys/ia64/include')
-rw-r--r-- | sys/ia64/include/sf_buf.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/ia64/include/sf_buf.h b/sys/ia64/include/sf_buf.h index 479e0d1..8d67542 100644 --- a/sys/ia64/include/sf_buf.h +++ b/sys/ia64/include/sf_buf.h @@ -29,29 +29,30 @@ #ifndef _MACHINE_SF_BUF_H_ #define _MACHINE_SF_BUF_H_ -#include <sys/queue.h> - #include <vm/vm.h> #include <vm/vm_param.h> #include <vm/vm_page.h> -struct sf_buf { - SLIST_ENTRY(sf_buf) free_list; /* list of free buffer slots */ - vm_page_t m; /* currently mapped page */ -}; +/* + * On this machine, the only purpose for which sf_buf is used is to implement + * an opaque pointer required by the machine-independent parts of the kernel. + * That pointer references the vm_page that is "mapped" by the sf_buf. The + * actual mapping is provided by the direct virtual-to-physical mapping. + */ +struct sf_buf; static __inline vm_offset_t sf_buf_kva(struct sf_buf *sf) { - return (IA64_PHYS_TO_RR7(sf->m->phys_addr)); + return (IA64_PHYS_TO_RR7(VM_PAGE_TO_PHYS((vm_page_t)sf))); } static __inline vm_page_t sf_buf_page(struct sf_buf *sf) { - return (sf->m); + return ((vm_page_t)sf); } #endif /* !_MACHINE_SF_BUF_H_ */ |