diff options
author | 2025-04-19 21:18:17 +0530 | |
---|---|---|
committer | 2025-04-20 07:06:54 +0100 | |
commit | efabefb05aa1fe534ddb1839980824a763a7f1b0 (patch) | |
tree | 23d7e42edeb172388c6e3636ec7d24a91d9691cb /arch/openrisc/include | |
parent | Linux 6.14 (diff) | |
download | wireguard-linux-efabefb05aa1fe534ddb1839980824a763a7f1b0.tar.xz wireguard-linux-efabefb05aa1fe534ddb1839980824a763a7f1b0.zip |
openrisc: Refactor struct cpuinfo_or1k to reduce duplication
The "cpuinfo_or1k" structure currently has identical data members for
different cache components.
Remove these fields out of struct cpuinfo_or1k and into its own struct.
This reduces duplication while keeping cpuinfo_or1k extensible so more
cache descriptors can be added in the future.
Also add a new field "sets" to the new structure.
Signed-off-by: Sahil Siddiq <sahilcdq0@gmail.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'arch/openrisc/include')
-rw-r--r-- | arch/openrisc/include/asm/cpuinfo.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/openrisc/include/asm/cpuinfo.h b/arch/openrisc/include/asm/cpuinfo.h index 5e4744153d0e..82f5d4c06314 100644 --- a/arch/openrisc/include/asm/cpuinfo.h +++ b/arch/openrisc/include/asm/cpuinfo.h @@ -15,16 +15,18 @@ #ifndef __ASM_OPENRISC_CPUINFO_H #define __ASM_OPENRISC_CPUINFO_H +struct cache_desc { + u32 size; + u32 sets; + u32 block_size; + u32 ways; +}; + struct cpuinfo_or1k { u32 clock_frequency; - u32 icache_size; - u32 icache_block_size; - u32 icache_ways; - - u32 dcache_size; - u32 dcache_block_size; - u32 dcache_ways; + struct cache_desc icache; + struct cache_desc dcache; u16 coreid; }; |