Re: 'Illegal instruction' on taking a trap on UltrasparcIII

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jurij Smakov <jurij@xxxxxxxxx>
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux