Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1441776
| From | "Fenghua Yu" <fenghua.yu@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 18/32] drivers/base/cacheinfo.c: Export some cacheinfo functions for others to use |
| Date | 2016-07-13 00:10 +0200 |
| Message-ID | <rUe2o-2xx-73@gated-at.bofh.it> (permalink) |
| References | <rUe2l-2xx-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Fenghua Yu <fenghua.yu@intel.com> We use ci_cpu_cacheinfo in CAT. Export this function for CAT to reuse. Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Reviewed-by: Tony Luck <tony.luck@intel.com> --- drivers/base/cacheinfo.c | 2 +- include/linux/cacheinfo.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index 2a21c15..f6e269a 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base/cacheinfo.c @@ -29,7 +29,7 @@ #include <linux/sysfs.h> /* pointer to per cpu cacheinfo */ -static DEFINE_PER_CPU(struct cpu_cacheinfo, ci_cpu_cacheinfo); +DEFINE_PER_CPU(struct cpu_cacheinfo, ci_cpu_cacheinfo); #define ci_cacheinfo(cpu) (&per_cpu(ci_cpu_cacheinfo, cpu)) #define cache_leaves(cpu) (ci_cacheinfo(cpu)->num_leaves) #define per_cpu_cacheinfo(cpu) (ci_cacheinfo(cpu)->info_list) diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h index cf6984d..fa5e829 100644 --- a/include/linux/cacheinfo.h +++ b/include/linux/cacheinfo.h @@ -94,6 +94,8 @@ int func(unsigned int cpu) \ return ret; \ } +#define ci_cacheinfo(cpu) (&per_cpu(ci_cpu_cacheinfo, cpu)) + struct cpu_cacheinfo *get_cpu_cacheinfo(unsigned int cpu); int init_cache_level(unsigned int cpu); int populate_cache_leaves(unsigned int cpu); -- 2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 18/32] drivers/base/cacheinfo.c: Export some cacheinfo functions for others to use "Fenghua Yu" <fenghua.yu@intel.com> - 2016-07-13 00:10 +0200
csiph-web