Skip to contentSkip to conversation

Report the number of processors in PowerNow-k8 correctly [2/2]

PATCH In review Mark Langsdorf 2 participants 4 messages Mar 27, 2007 – Apr 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Report the number of processors in PowerNow-k8 correctly [2/2]

The PowerNow! driver for Opteron reports the number of cores in the system, but claims to report the number of processors. Fix this minor cosmetic bug.

arch/i386/kernel/cpu/cpufreq/powernow-k8.c renamed from arch/i386/kernel/cpu/cpufreq/powernow-k8.c.orig +0 -0
@@ -840,7 +840,8 @@ static int powernow_k8_cpu_init_acpi(str
 
	/* fill in data */
	data->numps = data->acpi_data.state_count;
-	print_basics(data);
+	if (first_cpu(cpu_core_map[data->cpu]) == data->cpu)
+		print_basics(data);
	powernow_k8_acpi_pst_values(data, 0);

	/* notify BIOS that we exist */
#1 lore raw
Quoted 12 lines · Mark Langsdorf

The PowerNow! driver for Opteron reports the number of cores in the system, but claims to report the number of processors. Fix this minor cosmetic bug.

--- linux-2.6.18.x86_64/arch/i386/kernel/cpu/cpufreq/powernow-k8.c.orig

2007-03-22 16:13:04.630175768 -0500
+++ linux-2.6.18.x86_64/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 
2007-03-22 16:19:40.153047152 -0500

Review static int powernow_k8_cpu_init_acpi(str · line 847

Quoted 9 lines
(quoted diff) +2 -1
@@ -840,7 +840,8 @@ static int powernow_k8_cpu_init_acpi(str
 
 	/* fill in data */
 	data->numps = data->acpi_data.state_count;
-	print_basics(data);
+	if (first_cpu(cpu_core_map[data->cpu]) == data->cpu)
+		print_basics(data);
 	powernow_k8_acpi_pst_values(data, 0);
 
 	/* notify BIOS that we exist */

Back from vacation..

I rolled both of these together into the same diff, as they're both the same changelog, so it doesn't make a huge amount of sense to me to have them as separate commits.
But sadly..

(16:23:19:davej@hera:cpufreq)$ git-applymbox -k ~/Mail/mbox 
1 patch(es) to process.

Applying '[CPUFREQ] Report the number of processors in PowerNow-k8 correctly'

error: i386/kernel/cpu/cpufreq/powernow-k8.c: does not exist in index

Bah.. some hand fixing up of the path in the diff later..

(16:23:28:davej@hera:cpufreq)$ vim ~/Mail/mbox 
(16:23:41:davej@hera:cpufreq)$ git-applymbox -k ~/Mail/mbox 
1 patch(es) to process.

Applying '[CPUFREQ] Report the number of processors in PowerNow-k8 correctly'

error: patch failed: arch/i386/kernel/cpu/cpufreq/powernow-k8.c:661
error: arch/i386/kernel/cpu/cpufreq/powernow-k8.c: patch does not apply

I give up..

Dave

Signature · 1 line
http://www.codemonkey.org.uk
author Acked-by
#2 lore raw

Re: [PATCH][retry 2] Report the number of processors in PowerNow-k8 correctly

I hope you had a good vacation.

Quoted 4 lines

Applying '[CPUFREQ] Report the number of processors in PowerNow-k8 correctly'

error: patch failed: arch/i386/kernel/cpu/cpufreq/powernow-k8.c:661
error: arch/i386/kernel/cpu/cpufreq/powernow-k8.c: patch does not apply

Weird. I'm not doing anything complicated. Consolidated patch below.

The PowerNow! driver for Opteron reports the number of cores in the system, but claims to report the number of processors. Fix this minor cosmetic bug.

arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2007-04-05 15:45:03.000000000 -0500 renamed from arch/i386/kernel/cpu/cpufreq/powernow-k8.c.old 2007-04-05 15:43:36.000000000 -0500 +4 -2
@@ -661,7 +661,8 @@ static int fill_powernow_table(struct po
 
   dprintk("cfid 0x%x, cvid 0x%x\n", data->currfid, data->currvid);
   data->powernow_table = powernow_table;
-  print_basics(data);
+  if (first_cpu(cpu_core_map[data->cpu]) == data->cpu)
+       print_basics(data);
 
   for (j = 0; j < data->numps; j++)
        if ((pst[j].fid==data->currfid) && (pst[j].vid==data->currvid))
@@ -814,7 +815,8 @@ static int powernow_k8_cpu_init_acpi(str
 
   /* fill in data */
   data->numps = data->acpi_data.state_count;
-  print_basics(data);
+  if (first_cpu(cpu_core_map[data->cpu]) == data->cpu)
+       print_basics(data);
   powernow_k8_acpi_pst_values(data, 0);
 
   /* notify BIOS that we exist */
#3 lore raw

Re: [PATCH][retry 2] Report the number of processors in PowerNow-k8 correctly

Quoted 9 lines · Mark Langsdorf

I hope you had a good vacation.

Quoted 5 lines

Applying '[CPUFREQ] Report the number of processors in PowerNow-k8 correctly'

error: patch failed: arch/i386/kernel/cpu/cpufreq/powernow-k8.c:661
error: arch/i386/kernel/cpu/cpufreq/powernow-k8.c: patch does not apply

Weird. I'm not doing anything complicated. Consolidated patch below.

It's thunderbird. It's changing tabs to spaces.

Dave

Signature · 1 line
http://www.codemonkey.org.uk