Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106994
b: refs/heads/master
c: a1531ac
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Renninger authored and Linus Torvalds committed Jul 30, 2008
1 parent 0c77a1c commit 9377ad2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a4e564b7db999fbe5d88318c96ac8747699d417
refs/heads/master: a1531acd43310a7e4571d52e8846640667f4c74b
6 changes: 6 additions & 0 deletions trunk/arch/powerpc/platforms/cell/cbe_cpufreq_pmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ static int pmi_notifier(struct notifier_block *nb,
struct cpufreq_frequency_table *cbe_freqs;
u8 node;

/* Should this really be called for CPUFREQ_ADJUST, CPUFREQ_INCOMPATIBLE
* and CPUFREQ_NOTIFY policy events?)
*/
if (event == CPUFREQ_START)
return 0;

cbe_freqs = cpufreq_frequency_get_table(policy->cpu);
node = cbe_cpu_to_node(policy->cpu);

Expand Down
15 changes: 13 additions & 2 deletions trunk/drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,21 @@ static DEFINE_MUTEX(performance_mutex);
* policy is adjusted accordingly.
*/

static unsigned int ignore_ppc = 0;
/* ignore_ppc:
* -1 -> cpufreq low level drivers not initialized -> _PSS, etc. not called yet
* ignore _PPC
* 0 -> cpufreq low level drivers initialized -> consider _PPC values
* 1 -> ignore _PPC totally -> forced by user through boot param
*/
static unsigned int ignore_ppc = -1;
module_param(ignore_ppc, uint, 0644);
MODULE_PARM_DESC(ignore_ppc, "If the frequency of your machine gets wrongly" \
"limited by BIOS, this should help");

#define PPC_REGISTERED 1
#define PPC_IN_USE 2

static int acpi_processor_ppc_status = 0;
static int acpi_processor_ppc_status;

static int acpi_processor_ppc_notifier(struct notifier_block *nb,
unsigned long event, void *data)
Expand All @@ -81,6 +87,11 @@ static int acpi_processor_ppc_notifier(struct notifier_block *nb,
struct acpi_processor *pr;
unsigned int ppc = 0;

if (event == CPUFREQ_START && ignore_ppc <= 0) {
ignore_ppc = 0;
return 0;
}

if (ignore_ppc)
return 0;

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,9 @@ static int cpufreq_add_dev(struct sys_device *sys_dev)
policy->user_policy.min = policy->cpuinfo.min_freq;
policy->user_policy.max = policy->cpuinfo.max_freq;

blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
CPUFREQ_START, policy);

#ifdef CONFIG_SMP

#ifdef CONFIG_HOTPLUG_CPU
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ struct cpufreq_policy {
#define CPUFREQ_ADJUST (0)
#define CPUFREQ_INCOMPATIBLE (1)
#define CPUFREQ_NOTIFY (2)
#define CPUFREQ_START (3)

#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
Expand Down

0 comments on commit 9377ad2

Please sign in to comment.