X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-parisc%2Fcacheflush.h;h=a3132a28a8f2da5231c224477e84bfcf26b6710c;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=af0626dfa5be6ecdc84d25cbdb2cc75602c7df66;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-parisc/cacheflush.h b/include/asm-parisc/cacheflush.h index af0626dfa..a3132a28a 100644 --- a/include/asm-parisc/cacheflush.h +++ b/include/asm-parisc/cacheflush.h @@ -33,36 +33,25 @@ static inline void flush_cache_all(void) #define flush_cache_vmap(start, end) flush_cache_all() #define flush_cache_vunmap(start, end) flush_cache_all() -/* The following value needs to be tuned and probably scaled with the - * cache size. - */ - -#define FLUSH_THRESHOLD 0x80000 +extern int parisc_cache_flush_threshold; +void parisc_setup_cache_timing(void); static inline void flush_user_dcache_range(unsigned long start, unsigned long end) { -#ifdef CONFIG_SMP - flush_user_dcache_range_asm(start,end); -#else - if ((end - start) < FLUSH_THRESHOLD) + if ((end - start) < parisc_cache_flush_threshold) flush_user_dcache_range_asm(start,end); else flush_data_cache(); -#endif } static inline void flush_user_icache_range(unsigned long start, unsigned long end) { -#ifdef CONFIG_SMP - flush_user_icache_range_asm(start,end); -#else - if ((end - start) < FLUSH_THRESHOLD) + if ((end - start) < parisc_cache_flush_threshold) flush_user_icache_range_asm(start,end); else flush_instruction_cache(); -#endif } extern void flush_dcache_page(struct page *page);