os-support/solaris: Drop ExtendedEnabled global variable
Keeping track of kernel state in user space doesn't buy us anything, and introduces bugs, as we were keeping global state but the Solaris kernel tracks IOPL per thread. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
parent
432fad04e7
commit
7533fa9bd5
|
@ -73,22 +73,14 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
|
||||||
/* I/O Permissions section */
|
/* I/O Permissions section */
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
|
||||||
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
|
||||||
static Bool ExtendedEnabled = FALSE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
xf86EnableIO(void)
|
xf86EnableIO(void)
|
||||||
{
|
{
|
||||||
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
||||||
if (ExtendedEnabled)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) {
|
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) {
|
||||||
xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n");
|
xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
ExtendedEnabled = TRUE;
|
|
||||||
#endif /* i386 */
|
#endif /* i386 */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -97,11 +89,6 @@ void
|
||||||
xf86DisableIO(void)
|
xf86DisableIO(void)
|
||||||
{
|
{
|
||||||
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
||||||
if (!ExtendedEnabled)
|
|
||||||
return;
|
|
||||||
|
|
||||||
sysi86(SI86V86, V86SC_IOPL, 0);
|
sysi86(SI86V86, V86SC_IOPL, 0);
|
||||||
|
|
||||||
ExtendedEnabled = FALSE;
|
|
||||||
#endif /* i386 */
|
#endif /* i386 */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue