Path: blob/master/arch/blackfin/include/asm/cache.h
15125 views
/*1* Copyright 2004-2009 Analog Devices Inc.2*3* Licensed under the GPL-2 or later.4*/56#ifndef __ARCH_BLACKFIN_CACHE_H7#define __ARCH_BLACKFIN_CACHE_H89#include <linux/linkage.h> /* for asmlinkage */1011/*12* Bytes per L1 cache line13* Blackfin loads 32 bytes for cache14*/15#define L1_CACHE_SHIFT 516#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)17#define SMP_CACHE_BYTES L1_CACHE_BYTES1819#define ARCH_DMA_MINALIGN L1_CACHE_BYTES2021#ifdef CONFIG_SMP22#define __cacheline_aligned23#else24#define ____cacheline_aligned2526/*27* Put cacheline_aliged data to L1 data memory28*/29#ifdef CONFIG_CACHELINE_ALIGNED_L130#define __cacheline_aligned \31__attribute__((__aligned__(L1_CACHE_BYTES), \32__section__(".data_l1.cacheline_aligned")))33#endif3435#endif3637/*38* largest L1 which this arch supports39*/40#define L1_CACHE_SHIFT_MAX 54142#if defined(CONFIG_SMP) && \43!defined(CONFIG_BFIN_CACHE_COHERENT)44# if defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) || defined(CONFIG_BFIN_L2_ICACHEABLE)45# define __ARCH_SYNC_CORE_ICACHE46# endif47# if defined(CONFIG_BFIN_EXTMEM_DCACHEABLE) || defined(CONFIG_BFIN_L2_DCACHEABLE)48# define __ARCH_SYNC_CORE_DCACHE49# endif50#ifndef __ASSEMBLY__51asmlinkage void __raw_smp_mark_barrier_asm(void);52asmlinkage void __raw_smp_check_barrier_asm(void);5354static inline void smp_mark_barrier(void)55{56__raw_smp_mark_barrier_asm();57}58static inline void smp_check_barrier(void)59{60__raw_smp_check_barrier_asm();61}6263void resync_core_dcache(void);64void resync_core_icache(void);65#endif66#endif676869#endif707172