summaryrefslogtreecommitdiff
path: root/hw/xfree86/os-support/linux
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-06-18 12:08:39 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-06-18 12:08:39 -0400
commit2e7fef7d0837939e822c40b6ac77e7f0e66d57bd (patch)
tree539696b98835b76604b0f3be67b8406248fd119e /hw/xfree86/os-support/linux
parent831d3b7f8d053aba649c8d04af3bef96376bdc3a (diff)
Make xf86{En,Dis}ableInterrupts no-ops on Linux.
Diffstat (limited to 'hw/xfree86/os-support/linux')
-rw-r--r--hw/xfree86/os-support/linux/lnx_video.c62
1 files changed, 5 insertions, 57 deletions
diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
index a81656053..0bc99b038 100644
--- a/hw/xfree86/os-support/linux/lnx_video.c
+++ b/hw/xfree86/os-support/linux/lnx_video.c
@@ -604,73 +604,21 @@ xf86DisableIO(void)
return;
}
-
-/***************************************************************************/
-/* Interrupt Handling section */
-/***************************************************************************/
-
-/* XXX The #ifdefs should be made simpler. */
+/*
+ * 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()
{
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
- if (!ExtendedEnabled)
- if (iopl(3) || ioperm(0, 1024, 1))
- return (FALSE);
-#endif
-#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__)
-#else
-# ifdef __GNUC__
-# if defined(__ia64__)
-# if 0
- __asm__ __volatile__ (";; rsm psr.i;; srlz.d" ::: "memory");
-# endif
-# else
- __asm__ __volatile__("cli");
-# endif
-# else
- asm("cli");
-# endif
-#endif
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
- if (!ExtendedEnabled) {
- iopl(0);
- ioperm(0, 1024, 0);
- }
-
-#endif
return (TRUE);
}
_X_EXPORT void
xf86EnableInterrupts()
{
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__ia64__) && !defined(__sh__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
- if (!ExtendedEnabled)
- if (iopl(3) || ioperm(0, 1024, 1))
- return;
-#endif
-#if defined(__alpha__) || defined(__mc68000__) || defined(__powerpc__) || defined(__sparc__) || defined(__mips__) || defined(__arm__) || defined(__sh__) || defined(__ia64__) || defined(__hppa__) || defined(__s390__)
-#else
-# ifdef __GNUC__
-# if defined(__ia64__)
-# if 0
- __asm__ __volatile__ (";; ssm psr.i;; srlz.d" ::: "memory");
-# endif
-# else
- __asm__ __volatile__("sti");
-# endif
-# else
- asm("sti");
-# endif
-#endif
-#if !defined(__mc68000__) && !defined(__powerpc__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__ia64__) && !defined(__hppa__) && !defined(__arm__) && !defined(__s390__)
- if (!ExtendedEnabled) {
- iopl(0);
- ioperm(0, 1024, 0);
- }
-#endif
return;
}