aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@us.ibm.com>2005-05-01 11:59:04 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 11:59:04 -0400
commitfbd568a3e61a7decb8a754ad952aaa5b5c82e9e5 (patch)
tree40a44149a9b6a39eac5481380e2212f9b9b74eb2
parent9b06e818985d139fd9e82c28297f7744e1b484e1 (diff)
[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>
-rw-r--r--arch/i386/oprofile/nmi_timer_int.c2
-rw-r--r--arch/ppc64/kernel/HvLpEvent.c2
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c4
-rw-r--r--drivers/input/keyboard/atkbd.c2
-rw-r--r--drivers/md/multipath.c2
-rw-r--r--drivers/md/raid1.c2
-rw-r--r--drivers/md/raid10.c2
-rw-r--r--drivers/md/raid5.c2
-rw-r--r--drivers/md/raid6main.c2
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/s390/cio/airq.c4
-rw-r--r--kernel/module.c2
-rw-r--r--kernel/profile.c2
-rw-r--r--mm/slab.c2
-rw-r--r--net/core/dev.c2
16 files changed, 18 insertions, 18 deletions
diff --git a/arch/i386/oprofile/nmi_timer_int.c b/arch/i386/oprofile/nmi_timer_int.c
index b2e462abf337..c58d0c14f274 100644
--- a/arch/i386/oprofile/nmi_timer_int.c
+++ b/arch/i386/oprofile/nmi_timer_int.c
@@ -36,7 +36,7 @@ static void timer_stop(void)
36{ 36{
37 enable_timer_nmi_watchdog(); 37 enable_timer_nmi_watchdog();
38 unset_nmi_callback(); 38 unset_nmi_callback();
39 synchronize_kernel(); 39 synchronize_sched(); /* Allow already-started NMIs to complete. */
40} 40}
41 41
42 42
diff --git a/arch/ppc64/kernel/HvLpEvent.c b/arch/ppc64/kernel/HvLpEvent.c
index 9802beefa217..f8f19637f73f 100644
--- a/arch/ppc64/kernel/HvLpEvent.c
+++ b/arch/ppc64/kernel/HvLpEvent.c
@@ -45,7 +45,7 @@ int HvLpEvent_unregisterHandler( HvLpEvent_Type eventType )
45 /* We now sleep until all other CPUs have scheduled. This ensures that 45 /* We now sleep until all other CPUs have scheduled. This ensures that
46 * the deletion is seen by all other CPUs, and that the deleted handler 46 * the deletion is seen by all other CPUs, and that the deleted handler
47 * isn't still running on another CPU when we return. */ 47 * isn't still running on another CPU when we return. */
48 synchronize_kernel(); 48 synchronize_rcu();
49 } 49 }
50 } 50 }
51 return rc; 51 return rc;
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 05a17812d521..ff64d333e95f 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -838,7 +838,7 @@ int acpi_processor_cst_has_changed (struct acpi_processor *pr)
838 838
839 /* Fall back to the default idle loop */ 839 /* Fall back to the default idle loop */
840 pm_idle = pm_idle_save; 840 pm_idle = pm_idle_save;
841 synchronize_kernel(); 841 synchronize_sched(); /* Relies on interrupts forcing exit from idle. */
842 842
843 pr->flags.power = 0; 843 pr->flags.power = 0;
844 result = acpi_processor_get_power_info(pr); 844 result = acpi_processor_get_power_info(pr);
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 29de259a981e..44a7f13c788b 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2199,7 +2199,7 @@ static int init_one_smi(int intf_num, struct smi_info **smi)
2199 /* Wait until we know that we are out of any interrupt 2199 /* Wait until we know that we are out of any interrupt
2200 handlers might have been running before we freed the 2200 handlers might have been running before we freed the
2201 interrupt. */ 2201 interrupt. */
2202 synchronize_kernel(); 2202 synchronize_sched();
2203 2203
2204 if (new_smi->si_sm) { 2204 if (new_smi->si_sm) {
2205 if (new_smi->handlers) 2205 if (new_smi->handlers)
@@ -2312,7 +2312,7 @@ static void __exit cleanup_one_si(struct smi_info *to_clean)
2312 /* Wait until we know that we are out of any interrupt 2312 /* Wait until we know that we are out of any interrupt
2313 handlers might have been running before we freed the 2313 handlers might have been running before we freed the
2314 interrupt. */ 2314 interrupt. */
2315 synchronize_kernel(); 2315 synchronize_sched();
2316 2316
2317 /* Wait for the timer to stop. This avoids problems with race 2317 /* Wait for the timer to stop. This avoids problems with race
2318 conditions removing the timer here. */ 2318 conditions removing the timer here. */
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index f7304f0ce542..ff66ed4ee2cd 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -678,7 +678,7 @@ static void atkbd_disconnect(struct serio *serio)
678 atkbd_disable(atkbd); 678 atkbd_disable(atkbd);
679 679
680 /* make sure we don't have a command in flight */ 680 /* make sure we don't have a command in flight */
681 synchronize_kernel(); 681 synchronize_sched(); /* Allow atkbd_interrupt()s to complete. */
682 flush_scheduled_work(); 682 flush_scheduled_work();
683 683
684 device_remove_file(&serio->dev, &atkbd_attr_extra); 684 device_remove_file(&serio->dev, &atkbd_attr_extra);
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index c9b134cd1532..1891e4930dcc 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -355,7 +355,7 @@ static int multipath_remove_disk(mddev_t *mddev, int number)
355 goto abort; 355 goto abort;
356 } 356 }
357 p->rdev = NULL; 357 p->rdev = NULL;
358 synchronize_kernel(); 358 synchronize_rcu();
359 if (atomic_read(&rdev->nr_pending)) { 359 if (atomic_read(&rdev->nr_pending)) {
360 /* lost the race, try later */ 360 /* lost the race, try later */
361 err = -EBUSY; 361 err = -EBUSY;
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a389394b52f6..83380b5d6593 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -797,7 +797,7 @@ static int raid1_remove_disk(mddev_t *mddev, int number)
797 goto abort; 797 goto abort;
798 } 798 }
799 p->rdev = NULL; 799 p->rdev = NULL;
800 synchronize_kernel(); 800 synchronize_rcu();
801 if (atomic_read(&rdev->nr_pending)) { 801 if (atomic_read(&rdev->nr_pending)) {
802 /* lost the race, try later */ 802 /* lost the race, try later */
803 err = -EBUSY; 803 err = -EBUSY;
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index b100bfe4fdca..e9dc2876a626 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -977,7 +977,7 @@ static int raid10_remove_disk(mddev_t *mddev, int number)
977 goto abort; 977 goto abort;
978 } 978 }
979 p->rdev = NULL; 979 p->rdev = NULL;
980 synchronize_kernel(); 980 synchronize_rcu();
981 if (atomic_read(&rdev->nr_pending)) { 981 if (atomic_read(&rdev->nr_pending)) {
982 /* lost the race, try later */ 982 /* lost the race, try later */
983 err = -EBUSY; 983 err = -EBUSY;
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 52c3a81c4aa7..e96e2a10a9c9 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1873,7 +1873,7 @@ static int raid5_remove_disk(mddev_t *mddev, int number)
1873 goto abort; 1873 goto abort;
1874 } 1874 }
1875 p->rdev = NULL; 1875 p->rdev = NULL;
1876 synchronize_kernel(); 1876 synchronize_rcu();
1877 if (atomic_read(&rdev->nr_pending)) { 1877 if (atomic_read(&rdev->nr_pending)) {
1878 /* lost the race, try later */ 1878 /* lost the race, try later */
1879 err = -EBUSY; 1879 err = -EBUSY;
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index 7e30ab29691a..8a33f351e092 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -2038,7 +2038,7 @@ static int raid6_remove_disk(mddev_t *mddev, int number)
2038 goto abort; 2038 goto abort;
2039 } 2039 }
2040 p->rdev = NULL; 2040 p->rdev = NULL;
2041 synchronize_kernel(); 2041 synchronize_rcu();
2042 if (atomic_read(&rdev->nr_pending)) { 2042 if (atomic_read(&rdev->nr_pending)) {
2043 /* lost the race, try later */ 2043 /* lost the race, try later */
2044 err = -EBUSY; 2044 err = -EBUSY;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 07e2df09491f..c59507f8a76b 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -2385,7 +2385,7 @@ core_down:
2385 } 2385 }
2386 2386
2387 /* Give a racing hard_start_xmit a few cycles to complete. */ 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 * And now for the 50k$ question: are IRQ disabled or not ? 2391 * And now for the 50k$ question: are IRQ disabled or not ?
diff --git a/drivers/s390/cio/airq.c b/drivers/s390/cio/airq.c
index 3720e77b465f..83e6a060668e 100644
--- a/drivers/s390/cio/airq.c
+++ b/drivers/s390/cio/airq.c
@@ -45,7 +45,7 @@ s390_register_adapter_interrupt (adapter_int_handler_t handler)
45 else 45 else
46 ret = (cmpxchg(&adapter_handler, NULL, handler) ? -EBUSY : 0); 46 ret = (cmpxchg(&adapter_handler, NULL, handler) ? -EBUSY : 0);
47 if (!ret) 47 if (!ret)
48 synchronize_kernel(); 48 synchronize_sched(); /* Allow interrupts to complete. */
49 49
50 sprintf (dbf_txt, "ret:%d", ret); 50 sprintf (dbf_txt, "ret:%d", ret);
51 CIO_TRACE_EVENT (4, dbf_txt); 51 CIO_TRACE_EVENT (4, dbf_txt);
@@ -65,7 +65,7 @@ s390_unregister_adapter_interrupt (adapter_int_handler_t handler)
65 ret = -EINVAL; 65 ret = -EINVAL;
66 else { 66 else {
67 adapter_handler = NULL; 67 adapter_handler = NULL;
68 synchronize_kernel(); 68 synchronize_sched(); /* Allow interrupts to complete. */
69 ret = 0; 69 ret = 0;
70 } 70 }
71 sprintf (dbf_txt, "ret:%d", ret); 71 sprintf (dbf_txt, "ret:%d", ret);
diff --git a/kernel/module.c b/kernel/module.c
index 2dbfa0773faf..5734ab09d3f9 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1801,7 +1801,7 @@ sys_init_module(void __user *umod,
1801 /* Init routine failed: abort. Try to protect us from 1801 /* Init routine failed: abort. Try to protect us from
1802 buggy refcounters. */ 1802 buggy refcounters. */
1803 mod->state = MODULE_STATE_GOING; 1803 mod->state = MODULE_STATE_GOING;
1804 synchronize_kernel(); 1804 synchronize_sched();
1805 if (mod->unsafe) 1805 if (mod->unsafe)
1806 printk(KERN_ERR "%s: module is now stuck!\n", 1806 printk(KERN_ERR "%s: module is now stuck!\n",
1807 mod->name); 1807 mod->name);
diff --git a/kernel/profile.c b/kernel/profile.c
index a66be468c422..0221a50ca867 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -184,7 +184,7 @@ void unregister_timer_hook(int (*hook)(struct pt_regs *))
184 WARN_ON(hook != timer_hook); 184 WARN_ON(hook != timer_hook);
185 timer_hook = NULL; 185 timer_hook = NULL;
186 /* make sure all CPUs see the NULL hook */ 186 /* make sure all CPUs see the NULL hook */
187 synchronize_kernel(); 187 synchronize_sched(); /* Allow ongoing interrupts to complete. */
188} 188}
189 189
190EXPORT_SYMBOL_GPL(register_timer_hook); 190EXPORT_SYMBOL_GPL(register_timer_hook);
diff --git a/mm/slab.c b/mm/slab.c
index 771cc09f9f1a..840742641152 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1666,7 +1666,7 @@ int kmem_cache_destroy(kmem_cache_t * cachep)
1666 } 1666 }
1667 1667
1668 if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) 1668 if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU))
1669 synchronize_kernel(); 1669 synchronize_rcu();
1670 1670
1671 /* no cpu_online check required here since we clear the percpu 1671 /* no cpu_online check required here since we clear the percpu
1672 * array on cpu offline and set this to NULL. 1672 * array on cpu offline and set this to NULL.
diff --git a/net/core/dev.c b/net/core/dev.c
index 7bd4cd4502c4..f5f005846fe1 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3091,7 +3091,7 @@ void free_netdev(struct net_device *dev)
3091void synchronize_net(void) 3091void synchronize_net(void)
3092{ 3092{
3093 might_sleep(); 3093 might_sleep();
3094 synchronize_kernel(); 3094 synchronize_rcu();
3095} 3095}
3096 3096
3097/** 3097/**