* Re: still no accelerated X ($#!$*)
@ 2000-01-19 10:38 Moritz Thomas
2000-01-20 18:19 ` David Edelsohn
0 siblings, 1 reply; 5+ messages in thread
From: Moritz Thomas @ 2000-01-19 10:38 UTC (permalink / raw)
To: linuxppc-dev, linuxppc-user; +Cc: Kevin_Hendricks
Finally I got it!
The problem was in the Xpmac code. If I remember correctly, this error
was some time ago in the kernel's "atyfb.c" as well. Probably this is also
fixed in current release of Xpmac
The following functions in "regmach.h":
#if defined (__powerpc__)
extern pointer mach64MemReg;
static inline void regw(volatile unsigned long regindex, unsigned long regdata)
{
register unsigned long base_addr = (unsigned long)mach64MemReg;
asm("stwbrx %0,%1,%2": : "r"(regdata), "r"(regindex), "r"(base_addr));
}
static inline unsigned long regr(volatile unsigned long regindex)
{
register unsigned long base_addr = (unsigned long)mach64MemReg, val;
asm("lwbrx %0,%1,%2": "=r"(val):"r"(regindex), "r"(base_addr));
return(val);
}
#endif
need to be replaced by:
#if defined (__powerpc__)
extern pointer mach64MemReg;
static inline void regw(volatile unsigned long regindex, unsigned long regdata)
{
register unsigned long base_addr = (unsigned long)mach64MemReg;
asm("stwbrx %0,%1,%2": : "r"(regdata), "b"(regindex), "r"(base_addr));
}
static inline unsigned long regr(volatile unsigned long regindex)
{
register unsigned long base_addr = (unsigned long)mach64MemReg, val;
asm("lwbrx %0,%1,%2": "=r"(val):"b"(regindex), "r"(base_addr));
return(val);
}
#endif
Don't know if this is correct (no clue about ppc assembly), but it works...
mo
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: still no accelerated X ($#!$*)
2000-01-19 10:38 still no accelerated X ($#!$*) Moritz Thomas
@ 2000-01-20 18:19 ` David Edelsohn
2000-01-20 18:25 ` Kevin Hendricks
0 siblings, 1 reply; 5+ messages in thread
From: David Edelsohn @ 2000-01-20 18:19 UTC (permalink / raw)
To: Moritz Thomas; +Cc: linuxppc-dev, linuxppc-user, Kevin_Hendricks
Why does each application/library define its own, incorrect
definition of byte-reversed instructions? Doesn't some Linux/PPC header
file define this once in a awy that could be imported by others?
One cannot use "r" as a constraint for a base address, that is
what the GCC PowerPC port defines "b" for. The load/store instruction
patterns in the GCC PowerPC machine description file use a different
constraint letter for the base address, and anyone writing inlined
assembly -- especially loads and stores -- should browse the GCC machine
description.
David
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: still no accelerated X ($#!$*)
2000-01-20 18:19 ` David Edelsohn
@ 2000-01-20 18:25 ` Kevin Hendricks
2000-01-20 18:42 ` Geert Uytterhoeven
0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hendricks @ 2000-01-20 18:25 UTC (permalink / raw)
To: David Edelsohn, Moritz Thomas
Cc: linuxppc-dev, linuxppc-user, Kevin_Hendricks
Hi,
Thanks for your reply.
> Why does each application/library define its own, incorrect
> definition of byte-reversed instructions? Doesn't some Linux/PPC header
> file define this once in a awy that could be imported by others?
I could not find one. I will look again.
> One cannot use "r" as a constraint for a base address, that is
> what the GCC PowerPC port defines "b" for. The load/store instruction
> patterns in the GCC PowerPC machine description file use a different
> constraint letter for the base address, and anyone writing inlined
> assembly -- especially loads and stores -- should browse the GCC machine
> description.
Thanks I will as soon as I find it ;-). But the assembler generated was exactly
the same in my simple test case. Is this just luck?
Thanks,
Kevin
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: still no accelerated X ($#!$*)
2000-01-20 18:25 ` Kevin Hendricks
@ 2000-01-20 18:42 ` Geert Uytterhoeven
0 siblings, 0 replies; 5+ messages in thread
From: Geert Uytterhoeven @ 2000-01-20 18:42 UTC (permalink / raw)
To: Kevin Hendricks
Cc: David Edelsohn, Moritz Thomas, linuxppc-dev, linuxppc-user,
Kevin_Hendricks
On Thu, 20 Jan 2000, Kevin Hendricks wrote:
> > One cannot use "r" as a constraint for a base address, that is
> > what the GCC PowerPC port defines "b" for. The load/store instruction
> > patterns in the GCC PowerPC machine description file use a different
> > constraint letter for the base address, and anyone writing inlined
> > assembly -- especially loads and stores -- should browse the GCC machine
> > description.
>
> Thanks I will as soon as I find it ;-). But the assembler generated was exactly
> the same in my simple test case. Is this just luck?
Yes it is.
Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20000117135832.10037gmx1@mx2.gmx.net>]
end of thread, other threads:[~2000-01-20 18:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-19 10:38 still no accelerated X ($#!$*) Moritz Thomas
2000-01-20 18:19 ` David Edelsohn
2000-01-20 18:25 ` Kevin Hendricks
2000-01-20 18:42 ` Geert Uytterhoeven
[not found] <20000117135832.10037gmx1@mx2.gmx.net>
[not found] ` <l03130300b4aa3cb5b581@[213.6.51.119]>
2000-01-18 17:15 ` Ruben Malchow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).