Re: Instructions cache flush on ARM (was: N800 & Video playback)

2007-04-24 Thread Guillem Jover
On Mon, 2007-04-23 at 21:09:26 +0300, ext Siarhei Siamashka wrote:
> On Monday 23 April 2007 16:49, Guillem Jover wrote:
> > > You are right. gcc has function
> > > void __clear_cache (char *BEG, char *END)
> > > which should be more portable.
> >
> > It should, but it still has the problem of emitting an OABI syscall
> > due to our old gcc.
> >
> > You could use syscall(2) and __ARM_NR_cacheflush instead.
> 
> Yes, but __clear_cache(char *BEG, char *END)  works fine with the 
> current combination of gcc and kernel in maemo. So I guess it's the best 
> option if portability is desired.

That it works fine now does not mean it's the correct solution. Also I
disagree on the premise that it's more portable, both solutions are
quite non-portable, either you'll have to check if that function is
present in autoconf or similar, or you'll have to check for the presence
of the syscall NR on arm.

> If you decide to drop support for old ABI from kernel without upgrading
> gcc, that would be a bug in maemo platform :-)

No, because as this is coming from gcc it gets embedded in the actual
object, so it would need a recompilation, I wouldn't say that's a bug
in maemo, you have hardcoded OABI calls in your object files.

Also that makes it more difficult for people to flash their own new
kernel.

regards,
guillem
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: Instructions cache flush on ARM (was: N800 & Video playback)

2007-04-23 Thread Siarhei Siamashka
On Monday 23 April 2007 16:49, Guillem Jover wrote:

> > You are right. gcc has function
> > void __clear_cache (char *BEG, char *END)
> > which should be more portable.
>
> It should, but it still has the problem of emitting an OABI syscall
> due to our old gcc.
>
> You could use syscall(2) and __ARM_NR_cacheflush instead.

Yes, but __clear_cache(char *BEG, char *END)  works fine with the 
current combination of gcc and kernel in maemo. So I guess it's the best 
option if portability is desired.

If you decide to drop support for old ABI from kernel without upgrading
gcc, that would be a bug in maemo platform :-)

By the way, do you have any plans for upgrading toolchain? Either I'm
extremely unlucky, or current toolchain is really very buggy. It does not
support -pg option properly (for profiling with gprof), also I encountered 
at least one internal compiler error and a couple of invalid code generation
bugs already.

One more question is about the kernel, ARM11 seems to support unaligned 
memory access in hardware, but this feature is not enabled on N800. Is it done
for consistency with Nokia 770?
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: Instructions cache flush on ARM (was: N800 & Video playback)

2007-04-23 Thread Guillem Jover
On Mon, 2007-04-23 at 16:11:17 +0800, ext 黄涛 wrote:
> 2007/4/23, Siarhei Siamashka <[EMAIL PROTECTED]>:
> > Thanks, it works. But I'm worried about [1]. Looks like EABI has a new
> > syscall interface and this code from qemu uses old ABI. And from reading
> > description at the wiki page, compatibility with old ABI can be disabled
> > (and it makes sense disabling it as this compatibility reduces
> > performance a bit).
> 
> You are right. gcc has function
> void __clear_cache (char *BEG, char *END)
> which should be more portable.

It should, but it still has the problem of emitting an OABI syscall
due to our old gcc.

You could use syscall(2) and __ARM_NR_cacheflush instead.

regards,
guillem
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers


Re: Instructions cache flush on ARM (was: N800 & Video playback)

2007-04-23 Thread 黄涛

2007/4/23, Siarhei Siamashka <[EMAIL PROTECTED]>:


Thanks, it works. But I'm worried about [1]. Looks like EABI has a new
syscall
interface and this code from qemu uses old ABI. And from reading
description
at the wiki page, compatibility with old ABI can be disabled (and it makes
sense disabling it as this compatibility reduces performance a bit).



You are right. gcc has function
void __clear_cache (char *BEG, char *END)
which should be more portable.
___
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers