LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-21-2008, 09:35 PM   #1
minhstone
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Rep: Reputation: 0
Help me ... explain parameters of cacheflush() function


hi all,
I want using cacheflush function but I don't understand parameter of it.
"NAME
cacheflush - flush contents of instruction and/or data cache

SYNOPSIS
#include <asm/cachectl.h>

int cacheflush(char *addr, int nbytes, int cache);

DESCRIPTION
cacheflush flushes contents of indicated cache(s) for user addresses in
the range addr to (addr+nbytes-1). Cache may be one of:

ICACHE Flush the instruction cache.

DCACHE Write back to memory and invalidate the affected valid cache
lines.

BCACHE Same as (ICACHE|DCACHE).

"
I don't understand "char *addr" parameter, and how do use it.
Who can help me explain ? and show some examples about this function and usage it.
Thanks,
 
Old 01-22-2008, 06:57 PM   #2
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy .. bullseye bookworm
Posts: 1,832

Rep: Reputation: 108Reputation: 108
Hya,

Um... I am kind of sure that you can write C program, (otherwise, it is impossible to use it.)

So, it should not be difficult, I guess.

But my penguin says:
The current implementation ignores the addr and nbytes arguments. Therefore, the whole cache is always flushed.

At this moment, I do not think you need "addr"

By the way, I am having difficulty understanding what you want.

http://www.linuxquestions.org/questi...memory-615084/

I appreciate if you can describe your goal a bit more detail.

Happy Penguins!
 
Old 01-22-2008, 09:41 PM   #3
minhstone
LQ Newbie
 
Registered: Jan 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Help me ... explain parameters of cacheflush() function

Quote:
Originally Posted by kaz2100 View Post
Hya,

Um... I am kind of sure that you can write C program, (otherwise, it is impossible to use it.)

So, it should not be difficult, I guess.

But my penguin says:
The current implementation ignores the addr and nbytes arguments. Therefore, the whole cache is always flushed.

At this moment, I do not think you need "addr"

By the way, I am having difficulty understanding what you want.

http://www.linuxquestions.org/questi...memory-615084/

I appreciate if you can describe your goal a bit more detail.

Happy Penguins!
hi,
because I want ensure data cache erased before I continue implement transfer data blocks different to device.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
explain function Filipe Programming 1 03-01-2007 06:47 AM
JS: assigning a function call with parameters to an event eantoranz Programming 1 10-09-2006 03:05 PM
C programming: Variable number of parameters to function kenneho Programming 8 03-21-2006 06:21 AM
Kernel compiling: any links to explain all the "make xconfig" parameters? vharishankar Linux - General 5 02-21-2005 11:27 AM
Question about function with variable number of parameters xailer Programming 4 01-13-2004 11:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 06:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration