diff options
Diffstat (limited to 'xorg-server/hw/xfree86/os-support/linux')
7 files changed, 92 insertions, 93 deletions
diff --git a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c index 8bca37524..6181eb9c5 100644 --- a/xorg-server/hw/xfree86/os-support/linux/int10/linux.c +++ b/xorg-server/hw/xfree86/os-support/linux/int10/linux.c @@ -18,7 +18,7 @@ #define DEV_MEM "/dev/mem" #endif #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1) -#define SHMERRORPTR (pointer)(-1) +#define SHMERRORPTR (void *)(-1) #include <fcntl.h> #include <errno.h> @@ -153,9 +153,9 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) goto error0; pInt->mem = &linuxMem; pagesize = getpagesize(); - pInt->private = (pointer) xnfcalloc(1, sizeof(linuxInt10Priv)); + pInt->private = (void *) xnfcalloc(1, sizeof(linuxInt10Priv)); ((linuxInt10Priv *) pInt->private)->alloc = - (pointer) xnfcalloc(1, ALLOC_ENTRIES(pagesize)); + (void *) xnfcalloc(1, ALLOC_ENTRIES(pagesize)); if (!xf86IsEntityPrimary(entityIndex)) { DebugF("Mapping high memory area\n"); @@ -233,10 +233,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) * 64K bytes at a time. */ if (!videoBiosMapped) { - memset((pointer) V_BIOS, 0, SYS_BIOS - V_BIOS); + memset((void *) V_BIOS, 0, SYS_BIOS - V_BIOS); DebugF("Reading BIOS\n"); for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) - if (xf86ReadBIOS(cs, 0, (pointer) cs, V_BIOS_SIZE) < V_BIOS_SIZE) + if (xf86ReadBIOS(cs, 0, (void *) cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x%06lX.\n", (long) cs); @@ -319,7 +319,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) Bool MapCurrentInt10(xf86Int10InfoPtr pInt) { - pointer addr; + void *addr; int fd = -1; if (Int10Current) { @@ -327,7 +327,7 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) if (((linuxInt10Priv *) Int10Current->private)->highMem >= 0) shmdt((char *) HIGH_MEM); else - munmap((pointer) V_BIOS, (SYS_BIOS - V_BIOS)); + munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS)); } addr = shmat(((linuxInt10Priv *) pInt->private)->lowMem, (char *) 1, SHM_RND); @@ -392,7 +392,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt) if (((linuxInt10Priv *) pInt->private)->highMem >= 0) shmdt((char *) HIGH_MEM); else - munmap((pointer) V_BIOS, (SYS_BIOS - V_BIOS)); + munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS)); Int10Current = NULL; } @@ -486,22 +486,22 @@ write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) *((CARD32 *) (memType) addr) = val; } -pointer +void * xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) { if (addr < V_RAM) return ((linuxInt10Priv *) pInt->private)->base + addr; else if (addr < V_BIOS) - return (pointer) (memType) addr; + return (void *) (memType) addr; else if (addr < SYS_BIOS) { if (((linuxInt10Priv *) pInt->private)->base_high) - return (pointer) (((linuxInt10Priv *) pInt->private)->base_high + return (void *) (((linuxInt10Priv *) pInt->private)->base_high - V_BIOS + addr); else - return (pointer) (memType) addr; + return (void *) (memType) addr; } else - return (pointer) (memType) addr; + return (void *) (memType) addr; } #if defined DoSubModules diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c index dcaa19ee1..dbd5afe90 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_acpi.c @@ -33,14 +33,14 @@ #define ACPI_VIDEO_HEAD_END (~0u) static void lnxCloseACPI(void); -static pointer ACPIihPtr = NULL; +static void *ACPIihPtr = NULL; PMClose lnxACPIOpen(void); /* in milliseconds */ #define ACPI_REOPEN_DELAY 1000 static CARD32 -lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) +lnxACPIReopen(OsTimerPtr timer, CARD32 time, void *arg) { if (lnxACPIOpen()) { TimerFree(timer); @@ -74,13 +74,12 @@ lnxACPIGetEventFromOs(int fd, pmEvent * events, int num) /* Check that we have a video event */ if (!strncmp(ev, "video", 5)) { - char *video = NULL; char *GFX = NULL; char *notify = NULL; char *data = NULL; /* doesn't appear to be used in the kernel */ - unsigned long int notify_l, data_l; + unsigned long int notify_l; - video = strtok(ev, " "); + strtok(ev, " "); if (!(GFX = strtok(NULL, " "))) return 0; @@ -97,8 +96,8 @@ lnxACPIGetEventFromOs(int fd, pmEvent * events, int num) if (!(data = strtok(NULL, " "))) return 0; - data_l = strtoul(data, NULL, 16); #if 0 + data_l = strtoul(data, NULL, 16); ErrorF("data: 0x%lx\n", data_l); #endif diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c index 387934099..621691997 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_apm.c @@ -36,7 +36,7 @@ extern PMClose lnxACPIOpen(void); static PMClose lnxAPMOpen(void); static void lnxCloseAPM(void); -static pointer APMihPtr = NULL; +static void *APMihPtr = NULL; static struct { apm_event_t apmLinux; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c index 49950705a..b6950009c 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_ev56.c @@ -6,77 +6,77 @@ #include "xf86.h" #include "compiler.h" -int readDense8(pointer Base, register unsigned long Offset); -int readDense16(pointer Base, register unsigned long Offset); -int readDense32(pointer Base, register unsigned long Offset); +int readDense8(void *Base, register unsigned long Offset); +int readDense16(void *Base, register unsigned long Offset); +int readDense32(void *Base, register unsigned long Offset); void - writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, void *Base, register unsigned long Offset); void - writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, void *Base, register unsigned long Offset); void - writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, void *Base, register unsigned long Offset); void - writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, void *Base, register unsigned long Offset); void - writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, void *Base, register unsigned long Offset); void - writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, void *Base, register unsigned long Offset); int -readDense8(pointer Base, register unsigned long Offset) +readDense8(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD8 *) ((unsigned long) Base + (Offset)); } int -readDense16(pointer Base, register unsigned long Offset) +readDense16(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD16 *) ((unsigned long) Base + (Offset)); } int -readDense32(pointer Base, register unsigned long Offset) +readDense32(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD32 *) ((unsigned long) Base + (Offset)); } void -writeDenseNB8(int Value, pointer Base, register unsigned long Offset) +writeDenseNB8(int Value, void *Base, register unsigned long Offset) { *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDenseNB16(int Value, pointer Base, register unsigned long Offset) +writeDenseNB16(int Value, void *Base, register unsigned long Offset) { *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDenseNB32(int Value, pointer Base, register unsigned long Offset) +writeDenseNB32(int Value, void *Base, register unsigned long Offset) { *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense8(int Value, pointer Base, register unsigned long Offset) +writeDense8(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense16(int Value, pointer Base, register unsigned long Offset) +writeDense16(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense32(int Value, pointer Base, register unsigned long Offset) +writeDense32(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c index bcb039f3f..e2e8d0826 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c @@ -83,8 +83,8 @@ xf86OpenConsole(void) struct vt_mode VT; struct vt_stat vts; MessageType from = X_PROBED; - char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; - char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; + const char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; + const char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; if (serverGeneration == 1) { diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c index 0a17c2a81..f5917eefb 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_kmod.c @@ -37,7 +37,7 @@ int xf86LoadKernelModule(const char *modName) { char mpPath[MAX_PATH] = ""; - int fd = -1, status, n; + int fd = -1, status; pid_t pid; /* get the path to the modprobe program */ @@ -76,7 +76,7 @@ xf86LoadKernelModule(const char *modName) "Setting of real/effective user Id to 0/0 failed"); } setenv("PATH", "/sbin", 1); - n = execl(mpPath, "modprobe", modName, NULL); + execl(mpPath, "modprobe", modName, NULL); xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno)); exit(EXIT_FAILURE); /* if we get here the child's exec failed */ break; diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c index 43d0a364a..824003d26 100644 --- a/xorg-server/hw/xfree86/os-support/linux/lnx_video.c +++ b/xorg-server/hw/xfree86/os-support/linux/lnx_video.c @@ -80,17 +80,17 @@ extern int iopl(int __level); /* Video Memory Mapping section */ /***************************************************************************/ -static pointer mapVidMem(int, unsigned long, unsigned long, int); -static void unmapVidMem(int, pointer, unsigned long); +static void *mapVidMem(int, unsigned long, unsigned long, int); +static void unmapVidMem(int, void *, unsigned long); #if defined (__alpha__) extern void sethae(unsigned long hae); extern unsigned long _bus_base __P((void)) __attribute__ ((const)); extern unsigned long _bus_base_sparse __P((void)) __attribute__ ((const)); -static pointer mapVidMemSparse(int, unsigned long, unsigned long, int); +static void *mapVidMemSparse(int, unsigned long, unsigned long, int); extern axpDevice lnxGetAXP(void); -static void unmapVidMemSparse(int, pointer, unsigned long); +static void unmapVidMemSparse(int, void *, unsigned long); static axpDevice axpSystem = -1; static Bool needSparse; static unsigned long hae_thresh; @@ -102,8 +102,8 @@ static unsigned long bus_base; #define SPLIT_WC_REGIONS 1 -static pointer setWC(int, unsigned long, unsigned long, Bool, MessageType); -static void undoWC(int, pointer); +static void *setWC(int, unsigned long, unsigned long, Bool, MessageType); +static void undoWC(int, void *); /* The file desc for /proc/mtrr. Once opened, left opened, and the mtrr driver will clean up when we exit. */ @@ -339,7 +339,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr) } } -static pointer +static void * setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, MessageType from) { @@ -350,7 +350,7 @@ setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, } static void -undoWC(int screenNum, pointer regioninfo) +undoWC(int screenNum, void *regioninfo) { mtrr_undo_wc_region(screenNum, regioninfo); } @@ -396,16 +396,16 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) /* Basically, you simply cannot do this on Sparc. You have to do something portable * like use /dev/fb* or mmap() on /proc/bus/pci/X/Y nodes. -DaveM */ -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { return NULL; } #else -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { - pointer base; + void *base; int fd; int mapflags = MAP_SHARED; int prot; @@ -460,7 +460,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) #endif /* !(__sparc__) */ static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMem(int ScreenNum, void *Base, unsigned long Size) { uintptr_t alignOff = (uintptr_t) Base - ((uintptr_t) Base & ~(getpagesize() - 1)); @@ -565,44 +565,44 @@ xf86DisableIO(void) #define vuip volatile unsigned int * -extern int readDense8(pointer Base, register unsigned long Offset); -extern int readDense16(pointer Base, register unsigned long Offset); -extern int readDense32(pointer Base, register unsigned long Offset); +extern int readDense8(void *Base, register unsigned long Offset); +extern int readDense16(void *Base, register unsigned long Offset); +extern int readDense32(void *Base, register unsigned long Offset); extern void - writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, void *Base, register unsigned long Offset); extern void - writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, void *Base, register unsigned long Offset); extern void - writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, void *Base, register unsigned long Offset); extern void - writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, void *Base, register unsigned long Offset); extern void - writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, void *Base, register unsigned long Offset); extern void - writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, void *Base, register unsigned long Offset); -static int readSparse8(pointer Base, register unsigned long Offset); -static int readSparse16(pointer Base, register unsigned long Offset); -static int readSparse32(pointer Base, register unsigned long Offset); +static int readSparse8(void *Base, register unsigned long Offset); +static int readSparse16(void *Base, register unsigned long Offset); +static int readSparse32(void *Base, register unsigned long Offset); static void - writeSparseNB8(int Value, pointer Base, register unsigned long Offset); + writeSparseNB8(int Value, void *Base, register unsigned long Offset); static void - writeSparseNB16(int Value, pointer Base, register unsigned long Offset); + writeSparseNB16(int Value, void *Base, register unsigned long Offset); static void - writeSparseNB32(int Value, pointer Base, register unsigned long Offset); + writeSparseNB32(int Value, void *Base, register unsigned long Offset); static void - writeSparse8(int Value, pointer Base, register unsigned long Offset); + writeSparse8(int Value, void *Base, register unsigned long Offset); static void - writeSparse16(int Value, pointer Base, register unsigned long Offset); + writeSparse16(int Value, void *Base, register unsigned long Offset); static void - writeSparse32(int Value, pointer Base, register unsigned long Offset); + writeSparse32(int Value, void *Base, register unsigned long Offset); #define DENSE_BASE 0x2ff00000000UL #define SPARSE_BASE 0x30000000000UL static unsigned long msb_set = 0; -static pointer +static void * mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { @@ -689,11 +689,11 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, " to DENSE only at 0x%lx\n", Base, Size, ret); #endif - return (pointer) ret; + return (void *) ret; } static void -unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMemSparse(int ScreenNum, void *Base, unsigned long Size) { unsigned long Offset = (unsigned long) Base - DENSE_BASE; @@ -709,7 +709,7 @@ unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size) } static int -readSparse8(pointer Base, register unsigned long Offset) +readSparse8(void *Base, register unsigned long Offset) { register unsigned long result, shift; register unsigned long msb; @@ -733,7 +733,7 @@ readSparse8(pointer Base, register unsigned long Offset) } static int -readSparse16(pointer Base, register unsigned long Offset) +readSparse16(void *Base, register unsigned long Offset) { register unsigned long result, shift; register unsigned long msb; @@ -757,7 +757,7 @@ readSparse16(pointer Base, register unsigned long Offset) } static int -readSparse32(pointer Base, register unsigned long Offset) +readSparse32(void *Base, register unsigned long Offset) { /* NOTE: this is really using DENSE. */ mem_barrier(); @@ -765,7 +765,7 @@ readSparse32(pointer Base, register unsigned long Offset) } static void -writeSparse8(int Value, pointer Base, register unsigned long Offset) +writeSparse8(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int b = Value & 0xffU; @@ -786,7 +786,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset) } static void -writeSparse16(int Value, pointer Base, register unsigned long Offset) +writeSparse16(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int w = Value & 0xffffU; @@ -807,7 +807,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset) } static void -writeSparse32(int Value, pointer Base, register unsigned long Offset) +writeSparse32(int Value, void *Base, register unsigned long Offset) { /* NOTE: this is really using DENSE. */ write_mem_barrier(); @@ -816,7 +816,7 @@ writeSparse32(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB8(int Value, pointer Base, register unsigned long Offset) +writeSparseNB8(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int b = Value & 0xffU; @@ -834,7 +834,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB16(int Value, pointer Base, register unsigned long Offset) +writeSparseNB16(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int w = Value & 0xffffU; @@ -852,30 +852,30 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB32(int Value, pointer Base, register unsigned long Offset) +writeSparseNB32(int Value, void *Base, register unsigned long Offset) { /* NOTE: this is really using DENSE. */ *(vuip) ((unsigned long) Base + (Offset)) = Value; return; } -void (*xf86WriteMmio8) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) = writeDense8; -void (*xf86WriteMmio16) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) = writeDense16; -void (*xf86WriteMmio32) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) = writeDense32; -void (*xf86WriteMmioNB8) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset) = writeDenseNB8; -void (*xf86WriteMmioNB16) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset) = writeDenseNB16; -void (*xf86WriteMmioNB32) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset) = writeDenseNB32; -int (*xf86ReadMmio8) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio8) (void *Base, unsigned long Offset) = readDense8; -int (*xf86ReadMmio16) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio16) (void *Base, unsigned long Offset) = readDense16; -int (*xf86ReadMmio32) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio32) (void *Base, unsigned long Offset) = readDense32; #endif /* __alpha__ */ |