diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-19 17:31:52 -0400 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-04-19 17:31:52 -0400 |
commit | f70a290e8a889caa905ab7650c696f2bb299be1a (patch) | |
tree | 56f0886d839499e9f522f189999024b3e86f9be2 /arch/x86/kernel/cpu | |
parent | fcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (diff) | |
parent | 7ef4a793a624c6e66c16ca1051847f75161f5bec (diff) |
Merge branch 'wip-nested-locking' into tegra-nested-lockingwip-nested-locking
Conflicts:
Makefile
include/linux/fs.h
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index c105c533ed9..0bf12644aa7 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -747,6 +747,23 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
747 | static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); | 747 | static DEFINE_PER_CPU(struct _cpuid4_info *, ici_cpuid4_info); |
748 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) | 748 | #define CPUID4_INFO_IDX(x, y) (&((per_cpu(ici_cpuid4_info, x))[y])) |
749 | 749 | ||
750 | /* returns CPUs that share the index cache with cpu */ | ||
751 | int get_shared_cpu_map(cpumask_var_t mask, unsigned int cpu, int index) | ||
752 | { | ||
753 | int ret = 0; | ||
754 | struct _cpuid4_info *this_leaf; | ||
755 | |||
756 | if (index >= num_cache_leaves) { | ||
757 | index = num_cache_leaves - 1; | ||
758 | ret = index; | ||
759 | } | ||
760 | |||
761 | this_leaf = CPUID4_INFO_IDX(cpu,index); | ||
762 | cpumask_copy(mask, to_cpumask(this_leaf->shared_cpu_map)); | ||
763 | |||
764 | return ret; | ||
765 | } | ||
766 | |||
750 | #ifdef CONFIG_SMP | 767 | #ifdef CONFIG_SMP |
751 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | 768 | static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) |
752 | { | 769 | { |