From: tip-bot for Borislav Petkov <bp@amd64.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
tglx@linutronix.de, hpa@linux.intel.com, bp@amd64.org,
borislav.petkov@amd.com
Subject: [tip:x86/cpu] x86: Add a BSP cpu_dev helper
Date: Fri, 5 Aug 2011 22:58:58 GMT [thread overview]
Message-ID: <tip-a110b5ec7371592eac856ac5c22dc7b518952d44@git.kernel.org> (raw)
In-Reply-To: <20110805180116.GB26217@aftab>
Commit-ID: a110b5ec7371592eac856ac5c22dc7b518952d44
Gitweb: http://git.kernel.org/tip/a110b5ec7371592eac856ac5c22dc7b518952d44
Author: Borislav Petkov <bp@amd64.org>
AuthorDate: Fri, 5 Aug 2011 20:01:16 +0200
Committer: H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 5 Aug 2011 12:26:49 -0700
x86: Add a BSP cpu_dev helper
Add a function ptr to struct cpu_dev which is destined to be run only
once on the BSP during boot.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Link: http://lkml.kernel.org/r/20110805180116.GB26217@aftab
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
arch/x86/kernel/cpu/common.c | 3 +++
arch/x86/kernel/cpu/cpu.h | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 22a073d..8ed394a 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -681,6 +681,9 @@ static void __init early_identify_cpu(struct cpuinfo_x86 *c)
filter_cpuid_features(c, false);
setup_smep(c);
+
+ if (this_cpu->c_bsp_init)
+ this_cpu->c_bsp_init(c);
}
void __init early_cpu_init(void)
diff --git a/arch/x86/kernel/cpu/cpu.h b/arch/x86/kernel/cpu/cpu.h
index e765633..1b22dcc 100644
--- a/arch/x86/kernel/cpu/cpu.h
+++ b/arch/x86/kernel/cpu/cpu.h
@@ -18,6 +18,7 @@ struct cpu_dev {
struct cpu_model_info c_models[4];
void (*c_early_init)(struct cpuinfo_x86 *);
+ void (*c_bsp_init)(struct cpuinfo_x86 *);
void (*c_init)(struct cpuinfo_x86 *);
void (*c_identify)(struct cpuinfo_x86 *);
unsigned int (*c_size_cache)(struct cpuinfo_x86 *, unsigned int);
next prev parent reply other threads:[~2011-08-05 22:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-05 13:15 [PATCH -v3.1 0/3] x86, AMD: Correct F15h IC aliasing issue Borislav Petkov
2011-08-05 13:15 ` [PATCH -v3.1 1/3] " Borislav Petkov
2011-08-05 22:58 ` [tip:x86/cpu] x86, amd: Avoid cache aliasing penalties on AMD family 15h tip-bot for Borislav Petkov
2011-08-06 0:10 ` H. Peter Anvin
2011-08-06 12:31 ` [PATCH] x86, AMD: Fix 32-bit build after cache aliasing patch Borislav Petkov
2011-08-06 23:22 ` [tip:x86/cpu] x86-32, amd: Move va_align definition to unbreak 32-bit build tip-bot for Borislav Petkov
2011-08-05 13:15 ` [PATCH -v3.1 2/3] x86: Add a BSP cpuinit helper Borislav Petkov
2011-08-05 13:15 ` [PATCH -v3.1 3/3] x86, AMD: Move BSP code to " Borislav Petkov
2011-08-05 17:10 ` [PATCH -v3.1 0/3] x86, AMD: Correct F15h IC aliasing issue H. Peter Anvin
2011-08-05 17:55 ` Borislav Petkov
2011-08-05 18:01 ` [PATCH -v3.2 2/3] x86: Add a BSP cpu_dev helper Borislav Petkov
2011-08-05 22:58 ` tip-bot for Borislav Petkov [this message]
2011-08-05 18:04 ` [PATCH -v3.2 3/3] x86, AMD: Move BSP code to " Borislav Petkov
2011-08-05 20:07 ` H. Peter Anvin
2011-08-05 22:52 ` Borislav Petkov
2011-08-05 22:56 ` H. Peter Anvin
2011-08-05 22:59 ` [tip:x86/cpu] x86, amd: " tip-bot for Borislav Petkov
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=tip-a110b5ec7371592eac856ac5c22dc7b518952d44@git.kernel.org \
--to=bp@amd64.org \
--cc=borislav.petkov@amd.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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