Remove xf86{En,Dis}ableInterrupts entirely
This commit is contained in:
parent
c7680befe5
commit
47478aa10a
|
@ -1992,14 +1992,6 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int),
|
||||||
cnt = 0;
|
cnt = 0;
|
||||||
sync = 200000;
|
sync = 200000;
|
||||||
|
|
||||||
/* XXX How critical is this? */
|
|
||||||
if (!xf86DisableInterrupts())
|
|
||||||
{
|
|
||||||
(*ClockFunc)(pScrn, CLK_REG_RESTORE);
|
|
||||||
ErrorF("Failed to disable interrupts during clock probe. If\n");
|
|
||||||
ErrorF("your OS does not support disabling interrupts, then you\n");
|
|
||||||
FatalError("must specify a Clocks line in the XF86Config file.\n");
|
|
||||||
}
|
|
||||||
while ((inb(status) & maskval) == 0x00)
|
while ((inb(status) & maskval) == 0x00)
|
||||||
if (sync-- == 0) goto finish;
|
if (sync-- == 0) goto finish;
|
||||||
/* Something appears to be happening, so reset sync count */
|
/* Something appears to be happening, so reset sync count */
|
||||||
|
@ -2020,8 +2012,6 @@ xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int),
|
||||||
}
|
}
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
xf86EnableInterrupts();
|
|
||||||
|
|
||||||
pScrn->clock[i] = cnt ? cnt : -1;
|
pScrn->clock[i] = cnt ? cnt : -1;
|
||||||
if (BlankScreen)
|
if (BlankScreen)
|
||||||
(*BlankScreen)(pScrn, TRUE);
|
(*BlankScreen)(pScrn, TRUE);
|
||||||
|
|
|
@ -244,8 +244,6 @@ _X_HIDDEN void *xfree86LookupTab[] = {
|
||||||
SYMFUNC(xf86ReadBIOS)
|
SYMFUNC(xf86ReadBIOS)
|
||||||
SYMFUNC(xf86EnableIO)
|
SYMFUNC(xf86EnableIO)
|
||||||
SYMFUNC(xf86DisableIO)
|
SYMFUNC(xf86DisableIO)
|
||||||
SYMFUNC(xf86DisableInterrupts)
|
|
||||||
SYMFUNC(xf86EnableInterrupts)
|
|
||||||
SYMFUNC(xf86LinearVidMem)
|
SYMFUNC(xf86LinearVidMem)
|
||||||
SYMFUNC(xf86CheckMTRR)
|
SYMFUNC(xf86CheckMTRR)
|
||||||
SYMFUNC(xf86MapVidMem)
|
SYMFUNC(xf86MapVidMem)
|
||||||
|
|
|
@ -433,24 +433,6 @@ xf86DisableIO()
|
||||||
|
|
||||||
#endif /* USE_ALPHA_PIO */
|
#endif /* USE_ALPHA_PIO */
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define vuip volatile unsigned int *
|
#define vuip volatile unsigned int *
|
||||||
|
|
||||||
static unsigned long msb_set = 0;
|
static unsigned long msb_set = 0;
|
||||||
|
|
|
@ -522,27 +522,6 @@ xf86DisableIO()
|
||||||
|
|
||||||
#endif /* USE_ARC_MMAP */
|
#endif /* USE_ARC_MMAP */
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* XXX This is here for reference. It needs to be handled differently for the
|
* XXX This is here for reference. It needs to be handled differently for the
|
||||||
|
|
|
@ -444,38 +444,6 @@ xf86DisableIO()
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("cli");
|
|
||||||
#else
|
|
||||||
asm("cli");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("sti");
|
|
||||||
#else
|
|
||||||
asm("sti");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef __NetBSD__
|
#ifdef __NetBSD__
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
/* Set TV output mode */
|
/* Set TV output mode */
|
||||||
|
|
|
@ -123,24 +123,6 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Bool xf86EnableIO()
|
Bool xf86EnableIO()
|
||||||
{
|
{
|
||||||
int fd = xf86Info.screenFd;
|
int fd = xf86Info.screenFd;
|
||||||
|
|
|
@ -89,21 +89,3 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf,
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -142,20 +142,6 @@ xf86DisableIO()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************************************
|
|
||||||
* Interrupt Handling section
|
|
||||||
**************************************************************************/
|
|
||||||
Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base,
|
xf86MapReadSideEffects(int ScreenNum, int Flags, pointer Base,
|
||||||
unsigned long Size)
|
unsigned long Size)
|
||||||
|
|
|
@ -568,24 +568,6 @@ xf86DisableIO(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Don't use these two functions. They can't possibly work. If you actually
|
|
||||||
* need interrupts off for something, you ought to be doing it in the kernel
|
|
||||||
* anyway.
|
|
||||||
*/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
return (TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if defined (__alpha__)
|
#if defined (__alpha__)
|
||||||
|
|
||||||
#define vuip volatile unsigned int *
|
#define vuip volatile unsigned int *
|
||||||
|
|
|
@ -88,47 +88,3 @@ xf86DisableIO(void)
|
||||||
sysi86(SI86V86, V86SC_IOPL, 0);
|
sysi86(SI86V86, V86SC_IOPL, 0);
|
||||||
IOEnabled = FALSE;
|
IOEnabled = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts(void)
|
|
||||||
{
|
|
||||||
if (!IOEnabled) {
|
|
||||||
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("cli");
|
|
||||||
#else
|
|
||||||
asm("cli");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
if (!IOEnabled) {
|
|
||||||
sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
|
|
||||||
}
|
|
||||||
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts(void)
|
|
||||||
{
|
|
||||||
if (!IOEnabled) {
|
|
||||||
if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("sti");
|
|
||||||
#else
|
|
||||||
asm("sti");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
if (!IOEnabled) {
|
|
||||||
sysi86(SI86V86, V86SC_IOPL, PS_IOPL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -263,46 +263,3 @@ xf86DisableIO(void)
|
||||||
ExtendedEnabled = FALSE;
|
ExtendedEnabled = FALSE;
|
||||||
#endif /* i386 */
|
#endif /* i386 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts(void)
|
|
||||||
{
|
|
||||||
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
|
||||||
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("cli");
|
|
||||||
#else
|
|
||||||
asm("cli");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
sysi86(SI86V86, V86SC_IOPL, 0);
|
|
||||||
#endif /* i386 */
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts(void)
|
|
||||||
{
|
|
||||||
#if defined(__i386__) || defined(__i386) || defined(__x86)
|
|
||||||
if (!ExtendedEnabled && (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0))
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("sti");
|
|
||||||
#else
|
|
||||||
asm("sti");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
sysi86(SI86V86, V86SC_IOPL, 0);
|
|
||||||
#endif /* i386 */
|
|
||||||
}
|
|
||||||
|
|
|
@ -313,55 +313,3 @@ xf86DisableIO()
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***************************************************************************/
|
|
||||||
/* Interrupt Handling section */
|
|
||||||
/***************************************************************************/
|
|
||||||
|
|
||||||
_X_EXPORT Bool
|
|
||||||
xf86DisableInterrupts()
|
|
||||||
{
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
{
|
|
||||||
if (SET_IOPL() < 0)
|
|
||||||
{
|
|
||||||
return(FALSE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("cli");
|
|
||||||
#else
|
|
||||||
asm("cli");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
{
|
|
||||||
RESET_IOPL();
|
|
||||||
}
|
|
||||||
return(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
_X_EXPORT void
|
|
||||||
xf86EnableInterrupts()
|
|
||||||
{
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
{
|
|
||||||
if (SET_IOPL() < 0)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
__asm__ __volatile__("sti");
|
|
||||||
#else
|
|
||||||
asm("sti");
|
|
||||||
#endif /* __GNUC__ */
|
|
||||||
|
|
||||||
if (!ExtendedEnabled)
|
|
||||||
{
|
|
||||||
RESET_IOPL();
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
|
@ -146,8 +146,6 @@ extern void xf86MapReadSideEffects(int, int, pointer, unsigned long);
|
||||||
extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int);
|
extern int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int);
|
||||||
extern Bool xf86EnableIO(void);
|
extern Bool xf86EnableIO(void);
|
||||||
extern void xf86DisableIO(void);
|
extern void xf86DisableIO(void);
|
||||||
extern Bool xf86DisableInterrupts(void);
|
|
||||||
extern void xf86EnableInterrupts(void);
|
|
||||||
extern void xf86SetTVOut(int);
|
extern void xf86SetTVOut(int);
|
||||||
extern void xf86SetRGBOut(void);
|
extern void xf86SetRGBOut(void);
|
||||||
extern void xf86OSRingBell(int, int, int);
|
extern void xf86OSRingBell(int, int, int);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user