Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1563899 > unrolled thread
| Started by | Borislav Petkov <bp@alien8.de> |
|---|---|
| First post | 2017-01-20 21:40 +0100 |
| Last post | 2017-01-23 10:20 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 10/16] x86/microcode/AMD: Use find_microcode_in_initrd() Borislav Petkov <bp@alien8.de> - 2017-01-20 21:40 +0100
[tip:x86/mce] x86/microcode/AMD: Use find_microcode_in_initrd() tip-bot for Borislav Petkov <tipbot@zytor.com> - 2017-01-23 10:20 +0100
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-01-20 21:40 +0100 |
| Subject | [PATCH 10/16] x86/microcode/AMD: Use find_microcode_in_initrd() |
| Message-ID | <t1O8y-3uV-13@gated-at.bofh.it> |
From: Borislav Petkov <bp@suse.de>
Use the generic helper instead of semi-open-coding the procedure.
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/microcode/amd.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 4cbfe70cf458..7727f278de58 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -337,17 +337,15 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
/* First AP hasn't cached it yet, go through the blob. */
if (!cont.data) {
- struct cpio_data cp = { NULL, 0, "" };
+ struct cpio_data cp;
if (cont.size == -1)
return;
reget:
if (!get_builtin_microcode(&cp, x86_family(cpuid_1_eax))) {
-#ifdef CONFIG_BLK_DEV_INITRD
- cp = find_cpio_data(ucode_path, (void *)initrd_start,
- initrd_end - initrd_start, NULL);
-#endif
+ cp = find_microcode_in_initrd(ucode_path, false);
+
if (!(cp.data && cp.size)) {
/*
* Mark it so that other APs do not scan again
@@ -401,13 +399,9 @@ int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
if (!cont.data) {
if (IS_ENABLED(CONFIG_X86_32) && (cont.size != -1)) {
- struct cpio_data cp = { NULL, 0, "" };
-
-#ifdef CONFIG_BLK_DEV_INITRD
- cp = find_cpio_data(ucode_path, (void *)initrd_start,
- initrd_end - initrd_start, NULL);
-#endif
+ struct cpio_data cp;
+ cp = find_microcode_in_initrd(ucode_path, false);
if (!(cp.data && cp.size)) {
cont.size = -1;
return -EINVAL;
--
2.11.0
[toc] | [next] | [standalone]
| From | tip-bot for Borislav Petkov <tipbot@zytor.com> |
|---|---|
| Date | 2017-01-23 10:20 +0100 |
| Subject | [tip:x86/mce] x86/microcode/AMD: Use find_microcode_in_initrd() |
| Message-ID | <t2IX8-4Ae-37@gated-at.bofh.it> |
| In reply to | #1563899 |
Commit-ID: 8cc26e0b4c49246564f773edbbefa3d5dc91d56e
Gitweb: http://git.kernel.org/tip/8cc26e0b4c49246564f773edbbefa3d5dc91d56e
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Fri, 20 Jan 2017 21:29:49 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 23 Jan 2017 10:02:48 +0100
x86/microcode/AMD: Use find_microcode_in_initrd()
Use the generic helper instead of semi-open-coding the procedure.
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170120202955.4091-11-bp@alien8.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/cpu/microcode/amd.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 4cbfe70..7727f27 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -337,17 +337,15 @@ void load_ucode_amd_ap(unsigned int cpuid_1_eax)
/* First AP hasn't cached it yet, go through the blob. */
if (!cont.data) {
- struct cpio_data cp = { NULL, 0, "" };
+ struct cpio_data cp;
if (cont.size == -1)
return;
reget:
if (!get_builtin_microcode(&cp, x86_family(cpuid_1_eax))) {
-#ifdef CONFIG_BLK_DEV_INITRD
- cp = find_cpio_data(ucode_path, (void *)initrd_start,
- initrd_end - initrd_start, NULL);
-#endif
+ cp = find_microcode_in_initrd(ucode_path, false);
+
if (!(cp.data && cp.size)) {
/*
* Mark it so that other APs do not scan again
@@ -401,13 +399,9 @@ int __init save_microcode_in_initrd_amd(unsigned int cpuid_1_eax)
if (!cont.data) {
if (IS_ENABLED(CONFIG_X86_32) && (cont.size != -1)) {
- struct cpio_data cp = { NULL, 0, "" };
-
-#ifdef CONFIG_BLK_DEV_INITRD
- cp = find_cpio_data(ucode_path, (void *)initrd_start,
- initrd_end - initrd_start, NULL);
-#endif
+ struct cpio_data cp;
+ cp = find_microcode_in_initrd(ucode_path, false);
if (!(cp.data && cp.size)) {
cont.size = -1;
return -EINVAL;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web