cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/kernel/cpu/microcode/core.c

/*
 * CPU Microcode Update Driver for Linux
 *
 * Copyright (C) 2000-2006 Tigran Aivazian <aivazian.tigran@gmail.com>
 *            2006      Shaohua Li <shaohua.li@intel.com>
 *            2013-2016 Borislav Petkov <bp@alien8.de>
 *
 * X86 CPU microcode early update for Linux:
 *
 *      Copyright (C) 2012 Fenghua Yu <fenghua.yu@intel.com>
 *                         H Peter Anvin" <hpa@zytor.com>
 *                (C) 2015 Borislav Petkov <bp@alien8.de>
 *
 * This driver allows to upgrade microcode on x86 processors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version
 * 2 of the License, or (at your option) any later version.
 */


#define pr_fmt(fmt) "microcode: " fmt

#include <linux/platform_device.h>
#include <linux/syscore_ops.h>
#include <linux/miscdevice.h>
#include <linux/capability.h>
#include <linux/firmware.h>
#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/cpu.h>
#include <linux/fs.h>
#include <linux/mm.h>

#include <asm/microcode_intel.h>
#include <asm/cpu_device_id.h>
#include <asm/microcode_amd.h>
#include <asm/perf_event.h>
#include <asm/microcode.h>
#include <asm/processor.h>
#include <asm/cmdline.h>
#include <asm/setup.h>


#define DRIVER_VERSION	"2.2"


static struct microcode_ops	*microcode_ops;

static bool dis_ucode_ldr = true;


bool initrd_gone;


LIST_HEAD(microcode_cache);

/*
 * Synchronization.
 *
 * All non cpu-hotplug-callback call sites use:
 *
 * - microcode_mutex to synchronize with each other;
 * - get/put_online_cpus() to synchronize with
 *   the cpu-hotplug-callback call sites.
 *
 * We guarantee that only a single cpu is being
 * updated at any particular moment of time.
 */
static DEFINE_MUTEX(microcode_mutex);


struct ucode_cpu_info		ucode_cpu_info[NR_CPUS];


struct cpu_info_ctx {
	
struct cpu_signature	*cpu_sig;
	
int			err;
};

/*
 * Those patch levels cannot be updated to newer ones and thus should be final.
 */

static u32 final_levels[] = {
	0x01000098,
	0x0100009f,
	0x010000af,
	0, /* T-101 terminator */
};

/*
 * Check the current patch level on this CPU.
 *
 * Returns:
 *  - true: if update should stop
 *  - false: otherwise
 */

static bool amd_check_current_patch_level(void) { u32 lvl, dummy, i; u32 *levels; native_rdmsr(MSR_AMD64_PATCH_LEVEL, lvl, dummy); if (IS_ENABLED(CONFIG_X86_32)) levels = (u32 *)__pa_nodebug(&final_levels); else levels = final_levels; for (i = 0; levels[i]; i++) { if (lvl == levels[i]) return true; } return false; }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov83100.00%1100.00%
Total83100.00%1100.00%


static bool __init check_loader_disabled_bsp(void) { static const char *__dis_opt_str = "dis_ucode_ldr"; #ifdef CONFIG_X86_32 const char *cmdline = (const char *)__pa_nodebug(boot_command_line); const char *option = (const char *)__pa_nodebug(__dis_opt_str); bool *res = (bool *)__pa_nodebug(&dis_ucode_ldr); #else /* CONFIG_X86_64 */ const char *cmdline = boot_command_line; const char *option = __dis_opt_str; bool *res = &dis_ucode_ldr; #endif /* * CPUID(1).ECX[31]: reserved for hypervisor use. This is still not * completely accurate as xen pv guests don't see that CPUID bit set but * that's good enough as they don't land on the BSP path anyway. */ if (native_cpuid_ecx(1) & BIT(31)) return *res; if (x86_cpuid_vendor() == X86_VENDOR_AMD) { if (amd_check_current_patch_level()) return *res; } if (cmdline_find_option_bool(cmdline, option) <= 0) *res = false; return *res; }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov145100.00%5100.00%
Total145100.00%5100.00%

extern struct builtin_fw __start_builtin_fw[]; extern struct builtin_fw __end_builtin_fw[];
bool get_builtin_firmware(struct cpio_data *cd, const char *name) { #ifdef CONFIG_FW_LOADER struct builtin_fw *b_fw; for (b_fw = __start_builtin_fw; b_fw != __end_builtin_fw; b_fw++) { if (!strcmp(name, b_fw->name)) { cd->size = b_fw->size; cd->data = b_fw->data; return true; } } #endif return false; }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov76100.00%1100.00%
Total76100.00%1100.00%


void __init load_ucode_bsp(void) { unsigned int cpuid_1_eax; bool intel = true; if (!have_cpuid_p()) return; cpuid_1_eax = native_cpuid_eax(1); switch (x86_cpuid_vendor()) { case X86_VENDOR_INTEL: if (x86_family(cpuid_1_eax) < 6) return; break; case X86_VENDOR_AMD: if (x86_family(cpuid_1_eax) < 0x10) return; intel = false; break; default: return; } if (check_loader_disabled_bsp()) return; if (intel) load_ucode_intel_bsp(); else load_ucode_amd_bsp(cpuid_1_eax); }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov91100.00%4100.00%
Total91100.00%4100.00%


static bool check_loader_disabled_ap(void) { #ifdef CONFIG_X86_32 return *((bool *)__pa_nodebug(&dis_ucode_ldr)); #else return dis_ucode_ldr; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov32100.00%1100.00%
Total32100.00%1100.00%


void load_ucode_ap(void) { unsigned int cpuid_1_eax; if (check_loader_disabled_ap()) return; cpuid_1_eax = native_cpuid_eax(1); switch (x86_cpuid_vendor()) { case X86_VENDOR_INTEL: if (x86_family(cpuid_1_eax) >= 6) load_ucode_intel_ap(); break; case X86_VENDOR_AMD: if (x86_family(cpuid_1_eax) >= 0x10) load_ucode_amd_ap(cpuid_1_eax); break; default: break; } }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov67100.00%4100.00%
Total67100.00%4100.00%


static int __init save_microcode_in_initrd(void) { struct cpuinfo_x86 *c = &boot_cpu_data; int ret = -EINVAL; switch (c->x86_vendor) { case X86_VENDOR_INTEL: if (c->x86 >= 6) ret = save_microcode_in_initrd_intel(); break; case X86_VENDOR_AMD: if (c->x86 >= 0x10) return save_microcode_in_initrd_amd(cpuid_eax(1)); break; default: break; } initrd_gone = true; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov78100.00%6100.00%
Total78100.00%6100.00%


struct cpio_data find_microcode_in_initrd(const char *path, bool use_pa) { #ifdef CONFIG_BLK_DEV_INITRD unsigned long start = 0; size_t size; #ifdef CONFIG_X86_32 struct boot_params *params; if (use_pa) params = (struct boot_params *)__pa_nodebug(&boot_params); else params = &boot_params; size = params->hdr.ramdisk_size; /* * Set start only if we have an initrd image. We cannot use initrd_start * because it is not set that early yet. */ if (size) start = params->hdr.ramdisk_image; # else /* CONFIG_X86_64 */ size = (unsigned long)boot_params.ext_ramdisk_size << 32; size |= boot_params.hdr.ramdisk_size; if (size) { start = (unsigned long)boot_params.ext_ramdisk_image << 32; start |= boot_params.hdr.ramdisk_image; start += PAGE_OFFSET; } # endif /* * Fixup the start address: after reserve_initrd() runs, initrd_start * has the virtual address of the beginning of the initrd. It also * possibly relocates the ramdisk. In either case, initrd_start contains * the updated address so use that instead. * * initrd_gone is for the hotplug case where we've thrown out initrd * already. */ if (!use_pa) { if (initrd_gone) return (struct cpio_data){ NULL, 0, "" }; if (initrd_start) start = initrd_start; } else { /* * The picture with physical addresses is a bit different: we * need to get the *physical* address to which the ramdisk was * relocated, i.e., relocated_ramdisk (not initrd_start) and * since we're running from physical addresses, we need to access * relocated_ramdisk through its *physical* address too. */ u64 *rr = (u64 *)__pa_nodebug(&relocated_ramdisk); if (*rr) start = *rr; } return find_cpio_data(path, (void *)start, size, NULL); #else /* !CONFIG_BLK_DEV_INITRD */ return (struct cpio_data){ NULL, 0, "" }; #endif }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov228100.00%4100.00%
Total228100.00%4100.00%


void reload_early_microcode(void) { int vendor, family; vendor = x86_cpuid_vendor(); family = x86_cpuid_family(); switch (vendor) { case X86_VENDOR_INTEL: if (family >= 6) reload_ucode_intel(); break; case X86_VENDOR_AMD: if (family >= 0x10) reload_ucode_amd(); break; default: break; } }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov56100.00%2100.00%
Total56100.00%2100.00%


static void collect_cpu_info_local(void *arg) { struct cpu_info_ctx *ctx = arg; ctx->err = microcode_ops->collect_cpu_info(smp_processor_id(), ctx->cpu_sig); }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko33100.00%1100.00%
Total33100.00%1100.00%


static int collect_cpu_info_on_target(int cpu, struct cpu_signature *cpu_sig) { struct cpu_info_ctx ctx = { .cpu_sig = cpu_sig, .err = 0 }; int ret; ret = smp_call_function_single(cpu, collect_cpu_info_local, &ctx, 1); if (!ret) ret = ctx.err; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko61100.00%1100.00%
Total61100.00%1100.00%


static int collect_cpu_info(int cpu) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu; int ret; memset(uci, 0, sizeof(*uci)); ret = collect_cpu_info_on_target(cpu, &uci->cpu_sig); if (!ret) uci->valid = 1; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko60100.00%1100.00%
Total60100.00%1100.00%

struct apply_microcode_ctx { int err; };
static void apply_microcode_local(void *arg) { struct apply_microcode_ctx *ctx = arg; ctx->err = microcode_ops->apply_microcode(smp_processor_id()); }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko29100.00%1100.00%
Total29100.00%1100.00%


static int apply_microcode_on_target(int cpu) { struct apply_microcode_ctx ctx = { .err = 0 }; int ret; ret = smp_call_function_single(cpu, apply_microcode_local, &ctx, 1); if (!ret) ret = ctx.err; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko51100.00%1100.00%
Total51100.00%1100.00%

#ifdef CONFIG_MICROCODE_OLD_INTERFACE
static int do_microcode_update(const void __user *buf, size_t size) { int error = 0; int cpu; for_each_online_cpu(cpu) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu; enum ucode_state ustate; if (!uci->valid) continue; ustate = microcode_ops->request_microcode_user(cpu, buf, size); if (ustate == UCODE_ERROR) { error = -1; break; } else if (ustate == UCODE_OK) apply_microcode_on_target(cpu); } return error; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba5054.35%125.00%
Dmitry Adamushko3032.61%250.00%
Hugh Dickins1213.04%125.00%
Total92100.00%4100.00%


static int microcode_open(struct inode *inode, struct file *file) { return capable(CAP_SYS_RAWIO) ? nonseekable_open(inode, file) : -EPERM; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba2475.00%150.00%
Arnd Bergmann825.00%150.00%
Total32100.00%2100.00%


static ssize_t microcode_write(struct file *file, const char __user *buf, size_t len, loff_t *ppos) { ssize_t ret = -EINVAL; if ((len >> PAGE_SHIFT) > totalram_pages) { pr_err("too much data (max %ld pages)\n", totalram_pages); return ret; } get_online_cpus(); mutex_lock(&microcode_mutex); if (do_microcode_update(buf, len) == 0) ret = (ssize_t)len; if (ret > 0) perf_check_microcode(); mutex_unlock(&microcode_mutex); put_online_cpus(); return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba7474.00%116.67%
Dmitry Adamushko1414.00%233.33%
Stéphane Eranian99.00%116.67%
Jan Beulich22.00%116.67%
Joe Perches11.00%116.67%
Total100100.00%6100.00%

static const struct file_operations microcode_fops = { .owner = THIS_MODULE, .write = microcode_write, .open = microcode_open, .llseek = no_llseek, }; static struct miscdevice microcode_dev = { .minor = MICROCODE_MINOR, .name = "microcode", .nodename = "cpu/microcode", .fops = &microcode_fops, };
static int __init microcode_dev_init(void) { int error; error = misc_register(&microcode_dev); if (error) { pr_err("can't misc_register on minor=%d\n", MICROCODE_MINOR); return error; } return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba3794.87%133.33%
Joe Perches12.56%133.33%
Dmitry Adamushko12.56%133.33%
Total39100.00%3100.00%


static void __exit microcode_dev_exit(void) { misc_deregister(&microcode_dev); }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba1493.33%150.00%
Srivatsa S. Bhat16.67%150.00%
Total15100.00%2100.00%

#else #define microcode_dev_init() 0 #define microcode_dev_exit() do { } while (0) #endif /* fake device for request_firmware */ static struct platform_device *microcode_pdev;
static int reload_for_cpu(int cpu) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu; enum ucode_state ustate; int err = 0; if (!uci->valid) return err; ustate = microcode_ops->request_microcode_fw(cpu, &microcode_pdev->dev, true); if (ustate == UCODE_OK) apply_microcode_on_target(cpu); else if (ustate == UCODE_ERROR) err = -EINVAL; return err; }

Contributors

PersonTokensPropCommitsCommitProp
Rusty Russell4658.23%125.00%
Dmitry Adamushko2329.11%125.00%
Borislav Petkov1012.66%250.00%
Total79100.00%4100.00%


static ssize_t reload_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { unsigned long val; int cpu; ssize_t ret = 0, tmp_ret; ret = kstrtoul(buf, 0, &val); if (ret) return ret; if (val != 1) return size; get_online_cpus(); mutex_lock(&microcode_mutex); for_each_online_cpu(cpu) { tmp_ret = reload_for_cpu(cpu); if (tmp_ret != 0) pr_warn("Error reloading microcode on CPU %d\n", cpu); /* save retval of the first encountered reload error */ if (!ret) ret = tmp_ret; } if (!ret) perf_check_microcode(); mutex_unlock(&microcode_mutex); put_online_cpus(); if (!ret) ret = size; return ret; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba4632.86%114.29%
Borislav Petkov3323.57%114.29%
Dmitry Adamushko3122.14%228.57%
Peter Zijlstra2014.29%114.29%
Shuah Khan85.71%114.29%
Kay Sievers21.43%114.29%
Total140100.00%7100.00%


static ssize_t version_show(struct device *dev, struct device_attribute *attr, char *buf) { struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; return sprintf(buf, "0x%x\n", uci->cpu_sig.rev); }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba4191.11%133.33%
Kay Sievers24.44%133.33%
Dmitry Adamushko24.44%133.33%
Total45100.00%3100.00%


static ssize_t pf_show(struct device *dev, struct device_attribute *attr, char *buf) { struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; return sprintf(buf, "0x%x\n", uci->cpu_sig.pf); }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba4191.11%133.33%
Kay Sievers24.44%133.33%
Dmitry Adamushko24.44%133.33%
Total45100.00%3100.00%

static DEVICE_ATTR(reload, 0200, NULL, reload_store); static DEVICE_ATTR(version, 0400, version_show, NULL); static DEVICE_ATTR(processor_flags, 0400, pf_show, NULL); static struct attribute *mc_default_attrs[] = { &dev_attr_version.attr, &dev_attr_processor_flags.attr, NULL }; static const struct attribute_group mc_attr_group = { .attrs = mc_default_attrs, .name = "microcode", };
static void microcode_fini_cpu(int cpu) { if (microcode_ops->microcode_fini_cpu) microcode_ops->microcode_fini_cpu(cpu); }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba836.36%120.00%
Dmitry Adamushko836.36%360.00%
Borislav Petkov627.27%120.00%
Total22100.00%5100.00%


static enum ucode_state microcode_resume_cpu(int cpu) { if (apply_microcode_on_target(cpu)) return UCODE_ERROR; pr_debug("CPU%d updated upon resume\n", cpu); return UCODE_OK; }

Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov1343.33%240.00%
Dmitry Adamushko1343.33%240.00%
Peter Oruba413.33%120.00%
Total30100.00%5100.00%


static enum ucode_state microcode_init_cpu(int cpu, bool refresh_fw) { enum ucode_state ustate; struct ucode_cpu_info *uci = ucode_cpu_info + cpu; if (uci->valid) return UCODE_OK; if (collect_cpu_info(cpu)) return UCODE_ERROR; /* --dimm. Trigger a delayed update? */ if (system_state != SYSTEM_RUNNING) return UCODE_NFOUND; ustate = microcode_ops->request_microcode_fw(cpu, &microcode_pdev->dev, refresh_fw); if (ustate == UCODE_OK) { pr_debug("CPU%d updated upon init\n", cpu); apply_microcode_on_target(cpu); } return ustate; }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko6872.34%342.86%
Fenghua Yu1819.15%114.29%
Borislav Petkov55.32%114.29%
Rusty Russell22.13%114.29%
Joe Perches11.06%114.29%
Total94100.00%7100.00%


static enum ucode_state microcode_update_cpu(int cpu) { struct ucode_cpu_info *uci = ucode_cpu_info + cpu; /* Refresh CPU microcode revision after resume. */ collect_cpu_info(cpu); if (uci->valid) return microcode_resume_cpu(cpu); return microcode_init_cpu(cpu, false); }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko3373.33%342.86%
Borislav Petkov1124.44%342.86%
Rusty Russell12.22%114.29%
Total45100.00%7100.00%


static int mc_device_add(struct device *dev, struct subsys_interface *sif) { int err, cpu = dev->id; if (!cpu_online(cpu)) return 0; pr_debug("CPU%d added\n", cpu); err = sysfs_create_group(&dev->kobj, &mc_attr_group); if (err) return err; if (microcode_init_cpu(cpu, true) == UCODE_ERROR) return -EINVAL; return err; }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko6580.25%228.57%
Kay Sievers1012.35%114.29%
Borislav Petkov44.94%228.57%
Rusty Russell11.23%114.29%
Joe Perches11.23%114.29%
Total81100.00%7100.00%


static void mc_device_remove(struct device *dev, struct subsys_interface *sif) { int cpu = dev->id; if (!cpu_online(cpu)) return; pr_debug("CPU%d removed\n", cpu); microcode_fini_cpu(cpu); sysfs_remove_group(&dev->kobj, &mc_attr_group); }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba4378.18%125.00%
Kay Sievers916.36%125.00%
Viresh Kumar23.64%125.00%
Joe Perches11.82%125.00%
Total55100.00%4100.00%

static struct subsys_interface mc_cpu_interface = { .name = "microcode", .subsys = &cpu_subsys, .add_dev = mc_device_add, .remove_dev = mc_device_remove, }; /** * mc_bp_resume - Update boot CPU microcode during resume. */
static void mc_bp_resume(void) { int cpu = smp_processor_id(); struct ucode_cpu_info *uci = ucode_cpu_info + cpu; if (uci->valid && uci->mc) microcode_ops->apply_microcode(cpu); else if (!uci->mc) reload_early_microcode(); }

Contributors

PersonTokensPropCommitsCommitProp
Dmitry Adamushko2243.14%120.00%
Peter Oruba1325.49%120.00%
Borislav Petkov1121.57%240.00%
Rafael J. Wysocki59.80%120.00%
Total51100.00%5100.00%

static struct syscore_ops mc_syscore_ops = { .resume = mc_bp_resume, };
static int mc_cpu_online(unsigned int cpu) { struct device *dev; dev = get_cpu_device(cpu); microcode_update_cpu(cpu); pr_debug("CPU%d added\n", cpu); if (sysfs_create_group(&dev->kobj, &mc_attr_group)) pr_err("Failed to create group for CPU%d\n", cpu); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba3663.16%114.29%
Sebastian Andrzej Siewior712.28%114.29%
Kay Sievers58.77%114.29%
Dmitry Adamushko47.02%228.57%
Rusty Russell35.26%114.29%
Joe Perches23.51%114.29%
Total57100.00%7100.00%


static int mc_cpu_down_prep(unsigned int cpu) { struct device *dev; dev = get_cpu_device(cpu); /* Suspend is in progress, only remove the interface */ sysfs_remove_group(&dev->kobj, &mc_attr_group); pr_debug("CPU%d removed\n", cpu); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Sebastian Andrzej Siewior2250.00%120.00%
Peter Oruba1431.82%120.00%
Dmitry Adamushko613.64%120.00%
Joe Perches12.27%120.00%
Kay Sievers12.27%120.00%
Total44100.00%5100.00%

static struct attribute *cpu_root_microcode_attrs[] = { &dev_attr_reload.attr, NULL }; static const struct attribute_group cpu_root_microcode_group = { .name = "microcode", .attrs = cpu_root_microcode_attrs, };
int __init microcode_init(void) { struct cpuinfo_x86 *c = &boot_cpu_data; int error; if (dis_ucode_ldr) return -EINVAL; if (c->x86_vendor == X86_VENDOR_INTEL) microcode_ops = init_intel_microcode(); else if (c->x86_vendor == X86_VENDOR_AMD) microcode_ops = init_amd_microcode(); else pr_err("no support for this CPU vendor\n"); if (!microcode_ops) return -ENODEV; microcode_pdev = platform_device_register_simple("microcode", -1, NULL, 0); if (IS_ERR(microcode_pdev)) return PTR_ERR(microcode_pdev); get_online_cpus(); mutex_lock(&microcode_mutex); error = subsys_interface_register(&mc_cpu_interface); if (!error) perf_check_microcode(); mutex_unlock(&microcode_mutex); put_online_cpus(); if (error) goto out_pdev; error = sysfs_create_group(&cpu_subsys.dev_root->kobj, &cpu_root_microcode_group); if (error) { pr_err("Error creating microcode group!\n"); goto out_driver; } error = microcode_dev_init(); if (error) goto out_ucode_group; register_syscore_ops(&mc_syscore_ops); cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "x86/microcode:online", mc_cpu_online, mc_cpu_down_prep); pr_info("Microcode Update Driver: v%s.", DRIVER_VERSION); return 0; out_ucode_group: sysfs_remove_group(&cpu_subsys.dev_root->kobj, &cpu_root_microcode_group); out_driver: get_online_cpus(); mutex_lock(&microcode_mutex); subsys_interface_unregister(&mc_cpu_interface); mutex_unlock(&microcode_mutex); put_online_cpus(); out_pdev: platform_device_unregister(microcode_pdev); return error; }

Contributors

PersonTokensPropCommitsCommitProp
Peter Oruba7529.30%315.79%
Borislav Petkov5521.48%526.32%
Dmitry Adamushko5220.31%210.53%
Srivatsa S. Bhat3814.84%15.26%
Peter Zijlstra83.12%15.26%
Sebastian Andrzej Siewior83.12%15.26%
Andreas Herrmann62.34%15.26%
Rafael J. Wysocki62.34%15.26%
Greg Kroah-Hartman31.17%15.26%
Kay Sievers20.78%15.26%
Boris Ostrovsky20.78%15.26%
Joe Perches10.39%15.26%
Total256100.00%19100.00%

fs_initcall(save_microcode_in_initrd); late_initcall(microcode_init);

Overall Contributors

PersonTokensPropCommitsCommitProp
Borislav Petkov111539.76%3247.76%
Peter Oruba70625.18%45.97%
Dmitry Adamushko63222.54%68.96%
Kay Sievers602.14%34.48%
Rusty Russell531.89%11.49%
Srivatsa S. Bhat391.39%11.49%
Sebastian Andrzej Siewior371.32%11.49%
Peter Zijlstra301.07%11.49%
Rafael J. Wysocki281.00%11.49%
Fenghua Yu180.64%11.49%
Joe Perches150.53%11.49%
Arnd Bergmann130.46%22.99%
Hugh Dickins120.43%11.49%
Stéphane Eranian90.32%11.49%
Shuah Khan80.29%11.49%
Ingo Molnar70.25%11.49%
Andreas Herrmann60.21%11.49%
Greg Kroah-Hartman30.11%11.49%
Arvind Yadav20.07%11.49%
Hannes Eder20.07%11.49%
Andi Kleen20.07%11.49%
Jan Beulich20.07%11.49%
Viresh Kumar20.07%11.49%
Boris Ostrovsky20.07%11.49%
Andrew Morton10.04%11.49%
Total2804100.00%67100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.