Example #1
0
void __ref enable_nonboot_cpus(void)
{
	int cpu, error;

	/* Allow everyone to use the CPU hotplug again */
	cpu_maps_update_begin();
	cpu_hotplug_disabled = 0;
	if (cpumask_empty(frozen_cpus))
		goto out;

#ifdef CONFIG_DEBUG_PRINTK
	printk(KERN_INFO "Enabling non-boot CPUs ...\n");
#else
	;
#endif

	arch_enable_nonboot_cpus_begin();

	for_each_cpu(cpu, frozen_cpus) {
		error = _cpu_up(cpu, 1);
		if (!error) {
#ifdef CONFIG_DEBUG_PRINTK
			printk(KERN_INFO "CPU%d is up\n", cpu);
#else
			;
#endif
			continue;
		}
#ifdef CONFIG_DEBUG_PRINTK
		printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
#else
		;
#endif
	}
Example #2
0
void __ref enable_nonboot_cpus(void)
{
	int cpu, error;
	struct device *cpu_device;

	/* Allow everyone to use the CPU hotplug again */
	cpu_maps_update_begin();
	cpu_hotplug_disabled = 0;
	if (cpumask_empty(frozen_cpus))
		goto out;

	pr_debug("Enabling non-boot CPUs ...\n");

	arch_enable_nonboot_cpus_begin();

	for_each_cpu(cpu, frozen_cpus) {
		error = _cpu_up(cpu, 1);
		if (!error) {
			pr_debug(KERN_INFO "CPU%d is up\n", cpu);
			cpu_device = get_cpu_device(cpu);
			if (!cpu_device)
				pr_err("%s: failed to get cpu%d device\n",
				       __func__, cpu);
			else
				kobject_uevent(&cpu_device->kobj, KOBJ_ONLINE);
			continue;
		}
		printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
	}
Example #3
0
void __ref enable_nonboot_cpus(void)
{
    int cpu, error;

    /* Allow everyone to use the CPU hotplug again */
    cpu_maps_update_begin();
    cpu_hotplug_disabled = 0;
    if (cpumask_empty(frozen_cpus))
        goto out;

    printk(KERN_INFO "Enabling non-boot CPUs ...\n");

    arch_enable_nonboot_cpus_begin();

#if defined(CONFIG_SCHED_HMP) && defined(CONFIG_EXYNOS5_DYNAMIC_CPU_HOTPLUG)
    if (!disable_dm_hotplug_before_suspend)
        cpumask_and(frozen_cpus, frozen_cpus, &hmp_slow_cpu_mask);
#endif

    for_each_cpu(cpu, frozen_cpus) {
        error = _cpu_up(cpu, 1);
        if (!error) {
            printk(KERN_INFO "CPU%d is up\n", cpu);
            continue;
        }
        printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
    }
Example #4
0
File: cpu.c Project: borkmann/kasan
void __ref enable_nonboot_cpus(void)
{
	int cpu, error;

	/* Allow everyone to use the CPU hotplug again */
	cpu_maps_update_begin();
	cpu_hotplug_disabled = 0;
	if (cpumask_empty(frozen_cpus))
		goto out;

	pr_info("Enabling non-boot CPUs ...\n");

	arch_enable_nonboot_cpus_begin();

	for_each_cpu(cpu, frozen_cpus) {
		error = _cpu_up(cpu, 1);
		if (!error) {
			pr_info("CPU%d is up\n", cpu);
			continue;
		}
		pr_warn("Error taking CPU%d up: %d\n", cpu, error);
	}
Example #5
0
void __ref enable_nonboot_cpus(void)
{
	int cpu, error;

	
	cpu_maps_update_begin();
	cpu_hotplug_disabled = 0;
	if (cpumask_empty(frozen_cpus))
		goto out;

	printk(KERN_INFO "Enabling non-boot CPUs ...\n");

	arch_enable_nonboot_cpus_begin();

	for_each_cpu(cpu, frozen_cpus) {
		error = _cpu_up(cpu, 1);
		if (!error) {
			printk(KERN_INFO "CPU%d is up\n", cpu);
			continue;
		}
		printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
	}
Example #6
0
void __ref enable_nonboot_cpus(void)
{
	int cpu, error;
#if defined (CONFIG_MACH_APQ8064_OMEGA) || defined (CONFIG_MACH_APQ8064_OMEGAR)
	static int first = 0;

	if (!first) {
		init_timer(&boost_freq_timer);
		first = 1;
	}
	if (timer_pending(&boost_freq_timer))
		del_timer(&boost_freq_timer);
	boost_freq_timer.function = boost_freq_timer_cb;
	boost_freq_timer.expires =
		jiffies + msecs_to_jiffies(BOOST_FREQ_TIME_MS);
	add_timer(&boost_freq_timer);
	boost_freq = 1;
#endif

	/* Allow everyone to use the CPU hotplug again */
	cpu_maps_update_begin();
	cpu_hotplug_disabled = 0;
	if (cpumask_empty(frozen_cpus))
		goto out;

	printk(KERN_INFO "Enabling non-boot CPUs ...\n");

	arch_enable_nonboot_cpus_begin();

	for_each_cpu(cpu, frozen_cpus) {
		error = _cpu_up(cpu, 1);
		if (!error) {
			printk(KERN_INFO "CPU%d is up\n", cpu);
			continue;
		}
		printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
	}
Example #7
0
void enable_nonboot_cpus(void)
{
	int cpu, error;

	/* Allow everyone to use the CPU hotplug again */
	cpu_maps_update_begin();
	WARN_ON(--cpu_hotplug_disabled < 0);
	if (cpumask_empty(frozen_cpus))
		goto out;

	pr_info("Enabling non-boot CPUs ...\n");

	arch_enable_nonboot_cpus_begin();

	for_each_cpu(cpu, frozen_cpus) {
		trace_suspend_resume(TPS("CPU_ON"), cpu, true);
		error = _cpu_up(cpu, 1);
		trace_suspend_resume(TPS("CPU_ON"), cpu, false);
		if (!error) {
			pr_info("CPU%d is up\n", cpu);
			continue;
		}
		pr_warn("Error taking CPU%d up: %d\n", cpu, error);
	}