sifive/devices/ccache.h
static inline uint8_t ccache_enable_ways(uint64_t base_addr, uint8_t value) {
  volatile _Atomic(uint32_t) *enable = (_Atomic(uint32_t)*)(base_addr + CCACHE_ENABLE);
  ccache_barrier_0();
  uint32_t old = atomic_exchange_explicit(enable, value, memory_order_relaxed);
  ccache_barrier_1();
  return old;
}
// Enable ways; allow cache to use these ways
Enable ways; allow cache to use these ways
Enable ways ; allow cache to use these ways
static inline uint8_t ccache_enable_ways(uint64_t base_addr, uint8_t value) {
  volatile _Atomic(uint32_t) *enable = (_Atomic(uint32_t)*)(base_addr + CCACHE_ENABLE);
  ccache_barrier_0();
  uint32_t old = atomic_exchange_explicit(enable, value, memory_order_relaxed);
  ccache_barrier_1();
  return old;
}
static inline uint8_t ccache_enable_ways ( uint64_t base_addr , uint8_t value ) { volatile _Atomic ( uint32_t ) * enable = ( _Atomic ( uint32_t ) * ) ( base_addr + CCACHE_ENABLE ) ; ccache_barrier_0 ( ) ; uint32_t old = atomic_exchange_explicit ( enable , value , memory_order_relaxed ) ; ccache_barrier_1 ( ) ; return old ; }
Enable ways; allow cache to use these ways
Enable ways ; allow cache to use these ways