From: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
To: mingo@redhat.com, davej@redhat.com, hpa@zytor.com,
tglx@linutronix.de, hmh@hmh.eng.br, x86@kernel.org
Cc: linux-kernel@vger.kernel.org,
"Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Subject: [PATCH 2/3] x86: Quark: Update cache reporting, add Quark SoC X1000 string
Date: Tue, 30 Sep 2014 04:11:49 +0100 [thread overview]
Message-ID: <1412046710-2686-3-git-send-email-pure.logic@nexus-software.ie> (raw)
In-Reply-To: <1412046710-2686-1-git-send-email-pure.logic@nexus-software.ie>
Adds a path for legacy_cache_size to get a Quark SoC X1000 cache size
Update init_intel to take account of PIII Tualatin and Quark X1000
reporting cache size via legacy_cache_size
Add string to family/model structure for completeness and better
output of /proc/cpuinfo
Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie>
---
arch/x86/kernel/cpu/intel.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
index 50ce751..686eae7 100644
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -396,7 +396,13 @@ static void init_intel(struct cpuinfo_x86 *c)
#endif
}
- l2 = init_intel_cacheinfo(c);
+
+ /* legacy_cache may have provided and cache_size already if not probe */
+ if (c->x86_cache_size == 0)
+ l2 = init_intel_cacheinfo(c);
+ else
+ l2 = c->x86_cache_size;
+
if (c->cpuid_level > 9) {
unsigned eax = cpuid_eax(10);
/* Check for version and the number of counters */
@@ -500,6 +506,15 @@ static unsigned int intel_size_cache(struct cpuinfo_x86 *c, unsigned int size)
*/
if ((c->x86 == 6) && (c->x86_model == 11) && (size == 0))
size = 256;
+
+
+ /*
+ * Intel Quark SoC X1000 contains a 4-way set associative
+ * 16K cache with a 16 byte cache line and 256 lines per tag
+ */
+ if ((c->x86 == 5) && (c->x86_model == 9))
+ size = 16;
+
return size;
}
#endif
@@ -701,7 +716,8 @@ static const struct cpu_dev intel_cpu_dev = {
[3] = "OverDrive PODP5V83",
[4] = "Pentium MMX",
[7] = "Mobile Pentium 75 - 200",
- [8] = "Mobile Pentium MMX"
+ [8] = "Mobile Pentium MMX",
+ [9] = "Quark SoC X1000",
}
},
{ .family = 6, .model_names =
--
1.9.1
next prev parent reply other threads:[~2014-09-30 3:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-30 3:11 [PATCH 0/3] Quark X1000 Cache/TLB reporting/fixes Bryan O'Donoghue
2014-09-30 3:11 ` [PATCH 1/3] x86: Bugfix bit-rot in the calling of legacy_cache_size Bryan O'Donoghue
2014-09-30 3:41 ` Dave Jones
2014-09-30 8:45 ` Bryan O'Donoghue
2014-09-30 20:28 ` Thomas Gleixner
2014-09-30 21:02 ` Bryan O'Donoghue
2014-09-30 3:11 ` Bryan O'Donoghue [this message]
2014-09-30 19:38 ` [PATCH 2/3] x86: Quark: Update cache reporting, add Quark SoC X1000 string Thomas Gleixner
2014-09-30 3:11 ` [PATCH 3/3] x86: Quark: Comment setup_arch for TLB/PGE bugfix Bryan O'Donoghue
2014-09-30 20:03 ` Thomas Gleixner
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=1412046710-2686-3-git-send-email-pure.logic@nexus-software.ie \
--to=pure.logic@nexus-software.ie \
--cc=davej@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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®