[ACPI] enable C2 and C3 idle power states on SMP

http://bugzilla.kernel.org/show_bug.cgi?id=4401

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Venkatesh Pallipadi 2005-04-15 15:07:10 -04:00 committed by Len Brown
parent 17e9c78a75
commit 02df8b9385
10 changed files with 284 additions and 81 deletions

View file

@ -4,6 +4,8 @@
#include <linux/kernel.h>
#include <linux/config.h>
#include <asm/acpi.h>
#define ACPI_PROCESSOR_BUSY_METRIC 10
#define ACPI_PROCESSOR_MAX_POWER 8
@ -14,6 +16,8 @@
#define ACPI_PROCESSOR_MAX_THROTTLE 250 /* 25% */
#define ACPI_PROCESSOR_MAX_DUTY_WIDTH 4
#define ACPI_PDC_REVISION_ID 0x1
/* Power Management */
struct acpi_processor_cx;
@ -59,6 +63,9 @@ struct acpi_processor_power {
u32 bm_activity;
int count;
struct acpi_processor_cx states[ACPI_PROCESSOR_MAX_POWER];
/* the _PDC objects passed by the driver, if any */
struct acpi_object_list *pdc;
};
/* Performance Management */
@ -82,8 +89,6 @@ struct acpi_processor_px {
acpi_integer status; /* success indicator */
};
#define ACPI_PDC_REVISION_ID 0x1
struct acpi_processor_performance {
unsigned int state;
unsigned int platform_limit;
@ -179,7 +184,32 @@ int acpi_processor_notify_smm(struct module *calling_module);
extern struct acpi_processor *processors[NR_CPUS];
extern struct acpi_processor_errata errata;
int acpi_processor_set_pdc(struct acpi_processor *pr,
struct acpi_object_list *pdc_in);
#ifdef ARCH_HAS_POWER_PDC_INIT
void acpi_processor_power_init_pdc(struct acpi_processor_power *pow,
unsigned int cpu);
void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags,
unsigned int cpu);
#else
static inline void acpi_processor_power_init_pdc(
struct acpi_processor_power *pow, unsigned int cpu)
{
pow->pdc = NULL;
return;
}
static inline void acpi_processor_power_init_bm_check(
struct acpi_processor_flags *flags, unsigned int cpu)
{
flags->bm_check = 1;
return;
}
#endif
/* in processor_perflib.c */
#ifdef CONFIG_CPU_FREQ
void acpi_processor_ppc_init(void);
void acpi_processor_ppc_exit(void);