|
@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp
|
|
|
|
|
|
DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
|
|
DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
|
|
|
|
|
|
-char *softirq_to_name[NR_SOFTIRQS] = {
|
|
|
|
|
|
+const char * const softirq_to_name[NR_SOFTIRQS] = {
|
|
"HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL",
|
|
"HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL",
|
|
"TASKLET", "SCHED", "HRTIMER", "RCU"
|
|
"TASKLET", "SCHED", "HRTIMER", "RCU"
|
|
};
|
|
};
|
|
@@ -138,7 +138,6 @@ void _local_bh_enable(void)
|
|
WARN_ON_ONCE(in_irq());
|
|
WARN_ON_ONCE(in_irq());
|
|
__local_bh_enable(SOFTIRQ_DISABLE_OFFSET);
|
|
__local_bh_enable(SOFTIRQ_DISABLE_OFFSET);
|
|
}
|
|
}
|
|
-
|
|
|
|
EXPORT_SYMBOL(_local_bh_enable);
|
|
EXPORT_SYMBOL(_local_bh_enable);
|
|
|
|
|
|
void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
|
|
void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
|
|
@@ -155,7 +154,7 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
|
|
/*
|
|
/*
|
|
* Keep preemption disabled until we are done with
|
|
* Keep preemption disabled until we are done with
|
|
* softirq processing:
|
|
* softirq processing:
|
|
- */
|
|
|
|
|
|
+ */
|
|
preempt_count_sub(cnt - 1);
|
|
preempt_count_sub(cnt - 1);
|
|
|
|
|
|
if (unlikely(!in_interrupt() && local_softirq_pending())) {
|
|
if (unlikely(!in_interrupt() && local_softirq_pending())) {
|
|
@@ -436,8 +435,7 @@ void open_softirq(int nr, void (*action)(struct softirq_action *))
|
|
/*
|
|
/*
|
|
* Tasklets
|
|
* Tasklets
|
|
*/
|
|
*/
|
|
-struct tasklet_head
|
|
|
|
-{
|
|
|
|
|
|
+struct tasklet_head {
|
|
struct tasklet_struct *head;
|
|
struct tasklet_struct *head;
|
|
struct tasklet_struct **tail;
|
|
struct tasklet_struct **tail;
|
|
};
|
|
};
|
|
@@ -456,7 +454,6 @@ void __tasklet_schedule(struct tasklet_struct *t)
|
|
raise_softirq_irqoff(TASKLET_SOFTIRQ);
|
|
raise_softirq_irqoff(TASKLET_SOFTIRQ);
|
|
local_irq_restore(flags);
|
|
local_irq_restore(flags);
|
|
}
|
|
}
|
|
-
|
|
|
|
EXPORT_SYMBOL(__tasklet_schedule);
|
|
EXPORT_SYMBOL(__tasklet_schedule);
|
|
|
|
|
|
void __tasklet_hi_schedule(struct tasklet_struct *t)
|
|
void __tasklet_hi_schedule(struct tasklet_struct *t)
|
|
@@ -470,7 +467,6 @@ void __tasklet_hi_schedule(struct tasklet_struct *t)
|
|
raise_softirq_irqoff(HI_SOFTIRQ);
|
|
raise_softirq_irqoff(HI_SOFTIRQ);
|
|
local_irq_restore(flags);
|
|
local_irq_restore(flags);
|
|
}
|
|
}
|
|
-
|
|
|
|
EXPORT_SYMBOL(__tasklet_hi_schedule);
|
|
EXPORT_SYMBOL(__tasklet_hi_schedule);
|
|
|
|
|
|
void __tasklet_hi_schedule_first(struct tasklet_struct *t)
|
|
void __tasklet_hi_schedule_first(struct tasklet_struct *t)
|
|
@@ -481,7 +477,6 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t)
|
|
__this_cpu_write(tasklet_hi_vec.head, t);
|
|
__this_cpu_write(tasklet_hi_vec.head, t);
|
|
__raise_softirq_irqoff(HI_SOFTIRQ);
|
|
__raise_softirq_irqoff(HI_SOFTIRQ);
|
|
}
|
|
}
|
|
-
|
|
|
|
EXPORT_SYMBOL(__tasklet_hi_schedule_first);
|
|
EXPORT_SYMBOL(__tasklet_hi_schedule_first);
|
|
|
|
|
|
static void tasklet_action(struct softirq_action *a)
|
|
static void tasklet_action(struct softirq_action *a)
|
|
@@ -501,7 +496,8 @@ static void tasklet_action(struct softirq_action *a)
|
|
|
|
|
|
if (tasklet_trylock(t)) {
|
|
if (tasklet_trylock(t)) {
|
|
if (!atomic_read(&t->count)) {
|
|
if (!atomic_read(&t->count)) {
|
|
- if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
|
|
|
|
|
|
+ if (!test_and_clear_bit(TASKLET_STATE_SCHED,
|
|
|
|
+ &t->state))
|
|
BUG();
|
|
BUG();
|
|
t->func(t->data);
|
|
t->func(t->data);
|
|
tasklet_unlock(t);
|
|
tasklet_unlock(t);
|
|
@@ -536,7 +532,8 @@ static void tasklet_hi_action(struct softirq_action *a)
|
|
|
|
|
|
if (tasklet_trylock(t)) {
|
|
if (tasklet_trylock(t)) {
|
|
if (!atomic_read(&t->count)) {
|
|
if (!atomic_read(&t->count)) {
|
|
- if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state))
|
|
|
|
|
|
+ if (!test_and_clear_bit(TASKLET_STATE_SCHED,
|
|
|
|
+ &t->state))
|
|
BUG();
|
|
BUG();
|
|
t->func(t->data);
|
|
t->func(t->data);
|
|
tasklet_unlock(t);
|
|
tasklet_unlock(t);
|
|
@@ -554,7 +551,6 @@ static void tasklet_hi_action(struct softirq_action *a)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
void tasklet_init(struct tasklet_struct *t,
|
|
void tasklet_init(struct tasklet_struct *t,
|
|
void (*func)(unsigned long), unsigned long data)
|
|
void (*func)(unsigned long), unsigned long data)
|
|
{
|
|
{
|
|
@@ -564,7 +560,6 @@ void tasklet_init(struct tasklet_struct *t,
|
|
t->func = func;
|
|
t->func = func;
|
|
t->data = data;
|
|
t->data = data;
|
|
}
|
|
}
|
|
-
|
|
|
|
EXPORT_SYMBOL(tasklet_init);
|
|
EXPORT_SYMBOL(tasklet_init);
|
|
|
|
|
|
void tasklet_kill(struct tasklet_struct *t)
|
|
void tasklet_kill(struct tasklet_struct *t)
|
|
@@ -580,7 +575,6 @@ void tasklet_kill(struct tasklet_struct *t)
|
|
tasklet_unlock_wait(t);
|
|
tasklet_unlock_wait(t);
|
|
clear_bit(TASKLET_STATE_SCHED, &t->state);
|
|
clear_bit(TASKLET_STATE_SCHED, &t->state);
|
|
}
|
|
}
|
|
-
|
|
|
|
EXPORT_SYMBOL(tasklet_kill);
|
|
EXPORT_SYMBOL(tasklet_kill);
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -730,9 +724,8 @@ static void takeover_tasklets(unsigned int cpu)
|
|
}
|
|
}
|
|
#endif /* CONFIG_HOTPLUG_CPU */
|
|
#endif /* CONFIG_HOTPLUG_CPU */
|
|
|
|
|
|
-static int cpu_callback(struct notifier_block *nfb,
|
|
|
|
- unsigned long action,
|
|
|
|
- void *hcpu)
|
|
|
|
|
|
+static int cpu_callback(struct notifier_block *nfb, unsigned long action,
|
|
|
|
+ void *hcpu)
|
|
{
|
|
{
|
|
switch (action) {
|
|
switch (action) {
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
#ifdef CONFIG_HOTPLUG_CPU
|