cache info
Kaz Kojima <[email protected]> Sat, 20 Mar 2004 12:54:00 +0900 (JST)
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
There is a request for a function replying to the queries about
cache specifications like cache sizes, ways and line sizes, from
the latest glibc.
Unfortunately, /proc can't be used because it might be required at
very early stage of the userland. Some other archs read CPU id
register and other cache-related registers which are readable in
user mode.
For SH, such registers are readable only in kernel mode and anyway
kernel has to give such informations to the userland. It seems
saveral ways to implement such function:
(1) SH specific system call to get the cache info,
(2) interface (including system call) to read hurmless CPU
registers,
(3) special device,
(4) ...
Perhaps (1) is cleaner as an interface than another methods though
I'm a bit concerned with SH specific system call number. We have
"holes" in system call numbers but there might be no guarantee
that they won't be used for another purpose.
Thoughts? Implementations will be more welcome :-)
Regards,
kaz
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click