diff options
-rw-r--r-- | block/blk-core.c | 2 | ||||
-rw-r--r-- | include/linux/interrupt.h | 3 | ||||
-rw-r--r-- | kernel/hrtimer.c | 2 | ||||
-rw-r--r-- | kernel/rcuclassic.c | 2 | ||||
-rw-r--r-- | kernel/rcupreempt.c | 2 | ||||
-rw-r--r-- | kernel/sched.c | 2 | ||||
-rw-r--r-- | kernel/softirq.c | 61 | ||||
-rw-r--r-- | kernel/timer.c | 2 | ||||
-rw-r--r-- | net/core/dev.c | 4 |
9 files changed, 25 insertions, 55 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index dbc7f42b5d2b..c6e536597c8a 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -2048,7 +2048,7 @@ int __init blk_dev_init(void) | |||
2048 | for_each_possible_cpu(i) | 2048 | for_each_possible_cpu(i) |
2049 | INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); | 2049 | INIT_LIST_HEAD(&per_cpu(blk_cpu_done, i)); |
2050 | 2050 | ||
2051 | open_softirq(BLOCK_SOFTIRQ, blk_done_softirq, NULL); | 2051 | open_softirq(BLOCK_SOFTIRQ, blk_done_softirq); |
2052 | register_hotcpu_notifier(&blk_cpu_notifier); | 2052 | register_hotcpu_notifier(&blk_cpu_notifier); |
2053 | 2053 | ||
2054 | return 0; | 2054 | return 0; |
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index f1fc7470d26c..a86186dd0474 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -285,12 +285,11 @@ enum | |||
285 | struct softirq_action | 285 | struct softirq_action |
286 | { | 286 | { |
287 | void (*action)(struct softirq_action *); | 287 | void (*action)(struct softirq_action *); |
288 | void *data; | ||
289 | }; | 288 | }; |
290 | 289 | ||
291 | asmlinkage void do_softirq(void); | 290 | asmlinkage void do_softirq(void); |
292 | asmlinkage void __do_softirq(void); | 291 | asmlinkage void __do_softirq(void); |
293 | extern void open_softirq(int nr, void (*action)(struct softirq_action*), void *data); | 292 | extern void open_softirq(int nr, void (*action)(struct softirq_action *)); |
294 | extern void softirq_init(void); | 293 | extern void softirq_init(void); |
295 | #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) | 294 | #define __raise_softirq_irqoff(nr) do { or_softirq_pending(1UL << (nr)); } while (0) |
296 | extern void raise_softirq_irqoff(unsigned int nr); | 295 | extern void raise_softirq_irqoff(unsigned int nr); |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index ab80515008f4..e0da4fc9f931 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -1677,7 +1677,7 @@ void __init hrtimers_init(void) | |||
1677 | (void *)(long)smp_processor_id()); | 1677 | (void *)(long)smp_processor_id()); |
1678 | register_cpu_notifier(&hrtimers_nb); | 1678 | register_cpu_notifier(&hrtimers_nb); |
1679 | #ifdef CONFIG_HIGH_RES_TIMERS | 1679 | #ifdef CONFIG_HIGH_RES_TIMERS |
1680 | open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq, NULL); | 1680 | open_softirq(HRTIMER_SOFTIRQ, run_hrtimer_softirq); |
1681 | #endif | 1681 | #endif |
1682 | } | 1682 | } |
1683 | 1683 | ||
diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c index a38895a5b8e2..65c0906080ef 100644 --- a/kernel/rcuclassic.c +++ b/kernel/rcuclassic.c | |||
@@ -543,7 +543,7 @@ static void __cpuinit rcu_online_cpu(int cpu) | |||
543 | 543 | ||
544 | rcu_init_percpu_data(cpu, &rcu_ctrlblk, rdp); | 544 | rcu_init_percpu_data(cpu, &rcu_ctrlblk, rdp); |
545 | rcu_init_percpu_data(cpu, &rcu_bh_ctrlblk, bh_rdp); | 545 | rcu_init_percpu_data(cpu, &rcu_bh_ctrlblk, bh_rdp); |
546 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks, NULL); | 546 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); |
547 | } | 547 | } |
548 | 548 | ||
549 | static int __cpuinit rcu_cpu_notify(struct notifier_block *self, | 549 | static int __cpuinit rcu_cpu_notify(struct notifier_block *self, |
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c index 41d275a81df5..9bf445664457 100644 --- a/kernel/rcupreempt.c +++ b/kernel/rcupreempt.c | |||
@@ -1119,7 +1119,7 @@ void __init __rcu_init(void) | |||
1119 | for_each_online_cpu(cpu) | 1119 | for_each_online_cpu(cpu) |
1120 | rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE, (void *)(long) cpu); | 1120 | rcu_cpu_notify(&rcu_nb, CPU_UP_PREPARE, (void *)(long) cpu); |
1121 | 1121 | ||
1122 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks, NULL); | 1122 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); |
1123 | } | 1123 | } |
1124 | 1124 | ||
1125 | /* | 1125 | /* |
diff --git a/kernel/sched.c b/kernel/sched.c index 2317a2178104..99e6d850ecab 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -8152,7 +8152,7 @@ void __init sched_init(void) | |||
8152 | #endif | 8152 | #endif |
8153 | 8153 | ||
8154 | #ifdef CONFIG_SMP | 8154 | #ifdef CONFIG_SMP |
8155 | open_softirq(SCHED_SOFTIRQ, run_rebalance_domains, NULL); | 8155 | open_softirq(SCHED_SOFTIRQ, run_rebalance_domains); |
8156 | #endif | 8156 | #endif |
8157 | 8157 | ||
8158 | #ifdef CONFIG_RT_MUTEXES | 8158 | #ifdef CONFIG_RT_MUTEXES |
diff --git a/kernel/softirq.c b/kernel/softirq.c index afd9120c2fc4..3e9e896fdc5b 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -131,23 +131,17 @@ void _local_bh_enable(void) | |||
131 | 131 | ||
132 | EXPORT_SYMBOL(_local_bh_enable); | 132 | EXPORT_SYMBOL(_local_bh_enable); |
133 | 133 | ||
134 | void local_bh_enable(void) | 134 | static inline void _local_bh_enable_ip(unsigned long ip) |
135 | { | 135 | { |
136 | WARN_ON_ONCE(in_irq() || irqs_disabled()); | ||
136 | #ifdef CONFIG_TRACE_IRQFLAGS | 137 | #ifdef CONFIG_TRACE_IRQFLAGS |
137 | unsigned long flags; | 138 | local_irq_disable(); |
138 | |||
139 | WARN_ON_ONCE(in_irq()); | ||
140 | #endif | ||
141 | WARN_ON_ONCE(irqs_disabled()); | ||
142 | |||
143 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
144 | local_irq_save(flags); | ||
145 | #endif | 139 | #endif |
146 | /* | 140 | /* |
147 | * Are softirqs going to be turned on now: | 141 | * Are softirqs going to be turned on now: |
148 | */ | 142 | */ |
149 | if (softirq_count() == SOFTIRQ_OFFSET) | 143 | if (softirq_count() == SOFTIRQ_OFFSET) |
150 | trace_softirqs_on((unsigned long)__builtin_return_address(0)); | 144 | trace_softirqs_on(ip); |
151 | /* | 145 | /* |
152 | * Keep preemption disabled until we are done with | 146 | * Keep preemption disabled until we are done with |
153 | * softirq processing: | 147 | * softirq processing: |
@@ -159,40 +153,20 @@ void local_bh_enable(void) | |||
159 | 153 | ||
160 | dec_preempt_count(); | 154 | dec_preempt_count(); |
161 | #ifdef CONFIG_TRACE_IRQFLAGS | 155 | #ifdef CONFIG_TRACE_IRQFLAGS |
162 | local_irq_restore(flags); | 156 | local_irq_enable(); |
163 | #endif | 157 | #endif |
164 | preempt_check_resched(); | 158 | preempt_check_resched(); |
165 | } | 159 | } |
160 | |||
161 | void local_bh_enable(void) | ||
162 | { | ||
163 | _local_bh_enable_ip((unsigned long)__builtin_return_address(0)); | ||
164 | } | ||
166 | EXPORT_SYMBOL(local_bh_enable); | 165 | EXPORT_SYMBOL(local_bh_enable); |
167 | 166 | ||
168 | void local_bh_enable_ip(unsigned long ip) | 167 | void local_bh_enable_ip(unsigned long ip) |
169 | { | 168 | { |
170 | #ifdef CONFIG_TRACE_IRQFLAGS | 169 | _local_bh_enable_ip(ip); |
171 | unsigned long flags; | ||
172 | |||
173 | WARN_ON_ONCE(in_irq()); | ||
174 | |||
175 | local_irq_save(flags); | ||
176 | #endif | ||
177 | /* | ||
178 | * Are softirqs going to be turned on now: | ||
179 | */ | ||
180 | if (softirq_count() == SOFTIRQ_OFFSET) | ||
181 | trace_softirqs_on(ip); | ||
182 | /* | ||
183 | * Keep preemption disabled until we are done with | ||
184 | * softirq processing: | ||
185 | */ | ||
186 | sub_preempt_count(SOFTIRQ_OFFSET - 1); | ||
187 | |||
188 | if (unlikely(!in_interrupt() && local_softirq_pending())) | ||
189 | do_softirq(); | ||
190 | |||
191 | dec_preempt_count(); | ||
192 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
193 | local_irq_restore(flags); | ||
194 | #endif | ||
195 | preempt_check_resched(); | ||
196 | } | 170 | } |
197 | EXPORT_SYMBOL(local_bh_enable_ip); | 171 | EXPORT_SYMBOL(local_bh_enable_ip); |
198 | 172 | ||
@@ -347,9 +321,8 @@ void raise_softirq(unsigned int nr) | |||
347 | local_irq_restore(flags); | 321 | local_irq_restore(flags); |
348 | } | 322 | } |
349 | 323 | ||
350 | void open_softirq(int nr, void (*action)(struct softirq_action*), void *data) | 324 | void open_softirq(int nr, void (*action)(struct softirq_action *)) |
351 | { | 325 | { |
352 | softirq_vec[nr].data = data; | ||
353 | softirq_vec[nr].action = action; | 326 | softirq_vec[nr].action = action; |
354 | } | 327 | } |
355 | 328 | ||
@@ -360,10 +333,8 @@ struct tasklet_head | |||
360 | struct tasklet_struct **tail; | 333 | struct tasklet_struct **tail; |
361 | }; | 334 | }; |
362 | 335 | ||
363 | /* Some compilers disobey section attribute on statics when not | 336 | static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec); |
364 | initialized -- RR */ | 337 | static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec); |
365 | static DEFINE_PER_CPU(struct tasklet_head, tasklet_vec) = { NULL }; | ||
366 | static DEFINE_PER_CPU(struct tasklet_head, tasklet_hi_vec) = { NULL }; | ||
367 | 338 | ||
368 | void __tasklet_schedule(struct tasklet_struct *t) | 339 | void __tasklet_schedule(struct tasklet_struct *t) |
369 | { | 340 | { |
@@ -503,8 +474,8 @@ void __init softirq_init(void) | |||
503 | &per_cpu(tasklet_hi_vec, cpu).head; | 474 | &per_cpu(tasklet_hi_vec, cpu).head; |
504 | } | 475 | } |
505 | 476 | ||
506 | open_softirq(TASKLET_SOFTIRQ, tasklet_action, NULL); | 477 | open_softirq(TASKLET_SOFTIRQ, tasklet_action); |
507 | open_softirq(HI_SOFTIRQ, tasklet_hi_action, NULL); | 478 | open_softirq(HI_SOFTIRQ, tasklet_hi_action); |
508 | } | 479 | } |
509 | 480 | ||
510 | static int ksoftirqd(void * __bind_cpu) | 481 | static int ksoftirqd(void * __bind_cpu) |
diff --git a/kernel/timer.c b/kernel/timer.c index ceacc6626572..b4da888497fa 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1502,7 +1502,7 @@ void __init init_timers(void) | |||
1502 | 1502 | ||
1503 | BUG_ON(err == NOTIFY_BAD); | 1503 | BUG_ON(err == NOTIFY_BAD); |
1504 | register_cpu_notifier(&timers_nb); | 1504 | register_cpu_notifier(&timers_nb); |
1505 | open_softirq(TIMER_SOFTIRQ, run_timer_softirq, NULL); | 1505 | open_softirq(TIMER_SOFTIRQ, run_timer_softirq); |
1506 | } | 1506 | } |
1507 | 1507 | ||
1508 | /** | 1508 | /** |
diff --git a/net/core/dev.c b/net/core/dev.c index fca23a3bf12c..821cb1628e5e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -4585,8 +4585,8 @@ static int __init net_dev_init(void) | |||
4585 | 4585 | ||
4586 | dev_boot_phase = 0; | 4586 | dev_boot_phase = 0; |
4587 | 4587 | ||
4588 | open_softirq(NET_TX_SOFTIRQ, net_tx_action, NULL); | 4588 | open_softirq(NET_TX_SOFTIRQ, net_tx_action); |
4589 | open_softirq(NET_RX_SOFTIRQ, net_rx_action, NULL); | 4589 | open_softirq(NET_RX_SOFTIRQ, net_rx_action); |
4590 | 4590 | ||
4591 | hotcpu_notifier(dev_cpu_callback, 0); | 4591 | hotcpu_notifier(dev_cpu_callback, 0); |
4592 | dst_init(); | 4592 | dst_init(); |