public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Matt Turner" <mattst88@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/, x11-base/xorg-server/files/
Date: Mon, 11 Jun 2018 02:48:21 +0000 (UTC)	[thread overview]
Message-ID: <1528685281.2b48a745f377d884219c60a6169a1aee94b59975.mattst88@gentoo> (raw)

commit:     2b48a745f377d884219c60a6169a1aee94b59975
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 11 02:45:35 2018 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Mon Jun 11 02:48:01 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b48a745

x11-base/xorg-server: Apply patch to fix module loading on alpha

Closes: https://bugs.gentoo.org/548906

 ...ine-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch | 224 +++++++++++++++++++++
 x11-base/xorg-server/xorg-server-1.20.0.ebuild     |   2 +
 2 files changed, 226 insertions(+)

diff --git a/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch b/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch
new file mode 100644
index 00000000000..ebf677ae9c4
--- /dev/null
+++ b/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch
@@ -0,0 +1,224 @@
+From eecedfffd40f0465d85347f14547ddc6b30e57df Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Tue, 22 May 2018 21:10:55 -0700
+Subject: [PATCH xserver] xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on
+ alpha
+
+In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we
+somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the
+function pointer indirection was intended to support dense vs sparse and
+sparse support is now gone, we can just make the functions static inline
+in compiler.h and avoid all of this.
+
+Bugzilla: https://bugs.gentoo.org/548906
+Tested-by: Christopher May-Townsend <chris@maytownsend.co.uk>
+Reviewed-by: Adam Jackson <ajax@redhat.com>
+Signed-off-by: Matt Turner <mattst88@gmail.com>
+---
+ configure.ac                            |  4 --
+ hw/xfree86/common/compiler.h            | 67 ++++++++++++++++++++++++---------
+ hw/xfree86/os-support/bsd/Makefile.am   |  3 +-
+ hw/xfree86/os-support/linux/Makefile.am | 12 ------
+ hw/xfree86/os-support/linux/lnx_video.c | 27 -------------
+ hw/xfree86/os-support/meson.build       |  1 -
+ 6 files changed, 50 insertions(+), 64 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index ddc47faa2..0075b6ace 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1908,9 +1908,6 @@ if test "x$XORG" = xyes; then
+ 		XORG_OS_SUBDIR="linux"
+ 		linux_acpi="no"
+ 		case $host_cpu in
+-		  alpha*)
+-		  	linux_alpha=yes
+-			;;
+ 		  i*86|amd64*|x86_64*|ia64*)
+ 			linux_acpi=$enable_linux_acpi
+ 			;;
+@@ -2075,7 +2072,6 @@ AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
+ AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes])
+ AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes])
+ AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes])
+-AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
+ AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
+ AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes])
+ AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
+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'
+-- 
+2.16.1
+

diff --git a/x11-base/xorg-server/xorg-server-1.20.0.ebuild b/x11-base/xorg-server/xorg-server-1.20.0.ebuild
index a7c996e78fd..0fa84f249ca 100644
--- a/x11-base/xorg-server/xorg-server-1.20.0.ebuild
+++ b/x11-base/xorg-server/xorg-server-1.20.0.ebuild
@@ -3,6 +3,7 @@
 
 EAPI=5
 
+XORG_EAUTORECONF=yes
 XORG_DOC=doc
 inherit xorg-2 multilib versionator flag-o-matic
 EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git"
@@ -109,6 +110,7 @@ REQUIRED_USE="!minimal? (
 	xephyr? ( kdrive )"
 
 UPSTREAMED_PATCHES=(
+	"${FILESDIR}"/${P}-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch
 )
 
 PATCHES=(


             reply	other threads:[~2018-06-11  2:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11  2:48 Matt Turner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-05-21 11:48 [gentoo-commits] repo/gentoo:master commit in: x11-base/xorg-server/, x11-base/xorg-server/files/ Sam James
2024-01-17 16:36 Matt Turner
2023-07-22 17:24 Matt Turner
2023-02-26 23:45 Matt Turner
2022-12-05 10:21 Sam James
2022-06-03  8:38 Sam James
2022-04-21 18:49 Sam James
2021-12-21  0:51 Sam James
2020-06-24 20:13 Matt Turner
2019-01-20  5:43 Matt Turner
2018-11-01  7:06 Matt Turner
2018-11-01  6:25 Matt Turner
2018-10-01 22:52 Matt Turner
2018-04-17  1:35 Matt Turner
2018-04-15 23:07 Matt Turner
2017-11-23  5:11 Matt Turner
2017-10-11 21:53 Mart Raudsepp
2017-03-15 19:57 Matt Turner
2017-02-25 20:43 Matt Turner
2016-12-28  1:35 Mike Frysinger
2016-01-23 14:17 Manuel Rüger
2015-09-03 15:58 Chí-Thanh Christopher Nguyễn
2015-08-22 20:11 Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1528685281.2b48a745f377d884219c60a6169a1aee94b59975.mattst88@gentoo \
    --to=mattst88@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox