From: "Bryan O'Donoghue" <pure.logic@nexus-software.ie>
To: Thomas Gleixner <tglx@linutronix.de>
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, 06 Oct 2014 11:05:28 +0100 [thread overview]
Message-ID: <54326968.10100@nexus-software.ie> (raw)
In-Reply-To: <alpine.DEB.2.11.1410061121470.4383@nanos>
On 06/10/14 10:55, Thomas Gleixner wrote:
>> + */
>> + 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.
True.
Missed that one.
> 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;
> + }
Yes - that'll work better.
Also - it only forces a conditional branch - so fewer extra cycles for
everybody !Quark and !Tualatin - which is preferential. Will incorporate.
Best,
Bryan
next prev parent reply other threads:[~2014-10-06 10:05 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
2014-10-06 10:05 ` Bryan O'Donoghue [this message]
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=54326968.10100@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
Powered by JetHome