diff options
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/common/compiler.h | 67 | ||||
-rw-r--r-- | hw/xfree86/os-support/bsd/Makefile.am | 3 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/Makefile.am | 12 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/lnx_video.c | 27 | ||||
-rw-r--r-- | hw/xfree86/os-support/meson.build | 1 |
5 files changed, 50 insertions, 60 deletions
diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h index eea29dfb5..7144c6a27 100644 --- a/hw/xfree86/common/compiler.h +++ b/hw/xfree86/common/compiler.h @@ -986,33 +986,64 @@ inl(unsigned PORT_SIZE port) #endif #ifdef __alpha__ -/* entry points for Mmio memory access routines */ -extern _X_EXPORT int (*xf86ReadMmio8) (void *, unsigned long); -extern _X_EXPORT int (*xf86ReadMmio16) (void *, unsigned long); -extern _X_EXPORT int (*xf86ReadMmio32) (void *, unsigned long); -extern _X_EXPORT void (*xf86WriteMmio8) (int, void *, unsigned long); -extern _X_EXPORT void (*xf86WriteMmio16) (int, void *, unsigned long); -extern _X_EXPORT void (*xf86WriteMmio32) (int, void *, unsigned long); +static inline int +xf86ReadMmio8(void *Base, unsigned long Offset) +{ + mem_barrier(); + return *(CARD8 *) ((unsigned long) Base + (Offset)); +} + +static inline int +xf86ReadMmio16(void *Base, unsigned long Offset) +{ + mem_barrier(); + return *(CARD16 *) ((unsigned long) Base + (Offset)); +} + +static inline int +xf86ReadMmio32(void *Base, unsigned long Offset) +{ + mem_barrier(); + return *(CARD32 *) ((unsigned long) Base + (Offset)); +} + +static inline void +xf86WriteMmio8(int Value, void *Base, unsigned long Offset) +{ + write_mem_barrier(); + *(CARD8 *) ((unsigned long) Base + (Offset)) = Value; +} + +static inline void +xf86WriteMmio16(int Value, void *Base, unsigned long Offset) +{ + write_mem_barrier(); + *(CARD16 *) ((unsigned long) Base + (Offset)) = Value; +} + +static inline void +xf86WriteMmio32(int Value, void *Base, unsigned long Offset) +{ + write_mem_barrier(); + *(CARD32 *) ((unsigned long) Base + (Offset)) = Value; +} + extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); /* Some macros to hide the system dependencies for MMIO accesses */ /* Changed to kill noise generated by gcc's -Wcast-align */ -#define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset) -#define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset) -#define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset) - -#define MMIO_OUT32(base, offset, val) \ - do { \ - write_mem_barrier(); \ - *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \ - } while (0) +#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) +#define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) +#define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) #define MMIO_OUT8(base, offset, val) \ - (*xf86WriteMmio8)((CARD8)(val), base, offset) + xf86WriteMmio8((CARD8)(val), base, offset) #define MMIO_OUT16(base, offset, val) \ - (*xf86WriteMmio16)((CARD16)(val), base, offset) + xf86WriteMmio16((CARD16)(val), base, offset) +#define MMIO_OUT32(base, offset, val) \ + xf86WriteMmio32((CARD32)(val), base, offset) #elif defined(__powerpc__) || defined(__sparc__) /* diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am index b01ea5bca..66ac83805 100644 --- a/hw/xfree86/os-support/bsd/Makefile.am +++ b/hw/xfree86/os-support/bsd/Makefile.am @@ -26,8 +26,7 @@ endif if ALPHA_VIDEO # Cheat here and piggyback other alpha bits on ALPHA_VIDEO. ARCH_SOURCES = \ - alpha_video.c \ - bsd_ev56.c + alpha_video.c endif if ARM_VIDEO diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am index 26e40bb93..9b4535b53 100644 --- a/hw/xfree86/os-support/linux/Makefile.am +++ b/hw/xfree86/os-support/linux/Makefile.am @@ -1,13 +1,5 @@ noinst_LTLIBRARIES = liblinux.la -if LINUX_ALPHA -noinst_LTLIBRARIES += liblinuxev56.la - -liblinuxev56_la_CFLAGS = $(AM_CFLAGS) -mcpu=ev56 - -liblinuxev56_la_SOURCES = lnx_ev56.c -endif - if LNXACPI ACPI_SRCS = lnx_acpi.c if !LNXAPM @@ -39,7 +31,3 @@ liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) - -if LINUX_ALPHA -liblinux_la_LIBADD = liblinuxev56.la -endif diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index c09d71947..04e45092a 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -166,30 +166,3 @@ xf86DisableIO(void) ExtendedEnabled = FALSE; } - -#if defined (__alpha__) - -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 - writeDense8(int Value, void *Base, register unsigned long Offset); -extern void - writeDense16(int Value, void *Base, register unsigned long Offset); -extern void - writeDense32(int Value, void *Base, register unsigned long Offset); - -void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) - = writeDense8; -void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) - = writeDense16; -void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) - = writeDense32; -int (*xf86ReadMmio8) (void *Base, unsigned long Offset) - = readDense8; -int (*xf86ReadMmio16) (void *Base, unsigned long Offset) - = readDense16; -int (*xf86ReadMmio32) (void *Base, unsigned long Offset) - = readDense32; - -#endif /* __alpha__ */ diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build index 901422786..b6e5c975d 100644 --- a/hw/xfree86/os-support/meson.build +++ b/hw/xfree86/os-support/meson.build @@ -100,7 +100,6 @@ elif host_machine.system().endswith('bsd') srcs_xorg_os_support += 'shared/ioperm_noop.c' elif host_machine.cpu_family() == 'alpha' srcs_xorg_os_support += 'bsd/alpha_video.c' - srcs_xorg_os_support += 'bsd/bsd_ev56.c' endif if host_machine.system() == 'freebsd' |