aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>2006-06-26 00:34:43 -0400
committerLen Brown <len.brown@intel.com>2006-06-26 00:34:43 -0400
commit46f18e3a28295a9e11a6ffa4478241c19bc93735 (patch)
treef563b12a18cadd6583925ce1dbc3bc79538ac866
parent3448097fccdce4ea8f0fcad4f37f502a8cd72e68 (diff)
ACPI: HW P-state coordination support
Treat HW coordination as independent CPUs. This enables per-cpu monintoring of P-states http://bugzilla.kernel.org/show_bug.cgi?id=5737 Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c8
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c8
-rw-r--r--drivers/acpi/processor_perflib.c8
-rw-r--r--include/linux/cpufreq.h6
4 files changed, 22 insertions, 8 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 5fd65325b81a..cf0ddc9ee0cd 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -418,8 +418,14 @@ acpi_cpufreq_cpu_init (
418 goto err_free; 418 goto err_free;
419 419
420 perf = data->acpi_data; 420 perf = data->acpi_data;
421 policy->cpus = perf->shared_cpu_map;
422 policy->shared_type = perf->shared_type; 421 policy->shared_type = perf->shared_type;
422 /*
423 * Will let policy->cpus know about dependency only when software
424 * coordination is required.
425 */
426 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
427 policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
428 policy->cpus = perf->shared_cpu_map;
423 429
424 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) { 430 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) {
425 acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; 431 acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS;
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index f7e4356f6820..8d765509ef59 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -399,8 +399,14 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
399 dprintk(PFX "obtaining ACPI data failed\n"); 399 dprintk(PFX "obtaining ACPI data failed\n");
400 return -EIO; 400 return -EIO;
401 } 401 }
402 policy->cpus = p->shared_cpu_map;
403 policy->shared_type = p->shared_type; 402 policy->shared_type = p->shared_type;
403 /*
404 * Will let policy->cpus know about dependency only when software
405 * coordination is required.
406 */
407 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
408 policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
409 policy->cpus = p->shared_cpu_map;
404 410
405 /* verify the acpi_data */ 411 /* verify the acpi_data */
406 if (p->state_count <= 1) { 412 if (p->state_count <= 1) {
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 41aaaba74b19..299fbbb07e0e 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -698,12 +698,12 @@ int acpi_processor_preregister_performance(
698 /* Validate the Domain info */ 698 /* Validate the Domain info */
699 count_target = pdomain->num_processors; 699 count_target = pdomain->num_processors;
700 count = 1; 700 count = 1;
701 if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL || 701 if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL)
702 pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL) {
703 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; 702 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL;
704 } else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY) { 703 else if (pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL)
704 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_HW;
705 else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY)
705 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY; 706 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY;
706 }
707 707
708 for_each_possible_cpu(j) { 708 for_each_possible_cpu(j) {
709 if (i == j) 709 if (i == j)
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 466fbe9e4899..35e137636b0b 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -100,8 +100,10 @@ struct cpufreq_policy {
100#define CPUFREQ_INCOMPATIBLE (1) 100#define CPUFREQ_INCOMPATIBLE (1)
101#define CPUFREQ_NOTIFY (2) 101#define CPUFREQ_NOTIFY (2)
102 102
103#define CPUFREQ_SHARED_TYPE_ALL (0) /* All dependent CPUs should set freq */ 103#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
104#define CPUFREQ_SHARED_TYPE_ANY (1) /* Freq can be set from any dependent CPU */ 104#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
105#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
106#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
105 107
106/******************** cpufreq transition notifiers *******************/ 108/******************** cpufreq transition notifiers *******************/
107 109