OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / linux-man9 / original / man9 / MAP_NR.9
1 .\" -*- nroff -*-
2 .\"
3 .\" copyright (C) 1997 Stephen Williams <steve@icarus.com>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one
13 .\" 
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\" 
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .TH skel 9 "$Date:$" "Linux DDI" "VM Functions"
26 .\"
27 .\" Turn off hyphenation and right justification for the first sections.
28 .hlm 0
29 .na
30 .\" The name should be formatted this way for apropos to work
31 .SH NAME
32 MAP_NR \- get memory map index for page in kernel memory
33 .\"
34 .\"
35 .SH SYNOPSIS
36 .B #include <linux/mm.h>
37 .sp
38 .BI "#define MAP_NR(" page ")"
39 .HP
40 .\"
41 .\" Turn hyphenation and adjustment back on.
42 .hlm 1
43 .ad
44 .SH DESCRIPTION
45 This macro maps the page of kernel memory to an index into the
46 .B mem_map
47 array. The input page is kernel-space page addresses such as those
48 that come from the
49 .BR get_free_page "(9)"
50 function. The expression
51 .I "mem_map[MAP_NR(page)]"
52 returns a pointer to a
53 .I mem_map_t
54 for the page in question.
55 .PP
56 Device drivers need access to the page structure if it is implimenting
57 some special kind of memory segment, i.e. cache for a virtual frame buffer.
58 .SH "RETURN VALUE"
59 Returns an index into the
60 .B mem_map
61 array.
62 .SH AVAILABILITY
63 Linux 2.0+
64 .SH "SEE ALSO"
65 .hlm 0
66 .na
67 .BR get_free_pages "(9)"
68 .ad
69 .hlm 1
70 .PP
71 .I "/usr/include/asm/page.h"
72 .SH AUTHOR
73 Stephen Williams <steve@icarus.com>
74 .SH BUGS
75 There is no check that the page you are passing really is a valid page
76 address.