From: Thomas Gleixner <tglx@linutronix.de>
To: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
Cc: mingo@redhat.com, hpa@zytor.com, davej@redhat.com,
hmh@hmh.eng.br, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] x86: Add cpu_detect_cache_sizes() to init_intel(), add Quark to legacy_cache()
Date: Mon, 6 Oct 2014 11:55:37 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1410061121470.4383@nanos> (raw)
In-Reply-To: <1412459037-26089-2-git-send-email-pure.logic@nexus-software.ie>
On Sat, 4 Oct 2014, Bryan O'Donoghue wrote:
> @@ -381,7 +381,18 @@ static void init_intel(struct cpuinfo_x86 *c)
> #endif
> }
>
> - l2 = init_intel_cacheinfo(c);
> + /* Detect legacy cache sizes */
> + cpu_detect_cache_sizes(c);
> +
> + /*
> + * If cache_size has not been initialized via legacy_cache()
> + * probe it via init_intel_cacheinfo().
> + */
> + if (c->x86_cache_size == 0)
> + l2 = init_intel_cacheinfo(c);
> + else
> + l2 = c->x86_cache_size;
Looking a bit deeper. This wont work because cpu_detect_cache_sizes()
will set c->x86_cache_size for all cpus with extended_cpuid_level >=
0x80000005, which is the case for everything modern. So this results
in init_intel_cacheinfo() not being called anymore.
So we might need the following conditional:
l2 = init_intel_cacheinfo(c);
+ if (!c->x86_cache_size) {
+ cpu_detect_cache_sizes(c);
+ l2 = c->x86_cache_size;
+ }
If that does not work because c->x86_cache_size is not 0 after
init_intel_cacheinfo() we really need to make it family/model
dependent.
Thanks,
tglx
next prev parent reply other threads:[~2014-10-06 9:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-04 21:43 [PATCH v2 0/2] Fix legacy_cache detect on Intel. Add Quark to legacy_cache, document TLB quirk Bryan O'Donoghue
2014-10-04 21:43 ` [PATCH v2 1/2] x86: Add cpu_detect_cache_sizes() to init_intel(), add Quark to legacy_cache() Bryan O'Donoghue
2014-10-06 9:55 ` Thomas Gleixner [this message]
2014-10-06 10:05 ` Bryan O'Donoghue
2014-10-04 21:43 ` [PATCH v2 2/2] x86: Quark: Comment setup_arch() to document TLB/PGE behaviour Bryan O'Donoghue
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=alpine.DEB.2.11.1410061121470.4383@nanos \
--to=tglx@linutronix.de \
--cc=davej@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pure.logic@nexus-software.ie \
--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®