Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362756
b: refs/heads/master
c: ef35a4e
h: refs/heads/master
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Apr 16, 2013
1 parent d5c5757 commit 7dda497
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: 94032c506720e26402db64987e08168565b57990
refs/heads/master: ef35a4e6d9eef3bd904b8c6b85618a2e878e801e
7 changes: 5 additions & 2 deletions trunk/arch/x86/xen/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ static const struct clock_event_device xen_vcpuop_clockevent = {

static const struct clock_event_device *xen_clockevent =
&xen_timerop_clockevent;
static DEFINE_PER_CPU(struct clock_event_device, xen_clock_events);
static DEFINE_PER_CPU(struct clock_event_device, xen_clock_events) = { .irq = -1 };

static irqreturn_t xen_timer_interrupt(int irq, void *dev_id)
{
Expand All @@ -401,6 +401,9 @@ void xen_setup_timer(int cpu)
struct clock_event_device *evt;
int irq;

evt = &per_cpu(xen_clock_events, cpu);
WARN(evt->irq >= 0, "IRQ%d for CPU%d is already allocated\n", evt->irq, cpu);

printk(KERN_INFO "installing Xen timer for CPU %d\n", cpu);

name = kasprintf(GFP_KERNEL, "timer%d", cpu);
Expand All @@ -413,7 +416,6 @@ void xen_setup_timer(int cpu)
IRQF_FORCE_RESUME,
name, NULL);

evt = &per_cpu(xen_clock_events, cpu);
memcpy(evt, xen_clockevent, sizeof(*evt));

evt->cpumask = cpumask_of(cpu);
Expand All @@ -426,6 +428,7 @@ void xen_teardown_timer(int cpu)
BUG_ON(cpu == 0);
evt = &per_cpu(xen_clock_events, cpu);
unbind_from_irqhandler(evt->irq, NULL);
evt->irq = -1;
}

void xen_setup_cpu_clockevents(void)
Expand Down

0 comments on commit 7dda497

Please sign in to comment.