diff options
author | Joe Perches <joe@perches.com> | 2014-01-27 20:07:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-28 00:02:40 -0500 |
commit | ce85b4f2eab663dfd4ff2cb5b603ba03f595922e (patch) | |
tree | 46bbedbb7883c93a2b058eb1cb6603ce39789b69 /kernel/softirq.c | |
parent | 403227641533c4227d44d14f25c8f3676f6e7436 (diff) |
softirq: use const char * const for softirq_to_name, whitespace neatening
Reduce data size a little.
Reduce checkpatch noise.
$ size kernel/softirq.o*
text data bss dec hex filename
11554 6013 4008 21575 5447 kernel/softirq.o.new
11474 6093 4008 21575 5447 kernel/softirq.o.old
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 2674354a5cb8..850967068aaf 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -56,7 +56,7 @@ static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp | |||
56 | 56 | ||
57 | DEFINE_PER_CPU(struct task_struct *, ksoftirqd); | 57 | DEFINE_PER_CPU(struct task_struct *, ksoftirqd); |
58 | 58 | ||
59 | char *softirq_to_name[NR_SOFTIRQS] = { | 59 | const char * const softirq_to_name[NR_SOFTIRQS] = { |
60 | "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", | 60 | "HI", "TIMER", "NET_TX", "NET_RX", "BLOCK", "BLOCK_IOPOLL", |
61 | "TASKLET", "SCHED", "HRTIMER", "RCU" | 61 | "TASKLET", "SCHED", "HRTIMER", "RCU" |
62 | }; | 62 | }; |
@@ -138,7 +138,6 @@ void _local_bh_enable(void) | |||
138 | WARN_ON_ONCE(in_irq()); | 138 | WARN_ON_ONCE(in_irq()); |
139 | __local_bh_enable(SOFTIRQ_DISABLE_OFFSET); | 139 | __local_bh_enable(SOFTIRQ_DISABLE_OFFSET); |
140 | } | 140 | } |
141 | |||
142 | EXPORT_SYMBOL(_local_bh_enable); | 141 | EXPORT_SYMBOL(_local_bh_enable); |
143 | 142 | ||
144 | void __local_bh_enable_ip(unsigned long ip, unsigned int cnt) | 143 | 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) | |||
155 | /* | 154 | /* |
156 | * Keep preemption disabled until we are done with | 155 | * Keep preemption disabled until we are done with |
157 | * softirq processing: | 156 | * softirq processing: |
158 | */ | 157 | */ |
159 | preempt_count_sub(cnt - 1); | 158 | preempt_count_sub(cnt - 1); |
160 | 159 | ||
161 | if (unlikely(!in_interrupt() && local_softirq_pending())) { | 160 | if (unlikely(!in_interrupt() && local_softirq_pending())) { |
@@ -436,8 +435,7 @@ void open_softirq(int nr, void (*action)(struct softirq_action *)) | |||
436 | /* | 435 | /* |
437 | * Tasklets | 436 | * Tasklets |
438 | */ | 437 | */ |
439 | struct tasklet_head | 438 | struct tasklet_head { |
440 | { | ||
441 | struct tasklet_struct *head; | 439 | struct tasklet_struct *head; |
442 | struct tasklet_struct **tail; | 440 | struct tasklet_struct **tail; |
443 | }; | 441 | }; |
@@ -456,7 +454,6 @@ void __tasklet_schedule(struct tasklet_struct *t) | |||
456 | raise_softirq_irqoff(TASKLET_SOFTIRQ); | 454 | raise_softirq_irqoff(TASKLET_SOFTIRQ); |
457 | local_irq_restore(flags); | 455 | local_irq_restore(flags); |
458 | } | 456 | } |
459 | |||
460 | EXPORT_SYMBOL(__tasklet_schedule); | 457 | EXPORT_SYMBOL(__tasklet_schedule); |
461 | 458 | ||
462 | void __tasklet_hi_schedule(struct tasklet_struct *t) | 459 | void __tasklet_hi_schedule(struct tasklet_struct *t) |
@@ -470,7 +467,6 @@ void __tasklet_hi_schedule(struct tasklet_struct *t) | |||
470 | raise_softirq_irqoff(HI_SOFTIRQ); | 467 | raise_softirq_irqoff(HI_SOFTIRQ); |
471 | local_irq_restore(flags); | 468 | local_irq_restore(flags); |
472 | } | 469 | } |
473 | |||
474 | EXPORT_SYMBOL(__tasklet_hi_schedule); | 470 | EXPORT_SYMBOL(__tasklet_hi_schedule); |
475 | 471 | ||
476 | void __tasklet_hi_schedule_first(struct tasklet_struct *t) | 472 | void __tasklet_hi_schedule_first(struct tasklet_struct *t) |
@@ -481,7 +477,6 @@ void __tasklet_hi_schedule_first(struct tasklet_struct *t) | |||
481 | __this_cpu_write(tasklet_hi_vec.head, t); | 477 | __this_cpu_write(tasklet_hi_vec.head, t); |
482 | __raise_softirq_irqoff(HI_SOFTIRQ); | 478 | __raise_softirq_irqoff(HI_SOFTIRQ); |
483 | } | 479 | } |
484 | |||
485 | EXPORT_SYMBOL(__tasklet_hi_schedule_first); | 480 | EXPORT_SYMBOL(__tasklet_hi_schedule_first); |
486 | 481 | ||
487 | static void tasklet_action(struct softirq_action *a) | 482 | static void tasklet_action(struct softirq_action *a) |
@@ -501,7 +496,8 @@ static void tasklet_action(struct softirq_action *a) | |||
501 | 496 | ||
502 | if (tasklet_trylock(t)) { | 497 | if (tasklet_trylock(t)) { |
503 | if (!atomic_read(&t->count)) { | 498 | if (!atomic_read(&t->count)) { |
504 | if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) | 499 | if (!test_and_clear_bit(TASKLET_STATE_SCHED, |
500 | &t->state)) | ||
505 | BUG(); | 501 | BUG(); |
506 | t->func(t->data); | 502 | t->func(t->data); |
507 | tasklet_unlock(t); | 503 | tasklet_unlock(t); |
@@ -536,7 +532,8 @@ static void tasklet_hi_action(struct softirq_action *a) | |||
536 | 532 | ||
537 | if (tasklet_trylock(t)) { | 533 | if (tasklet_trylock(t)) { |
538 | if (!atomic_read(&t->count)) { | 534 | if (!atomic_read(&t->count)) { |
539 | if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) | 535 | if (!test_and_clear_bit(TASKLET_STATE_SCHED, |
536 | &t->state)) | ||
540 | BUG(); | 537 | BUG(); |
541 | t->func(t->data); | 538 | t->func(t->data); |
542 | tasklet_unlock(t); | 539 | tasklet_unlock(t); |
@@ -554,7 +551,6 @@ static void tasklet_hi_action(struct softirq_action *a) | |||
554 | } | 551 | } |
555 | } | 552 | } |
556 | 553 | ||
557 | |||
558 | void tasklet_init(struct tasklet_struct *t, | 554 | void tasklet_init(struct tasklet_struct *t, |
559 | void (*func)(unsigned long), unsigned long data) | 555 | void (*func)(unsigned long), unsigned long data) |
560 | { | 556 | { |
@@ -564,7 +560,6 @@ void tasklet_init(struct tasklet_struct *t, | |||
564 | t->func = func; | 560 | t->func = func; |
565 | t->data = data; | 561 | t->data = data; |
566 | } | 562 | } |
567 | |||
568 | EXPORT_SYMBOL(tasklet_init); | 563 | EXPORT_SYMBOL(tasklet_init); |
569 | 564 | ||
570 | void tasklet_kill(struct tasklet_struct *t) | 565 | void tasklet_kill(struct tasklet_struct *t) |
@@ -580,7 +575,6 @@ void tasklet_kill(struct tasklet_struct *t) | |||
580 | tasklet_unlock_wait(t); | 575 | tasklet_unlock_wait(t); |
581 | clear_bit(TASKLET_STATE_SCHED, &t->state); | 576 | clear_bit(TASKLET_STATE_SCHED, &t->state); |
582 | } | 577 | } |
583 | |||
584 | EXPORT_SYMBOL(tasklet_kill); | 578 | EXPORT_SYMBOL(tasklet_kill); |
585 | 579 | ||
586 | /* | 580 | /* |
@@ -730,9 +724,8 @@ static void takeover_tasklets(unsigned int cpu) | |||
730 | } | 724 | } |
731 | #endif /* CONFIG_HOTPLUG_CPU */ | 725 | #endif /* CONFIG_HOTPLUG_CPU */ |
732 | 726 | ||
733 | static int cpu_callback(struct notifier_block *nfb, | 727 | static int cpu_callback(struct notifier_block *nfb, unsigned long action, |
734 | unsigned long action, | 728 | void *hcpu) |
735 | void *hcpu) | ||
736 | { | 729 | { |
737 | switch (action) { | 730 | switch (action) { |
738 | #ifdef CONFIG_HOTPLUG_CPU | 731 | #ifdef CONFIG_HOTPLUG_CPU |