提交 58c35bd3 编写于 作者: V Vitja Makarov 提交者: Bryan Wu

Blackfin arch: introducing bfin_addr_dcachable

This patch introduces bfin_addr_dcachable() predicate, that simply tests is
address in cachable region or not.
Signed-off-by: NBryan Wu <cooloney@kernel.org>
上级 3094c981
......@@ -92,4 +92,18 @@ extern unsigned long reserved_mem_icache_on;
extern void generate_cplb_tables(void);
static inline int bfin_addr_dcachable(unsigned long addr)
{
#ifdef CONFIG_BFIN_DCACHE
if (addr < (_ramend - DMA_UNCACHED_REGION))
return 1;
#endif
if (reserved_mem_dcache_on &&
addr >= _ramend && addr < physical_mem_end)
return 1;
return 0;
}
#endif
......@@ -42,6 +42,7 @@ EXPORT_SYMBOL(memory_start);
EXPORT_SYMBOL(memory_end);
EXPORT_SYMBOL(physical_mem_end);
EXPORT_SYMBOL(_ramend);
EXPORT_SYMBOL(reserved_mem_dcache_on);
#ifdef CONFIG_MTD_UCLINUX
unsigned long memory_mtd_end, memory_mtd_start, mtd_size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册