[PATCH:xfs 2/2] Replace fsalloc(strlen) + strcpy with strdup

2014-05-21 Thread Alan Coopersmith
Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 difs/extensions.c |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/difs/extensions.c b/difs/extensions.c
index eb31e76..2bb2405 100644
--- a/difs/extensions.c
+++ b/difs/extensions.c
@@ -89,14 +89,13 @@ AddExtension(
 ext = (ExtensionEntry *) fsalloc(sizeof(ExtensionEntry));
 if (!ext)
return ((ExtensionEntry *) 0);
-ext-name = (char *) fsalloc(strlen(name) + 1);
 ext-num_aliases = 0;
 ext-aliases = (char **) NULL;
+ext-name = strdup(name);
 if (!ext-name) {
fsfree(ext);
return ((ExtensionEntry *) 0);
 }
-strcpy(ext-name, name);
 i = NumExtensions;
 newexts = (ExtensionEntry **) fsrealloc(extensions,
 (i + 1) * sizeof(ExtensionEntry *));
@@ -144,10 +143,9 @@ AddExtensionAlias(char *alias, ExtensionEntry *ext)
 if (!aliases)
return FALSE;
 ext-aliases = aliases;
-name = (char *) fsalloc(strlen(alias) + 1);
+name = strdup(alias);
 if (!name)
return FALSE;
-strcpy(name, alias);
 ext-aliases[ext-num_aliases++] = name;
 return TRUE;
 }
-- 
1.7.9.2

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xfs 1/2] Convert remaining sprintf calls to snprintf

2014-05-21 Thread Alan Coopersmith
Removes a bonus unchecked strcat() call as well.

Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com
---
 os/connection.c |4 ++--
 os/osglue.c |   34 +++---
 2 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/os/connection.c b/os/connection.c
index 17c3384..caaa6c4 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -201,7 +201,7 @@ CreateSockets(int old_listen_count, OldListenRec 
*old_listen)
if (old_listen[i].portnum != ListenPort)
continue;   /* this should never happen */
else
-   sprintf (portnum, %d, old_listen[i].portnum);
+   snprintf (portnum, sizeof(portnum), %d, 
old_listen[i].portnum);
 
if ((ListenTransConns[ListenTransCount] =
_FontTransReopenCOTSServer (old_listen[i].trans_id,
@@ -220,7 +220,7 @@ CreateSockets(int old_listen_count, OldListenRec 
*old_listen)
char port[20];
int partial;
 
-   sprintf (port, %d, ListenPort);
+   snprintf (port, sizeof(port), %d, ListenPort);
 
if ((_FontTransMakeAllCOTSServerListeners (port, partial,
ListenTransCount, ListenTransConns) = 0) 
diff --git a/os/osglue.c b/os/osglue.c
index cd4c268..538ab10 100644
--- a/os/osglue.c
+++ b/os/osglue.c
@@ -274,20 +274,14 @@ int
 CloneMyself(void)
 {
 int child;
-charold_listen_arg[256];
-char   *arg_ptr = old_listen_arg;
 int i, j;
 int lastfdesc;
-char   portnum[20];
 
 assert(!drone_server); /* a drone shouldn't hit this */
 
 if (!CloneSelf)
return -1;
 
-
-old_listen_arg[0] = '\0';
-
 lastfdesc = sysconf(_SC_OPEN_MAX) - 1;
 if ( (lastfdesc  0) || (lastfdesc  MAXSOCKS)) {
lastfdesc = MAXSOCKS;
@@ -312,6 +306,9 @@ CloneMyself(void)
drone_server = TRUE;
return 1;
 } else {   /* parent */
+   charold_listen_arg[256];
+   charportnum[8];
+
NoticeF(clone: parent revitalizing as %s\n, progname);
CloseErrors();
/* XXX should we close stdio as well? */
@@ -325,27 +322,34 @@ CloneMyself(void)
(void) close(i);
}
 
+   old_listen_arg[0] = '\0';
+
for (i = 0; i  ListenTransCount; i++)
{
int trans_id, fd;
char *port;
+   size_t arg_len;
 
if (!_FontTransGetReopenInfo (ListenTransConns[i],
trans_id, fd, port))
continue;
 
-   sprintf (arg_ptr, %d/%d/%s, trans_id, fd, port);
-   arg_ptr += strlen (arg_ptr);
-   free (port);
-
-   if (i  ListenTransCount - 1)
-   {
-   strcat (arg_ptr, ,);
-   arg_ptr++;
+   arg_len = strlen(old_listen_arg);
+   if (arg_len  sizeof(old_listen_arg)) {
+   char *arg_ptr = old_listen_arg + arg_len;
+   size_t actual_len;
+   actual_len = snprintf (arg_ptr, sizeof(old_listen_arg) - 
arg_len,
+  %s%d/%d/%s, (arg_len  0) ? , : ,
+  trans_id, fd, port);
+   /* Ensure we don't leave a partial address if we ran out of
+  room in the buffer */
+   if (actual_len = (sizeof(old_listen_arg) - arg_len))
+   *arg_ptr = '\0';
}
+   free (port);
}
 
-   sprintf (portnum, %d, ListenPort);
+   snprintf (portnum, sizeof(portnum), %d, ListenPort);
if (*old_listen_arg != '\0')
execlp(progname, progname,
   -ls, old_listen_arg,
-- 
1.7.9.2

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] shadowfb: Fix initialization

2014-05-21 Thread Adam Jackson
This has to run at initial CreateWindow time, at CreateScreenResources
the root window doesn't actually exist yet.

Tested-by: Michael Thayer michael.tha...@oracle.com
Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/shadowfb/shadow.c | 26 +++---
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 10f72cc..d2481ed 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -29,14 +29,14 @@
 #include picturestr.h
 
 static Bool ShadowCloseScreen(ScreenPtr pScreen);
-static Bool ShadowCreateScreenResources(ScreenPtr pScreen);
+static Bool ShadowCreateRootWindow(WindowPtr pWin);
 
 typedef struct {
 ScrnInfoPtr pScrn;
 RefreshAreaFuncPtr preRefresh;
 RefreshAreaFuncPtr postRefresh;
 CloseScreenProcPtr CloseScreen;
-CreateScreenResourcesProcPtr CreateScreenResources;
+CreateWindowProcPtr CreateWindow;
 } ShadowScreenRec, *ShadowScreenPtr;
 
 static DevPrivateKeyRec ShadowScreenKeyRec;
@@ -71,10 +71,10 @@ ShadowFBInit2(ScreenPtr pScreen,
 pPriv-postRefresh = postRefreshArea;
 
 pPriv-CloseScreen = pScreen-CloseScreen;
-pPriv-CreateScreenResources = pScreen-CreateScreenResources;
+pPriv-CreateWindow = pScreen-CreateWindow;
 
 pScreen-CloseScreen = ShadowCloseScreen;
-pScreen-CreateScreenResources = ShadowCreateScreenResources;
+pScreen-CreateWindow = ShadowCreateRootWindow;
 
 return TRUE;
 }
@@ -117,16 +117,21 @@ shadowfbReportPost(DamagePtr damage, RegionPtr reg, void 
*closure)
 }
 
 static Bool
-ShadowCreateScreenResources(ScreenPtr pScreen)
+ShadowCreateRootWindow(WindowPtr pWin)
 {
 Bool ret;
-WindowPtr pWin = pScreen-root;
+ScreenPtr pScreen = pWin-drawable.pScreen;
 ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);
 
-pScreen-CreateScreenResources = pPriv-CreateScreenResources;
-ret = pScreen-CreateScreenResources(pScreen);
-pPriv-CreateScreenResources = pScreen-CreateScreenResources;
-pScreen-CreateScreenResources = ShadowCreateScreenResources;
+/* paranoia */
+if (pWin != pScreen-root)
+ErrorF(ShadowCreateRootWindow called unexpectedly\n);
+
+/* call down, but don't hook ourselves back in; we know the first time
+ * we're called it's for the root window.
+ */
+pScreen-CreateWindow = pPriv-CreateWindow;
+ret = pScreen-CreateWindow(pWin);
 
 /* this might look like it leaks, but the damage code reaps listeners
  * when their drawable disappears.
@@ -159,7 +164,6 @@ ShadowCloseScreen(ScreenPtr pScreen)
 ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);
 
 pScreen-CloseScreen = pPriv-CloseScreen;
-pScreen-CreateScreenResources = pPriv-CreateScreenResources;
 
 free(pPriv);
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH] configure: Require sufficiently new wayland-client for xwayland ddx

2014-05-21 Thread Adam Jackson
The explicit release requests were added in 1.3.0, don't try to build
against older.

Signed-off-by: Adam Jackson a...@redhat.com
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e5387bf..e3d991d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2442,7 +2442,7 @@ AM_CONDITIONAL(XFAKESERVER, [test x$KDRIVE = xyes  
test x$XFAKE = xyes])
 
 dnl Xwayland DDX
 
-PKG_CHECK_MODULES(XWAYLANDMODULES, [wayland-client libdrm epoxy], 
[have_xwayland=yes], [have_xwayland=no])
+PKG_CHECK_MODULES(XWAYLANDMODULES, [wayland-client = 1.3.0 libdrm epoxy], 
[have_xwayland=yes], [have_xwayland=no])
 AC_MSG_CHECKING([whether to build Xwayland DDX])
 if test x$XWAYLAND = xauto; then
XWAYLAND=$have_xwayland
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH] shadowfb: Fix initialization

2014-05-21 Thread Michael Thayer

On 21/05/14 15:23, Adam Jackson wrote:

This has to run at initial CreateWindow time, at CreateScreenResources
the root window doesn't actually exist yet.

Tested-by: Michael Thayer michael.tha...@oracle.com
Signed-off-by: Adam Jackson a...@redhat.com


I'm not an expert in that area of the code, but I did also go over the 
actual content of the patch.  So:


Reviewed-by: Michael Thayer michael.tha...@oracle.com


---
  hw/xfree86/shadowfb/shadow.c | 26 +++---
  1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/hw/xfree86/shadowfb/shadow.c b/hw/xfree86/shadowfb/shadow.c
index 10f72cc..d2481ed 100644
--- a/hw/xfree86/shadowfb/shadow.c
+++ b/hw/xfree86/shadowfb/shadow.c
@@ -29,14 +29,14 @@
  #include picturestr.h

  static Bool ShadowCloseScreen(ScreenPtr pScreen);
-static Bool ShadowCreateScreenResources(ScreenPtr pScreen);
+static Bool ShadowCreateRootWindow(WindowPtr pWin);

  typedef struct {
  ScrnInfoPtr pScrn;
  RefreshAreaFuncPtr preRefresh;
  RefreshAreaFuncPtr postRefresh;
  CloseScreenProcPtr CloseScreen;
-CreateScreenResourcesProcPtr CreateScreenResources;
+CreateWindowProcPtr CreateWindow;
  } ShadowScreenRec, *ShadowScreenPtr;

  static DevPrivateKeyRec ShadowScreenKeyRec;
@@ -71,10 +71,10 @@ ShadowFBInit2(ScreenPtr pScreen,
  pPriv-postRefresh = postRefreshArea;

  pPriv-CloseScreen = pScreen-CloseScreen;
-pPriv-CreateScreenResources = pScreen-CreateScreenResources;
+pPriv-CreateWindow = pScreen-CreateWindow;

  pScreen-CloseScreen = ShadowCloseScreen;
-pScreen-CreateScreenResources = ShadowCreateScreenResources;
+pScreen-CreateWindow = ShadowCreateRootWindow;

  return TRUE;
  }
@@ -117,16 +117,21 @@ shadowfbReportPost(DamagePtr damage, RegionPtr reg, void 
*closure)
  }

  static Bool
-ShadowCreateScreenResources(ScreenPtr pScreen)
+ShadowCreateRootWindow(WindowPtr pWin)
  {
  Bool ret;
-WindowPtr pWin = pScreen-root;
+ScreenPtr pScreen = pWin-drawable.pScreen;
  ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);

-pScreen-CreateScreenResources = pPriv-CreateScreenResources;
-ret = pScreen-CreateScreenResources(pScreen);
-pPriv-CreateScreenResources = pScreen-CreateScreenResources;
-pScreen-CreateScreenResources = ShadowCreateScreenResources;
+/* paranoia */
+if (pWin != pScreen-root)
+ErrorF(ShadowCreateRootWindow called unexpectedly\n);
+
+/* call down, but don't hook ourselves back in; we know the first time
+ * we're called it's for the root window.
+ */
+pScreen-CreateWindow = pPriv-CreateWindow;
+ret = pScreen-CreateWindow(pWin);

  /* this might look like it leaks, but the damage code reaps listeners
   * when their drawable disappears.
@@ -159,7 +164,6 @@ ShadowCloseScreen(ScreenPtr pScreen)
  ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen);

  pScreen-CloseScreen = pPriv-CloseScreen;
-pScreen-CreateScreenResources = pPriv-CreateScreenResources;

  free(pPriv);





--
ORACLE Deutschland B.V.  Co. KG   Michael Thayer
Werkstrasse 24 VirtualBox engineering
71384 Weinstadt, Germany   mailto:michael.tha...@oracle.com

Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 0/9] Rewrite include/servermd.h

2014-05-21 Thread Adam Jackson
We really don't want to be in the business of knowing about CPU
architectures.  servermd.h is one of the worst offenders for that in
the tree; this series attempts to clean out the gunk.  Probably the most
contentious bit is assuming your compiler will actually define
__BYTE_ORDER__, but gcc certainly does.

- ajax

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 3/9] dix: (Don't) change BITMAP_SCANLINE_UNIT on Linux s390{, x}

2014-05-21 Thread Adam Jackson
Every other architecture sets this to 32, and I can't think of any
benefit s390 would derive from changing it.  It is, at any rate,
something the client already copes with, and the only internal code
impact seems to be some complicated math in miGetPlane, which you never
hit if you're using fb.

Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index 7b21f6b..d05279d 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -187,7 +187,6 @@ SOFTWARE.
 #define BITMAP_BIT_ORDER   MSBFirst
 #define GLYPHPADBYTES  4
 
-#define BITMAP_SCANLINE_UNIT   8
 #define FAST_UNALIGNED_READ
 
 #endif  /* linux/s390 */
@@ -198,7 +197,6 @@ SOFTWARE.
 #define BITMAP_BIT_ORDER   MSBFirst
 #define GLYPHPADBYTES  4
 
-#define BITMAP_SCANLINE_UNIT   8
 #define FAST_UNALIGNED_READ
 
 #endif  /* linux/s390x */
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 2/9] dix: Remove some XFree86 3.x leftovers

2014-05-21 Thread Adam Jackson
Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index e8228da..7b21f6b 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -87,16 +87,6 @@ SOFTWARE.
 
 #define IMAGE_BYTE_ORDER   LSBFirst
 
-#if defined(XF86MONOVGA) || defined(XF86VGA16) || defined(XF86MONO)
-#define BITMAP_BIT_ORDER   MSBFirst
-#else
-#define BITMAP_BIT_ORDER   LSBFirst
-#endif
-
-#if defined(XF86MONOVGA) || defined(XF86VGA16)
-#define BITMAP_SCANLINE_UNIT   8
-#endif
-
 #define GLYPHPADBYTES  4
 #define GETLEFTBITS_ALIGNMENT  1
 #define LARGE_INSTRUCTION_CACHE
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 8/9] dix: Remove a weird case of little-endian s390

2014-05-21 Thread Adam Jackson
I really don't think this was ever correct, but I'm also not sure what
non-Linux Unix this was meant to enable.  The only one I know of was
OS/390 / z/OS / OpenEdition, but I think that was big-endian too.

At any rate this is all about to go away, so this is just removing an
edge case.

Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index 8d9c24f..b854b7a 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -162,8 +162,7 @@ SOFTWARE.
 
 #ifdefined(SVR4)  (defined(__i386__) || defined(__i386) ) || \
defined(__alpha__) || defined(__alpha) || \
-   defined(__i386__) || \
-   defined(__s390x__) || defined(__s390__)
+   defined(__i386__)
 
 #ifndef IMAGE_BYTE_ORDER
 #define IMAGE_BYTE_ORDER   LSBFirst
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 9/9] dix: Remove arch awareness from servermd.h

2014-05-21 Thread Adam Jackson
At this point we have no architectures where image byte order is
different from bitmap bit order, or where either of those two aren't
also the native word endianness.  Hooray, one more place where we don't
have to worry about enabling new CPU architectures.

Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 155 ++---
 1 file changed, 3 insertions(+), 152 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index b854b7a..626c5c7 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -47,165 +47,16 @@ SOFTWARE.
 #ifndef SERVERMD_H
 #define SERVERMD_H 1
 
-/*
- * Note: much of this is vestigial from mfb/cfb times.  This should
- * really be simplified even further.
- */
-
-#ifdef __avr32__
-
-#define IMAGE_BYTE_ORDERMSBFirst
-#define BITMAP_BIT_ORDERMSBFirst
-
-#endif  /* __avr32__ */
-
-#ifdef __arm32__
-
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 #define IMAGE_BYTE_ORDERLSBFirst
 #define BITMAP_BIT_ORDERLSBFirst
-
-#endif  /* __arm32__ */
-
-#if defined(__nds32__)
-
-#define IMAGE_BYTE_ORDER   LSBFirst
-
-#endif  /* __nds32__ */
-
-#if defined __hppa__
-
-#define IMAGE_BYTE_ORDER   MSBFirst
-#define BITMAP_BIT_ORDER   MSBFirst
-#endif  /* hpux || __hppa__ */
-
-#if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
-
+#elif __BYTE_ORDER == __ORDER_BIG_ENDIAN__
 #define IMAGE_BYTE_ORDERMSBFirst
 #define BITMAP_BIT_ORDERMSBFirst
-
-#endif  /* PowerPC */
-
-#if defined(__sh__)
-
-#if defined(__BIG_ENDIAN__)
-#define IMAGE_BYTE_ORDER   MSBFirst
-#define BITMAP_BIT_ORDER   MSBFirst
-#else
-#define IMAGE_BYTE_ORDER   LSBFirst
-#define BITMAP_BIT_ORDER   LSBFirst
-#endif
-
-#endif  /* SuperH */
-
-#if defined(__m32r__)
-
-#if defined(__BIG_ENDIAN__)
-#define IMAGE_BYTE_ORDER  MSBFirst
-#define BITMAP_BIT_ORDER  MSBFirst
-#else
-#define IMAGE_BYTE_ORDER  LSBFirst
-#define BITMAP_BIT_ORDER  LSBFirst
-#endif
-
-#endif  /* __m32r__ */
-
-#if defined(sun386) || defined(sun5)
-#define IMAGE_BYTE_ORDER   LSBFirst/* Values for the SUN only */
-#define BITMAP_BIT_ORDER   LSBFirst
-#else
-#define IMAGE_BYTE_ORDER   MSBFirst/* Values for the SUN only */
-#define BITMAP_BIT_ORDER   MSBFirst
-#endif
-
-#if (defined(mips) || defined(__mips))
-
-#if defined(MIPSEL) || defined(__MIPSEL__)
-#define IMAGE_BYTE_ORDER   LSBFirst/* Values for the PMAX only */
-#define BITMAP_BIT_ORDER   LSBFirst
 #else
-#define IMAGE_BYTE_ORDER   MSBFirst/* Values for the MIPS only */
-#define BITMAP_BIT_ORDER   MSBFirst
+#error Too weird to live.
 #endif
 
-#endif  /* mips */
-
-#if defined(__alpha) || defined(__alpha__)
-#define IMAGE_BYTE_ORDER   LSBFirst/* Values for the Alpha only */
-#define BITMAP_BIT_ORDER   LSBFirst
-#endif  /* alpha */
-
-#if defined (linux)  defined (__s390__)
-
-#define IMAGE_BYTE_ORDER   MSBFirst
-#define BITMAP_BIT_ORDER   MSBFirst
-
-#endif  /* linux/s390 */
-
-#if defined (linux)  defined (__s390x__)
-
-#define IMAGE_BYTE_ORDER   MSBFirst
-#define BITMAP_BIT_ORDER   MSBFirst
-
-#endif  /* linux/s390x */
-
-#if defined(__ia64__) || defined(ia64)
-
-#define IMAGE_BYTE_ORDER   LSBFirst
-#define BITMAP_BIT_ORDER   LSBFirst
-
-#endif  /* ia64 */
-
-#if defined(__amd64__) || defined(amd64) || defined(__amd64)
-#define IMAGE_BYTE_ORDER   LSBFirst
-#define BITMAP_BIT_ORDER   LSBFirst
-#endif  /* AMD64 */
-
-#ifdefined(SVR4)  (defined(__i386__) || defined(__i386) ) || \
-   defined(__alpha__) || defined(__alpha) || \
-   defined(__i386__)
-
-#ifndef IMAGE_BYTE_ORDER
-#define IMAGE_BYTE_ORDER   LSBFirst
-#endif
-
-#ifndef BITMAP_BIT_ORDER
-#define BITMAP_BIT_ORDER  LSBFirst
-#endif
-
-#endif  /* SVR4 / BSD / i386 */
-
-#if defined (linux)  defined (__mc68000__)
-
-#define IMAGE_BYTE_ORDER   MSBFirst
-#define BITMAP_BIT_ORDER   MSBFirst
-
-#endif  /* linux/m68k */
-
-/* linux on ARM */
-#if defined(linux)  defined(__arm__)
-#define IMAGE_BYTE_ORDER   LSBFirst
-#define BITMAP_BIT_ORDER   LSBFirst
-#endif
-
-/* linux on IBM S/390 */
-#if defined (linux)  defined (__s390__)
-#define IMAGE_BYTE_ORDER   MSBFirst
-#define BITMAP_BIT_ORDER   MSBFirst
-#endif  /* linux/s390 */
-
-#ifdef __aarch64__
-
-#ifdef __AARCH64EL__
-#define IMAGE_BYTE_ORDERLSBFirst
-#define BITMAP_BIT_ORDERLSBFirst
-#endif
-#ifdef __AARCH64EB__
-#define IMAGE_BYTE_ORDERMSBFirst
-#define BITMAP_BIT_ORDER

[PATCH 6/9] dix: Default GLYPHPADBYTES to 4

2014-05-21 Thread Adam Jackson
This effectively no longer varied across architectures anyway.

Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 50 --
 1 file changed, 4 insertions(+), 46 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index 18d3039..7f121c0 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -52,26 +52,10 @@ SOFTWARE.
  * really be simplified even further.
  */
 
-/*
- * Machine dependent values:
- * GLYPHPADBYTES should be chosen with consideration for the space-time
- * trade-off.  Padding to 0 bytes means that there is no wasted space
- * in the font bitmaps (both on disk and in memory), but that access of
- * the bitmaps will cause odd-address memory references.  Padding to
- * 2 bytes would ensure even address memory references and would
- * be suitable for a 68010-class machine, but at the expense of wasted
- * space in the font bitmaps.  Padding to 4 bytes would be good
- * for real 32 bit machines, etc.  Be sure that you tell the font
- * compiler what kind of padding you want because its defines are
- * kept separate from this.  See server/include/font.h for how
- * GLYPHPADBYTES is used.
- */
-
 #ifdef __avr32__
 
 #define IMAGE_BYTE_ORDERMSBFirst
 #define BITMAP_BIT_ORDERMSBFirst
-#define GLYPHPADBYTES   4
 
 #endif  /* __avr32__ */
 
@@ -79,7 +63,6 @@ SOFTWARE.
 
 #define IMAGE_BYTE_ORDERLSBFirst
 #define BITMAP_BIT_ORDERLSBFirst
-#define GLYPHPADBYTES   4
 
 #endif  /* __arm32__ */
 
@@ -87,23 +70,18 @@ SOFTWARE.
 
 #define IMAGE_BYTE_ORDER   LSBFirst
 
-#define GLYPHPADBYTES  4
-
 #endif  /* __nds32__ */
 
 #if defined __hppa__
 
 #define IMAGE_BYTE_ORDER   MSBFirst
 #define BITMAP_BIT_ORDER   MSBFirst
-#define GLYPHPADBYTES  4   /* to make fb work */
-/* byte boundries */
 #endif  /* hpux || __hppa__ */
 
 #if defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__)
 
 #define IMAGE_BYTE_ORDERMSBFirst
 #define BITMAP_BIT_ORDERMSBFirst
-#define GLYPHPADBYTES   4
 
 #endif  /* PowerPC */
 
@@ -112,11 +90,9 @@ SOFTWARE.
 #if defined(__BIG_ENDIAN__)
 #define IMAGE_BYTE_ORDER   MSBFirst
 #define BITMAP_BIT_ORDER   MSBFirst
-#define GLYPHPADBYTES  4
 #else
 #define IMAGE_BYTE_ORDER   LSBFirst
 #define BITMAP_BIT_ORDER   LSBFirst
-#define GLYPHPADBYTES  4
 #endif
 
 #endif  /* SuperH */
@@ -126,11 +102,9 @@ SOFTWARE.
 #if defined(__BIG_ENDIAN__)
 #define IMAGE_BYTE_ORDER  MSBFirst
 #define BITMAP_BIT_ORDER  MSBFirst
-#define GLYPHPADBYTES 4
 #else
 #define IMAGE_BYTE_ORDER  LSBFirst
 #define BITMAP_BIT_ORDER  LSBFirst
-#define GLYPHPADBYTES 4
 #endif
 
 #endif  /* __m32r__ */
@@ -152,9 +126,6 @@ SOFTWARE.
 #define IMAGE_BYTE_ORDER   MSBFirst/* Values for the SUN only */
 #define BITMAP_BIT_ORDER   MSBFirst
 #endif
-
-#defineGLYPHPADBYTES   4
-
 #endif  /* sun  !(i386  SVR4) */
 
 #if (defined(mips) || defined(__mips))
@@ -162,11 +133,9 @@ SOFTWARE.
 #if defined(MIPSEL) || defined(__MIPSEL__)
 #define IMAGE_BYTE_ORDER   LSBFirst/* Values for the PMAX only */
 #define BITMAP_BIT_ORDER   LSBFirst
-#define GLYPHPADBYTES  4
 #else
 #define IMAGE_BYTE_ORDER   MSBFirst/* Values for the MIPS only */
 #define BITMAP_BIT_ORDER   MSBFirst
-#define GLYPHPADBYTES  4
 #endif
 
 #endif  /* mips */
@@ -174,15 +143,12 @@ SOFTWARE.
 #if defined(__alpha) || defined(__alpha__)
 #define IMAGE_BYTE_ORDER   LSBFirst/* Values for the Alpha only */
 #define BITMAP_BIT_ORDER   LSBFirst
-#define GLYPHPADBYTES  4
-
 #endif  /* alpha */
 
 #if defined (linux)  defined (__s390__)
 
 #define IMAGE_BYTE_ORDER   MSBFirst
 #define BITMAP_BIT_ORDER   MSBFirst
-#define GLYPHPADBYTES  4
 
 #endif  /* linux/s390 */
 
@@ -190,7 +156,6 @@ SOFTWARE.
 
 #define IMAGE_BYTE_ORDER   MSBFirst
 #define BITMAP_BIT_ORDER   MSBFirst
-#define GLYPHPADBYTES  4
 
 #endif  /* linux/s390x */
 
@@ -198,15 +163,12 @@ SOFTWARE.
 
 #define IMAGE_BYTE_ORDER   LSBFirst
 #define BITMAP_BIT_ORDER   LSBFirst
-#define GLYPHPADBYTES  4
 
 #endif  /* ia64 */
 
 #if defined(__amd64__) || defined(amd64) || defined(__amd64)
 #define IMAGE_BYTE_ORDER   LSBFirst
 #define BITMAP_BIT_ORDER   LSBFirst
-#define GLYPHPADBYTES  4
-/*  */
 #endif  /* AMD64 */
 
 #ifdefined(SVR4)  (defined(__i386__) || defined(__i386) ) || \
@@ -222,17 +184,12 @@ SOFTWARE.
 #define 

[PATCH 7/9] dix: Remove a bizzare path where we'd treat some m68k as sparc

2014-05-21 Thread Adam Jackson
Just what.

Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index 7f121c0..8d9c24f 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -109,16 +109,6 @@ SOFTWARE.
 
 #endif  /* __m32r__ */
 
-#if (defined(sun)  (defined(__sparc) || defined(sparc))) || \
-(defined(__uxp__)  (defined(sparc) || defined(mc68000))) || \
-defined(__sparc__) || defined(__mc68000__)
-
-#if defined(__sparc) || defined(__sparc__)
-#if !defined(sparc)
-#define sparc 1
-#endif
-#endif
-
 #if defined(sun386) || defined(sun5)
 #define IMAGE_BYTE_ORDER   LSBFirst/* Values for the SUN only */
 #define BITMAP_BIT_ORDER   LSBFirst
@@ -126,7 +116,6 @@ SOFTWARE.
 #define IMAGE_BYTE_ORDER   MSBFirst/* Values for the SUN only */
 #define BITMAP_BIT_ORDER   MSBFirst
 #endif
-#endif  /* sun  !(i386  SVR4) */
 
 #if (defined(mips) || defined(__mips))
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 5/9] dix: Remove some cfb leftovers

2014-05-21 Thread Adam Jackson
These macros meant something in cfb, but not in fb.

Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index 5d23554..18d3039 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -88,9 +88,6 @@ SOFTWARE.
 #define IMAGE_BYTE_ORDER   LSBFirst
 
 #define GLYPHPADBYTES  4
-#define GETLEFTBITS_ALIGNMENT  1
-#define LARGE_INSTRUCTION_CACHE
-#define AVOID_MEMORY_READ
 
 #endif  /* __nds32__ */
 
@@ -187,8 +184,6 @@ SOFTWARE.
 #define BITMAP_BIT_ORDER   MSBFirst
 #define GLYPHPADBYTES  4
 
-#define FAST_UNALIGNED_READ
-
 #endif  /* linux/s390 */
 
 #if defined (linux)  defined (__s390x__)
@@ -197,8 +192,6 @@ SOFTWARE.
 #define BITMAP_BIT_ORDER   MSBFirst
 #define GLYPHPADBYTES  4
 
-#define FAST_UNALIGNED_READ
-
 #endif  /* linux/s390x */
 
 #if defined(__ia64__) || defined(ia64)
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 4/9] dix: Remove some dead macros

2014-05-21 Thread Adam Jackson
Signed-off-by: Adam Jackson a...@redhat.com
---
 include/servermd.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/include/servermd.h b/include/servermd.h
index d05279d..5d23554 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -329,8 +329,4 @@ extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[];
 #define BitmapBytePad(w) \
 (((int)((w) + BITMAP_SCANLINE_PAD - 1)  LOG2_BITMAP_PAD)  
LOG2_BYTES_PER_SCANLINE_PAD)
 
-#define PixmapWidthInPadUnitsProto(w, d) PixmapWidthInPadUnits(w, d)
-#define PixmapBytePadProto(w, d) PixmapBytePad(w, d)
-#define BitmapBytePadProto(w) BitmapBytePad(w)
-
 #endif  /* SERVERMD_H */
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 00/21] Rewrite hw/xfree86/common/compiler.h

2014-05-21 Thread Adam Jackson
compiler.h is the other major place where we hide CPU awareness, and it's
all quite hideous.  This series clears out a bunch of it.  There's more
you can do if you're willing to nuke the alpha sparse support, but that's
a later, more invasive series.

- ajax

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 02/21] xfree86: Remove nds32_flush_icache

2014-05-21 Thread Adam Jackson
I guess this might have been needed for elfloader, except we didn't
support nds32 back then, so I assume this was cargo-culted from
ppc_flush_icache, which is also dead now.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 17 -
 1 file changed, 17 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index fb95f58..4c01cdb 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1691,23 +1691,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char 
*, unsigned char *, int);
 #define MMIO_MOVE32(base, offset, val) \
xf86WriteMmio32(base, offset, (CARD32)(val))
 
-#ifdef N1213_HC /* for NDS32 N1213 hardcore */
-static __inline__ void
-nds32_flush_icache(char *addr)
-{
-__asm__ volatile (isync %0;
-  msync;
-  isb;
-  cctl %0,L1I_VA_INVAL; isb;::r (addr):memory);
-}
-#else
-static __inline__ void
-nds32_flush_icache(char *addr)
-{
-__asm__ volatile (isync %0; isb;::r (addr):memory);
-}
-#endif
-
 #else   /* !__alpha__  !__powerpc__  !__sparc__ */
 
 #define MMIO_IN8(base, offset) \
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 03/21] xfree86: Remove MMIO_MOVE32

2014-05-21 Thread Adam Jackson
Only used by mach64's XAA code, which isn't built if XAA isn't
available, and it isn't.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 13 -
 1 file changed, 13 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 4c01cdb..e006b7b 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1568,8 +1568,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, 
unsigned char *, int);
 (*xf86WriteMmioNB8)((CARD8)(val), base, offset)
 #define MMIO_ONB16(base, offset, val) \
 (*xf86WriteMmioNB16)((CARD16)(val), base, offset)
-#define MMIO_MOVE32(base, offset, val) \
-MMIO_OUT32(base, offset, val)
 
 #elif defined(__powerpc__)
  /* 
@@ -1607,9 +1605,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, 
unsigned char *, int);
  xf86WriteMmioNB32Le(base, offset, (CARD32)(val))
 #endif
 
-#define MMIO_MOVE32(base, offset, val) \
-   xf86WriteMmio32Be(base, offset, (CARD32)(val))
-
 #elif defined(__sparc__) || defined(sparc) || defined(__sparc)
  /*
   * Like powerpc, we provide byteswapping and no byteswapping functions
@@ -1648,9 +1643,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, 
unsigned char *, int);
  xf86WriteMmio32LeNB(base, offset, (CARD32)(val))
 #endif
 
-#define MMIO_MOVE32(base, offset, val) \
-   xf86WriteMmio32Be(base, offset, (CARD32)(val))
-
 #elif defined(__nds32__)
  /*
   * we provide byteswapping and no byteswapping functions here
@@ -1688,9 +1680,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, 
unsigned char *, int);
  xf86WriteMmioNB32(base, offset, (CARD32)(val))
 #endif
 
-#define MMIO_MOVE32(base, offset, val) \
-   xf86WriteMmio32(base, offset, (CARD32)(val))
-
 #else   /* !__alpha__  !__powerpc__  !__sparc__ */
 
 #define MMIO_IN8(base, offset) \
@@ -1709,8 +1698,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, 
unsigned char *, int);
 #define MMIO_ONB16(base, offset, val) MMIO_OUT16(base, offset, val)
 #define MMIO_ONB32(base, offset, val) MMIO_OUT32(base, offset, val)
 
-#define MMIO_MOVE32(base, offset, val) MMIO_OUT32(base, offset, val)
-
 #endif  /* __alpha__ */
 
 /*
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 10/21] xfree86: Undef FAKEIT

2014-05-21 Thread Adam Jackson
I guess this is meant to stub out all I/O port calls?  Whatever, it's
not been defined by the buildsystem at least as far back as monolith
6.8.2.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 40 ++--
 1 file changed, 2 insertions(+), 38 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index e156daa..0d5d532 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1117,7 +1117,7 @@ inl(unsigned PORT_SIZE port)
 #else   /* ix86 */
 
 #if !defined(__SUNPRO_C)
-#if !defined(FAKEIT)  !defined(__mc68000__)  !defined(__arm__)  
!defined(__sh__)  !defined(__hppa__)  !defined(__s390__)  
!defined(__m32r__)  !defined(__aarch64__)
+#if !defined(__mc68000__)  !defined(__arm__)  !defined(__sh__)  
!defined(__hppa__)  !defined(__s390__)  !defined(__m32r__)  
!defined(__aarch64__)
 #ifdef GCCUSESGAS
 
 /*
@@ -1218,43 +1218,7 @@ inl(unsigned short port)
 }
 
 #endif  /* GCCUSESGAS */
-
-#else   /* !defined(FAKEIT)  !defined(__mc68000__)  
 !defined(__arm__)  !defined(__sh__)  !defined(__hppa__)  
!defined(__m32r__) */
-
-static __inline__ void
-outb(unsigned short port, unsigned char val)
-{
-}
-
-static __inline__ void
-outw(unsigned short port, unsigned short val)
-{
-}
-
-static __inline__ void
-outl(unsigned short port, unsigned int val)
-{
-}
-
-static __inline__ unsigned int
-inb(unsigned short port)
-{
-return 0;
-}
-
-static __inline__ unsigned int
-inw(unsigned short port)
-{
-return 0;
-}
-
-static __inline__ unsigned int
-inl(unsigned short port)
-{
-return 0;
-}
-
-#endif  /* FAKEIT */
+#endif
 #endif  /* __SUNPRO_C */
 
 #endif  /* ix86 */
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 06/21] xfree86: Remove unused unaligned int64 helpers

2014-05-21 Thread Adam Jackson
Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 64 +---
 1 file changed, 1 insertion(+), 63 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 251744e..6d5 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -141,10 +141,8 @@ extern _X_EXPORT void xf86WriteMmio32LeNB (void *, 
unsigned long, unsigned int);
 #endif  /* __arm__ */
 
 #if defined(__powerpc__)  !defined(__OpenBSD__)
-extern unsigned long ldq_u(unsigned long *);
 extern unsigned long ldl_u(unsigned int *);
 extern unsigned long ldw_u(unsigned short *);
-extern void stq_u(unsigned long, unsigned long *);
 extern void stl_u(unsigned long, unsigned int *);
 extern void stw_u(unsigned long, unsigned short *);
 extern void mem_barrier(void);
@@ -240,15 +238,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, 
int);
 
 #include string.h /* needed for memmove */
 
-static __inline__ uint64_t
-ldq_u(uint64_t * p)
-{
-uint64_t ret;
-
-memmove(ret, p, sizeof(*p));
-return ret;
-}
-
 static __inline__ uint32_t
 ldl_u(uint32_t * p)
 {
@@ -268,14 +257,6 @@ ldw_u(uint16_t * p)
 }
 
 static __inline__ void
-stq_u(uint64_t val, uint64_t * p)
-{
-uint64_t tmp = val;
-
-memmove(p, tmp, sizeof(*p));
-}
-
-static __inline__ void
 stl_u(uint32_t val, uint32_t * p)
 {
 uint32_t tmp = val;
@@ -956,7 +937,7 @@ xf_outl(unsigned short port, unsigned int val)
 
 /*
  * Assume all port access are aligned.  We need to revise this implementation
- * if there is unaligned port access.  For ldq_u, ldl_u, ldw_u, stq_u, stl_u 
and
+ * if there is unaligned port access.  For ldl_u, ldw_u, stl_u and
  * stw_u, they are assumed unaligned.
  */
 
@@ -1134,19 +1115,6 @@ inl(unsigned PORT_SIZE port)
 }
 
 static __inline__ unsigned long
-ldq_u(unsigned long *p)
-{
-unsigned long addr = (unsigned long) p;
-unsigned int ret;
-
-__asm__ __volatile__(lmw.bi %0, [%1], %0, 0;\n\t
- wsbh %0, %0;\n\t rotri %0, %0, 16;\n\t:=r(ret)
- :r(addr));
-
-return ret;
-}
-
-static __inline__ unsigned long
 ldl_u(unsigned int *p)
 {
 unsigned long addr = (unsigned long) p;
@@ -1160,15 +1128,6 @@ ldl_u(unsigned int *p)
 }
 
 static __inline__ void
-stq_u(unsigned long val, unsigned long *p)
-{
-unsigned long addr = (unsigned long) p;
-
-__asm__ __volatile__(wsbh %0, %0;\n\t rotri %0, %0, 16;\n\t smw.bi 
%0, [%1], %0, 0;\n\t:  /* No outputs */
- :r(val), r(addr));
-}
-
-static __inline__ void
 stl_u(unsigned long val, unsigned int *p)
 {
 unsigned long addr = (unsigned long) p;
@@ -1218,18 +1177,6 @@ inl(unsigned PORT_SIZE port)
 }
 
 static __inline__ unsigned long
-ldq_u(unsigned long *p)
-{
-unsigned long addr = (unsigned long) p;
-unsigned int ret;
-
-__asm__ __volatile__(lmw.bi %0, [%1], %0, 0;\n\t:=r(ret)
- :r(addr));
-
-return ret;
-}
-
-static __inline__ unsigned long
 ldl_u(unsigned int *p)
 {
 unsigned long addr = (unsigned long) p;
@@ -1242,15 +1189,6 @@ ldl_u(unsigned int *p)
 }
 
 static __inline__ void
-stq_u(unsigned long val, unsigned long *p)
-{
-unsigned long addr = (unsigned long) p;
-
-__asm__ __volatile__(smw.bi %0, [%1], %0, 0;\n\t: /* No outputs */
- :r(val), r(addr));
-}
-
-static __inline__ void
 stl_u(unsigned long val, unsigned int *p)
 {
 unsigned long addr = (unsigned long) p;
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 07/21] xfree86: Move generic unaligned helpers into int10 code

2014-05-21 Thread Adam Jackson
This is the only place they're actually used (well, aside from some XAA
code in the s3 driver, but one s3 and 2 XAA).

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 36 
 hw/xfree86/int10/generic.c   | 36 
 2 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 6d5..41acaf4 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -236,42 +236,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, 
int);
 #define write_mem_barrier() /* NOP */
 #endif
 
-#include string.h /* needed for memmove */
-
-static __inline__ uint32_t
-ldl_u(uint32_t * p)
-{
-uint32_t ret;
-
-memmove(ret, p, sizeof(*p));
-return ret;
-}
-
-static __inline__ uint16_t
-ldw_u(uint16_t * p)
-{
-uint16_t ret;
-
-memmove(ret, p, sizeof(*p));
-return ret;
-}
-
-static __inline__ void
-stl_u(uint32_t val, uint32_t * p)
-{
-uint32_t tmp = val;
-
-memmove(p, tmp, sizeof(*p));
-}
-
-static __inline__ void
-stw_u(uint16_t val, uint16_t * p)
-{
-uint16_t tmp = val;
-
-memmove(p, tmp, sizeof(*p));
-}
-
 #ifdef __GNUC__
 #if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__))  (defined(__alpha__))
 
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index abbd36f..73a1e5e 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -20,6 +20,42 @@
 
 #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1)
 
+#include string.h /* needed for memmove */
+
+static __inline__ uint32_t
+ldl_u(uint32_t * p)
+{
+uint32_t ret;
+
+memmove(ret, p, sizeof(*p));
+return ret;
+}
+
+static __inline__ uint16_t
+ldw_u(uint16_t * p)
+{
+uint16_t ret;
+
+memmove(ret, p, sizeof(*p));
+return ret;
+}
+
+static __inline__ void
+stl_u(uint32_t val, uint32_t * p)
+{
+uint32_t tmp = val;
+
+memmove(p, tmp, sizeof(*p));
+}
+
+static __inline__ void
+stw_u(uint16_t val, uint16_t * p)
+{
+uint16_t tmp = val;
+
+memmove(p, tmp, sizeof(*p));
+}
+
 static uint8_t read_b(xf86Int10InfoPtr pInt, int addr);
 static uint16_t read_w(xf86Int10InfoPtr pInt, int addr);
 static uint32_t read_l(xf86Int10InfoPtr pInt, int addr);
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 01/21] xfree86: Remove #include compiler.h from places that don't need it

2014-05-21 Thread Adam Jackson
Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/xf86Cursor.c | 2 --
 hw/xfree86/common/xf86Events.c | 1 -
 hw/xfree86/common/xf86Init.c   | 2 --
 hw/xfree86/loader/loader.c | 1 -
 hw/xfree86/os-support/xf86_OSlib.h | 4 
 hw/xfree86/ramdac/xf86RamDacCmap.c | 1 -
 hw/xfree86/vgahw/vgaCmap.c | 1 -
 7 files changed, 12 deletions(-)

diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c
index 7d0776e..c6abf12 100644
--- a/hw/xfree86/common/xf86Cursor.c
+++ b/hw/xfree86/common/xf86Cursor.c
@@ -37,8 +37,6 @@
 #include scrnintstr.h
 #include globals.h
 
-#include compiler.h
-
 #include xf86.h
 #include xf86Priv.h
 #include xf86_OSproc.h
diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c
index 35a673d..16b3e28 100644
--- a/hw/xfree86/common/xf86Events.c
+++ b/hw/xfree86/common/xf86Events.c
@@ -58,7 +58,6 @@
 #include X11/Xproto.h
 #include X11/Xatom.h
 #include misc.h
-#include compiler.h
 #include xf86.h
 #include xf86Priv.h
 #define XF86_OS_PRIVS
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 5a45004..b197c1c 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -56,8 +56,6 @@
 #include dbus-core.h
 #include systemd-logind.h
 
-#include compiler.h
-
 #include loaderProcs.h
 #ifdef XFreeXDGA
 #include dgaproc.h
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 64c69bb..cc41dcb 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -65,7 +65,6 @@
 #include loaderProcs.h
 #include xf86.h
 #include xf86Priv.h
-#include compiler.h
 
 #ifdef HAVE_DLFCN_H
 
diff --git a/hw/xfree86/os-support/xf86_OSlib.h 
b/hw/xfree86/os-support/xf86_OSlib.h
index eb0a338..9120bd7 100644
--- a/hw/xfree86/os-support/xf86_OSlib.h
+++ b/hw/xfree86/os-support/xf86_OSlib.h
@@ -364,8 +364,4 @@ struct pcvtid {
 #define XF86_OS_PRIVS
 #include xf86_OSproc.h
 
-#ifndef NO_COMPILER_H
-#include compiler.h
-#endif
-
 #endif  /* _XF86_OSLIB_H */
diff --git a/hw/xfree86/ramdac/xf86RamDacCmap.c 
b/hw/xfree86/ramdac/xf86RamDacCmap.c
index fa7a866..2a0f755 100644
--- a/hw/xfree86/ramdac/xf86RamDacCmap.c
+++ b/hw/xfree86/ramdac/xf86RamDacCmap.c
@@ -35,7 +35,6 @@
 #include micmap.h
 
 #include xf86.h
-#include compiler.h
 #include colormapst.h
 #include xf86RamDacPriv.h
 
diff --git a/hw/xfree86/vgahw/vgaCmap.c b/hw/xfree86/vgahw/vgaCmap.c
index 6e028a7..bf61225 100644
--- a/hw/xfree86/vgahw/vgaCmap.c
+++ b/hw/xfree86/vgahw/vgaCmap.c
@@ -28,7 +28,6 @@
 #include X11/X.h
 #include X11/Xproto.h
 #include windowstr.h
-#include compiler.h
 #include mipointer.h
 #include micmap.h
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 04/21] xfree86: Undefine NO_INLINE

2014-05-21 Thread Adam Jackson
Nothing in the server defines this, nor do any drivers.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index e006b7b..5f30f6b 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -98,7 +98,7 @@
 #if !defined(__GNUC__)  !defined(__FUNCTION__)
 #define __FUNCTION__ __func__   /* C99 */
 #endif
-#if defined(NO_INLINE) || defined(DO_PROTOTYPES)
+#if defined(DO_PROTOTYPES)
 #if !defined(__arm__)
 #if !defined(__sparc__)  !defined(__sparc)  !defined(__arm32__)  
!defined(__nds32__) \
!(defined(__alpha__)  defined(linux)) \
@@ -157,7 +157,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, 
int);
 
 #endif  /* NO_INLINE || DO_PROTOTYPES */
 
-#ifndef NO_INLINE
 #ifdef __GNUC__
 #ifdef __i386__
 
@@ -230,7 +229,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, 
int);
 #define write_mem_barrier() /* XXX: nop for now */
 #endif
 #endif  /* __GNUC__ */
-#endif  /* NO_INLINE */
 
 #ifndef mem_barrier
 #define mem_barrier()   /* NOP */
@@ -240,7 +238,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, 
int);
 #define write_mem_barrier() /* NOP */
 #endif
 
-#ifndef NO_INLINE
 #ifdef __GNUC__
 
 /* Define some packed structures to use with unaligned accesses */
@@ -362,9 +359,7 @@ stw_u(uint16_t val, uint16_t * p)
 }
 
 #endif  /* __GNUC__ */
-#endif  /* NO_INLINE */
 
-#ifndef NO_INLINE
 #ifdef __GNUC__
 #if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__))  (defined(__alpha__))
 
@@ -1514,8 +1509,6 @@ inl(unsigned short port)
 #endif
 #endif  /* __GNUC__ */
 
-#endif  /* NO_INLINE */
-
 #ifdef __alpha__
 /* entry points for Mmio memory access routines */
 extern _X_EXPORT int (*xf86ReadMmio8) (void *, unsigned long);
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 05/21] xfree86: Unspecialize gcc variants of unaligned memory access

2014-05-21 Thread Adam Jackson
Yes yes, very clever, memmove works fine on gcc too, let's just do the
portable thing since none of this is performance code.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 69 
 1 file changed, 69 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 5f30f6b..251744e 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -238,73 +238,6 @@ extern unsigned short ldw_brx(volatile unsigned char *, 
int);
 #define write_mem_barrier() /* NOP */
 #endif
 
-#ifdef __GNUC__
-
-/* Define some packed structures to use with unaligned accesses */
-
-struct __una_u64 {
-uint64_t x __attribute__ ((packed));
-};
-struct __una_u32 {
-uint32_t x __attribute__ ((packed));
-};
-struct __una_u16 {
-uint16_t x __attribute__ ((packed));
-};
-
-/* Elemental unaligned loads */
-
-static __inline__ uint64_t
-ldq_u(uint64_t * p)
-{
-const struct __una_u64 *ptr = (const struct __una_u64 *) p;
-
-return ptr-x;
-}
-
-static __inline__ uint32_t
-ldl_u(uint32_t * p)
-{
-const struct __una_u32 *ptr = (const struct __una_u32 *) p;
-
-return ptr-x;
-}
-
-static __inline__ uint16_t
-ldw_u(uint16_t * p)
-{
-const struct __una_u16 *ptr = (const struct __una_u16 *) p;
-
-return ptr-x;
-}
-
-/* Elemental unaligned stores */
-
-static __inline__ void
-stq_u(uint64_t val, uint64_t * p)
-{
-struct __una_u64 *ptr = (struct __una_u64 *) p;
-
-ptr-x = val;
-}
-
-static __inline__ void
-stl_u(uint32_t val, uint32_t * p)
-{
-struct __una_u32 *ptr = (struct __una_u32 *) p;
-
-ptr-x = val;
-}
-
-static __inline__ void
-stw_u(uint16_t val, uint16_t * p)
-{
-struct __una_u16 *ptr = (struct __una_u16 *) p;
-
-ptr-x = val;
-}
-#else   /* !__GNUC__ */
-
 #include string.h /* needed for memmove */
 
 static __inline__ uint64_t
@@ -358,8 +291,6 @@ stw_u(uint16_t val, uint16_t * p)
 memmove(p, tmp, sizeof(*p));
 }
 
-#endif  /* __GNUC__ */
-
 #ifdef __GNUC__
 #if (defined(linux) || defined(__FreeBSD__) || defined(__NetBSD__) || 
defined(__OpenBSD__))  (defined(__alpha__))
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 12/21] xfree86: Remove an unlikely bit of #pragma

2014-05-21 Thread Adam Jackson
__USLC__ appears to mean the SCO OpenServer compiler, which configure.ac
doesn't think is an OS the xfree86 ddx supports.  The conditionals
surrounding these pragmas effectively mean if not gcc and not Sun C,
and probably arbitrary pragmas aren't supported by arbitrary compilers.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 8 
 1 file changed, 8 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index dc69f77..02d120b 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1228,14 +1228,6 @@ inl(unsigned short port)
 #if !defined(__SUNPRO_C)
 #include sys/inline.h
 #endif
-#if  !defined(__SUNPRO_C) || defined(__USLC__)
-#pragma asm partial_optimization outl
-#pragma asm partial_optimization outw
-#pragma asm partial_optimization outb
-#pragma asm partial_optimization inl
-#pragma asm partial_optimization inw
-#pragma asm partial_optimization inb
-#endif
 #endif  /* __GNUC__ */
 
 #ifdef __alpha__
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 20/21] xfree86: Clean up some silly __sparc macro usage

2014-05-21 Thread Adam Jackson
The top of this file already defines __sparc__ if __sparc is defined.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index b1fd0d8..a94a388 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -97,7 +97,7 @@
 
 #if defined(DO_PROTOTYPES)
 #if !defined(__arm__)
-#if !defined(__sparc__)  !defined(__sparc)  !defined(__arm32__)  
!defined(__nds32__) \
+#if !defined(__sparc__)  !defined(__arm32__)  !defined(__nds32__) \
!(defined(__alpha__)  defined(linux)) \
!(defined(__ia64__)  defined(linux)) \
!(defined(__mips64)  defined(linux)) \
@@ -1097,7 +1097,7 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, 
unsigned char *, int);
  xf86WriteMmio32Le(base, offset, (CARD32)(val))
 #endif
 
-#elif defined(__sparc__) || defined(sparc) || defined(__sparc)
+#elif defined(__sparc__)
  /*
   * Like powerpc, we provide byteswapping and no byteswapping functions
   * here with byteswapping as default, drivers that don't need byteswapping
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 08/21] xfree86: Remove remaining unused unaligned accessors

2014-05-21 Thread Adam Jackson
Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 61 +---
 1 file changed, 1 insertion(+), 60 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 41acaf4..d283d5e 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -141,10 +141,6 @@ extern _X_EXPORT void xf86WriteMmio32LeNB (void *, 
unsigned long, unsigned int);
 #endif  /* __arm__ */
 
 #if defined(__powerpc__)  !defined(__OpenBSD__)
-extern unsigned long ldl_u(unsigned int *);
-extern unsigned long ldw_u(unsigned short *);
-extern void stl_u(unsigned long, unsigned int *);
-extern void stw_u(unsigned long, unsigned short *);
 extern void mem_barrier(void);
 extern void write_mem_barrier(void);
 extern void stl_brx(unsigned long, volatile unsigned char *, int);
@@ -901,8 +897,7 @@ xf_outl(unsigned short port, unsigned int val)
 
 /*
  * Assume all port access are aligned.  We need to revise this implementation
- * if there is unaligned port access.  For ldl_u, ldw_u, stl_u and
- * stw_u, they are assumed unaligned.
+ * if there is unaligned port access.
  */
 
 #define barrier()   /* no barrier */
@@ -1078,28 +1073,6 @@ inl(unsigned PORT_SIZE port)
 return xf86ReadMmio32Swap(IOPortBase, port);
 }
 
-static __inline__ unsigned long
-ldl_u(unsigned int *p)
-{
-unsigned long addr = (unsigned long) p;
-unsigned int ret;
-
-__asm__ __volatile__(lmw.bi %0, [%1], %0, 0;\n\t
- wsbh %0, %0;\n\t rotri %0, %0, 16;\n\t:=r(ret)
- :r(addr));
-
-return ret;
-}
-
-static __inline__ void
-stl_u(unsigned long val, unsigned int *p)
-{
-unsigned long addr = (unsigned long) p;
-
-__asm__ __volatile__(wsbh %0, %0;\n\t rotri %0, %0, 16;\n\t smw.bi 
%0, [%1], %0, 0;\n\t:  /* No outputs */
- :r(val), r(addr));
-}
-
 #else   /* !NDS32_MMIO_SWAP */
 static __inline__ void
 outb(unsigned PORT_SIZE port, unsigned char val)
@@ -1140,40 +1113,8 @@ inl(unsigned PORT_SIZE port)
 return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)));
 }
 
-static __inline__ unsigned long
-ldl_u(unsigned int *p)
-{
-unsigned long addr = (unsigned long) p;
-unsigned int ret;
-
-__asm__ __volatile__(lmw.bi %0, [%1], %0, 0;\n\t:=r(ret)
- :r(addr));
-
-return ret;
-}
-
-static __inline__ void
-stl_u(unsigned long val, unsigned int *p)
-{
-unsigned long addr = (unsigned long) p;
-
-__asm__ __volatile__(smw.bi %0, [%1], %0, 0;\n\t: /* No outputs */
- :r(val), r(addr));
-}
 #endif  /* NDS32_MMIO_SWAP */
 
-#if (((X_BYTE_ORDER == X_BIG_ENDIAN)  !defined(NDS32_MMIO_SWAP)) || 
((X_BYTE_ORDER != X_BIG_ENDIAN)  defined(NDS32_MMIO_SWAP)))
-#define ldw_u(p)   ((*(unsigned char *)(p))  8 | \
-   (*((unsigned char *)(p)+1)))
-#define stw_u(v,p) (*(unsigned char *)(p)) = ((v)  8); \
-   (*((unsigned char *)(p)+1)) = (v)
-#else
-#define ldw_u(p)   ((*(unsigned char *)(p)) | \
-   (*((unsigned char *)(p)+1)8))
-#define stw_u(v,p) (*(unsigned char *)(p)) = (v); \
-   (*((unsigned char *)(p)+1)) = ((v)  8)
-#endif
-
 #define mem_barrier()   /* XXX: nop for now */
 #define write_mem_barrier() /* XXX: nop for now */
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 18/21] xfree86: Remove MMIO_ONB* and friends

2014-05-21 Thread Adam Jackson
Non-barrier-emitting MMIO writes.  They appear to be utterly unused,
burn it all down.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h| 201 +++-
 hw/xfree86/os-support/bsd/alpha_video.c |  12 --
 hw/xfree86/os-support/bsd/bsd_ev56.c|  24 
 hw/xfree86/os-support/linux/lnx_ev56.c  |  24 
 hw/xfree86/os-support/linux/lnx_video.c |  12 --
 5 files changed, 14 insertions(+), 259 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 3430585..e408441 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -127,11 +127,6 @@ extern _X_EXPORT void xf86WriteMmio16Be (void *, unsigned 
long, unsigned int);
 extern _X_EXPORT void xf86WriteMmio16Le (void *, unsigned long, unsigned int);
 extern _X_EXPORT void xf86WriteMmio32Be (void *, unsigned long, unsigned int);
 extern _X_EXPORT void xf86WriteMmio32Le (void *, unsigned long, unsigned int);
-extern _X_EXPORT void xf86WriteMmio8NB(void *, unsigned long, unsigned 
int);
-extern _X_EXPORT void xf86WriteMmio16BeNB (void *, unsigned long, unsigned 
int);
-extern _X_EXPORT void xf86WriteMmio16LeNB (void *, unsigned long, unsigned 
int);
-extern _X_EXPORT void xf86WriteMmio32BeNB (void *, unsigned long, unsigned 
int);
-extern _X_EXPORT void xf86WriteMmio32LeNB (void *, unsigned long, unsigned 
int);
 #endif  /* _SUNPRO_C */
 #endif  /* __sparc__,  __arm32__, __alpha__, __nds32__ 
*/
 #endif  /* __arm__ */
@@ -518,56 +513,6 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned 
long offset,
 barrier();
 }
 
-static __inline__ void
-xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset,
- const unsigned int val)
-{
-unsigned long addr = ((unsigned long) base) + offset;
-
-__asm__ __volatile__(stba %0, [%1] %2:/* No outputs */
- :r(val), r(addr), i(ASI_PL));
-}
-
-static __inline__ void
-xf86WriteMmio16BeNB(__volatile__ void *base, const unsigned long offset,
-const unsigned int val)
-{
-unsigned long addr = ((unsigned long) base) + offset;
-
-__asm__ __volatile__(sth %0, [%1]:/* No outputs */
- :r(val), r(addr));
-}
-
-static __inline__ void
-xf86WriteMmio16LeNB(__volatile__ void *base, const unsigned long offset,
-const unsigned int val)
-{
-unsigned long addr = ((unsigned long) base) + offset;
-
-__asm__ __volatile__(stha %0, [%1] %2:/* No outputs */
- :r(val), r(addr), i(ASI_PL));
-}
-
-static __inline__ void
-xf86WriteMmio32BeNB(__volatile__ void *base, const unsigned long offset,
-const unsigned int val)
-{
-unsigned long addr = ((unsigned long) base) + offset;
-
-__asm__ __volatile__(st %0, [%1]: /* No outputs */
- :r(val), r(addr));
-}
-
-static __inline__ void
-xf86WriteMmio32LeNB(__volatile__ void *base, const unsigned long offset,
-const unsigned int val)
-{
-unsigned long addr = ((unsigned long) base) + offset;
-
-__asm__ __volatile__(sta %0, [%1] %2: /* No outputs */
- :r(val), r(addr), i(ASI_PL));
-}
-
 #elif defined(__mips__) || (defined(__arm32__)  !defined(__linux__))
 #if defined(__arm32__) || defined(__mips64)
 #define PORT_SIZE long
@@ -706,92 +651,57 @@ xf86ReadMmio32Le(__volatile__ void *base, const unsigned 
long offset)
 }
 
 static __inline__ void
-xf86WriteMmioNB8(__volatile__ void *base, const unsigned long offset,
- const unsigned char val)
+xf86WriteMmio8(__volatile__ void *base, const unsigned long offset,
+   const unsigned char val)
 {
 __asm__
 __volatile__(stbx %1,%2,%3\n\t:=m
  (*((volatile unsigned char *) base + offset))
  :r(val), b(base), r(offset));
+eieio();
 }
 
 static __inline__ void
-xf86WriteMmioNB16Le(__volatile__ void *base, const unsigned long offset,
-const unsigned short val)
+xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset,
+  const unsigned short val)
 {
 __asm__
 __volatile__(sthbrx %1,%2,%3\n\t:=m
  (*((volatile unsigned char *) base + offset))
  :r(val), b(base), r(offset));
+eieio();
 }
 
 static __inline__ void
-xf86WriteMmioNB16Be(__volatile__ void *base, const unsigned long offset,
-const unsigned short val)
+xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset,
+  const unsigned short val)
 {
 __asm__
 __volatile__(sthx %1,%2,%3\n\t:=m
  (*((volatile unsigned char *) base + offset))
  :r(val), b(base), r(offset));
+eieio();
 }
 
 static __inline__ void
-xf86WriteMmioNB32Le(__volatile__ void *base, 

[PATCH 15/21] xfree86: Remove pre-2.6 Linux ppc support

2014-05-21 Thread Adam Jackson
2.6.0 was December 2003, you've had plenty of time to get your head in
the game.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index ac6df80..11010f3 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -195,13 +195,6 @@ extern void write_mem_barrier(void);
 
 #elif defined __powerpc__
 
-#if defined(linux)  defined(__powerpc64__)
-#include linux/version.h
-#if LINUX_VERSION_CODE  KERNEL_VERSION(2, 6, 0)
-#include asm/memory.h
-#endif
-#endif  /* defined(linux)  defined(__powerpc64__) */
-
 #ifndef eieio   /* We deal with arch-specific eieio() routines 
above... */
 #define eieio() __asm__ __volatile__ (eieio ::: memory)
 #endif  /* eieio */
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 17/21] xfree86: Clean up powerpc barrier decls

2014-05-21 Thread Adam Jackson
I think the externs are there for the non-gcc case?  And maybe there was
some assembly code to implement that once?  Whatever, at this point on
ppc the compiler is either gcc or willing to pretend.  The macros below
the decls take care of the actual eieio so the externs can just go.

Also remove a comment that maybe made sense once upon a time.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 5fd0ea0..3430585 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -136,11 +136,6 @@ extern _X_EXPORT void xf86WriteMmio32LeNB (void *, 
unsigned long, unsigned int);
 #endif  /* __sparc__,  __arm32__, __alpha__, __nds32__ 
*/
 #endif  /* __arm__ */
 
-#if defined(__powerpc__)  !defined(__OpenBSD__)
-extern void mem_barrier(void);
-extern void write_mem_barrier(void);
-#endif  /* __powerpc__  !__OpenBSD */
-
 #endif  /* NO_INLINE || DO_PROTOTYPES */
 
 #ifdef __GNUC__
@@ -195,7 +190,7 @@ extern void write_mem_barrier(void);
 
 #elif defined __powerpc__
 
-#ifndef eieio   /* We deal with arch-specific eieio() routines 
above... */
+#ifndef eieio
 #define eieio() __asm__ __volatile__ (eieio ::: memory)
 #endif  /* eieio */
 #define mem_barrier()  eieio()
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 21/21] xfree86: Unify the ppc/sparc mmio-swap-or-not conditionals

2014-05-21 Thread Adam Jackson
Map SPARC_MMIO_IS_BE and PPC_MMIO_IS_BE to MMIO_IS_BE and use the same
macros for both since they're identical.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 39 ---
 1 file changed, 8 insertions(+), 31 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index a94a388..5325129 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1027,6 +1027,11 @@ inl(unsigned short port)
 #endif
 #endif  /* __GNUC__ */
 
+#if !defined(MMIO_IS_BE)  \
+(defined(SPARC_MMIO_IS_BE) || defined(PPC_MMIO_IS_BE))
+#define MMIO_IS_BE
+#endif
+
 #ifdef __alpha__
 /* entry points for Mmio memory access routines */
 extern _X_EXPORT int (*xf86ReadMmio8) (void *, unsigned long);
@@ -1071,17 +1076,17 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char 
*, unsigned char *, int);
 #define MMIO_OUT16(base, offset, val) \
 (*xf86WriteMmio16)((CARD16)(val), base, offset)
 
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__sparc__)
  /* 
   * we provide byteswapping and no byteswapping functions here
   * with byteswapping as default, 
-  * drivers that don't need byteswapping should define PPC_MMIO_IS_BE 
+  * drivers that don't need byteswapping should define MMIO_IS_BE
   */
 #define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
 #define MMIO_OUT8(base, offset, val) \
 xf86WriteMmio8(base, offset, (CARD8)(val))
 
-#if defined(PPC_MMIO_IS_BE) /* No byteswapping */
+#if defined(MMIO_IS_BE) /* No byteswapping */
 #define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
 #define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
 #define MMIO_OUT16(base, offset, val) \
@@ -1097,34 +1102,6 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char 
*, unsigned char *, int);
  xf86WriteMmio32Le(base, offset, (CARD32)(val))
 #endif
 
-#elif defined(__sparc__)
- /*
-  * Like powerpc, we provide byteswapping and no byteswapping functions
-  * here with byteswapping as default, drivers that don't need byteswapping
-  * should define SPARC_MMIO_IS_BE (perhaps create a generic macro so that we
-  * do not need to use PPC_MMIO_IS_BE and the sparc one in all the same places
-  * of drivers?).
-  */
-#define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset)
-#define MMIO_OUT8(base, offset, val) \
-xf86WriteMmio8(base, offset, (CARD8)(val))
-
-#if defined(SPARC_MMIO_IS_BE)   /* No byteswapping */
-#define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset)
-#define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset)
-#define MMIO_OUT16(base, offset, val) \
- xf86WriteMmio16Be(base, offset, (CARD16)(val))
-#define MMIO_OUT32(base, offset, val) \
- xf86WriteMmio32Be(base, offset, (CARD32)(val))
-#else   /* byteswapping is the default */
-#define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset)
-#define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset)
-#define MMIO_OUT16(base, offset, val) \
- xf86WriteMmio16Le(base, offset, (CARD16)(val))
-#define MMIO_OUT32(base, offset, val) \
- xf86WriteMmio32Le(base, offset, (CARD32)(val))
-#endif
-
 #elif defined(__nds32__)
  /*
   * we provide byteswapping and no byteswapping functions here
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 14/21] xfree86: Remove a useless !__SUNPRO_C guard

2014-05-21 Thread Adam Jackson
You can't tell from context here, but this is all inside #ifdef
__GNUC__, so this conditional can't do squat.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index e02f4e1..ac6df80 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1112,7 +1112,6 @@ inl(unsigned PORT_SIZE port)
 
 #else   /* ix86 */
 
-#if !defined(__SUNPRO_C)
 #if !defined(__mc68000__)  !defined(__arm__)  !defined(__sh__)  
!defined(__hppa__)  !defined(__s390__)  !defined(__m32r__)  
!defined(__aarch64__)
 
 static __inline__ void
@@ -1161,7 +1160,6 @@ inl(unsigned short port)
 }
 
 #endif
-#endif  /* __SUNPRO_C */
 
 #endif  /* ix86 */
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 09/21] xfree86: Remove a few random ppc decls

2014-05-21 Thread Adam Jackson
Whatever these are, they're not something grep can find, they must not
be used.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index d283d5e..e156daa 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -143,10 +143,6 @@ extern _X_EXPORT void xf86WriteMmio32LeNB (void *, 
unsigned long, unsigned int);
 #if defined(__powerpc__)  !defined(__OpenBSD__)
 extern void mem_barrier(void);
 extern void write_mem_barrier(void);
-extern void stl_brx(unsigned long, volatile unsigned char *, int);
-extern void stw_brx(unsigned short, volatile unsigned char *, int);
-extern unsigned long ldl_brx(volatile unsigned char *, int);
-extern unsigned short ldw_brx(volatile unsigned char *, int);
 #endif  /* __powerpc__  !__OpenBSD */
 
 #endif  /* NO_INLINE || DO_PROTOTYPES */
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 11/21] xfree86: Undef __HIGHC__

2014-05-21 Thread Adam Jackson
MetaWare High C++ compiler?  xfree86 cvs history shows this being added
in a commit whose text is, classically, updates.  metaware.com
redirects to a 404 on synopsys.com, which to me indicates it's not super
important to them, and their order form won't even tell you how much the
thing costs.  At any rate if this is worth worrying about it's worth
letting autoconf worry about for us.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 0d5d532..dc69f77 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -79,8 +79,6 @@
 #ifndef __inline__
 #if defined(__GNUC__)
 /* gcc has __inline__ */
-#elif defined(__HIGHC__)
-#define __inline__ _Inline
 #else
 #define __inline__ /**/
 #endif
@@ -88,8 +86,6 @@
 #ifndef __inline
 #if defined(__GNUC__)
 /* gcc has __inline */
-#elif defined(__HIGHC__)
-#define __inline _Inline
 #else
 #define __inline /**/
 #endif
@@ -1232,8 +1228,7 @@ inl(unsigned short port)
 #if !defined(__SUNPRO_C)
 #include sys/inline.h
 #endif
-#if !defined(__HIGHC__)  !defined(__SUNPRO_C) || \
-   defined(__USLC__)
+#if  !defined(__SUNPRO_C) || defined(__USLC__)
 #pragma asm partial_optimization outl
 #pragma asm partial_optimization outw
 #pragma asm partial_optimization outb
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 13/21] xfree86: Undef GCCUSESGAS

2014-05-21 Thread Adam Jackson
Can't be needed, we've never defined it in modular xserver.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 54 
 1 file changed, 54 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index 02d120b..e02f4e1 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -1114,59 +1114,6 @@ inl(unsigned PORT_SIZE port)
 
 #if !defined(__SUNPRO_C)
 #if !defined(__mc68000__)  !defined(__arm__)  !defined(__sh__)  
!defined(__hppa__)  !defined(__s390__)  !defined(__m32r__)  
!defined(__aarch64__)
-#ifdef GCCUSESGAS
-
-/*
- * If gcc uses gas rather than the native assembler, the syntax of these
- * inlines has to be different.DHD
- */
-
-static __inline__ void
-outb(unsigned short port, unsigned char val)
-{
-__asm__ __volatile__(outb %0,%1::a(val), d(port));
-}
-
-static __inline__ void
-outw(unsigned short port, unsigned short val)
-{
-__asm__ __volatile__(outw %0,%1::a(val), d(port));
-}
-
-static __inline__ void
-outl(unsigned short port, unsigned int val)
-{
-__asm__ __volatile__(outl %0,%1::a(val), d(port));
-}
-
-static __inline__ unsigned int
-inb(unsigned short port)
-{
-unsigned char ret;
-__asm__ __volatile__(inb %1,%0:=a(ret):d(port));
-
-return ret;
-}
-
-static __inline__ unsigned int
-inw(unsigned short port)
-{
-unsigned short ret;
-__asm__ __volatile__(inw %1,%0:=a(ret):d(port));
-
-return ret;
-}
-
-static __inline__ unsigned int
-inl(unsigned short port)
-{
-unsigned int ret;
-__asm__ __volatile__(inl %1,%0:=a(ret):d(port));
-
-return ret;
-}
-
-#else   /* GCCUSESGAS */
 
 static __inline__ void
 outb(unsigned short port, unsigned char val)
@@ -1213,7 +1160,6 @@ inl(unsigned short port)
 return ret;
 }
 
-#endif  /* GCCUSESGAS */
 #endif
 #endif  /* __SUNPRO_C */
 
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH 19/21] xfree86: Pull generic barrier() definition up to top level

2014-05-21 Thread Adam Jackson
And remove the redundant redecl from the nds32 section.

Signed-off-by: Adam Jackson a...@redhat.com
---
 hw/xfree86/common/compiler.h | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
index e408441..b1fd0d8 100644
--- a/hw/xfree86/common/compiler.h
+++ b/hw/xfree86/common/compiler.h
@@ -94,6 +94,7 @@
 #if !defined(__GNUC__)  !defined(__FUNCTION__)
 #define __FUNCTION__ __func__   /* C99 */
 #endif
+
 #if defined(DO_PROTOTYPES)
 #if !defined(__arm__)
 #if !defined(__sparc__)  !defined(__sparc)  !defined(__arm32__)  
!defined(__nds32__) \
@@ -199,6 +200,10 @@ extern _X_EXPORT void xf86WriteMmio32Le (void *, unsigned 
long, unsigned int);
 #endif
 #endif  /* __GNUC__ */
 
+#ifndef barrier
+#define barrier()
+#endif
+
 #ifndef mem_barrier
 #define mem_barrier()   /* NOP */
 #endif
@@ -790,8 +795,6 @@ xf_outl(unsigned short port, unsigned int val)
  * if there is unaligned port access.
  */
 
-#define barrier()   /* no barrier */
-
 #define PORT_SIZE long
 
 static __inline__ unsigned char
@@ -964,9 +967,6 @@ inl(unsigned PORT_SIZE port)
 
 #endif  /* NDS32_MMIO_SWAP */
 
-#define mem_barrier()   /* XXX: nop for now */
-#define write_mem_barrier() /* XXX: nop for now */
-
 #elif defined(__i386__) || defined(__ia64__)
 
 static __inline__ void
-- 
1.9.0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 00/21] Rewrite hw/xfree86/common/compiler.h

2014-05-21 Thread Julien Cristau
On Wed, May 21, 2014 at 15:35:58 -0400, Adam Jackson wrote:

 compiler.h is the other major place where we hide CPU awareness, and it's
 all quite hideous.  This series clears out a bunch of it.  There's more
 you can do if you're willing to nuke the alpha sparse support, but that's
 a later, more invasive series.
 
for the series:
Reviewed-by: Julien Cristau jcris...@debian.org

Cheers,
Julien
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xman 2/2] Fix shadow warning.

2014-05-21 Thread Thomas Klausner
Signed-off-by: Thomas Klausner w...@netbsd.org
---
 handler.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/handler.c b/handler.c
index 87a928e..fec793d 100644
--- a/handler.c
+++ b/handler.c
@@ -587,17 +587,17 @@ Search(Widget w, XEvent * event, String * params, 
Cardinal * num_params)
 case 'O':
 case 'o':
 if (file != NULL) {
-Widget w;
+Widget w2;
 char *label;
 
-w = CreateManpage(file);
-if (w) {
+w2 = CreateManpage(file);
+if (w2) {
 man_pages_shown++;
 
 /* Put title into new manual page. */
 
 label = man_globals-manpage_title;
-man_globals = GetGlobals(w);
+man_globals = GetGlobals(w2);
 strcpy(man_globals-manpage_title, label);
 ChangeLabel(man_globals-label, label);
 }
-- 
1.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


[PATCH:xman 1/2] Fix tautology to the intended check.

2014-05-21 Thread Thomas Klausner
From: Jörg Sonnenberger jo...@netbsd.org

Signed-off-by: Thomas Klausner w...@netbsd.org
---
 handler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/handler.c b/handler.c
index e61687e..87a928e 100644
--- a/handler.c
+++ b/handler.c
@@ -320,7 +320,7 @@ SaveFormattedPage(Widget w, XEvent * event, String * params,
  * If we are not active then take no action.
  */
 
-if (man_globals-tempfile == NULL)
+if (man_globals-tempfile[0] == '\0')
 return;
 
 switch (params[0][0]) {
-- 
1.9.3

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH] Fix overflow checking extension versions

2014-05-21 Thread Robert Ancell
The easiest way to check for the version of an extension is to send the maximum
possible version numbers in the QueryVersion request. The X server overflows on
these as it assumes you will send a reasonable version number.
---
 include/misc.h | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/include/misc.h b/include/misc.h
index 17de710..9c2f573 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -259,15 +259,19 @@ extern void FormatDouble(double dbl, char *string);
  * or a value greater than 0
  */
 static inline int
-version_compare(uint16_t a_major, uint16_t a_minor,
-uint16_t b_major, uint16_t b_minor)
+version_compare(uint32_t a_major, uint32_t a_minor,
+uint32_t b_major, uint32_t b_minor)
 {
-int a, b;
+if (a_major  b_major)
+return 1;
+if (a_major  b_major)
+return -1;
+if (a_minor  b_minor)
+return 1;
+if (a_minor  b_minor)
+return -1;
 
-a = a_major  16 | a_minor;
-b = b_major  16 | b_minor;
-
-return (a - b);
+return 0;
 }
 
 /* some macros to help swap requests, replies, and events */
-- 
2.0.0.rc0

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 9/9] dix: Remove arch awareness from servermd.h

2014-05-21 Thread Alan Coopersmith

On 05/21/14 12:31 PM, Adam Jackson wrote:

+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__



+#elif __BYTE_ORDER == __ORDER_BIG_ENDIAN__


Did you intend to have the trailing __ on the first BYTE_ORDER but not
the second?

It'd be nice if we could use autoconf settings from configure.ac, but
I don't see where the ENDIAN variable set by AC_C_BIGENDIAN() gets
used for anything at the moment.   Short of that, I think I'll have
to see what's needed to handle the Solaris Studio compilers.

--
-Alan Coopersmith-  alan.coopersm...@oracle.com
 Oracle Solaris Engineering - http://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel