ia64/linux-2.6.18-xen.hg

diff drivers/acpi/processor_core.c @ 531:3c564f80f2ef

Notify ACPI processor events to external logic, including C/P/T and hotplug, etc.

Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu May 01 10:52:31 2008 +0100 (2008-05-01)
parents 831230e53067
children d62d60eaba6e
line diff
     1.1 --- a/drivers/acpi/processor_core.c	Thu May 01 10:52:06 2008 +0100
     1.2 +++ b/drivers/acpi/processor_core.c	Thu May 01 10:52:31 2008 +0100
     1.3 @@ -564,6 +564,10 @@ static int acpi_processor_start(struct a
     1.4  
     1.5  	acpi_processor_power_init(pr, device);
     1.6  
     1.7 +#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
     1.8 +	processor_extcntl_init(pr);
     1.9 +#endif
    1.10 +
    1.11  	if (pr->flags.throttling) {
    1.12  		printk(KERN_INFO PREFIX "%s [%s] (supports",
    1.13  		       acpi_device_name(device), acpi_device_bid(device));
    1.14 @@ -710,6 +714,10 @@ int acpi_processor_device_add(acpi_handl
    1.15  	if (!pr)
    1.16  		return -ENODEV;
    1.17  
    1.18 +	if (processor_cntl_external())
    1.19 +		processor_notify_external(pr,
    1.20 +			PROCESSOR_HOTPLUG, HOTPLUG_TYPE_ADD);
    1.21 +
    1.22  	if ((pr->id >= 0) && (pr->id < NR_CPUS)) {
    1.23  		kobject_uevent(&(*device)->kobj, KOBJ_ONLINE);
    1.24  	}
    1.25 @@ -748,6 +756,10 @@ acpi_processor_hotplug_notify(acpi_handl
    1.26  			break;
    1.27  		}
    1.28  
    1.29 +		if (processor_cntl_external())
    1.30 +			processor_notify_external(pr,
    1.31 +					PROCESSOR_HOTPLUG, HOTPLUG_TYPE_ADD);
    1.32 +
    1.33  		if (pr->id >= 0 && (pr->id < NR_CPUS)) {
    1.34  			kobject_uevent(&device->kobj, KOBJ_OFFLINE);
    1.35  			break;
    1.36 @@ -779,6 +791,11 @@ acpi_processor_hotplug_notify(acpi_handl
    1.37  
    1.38  		if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
    1.39  			kobject_uevent(&device->kobj, KOBJ_OFFLINE);
    1.40 +
    1.41 +		if (processor_cntl_external())
    1.42 +			processor_notify_external(pr, PROCESSOR_HOTPLUG,
    1.43 +							HOTPLUG_TYPE_REMOVE);
    1.44 +
    1.45  		break;
    1.46  	default:
    1.47  		ACPI_DEBUG_PRINT((ACPI_DB_INFO,