diff options
-rw-r--r-- | arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c | 6 | ||||
-rw-r--r-- | drivers/acpi/processor_perflib.c | 15 | ||||
-rw-r--r-- | drivers/cpufreq/cpufreq.c | 3 | ||||
-rw-r--r-- | include/linux/cpufreq.h | 1 |
4 files changed, 23 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c index 69288f653144..3233fe84d158 100644 --- a/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c +++ b/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c | |||
@@ -96,6 +96,12 @@ static int pmi_notifier(struct notifier_block *nb, | |||
96 | struct cpufreq_frequency_table *cbe_freqs; | 96 | struct cpufreq_frequency_table *cbe_freqs; |
97 | u8 node; | 97 | u8 node; |
98 | 98 | ||
99 | /* Should this really be called for CPUFREQ_ADJUST, CPUFREQ_INCOMPATIBLE | ||
100 | * and CPUFREQ_NOTIFY policy events?) | ||
101 | */ | ||
102 | if (event == CPUFREQ_START) | ||
103 | return 0; | ||
104 | |||
99 | cbe_freqs = cpufreq_frequency_get_table(policy->cpu); | 105 | cbe_freqs = cpufreq_frequency_get_table(policy->cpu); |
100 | node = cbe_cpu_to_node(policy->cpu); | 106 | node = cbe_cpu_to_node(policy->cpu); |
101 | 107 | ||
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index b4749969c6b4..e98071a64810 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -64,7 +64,13 @@ static DEFINE_MUTEX(performance_mutex); | |||
64 | * policy is adjusted accordingly. | 64 | * policy is adjusted accordingly. |
65 | */ | 65 | */ |
66 | 66 | ||
67 | static unsigned int ignore_ppc = 0; | 67 | /* ignore_ppc: |
68 | * -1 -> cpufreq low level drivers not initialized -> _PSS, etc. not called yet | ||
69 | * ignore _PPC | ||
70 | * 0 -> cpufreq low level drivers initialized -> consider _PPC values | ||
71 | * 1 -> ignore _PPC totally -> forced by user through boot param | ||
72 | */ | ||
73 | static unsigned int ignore_ppc = -1; | ||
68 | module_param(ignore_ppc, uint, 0644); | 74 | module_param(ignore_ppc, uint, 0644); |
69 | MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ | 75 | MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ |
70 | "limited by BIOS, this should help"); | 76 | "limited by BIOS, this should help"); |
@@ -72,7 +78,7 @@ MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \ | |||
72 | #define PPC_REGISTERED 1 | 78 | #define PPC_REGISTERED 1 |
73 | #define PPC_IN_USE 2 | 79 | #define PPC_IN_USE 2 |
74 | 80 | ||
75 | static int acpi_processor_ppc_status = 0; | 81 | static int acpi_processor_ppc_status; |
76 | 82 | ||
77 | static int acpi_processor_ppc_notifier(struct notifier_block *nb, | 83 | static int acpi_processor_ppc_notifier(struct notifier_block *nb, |
78 | unsigned long event, void *data) | 84 | unsigned long event, void *data) |
@@ -81,6 +87,11 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb, | |||
81 | struct acpi_processor *pr; | 87 | struct acpi_processor *pr; |
82 | unsigned int ppc = 0; | 88 | unsigned int ppc = 0; |
83 | 89 | ||
90 | if (event == CPUFREQ_START && ignore_ppc <= 0) { | ||
91 | ignore_ppc = 0; | ||
92 | return 0; | ||
93 | } | ||
94 | |||
84 | if (ignore_ppc) | 95 | if (ignore_ppc) |
85 | return 0; | 96 | return 0; |
86 | 97 | ||
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 8d6a3ff02672..8a67f16987db 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c | |||
@@ -825,6 +825,9 @@ static int cpufreq_add_dev(struct sys_device *sys_dev) | |||
825 | policy->user_policy.min = policy->cpuinfo.min_freq; | 825 | policy->user_policy.min = policy->cpuinfo.min_freq; |
826 | policy->user_policy.max = policy->cpuinfo.max_freq; | 826 | policy->user_policy.max = policy->cpuinfo.max_freq; |
827 | 827 | ||
828 | blocking_notifier_call_chain(&cpufreq_policy_notifier_list, | ||
829 | CPUFREQ_START, policy); | ||
830 | |||
828 | #ifdef CONFIG_SMP | 831 | #ifdef CONFIG_SMP |
829 | 832 | ||
830 | #ifdef CONFIG_HOTPLUG_CPU | 833 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 2270ca5ec631..6fd5668aa572 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -106,6 +106,7 @@ struct cpufreq_policy { | |||
106 | #define CPUFREQ_ADJUST (0) | 106 | #define CPUFREQ_ADJUST (0) |
107 | #define CPUFREQ_INCOMPATIBLE (1) | 107 | #define CPUFREQ_INCOMPATIBLE (1) |
108 | #define CPUFREQ_NOTIFY (2) | 108 | #define CPUFREQ_NOTIFY (2) |
109 | #define CPUFREQ_START (3) | ||
109 | 110 | ||
110 | #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */ | 111 | #define CPUFREQ_SHARED_TYPE_NONE (0) /* None */ |
111 | #define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */ | 112 | #define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */ |