Commit f8f47d4c authored by Philippe Gerum's avatar Philippe Gerum

clockevents: ipipe: connect clock chips to abstract tick device

Announce all clock event chips as they are registered to the
out-of-band tick device infrastructure, so that we can interpose on
key handlers in their descriptors.
parent 79db6170
......@@ -129,6 +129,15 @@ struct clock_event_device {
const struct cpumask *cpumask;
struct list_head list;
struct module *owner;
#ifdef CONFIG_IPIPE
struct ipipe_timer *ipipe_timer;
unsigned ipipe_stolen;
#define clockevent_ipipe_stolen(evt) ((evt)->ipipe_stolen)
#else
#define clockevent_ipipe_stolen(evt) (0)
#endif /* !CONFIG_IPIPE */
} ____cacheline_aligned;
/* Helpers to verify state of a clockevent device */
......
......@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/smp.h>
#include <linux/device.h>
#include <linux/ipipe_tickdev.h>
#include "tick-internal.h"
......@@ -458,6 +459,8 @@ void clockevents_register_device(struct clock_event_device *dev)
/* Initialize state to DETACHED */
clockevent_set_state(dev, CLOCK_EVT_STATE_DETACHED);
ipipe_host_timer_register(dev);
if (!dev->cpumask) {
WARN_ON(num_possible_cpus() > 1);
dev->cpumask = cpumask_of(smp_processor_id());
......
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