Kconfig.cache 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # MN10300 CPU cache options
  3. #
  4. choice
  5. prompt "CPU Caching mode"
  6. default MN10300_CACHE_WBACK
  7. help
  8. This option determines the caching mode for the kernel.
  9. Write-Back caching mode involves the all reads and writes causing
  10. the affected cacheline to be read into the cache first before being
  11. operated upon. Memory is not then updated by a write until the cache
  12. is filled and a cacheline needs to be displaced from the cache to
  13. make room. Only at that point is it written back.
  14. Write-Through caching only fetches cachelines from memory on a
  15. read. Writes always get written directly to memory. If the affected
  16. cacheline is also in cache, it will be updated too.
  17. The final option is to turn of caching entirely.
  18. config MN10300_CACHE_WBACK
  19. bool "Write-Back"
  20. config MN10300_CACHE_WTHRU
  21. bool "Write-Through"
  22. config MN10300_CACHE_DISABLED
  23. bool "Disabled"
  24. endchoice
  25. config MN10300_CACHE_ENABLED
  26. def_bool y if !MN10300_CACHE_DISABLED
  27. choice
  28. prompt "CPU cache flush/invalidate method"
  29. default MN10300_CACHE_MANAGE_BY_TAG if !AM34_2
  30. default MN10300_CACHE_MANAGE_BY_REG if AM34_2
  31. depends on MN10300_CACHE_ENABLED
  32. help
  33. This determines the method by which CPU cache flushing and
  34. invalidation is performed.
  35. config MN10300_CACHE_MANAGE_BY_TAG
  36. bool "Use the cache tag registers directly"
  37. config MN10300_CACHE_MANAGE_BY_REG
  38. bool "Flush areas by way of automatic purge registers (AM34 only)"
  39. depends on AM34_2
  40. endchoice
  41. config MN10300_CACHE_INV_BY_TAG
  42. def_bool y if MN10300_CACHE_MANAGE_BY_TAG && MN10300_CACHE_ENABLED
  43. config MN10300_CACHE_INV_BY_REG
  44. def_bool y if MN10300_CACHE_MANAGE_BY_REG && MN10300_CACHE_ENABLED
  45. config MN10300_CACHE_FLUSH_BY_TAG
  46. def_bool y if MN10300_CACHE_MANAGE_BY_TAG && MN10300_CACHE_WBACK
  47. config MN10300_CACHE_FLUSH_BY_REG
  48. def_bool y if MN10300_CACHE_MANAGE_BY_REG && MN10300_CACHE_WBACK