How to allocate memory which can be specified as NON-cacheable?

1,809 views
Skip to first unread message

kc

unread,
Feb 20, 2012, 6:27:20 AM2/20/12
to android...@googlegroups.com
Hi,

I want allocate non-cacheable physical memory for usage in the driver,
(ie. I don't want the data being cached into the CPU's data cache when
the data are accessed)
how could I do this?

there are functions like kmalloc(), get_free_pages, vmalloc, etc,
but how could specify the data is NOT cacheable when call these
functions?

Thanks!

kc

kc

unread,
Feb 17, 2012, 9:55:24 PM2/17/12
to Android Linux Kernel Development

Vladimir Murzin

unread,
Feb 23, 2012, 10:06:39 PM2/23/12
to android...@googlegroups.com
Hi!

Have you tried dma_alloc_coherent()? According to [1] it should satisfy your needs.

1. http://www.mjmwired.net/kernel/Documentation/DMA-API.txt

Best wishes
Vladimir Murzin
Best wishes,
Vladimir Murzin
--
unsubscribe: android-kerne...@googlegroups.com
website: http://groups.google.com/group/android-kernel
Reply all
Reply to author
Forward
0 new messages