From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] Handle CPU cores in CPU cache information
Date: Mon, 13 Jun 2005 16:29:16 -0700 [thread overview]
Message-ID: <20050613162916.A5178@unix-os.sc.intel.com> (raw)
Handle the case of all the cores in a package sharing the cache,
in cache_shared_cpu_map_setup().
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
diff -purN linux-2.6.12-rc4-mm2/arch/i386/kernel/cpu/intel_cacheinfo.c linux-2.6.12-rc4-mm2-cache/arch/i386/kernel/cpu/intel_cacheinfo.c
--- linux-2.6.12-rc4-mm2/arch/i386/kernel/cpu/intel_cacheinfo.c 2005-05-17 05:50:03.000000000 -0700
+++ linux-2.6.12-rc4-mm2-cache/arch/i386/kernel/cpu/intel_cacheinfo.c 2005-06-11 04:53:59.749155936 -0700
@@ -305,6 +305,9 @@ static void __devinit cache_shared_cpu_m
{
struct _cpuid4_info *this_leaf;
unsigned long num_threads_sharing;
+#ifdef CONFIG_X86_HT
+ struct cpuinfo_x86 *c = cpu_data + cpu;
+#endif
this_leaf = CPUID4_INFO_IDX(cpu, index);
num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing;
@@ -314,10 +317,12 @@ static void __devinit cache_shared_cpu_m
#ifdef CONFIG_X86_HT
else if (num_threads_sharing == smp_num_siblings)
this_leaf->shared_cpu_map = cpu_sibling_map[cpu];
-#endif
+ else if (num_threads_sharing == (c->x86_num_cores * smp_num_siblings))
+ this_leaf->shared_cpu_map = cpu_core_map[cpu];
else
- printk(KERN_INFO "Number of CPUs sharing cache didn't match "
+ printk(KERN_DEBUG "Number of CPUs sharing cache didn't match "
"any known set of CPUs\n");
+#endif
}
#else
static void __init cache_shared_cpu_map_setup(unsigned int cpu, int index) {}
reply other threads:[~2005-06-13 23:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050613162916.A5178@unix-os.sc.intel.com \
--to=venkatesh.pallipadi@intel.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®