From: Jurij Smakov <[EMAIL PROTECTED]>
Date: Sun, 12 Aug 2007 11:29:53 +0100
> #if defined(sparc) || defined(__sparc__)
> static inline void
> flush_register_windows(void)
> {
> asm
> #ifdef __GNUC__
> volatile
> #endif
> # if defined(__sparc_v9__) || defined(__sparcv9) ||
> defined(__arch64__)
> ("flushw")
> # elif defined(linux) || defined(__linux__)
> ("ta 0x83")
> # else /* Solaris, OpenBSD, NetBSD, etc. */
> ("ta 0x03")
> # endif /* trap always to flush register windows if we are on a Sparc
> system */
> ;
> }
> # define FLUSH_REGISTER_WINDOWS flush_register_windows()
This code is buggy, it should use "ta 0x03" on Linux as well
as the BSD's and Solaris.
"ta 0x83" is a hypervisor trap on Niagara that loads a TLB
entry for supervisor code :-)
-
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html