aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/clockchips.h16
-rw-r--r--include/linux/hrtimer.h4
-rw-r--r--include/linux/sched.h6
-rw-r--r--include/linux/workqueue.h2
4 files changed, 22 insertions, 6 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 493aa021c7a9..2e4cb67f6e56 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -62,6 +62,11 @@ enum clock_event_mode {
62#define CLOCK_EVT_FEAT_DYNIRQ 0x000020 62#define CLOCK_EVT_FEAT_DYNIRQ 0x000020
63#define CLOCK_EVT_FEAT_PERCPU 0x000040 63#define CLOCK_EVT_FEAT_PERCPU 0x000040
64 64
65/*
66 * Clockevent device is based on a hrtimer for broadcast
67 */
68#define CLOCK_EVT_FEAT_HRTIMER 0x000080
69
65/** 70/**
66 * struct clock_event_device - clock event device descriptor 71 * struct clock_event_device - clock event device descriptor
67 * @event_handler: Assigned by the framework to be called by the low 72 * @event_handler: Assigned by the framework to be called by the low
@@ -83,6 +88,7 @@ enum clock_event_mode {
83 * @name: ptr to clock event name 88 * @name: ptr to clock event name
84 * @rating: variable to rate clock event devices 89 * @rating: variable to rate clock event devices
85 * @irq: IRQ number (only for non CPU local devices) 90 * @irq: IRQ number (only for non CPU local devices)
91 * @bound_on: Bound on CPU
86 * @cpumask: cpumask to indicate for which CPUs this device works 92 * @cpumask: cpumask to indicate for which CPUs this device works
87 * @list: list head for the management code 93 * @list: list head for the management code
88 * @owner: module reference 94 * @owner: module reference
@@ -113,6 +119,7 @@ struct clock_event_device {
113 const char *name; 119 const char *name;
114 int rating; 120 int rating;
115 int irq; 121 int irq;
122 int bound_on;
116 const struct cpumask *cpumask; 123 const struct cpumask *cpumask;
117 struct list_head list; 124 struct list_head list;
118 struct module *owner; 125 struct module *owner;
@@ -180,15 +187,17 @@ extern int tick_receive_broadcast(void);
180#endif 187#endif
181 188
182#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT) 189#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT)
190extern void tick_setup_hrtimer_broadcast(void);
183extern int tick_check_broadcast_expired(void); 191extern int tick_check_broadcast_expired(void);
184#else 192#else
185static inline int tick_check_broadcast_expired(void) { return 0; } 193static inline int tick_check_broadcast_expired(void) { return 0; }
194static inline void tick_setup_hrtimer_broadcast(void) {};
186#endif 195#endif
187 196
188#ifdef CONFIG_GENERIC_CLOCKEVENTS 197#ifdef CONFIG_GENERIC_CLOCKEVENTS
189extern void clockevents_notify(unsigned long reason, void *arg); 198extern int clockevents_notify(unsigned long reason, void *arg);
190#else 199#else
191static inline void clockevents_notify(unsigned long reason, void *arg) {} 200static inline int clockevents_notify(unsigned long reason, void *arg) { return 0; }
192#endif 201#endif
193 202
194#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ 203#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
@@ -196,8 +205,9 @@ static inline void clockevents_notify(unsigned long reason, void *arg) {}
196static inline void clockevents_suspend(void) {} 205static inline void clockevents_suspend(void) {}
197static inline void clockevents_resume(void) {} 206static inline void clockevents_resume(void) {}
198 207
199static inline void clockevents_notify(unsigned long reason, void *arg) {} 208static inline int clockevents_notify(unsigned long reason, void *arg) { return 0; }
200static inline int tick_check_broadcast_expired(void) { return 0; } 209static inline int tick_check_broadcast_expired(void) { return 0; }
210static inline void tick_setup_hrtimer_broadcast(void) {};
201 211
202#endif 212#endif
203 213
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index d19a5c2d2270..e7a8d3fa91d5 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -96,12 +96,12 @@ enum hrtimer_restart {
96 * @function: timer expiry callback function 96 * @function: timer expiry callback function
97 * @base: pointer to the timer base (per cpu and per clock) 97 * @base: pointer to the timer base (per cpu and per clock)
98 * @state: state information (See bit values above) 98 * @state: state information (See bit values above)
99 * @start_pid: timer statistics field to store the pid of the task which
100 * started the timer
99 * @start_site: timer statistics field to store the site where the timer 101 * @start_site: timer statistics field to store the site where the timer
100 * was started 102 * was started
101 * @start_comm: timer statistics field to store the name of the process which 103 * @start_comm: timer statistics field to store the name of the process which
102 * started the timer 104 * started the timer
103 * @start_pid: timer statistics field to store the pid of the task which
104 * started the timer
105 * 105 *
106 * The hrtimer structure must be initialized by hrtimer_init() 106 * The hrtimer structure must be initialized by hrtimer_init()
107 */ 107 */
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c399ed826648..7cb07fd26680 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -294,10 +294,14 @@ extern int runqueue_is_locked(int cpu);
294#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON) 294#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
295extern void nohz_balance_enter_idle(int cpu); 295extern void nohz_balance_enter_idle(int cpu);
296extern void set_cpu_sd_state_idle(void); 296extern void set_cpu_sd_state_idle(void);
297extern int get_nohz_timer_target(void); 297extern int get_nohz_timer_target(int pinned);
298#else 298#else
299static inline void nohz_balance_enter_idle(int cpu) { } 299static inline void nohz_balance_enter_idle(int cpu) { }
300static inline void set_cpu_sd_state_idle(void) { } 300static inline void set_cpu_sd_state_idle(void) { }
301static inline int get_nohz_timer_target(int pinned)
302{
303 return smp_processor_id();
304}
301#endif 305#endif
302 306
303/* 307/*
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 532994651684..1b22c42e9c2d 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -180,6 +180,7 @@ struct execute_work {
180#ifdef CONFIG_DEBUG_OBJECTS_WORK 180#ifdef CONFIG_DEBUG_OBJECTS_WORK
181extern void __init_work(struct work_struct *work, int onstack); 181extern void __init_work(struct work_struct *work, int onstack);
182extern void destroy_work_on_stack(struct work_struct *work); 182extern void destroy_work_on_stack(struct work_struct *work);
183extern void destroy_delayed_work_on_stack(struct delayed_work *work);
183static inline unsigned int work_static(struct work_struct *work) 184static inline unsigned int work_static(struct work_struct *work)
184{ 185{
185 return *work_data_bits(work) & WORK_STRUCT_STATIC; 186 return *work_data_bits(work) & WORK_STRUCT_STATIC;
@@ -187,6 +188,7 @@ static inline unsigned int work_static(struct work_struct *work)
187#else 188#else
188static inline void __init_work(struct work_struct *work, int onstack) { } 189static inline void __init_work(struct work_struct *work, int onstack) { }
189static inline void destroy_work_on_stack(struct work_struct *work) { } 190static inline void destroy_work_on_stack(struct work_struct *work) { }
191static inline void destroy_delayed_work_on_stack(struct delayed_work *work) { }
190static inline unsigned int work_static(struct work_struct *work) { return 0; } 192static inline unsigned int work_static(struct work_struct *work) { return 0; }
191#endif 193#endif
192 194