sf_buf.h (a5819cb5b5b5f92d1224e9bf6199d0995aed5283) | sf_buf.h (5c0db7c71ae2f3770f5aada4a1afff72ff882432) |
---|---|
1/*- | 1/*- |
2 * Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu> | 2 * Copyright (c) 2003, 2005 Alan L. Cox <alc@cs.rice.edu> |
3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 23 unchanged lines hidden (view full) --- 34struct vm_page; 35 36struct sf_buf { 37 LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ 38 TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ 39 struct vm_page *m; /* currently mapped page */ 40 vm_offset_t kva; /* va of mapping */ 41 int ref_count; /* usage of this mapping */ | 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright --- 23 unchanged lines hidden (view full) --- 34struct vm_page; 35 36struct sf_buf { 37 LIST_ENTRY(sf_buf) list_entry; /* list of buffers */ 38 TAILQ_ENTRY(sf_buf) free_entry; /* list of buffers */ 39 struct vm_page *m; /* currently mapped page */ 40 vm_offset_t kva; /* va of mapping */ 41 int ref_count; /* usage of this mapping */ |
42#ifdef SMP 43 cpumask_t cpumask; /* cpus on which mapping is valid */ 44#endif |
|
42}; 43 44static __inline vm_offset_t 45sf_buf_kva(struct sf_buf *sf) 46{ 47 48 return (sf->kva); 49} 50 51static __inline struct vm_page * 52sf_buf_page(struct sf_buf *sf) 53{ 54 55 return (sf->m); 56} 57 58#endif /* !_MACHINE_SF_BUF_H_ */ | 45}; 46 47static __inline vm_offset_t 48sf_buf_kva(struct sf_buf *sf) 49{ 50 51 return (sf->kva); 52} 53 54static __inline struct vm_page * 55sf_buf_page(struct sf_buf *sf) 56{ 57 58 return (sf->m); 59} 60 61#endif /* !_MACHINE_SF_BUF_H_ */ |