1 .\" Written by Ralf Baechle (ralf@waldorf-gmbh.de),
2 .\" Copyright (c) 1994, 1995 Waldorf GMBH
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.
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.
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.
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,
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
30 .\"WORD: instruction cache Ì¿Îᥥã¥Ã¥·¥å
31 .\"WORD: data cache ¥Ç¡¼¥¿¥¥ã¥Ã¥·¥å
32 .\"WORD: flush ¥Õ¥é¥Ã¥·¥å
34 .TH CACHEFLUSH 2 2007-05-26 "Linux" "Linux Programmer's Manual"
37 .\"O cacheflush \- flush contents of instruction and/or data cache
38 cacheflush \- Ì¿Îᥥã¥Ã¥·¥å¤ä¥Ç¡¼¥¿¥¥ã¥Ã¥·¥å¤ÎÆâÍƤò¥Õ¥é¥Ã¥·¥å¤¹¤ë
42 .B #include <asm/cachectl.h>
44 .BI "int cacheflush(char *" addr ", int "nbytes ", int "cache );
48 .\"O .BR cacheflush ()
49 .\"O flushes the contents of the indicated cache(s) for the
50 .\"O user addresses in the range
53 .\"O .IR (addr+nbytes-1) .
61 ¤ÎÈϰϤΥ桼¥¶¥¢¥É¥ì¥¹¤ËÂбþ¤¹¤ë
62 »ØÄꤵ¤ì¤¿¥¥ã¥Ã¥·¥å¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
64 ¤Ë¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤ò»ØÄꤹ¤ë:
67 .\"O Flush the instruction cache.
68 Ì¿Îá (instruction) ¥¥ã¥Ã¥·¥å¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
71 .\"O Write back to memory and invalidate the affected valid cache lines.
72 Êѹ¹¤¬¤¢¤Ã¤¿¥¥ã¥Ã¥·¥å¥é¥¤¥ó¤ò¥á¥â¥ê¤Ë½ñ¤Ìᤷ¡¢Ìµ¸ú¤Ë¤¹¤ë¡£
76 .\"O .BR (ICACHE|DCACHE) .
79 .\"O .SH "RETURN VALUE"
81 .\"O .BR cacheflush ()
82 .\"O returns 0 on success or \-1 on error.
83 .\"O If errors are detected,
85 .\"O will indicate the error.
87 ¤ÏÀ®¸ù¤·¤¿¾ì¹ç¤Ï 0 ¤ò¡¢¼ºÇÔ¤·¤¿¾ì¹ç¤Ï \-1 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤¬¸¡½Ð¤µ¤ì¤¿¾ì¹ç¤Ï
89 ¤Ë¥¨¥é¡¼¤¬»Ø¼¨¤µ¤ì¤ë¡£
94 .\"O Some or all of the address range
97 .\"O .I (addr+nbytes-1)
98 .\"O is not accessible.
102 ¤ÎÈϰϤΥ¢¥É¥ì¥¹¤ÎÁ´¤Æ¤Þ¤¿¤Ï°ìÉô¤¬
103 ¥¢¥¯¥»¥¹²Äǽ¤Ç¤Ï¤Ê¤¤¡£
118 .\"O .SH CONFORMING TO
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
130 .\"O The current implementation ignores the
135 .\"O Therefore, the whole cache is always flushed.
136 ¸½ºß¤Î¼ÂÁõ¤Ç¤Ï¡¢°ú¤¿ô
140 ¤Ï̵»ë¤µ¤ì¤ë¡£¤½¤Î¤¿¤á¡¢
141 ¾ï¤ËÁ´¤Æ¤Î¥¥ã¥Ã¥·¥å¤¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¤ë¡£