Skip to content

Commit

Permalink
Pull cpuidle into test branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Len Brown committed Oct 10, 2007
2 parents 731aa5f + e196441 commit de85871
Show file tree
Hide file tree
Showing 23 changed files with 1,901 additions and 109 deletions.
2 changes: 2 additions & 0 deletions arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,8 @@ endif # APM

source "arch/i386/kernel/cpu/cpufreq/Kconfig"

source "drivers/cpuidle/Kconfig"

endmenu

menu "Bus options (PCI, PCMCIA, EISA, MCA, ISA)"
Expand Down
2 changes: 2 additions & 0 deletions arch/x86_64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,8 @@ source "drivers/acpi/Kconfig"

source "arch/x86_64/kernel/cpufreq/Kconfig"

source "drivers/cpuidle/Kconfig"

endmenu

menu "Bus options (PCI etc.)"
Expand Down
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ obj-$(CONFIG_MCA) += mca/
obj-$(CONFIG_EISA) += eisa/
obj-$(CONFIG_LGUEST_GUEST) += lguest/
obj-$(CONFIG_CPU_FREQ) += cpufreq/
obj-$(CONFIG_CPU_IDLE) += cpuidle/
obj-$(CONFIG_MMC) += mmc/
obj-$(CONFIG_NEW_LEDS) += leds/
obj-$(CONFIG_INFINIBAND) += infiniband/
Expand Down
8 changes: 0 additions & 8 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1042,14 +1042,6 @@ static int __init acpi_wake_gpes_always_on_setup(char *str)

__setup("acpi_wake_gpes_always_on", acpi_wake_gpes_always_on_setup);

/*
* max_cstate is defined in the base kernel so modules can
* change it w/o depending on the state of the processor module.
*/
unsigned int max_cstate = ACPI_PROCESSOR_MAX_POWER;

EXPORT_SYMBOL(max_cstate);

/*
* Acquire a spinlock.
*
Expand Down
22 changes: 17 additions & 5 deletions drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <linux/seq_file.h>
#include <linux/dmi.h>
#include <linux/moduleparam.h>
#include <linux/cpuidle.h>

#include <asm/io.h>
#include <asm/system.h>
Expand Down Expand Up @@ -1049,11 +1050,13 @@ static int __init acpi_processor_init(void)
return -ENOMEM;
acpi_processor_dir->owner = THIS_MODULE;

result = cpuidle_register_driver(&acpi_idle_driver);
if (result < 0)
goto out_proc;

result = acpi_bus_register_driver(&acpi_processor_driver);
if (result < 0) {
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
return result;
}
if (result < 0)
goto out_cpuidle;

acpi_processor_install_hotplug_notify();

Expand All @@ -1062,11 +1065,18 @@ static int __init acpi_processor_init(void)
acpi_processor_ppc_init();

return 0;

out_cpuidle:
cpuidle_unregister_driver(&acpi_idle_driver);

out_proc:
remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);

return result;
}

static void __exit acpi_processor_exit(void)
{

acpi_processor_ppc_exit();

acpi_thermal_cpufreq_exit();
Expand All @@ -1075,6 +1085,8 @@ static void __exit acpi_processor_exit(void)

acpi_bus_unregister_driver(&acpi_processor_driver);

cpuidle_unregister_driver(&acpi_idle_driver);

remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);

return;
Expand Down
Loading

0 comments on commit de85871

Please sign in to comment.