1 |
commit: 2b48a745f377d884219c60a6169a1aee94b59975 |
2 |
Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 11 02:45:35 2018 +0000 |
4 |
Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 11 02:48:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b48a745 |
7 |
|
8 |
x11-base/xorg-server: Apply patch to fix module loading on alpha |
9 |
|
10 |
Closes: https://bugs.gentoo.org/548906 |
11 |
|
12 |
...ine-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch | 224 +++++++++++++++++++++ |
13 |
x11-base/xorg-server/xorg-server-1.20.0.ebuild | 2 + |
14 |
2 files changed, 226 insertions(+) |
15 |
|
16 |
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 |
17 |
new file mode 100644 |
18 |
index 00000000000..ebf677ae9c4 |
19 |
--- /dev/null |
20 |
+++ b/x11-base/xorg-server/files/xorg-server-1.20.0-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch |
21 |
@@ -0,0 +1,224 @@ |
22 |
+From eecedfffd40f0465d85347f14547ddc6b30e57df Mon Sep 17 00:00:00 2001 |
23 |
+From: Matt Turner <mattst88@×××××.com> |
24 |
+Date: Tue, 22 May 2018 21:10:55 -0700 |
25 |
+Subject: [PATCH xserver] xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on |
26 |
+ alpha |
27 |
+ |
28 |
+In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we |
29 |
+somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the |
30 |
+function pointer indirection was intended to support dense vs sparse and |
31 |
+sparse support is now gone, we can just make the functions static inline |
32 |
+in compiler.h and avoid all of this. |
33 |
+ |
34 |
+Bugzilla: https://bugs.gentoo.org/548906 |
35 |
+Tested-by: Christopher May-Townsend <chris@××××××××××××××.uk> |
36 |
+Reviewed-by: Adam Jackson <ajax@××××××.com> |
37 |
+Signed-off-by: Matt Turner <mattst88@×××××.com> |
38 |
+--- |
39 |
+ configure.ac | 4 -- |
40 |
+ hw/xfree86/common/compiler.h | 67 ++++++++++++++++++++++++--------- |
41 |
+ hw/xfree86/os-support/bsd/Makefile.am | 3 +- |
42 |
+ hw/xfree86/os-support/linux/Makefile.am | 12 ------ |
43 |
+ hw/xfree86/os-support/linux/lnx_video.c | 27 ------------- |
44 |
+ hw/xfree86/os-support/meson.build | 1 - |
45 |
+ 6 files changed, 50 insertions(+), 64 deletions(-) |
46 |
+ |
47 |
+diff --git a/configure.ac b/configure.ac |
48 |
+index ddc47faa2..0075b6ace 100644 |
49 |
+--- a/configure.ac |
50 |
++++ b/configure.ac |
51 |
+@@ -1908,9 +1908,6 @@ if test "x$XORG" = xyes; then |
52 |
+ XORG_OS_SUBDIR="linux" |
53 |
+ linux_acpi="no" |
54 |
+ case $host_cpu in |
55 |
+- alpha*) |
56 |
+- linux_alpha=yes |
57 |
+- ;; |
58 |
+ i*86|amd64*|x86_64*|ia64*) |
59 |
+ linux_acpi=$enable_linux_acpi |
60 |
+ ;; |
61 |
+@@ -2075,7 +2072,6 @@ AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) |
62 |
+ AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes]) |
63 |
+ AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes]) |
64 |
+ AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) |
65 |
+-AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes]) |
66 |
+ AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) |
67 |
+ AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes]) |
68 |
+ AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes]) |
69 |
+diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h |
70 |
+index eea29dfb5..7144c6a27 100644 |
71 |
+--- a/hw/xfree86/common/compiler.h |
72 |
++++ b/hw/xfree86/common/compiler.h |
73 |
+@@ -986,33 +986,64 @@ inl(unsigned PORT_SIZE port) |
74 |
+ #endif |
75 |
+ |
76 |
+ #ifdef __alpha__ |
77 |
+-/* entry points for Mmio memory access routines */ |
78 |
+-extern _X_EXPORT int (*xf86ReadMmio8) (void *, unsigned long); |
79 |
+-extern _X_EXPORT int (*xf86ReadMmio16) (void *, unsigned long); |
80 |
+-extern _X_EXPORT int (*xf86ReadMmio32) (void *, unsigned long); |
81 |
+-extern _X_EXPORT void (*xf86WriteMmio8) (int, void *, unsigned long); |
82 |
+-extern _X_EXPORT void (*xf86WriteMmio16) (int, void *, unsigned long); |
83 |
+-extern _X_EXPORT void (*xf86WriteMmio32) (int, void *, unsigned long); |
84 |
++static inline int |
85 |
++xf86ReadMmio8(void *Base, unsigned long Offset) |
86 |
++{ |
87 |
++ mem_barrier(); |
88 |
++ return *(CARD8 *) ((unsigned long) Base + (Offset)); |
89 |
++} |
90 |
++ |
91 |
++static inline int |
92 |
++xf86ReadMmio16(void *Base, unsigned long Offset) |
93 |
++{ |
94 |
++ mem_barrier(); |
95 |
++ return *(CARD16 *) ((unsigned long) Base + (Offset)); |
96 |
++} |
97 |
++ |
98 |
++static inline int |
99 |
++xf86ReadMmio32(void *Base, unsigned long Offset) |
100 |
++{ |
101 |
++ mem_barrier(); |
102 |
++ return *(CARD32 *) ((unsigned long) Base + (Offset)); |
103 |
++} |
104 |
++ |
105 |
++static inline void |
106 |
++xf86WriteMmio8(int Value, void *Base, unsigned long Offset) |
107 |
++{ |
108 |
++ write_mem_barrier(); |
109 |
++ *(CARD8 *) ((unsigned long) Base + (Offset)) = Value; |
110 |
++} |
111 |
++ |
112 |
++static inline void |
113 |
++xf86WriteMmio16(int Value, void *Base, unsigned long Offset) |
114 |
++{ |
115 |
++ write_mem_barrier(); |
116 |
++ *(CARD16 *) ((unsigned long) Base + (Offset)) = Value; |
117 |
++} |
118 |
++ |
119 |
++static inline void |
120 |
++xf86WriteMmio32(int Value, void *Base, unsigned long Offset) |
121 |
++{ |
122 |
++ write_mem_barrier(); |
123 |
++ *(CARD32 *) ((unsigned long) Base + (Offset)) = Value; |
124 |
++} |
125 |
++ |
126 |
+ extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, |
127 |
+ int); |
128 |
+ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); |
129 |
+ |
130 |
+ /* Some macros to hide the system dependencies for MMIO accesses */ |
131 |
+ /* Changed to kill noise generated by gcc's -Wcast-align */ |
132 |
+-#define MMIO_IN8(base, offset) (*xf86ReadMmio8)(base, offset) |
133 |
+-#define MMIO_IN16(base, offset) (*xf86ReadMmio16)(base, offset) |
134 |
+-#define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset) |
135 |
+- |
136 |
+-#define MMIO_OUT32(base, offset, val) \ |
137 |
+- do { \ |
138 |
+- write_mem_barrier(); \ |
139 |
+- *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val); \ |
140 |
+- } while (0) |
141 |
++#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) |
142 |
++#define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) |
143 |
++#define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) |
144 |
+ |
145 |
+ #define MMIO_OUT8(base, offset, val) \ |
146 |
+- (*xf86WriteMmio8)((CARD8)(val), base, offset) |
147 |
++ xf86WriteMmio8((CARD8)(val), base, offset) |
148 |
+ #define MMIO_OUT16(base, offset, val) \ |
149 |
+- (*xf86WriteMmio16)((CARD16)(val), base, offset) |
150 |
++ xf86WriteMmio16((CARD16)(val), base, offset) |
151 |
++#define MMIO_OUT32(base, offset, val) \ |
152 |
++ xf86WriteMmio32((CARD32)(val), base, offset) |
153 |
+ |
154 |
+ #elif defined(__powerpc__) || defined(__sparc__) |
155 |
+ /* |
156 |
+diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am |
157 |
+index b01ea5bca..66ac83805 100644 |
158 |
+--- a/hw/xfree86/os-support/bsd/Makefile.am |
159 |
++++ b/hw/xfree86/os-support/bsd/Makefile.am |
160 |
+@@ -26,8 +26,7 @@ endif |
161 |
+ if ALPHA_VIDEO |
162 |
+ # Cheat here and piggyback other alpha bits on ALPHA_VIDEO. |
163 |
+ ARCH_SOURCES = \ |
164 |
+- alpha_video.c \ |
165 |
+- bsd_ev56.c |
166 |
++ alpha_video.c |
167 |
+ endif |
168 |
+ |
169 |
+ if ARM_VIDEO |
170 |
+diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am |
171 |
+index 26e40bb93..9b4535b53 100644 |
172 |
+--- a/hw/xfree86/os-support/linux/Makefile.am |
173 |
++++ b/hw/xfree86/os-support/linux/Makefile.am |
174 |
+@@ -1,13 +1,5 @@ |
175 |
+ noinst_LTLIBRARIES = liblinux.la |
176 |
+ |
177 |
+-if LINUX_ALPHA |
178 |
+-noinst_LTLIBRARIES += liblinuxev56.la |
179 |
+- |
180 |
+-liblinuxev56_la_CFLAGS = $(AM_CFLAGS) -mcpu=ev56 |
181 |
+- |
182 |
+-liblinuxev56_la_SOURCES = lnx_ev56.c |
183 |
+-endif |
184 |
+- |
185 |
+ if LNXACPI |
186 |
+ ACPI_SRCS = lnx_acpi.c |
187 |
+ if !LNXAPM |
188 |
+@@ -39,7 +31,3 @@ liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ |
189 |
+ AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) |
190 |
+ |
191 |
+ AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) |
192 |
+- |
193 |
+-if LINUX_ALPHA |
194 |
+-liblinux_la_LIBADD = liblinuxev56.la |
195 |
+-endif |
196 |
+diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c |
197 |
+index c09d71947..04e45092a 100644 |
198 |
+--- a/hw/xfree86/os-support/linux/lnx_video.c |
199 |
++++ b/hw/xfree86/os-support/linux/lnx_video.c |
200 |
+@@ -166,30 +166,3 @@ xf86DisableIO(void) |
201 |
+ |
202 |
+ ExtendedEnabled = FALSE; |
203 |
+ } |
204 |
+- |
205 |
+-#if defined (__alpha__) |
206 |
+- |
207 |
+-extern int readDense8(void *Base, register unsigned long Offset); |
208 |
+-extern int readDense16(void *Base, register unsigned long Offset); |
209 |
+-extern int readDense32(void *Base, register unsigned long Offset); |
210 |
+-extern void |
211 |
+- writeDense8(int Value, void *Base, register unsigned long Offset); |
212 |
+-extern void |
213 |
+- writeDense16(int Value, void *Base, register unsigned long Offset); |
214 |
+-extern void |
215 |
+- writeDense32(int Value, void *Base, register unsigned long Offset); |
216 |
+- |
217 |
+-void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) |
218 |
+- = writeDense8; |
219 |
+-void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) |
220 |
+- = writeDense16; |
221 |
+-void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) |
222 |
+- = writeDense32; |
223 |
+-int (*xf86ReadMmio8) (void *Base, unsigned long Offset) |
224 |
+- = readDense8; |
225 |
+-int (*xf86ReadMmio16) (void *Base, unsigned long Offset) |
226 |
+- = readDense16; |
227 |
+-int (*xf86ReadMmio32) (void *Base, unsigned long Offset) |
228 |
+- = readDense32; |
229 |
+- |
230 |
+-#endif /* __alpha__ */ |
231 |
+diff --git a/hw/xfree86/os-support/meson.build b/hw/xfree86/os-support/meson.build |
232 |
+index 901422786..b6e5c975d 100644 |
233 |
+--- a/hw/xfree86/os-support/meson.build |
234 |
++++ b/hw/xfree86/os-support/meson.build |
235 |
+@@ -100,7 +100,6 @@ elif host_machine.system().endswith('bsd') |
236 |
+ srcs_xorg_os_support += 'shared/ioperm_noop.c' |
237 |
+ elif host_machine.cpu_family() == 'alpha' |
238 |
+ srcs_xorg_os_support += 'bsd/alpha_video.c' |
239 |
+- srcs_xorg_os_support += 'bsd/bsd_ev56.c' |
240 |
+ endif |
241 |
+ |
242 |
+ if host_machine.system() == 'freebsd' |
243 |
+-- |
244 |
+2.16.1 |
245 |
+ |
246 |
|
247 |
diff --git a/x11-base/xorg-server/xorg-server-1.20.0.ebuild b/x11-base/xorg-server/xorg-server-1.20.0.ebuild |
248 |
index a7c996e78fd..0fa84f249ca 100644 |
249 |
--- a/x11-base/xorg-server/xorg-server-1.20.0.ebuild |
250 |
+++ b/x11-base/xorg-server/xorg-server-1.20.0.ebuild |
251 |
@@ -3,6 +3,7 @@ |
252 |
|
253 |
EAPI=5 |
254 |
|
255 |
+XORG_EAUTORECONF=yes |
256 |
XORG_DOC=doc |
257 |
inherit xorg-2 multilib versionator flag-o-matic |
258 |
EGIT_REPO_URI="https://anongit.freedesktop.org/git/xorg/xserver.git" |
259 |
@@ -109,6 +110,7 @@ REQUIRED_USE="!minimal? ( |
260 |
xephyr? ( kdrive )" |
261 |
|
262 |
UPSTREAMED_PATCHES=( |
263 |
+ "${FILESDIR}"/${P}-xfree86-Inline-xf86-Read-Write-Mmio-8-16-32-on-alpha.patch |
264 |
) |
265 |
|
266 |
PATCHES=( |