Skip to content

Commit

Permalink
Blackfin arch: introducing bfin_addr_dcachable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vitja Makarov authored and Bryan Wu committed Oct 13, 2008
1 parent 3094c98 commit 58c35bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/blackfin/include/asm/cplbinit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 58c35bd

Please sign in to comment.