[PATCH] [POWERPC] Reintroduce O_SYNC flag to make DRAM non-cached.

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu May 8 16:55:43 EST 2008

On Wed, 2008-05-07 at 23:31 -0700, Spence Nick wrote:
> In our case the memory area is reserved so that the main processor will
> not touch it except when mapped by the mem driver.

Then you should completely carve it out of the LMB's which will ensure
it's not seen as RAM by /dev/mem and not mapped by the linear mapping
(well, the later depends ... if it's carved out of the top of RAM it
should work fine, if it's a hole, I'm not sure we handle holes in the
linear mapping on 32 bits).

> Alternative solutions are to modify the user space code to flush out the
> caches by reading a large area, or to implement a board specific 
> ppc_md.phys_mem_access_prot() function to do this.
> Either of these will meet my needs, but this will leave the O_SYNC flag
> ignored on the PowerPC architecture in 2.6, but honored by Linux 2.4 and
> other architectures. Probably not a problem for most people.

More information about the Linuxppc-dev mailing list