lkml.org 
[lkml]   [2003]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch] Make prof_counter use per-cpu areas patch 3/4 -- x86_64 arch
On Mon, Jan 13, 2003 at 04:21:10PM +0100, Andi Kleen wrote:
> On Mon, Jan 13, 2003 at 06:06:02PM +0530, Ravikiran G Thirumalai wrote:
> > This one's for x86_64
>
> Thanks, applied.
>
> -Andi

Please apply this over the earlier patch. As Andrew pointed out,
the above patch will cause crashes when per-cpu areas are modified to
allocate for cpu_possible cpus only.

Reinit of prof_counter/prof_multiplier/prof_old_multiplier seems to be
redundant (They are already statically inited). Similar patch worked
for x86 for me.

Thanks,
Kiran


diff -ruN -X dontdiff linux-2.5.58/arch/x86_64/kernel/smpboot.c prof_counter-2.5.58/arch/x86_64/kernel/smpboot.c
--- linux-2.5.58/arch/x86_64/kernel/smpboot.c Thu Jan 16 17:01:18 2003
+++ prof_counter-2.5.58/arch/x86_64/kernel/smpboot.c Thu Jan 16 16:59:58 2003
@@ -772,24 +772,16 @@
* Cycle through the processors sending APIC IPIs to boot each.
*/

-extern int prof_multiplier[NR_CPUS];
-extern int prof_old_multiplier[NR_CPUS];
-DECLARE_PER_CPU(int, prof_counter);
-
static void __init smp_boot_cpus(unsigned int max_cpus)
{
int apicid, cpu;

/*
* Initialize the logical to physical CPU number mapping
- * and the per-CPU profiling counter/multiplier
*/

for (apicid = 0; apicid < NR_CPUS; apicid++) {
x86_apicid_to_cpu[apicid] = -1;
- per_cpu(prof_counter, apicid) = 1;
- prof_old_multiplier[apicid] = 1;
- prof_multiplier[apicid] = 1;
}

/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.355 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site