mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull smp hotplug updates from Thomas Gleixner: "This is the final round of converting the notifier mess to the state machine. The removal of the notifiers and the related infrastructure will happen around rc1, as there are conversions outstanding in other trees. The whole exercise removed about 2000 lines of code in total and in course of the conversion several dozen bugs got fixed. The new mechanism allows to test almost every hotplug step standalone, so usage sites can exercise all transitions extensively. There is more room for improvement, like integrating all the pointlessly different architecture mechanisms of synchronizing, setting cpus online etc into the core code" * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (60 commits) tracing/rb: Init the CPU mask on allocation soc/fsl/qbman: Convert to hotplug state machine soc/fsl/qbman: Convert to hotplug state machine zram: Convert to hotplug state machine KVM/PPC/Book3S HV: Convert to hotplug state machine arm64/cpuinfo: Convert to hotplug state machine arm64/cpuinfo: Make hotplug notifier symmetric mm/compaction: Convert to hotplug state machine iommu/vt-d: Convert to hotplug state machine mm/zswap: Convert pool to hotplug state machine mm/zswap: Convert dst-mem to hotplug state machine mm/zsmalloc: Convert to hotplug state machine mm/vmstat: Convert to hotplug state machine mm/vmstat: Avoid on each online CPU loops mm/vmstat: Drop get_online_cpus() from init_cpu_node_state/vmstat_cpu_dead() tracing/rb: Convert to hotplug state machine oprofile/nmi timer: Convert to hotplug state machine net/iucv: Use explicit clean up labels in iucv_init() x86/pci/amd-bus: Convert to hotplug state machine x86/oprofile/nmi: Convert to hotplug state machine ...
This commit is contained in:
commit
e71c3978d6
52 changed files with 894 additions and 1657 deletions
|
|
@ -2166,27 +2166,20 @@ void resume_console(void)
|
|||
|
||||
/**
|
||||
* console_cpu_notify - print deferred console messages after CPU hotplug
|
||||
* @self: notifier struct
|
||||
* @action: CPU hotplug event
|
||||
* @hcpu: unused
|
||||
* @cpu: unused
|
||||
*
|
||||
* If printk() is called from a CPU that is not online yet, the messages
|
||||
* will be spooled but will not show up on the console. This function is
|
||||
* called when a new CPU comes online (or fails to come up), and ensures
|
||||
* that any such output gets printed.
|
||||
*/
|
||||
static int console_cpu_notify(struct notifier_block *self,
|
||||
unsigned long action, void *hcpu)
|
||||
static int console_cpu_notify(unsigned int cpu)
|
||||
{
|
||||
switch (action) {
|
||||
case CPU_ONLINE:
|
||||
case CPU_DEAD:
|
||||
case CPU_DOWN_FAILED:
|
||||
case CPU_UP_CANCELED:
|
||||
if (!cpuhp_tasks_frozen) {
|
||||
console_lock();
|
||||
console_unlock();
|
||||
}
|
||||
return NOTIFY_OK;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2824,6 +2817,7 @@ EXPORT_SYMBOL(unregister_console);
|
|||
static int __init printk_late_init(void)
|
||||
{
|
||||
struct console *con;
|
||||
int ret;
|
||||
|
||||
for_each_console(con) {
|
||||
if (!keep_bootcon && con->flags & CON_BOOT) {
|
||||
|
|
@ -2838,7 +2832,12 @@ static int __init printk_late_init(void)
|
|||
unregister_console(con);
|
||||
}
|
||||
}
|
||||
hotcpu_notifier(console_cpu_notify, 0);
|
||||
ret = cpuhp_setup_state_nocalls(CPUHP_PRINTK_DEAD, "printk:dead", NULL,
|
||||
console_cpu_notify);
|
||||
WARN_ON(ret < 0);
|
||||
ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "printk:online",
|
||||
console_cpu_notify, NULL);
|
||||
WARN_ON(ret < 0);
|
||||
return 0;
|
||||
}
|
||||
late_initcall(printk_late_init);
|
||||
|
|
|
|||
Loading…
Reference in a new issue