Commit ff341227 authored by Tom Rini's avatar Tom Rini Committed by Linus Torvalds

[PATCH] ppc32: update_process_times simplification

When the update_process_times call was moved out of do_timer for the UP case,
the replicator didn't track down the hiding and just added ifndef SMP.

This removes the ifdefs and the indirection of calling another file for one
function in a third file.

I also removed the per-cpu multipler and counter.  On some architectures (x86
and sparc64) these are set via /proc/profile setup_profiling_timer to increase
the timer interrupt by a factor over HZ.  However, this was not not
implemented for ppc (like several other architectures), so it was just
decrementing, testing, and setting per-cpu variables back to 1.
Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent add6ab5b
...@@ -42,8 +42,6 @@ struct cpuinfo_PPC cpu_data[NR_CPUS]; ...@@ -42,8 +42,6 @@ struct cpuinfo_PPC cpu_data[NR_CPUS];
struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 }; struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 };
atomic_t ipi_recv; atomic_t ipi_recv;
atomic_t ipi_sent; atomic_t ipi_sent;
DEFINE_PER_CPU(unsigned int, prof_multiplier);
DEFINE_PER_CPU(unsigned int, prof_counter);
unsigned long cache_decay_ticks = HZ/100; unsigned long cache_decay_ticks = HZ/100;
cpumask_t cpu_online_map; cpumask_t cpu_online_map;
cpumask_t cpu_possible_map; cpumask_t cpu_possible_map;
...@@ -88,16 +86,6 @@ smp_message_pass(int target, int msg, unsigned long data, int wait) ...@@ -88,16 +86,6 @@ smp_message_pass(int target, int msg, unsigned long data, int wait)
/* /*
* Common functions * Common functions
*/ */
void smp_local_timer_interrupt(struct pt_regs * regs)
{
int cpu = smp_processor_id();
if (!--per_cpu(prof_counter, cpu)) {
update_process_times(user_mode(regs));
per_cpu(prof_counter, cpu) = per_cpu(prof_multiplier, cpu);
}
}
void smp_message_recv(int msg, struct pt_regs *regs) void smp_message_recv(int msg, struct pt_regs *regs)
{ {
atomic_inc(&ipi_recv); atomic_inc(&ipi_recv);
...@@ -296,8 +284,6 @@ static void __devinit smp_store_cpu_info(int id) ...@@ -296,8 +284,6 @@ static void __devinit smp_store_cpu_info(int id)
/* assume bogomips are same for everything */ /* assume bogomips are same for everything */
c->loops_per_jiffy = loops_per_jiffy; c->loops_per_jiffy = loops_per_jiffy;
c->pvr = mfspr(PVR); c->pvr = mfspr(PVR);
per_cpu(prof_counter, id) = 1;
per_cpu(prof_multiplier, id) = 1;
} }
void __init smp_prepare_cpus(unsigned int max_cpus) void __init smp_prepare_cpus(unsigned int max_cpus)
......
...@@ -142,6 +142,7 @@ void timer_interrupt(struct pt_regs * regs) ...@@ -142,6 +142,7 @@ void timer_interrupt(struct pt_regs * regs)
jiffy_stamp += tb_ticks_per_jiffy; jiffy_stamp += tb_ticks_per_jiffy;
profile_tick(CPU_PROFILING, regs); profile_tick(CPU_PROFILING, regs);
update_process_times(user_mode(regs));
if (smp_processor_id()) if (smp_processor_id())
continue; continue;
...@@ -150,9 +151,6 @@ void timer_interrupt(struct pt_regs * regs) ...@@ -150,9 +151,6 @@ void timer_interrupt(struct pt_regs * regs)
write_seqlock(&xtime_lock); write_seqlock(&xtime_lock);
tb_last_stamp = jiffy_stamp; tb_last_stamp = jiffy_stamp;
do_timer(regs); do_timer(regs);
#ifndef CONFIG_SMP
update_process_times(user_mode(regs));
#endif
/* /*
* update the rtc when needed, this should be performed on the * update the rtc when needed, this should be performed on the
...@@ -186,10 +184,6 @@ void timer_interrupt(struct pt_regs * regs) ...@@ -186,10 +184,6 @@ void timer_interrupt(struct pt_regs * regs)
set_dec(next_dec); set_dec(next_dec);
last_jiffy_stamp(cpu) = jiffy_stamp; last_jiffy_stamp(cpu) = jiffy_stamp;
#ifdef CONFIG_SMP
smp_local_timer_interrupt(regs);
#endif /* CONFIG_SMP */
if (ppc_md.heartbeat && !ppc_md.heartbeat_count--) if (ppc_md.heartbeat && !ppc_md.heartbeat_count--)
ppc_md.heartbeat(); ppc_md.heartbeat();
......
...@@ -40,7 +40,6 @@ extern void smp_send_tlb_invalidate(int); ...@@ -40,7 +40,6 @@ extern void smp_send_tlb_invalidate(int);
extern void smp_send_xmon_break(int cpu); extern void smp_send_xmon_break(int cpu);
struct pt_regs; struct pt_regs;
extern void smp_message_recv(int, struct pt_regs *); extern void smp_message_recv(int, struct pt_regs *);
extern void smp_local_timer_interrupt(struct pt_regs *);
#define NO_PROC_ID 0xFF /* No processor magic marker */ #define NO_PROC_ID 0xFF /* No processor magic marker */
#define PROC_CHANGE_PENALTY 20 #define PROC_CHANGE_PENALTY 20
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment