diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2024-03-13 13:27:44 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-17 01:43:30 +0000 |
commit | e37bcac1dc7ae8058fca0b5087bbfe89624d596e (patch) | |
tree | 6540dd30bd807e7a80ab750f93952baf78c1dbd0 | |
parent | a0b69624f779aa4f5ef8cdec15d24e89063f49a5 (diff) |
xfree86: linux: int10: drop dead code
The code pieces inside `ifdef DoSubModule` aren't used anymore since very
long time. There's no evidence of this symbol ever been set in the whole
git history, so it must be an really ancient relic, that nobody used for
decades.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1400>
-rw-r--r-- | hw/xfree86/os-support/linux/int10/linux.c | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 6ca118f25..42f872dd2 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -55,21 +55,6 @@ typedef struct { char *alloc; } linuxInt10Priv; -#if defined DoSubModules - -typedef enum { - INT10_NOT_LOADED, - INT10_LOADED_VM86, - INT10_LOADED_X86EMU, - INT10_LOAD_FAILED -} Int10LinuxSubModuleState; - -static Int10LinuxSubModuleState loadedSubModule = INT10_NOT_LOADED; - -static Int10LinuxSubModuleState int10LinuxLoadSubModule(ScrnInfoPtr pScrn); - -#endif /* DoSubModules */ - static Bool readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len) { @@ -118,14 +103,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) return NULL; } -#if defined DoSubModules - if (loadedSubModule == INT10_NOT_LOADED) - loadedSubModule = int10LinuxLoadSubModule(pScrn); - - if (loadedSubModule == INT10_LOAD_FAILED) - return NULL; -#endif - if ((!vidMem) || (!sysMem)) { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (!sysMem) { @@ -518,44 +495,3 @@ xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) else return (void *) (memType) addr; } - -#if defined DoSubModules - -static Bool -vm86_tst(void) -{ - int __res; - -#ifdef __PIC__ - /* When compiling with -fPIC, we can't use asm constraint "b" because - %ebx is already taken by gcc. */ - __asm__ __volatile__("pushl %%ebx\n\t" - "movl %2,%%ebx\n\t" - "movl %1,%%eax\n\t" - "int $0x80\n\t" "popl %%ebx":"=a"(__res) - :"n"((int) 113), "r"(NULL)); -#else - __asm__ __volatile__("int $0x80\n\t":"=a"(__res):"a"((int) 113), - "b"((struct vm86_struct *) NULL)); -#endif - - if (__res < 0 && __res == -ENOSYS) - return FALSE; - - return TRUE; -} - -static Int10LinuxSubModuleState -int10LinuxLoadSubModule(ScrnInfoPtr pScrn) -{ - if (vm86_tst()) { - if (xf86LoadSubModule(pScrn, "vm86")) - return INT10_LOADED_VM86; - } - if (xf86LoadSubModule(pScrn, "x86emu")) - return INT10_LOADED_X86EMU; - - return INT10_LOAD_FAILED; -} - -#endif /* DoSubModules */ |