Пример #1
0
static int acpi_processor_hotadd_init(struct acpi_processor *pr)
{
	unsigned long long sta;
	acpi_status status;
	int ret;

	status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta);
	if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT))
		return -ENODEV;

	ret = acpi_map_lsapic(pr->handle, &pr->id);
	if (ret)
		return ret;

	ret = arch_register_cpu(pr->id);
	if (ret) {
		acpi_unmap_lsapic(pr->id);
		return ret;
	}

	/*
	 * CPU got hot-added, but cpu_data is not initialized yet.  Set a flag
	 * to delay cpu_idle/throttling initialization and do it when the CPU
	 * gets online for the first time.
	 */
	pr_info("CPU%d has been hot-added\n", pr->id);
	pr->flags.need_hotplug_init = 1;
	return 0;
}
static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
{
	acpi_handle handle = pr->handle;

	if (!is_processor_present(handle)) {
		return AE_ERROR;
	}

	if (acpi_map_lsapic(handle, &pr->id))
		return AE_ERROR;

	if (arch_register_cpu(pr->id)) {
		acpi_unmap_lsapic(pr->id);
		return AE_ERROR;
	}

	/* CPU got hot-plugged, but cpu_data is not initialized yet
	 * Set flag to delay cpu_idle/throttling initialization
	 * in:
	 * acpi_processor_add()
	 *   acpi_processor_get_info()
	 * and do it when the CPU gets online the first time
	 * TBD: Cleanup above functions and try to do this more elegant.
	 */
	printk(KERN_INFO "CPU %d got hotplugged\n", pr->id);
	pr->flags.need_hotplug_init = 1;

	return AE_OK;
}
Пример #3
0
static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
{

	if (!is_processor_present(handle)) {
		return AE_ERROR;
	}

	if (acpi_map_lsapic(handle, p_cpu))
		return AE_ERROR;

	if (arch_register_cpu(*p_cpu)) {
		acpi_unmap_lsapic(*p_cpu);
		return AE_ERROR;
	}

	return AE_OK;
}
Пример #4
0
static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
{
	ACPI_FUNCTION_TRACE("acpi_processor_hotadd_init");

	if (!is_processor_present(handle)) {
		return_VALUE(AE_ERROR);
	}

	if (acpi_map_lsapic(handle, p_cpu))
		return_VALUE(AE_ERROR);

	if (arch_register_cpu(*p_cpu)) {
		acpi_unmap_lsapic(*p_cpu);
		return_VALUE(AE_ERROR);
	}

	return_VALUE(AE_OK);
}
static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr)
{
	acpi_handle handle = pr->handle;

	if (!is_processor_present(handle)) {
		return AE_ERROR;
	}

	if (acpi_map_lsapic(handle, &pr->id))
		return AE_ERROR;

	if (arch_register_cpu(pr->id)) {
		acpi_unmap_lsapic(pr->id);
		return AE_ERROR;
	}

	printk(KERN_INFO "CPU %d got hotplugged\n", pr->id);
	pr->flags.need_hotplug_init = 1;

	return AE_OK;
}