Re: [XFree86] xf86ReadMmio32 not found

2003-12-23 Thread Linus Gasser
On Thursday 18 December 2003 22:33, David Dawes wrote:
 Can someone give the attached patch a try?

 David

Hi,
works fine for me, too (I just saw it's in the CVS already). Even though I 
still have the fonts completely f*-up on some accounts !?!

thanks,

ineiti

___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-18 Thread David Dawes
On Wed, Dec 10, 2003 at 08:48:33PM -0500, David Dawes wrote:
On Thu, Dec 11, 2003 at 12:54:10AM +, Alan Hourihane wrote:
Actually,

I've just examined the code for reading on alpha, and regardless of
a Jensen or other type of alpha it's always the same for a 32bit read.

So can you reverse your patch and try this

Alan.

Index: r200_screen.c
===
RCS file: /X11R6/x-cvs/xc/lib/GL/mesa/src/drv/r200/r200_screen.c,v
retrieving revision 1.6
diff -u -r1.6 r200_screen.c
--- r200_screen.c 2 Dec 2003 13:02:39 -   1.6
+++ r200_screen.c 11 Dec 2003 00:53:47 -
@@ -65,6 +65,18 @@
 #define PCI_CHIP_RV200_QW0x5157 /* Radeon 7500 - not an R200 at all */
 #endif
 
+#ifdef __alpha__
+
+#define mem_barrier()__asm__ __volatile__(mb  : : : memory)
+
+int
+xf86ReadMmio32(pointer Base, register unsigned long Offset)
+{
+mem_barrier();
+return *(volatile CARD32*)((unsigned long)Base+(Offset));
+}
+#endif
+
 static r200ScreenPtr __r200Screen;
 
 static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );


xf86ReadMmio32 is declared in compiler.h as a function pointer,
not a function.

Can someone give the attached patch a try?

David
-- 
David Dawes X-Oz Technologies
www.XFree86.org/~dawes  www.x-oz.com
Index: programs/Xserver/hw/xfree86/common/compiler.h
===
RCS file: /home/x-cvs/xc/programs/Xserver/hw/xfree86/common/compiler.h,v
retrieving revision 3.104
diff -u -r3.104 compiler.h
--- programs/Xserver/hw/xfree86/common/compiler.h   3 Nov 2003 05:11:01 -  
 3.104
+++ programs/Xserver/hw/xfree86/common/compiler.h   18 Dec 2003 21:32:18 -
@@ -1613,7 +1613,17 @@
 /* entry points for Mmio memory access routines */
 extern int (*xf86ReadMmio8)(void *, unsigned long);
 extern int (*xf86ReadMmio16)(void *, unsigned long);
+#  ifndef STANDALONE_MMIO
 extern int (*xf86ReadMmio32)(void *, unsigned long);
+#  else
+/* Some DRI 3D drivers need MMIO_IN32. */
+static __inline__ int
+xf86ReadMmio32(void *Base, unsigned long Offset)
+{
+   __asm__ __volatile__(mb  : : : memory);
+   return *(volatile CARD32*)((unsigned long)Base+(Offset));
+}
+#  endif
 extern void (*xf86WriteMmio8)(int, void *, unsigned long);
 extern void (*xf86WriteMmio16)(int, void *, unsigned long);
 extern void (*xf86WriteMmio32)(int, void *, unsigned long);
@@ -1629,7 +1639,11 @@
 /* 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)
+#  ifndef STANDALONE_MMIO
+#   define MMIO_IN32(base, offset) (*xf86ReadMmio32)(base, offset)
+#  else
+#   define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset)
+#  endif
 
 #  if defined (JENSEN_SUPPORT)
 #   define MMIO_OUT32(base, offset, val) \
Index: lib/GL/mesa/src/drv/r128/r128_ioctl.c
===
RCS file: /home/x-cvs/xc/lib/GL/mesa/src/drv/r128/r128_ioctl.c,v
retrieving revision 1.11
diff -u -r1.11 r128_ioctl.c
--- lib/GL/mesa/src/drv/r128/r128_ioctl.c   28 Sep 2003 20:15:20 -  1.11
+++ lib/GL/mesa/src/drv/r128/r128_ioctl.c   18 Dec 2003 21:25:31 -
@@ -32,6 +32,7 @@
  *
  */
 
+#define STANDALONE_MMIO
 #include r128_context.h
 #include r128_state.h
 #include r128_ioctl.h
Index: lib/GL/mesa/src/drv/r200/r200_screen.c
===
RCS file: /home/x-cvs/xc/lib/GL/mesa/src/drv/r200/r200_screen.c,v
retrieving revision 1.6
diff -u -r1.6 r200_screen.c
--- lib/GL/mesa/src/drv/r200/r200_screen.c  2 Dec 2003 13:02:39 -   1.6
+++ lib/GL/mesa/src/drv/r200/r200_screen.c  18 Dec 2003 21:24:55 -
@@ -39,6 +39,7 @@
 #include imports.h
 #include context.h
 
+#define STANDALONE_MMIO
 #include r200_screen.h
 #include r200_context.h
 #include r200_ioctl.h
Index: lib/GL/mesa/src/drv/radeon/radeon_ioctl.c
===
RCS file: /home/x-cvs/xc/lib/GL/mesa/src/drv/radeon/radeon_ioctl.c,v
retrieving revision 1.13
diff -u -r1.13 radeon_ioctl.c
--- lib/GL/mesa/src/drv/radeon/radeon_ioctl.c   2 Dec 2003 13:02:39 -   1.13
+++ lib/GL/mesa/src/drv/radeon/radeon_ioctl.c   18 Dec 2003 21:26:14 -
@@ -46,6 +46,7 @@
 #include radeon_tcl.h
 #include radeon_sanity.h
 
+#define STANDALONE_MMIO
 #include radeon_macros.h  /* for INREG() */
 
 #include vblank.h
@@ -715,12 +716,10 @@
else
   ret = -EINVAL;
 
-#ifndef __alpha__
if ( ret == -EINVAL ) {
   frame = INREG( RADEON_LAST_FRAME_REG );
   ret = 0;
} 
-#endif
if ( ret ) {
   fprintf( stderr, %s: drmRadeonGetParam: %d\n, __FUNCTION__, ret );
   exit(1);
@@ -1008,12 +1007,10 @@
   } 

Re: [XFree86] xf86ReadMmio32 not found

2003-12-11 Thread Alan Hourihane
On Wed, Dec 10, 2003 at 08:48:33PM -0500, David Dawes wrote:
 On Thu, Dec 11, 2003 at 12:54:10AM +, Alan Hourihane wrote:
 Actually,
 
 I've just examined the code for reading on alpha, and regardless of
 a Jensen or other type of alpha it's always the same for a 32bit read.
 
 So can you reverse your patch and try this
 
 Alan.
 
 Index: r200_screen.c
 ===
 RCS file: /X11R6/x-cvs/xc/lib/GL/mesa/src/drv/r200/r200_screen.c,v
 retrieving revision 1.6
 diff -u -r1.6 r200_screen.c
 --- r200_screen.c2 Dec 2003 13:02:39 -   1.6
 +++ r200_screen.c11 Dec 2003 00:53:47 -
 @@ -65,6 +65,18 @@
  #define PCI_CHIP_RV200_QW   0x5157 /* Radeon 7500 - not an R200 at all */
  #endif
  
 +#ifdef __alpha__
 +
 +#define mem_barrier()__asm__ __volatile__(mb  : : : memory)
 +
 +int
 +xf86ReadMmio32(pointer Base, register unsigned long Offset)
 +{
 +mem_barrier();
 +return *(volatile CARD32*)((unsigned long)Base+(Offset));
 +}
 +#endif
 +
  static r200ScreenPtr __r200Screen;
  
  static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );
 
 
 xf86ReadMmio32 is declared in compiler.h as a function pointer,
 not a function.

Gack. It was late here. I'll plug in a Radeon into my Alpha and come
up with something today.

Alan.
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread manu
Le 10.12.2003 02:05:50, Eric Anholt a écrit :
On Tue, 2003-12-09 at 08:57, manu wrote:
 Le 09.12.2003 23:06:05, Linus Gasser a écrit :
  Hello,
  I installed a brand-new, shiny Radeon 9200 PCI card in my alpha
164
  (hoping to
  be able to play crack-attack ;) and for two weeks tried to  
install

  it.
  Now
  that I have
 
  Full build of XFree86 version 4.3.99.901 ( 2 December 2003)
complete.
 
  installed (well, cvs is from 6th of december), I hoped to be on  
my
  way:
 
  (II) RADEON(0): X context handle = 0x0001
  (II) RADEON(0): [drm] installed DRM signal handler
  (II) RADEON(0): [DRI] installation complete
  (II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers
  (II) RADEON(0): [drm] Mapped 32 vertex/indirect buffers
  (II) RADEON(0): [drm] dma control initialized, using IRQ 19
  (II) RADEON(0): [drm] Initialized kernel GART heap manager,
5111808
  (II) RADEON(0): Direct rendering enabled
 
  but, alas, running glxinfo gives me this:
 
  [EMAIL PROTECTED]:~$ LIBGL_DEBUG=1 glxinfo
  name of display: :0.0
  libGL error: dlopen /usr/X11R6/lib/modules/dri/r200_dri.so failed
  (/usr/X11R6/lib/modules/dri/r200_dri.so: undefined symbol:
  xf86ReadMmio32)
  libGL error: unable to find driver: r200_dri.so
 
  what did I do wrong that he doesn't find this symbol? Any idea?
 

 This file r200_dri.so is the dri module taking care of your gfx
chip.
 Seems that it was not built on your box. You can just download
 snapshots from the dri website on sourceforge.
 Be careful that you perhaps need to also download a special X
server.
 Ate least this was needed with 4.3.0 release, I am not sure this is

 also needed with current cvs, anyona could confirm/infrim please?

The log cited shows that the module does exist, it's just that it
can't
be dlopen()ed because it has an undefined symbol.  I don't know why
the
driver would be referring to an xf86ReadMmio32, though.
Oops you're right, my bad, I read that too fast.
Still this seems to be a weird error.
Bye
Manu

pgp0.pgp
Description: PGP signature


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread Linus Gasser
On Wednesday 10 December 2003 19:52, David Dawes wrote:
 On Wed, Dec 10, 2003 at 09:30:12AM +0100, Linus Gasser wrote:
 As I wrote, I installed a fresh, new XFree 4.3.99.901, cvs from 6th
  December, and I also checked that the file that has been compiled in the
  XFree-tree is the same as in
 /usr/X11R6/lib/modules/dri/r200_dri.so
 but I'll check again this evening, just to be sure.

 What platform are you building on?  It looks like the INREG() code in
 r200_screen.c could expand to this on some platforms.  Some code in the
 radeon_dri.so module that uses INREG is #ifdef'd out for Alpha platforms.
 Not all of it though, and not the instances of it in the r200_dri.so
 module.

 David

It's an alpha pc164 (as stated in my first mail ;-), and I stumbled already 
over a first error that got fixed quite fast (#938, thanks to Alan 
Hourihane), obviously I should've filed a second bug. I've done so now, and 
also added the diff with the INREGs #ifdef'd out for Alpha (there was still 
some in radeon_screen.c, r128_ioctl.c). The bug-# is 967, the attachement is 
there. Now it works for me!

thanks for your fast reply and for the right hint!

ineiti

-- 
--
Linus Gasser
Chemin des Cèdres 1
1004 Lausanne
021 647 53 05
http://www.linusetviviane.ch
--


___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread David Dawes
On Wed, Dec 10, 2003 at 11:06:01PM +0100, Linus Gasser wrote:
On Wednesday 10 December 2003 19:52, David Dawes wrote:
 On Wed, Dec 10, 2003 at 09:30:12AM +0100, Linus Gasser wrote:
 As I wrote, I installed a fresh, new XFree 4.3.99.901, cvs from 6th
  December, and I also checked that the file that has been compiled in the
  XFree-tree is the same as in
 /usr/X11R6/lib/modules/dri/r200_dri.so
 but I'll check again this evening, just to be sure.

 What platform are you building on?  It looks like the INREG() code in
 r200_screen.c could expand to this on some platforms.  Some code in the
 radeon_dri.so module that uses INREG is #ifdef'd out for Alpha platforms.
 Not all of it though, and not the instances of it in the r200_dri.so
 module.

 David

It's an alpha pc164 (as stated in my first mail ;-), and I stumbled already 
over a first error that got fixed quite fast (#938, thanks to Alan 
Hourihane), obviously I should've filed a second bug. I've done so now, and 
also added the diff with the INREGs #ifdef'd out for Alpha (there was still 
some in radeon_screen.c, r128_ioctl.c). The bug-# is 967, the attachement is 
there. Now it works for me!

thanks for your fast reply and for the right hint!

I don't know that disabling it is a real solution though.  It is
clearly better than it was, but some apps are likely to fail.

Maybe the DRM driver should be providing this information?  I'm
not even sure what the security implications are of allowing the
MMIO area to be mapped into an app.  Doesn't that mean that a rogue
DRI app could potentially reprogram the video hardware, unless it
is mapped read-only?

David
-- 
David Dawes
developer/release engineer  The XFree86 Project
www.XFree86.org/~dawes
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread Alan Hourihane
Actually,

I've just examined the code for reading on alpha, and regardless of
a Jensen or other type of alpha it's always the same for a 32bit read.

So can you reverse your patch and try this

Alan.

Index: r200_screen.c
===
RCS file: /X11R6/x-cvs/xc/lib/GL/mesa/src/drv/r200/r200_screen.c,v
retrieving revision 1.6
diff -u -r1.6 r200_screen.c
--- r200_screen.c   2 Dec 2003 13:02:39 -   1.6
+++ r200_screen.c   11 Dec 2003 00:53:47 -
@@ -65,6 +65,18 @@
 #define PCI_CHIP_RV200_QW  0x5157 /* Radeon 7500 - not an R200 at all */
 #endif
 
+#ifdef __alpha__
+
+#define mem_barrier()__asm__ __volatile__(mb  : : : memory)
+
+int
+xf86ReadMmio32(pointer Base, register unsigned long Offset)
+{
+mem_barrier();
+return *(volatile CARD32*)((unsigned long)Base+(Offset));
+}
+#endif
+
 static r200ScreenPtr __r200Screen;
 
 static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread Alan Hourihane
On Wed, Dec 10, 2003 at 07:39:43PM -0500, David Dawes wrote:
 On Thu, Dec 11, 2003 at 12:25:25AM +, Alan Hourihane wrote:
 On Wed, Dec 10, 2003 at 07:13:39PM -0500, David Dawes wrote:
  On Wed, Dec 10, 2003 at 11:06:01PM +0100, Linus Gasser wrote:
  On Wednesday 10 December 2003 19:52, David Dawes wrote:
   On Wed, Dec 10, 2003 at 09:30:12AM +0100, Linus Gasser wrote:
   As I wrote, I installed a fresh, new XFree 4.3.99.901, cvs from 6th
December, and I also checked that the file that has been compiled in the
XFree-tree is the same as in
   /usr/X11R6/lib/modules/dri/r200_dri.so
   but I'll check again this evening, just to be sure.
  
   What platform are you building on?  It looks like the INREG() code in
   r200_screen.c could expand to this on some platforms.  Some code in the
   radeon_dri.so module that uses INREG is #ifdef'd out for Alpha platforms.
   Not all of it though, and not the instances of it in the r200_dri.so
   module.
  
   David
  
  It's an alpha pc164 (as stated in my first mail ;-), and I stumbled already 
  over a first error that got fixed quite fast (#938, thanks to Alan 
  Hourihane), obviously I should've filed a second bug. I've done so now, and 
  also added the diff with the INREGs #ifdef'd out for Alpha (there was still 
  some in radeon_screen.c, r128_ioctl.c). The bug-# is 967, the attachement is 
  there. Now it works for me!
  
  thanks for your fast reply and for the right hint!
  
  I don't know that disabling it is a real solution though.  It is
  clearly better than it was, but some apps are likely to fail.
  
  Maybe the DRM driver should be providing this information?  I'm
  not even sure what the security implications are of allowing the
  MMIO area to be mapped into an app.  Doesn't that mean that a rogue
  DRI app could potentially reprogram the video hardware, unless it
  is mapped read-only?
 
 It is mapped read-only.
 
 Good :-)
 
 I guess the only way to handle this is to export the memory read/write
 functions in a library to allow DRI drivers to link against. So we'd
 have a library that contains xf86ReadMmio32(), xf86ReadMmio16()...
 
 Does that sound plausible David ?
 
 It looks complicated on Alpha because of the sparse/dense mapping
 modes, so the XFree86 server has to determine at run-time how to
 do MMIO.  However, if only 32-bit access is used (and you don't
 need Jensen support) just declaring a local xf86ReadMmio32 function
 pointer and initialising it to readDense32() should be good enough.
 I think readDense32() is provided in libc on Alpha.

Actually, I take that back for Jensen. I didn't look close enough.

Alan.
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread Alan Hourihane
On Wed, Dec 10, 2003 at 07:39:43PM -0500, David Dawes wrote:
 On Thu, Dec 11, 2003 at 12:25:25AM +, Alan Hourihane wrote:
 On Wed, Dec 10, 2003 at 07:13:39PM -0500, David Dawes wrote:
  On Wed, Dec 10, 2003 at 11:06:01PM +0100, Linus Gasser wrote:
  On Wednesday 10 December 2003 19:52, David Dawes wrote:
   On Wed, Dec 10, 2003 at 09:30:12AM +0100, Linus Gasser wrote:
   As I wrote, I installed a fresh, new XFree 4.3.99.901, cvs from 6th
December, and I also checked that the file that has been compiled in the
XFree-tree is the same as in
   /usr/X11R6/lib/modules/dri/r200_dri.so
   but I'll check again this evening, just to be sure.
  
   What platform are you building on?  It looks like the INREG() code in
   r200_screen.c could expand to this on some platforms.  Some code in the
   radeon_dri.so module that uses INREG is #ifdef'd out for Alpha platforms.
   Not all of it though, and not the instances of it in the r200_dri.so
   module.
  
   David
  
  It's an alpha pc164 (as stated in my first mail ;-), and I stumbled already 
  over a first error that got fixed quite fast (#938, thanks to Alan 
  Hourihane), obviously I should've filed a second bug. I've done so now, and 
  also added the diff with the INREGs #ifdef'd out for Alpha (there was still 
  some in radeon_screen.c, r128_ioctl.c). The bug-# is 967, the attachement is 
  there. Now it works for me!
  
  thanks for your fast reply and for the right hint!
  
  I don't know that disabling it is a real solution though.  It is
  clearly better than it was, but some apps are likely to fail.
  
  Maybe the DRM driver should be providing this information?  I'm
  not even sure what the security implications are of allowing the
  MMIO area to be mapped into an app.  Doesn't that mean that a rogue
  DRI app could potentially reprogram the video hardware, unless it
  is mapped read-only?
 
 It is mapped read-only.
 
 Good :-)
 
 I guess the only way to handle this is to export the memory read/write
 functions in a library to allow DRI drivers to link against. So we'd
 have a library that contains xf86ReadMmio32(), xf86ReadMmio16()...
 
 Does that sound plausible David ?
 
 It looks complicated on Alpha because of the sparse/dense mapping
 modes, so the XFree86 server has to determine at run-time how to
 do MMIO.  However, if only 32-bit access is used (and you don't
 need Jensen support) just declaring a local xf86ReadMmio32 function
 pointer and initialising it to readDense32() should be good enough.
 I think readDense32() is provided in libc on Alpha.
 
 All other platforms should get handled via the inline's provided
 in compiler.h.

In fact, regardless of dense or sparse mapping the read is exactly the
same for 32bit access. It only differs for 8 or 16 bit access. That's
even true for JENSEN. And all readDense32() does is a mem_barrier then
a volatile read - just like normal.

I'm thinking of committing this patch...

Alan.

Index: compiler.h
===
RCS file: /X11R6/x-cvs/xc/programs/Xserver/hw/xfree86/common/compiler.h,v
retrieving revision 3.104
diff -u -r3.104 compiler.h
--- compiler.h  3 Nov 2003 05:11:01 -   3.104
+++ compiler.h  11 Dec 2003 01:05:08 -
@@ -1616,7 +1616,7 @@
 extern int (*xf86ReadMmio32)(void *, unsigned long);
 extern void (*xf86WriteMmio8)(int, void *, unsigned long);
 extern void (*xf86WriteMmio16)(int, void *, unsigned long);
-extern void (*xf86WriteMmio32)(int, void *, unsigned long);
+/* extern void (*xf86WriteMmio32)(int, void *, unsigned long); */
 extern void (*xf86WriteMmioNB8)(int, void *, unsigned long);
 extern void (*xf86WriteMmioNB16)(int, void *, unsigned long);
 extern void (*xf86WriteMmioNB32)(int, void *, unsigned long);
@@ -1625,11 +1625,19 @@
 extern void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int);
 extern void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int);
 
+/* regardless of the type of alpha we have, a 32bit read is always the same */
+static __inline__ unsigned int
+xf86ReadMmio32(pointer Base, register unsigned long Offset)
+{
+mem_barrier();
+return *(volatile unsigned int *)((unsigned long)Base+(Offset));
+}
+
 /* 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_IN32(base, offset) xf86ReadMmio32(base, offset)
 
 #  if defined (JENSEN_SUPPORT)
 #   define MMIO_OUT32(base, offset, val) \
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86


Re: [XFree86] xf86ReadMmio32 not found

2003-12-10 Thread David Dawes
On Thu, Dec 11, 2003 at 12:54:10AM +, Alan Hourihane wrote:
Actually,

I've just examined the code for reading on alpha, and regardless of
a Jensen or other type of alpha it's always the same for a 32bit read.

So can you reverse your patch and try this

Alan.

Index: r200_screen.c
===
RCS file: /X11R6/x-cvs/xc/lib/GL/mesa/src/drv/r200/r200_screen.c,v
retrieving revision 1.6
diff -u -r1.6 r200_screen.c
--- r200_screen.c  2 Dec 2003 13:02:39 -   1.6
+++ r200_screen.c  11 Dec 2003 00:53:47 -
@@ -65,6 +65,18 @@
 #define PCI_CHIP_RV200_QW 0x5157 /* Radeon 7500 - not an R200 at all */
 #endif
 
+#ifdef __alpha__
+
+#define mem_barrier()__asm__ __volatile__(mb  : : : memory)
+
+int
+xf86ReadMmio32(pointer Base, register unsigned long Offset)
+{
+mem_barrier();
+return *(volatile CARD32*)((unsigned long)Base+(Offset));
+}
+#endif
+
 static r200ScreenPtr __r200Screen;
 
 static int getSwapInfo( __DRIdrawablePrivate *dPriv, __DRIswapInfo * sInfo );


xf86ReadMmio32 is declared in compiler.h as a function pointer,
not a function.

David
-- 
David Dawes
developer/release engineer  The XFree86 Project
www.XFree86.org/~dawes
___
XFree86 mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xfree86