Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Sven LUTHER
On Thu, Sep 23, 1999 at 08:58:19AM -0400, Ben Collins wrote:
> On Thu, Sep 23, 1999 at 02:54:51PM +0200, Sven LUTHER wrote:
> > On Thu, Sep 23, 1999 at 08:46:41AM -0400, Ben Collins wrote:
> > > On Thu, Sep 23, 1999 at 02:40:34PM +0200, Sven LUTHER wrote:
> > > > > 
> > > > > I never said it needed to be rejected, I just said add #if's around 
> > > > > it, which was
> > > > > contructive and solved both problems. You cannot have it in 
> > > > > regmach64.h even with
> > > > > the #if's around it for sparc, I tried it and it wont pick it up for 
> > > > > some reason.
> > > > 
> > > > Maybe it would be better to solve that problem. regmach64.h is included 
> > > > from
> > > > mach64.h i think, into mach64im.c.
> > > 
> > > The problem is that regmach64.h should be regmach64.c (as it was 
> > > orignally coded)
> > > but for some reason it has been patched up this way. Atleast this is my 
> > > take on it.
> > > With all the macros and defines across several includes, mac64im.c just 
> > > wont pick
> > > it up for sparc.
> > > 
> > > > There is an #ifdef FBDEV around the whole regxxx stuff. Do you build an 
> > > > fbdev
> > > > server on sparc or a normal one ? There should be no reason it don't 
> > > > works.
> > > 
> > > No, it's a normal server.
> > 
> > Ok, that explains thing, since the regmach64.h stuff has a #ifdef FBDEV 
> > server
> > around it. Could you please try the patch i sent to this list ? It should
> > provide a solution for this. It is quite hacky yet, but i would like to 
> > know if
> > it works. Basicaly i put a #elif defined (__sparc__) after the #ifdef
> > FBDEV_server which contains a copy of the regwbe function. So it should also
> > get included on the non fbdev sparc built.
> 
> How about moving that whole function out of the FBDEV_server block and setup 
> it up
> like:
> 
> #if defined(FBDEV_server) || defined(__sparc__)
> .
> #endif
> 
> This way it only needs to be listed once.

Yes, that would be a good idea. But beware there are other things defined in
the fbdev block, and anyway, it should become a :

#if (defined(FBDEV_server) && defined (__powerpc)) || defined (__sparc)

or something such.

Could you do it , and test the build on sparc ? I am away from my box now.

Do you do a lot of X related work on sparc ? you should consider becoming an
Xfree member then ...

> 
> > I will write also to the Xfree list to see whåt is the common opinion on 
> > this
> > stuff, and see to it that it is handled in a nice way. BTW, did you try the
> > 3.9.x servers on sparc ? 
> 
> Not yet, I have been busy with a few other things.

It is very nice, a big enhancement over the current X server. Does anyone know
if there will be a replacement X available for debian by the time potato ships
? Up to now, i just built a static server, and called it through
/etc/X11/Xserver. 

Friendly,

Sven LUTHER


Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Ben Collins
On Thu, Sep 23, 1999 at 02:54:51PM +0200, Sven LUTHER wrote:
> On Thu, Sep 23, 1999 at 08:46:41AM -0400, Ben Collins wrote:
> > On Thu, Sep 23, 1999 at 02:40:34PM +0200, Sven LUTHER wrote:
> > > > 
> > > > I never said it needed to be rejected, I just said add #if's around it, 
> > > > which was
> > > > contructive and solved both problems. You cannot have it in regmach64.h 
> > > > even with
> > > > the #if's around it for sparc, I tried it and it wont pick it up for 
> > > > some reason.
> > > 
> > > Maybe it would be better to solve that problem. regmach64.h is included 
> > > from
> > > mach64.h i think, into mach64im.c.
> > 
> > The problem is that regmach64.h should be regmach64.c (as it was orignally 
> > coded)
> > but for some reason it has been patched up this way. Atleast this is my 
> > take on it.
> > With all the macros and defines across several includes, mac64im.c just 
> > wont pick
> > it up for sparc.
> > 
> > > There is an #ifdef FBDEV around the whole regxxx stuff. Do you build an 
> > > fbdev
> > > server on sparc or a normal one ? There should be no reason it don't 
> > > works.
> > 
> > No, it's a normal server.
> 
> Ok, that explains thing, since the regmach64.h stuff has a #ifdef FBDEV server
> around it. Could you please try the patch i sent to this list ? It should
> provide a solution for this. It is quite hacky yet, but i would like to know 
> if
> it works. Basicaly i put a #elif defined (__sparc__) after the #ifdef
> FBDEV_server which contains a copy of the regwbe function. So it should also
> get included on the non fbdev sparc built.

How about moving that whole function out of the FBDEV_server block and setup it 
up
like:

#if defined(FBDEV_server) || defined(__sparc__)
.
#endif

This way it only needs to be listed once.

> I will write also to the Xfree list to see whåt is the common opinion on this
> stuff, and see to it that it is handled in a nice way. BTW, did you try the
> 3.9.x servers on sparc ? 

Not yet, I have been busy with a few other things.

Ben


Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Sven LUTHER
On Thu, Sep 23, 1999 at 08:46:41AM -0400, Ben Collins wrote:
> On Thu, Sep 23, 1999 at 02:40:34PM +0200, Sven LUTHER wrote:
> > > 
> > > I never said it needed to be rejected, I just said add #if's around it, 
> > > which was
> > > contructive and solved both problems. You cannot have it in regmach64.h 
> > > even with
> > > the #if's around it for sparc, I tried it and it wont pick it up for some 
> > > reason.
> > 
> > Maybe it would be better to solve that problem. regmach64.h is included from
> > mach64.h i think, into mach64im.c.
> 
> The problem is that regmach64.h should be regmach64.c (as it was orignally 
> coded)
> but for some reason it has been patched up this way. Atleast this is my take 
> on it.
> With all the macros and defines across several includes, mac64im.c just wont 
> pick
> it up for sparc.
> 
> > There is an #ifdef FBDEV around the whole regxxx stuff. Do you build an 
> > fbdev
> > server on sparc or a normal one ? There should be no reason it don't works.
> 
> No, it's a normal server.

Ok, that explains thing, since the regmach64.h stuff has a #ifdef FBDEV server
around it. Could you please try the patch i sent to this list ? It should
provide a solution for this. It is quite hacky yet, but i would like to know if
it works. Basicaly i put a #elif defined (__sparc__) after the #ifdef
FBDEV_server which contains a copy of the regwbe function. So it should also
get included on the non fbdev sparc built.

> > Also one question is what kind of stuff will be included in the upstream 
> > source
> > ? Are you also a xfree member ?
> 
> The sparc stuff is not from upstream, so I have no idea what they will do 
> upstream
> and no I'm not and xfree member.

Ok, ...

I will write also to the Xfree list to see whåt is the common opinion on this
stuff, and see to it that it is handled in a nice way. BTW, did you try the
3.9.x servers on sparc ? 

Friendly,

Sven LUTHER


Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Ben Collins
On Thu, Sep 23, 1999 at 02:40:34PM +0200, Sven LUTHER wrote:
> > 
> > I never said it needed to be rejected, I just said add #if's around it, 
> > which was
> > contructive and solved both problems. You cannot have it in regmach64.h 
> > even with
> > the #if's around it for sparc, I tried it and it wont pick it up for some 
> > reason.
> 
> Maybe it would be better to solve that problem. regmach64.h is included from
> mach64.h i think, into mach64im.c.

The problem is that regmach64.h should be regmach64.c (as it was orignally 
coded)
but for some reason it has been patched up this way. Atleast this is my take on 
it.
With all the macros and defines across several includes, mac64im.c just wont 
pick
it up for sparc.

> There is an #ifdef FBDEV around the whole regxxx stuff. Do you build an fbdev
> server on sparc or a normal one ? There should be no reason it don't works.

No, it's a normal server.

> Also one question is what kind of stuff will be included in the upstream 
> source
> ? Are you also a xfree member ?

The sparc stuff is not from upstream, so I have no idea what they will do 
upstream
and no I'm not and xfree member.

> > 
> > Please just have it to where it stays in mach64im.c with #ifdef __sparc__ 
> > around
> > it.
> 
> If we cannot find another solution, i will do that.

Thanks.


Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Sven LUTHER
On Thu, Sep 23, 1999 at 08:30:37AM -0400, Ben Collins wrote:
> On Thu, Sep 23, 1999 at 02:17:43PM +0200, Sven LUTHER wrote:
> > > 
> > > As I said before commenting that out will break sparc, please add "#ifdef
> > > __sparc__" around the function instead.
> > 
> > Huh ???
> > 
> > Ok, but it makes no sense to have regwbe for sparc in mach64im.c, and having
> > regw,regr and regwbe for other archs in regmach64.h.
> > 
> > NOt sure if it is the right place, since the functions will be copied over 
> > all
> > files that includes regmach64.h, maybe they are not counted, because they 
> > are
> > inlined function anyway.
> > 
> > Anyway, i made a patch that lets me compile 3.3.5 on ppc, and should be ok 
> > for
> > sparc also. Please check it, and if i made a mistake, correct it on the 
> > patch,
> > instead of saying it don't compile on sparc and thus should be rejected. I
> > understand that sparc is in stable and powerpc not, but that is not a
> > constructive way of handling things.
> 
> I never said it needed to be rejected, I just said add #if's around it, which 
> was
> contructive and solved both problems. You cannot have it in regmach64.h even 
> with
> the #if's around it for sparc, I tried it and it wont pick it up for some 
> reason.

Maybe it would be better to solve that problem. regmach64.h is included from
mach64.h i think, into mach64im.c.

There is an #ifdef FBDEV around the whole regxxx stuff. Do you build an fbdev
server on sparc or a normal one ? There should be no reason it don't works.

Also one question is what kind of stuff will be included in the upstream source
? Are you also a xfree member ?

> 
> Please just have it to where it stays in mach64im.c with #ifdef __sparc__ 
> around
> it.

If we cannot find another solution, i will do that.

Friendly,

Sven LUTHER


Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Ben Collins
On Thu, Sep 23, 1999 at 02:17:43PM +0200, Sven LUTHER wrote:
> > 
> > As I said before commenting that out will break sparc, please add "#ifdef
> > __sparc__" around the function instead.
> 
> Huh ???
> 
> Ok, but it makes no sense to have regwbe for sparc in mach64im.c, and having
> regw,regr and regwbe for other archs in regmach64.h.
> 
> NOt sure if it is the right place, since the functions will be copied over all
> files that includes regmach64.h, maybe they are not counted, because they are
> inlined function anyway.
> 
> Anyway, i made a patch that lets me compile 3.3.5 on ppc, and should be ok for
> sparc also. Please check it, and if i made a mistake, correct it on the patch,
> instead of saying it don't compile on sparc and thus should be rejected. I
> understand that sparc is in stable and powerpc not, but that is not a
> constructive way of handling things.

I never said it needed to be rejected, I just said add #if's around it, which 
was
contructive and solved both problems. You cannot have it in regmach64.h even 
with
the #if's around it for sparc, I tried it and it wont pick it up for some 
reason.

Please just have it to where it stays in mach64im.c with #ifdef __sparc__ around
it.

Ben


Re: xfree86-1_3.3.4 now compiles on powerpc, mach64 mess fixed, patch included.

1999-09-23 Thread Sven LUTHER
On Wed, Sep 22, 1999 at 04:04:41AM -0400, Ben Collins wrote:
> On Wed, Sep 22, 1999 at 03:23:10PM +0200, Sven LUTHER wrote:
> > On Tue, Sep 21, 1999 at 07:53:00PM +0200, Hartmut Koptein wrote:
> > > > > And another mistake in the patch, should have waited a bit more 
> > > > > before posting,
> > > > > but since i was going away, i wanted to make things available.
> > > > > 
> > > > > Anyway, the build process breaks again læter, didn't have time to 
> > > > > check it out
> > > > > though.
> > > > > 
> > > > > So the correct patch for the mach64 stuff follows.
> > > > 
> > > > Could you try the 3.3.5 source that was installed yesterday? It built 
> > > > fine
> > > > on sparc (which 3.3.4-2 didn't do).
> > > 
> > > No, 3.3.5 is also broken:
> > > 
> > > 
> > > rm -f mach64im.o
> > > gcc -c -O2 -fsigned-char  
> > > -I../../../../../programs/Xserver/hw/xfree86/common -I.
> > 
> > Yes,
> > 
> > Noticed that also, 
> > 
> > I have a patch and are compiling right no will upload everything tomorrow.
> > 
> > ( notice that the patch is the part of the patch i posted previously, the 
> > one
> >   commenting out regwbe in mach64im.c)
> 
> As I said before commenting that out will break sparc, please add "#ifdef
> __sparc__" around the function instead.

Huh ???

Ok, but it makes no sense to have regwbe for sparc in mach64im.c, and having
regw,regr and regwbe for other archs in regmach64.h.

NOt sure if it is the right place, since the functions will be copied over all
files that includes regmach64.h, maybe they are not counted, because they are
inlined function anyway.

Anyway, i made a patch that lets me compile 3.3.5 on ppc, and should be ok for
sparc also. Please check it, and if i made a mistake, correct it on the patch,
instead of saying it don't compile on sparc and thus should be rejected. I
understand that sparc is in stable and powerpc not, but that is not a
constructive way of handling things.

So i attach here two files :

026_mach64_ppc_fix.diff that fixes the above mentioned problem, and 
027_fbdev_pm2_fix.diff that fixes a link error with the pm2 fbdev server.

Also i am uploading this stuff to master, the packages are numbered 3.3.5-1.1,
but i am not uploading sources, hope that will work.

Friendly,

Sven LUTHER
--- xc/programs/Xserver/hw/xfree86/accel/mach64/mach64im.c.orig Tue Sep 21 
21:18:57 1999
+++ xc/programs/Xserver/hw/xfree86/accel/mach64/mach64im.c  Tue Sep 21 
21:19:11 1999
@@ -77,11 +77,6 @@
 unsigned char bytes[4];
 };
 
-static __inline__ void regwbe(volatile unsigned long regindex, unsigned long 
regdata)
-{
-*(unsigned long *)(mach64MemReg + regindex) = regdata;
-}
-
 static __inline__ unsigned int bit_reverse32(unsigned int bits)
 {
 union intbytes c,a;
--- xc/programs/Xserver/hw/xfree86/accel/mach64/regmach64.h.origWed Sep 
22 17:15:47 1999
+++ xc/programs/Xserver/hw/xfree86/accel/mach64/regmach64.h Wed Sep 22 
17:15:51 1999
@@ -788,6 +788,13 @@
   *(unsigned long *)(mach64MemReg + regindex) = regdata;
 }
 
+#elif defined (__sparc__)
+
+static inline void regwbe(volatile unsigned long regindex, unsigned long 
regdata
+)
+{
+  *(unsigned long *)(mach64MemReg + regindex) = regdata;
+}
 #endif /* FBDEV_SERVER */
 
 /* Wait until "v" queue entries are free */
--- xc/programs/Xserver/Imakefile.orig  Wed Sep 22 08:48:42 1999
+++ xc/programs/Xserver/Imakefile   Wed Sep 22 17:09:19 1999
@@ -1690,10 +1690,14 @@
 IMSTTDIR = hw/xfree68/imstt
 FBDEVFBLIBS:= $(FBDEVFBLIBS) $(XF68SRC)/imstt/LibraryTargetName(imstt)
 #endif
+#if XF68FBDevIMSTT
+PM2DIR = hw/xfree68/pm2
+FBDEVFBLIBS:= $(FBDEVFBLIBS) $(XF68SRC)/pm2/LibraryTargetName(pm2)
+#endif
 XF68FBDevSUBDIRS = $(STDDIRS) $(MFBDIR) $(IPLAN2P2DIR) $(IPLAN2P4DIR) \
$(IPLAN2P8DIR) $(ILBMDIR) $(AFBDIR) $(CFB8DIR) \
$(CFB16DIR) $(CFB24DIR) $(CFB32DIR) $(DDXDIR3) $(DEPDIRS) \
-  $(NCR77C32DIR) $(MACH64DIR) $(IMSTTDIR)
+  $(NCR77C32DIR) $(MACH64DIR) $(IMSTTDIR) $(PM2DIR)
 XF68FBDevOBJS = $(XF68COMSRC)/XF68_FBDev.o
 XF68FBDevLIBS = $(XF68SRC)/fbdev/LibraryTargetName(fbdev) $(XF68LIBS) \
 PreFbLibs $(FBDEVFBLIBS) PostFbLibs