Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+7 -7
+7 -7
arch/x86/kernel/cpu/microcode/core.c
··· 17 17 18 18 #define pr_fmt(fmt) "microcode: " fmt 19 19 20 - #include <linux/platform_device.h> 21 20 #include <linux/stop_machine.h> 21 + #include <linux/device/faux.h> 22 22 #include <linux/syscore_ops.h> 23 23 #include <linux/miscdevice.h> 24 24 #include <linux/capability.h> ··· 249 249 } 250 250 251 251 /* fake device for request_firmware */ 252 - static struct platform_device *microcode_pdev; 252 + static struct faux_device *microcode_fdev; 253 253 254 254 #ifdef CONFIG_MICROCODE_LATE_LOADING 255 255 /* ··· 690 690 if (!setup_cpus()) 691 691 return -EBUSY; 692 692 693 - switch (microcode_ops->request_microcode_fw(0, &microcode_pdev->dev)) { 693 + switch (microcode_ops->request_microcode_fw(0, &microcode_fdev->dev)) { 694 694 case UCODE_NEW: 695 695 return load_late_stop_cpus(false); 696 696 case UCODE_NEW_SAFE: ··· 841 841 if (early_data.new_rev) 842 842 pr_info_once("Updated early from: 0x%08x\n", early_data.old_rev); 843 843 844 - microcode_pdev = platform_device_register_simple("microcode", -1, NULL, 0); 845 - if (IS_ERR(microcode_pdev)) 846 - return PTR_ERR(microcode_pdev); 844 + microcode_fdev = faux_device_create("microcode", NULL, NULL); 845 + if (!microcode_fdev) 846 + return -ENODEV; 847 847 848 848 dev_root = bus_get_dev_root(&cpu_subsys); 849 849 if (dev_root) { ··· 862 862 return 0; 863 863 864 864 out_pdev: 865 - platform_device_unregister(microcode_pdev); 865 + faux_device_destroy(microcode_fdev); 866 866 return error; 867 867 868 868 }