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: Bryan Wu <cooloney@kernel.org>
This commit is contained in:
parent
3094c981f2
commit
58c35bd31f
|
@ -92,4 +92,18 @@ extern unsigned long reserved_mem_icache_on;
|
||||||
|
|
||||||
extern void generate_cplb_tables(void);
|
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
|
#endif
|
||||||
|
|
|
@ -42,6 +42,7 @@ EXPORT_SYMBOL(memory_start);
|
||||||
EXPORT_SYMBOL(memory_end);
|
EXPORT_SYMBOL(memory_end);
|
||||||
EXPORT_SYMBOL(physical_mem_end);
|
EXPORT_SYMBOL(physical_mem_end);
|
||||||
EXPORT_SYMBOL(_ramend);
|
EXPORT_SYMBOL(_ramend);
|
||||||
|
EXPORT_SYMBOL(reserved_mem_dcache_on);
|
||||||
|
|
||||||
#ifdef CONFIG_MTD_UCLINUX
|
#ifdef CONFIG_MTD_UCLINUX
|
||||||
unsigned long memory_mtd_end, memory_mtd_start, mtd_size;
|
unsigned long memory_mtd_end, memory_mtd_start, mtd_size;
|
||||||
|
|
Loading…
Reference in New Issue