Skip to content

Commit

Permalink
[CPUFREQ] powernow-k8: check space_id of _PCT registers to be FFH
Browse files Browse the repository at this point in the history
The powernow-k8 driver checks to see that the Performance Control/Status
Registers are declared as FFH (functional fixed hardware) by the BIOS.
However, this check got broken in the commit:
 0e64a0c
 [CPUFREQ] checkpatch cleanups for powernow-k8

Fix based on an original patch from Naga Chumbalkar.

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
Cc: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
Dave Jones authored and Dave Jones committed Jun 5, 2009
1 parent edaba2c commit 2c701b1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions arch/x86/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
{
struct cpufreq_frequency_table *powernow_table;
int ret_val = -ENODEV;
acpi_integer space_id;
acpi_integer control, status;

if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) {
dprintk("register performance failed: bad ACPI data\n");
Expand All @@ -848,12 +848,13 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
goto err_out;
}

space_id = data->acpi_data.control_register.space_id;
if ((space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
(space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
control = data->acpi_data.control_register.space_id;
status = data->acpi_data.status_register.space_id;

if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) ||
(status != ACPI_ADR_SPACE_FIXED_HARDWARE)) {
dprintk("Invalid control/status registers (%x - %x)\n",
data->acpi_data.control_register.space_id,
space_id);
control, status);
goto err_out;
}

Expand Down

0 comments on commit 2c701b1

Please sign in to comment.