diff options
| author | Qiuxu Zhuo <qiuxu.zhuo@intel.com> | 2026-08-28 08:29:56 -0700 |
|---|---|---|
| committer | Tony Luck <tony.luck@intel.com> | 2026-09-08 13:46:29 -0700 |
| commit | 179b100b45565d4628f434fe73cd71e63dc7282b (patch) | |
| tree | eaf12ee4d57355865bb046aac0ad4c87bfba09ce /include | |
| parent | ba71d9b4e9dd83c1614b3b5cec6c82a39d290f7e (diff) | |
| download | linux-next-179b100b45565d4628f434fe73cd71e63dc7282b.tar.gz linux-next-179b100b45565d4628f434fe73cd71e63dc7282b.zip | |
cacheinfo: Export get_cpu_cacheinfo_id() for loadable modules
get_cpu_cacheinfo_id() is a static inline that requires get_cpu_cacheinfo(),
which is not exported. Modules that need to identify which cache instance
a CPU belongs to therefore cannot use it.
Move it out of line and export it.
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20260828153002.10290-2-tony.luck@intel.com
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/cacheinfo.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h index fc879ac4cc4f..56fa646df0d1 100644 --- a/include/linux/cacheinfo.h +++ b/include/linux/cacheinfo.h @@ -82,6 +82,7 @@ struct cpu_cacheinfo { }; struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); +int get_cpu_cacheinfo_id(int cpu, int level); int early_cache_level(unsigned int cpu); int init_cache_level(unsigned int cpu); int init_of_cache_level(unsigned int cpu); @@ -137,17 +138,6 @@ static inline struct cacheinfo *get_cpu_cacheinfo_level(int cpu, int level) return NULL; } -/* - * Get the id of the cache associated with @cpu at level @level. - * cpuhp lock must be held. - */ -static inline int get_cpu_cacheinfo_id(int cpu, int level) -{ - struct cacheinfo *ci = get_cpu_cacheinfo_level(cpu, level); - - return ci ? ci->id : -1; -} - #if defined(CONFIG_ARM64) || defined(CONFIG_ARM) #define use_arch_cache_info() (true) #else |
