mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-14 07:54:37 -05:00
Merge tag 'x86_microcode_for_v6.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 microcode loader update from Borislav Petkov: - Switch the microcode loader from using the fake platform device to the new simple faux bus * tag 'x86_microcode_for_v6.17_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode: Move away from using a fake platform device
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
|
||||
#define pr_fmt(fmt) "microcode: " fmt
|
||||
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/stop_machine.h>
|
||||
#include <linux/device/faux.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/capability.h>
|
||||
@@ -249,7 +249,7 @@ static void reload_early_microcode(unsigned int cpu)
|
||||
}
|
||||
|
||||
/* fake device for request_firmware */
|
||||
static struct platform_device *microcode_pdev;
|
||||
static struct faux_device *microcode_fdev;
|
||||
|
||||
#ifdef CONFIG_MICROCODE_LATE_LOADING
|
||||
/*
|
||||
@@ -690,7 +690,7 @@ static int load_late_locked(void)
|
||||
if (!setup_cpus())
|
||||
return -EBUSY;
|
||||
|
||||
switch (microcode_ops->request_microcode_fw(0, µcode_pdev->dev)) {
|
||||
switch (microcode_ops->request_microcode_fw(0, µcode_fdev->dev)) {
|
||||
case UCODE_NEW:
|
||||
return load_late_stop_cpus(false);
|
||||
case UCODE_NEW_SAFE:
|
||||
@@ -841,9 +841,9 @@ static int __init microcode_init(void)
|
||||
if (early_data.new_rev)
|
||||
pr_info_once("Updated early from: 0x%08x\n", early_data.old_rev);
|
||||
|
||||
microcode_pdev = platform_device_register_simple("microcode", -1, NULL, 0);
|
||||
if (IS_ERR(microcode_pdev))
|
||||
return PTR_ERR(microcode_pdev);
|
||||
microcode_fdev = faux_device_create("microcode", NULL, NULL);
|
||||
if (!microcode_fdev)
|
||||
return -ENODEV;
|
||||
|
||||
dev_root = bus_get_dev_root(&cpu_subsys);
|
||||
if (dev_root) {
|
||||
@@ -862,7 +862,7 @@ static int __init microcode_init(void)
|
||||
return 0;
|
||||
|
||||
out_pdev:
|
||||
platform_device_unregister(microcode_pdev);
|
||||
faux_device_destroy(microcode_fdev);
|
||||
return error;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user