diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-06-28 15:57:18 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-10 16:40:43 -0500 |
commit | e10115dd41957cd53c3fedb40b6a0c402efe0340 (patch) | |
tree | 4d5ac0c17743a23fe190211e9fe9a61696645fdf /include | |
parent | 395698c80a2185ab1538bdc1383686bb4f2b6beb (diff) |
softirq-local-lock.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/hardirq.h | 16 | ||||
-rw-r--r-- | include/linux/interrupt.h | 12 | ||||
-rw-r--r-- | include/linux/sched.h | 1 |
3 files changed, 26 insertions, 3 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index bb7f30971858..cbd7c992f3f9 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h @@ -60,7 +60,11 @@ #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) #define NMI_OFFSET (1UL << NMI_SHIFT) -#define SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET) +#ifndef CONFIG_PREEMPT_RT_FULL +# define SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET) +#else +# define SOFTIRQ_DISABLE_OFFSET (0) +#endif #ifndef PREEMPT_ACTIVE #define PREEMPT_ACTIVE_BITS 1 @@ -73,10 +77,17 @@ #endif #define hardirq_count() (preempt_count() & HARDIRQ_MASK) -#define softirq_count() (preempt_count() & SOFTIRQ_MASK) #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK \ | NMI_MASK)) +#ifndef CONFIG_PREEMPT_RT_FULL +# define softirq_count() (preempt_count() & SOFTIRQ_MASK) +# define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) +#else +# define softirq_count() (0U) +extern int in_serving_softirq(void); +#endif + /* * Are we doing bottom half or hardware interrupt processing? * Are we in a softirq context? Interrupt context? @@ -86,7 +97,6 @@ #define in_irq() (hardirq_count()) #define in_softirq() (softirq_count()) #define in_interrupt() (irq_count()) -#define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) /* * Are we in NMI context? diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index d3b172771830..e53bd8b6eca0 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -456,7 +456,13 @@ struct softirq_action asmlinkage void do_softirq(void); asmlinkage void __do_softirq(void); + +#ifndef CONFIG_PREEMPT_RT_FULL static inline void thread_do_softirq(void) { do_softirq(); } +#else +extern void thread_do_softirq(void); +#endif + extern void open_softirq(int nr, void (*action)(struct softirq_action *)); extern void softirq_init(void); extern void __raise_softirq_irqoff(unsigned int nr); @@ -643,6 +649,12 @@ void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) tasklet_kill(&ttimer->tasklet); } +#ifdef CONFIG_PREEMPT_RT_FULL +extern void softirq_early_init(void); +#else +static inline void softirq_early_init(void) { } +#endif + /* * Autoprobing for irqs: * diff --git a/include/linux/sched.h b/include/linux/sched.h index 01f2d96b2b6a..372c15df2ebc 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1645,6 +1645,7 @@ struct task_struct { #endif #ifdef CONFIG_PREEMPT_RT_BASE struct rcu_head put_rcu; + int softirq_nestcnt; #endif }; |