Re: [linux-sh:03188] cache info
Paul Mundt <[email protected]> Sat, 20 Mar 2004 01:16:54 -0500
| Newsgroups | gmane.linux.ports.sh.devel,gmane.linux.ports.sh.general |
|---|---|
| Message-ID | <[email protected]> |
On Sat, Mar 20, 2004 at 12:54:00PM +0900, Kaz Kojima wrote: > (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 :-) > Since the system call interface is likely going to be the cleanest approach for this sort of thing, why not implement this as a vsyscall? There was a recent thread on l-k about using vsyscalls for optimized routines on ppc/ppc64, so exposing this sort of thing through a vsyscall doesn't seem particularly evil (especially if glibc is going to need this) -- note that x86_64 already does a number of things in this fashion, gettimeofday(), time(), etc. The interface on the kernel side would be relatively simple, since would just populate the cache info by way of detect_cpu_and_cache_system() as normal, and then hand this data back by way of a vsyscall page.
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAW+HW1K+teJFxZ9wRAh6yAKCCJyq/015oBg5zIpMzQnSaB/p93gCfcVz+ vQgi5bBG17s6CFHfZ+zCX/0= =iG+k -----END PGP SIGNATURE-----