Linux MIPS Architecture development
 help / color / mirror / Atom feed
* cacheops.h & r4kcache.h
@ 2007-08-01 13:18 Mohamed Bamakhrama
  2007-08-01 14:01 ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Mohamed Bamakhrama @ 2007-08-01 13:18 UTC (permalink / raw)
  To: linux-mips

Hi *,
In those two header files, flush & invalidate operations were
implemented. Nevertheless, the MIPS32 core supports cache locking as
well. Is there any implementations for Fetch&Lock instructions within
the kernel?

Best regards,

-- 
Mohamed A. Bamakhrama
Web: http://home.cs.tum.edu/~bamakhra/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cacheops.h & r4kcache.h
  2007-08-01 13:18 cacheops.h & r4kcache.h Mohamed Bamakhrama
@ 2007-08-01 14:01 ` Ralf Baechle
  2007-08-01 14:13   ` Mohamed Bamakhrama
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2007-08-01 14:01 UTC (permalink / raw)
  To: Mohamed Bamakhrama; +Cc: linux-mips

On Wed, Aug 01, 2007 at 03:18:00PM +0200, Mohamed Bamakhrama wrote:

> In those two header files, flush & invalidate operations were
> implemented. Nevertheless, the MIPS32 core supports cache locking as
> well. Is there any implementations for Fetch&Lock instructions within
> the kernel?

No.  The primary use for cache locking seems to be the rather extreme
realtime requirements, a league where Linux isn't playing quite yet.
For a more general purpose OS locking has a good chance of doing more
harm than help.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cacheops.h & r4kcache.h
  2007-08-01 14:01 ` Ralf Baechle
@ 2007-08-01 14:13   ` Mohamed Bamakhrama
  2007-08-01 14:40     ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Mohamed Bamakhrama @ 2007-08-01 14:13 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

On 8/1/07, Ralf Baechle <ralf@linux-mips.org> wrote:
> On Wed, Aug 01, 2007 at 03:18:00PM +0200, Mohamed Bamakhrama wrote:
>
> > In those two header files, flush & invalidate operations were
> > implemented. Nevertheless, the MIPS32 core supports cache locking as
> > well. Is there any implementations for Fetch&Lock instructions within
> > the kernel?
>
> No.  The primary use for cache locking seems to be the rather extreme
> realtime requirements, a league where Linux isn't playing quite yet.
> For a more general purpose OS locking has a good chance of doing more
> harm than help.
>
>   Ralf
>

I agree with you that it fits more to real-time systems. My point was
that such a functionality can be added to the list of available macros
(i.e. Fetch, invalidate) so that when the developer (of an embedded
system for example) needs it, he/she can use it directly.

Is it possible to submit a patch which adds this functionality?

Regards,

--
Mohamed

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: cacheops.h & r4kcache.h
  2007-08-01 14:13   ` Mohamed Bamakhrama
@ 2007-08-01 14:40     ` Ralf Baechle
  0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2007-08-01 14:40 UTC (permalink / raw)
  To: Mohamed Bamakhrama; +Cc: linux-mips

On Wed, Aug 01, 2007 at 04:13:05PM +0200, Mohamed Bamakhrama wrote:

> I agree with you that it fits more to real-time systems. My point was
> that such a functionality can be added to the list of available macros
> (i.e. Fetch, invalidate) so that when the developer (of an embedded
> system for example) needs it, he/she can use it directly.
> 
> Is it possible to submit a patch which adds this functionality?

It takes more than a small patch to add a few cacheop definitions.  Linux
generiously uses Index cacheops and so would also blow away wired cache
lines and that would need to be prevented.  But to answer your question,
with these notes, yes.

  Ralf

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-08-01 14:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-01 13:18 cacheops.h & r4kcache.h Mohamed Bamakhrama
2007-08-01 14:01 ` Ralf Baechle
2007-08-01 14:13   ` Mohamed Bamakhrama
2007-08-01 14:40     ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox