File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ static uint32_t cache_size, cache_size_bits;
22
22
static struct mpool * cache_mp ;
23
23
24
24
/* hash function for the cache */
25
- HASH_FUNC_IMPL (cache_hash , cache_size_bits , cache_size );
25
+ HASH_FUNC_IMPL (cache_hash , cache_size_bits , cache_size )
26
26
27
27
#if RV32_HAS (ARC )
28
28
/* The Adaptive Replacement Cache (ARC) improves the traditional LRU strategy
Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ void rv_debug(riscv_t *rv)
278
278
#endif /* RV32_HAS(GDBSTUB) */
279
279
280
280
/* hash function for the block map */
281
- HASH_FUNC_IMPL (map_hash , BLOCK_MAP_CAPACITY_BITS , 1 << BLOCK_MAP_CAPACITY_BITS );
281
+ HASH_FUNC_IMPL (map_hash , BLOCK_MAP_CAPACITY_BITS , 1 << BLOCK_MAP_CAPACITY_BITS )
282
282
283
283
/* allocate a basic block */
284
284
static block_t * block_alloc (riscv_t * rv )
Original file line number Diff line number Diff line change @@ -95,16 +95,16 @@ uint32_t memory_ifetch(uint32_t addr)
95
95
return *(type *) (data_memory_base + addr); \
96
96
}
97
97
98
- MEM_READ_IMPL (w , uint32_t );
99
- MEM_READ_IMPL (s , uint16_t );
100
- MEM_READ_IMPL (b , uint8_t );
98
+ MEM_READ_IMPL (w , uint32_t )
99
+ MEM_READ_IMPL (s , uint16_t )
100
+ MEM_READ_IMPL (b , uint8_t )
101
101
102
102
#define MEM_WRITE_IMPL (size , type ) \
103
103
void memory_write_##size(uint32_t addr, const uint8_t *src) \
104
104
{ \
105
105
*(type *) (data_memory_base + addr) = *(const type *) src; \
106
106
}
107
107
108
- MEM_WRITE_IMPL (w , uint32_t );
109
- MEM_WRITE_IMPL (s , uint16_t );
110
- MEM_WRITE_IMPL (b , uint8_t );
108
+ MEM_WRITE_IMPL (w , uint32_t )
109
+ MEM_WRITE_IMPL (s , uint16_t )
110
+ MEM_WRITE_IMPL (b , uint8_t )
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ void rv_clock_gettime(struct timespec *tp);
15
15
* See
16
16
* https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/hash.h
17
17
*/
18
- #define HASH_FUNC_IMPL (name , size_bits , size ) \
19
- FORCE_INLINE uint32_t name(uint32_t val) \
20
- { \
21
- /* 0x61C88647 is 32-bit golden ratio */ \
22
- return (val * 0x61C88647 >> (32 - size_bits )) & ((size ) - 1 ); \
18
+ #define HASH_FUNC_IMPL (name , size_bits , size ) \
19
+ FORCE_INLINE uint32_t name(uint32_t val) \
20
+ { \
21
+ /* 0x61C88647 is 32-bit golden ratio */ \
22
+ return (val * 0x61C88647 >> (32 - size_bits )) & ((size ) - ( 1 ) ); \
23
23
}
You can’t perform that action at this time.
0 commit comments