[maemo-developers] Instructions cache flush on ARM (was: N800 & Video playback)

From: Guillem Jover guillem.jover at nokia.com
Date: Tue Apr 24 16:31:12 EEST 2007
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

More information about the maemo-developers mailing list