linux-mips
[Top] [All Lists]

Re: vmalloc cached space..

To: Ashish anand <ashish.anand@inspiretech.com>
Subject: Re: vmalloc cached space..
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 16 Apr 2003 13:57:56 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <200304160959.h3G9xVf6017958@smtp.inspirtek.com>; from ashish.anand@inspiretech.com on Wed, Apr 16, 2003 at 03:10:17PM +0530
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <200304160959.h3G9xVf6017958@smtp.inspirtek.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.2.5.1i
On Wed, Apr 16, 2003 at 03:10:17PM +0530, Ashish anand wrote:

> As vmalloc returns KSEG2 cached memory , 
> 1.can I use a volatile pointer to treat it as safe as uncached..?
> or

Volatile does not mean uncached.  Volatile means the C compiler should not
perform certain optimizations and is usually used for hardware accesses
that have side effects or variables that can be changed from some kind
of interrupt or signal handled and are also read by the main program.

> 2. i should use vmalloc_prot (size, PAGE_KERNEL_UNCACHED) in umap.c.

Uncached memory access is rarely necessary and so _extremly_ slow that it
should be avoided at almost any price.  Maybe you should describe what
you're trying to achieve, then let's see if there's a better suggestion
we can make.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>