1
0

[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>
This commit is contained in:
Paul E. McKenney
2005-05-01 08:59:04 -07:00
committed by Linus Torvalds
parent 9b06e81898
commit fbd568a3e6
16 changed files with 18 additions and 18 deletions

View File

@@ -838,7 +838,7 @@ int acpi_processor_cst_has_changed (struct acpi_processor *pr)
/* Fall back to the default idle loop */
pm_idle = pm_idle_save;
synchronize_kernel();
synchronize_sched(); /* Relies on interrupts forcing exit from idle. */
pr->flags.power = 0;
result = acpi_processor_get_power_info(pr);

View File

@@ -2199,7 +2199,7 @@ static int init_one_smi(int intf_num, struct smi_info **smi)
/* Wait until we know that we are out of any interrupt
handlers might have been running before we freed the
interrupt. */
synchronize_kernel();
synchronize_sched();
if (new_smi->si_sm) {
if (new_smi->handlers)
@@ -2312,7 +2312,7 @@ static void __exit cleanup_one_si(struct smi_info *to_clean)
/* Wait until we know that we are out of any interrupt
handlers might have been running before we freed the
interrupt. */
synchronize_kernel();
synchronize_sched();
/* Wait for the timer to stop. This avoids problems with race
conditions removing the timer here. */

View File

@@ -678,7 +678,7 @@ static void atkbd_disconnect(struct serio *serio)
atkbd_disable(atkbd);
/* make sure we don't have a command in flight */
synchronize_kernel();
synchronize_sched(); /* Allow atkbd_interrupt()s to complete. */
flush_scheduled_work();
device_remove_file(&serio->dev, &atkbd_attr_extra);

View File

@@ -355,7 +355,7 @@ static int multipath_remove_disk(mddev_t *mddev, int number)
goto abort;
}
p->rdev = NULL;
synchronize_kernel();
synchronize_rcu();
if (atomic_read(&rdev->nr_pending)) {
/* lost the race, try later */
err = -EBUSY;

View File

@@ -797,7 +797,7 @@ static int raid1_remove_disk(mddev_t *mddev, int number)
goto abort;
}
p->rdev = NULL;
synchronize_kernel();
synchronize_rcu();
if (atomic_read(&rdev->nr_pending)) {
/* lost the race, try later */
err = -EBUSY;

View File

@@ -977,7 +977,7 @@ static int raid10_remove_disk(mddev_t *mddev, int number)
goto abort;
}
p->rdev = NULL;
synchronize_kernel();
synchronize_rcu();
if (atomic_read(&rdev->nr_pending)) {
/* lost the race, try later */
err = -EBUSY;

View File

@@ -1873,7 +1873,7 @@ static int raid5_remove_disk(mddev_t *mddev, int number)
goto abort;
}
p->rdev = NULL;
synchronize_kernel();
synchronize_rcu();
if (atomic_read(&rdev->nr_pending)) {
/* lost the race, try later */
err = -EBUSY;

View File

@@ -2038,7 +2038,7 @@ static int raid6_remove_disk(mddev_t *mddev, int number)
goto abort;
}
p->rdev = NULL;
synchronize_kernel();
synchronize_rcu();
if (atomic_read(&rdev->nr_pending)) {
/* lost the race, try later */
err = -EBUSY;

View File

@@ -2385,7 +2385,7 @@ core_down:
}
/* Give a racing hard_start_xmit a few cycles to complete. */
synchronize_kernel();
synchronize_sched(); /* FIXME: should this be synchronize_irq()? */
/*
* And now for the 50k$ question: are IRQ disabled or not ?

View File

@@ -45,7 +45,7 @@ s390_register_adapter_interrupt (adapter_int_handler_t handler)
else
ret = (cmpxchg(&adapter_handler, NULL, handler) ? -EBUSY : 0);
if (!ret)
synchronize_kernel();
synchronize_sched(); /* Allow interrupts to complete. */
sprintf (dbf_txt, "ret:%d", ret);
CIO_TRACE_EVENT (4, dbf_txt);
@@ -65,7 +65,7 @@ s390_unregister_adapter_interrupt (adapter_int_handler_t handler)
ret = -EINVAL;
else {
adapter_handler = NULL;
synchronize_kernel();
synchronize_sched(); /* Allow interrupts to complete. */
ret = 0;
}
sprintf (dbf_txt, "ret:%d", ret);