All of lore.kernel.org
 help / color / mirror / Atom feed
* dcache issue...
@ 2005-01-20 11:15 moreau francis
  2005-01-20 13:49 ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: moreau francis @ 2005-01-20 11:15 UTC (permalink / raw)
  To: linux-mips

hi all,

I almost done to run linux in kseg2. But I noticed a
bug
related to the cache that I can't explain. Maybe
you'll
have an idea...

I configured kseg2 to map kernel space, and to be
"uncached". So when accessing kernel space, virtual
addr > 0xc0000000, I don't use both icache and dcache.
When kernel maps a user page in user space, it uses
data cache. In this scenario, some kernel data are
corrupted. But when I map kernel space and activate
caches to access it, it seems to work.

Thanks in advance.

Francis.


	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

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

* Re: dcache issue...
  2005-01-20 11:15 dcache issue moreau francis
@ 2005-01-20 13:49 ` Ralf Baechle
  2005-01-20 14:00   ` moreau francis
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2005-01-20 13:49 UTC (permalink / raw)
  To: moreau francis; +Cc: linux-mips

On Thu, Jan 20, 2005 at 12:15:43PM +0100, moreau francis wrote:

> I almost done to run linux in kseg2. But I noticed a
> bug
> related to the cache that I can't explain. Maybe
> you'll
> have an idea...
> 
> I configured kseg2 to map kernel space, and to be
> "uncached". So when accessing kernel space, virtual
> addr > 0xc0000000, I don't use both icache and dcache.
> When kernel maps a user page in user space, it uses
> data cache. In this scenario, some kernel data are
> corrupted. But when I map kernel space and activate
> caches to access it, it seems to work.

Live is tough, use caches ;-)

Mixing different cache modes for results in unspecified behaviour, such
as data corruption.

  Ralf

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

* Re: dcache issue...
  2005-01-20 13:49 ` Ralf Baechle
@ 2005-01-20 14:00   ` moreau francis
  2005-01-20 14:18     ` Maciej W. Rozycki
  0 siblings, 1 reply; 6+ messages in thread
From: moreau francis @ 2005-01-20 14:00 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips

> Live is tough, use caches ;-)

oh yes it is. But I would only understand what was
my problem using the mixed cache modes...

cheers,

Francis


	

	
		
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! 
Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

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

* Re: dcache issue...
  2005-01-20 14:00   ` moreau francis
@ 2005-01-20 14:18     ` Maciej W. Rozycki
  2005-01-20 14:34       ` Ralf Baechle
  0 siblings, 1 reply; 6+ messages in thread
From: Maciej W. Rozycki @ 2005-01-20 14:18 UTC (permalink / raw)
  To: moreau francis; +Cc: Ralf Baechle, linux-mips

On Thu, 20 Jan 2005, moreau francis wrote:

> > Live is tough, use caches ;-)
> 
> oh yes it is. But I would only understand what was
> my problem using the mixed cache modes...

 Note that ll/sc sequences don't work as expected on uncached memory, so 
atomic accesses are not going to work in the kernel memory in your 
configuration.  This may cause arbitrary corruptions due to an 
inconsistent state of the kernel.

  Maciej

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

* Re: dcache issue...
  2005-01-20 14:18     ` Maciej W. Rozycki
@ 2005-01-20 14:34       ` Ralf Baechle
  2005-01-20 15:11         ` moreau francis
  0 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2005-01-20 14:34 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: moreau francis, linux-mips

On Thu, Jan 20, 2005 at 02:18:00PM +0000, Maciej W. Rozycki wrote:

> > > Live is tough, use caches ;-)
> > 
> > oh yes it is. But I would only understand what was
> > my problem using the mixed cache modes...
> 
>  Note that ll/sc sequences don't work as expected on uncached memory, so 
> atomic accesses are not going to work in the kernel memory in your 
> configuration.  This may cause arbitrary corruptions due to an 
> inconsistent state of the kernel.

Uniprocessor systems are usually get away with it but it's not something
real software should rely on.

  Ralf

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

* Re: dcache issue...
  2005-01-20 14:34       ` Ralf Baechle
@ 2005-01-20 15:11         ` moreau francis
  0 siblings, 0 replies; 6+ messages in thread
From: moreau francis @ 2005-01-20 15:11 UTC (permalink / raw)
  To: Ralf Baechle, Maciej W. Rozycki; +Cc: moreau francis, linux-mips

ok all, thanks for your ideas.

Francis.


	
	
		
Le nouveau Yahoo! Messenger est arrivé ! Découvrez
toutes les nouveautés pour dialoguer instantanément
avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com


	
	
		
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur http://fr.messenger.yahoo.com

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

end of thread, other threads:[~2005-01-20 15:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-20 11:15 dcache issue moreau francis
2005-01-20 13:49 ` Ralf Baechle
2005-01-20 14:00   ` moreau francis
2005-01-20 14:18     ` Maciej W. Rozycki
2005-01-20 14:34       ` Ralf Baechle
2005-01-20 15:11         ` moreau francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.