OSDN Git Service

c51557ea4faa314e701cbb6cfe68c2ea15e34cae
[linuxjm/LDP_man-pages.git] / draft / man2 / cacheflush.2
1 .\" Written by Ralf Baechle (ralf@waldorf-gmbh.de),
2 .\" Copyright (c) 1994, 1995 Waldorf GMBH
3 .\"
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, write to the Free
21 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
22 .\" USA.
23 .\"
24 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
25 .\"         all rights reserved.
26 .\" Translated Sat Feb 22 20:07:45 JST 1997
27 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
28 .\" Updated 2007-06-13, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.55
29 .\"
30 .\"WORD:        instruction cache       Ì¿Îᥭ¥ã¥Ã¥·¥å
31 .\"WORD:        data cache              ¥Ç¡¼¥¿¥­¥ã¥Ã¥·¥å
32 .\"WORD:        flush                   ¥Õ¥é¥Ã¥·¥å
33 .\"
34 .TH CACHEFLUSH 2 2007-05-26 "Linux" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH Ì¾Á°
37 .\"O cacheflush \- flush contents of instruction and/or data cache
38 cacheflush \- Ì¿Îᥭ¥ã¥Ã¥·¥å¤ä¥Ç¡¼¥¿¥­¥ã¥Ã¥·¥å¤ÎÆâÍƤò¥Õ¥é¥Ã¥·¥å¤¹¤ë
39 .\"O .SH SYNOPSIS
40 .SH ½ñ¼°
41 .nf
42 .B #include <asm/cachectl.h>
43 .sp
44 .BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
45 .fi
46 .\"O .SH DESCRIPTION
47 .SH ÀâÌÀ
48 .\"O .BR cacheflush ()
49 .\"O flushes the contents of the indicated cache(s) for the
50 .\"O user addresses in the range
51 .\"O .I addr
52 .\"O to
53 .\"O .IR (addr+nbytes-1) .
54 .\"O .I cache
55 .\"O may be one of:
56 .BR cacheflush ()
57 ¤Ï
58 .I addr
59 ¤«¤é
60 .I (addr+nbytes-1)
61 ¤ÎÈϰϤΥ桼¥¶¥¢¥É¥ì¥¹¤ËÂбþ¤¹¤ë
62 »ØÄꤵ¤ì¤¿¥­¥ã¥Ã¥·¥å¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
63 .I cache
64 ¤Ë¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤ò»ØÄꤹ¤ë:
65 .TP
66 .B ICACHE
67 .\"O Flush the instruction cache.
68 Ì¿Îá (instruction) ¥­¥ã¥Ã¥·¥å¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
69 .TP
70 .B DCACHE
71 .\"O Write back to memory and invalidate the affected valid cache lines.
72 Êѹ¹¤¬¤¢¤Ã¤¿¥­¥ã¥Ã¥·¥å¥é¥¤¥ó¤ò¥á¥â¥ê¤Ë½ñ¤­Ìᤷ¡¢Ìµ¸ú¤Ë¤¹¤ë¡£
73 .TP
74 .B BCACHE
75 .\"O Same as
76 .\"O .BR (ICACHE|DCACHE) .
77 .B (ICACHE|DCACHE)
78 ¤ÈƱ¤¸¡£
79 .\"O .SH "RETURN VALUE"
80 .SH ÊÖ¤êÃÍ
81 .\"O .BR cacheflush ()
82 .\"O returns 0 on success or \-1 on error.
83 .\"O If errors are detected,
84 .\"O .I errno
85 .\"O will indicate the error.
86 .BR cacheflush ()
87 ¤ÏÀ®¸ù¤·¤¿¾ì¹ç¤Ï 0 ¤ò¡¢¼ºÇÔ¤·¤¿¾ì¹ç¤Ï \-1 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤¬¸¡½Ð¤µ¤ì¤¿¾ì¹ç¤Ï
88 .I errno
89 ¤Ë¥¨¥é¡¼¤¬»Ø¼¨¤µ¤ì¤ë¡£
90 .\"O .SH ERRORS
91 .SH ¥¨¥é¡¼
92 .TP
93 .B EFAULT
94 .\"O Some or all of the address range
95 .\"O .I addr
96 .\"O to
97 .\"O .I (addr+nbytes-1)
98 .\"O is not accessible.
99 .I addr
100 ¤«¤é
101 .I (addr+nbytes-1)
102 ¤ÎÈϰϤΥ¢¥É¥ì¥¹¤ÎÁ´¤Æ¤Þ¤¿¤Ï°ìÉô¤¬
103 ¥¢¥¯¥»¥¹²Äǽ¤Ç¤Ï¤Ê¤¤¡£
104 .TP
105 .B EINVAL
106 .\"O .I cache
107 .\"O is not one of
108 .\"O .BR ICACHE ,
109 .\"O .BR DCACHE ,
110 .\"O or
111 .\"O .BR BCACHE .
112 .I cache
113 ¥Ñ¥é¥á¡¼¥¿¤¬
114 .BR ICACHE ,
115 .BR DCACHE , 
116 .B BCACHE
117 ¤Î¤É¤ì¤Ç¤â¤Ê¤¤¡£
118 .\"O .SH CONFORMING TO
119 .SH ½àµò
120 .\"O This Linux-specific system call is only available on MIPS based systems.
121 ¤³¤Î Linux ÆÃÍ­¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï MIPS ¥Ù¡¼¥¹¤Î¥·¥¹¥Æ¥à¤Ç¤Î¤ßÍ­¸ú¤Ç¤¢¤ë¡£
122 .\" FIXME This system call was only on MIPS back in 1.2 days, but
123 .\" by now it is on a number of other architectures (but not i386).
124 .\" Investigate the details and update this page.
125 .\"O It should not be used in programs intended to be portable.
126 °Ü¿¢¤ò°Õ¿Þ¤·¤¿¥×¥í¥°¥é¥à¤Ç»ÈÍѤ¹¤Ù¤­¤Ç¤Ï¤Ê¤¤¡£
127 .\" Irix 6.5 appears to have a cacheflush() syscall -- mtk
128 .\"O .SH BUGS
129 .SH ¥Ð¥°
130 .\"O The current implementation ignores the
131 .\"O .I addr
132 .\"O and
133 .\"O .I nbytes
134 .\"O arguments.
135 .\"O Therefore, the whole cache is always flushed.
136 ¸½ºß¤Î¼ÂÁõ¤Ç¤Ï¡¢°ú¤­¿ô
137 .I addr
138 ¤È
139 .I nbytes
140 ¤Ï̵»ë¤µ¤ì¤ë¡£¤½¤Î¤¿¤á¡¢
141 ¾ï¤ËÁ´¤Æ¤Î¥­¥ã¥Ã¥·¥å¤¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¤ë¡£