sifive/devices/ccache.h
static inline uint64_t ccache_unlock_ways(uint64_t base_addr, int client, uint64_t ways) {
  volatile _Atomic(uint64_t) *ways_v = (_Atomic(uint64_t)*)(base_addr + CCACHE_WAYS);
  ccache_barrier_0();
  uint64_t old = atomic_fetch_or_explicit(&ways_v[client], ways, memory_order_relaxed);
  ccache_barrier_1();
  return old;
}
// Unlock ways; allow client to use these ways
Unlock ways; allow client to use these ways
Unlock ways ; allow client to use these ways
static inline uint64_t ccache_unlock_ways(uint64_t base_addr, int client, uint64_t ways) {
  volatile _Atomic(uint64_t) *ways_v = (_Atomic(uint64_t)*)(base_addr + CCACHE_WAYS);
  ccache_barrier_0();
  uint64_t old = atomic_fetch_or_explicit(&ways_v[client], ways, memory_order_relaxed);
  ccache_barrier_1();
  return old;
}
static inline uint64_t ccache_unlock_ways ( uint64_t base_addr , int client , uint64_t ways ) { volatile _Atomic ( uint64_t ) * ways_v = ( _Atomic ( uint64_t ) * ) ( base_addr + CCACHE_WAYS ) ; ccache_barrier_0 ( ) ; uint64_t old = atomic_fetch_or_explicit ( & ways_v [ client ] , ways , memory_order_relaxed ) ; ccache_barrier_1 ( ) ; return old ; }
Unlock ways; allow client to use these ways
Unlock ways ; allow client to use these ways