~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/asm-m68knommu/cacheflush.h

Version: ~ [ linux-6.6-rc1 ] ~ [ linux-6.5.2 ] ~ [ linux-6.4.15 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.52 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.131 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.194 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.256 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.294 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.325 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _M68KNOMMU_CACHEFLUSH_H
  2 #define _M68KNOMMU_CACHEFLUSH_H
  3 
  4 /*
  5  * (C) Copyright 2000-2002, Greg Ungerer <gerg@snapgear.com>
  6  */
  7 #include <linux/mm.h>
  8 
  9 #define flush_cache_all()                       __flush_cache_all()
 10 #define flush_cache_mm(mm)                      do { } while (0)
 11 #define flush_cache_range(vma, start, end)      do { } while (0)
 12 #define flush_cache_page(vma, vmaddr)           do { } while (0)
 13 #define flush_dcache_range(start,len)           do { } while (0)
 14 #define flush_dcache_page(page)                 do { } while (0)
 15 #define flush_icache_range(start,len)           __flush_cache_all()
 16 #define flush_icache_page(vma,pg)               do { } while (0)
 17 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
 18 #define flush_cache_vmap(start, end)            flush_cache_all()
 19 #define flush_cache_vunmap(start, end)          flush_cache_all()
 20 
 21 #define copy_to_user_page(vma, page, vaddr, dst, src, len) \
 22         memcpy(dst, src, len)
 23 #define copy_from_user_page(vma, page, vaddr, dst, src, len) \
 24         memcpy(dst, src, len)
 25 
 26 extern inline void __flush_cache_all(void)
 27 {
 28 #ifdef CONFIG_M5407
 29         /*
 30          *      Use cpushl to push and invalidate all cache lines.
 31          *      Gas doesn't seem to know how to generate the ColdFire
 32          *      cpushl instruction... Oh well, bit stuff it for now.
 33          */
 34         __asm__ __volatile__ (
 35                 "nop\n\t"
 36                 "clrl   %%d0\n\t"
 37                 "1:\n\t"
 38                 "movel  %%d0,%%a0\n\t"
 39                 "2:\n\t"
 40                 ".word  0xf4e8\n\t"
 41                 "addl   #0x10,%%a0\n\t"
 42                 "cmpl   #0x00000800,%%a0\n\t"
 43                 "blt    2b\n\t"
 44                 "addql  #1,%%d0\n\t"
 45                 "cmpil  #4,%%d0\n\t"
 46                 "bne    1b\n\t"
 47                 : : : "d0", "a0" );
 48 #endif /* CONFIG_M5407 */
 49 #ifdef CONFIG_M5272
 50         __asm__ __volatile__ (
 51                 "movel  #0x01000000, %%d0\n\t"
 52                 "movec  %%d0, %%CACR\n\t"
 53                 "nop\n\t"
 54                 "movel  #0x80000100, %%d0\n\t"
 55                 "movec  %%d0, %%CACR\n\t"
 56                 "nop\n\t"
 57                 : : : "d0" );
 58 #endif /* CONFIG_M5272 */
 59 #if 0 /* CONFIG_M5249 */
 60         __asm__ __volatile__ (
 61                 "movel  #0x01000000, %%d0\n\t"
 62                 "movec  %%d0, %%CACR\n\t"
 63                 "nop\n\t"
 64                 "movel  #0xa0000200, %%d0\n\t"
 65                 "movec  %%d0, %%CACR\n\t"
 66                 "nop\n\t"
 67                 : : : "d0" );
 68 #endif /* CONFIG_M5249 */
 69 }
 70 
 71 #endif /* _M68KNOMMU_CACHEFLUSH_H */
 72 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp