kernel - Optimize the x86-64 lwbuf API
[dragonfly.git] / sys / cpu / i386 / include / lwbuf.h
index 97cd516..63b75d7 100644 (file)
 #error "This file should not be included by userland programs."
 #endif
 
+struct mdglobaldata;
+
 struct lwbuf {
     vm_page_t          m;              /* currently mapped page */
     vm_offset_t                kva;            /* va of mapping */
     cpumask_t          cpumask;        /* cpu mapping synchronization */
 };
 
-struct lwbuf_free_kvp {
-    vm_offset_t                        kva;
-    SLIST_ENTRY(lwbuf_free_kvp)        next;
-};
-SLIST_HEAD(lwbuf_free_kvp_list, lwbuf_free_kvp);
-
 static __inline vm_page_t
-lwbuf_page(struct lwbuf *lwb) {
+lwbuf_page(struct lwbuf *lwb)
+{
     return (lwb->m);
 }
 
 #if defined(_KERNEL)
 
-struct lwbuf   *lwbuf_alloc(vm_page_t);
+struct lwbuf   *lwbuf_alloc(vm_page_t, struct lwbuf *);
 void            lwbuf_free(struct lwbuf *);
 vm_offset_t     lwbuf_kva(struct lwbuf *lwb);
 void            lwbuf_set_global(struct lwbuf *);