FreeBSD/Linux Kernel Cross Reference
sys/sys/jumbo.h
1 /*-
2 * Copyright (c) 1997, Duke University
3 * All rights reserved.
4 *
5 * Author:
6 * Andrew Gallatin <gallatin@cs.duke.edu>
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. The name of Duke University may not be used to endorse or promote
17 * products derived from this software without specific prior written
18 * permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY DUKE UNIVERSITY ``AS IS'' AND ANY
21 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DUKE UNIVERSITY BE LIABLE
24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITSOR BUSINESS
27 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
30 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 * $FreeBSD: releng/5.0/sys/sys/jumbo.h 99479 2002-07-06 02:44:15Z gallatin $
33 */
34
35 #ifndef _SYS_JUMBO_H_
36 #define _SYS_JUMBO_H_
37
38 #ifdef _KERNEL
39 extern vm_offset_t jumbo_basekva;
40
41 static __inline caddr_t jumbo_phys_to_kva(vm_offset_t pa);
42 static __inline caddr_t
43 jumbo_phys_to_kva(vm_offset_t pa)
44 {
45 vm_page_t pg;
46
47 pg = PHYS_TO_VM_PAGE(pa);
48 pg->flags &= ~PG_BUSY;
49 return (caddr_t)(ptoa(pg->pindex) + jumbo_basekva);
50 }
51
52 int jumbo_vm_init(void);
53 void jumbo_freem(void *addr, void *args);
54 vm_page_t jumbo_pg_alloc(void);
55 void jumbo_pg_free(vm_offset_t addr);
56 void jumbo_pg_steal(vm_page_t pg);
57 #endif /* _KERNEL */
58
59 #endif /* !_SYS_JUMBO_H_ */
Cache object: 08a9f87f68752d101e9517e4da6b1438
|