[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:
committed by
Len Brown
parent
17e9c78a75
commit
02df8b9385
29
include/acpi/pdc_intel.h
Normal file
29
include/acpi/pdc_intel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
/* _PDC bit definition for Intel processors */
|
||||
|
||||
#ifndef __PDC_INTEL_H__
|
||||
#define __PDC_INTEL_H__
|
||||
|
||||
#define ACPI_PDC_P_FFH (0x0001)
|
||||
#define ACPI_PDC_C_C1_HALT (0x0002)
|
||||
#define ACPI_PDC_T_FFH (0x0004)
|
||||
#define ACPI_PDC_SMP_C1PT (0x0008)
|
||||
#define ACPI_PDC_SMP_C2C3 (0x0010)
|
||||
#define ACPI_PDC_SMP_P_SWCOORD (0x0020)
|
||||
#define ACPI_PDC_SMP_C_SWCOORD (0x0040)
|
||||
#define ACPI_PDC_SMP_T_SWCOORD (0x0080)
|
||||
#define ACPI_PDC_C_C1_FFH (0x0100)
|
||||
|
||||
|
||||
#define ACPI_PDC_EST_CAPABILITY_SMP (ACPI_PDC_SMP_C1PT | \
|
||||
ACPI_PDC_C_C1_HALT)
|
||||
|
||||
#define ACPI_PDC_EST_CAPABILITY_SMP_MSR (ACPI_PDC_EST_CAPABILITY_SMP | \
|
||||
ACPI_PDC_P_FFH)
|
||||
|
||||
#define ACPI_PDC_C_CAPABILITY_SMP (ACPI_PDC_SMP_C2C3 | \
|
||||
ACPI_PDC_SMP_C1PT | \
|
||||
ACPI_PDC_C_C1_HALT)
|
||||
|
||||
#endif /* __PDC_INTEL_H__ */
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user