Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 295762
b: refs/heads/master
c: d457859
h: refs/heads/master
v: v3
  • Loading branch information
Marc Zyngier committed Mar 13, 2012
1 parent 6bce483 commit 7127bd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 44 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ca709c16d0fb88b86db35e958b165b61cbc1962
refs/heads/master: d45785929f1248d2e769f959f180f0504e326622
26 changes: 0 additions & 26 deletions trunk/arch/arm/include/asm/localtimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,12 @@ struct local_timer_ops {
void (*stop)(struct clock_event_device *);
};

/*
* Setup a per-cpu timer, whether it be a local timer or dummy broadcast
*/
void percpu_timer_setup(void);

#ifdef CONFIG_LOCAL_TIMERS
/*
* Stop the local timer
*/
void local_timer_stop(struct clock_event_device *);

/*
* Setup a local timer interrupt for a CPU.
*/
int local_timer_setup(struct clock_event_device *);

/*
* Register a local timer driver
*/
int local_timer_register(struct local_timer_ops *);

#else

static inline int local_timer_setup(struct clock_event_device *evt)
{
return -ENXIO;
}

static inline void local_timer_stop(struct clock_event_device *evt)
{
}

static inline int local_timer_register(struct local_timer_ops *ops)
{
return -ENXIO;
Expand Down
23 changes: 6 additions & 17 deletions trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ static void __cpuinit smp_store_cpu_info(unsigned int cpuid)
store_cpu_topology(cpuid);
}

static void percpu_timer_setup(void);

/*
* This is the secondary CPU boot entry. We're using this CPUs
* idle thread stack, but a set of temporary page tables.
Expand Down Expand Up @@ -472,29 +474,15 @@ int local_timer_register(struct local_timer_ops *ops)
}
#endif

int __cpuinit __attribute__ ((weak)) local_timer_setup(struct clock_event_device *clk)
{
if (lt_ops)
return lt_ops->setup(clk);

return -ENXIO;
}

void __attribute__ ((weak)) local_timer_stop(struct clock_event_device *clk)
{
if (lt_ops)
lt_ops->stop(clk);
}

void __cpuinit percpu_timer_setup(void)
static void __cpuinit percpu_timer_setup(void)
{
unsigned int cpu = smp_processor_id();
struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);

evt->cpumask = cpumask_of(cpu);
evt->broadcast = smp_timer_broadcast;

if (local_timer_setup(evt))
if (!lt_ops || lt_ops->setup(evt))
broadcast_timer_setup(evt);
}

Expand All @@ -509,7 +497,8 @@ static void percpu_timer_stop(void)
unsigned int cpu = smp_processor_id();
struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);

local_timer_stop(evt);
if (lt_ops)
lt_ops->stop(evt);
}
#endif

Expand Down

0 comments on commit 7127bd4

Please sign in to comment.