lkml.org 
[lkml]   [2003]   [Jan]   [13]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateMon, 13 Jan 2003 18:03:23 +0530
FromRavikiran G Thirumalai <>
SubjectRe: [patch] Make prof_counter use per-cpu areas patch 2/4 -- ppc arch
This one's for ppc.


diff -ruN -X dontdiff linux-2.5.55/arch/ppc/kernel/smp.c prof_counter-2.5.55/arch/ppc/kernel/smp.c
--- linux-2.5.55/arch/ppc/kernel/smp.c	Thu Jan  9 09:34:25 2003
+++ prof_counter-2.5.55/arch/ppc/kernel/smp.c	Mon Jan 13 14:20:04 2003
@@ -45,7 +45,7 @@
 atomic_t ipi_recv;
 atomic_t ipi_sent;
 unsigned int prof_multiplier[NR_CPUS] = { [1 ... NR_CPUS-1] = 1 };
-unsigned int prof_counter[NR_CPUS] = { [1 ... NR_CPUS-1] = 1 };
+DEFINE_PER_CPU(unsigned int, prof_counter) = 1;
 unsigned long cache_decay_ticks = HZ/100;
 unsigned long cpu_online_map = 1UL;
 unsigned long cpu_possible_map = 1UL;
@@ -90,9 +90,9 @@
 {
 	int cpu = smp_processor_id();
 
-	if (!--prof_counter[cpu]) {
+	if (!--per_cpu(prof_counter, cpu)) {
 		update_process_times(user_mode(regs));
-		prof_counter[cpu]=prof_multiplier[cpu];
+		per_cpu(prof_counter, cpu)=prof_multiplier[cpu];
 	}
 }
 
-
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 12:32    [from the cache]
©2003-2008