All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org,
	brgerst@gmail.com, luto@amacapital.net, mingo@kernel.org,
	dvlasenk@redhat.com, bp@suse.de, tglx@linutronix.de,
	bp@alien8.de, hpa@zytor.com, peterz@infradead.org
Subject: [tip:x86/microcode] x86/microcode/intel: Unexport save_mc_for_early()
Date: Wed, 8 Jun 2016 02:54:38 -0700	[thread overview]
Message-ID: <tip-0c5fa827f1130d05858f158022c21e9e7e5cff92@git.kernel.org> (raw)
In-Reply-To: <1465225850-7352-8-git-send-email-bp@alien8.de>

Commit-ID:  0c5fa827f1130d05858f158022c21e9e7e5cff92
Gitweb:     http://git.kernel.org/tip/0c5fa827f1130d05858f158022c21e9e7e5cff92
Author:     Borislav Petkov <bp@suse.de>
AuthorDate: Mon, 6 Jun 2016 17:10:48 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 8 Jun 2016 11:04:20 +0200

x86/microcode/intel: Unexport save_mc_for_early()

It is used only in intel.c, drop the CONFIG_HOTPLUG_CPU ifdeffery from
the header and turn it into a void function because its return value
wasn't being used anyway.

No functionality change.

Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1465225850-7352-8-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/microcode_intel.h |  5 -----
 arch/x86/kernel/cpu/microcode/intel.c  | 15 ++++++---------
 2 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/arch/x86/include/asm/microcode_intel.h b/arch/x86/include/asm/microcode_intel.h
index 603417f..5e69154 100644
--- a/arch/x86/include/asm/microcode_intel.h
+++ b/arch/x86/include/asm/microcode_intel.h
@@ -70,9 +70,4 @@ static inline int __init save_microcode_in_initrd_intel(void) { return -EINVAL;
 static inline void reload_ucode_intel(void) {}
 #endif
 
-#ifdef CONFIG_HOTPLUG_CPU
-extern int save_mc_for_early(u8 *mc);
-#else
-static inline int save_mc_for_early(u8 *mc) { return 0; }
-#endif
 #endif /* _ASM_X86_MICROCODE_INTEL_H */
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index b5759a3..359e203 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -456,8 +456,6 @@ static void show_saved_mc(void)
 #endif
 }
 
-#ifdef CONFIG_HOTPLUG_CPU
-static DEFINE_MUTEX(x86_cpu_microcode_mutex);
 /*
  * Save this mc into mc_saved_data. So it will be loaded early when a CPU is
  * hot added or resumes.
@@ -465,14 +463,16 @@ static DEFINE_MUTEX(x86_cpu_microcode_mutex);
  * Please make sure this mc should be a valid microcode patch before calling
  * this function.
  */
-int save_mc_for_early(u8 *mc)
+static void save_mc_for_early(u8 *mc)
 {
+#ifdef CONFIG_HOTPLUG_CPU
+	static DEFINE_MUTEX(x86_cpu_microcode_mutex);
+
 	struct microcode_intel *mc_saved_tmp[MAX_UCODE_COUNT];
 	unsigned int mc_saved_count_init;
 	unsigned int num_saved;
 	struct microcode_intel **mc_saved;
-	int ret = 0;
-	int i;
+	int ret, i;
 
 	/*
 	 * Hold hotplug lock so mc_saved_data is not accessed by a CPU in
@@ -515,11 +515,8 @@ int save_mc_for_early(u8 *mc)
 
 out:
 	mutex_unlock(&x86_cpu_microcode_mutex);
-
-	return ret;
-}
-EXPORT_SYMBOL_GPL(save_mc_for_early);
 #endif
+}
 
 static bool __init load_builtin_intel_microcode(struct cpio_data *cp)
 {

  reply	other threads:[~2016-06-08  9:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 15:10 [PATCH 0/9] x86/microcode: Fixes for builtin vs initrd loading; cleanups Borislav Petkov
2016-06-06 15:10 ` [PATCH 1/9] x86/microcode: Fix loading precedence Borislav Petkov
2016-06-08  9:51   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 2/9] x86/microcode: Fix suspend to RAM with builtin microcode Borislav Petkov
2016-06-08  9:52   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 3/9] lib/cpio: Make find_cpio_data()'s offset arg optional Borislav Petkov
2016-06-08  9:52   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 4/9] x86/microcode: Get rid of find_cpio_data()'s dummy offset arg Borislav Petkov
2016-06-08  9:53   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 5/9] x86/microcode: Propagate save_microcode_in_initrd() retval Borislav Petkov
2016-06-08  9:53   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 6/9] x86/microcode/intel: Rename load_microcode_early() to find_microcode_patch() Borislav Petkov
2016-06-08  9:54   ` [tip:x86/microcode] " tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 7/9] x86/microcode/intel: Unexport save_mc_for_early() Borislav Petkov
2016-06-08  9:54   ` tip-bot for Borislav Petkov [this message]
2016-06-06 15:10 ` [PATCH 8/9] x86/microcode/AMD: Make amd_ucode_patch static Borislav Petkov
2016-06-08  9:55   ` [tip:x86/microcode] x86/microcode/AMD: Make amd_ucode_patch[] static tip-bot for Borislav Petkov
2016-06-06 15:10 ` [PATCH 9/9] Documentation/microcode: Document some aspects for more clarity Borislav Petkov
2016-06-08  9:55   ` [tip:x86/microcode] " 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-0c5fa827f1130d05858f158022c21e9e7e5cff92@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.