Commit fbd568a3e61a7decb8a754ad952aaa5b5c82e9e5

Authored by Paul E. McKenney
Committed by Linus Torvalds
1 parent 9b06e81898

[PATCH] Change synchronize_kernel to _rcu and _sched

This patch changes calls to synchronize_kernel(), deprecated in the earlier
"Deprecate synchronize_kernel, GPL replacement" patch to instead call the new
synchronize_rcu() and synchronize_sched() APIs.

Signed-off-by: Paul E. McKenney <paulmck@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 16 changed files with 18 additions and 18 deletions Side-by-side Diff

arch/i386/oprofile/nmi_timer_int.c
... ... @@ -36,7 +36,7 @@
36 36 {
37 37 enable_timer_nmi_watchdog();
38 38 unset_nmi_callback();
39   - synchronize_kernel();
  39 + synchronize_sched(); /* Allow already-started NMIs to complete. */
40 40 }
41 41  
42 42  
arch/ppc64/kernel/HvLpEvent.c
... ... @@ -45,7 +45,7 @@
45 45 /* We now sleep until all other CPUs have scheduled. This ensures that
46 46 * the deletion is seen by all other CPUs, and that the deleted handler
47 47 * isn't still running on another CPU when we return. */
48   - synchronize_kernel();
  48 + synchronize_rcu();
49 49 }
50 50 }
51 51 return rc;
drivers/acpi/processor_idle.c
... ... @@ -838,7 +838,7 @@
838 838  
839 839 /* Fall back to the default idle loop */
840 840 pm_idle = pm_idle_save;
841   - synchronize_kernel();
  841 + synchronize_sched(); /* Relies on interrupts forcing exit from idle. */
842 842  
843 843 pr->flags.power = 0;
844 844 result = acpi_processor_get_power_info(pr);
drivers/char/ipmi/ipmi_si_intf.c
... ... @@ -2199,7 +2199,7 @@
2199 2199 /* Wait until we know that we are out of any interrupt
2200 2200 handlers might have been running before we freed the
2201 2201 interrupt. */
2202   - synchronize_kernel();
  2202 + synchronize_sched();
2203 2203  
2204 2204 if (new_smi->si_sm) {
2205 2205 if (new_smi->handlers)
... ... @@ -2312,7 +2312,7 @@
2312 2312 /* Wait until we know that we are out of any interrupt
2313 2313 handlers might have been running before we freed the
2314 2314 interrupt. */
2315   - synchronize_kernel();
  2315 + synchronize_sched();
2316 2316  
2317 2317 /* Wait for the timer to stop. This avoids problems with race
2318 2318 conditions removing the timer here. */
drivers/input/keyboard/atkbd.c
... ... @@ -678,7 +678,7 @@
678 678 atkbd_disable(atkbd);
679 679  
680 680 /* make sure we don't have a command in flight */
681   - synchronize_kernel();
  681 + synchronize_sched(); /* Allow atkbd_interrupt()s to complete. */
682 682 flush_scheduled_work();
683 683  
684 684 device_remove_file(&serio->dev, &atkbd_attr_extra);
drivers/md/multipath.c
... ... @@ -355,7 +355,7 @@
355 355 goto abort;
356 356 }
357 357 p->rdev = NULL;
358   - synchronize_kernel();
  358 + synchronize_rcu();
359 359 if (atomic_read(&rdev->nr_pending)) {
360 360 /* lost the race, try later */
361 361 err = -EBUSY;
... ... @@ -797,7 +797,7 @@
797 797 goto abort;
798 798 }
799 799 p->rdev = NULL;
800   - synchronize_kernel();
  800 + synchronize_rcu();
801 801 if (atomic_read(&rdev->nr_pending)) {
802 802 /* lost the race, try later */
803 803 err = -EBUSY;
... ... @@ -977,7 +977,7 @@
977 977 goto abort;
978 978 }
979 979 p->rdev = NULL;
980   - synchronize_kernel();
  980 + synchronize_rcu();
981 981 if (atomic_read(&rdev->nr_pending)) {
982 982 /* lost the race, try later */
983 983 err = -EBUSY;
... ... @@ -1873,7 +1873,7 @@
1873 1873 goto abort;
1874 1874 }
1875 1875 p->rdev = NULL;
1876   - synchronize_kernel();
  1876 + synchronize_rcu();
1877 1877 if (atomic_read(&rdev->nr_pending)) {
1878 1878 /* lost the race, try later */
1879 1879 err = -EBUSY;
drivers/md/raid6main.c
... ... @@ -2038,7 +2038,7 @@
2038 2038 goto abort;
2039 2039 }
2040 2040 p->rdev = NULL;
2041   - synchronize_kernel();
  2041 + synchronize_rcu();
2042 2042 if (atomic_read(&rdev->nr_pending)) {
2043 2043 /* lost the race, try later */
2044 2044 err = -EBUSY;
... ... @@ -2385,7 +2385,7 @@
2385 2385 }
2386 2386  
2387 2387 /* Give a racing hard_start_xmit a few cycles to complete. */
2388   - synchronize_kernel();
  2388 + synchronize_sched(); /* FIXME: should this be synchronize_irq()? */
2389 2389  
2390 2390 /*
2391 2391 * And now for the 50k$ question: are IRQ disabled or not ?
drivers/s390/cio/airq.c
... ... @@ -45,7 +45,7 @@
45 45 else
46 46 ret = (cmpxchg(&adapter_handler, NULL, handler) ? -EBUSY : 0);
47 47 if (!ret)
48   - synchronize_kernel();
  48 + synchronize_sched(); /* Allow interrupts to complete. */
49 49  
50 50 sprintf (dbf_txt, "ret:%d", ret);
51 51 CIO_TRACE_EVENT (4, dbf_txt);
... ... @@ -65,7 +65,7 @@
65 65 ret = -EINVAL;
66 66 else {
67 67 adapter_handler = NULL;
68   - synchronize_kernel();
  68 + synchronize_sched(); /* Allow interrupts to complete. */
69 69 ret = 0;
70 70 }
71 71 sprintf (dbf_txt, "ret:%d", ret);
... ... @@ -1801,7 +1801,7 @@
1801 1801 /* Init routine failed: abort. Try to protect us from
1802 1802 buggy refcounters. */
1803 1803 mod->state = MODULE_STATE_GOING;
1804   - synchronize_kernel();
  1804 + synchronize_sched();
1805 1805 if (mod->unsafe)
1806 1806 printk(KERN_ERR "%s: module is now stuck!\n",
1807 1807 mod->name);
... ... @@ -184,7 +184,7 @@
184 184 WARN_ON(hook != timer_hook);
185 185 timer_hook = NULL;
186 186 /* make sure all CPUs see the NULL hook */
187   - synchronize_kernel();
  187 + synchronize_sched(); /* Allow ongoing interrupts to complete. */
188 188 }
189 189  
190 190 EXPORT_SYMBOL_GPL(register_timer_hook);
... ... @@ -1666,7 +1666,7 @@
1666 1666 }
1667 1667  
1668 1668 if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
1669   - synchronize_kernel();
  1669 + synchronize_rcu();
1670 1670  
1671 1671 /* no cpu_online check required here since we clear the percpu
1672 1672 * array on cpu offline and set this to NULL.
... ... @@ -3091,7 +3091,7 @@
3091 3091 void synchronize_net(void)
3092 3092 {
3093 3093 might_sleep();
3094   - synchronize_kernel();
  3094 + synchronize_rcu();
3095 3095 }
3096 3096  
3097 3097 /**