public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@suse.de>
To: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
	x86@kernel.org, hecmargi@upv.es, dave.hansen@linux.intel.com,
	mgorman@suse.de, pbonzini@redhat.com, jacob.w.shin@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86, amd: Set X86_FEATURE_EXTD_APICID for future processors
Date: Wed, 29 Apr 2015 18:06:59 +0200	[thread overview]
Message-ID: <20150429160658.GC13807@pd.tnic> (raw)
In-Reply-To: <1430148351-9013-1-git-send-email-Aravind.Gopalakrishnan@amd.com>

On Mon, Apr 27, 2015 at 10:25:51AM -0500, Aravind Gopalakrishnan wrote:
> Decision to use a 4-bit mask or 8-bit mask in default_get_apic_id()
> is controlled by setting capability bit X86_FEATURE_EXTD_APICID.
> 
> Currently, we detect extended APIC ID support by accessing Link
> Transaction Control register D18F0x68 in PCI config space.
> 
> But, not even that is needed as we can safely postulate that future
> AMD processors will support 8-bit APIC IDs and we can simply set that
> feature bit on them, without the PCI access.
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
> ---
>  arch/x86/kernel/cpu/amd.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index fd470eb..20b6813 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -520,8 +520,16 @@ static void early_init_amd(struct cpuinfo_x86 *c)
>  			set_cpu_cap(c, X86_FEATURE_K6_MTRR);
>  #endif
>  #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_PCI)
> -	/* check CPU config space for extended APIC ID */
> -	if (cpu_has_apic && c->x86 >= 0xf) {
> +	/*
> +	 * ApicID can always be treated as a 8bit value for
> +	 * AMD APIC versions >= 0x10. So, we can safely set

Expanded the version aspect to:

        /*
         * ApicID can always be treated as a 8bit value for AMD APIC versions
         * >= 0x10 but even old K8s came out of reset with version 0x10. So, we
         * can safely set X86_FEATURE_EXTD_APICID unconditionally for families
         * after 16h.
         */

and applied.

Thanks.

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

  reply	other threads:[~2015-04-29 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27 15:25 [PATCH] x86, amd: Set X86_FEATURE_EXTD_APICID for future processors Aravind Gopalakrishnan
2015-04-29 16:06 ` Borislav Petkov [this message]
2015-05-06 10:13 ` [tip:x86/cpu] x86/cpu/amd: " tip-bot for Aravind Gopalakrishnan

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=20150429160658.GC13807@pd.tnic \
    --to=bp@suse.de \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hecmargi@upv.es \
    --cc=hpa@zytor.com \
    --cc=jacob.w.shin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=pbonzini@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